diff --git a/apps/comments/lib/Collaboration/CommentersSorter.php b/apps/comments/lib/Collaboration/CommentersSorter.php index baa2715557383..eb0ea469cfdb7 100644 --- a/apps/comments/lib/Collaboration/CommentersSorter.php +++ b/apps/comments/lib/Collaboration/CommentersSorter.php @@ -27,6 +27,10 @@ public function getId(): string { * @param array $context */ public function sort(array &$sortArray, array $context): void { + if (!isset($context['itemType'], $context['itemId'])) { + return; + } + $commenters = $this->retrieveCommentsInformation($context['itemType'], $context['itemId']); if (count($commenters) === 0) { return; diff --git a/apps/comments/src/mixins/CommentView.ts b/apps/comments/src/mixins/CommentView.ts index f206d829fa873..5a4b250a287e1 100644 --- a/apps/comments/src/mixins/CommentView.ts +++ b/apps/comments/src/mixins/CommentView.ts @@ -27,6 +27,7 @@ export default defineComponent({ key: 'editor', }, userData: {}, + currentResourceId: this.resourceId, } }, methods: { @@ -40,8 +41,8 @@ export default defineComponent({ const { data } = await axios.get(generateOcsUrl('core/autocomplete/get'), { params: { search, - itemType: 'files', - itemId: this.resourceId, + itemType: this.resourceType, + itemId: this.currentResourceId, sorter: 'commenters|share-recipients', limit: loadState('comments', 'maxAutoCompleteResults'), }, diff --git a/apps/comments/src/views/Comments.vue b/apps/comments/src/views/Comments.vue index 64d9c4c077e55..456dedf81d8ef 100644 --- a/apps/comments/src/views/Comments.vue +++ b/apps/comments/src/views/Comments.vue @@ -110,7 +110,6 @@ export default { loading: false, done: false, - currentResourceId: this.resourceId, offset: 0, comments: [], @@ -158,7 +157,7 @@ export default { async update(resourceId) { this.currentResourceId = resourceId this.resetState() - this.getComments() + await this.getComments() }, /** @@ -206,8 +205,13 @@ export default { this.done = true } + // Ensure actor id is a string + for (const comment of comments) { + comment.props.actorId = comment.props.actorId.toString() + } + // Insert results - this.comments.push(...comments) + this.comments = [...this.comments, ...comments] // Increase offset for next fetch this.offset += DEFAULT_LIMIT diff --git a/dist/7462-7462.js b/dist/7462-7462.js index 2b8b9b2108a06..b03b9cca2d17f 100644 --- a/dist/7462-7462.js +++ b/dist/7462-7462.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[7462],{3100:(t,e,n)=>{var i=n(85072),o=n.n(i),a=n(97825),s=n.n(a),r=n(77659),c=n.n(r),m=n(55056),d=n.n(m),l=n(10540),A=n.n(l),p=n(41113),u=n.n(p),h=n(90195),C={};C.styleTagTransform=u(),C.setAttributes=d(),C.insert=c().bind(null,"head"),C.domAPI=s(),C.insertStyleElement=A(),o()(h.A,C),h.A&&h.A.locals&&h.A.locals},10396:(e,n,i)=>{i.d(n,{A:()=>l});var o=i(85168),a=i(65899),s=i(96689),r=i(80486),c=i(10767),m=i(70395),d=i(36564);const l={props:{id:{type:Number,default:null},message:{type:String,default:""},resourceId:{type:[String,Number],required:!0},resourceType:{type:String,default:"files"}},data:()=>({deleted:!1,editing:!1,loading:!1}),computed:{...(0,a.n2)(d.h)},methods:{onEdit(){this.editing=!0},onEditCancel(){this.editing=!1,this.updateLocalMessage(this.message)},async onEditComment(e){this.loading=!0;try{await(0,c.A)(this.resourceType,this.resourceId,this.id,e),s.A.debug("Comment edited",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id,message:e}),this.$emit("update:message",e),this.editing=!1}catch(e){(0,o.Qg)(t("comments","An error occurred while trying to edit the comment")),s.A.error("An error occurred while trying to edit the comment",{error:e})}finally{this.loading=!1}},onDeleteWithUndo(){this.$emit("delete"),this.deleted=!0,this.deletedCommentLimboStore.addId(this.id);const e=setTimeout(this.onDelete,o.Br);(0,o._h)(t("comments","Comment deleted"),()=>{clearTimeout(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)})},async onDelete(){try{await(0,r.A)(this.resourceType,this.resourceId,this.id),s.A.debug("Comment deleted",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id}),this.$emit("delete",this.id)}catch(e){(0,o.Qg)(t("comments","An error occurred while trying to delete the comment")),s.A.error("An error occurred while trying to delete the comment",{error:e}),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)}},async onNewComment(e){this.loading=!0;try{const t=await(0,m.A)(this.resourceType,this.resourceId,e);s.A.debug("New comment posted",{resourceType:this.resourceType,resourceId:this.resourceId,newComment:t}),this.$emit("new",t),this.$emit("update:message",""),this.localMessage=""}catch(e){(0,o.Qg)(t("comments","An error occurred while trying to create the comment")),s.A.error("An error occurred while trying to create the comment",{error:e})}finally{this.loading=!1}}}}},10767:(t,e,n)=>{n.d(e,{A:()=>o});var i=n(35550);async function o(t,e,n,o){const a=["",t,e,n].join("/");return await i.A.customRequest(a,{method:"PROPPATCH",data:`\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t${o}\n\t\t\t\t\n\t\t\t\n\t\t\t`})}},19987:(t,e,n)=>{n.d(e,{X:()=>i,Y:()=>o});var i=function(){var t=this,e=t._self._c;return e(t.tag,{directives:[{name:"show",rawName:"v-show",value:!t.deleted&&!t.isLimbo,expression:"!deleted && !isLimbo"}],tag:"component",staticClass:"comment",class:{"comment--loading":t.loading}},[e("div",{staticClass:"comment__side"},[e("NcAvatar",{staticClass:"comment__avatar",attrs:{"display-name":t.actorDisplayName,user:t.actorId,size:32}})],1),t._v(" "),e("div",{staticClass:"comment__body"},[e("div",{staticClass:"comment__header"},[e("span",{staticClass:"comment__author"},[t._v(t._s(t.actorDisplayName))]),t._v(" "),t.isOwnComment&&t.id&&!t.loading?e("NcActions",{staticClass:"comment__actions"},[t.editing?e("NcActionButton",{on:{click:t.onEditCancel},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconClose",{attrs:{size:20}})]},proxy:!0}],null,!1,2888946197)},[t._v("\n\t\t\t\t\t"+t._s(t.t("comments","Cancel edit"))+"\n\t\t\t\t")]):[e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onEdit},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconPencilOutline",{attrs:{size:20}})]},proxy:!0}],null,!1,3345211262)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Edit comment"))+"\n\t\t\t\t\t")]),t._v(" "),e("NcActionSeparator"),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onDeleteWithUndo},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconTrashCanOutline",{attrs:{size:20}})]},proxy:!0}],null,!1,1034796883)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Delete comment"))+"\n\t\t\t\t\t")])]],2):t._e(),t._v(" "),t.id&&t.loading?e("div",{staticClass:"comment_loading icon-loading-small"}):t.creationDateTime?e("NcDateTime",{staticClass:"comment__timestamp",attrs:{timestamp:t.timestamp,"ignore-seconds":!0}}):t._e()],1),t._v(" "),t.editor||t.editing?e("form",{staticClass:"comment__editor",on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"comment__editor-group"},[e("NcRichContenteditable",{ref:"editor",attrs:{"auto-complete":t.autoComplete,contenteditable:!t.loading,label:t.editor?t.t("comments","New comment"):t.t("comments","Edit comment"),placeholder:t.t("comments","Write a comment …"),value:t.localMessage,"user-data":t.userData,"aria-describedby":"tab-comments__editor-description"},on:{"update:value":t.updateLocalMessage,submit:t.onSubmit}}),t._v(" "),e("div",{staticClass:"comment__submit"},[e("NcButton",{attrs:{variant:"tertiary-no-background",type:"submit","aria-label":t.t("comments","Post comment"),disabled:t.isEmptyMessage},on:{click:t.onSubmit},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("NcLoadingIcon"):e("IconArrowRight",{attrs:{size:20}})]},proxy:!0}],null,!1,758946661)})],1)],1),t._v(" "),e("div",{staticClass:"comment__editor-description",attrs:{id:"tab-comments__editor-description"}},[t._v("\n\t\t\t\t"+t._s(t.t("comments","@ for mentions, : for emoji, / for smart picker"))+"\n\t\t\t")])]):e("NcRichText",{staticClass:"comment__message",class:{"comment__message--expanded":t.expanded},attrs:{text:t.richContent.message,arguments:t.richContent.mentions},nativeOn:{click:function(e){return t.onExpand.apply(null,arguments)}}})],1)])},o=[]},29369:(t,e,n)=>{n.d(e,{A:()=>v});var i=n(21777),o=n(53334),a=n(65899),s=n(57505),r=n(24764),c=n(15502),m=n(41944),d=n(74095),l=n(4604),A=n(88289),p=n(77764),u=n(33691),h=n(66001),C=n(16502),g=n(37793),_=n(10396),y=n(36564);const v={name:"Comment",components:{IconArrowRight:u.A,IconClose:h.A,IconTrashCanOutline:g.A,IconPencilOutline:C.A,NcActionButton:s.A,NcActions:r.A,NcActionSeparator:c.A,NcAvatar:m.A,NcButton:d.A,NcDateTime:l.A,NcLoadingIcon:A.A,NcRichContenteditable:()=>Promise.all([n.e(4208),n.e(5528)]).then(n.bind(n,95528)),NcRichText:()=>Promise.all([n.e(4208),n.e(4508)]).then(n.bind(n,64508))},mixins:[_.A],inheritAttrs:!1,props:{actorDisplayName:{type:String,required:!0},actorId:{type:String,required:!0},creationDateTime:{type:String,default:null},editor:{type:Boolean,default:!1},autoComplete:{type:Function,required:!0},userData:{type:Object,default:()=>({})},tag:{type:String,default:"div"}},data:()=>({expanded:!1,localMessage:"",submitted:!1}),computed:{...(0,a.n2)(y.h),isOwnComment(){return(0,i.HW)().uid===this.actorId},richContent(){const t={};let e=this.localMessage;return Object.keys(this.userData).forEach((n,i)=>{const o=`mention-${i}`,a=new RegExp(`@${n}|@"${n}"`,"g");e=e.replace(a,`{${o}}`),t[o]={component:p.A,props:{user:n,displayName:this.userData[n].label,primary:this.userData[n].primary}}}),{mentions:t,message:e}},isEmptyMessage(){return!this.localMessage||""===this.localMessage.trim()},timestamp(){return Date.parse(this.creationDateTime)},isLimbo(){return this.deletedCommentLimboStore.checkForId(this.id)}},watch:{message(t){this.updateLocalMessage(t)}},beforeMount(){this.updateLocalMessage(this.message)},methods:{t:o.Tl,updateLocalMessage(t){this.localMessage=t.toString(),this.submitted=!1},onSubmit(){if(""!==this.localMessage.trim())return this.editor?(this.onNewComment(this.localMessage.trim()),void this.$nextTick(()=>{this.$refs.editor.$el.focus()})):void this.onEditComment(this.localMessage.trim())},onExpand(){this.expanded=!0}}}},36564:(t,e,n)=>{n.d(e,{h:()=>i});const i=(0,n(65899).nY)("deletedCommentLimbo",{state:()=>({idsInLimbo:[]}),actions:{addId(t){this.idsInLimbo.push(t)},removeId(t){const e=this.idsInLimbo.indexOf(t);e>-1&&this.idsInLimbo.splice(e,1)},checkForId(t){return this.idsInLimbo.includes(t)}}})},51195:(t,e,n)=>{function i(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=new DOMParser;let i=t;for(let t=0;ti})},54416:(t,e,n)=>{n.d(e,{A:()=>i});const i=n(29369).A},65463:(t,e,n)=>{n.d(e,{A:()=>a});var i=n(19987),o=n(54416);n(84889);const a=(0,n(14486).A)(o.A,i.X,i.Y,!1,null,"4692aa67",null).exports},70395:(t,e,n)=>{n.d(e,{A:()=>c});var i=n(21777),o=n(65043),a=n(17003),s=n(51195),r=n(35550);async function c(t,e,n){const c=["",t,e].join("/"),m=await o.Ay.post((0,a.e)()+c,{actorDisplayName:(0,i.HW)().displayName,actorId:(0,i.HW)().uid,actorType:"users",creationDateTime:(new Date).toUTCString(),message:n,objectType:t,verb:"comment"}),d=c+"/"+parseInt(m.headers["content-location"].split("/").pop()),l=await r.A.stat(d,{details:!0}),A=l.data.props;return A.actorDisplayName=(0,s.j)(A.actorDisplayName,2),A.message=(0,s.j)(A.message,2),l.data}},70452:(t,e,n)=>{n.d(e,{A:()=>r});var i=n(21777),o=n(65043),a=n(81222),s=n(63814);const r=(0,n(85471).pM)({props:{resourceId:{type:Number,required:!0},resourceType:{type:String,default:"files"}},data:()=>({editorData:{actorDisplayName:(0,i.HW)().displayName,actorId:(0,i.HW)().uid,key:"editor"},userData:{}}),methods:{async autoComplete(t,e){const{data:n}=await o.Ay.get((0,s.KT)("core/autocomplete/get"),{params:{search:t,itemType:"files",itemId:this.resourceId,sorter:"commenters|share-recipients",limit:(0,a.C)("comments","maxAutoCompleteResults")}});return n.ocs.data.forEach(t=>{this.userData[t.id]=t}),e(Object.values(this.userData))},genMentionsData(t){return Object.values(t).flat().forEach(t=>{this.userData[t.mentionId]={icon:"icon-user",id:t.mentionId,label:t.mentionDisplayName,source:"users",primary:(0,i.HW)()?.uid===t.mentionId}}),this.userData}}})},80486:(t,e,n)=>{n.d(e,{A:()=>o});var i=n(35550);async function o(t,e,n){const o=["",t,e,n].join("/");await i.A.deleteFile(o)}},84889:(t,e,n)=>{n(3100)},90195:(t,e,n)=>{n.d(e,{A:()=>r});var i=n(71354),o=n.n(i),a=n(76314),s=n.n(a)()(o());s.push([t.id,".comment[data-v-4692aa67]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-4692aa67]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-4692aa67]{display:flex;flex-grow:1;flex-direction:column;container-type:inline-size}.comment__header[data-v-4692aa67]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-4692aa67]{margin-inline-start:10px !important}.comment__author[data-v-4692aa67]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-4692aa67],.comment__timestamp[data-v-4692aa67]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-4692aa67]{position:relative}.comment__editor-description[data-v-4692aa67]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-4692aa67]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-4692aa67]{white-space:pre-wrap;word-break:normal;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-4692aa67]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-4692aa67]{min-height:44px;margin:0;padding:10px}","",{version:3,sources:["webpack://./apps/comments/src/components/Comment.vue"],names:[],mappings:"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CACA,0BAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,iBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA5EiB",sourcesContent:['\n@use "sass:math";\n\n$comment-padding: 10px;\n\n.comment {\n\tdisplay: flex;\n\tgap: 8px;\n\tpadding: 5px $comment-padding;\n\n\t&__side {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding-top: 6px;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t\tcontainer-type: inline-size;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-height: 44px;\n\t}\n\n\t&__actions {\n\t\tmargin-inline-start: $comment-padding !important;\n\t}\n\n\t&__author {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&_loading,\n\t&__timestamp {\n\t\tmargin-inline-start: auto;\n\t\ttext-align: end;\n\t\twhite-space: nowrap;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__editor-group {\n\t\tposition: relative;\n\t}\n\n\t&__editor-description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tpadding-block: var(--default-grid-baseline);\n\t}\n\n\t&__submit {\n\t\tposition: absolute !important;\n\t\tbottom: 5px;\n\t\tinset-inline-end: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: normal;\n\t\tmax-height: 70px;\n\t\toverflow: hidden;\n\t\tmargin-top: -6px;\n\t\t&--expanded {\n\t\t\tmax-height: none;\n\t\t\toverflow: visible;\n\t\t}\n\t}\n}\n\n.rich-contenteditable__input {\n\tmin-height: 44px;\n\tmargin: 0;\n\tpadding: $comment-padding;\n}\n\n'],sourceRoot:""}]);const r=s}}]); -//# sourceMappingURL=7462-7462.js.map?v=eb024406769582d5e2fe \ No newline at end of file +"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[7462],{3100:(t,e,n)=>{var o=n(85072),i=n.n(o),a=n(97825),s=n.n(a),r=n(77659),c=n.n(r),d=n(55056),m=n.n(d),l=n(10540),A=n.n(l),p=n(41113),u=n.n(p),h=n(90195),C={};C.styleTagTransform=u(),C.setAttributes=m(),C.insert=c().bind(null,"head"),C.domAPI=s(),C.insertStyleElement=A(),i()(h.A,C),h.A&&h.A.locals&&h.A.locals},10396:(e,n,o)=>{o.d(n,{A:()=>l});var i=o(85168),a=o(65899),s=o(96689),r=o(80486),c=o(10767),d=o(70395),m=o(36564);const l={props:{id:{type:Number,default:null},message:{type:String,default:""},resourceId:{type:[String,Number],required:!0},resourceType:{type:String,default:"files"}},data:()=>({deleted:!1,editing:!1,loading:!1}),computed:{...(0,a.n2)(m.h)},methods:{onEdit(){this.editing=!0},onEditCancel(){this.editing=!1,this.updateLocalMessage(this.message)},async onEditComment(e){this.loading=!0;try{await(0,c.A)(this.resourceType,this.resourceId,this.id,e),s.A.debug("Comment edited",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id,message:e}),this.$emit("update:message",e),this.editing=!1}catch(e){(0,i.Qg)(t("comments","An error occurred while trying to edit the comment")),s.A.error("An error occurred while trying to edit the comment",{error:e})}finally{this.loading=!1}},onDeleteWithUndo(){this.$emit("delete"),this.deleted=!0,this.deletedCommentLimboStore.addId(this.id);const e=setTimeout(this.onDelete,i.Br);(0,i._h)(t("comments","Comment deleted"),()=>{clearTimeout(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)})},async onDelete(){try{await(0,r.A)(this.resourceType,this.resourceId,this.id),s.A.debug("Comment deleted",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id}),this.$emit("delete",this.id)}catch(e){(0,i.Qg)(t("comments","An error occurred while trying to delete the comment")),s.A.error("An error occurred while trying to delete the comment",{error:e}),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)}},async onNewComment(e){this.loading=!0;try{const t=await(0,d.A)(this.resourceType,this.resourceId,e);s.A.debug("New comment posted",{resourceType:this.resourceType,resourceId:this.resourceId,newComment:t}),this.$emit("new",t),this.$emit("update:message",""),this.localMessage=""}catch(e){(0,i.Qg)(t("comments","An error occurred while trying to create the comment")),s.A.error("An error occurred while trying to create the comment",{error:e})}finally{this.loading=!1}}}}},10767:(t,e,n)=>{n.d(e,{A:()=>i});var o=n(35550);async function i(t,e,n,i){const a=["",t,e,n].join("/");return await o.A.customRequest(a,{method:"PROPPATCH",data:`\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t${i}\n\t\t\t\t\n\t\t\t\n\t\t\t`})}},19987:(t,e,n)=>{n.d(e,{X:()=>o,Y:()=>i});var o=function(){var t=this,e=t._self._c;return e(t.tag,{directives:[{name:"show",rawName:"v-show",value:!t.deleted&&!t.isLimbo,expression:"!deleted && !isLimbo"}],tag:"component",staticClass:"comment",class:{"comment--loading":t.loading}},[e("div",{staticClass:"comment__side"},[e("NcAvatar",{staticClass:"comment__avatar",attrs:{"display-name":t.actorDisplayName,user:t.actorId,size:32}})],1),t._v(" "),e("div",{staticClass:"comment__body"},[e("div",{staticClass:"comment__header"},[e("span",{staticClass:"comment__author"},[t._v(t._s(t.actorDisplayName))]),t._v(" "),t.isOwnComment&&t.id&&!t.loading?e("NcActions",{staticClass:"comment__actions"},[t.editing?e("NcActionButton",{on:{click:t.onEditCancel},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconClose",{attrs:{size:20}})]},proxy:!0}],null,!1,2888946197)},[t._v("\n\t\t\t\t\t"+t._s(t.t("comments","Cancel edit"))+"\n\t\t\t\t")]):[e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onEdit},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconPencilOutline",{attrs:{size:20}})]},proxy:!0}],null,!1,3345211262)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Edit comment"))+"\n\t\t\t\t\t")]),t._v(" "),e("NcActionSeparator"),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onDeleteWithUndo},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconTrashCanOutline",{attrs:{size:20}})]},proxy:!0}],null,!1,1034796883)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Delete comment"))+"\n\t\t\t\t\t")])]],2):t._e(),t._v(" "),t.id&&t.loading?e("div",{staticClass:"comment_loading icon-loading-small"}):t.creationDateTime?e("NcDateTime",{staticClass:"comment__timestamp",attrs:{timestamp:t.timestamp,"ignore-seconds":!0}}):t._e()],1),t._v(" "),t.editor||t.editing?e("form",{staticClass:"comment__editor",on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"comment__editor-group"},[e("NcRichContenteditable",{ref:"editor",attrs:{"auto-complete":t.autoComplete,contenteditable:!t.loading,label:t.editor?t.t("comments","New comment"):t.t("comments","Edit comment"),placeholder:t.t("comments","Write a comment …"),value:t.localMessage,"user-data":t.userData,"aria-describedby":"tab-comments__editor-description"},on:{"update:value":t.updateLocalMessage,submit:t.onSubmit}}),t._v(" "),e("div",{staticClass:"comment__submit"},[e("NcButton",{attrs:{variant:"tertiary-no-background",type:"submit","aria-label":t.t("comments","Post comment"),disabled:t.isEmptyMessage},on:{click:t.onSubmit},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("NcLoadingIcon"):e("IconArrowRight",{attrs:{size:20}})]},proxy:!0}],null,!1,758946661)})],1)],1),t._v(" "),e("div",{staticClass:"comment__editor-description",attrs:{id:"tab-comments__editor-description"}},[t._v("\n\t\t\t\t"+t._s(t.t("comments","@ for mentions, : for emoji, / for smart picker"))+"\n\t\t\t")])]):e("NcRichText",{staticClass:"comment__message",class:{"comment__message--expanded":t.expanded},attrs:{text:t.richContent.message,arguments:t.richContent.mentions},nativeOn:{click:function(e){return t.onExpand.apply(null,arguments)}}})],1)])},i=[]},29369:(t,e,n)=>{n.d(e,{A:()=>v});var o=n(21777),i=n(53334),a=n(65899),s=n(57505),r=n(24764),c=n(15502),d=n(41944),m=n(74095),l=n(4604),A=n(88289),p=n(77764),u=n(33691),h=n(66001),C=n(16502),g=n(37793),_=n(10396),y=n(36564);const v={name:"Comment",components:{IconArrowRight:u.A,IconClose:h.A,IconTrashCanOutline:g.A,IconPencilOutline:C.A,NcActionButton:s.A,NcActions:r.A,NcActionSeparator:c.A,NcAvatar:d.A,NcButton:m.A,NcDateTime:l.A,NcLoadingIcon:A.A,NcRichContenteditable:()=>Promise.all([n.e(4208),n.e(5528)]).then(n.bind(n,95528)),NcRichText:()=>Promise.all([n.e(4208),n.e(4508)]).then(n.bind(n,64508))},mixins:[_.A],inheritAttrs:!1,props:{actorDisplayName:{type:String,required:!0},actorId:{type:String,required:!0},creationDateTime:{type:String,default:null},editor:{type:Boolean,default:!1},autoComplete:{type:Function,required:!0},userData:{type:Object,default:()=>({})},tag:{type:String,default:"div"}},data:()=>({expanded:!1,localMessage:"",submitted:!1}),computed:{...(0,a.n2)(y.h),isOwnComment(){return(0,o.HW)().uid===this.actorId},richContent(){const t={};let e=this.localMessage;return Object.keys(this.userData).forEach((n,o)=>{const i=`mention-${o}`,a=new RegExp(`@${n}|@"${n}"`,"g");e=e.replace(a,`{${i}}`),t[i]={component:p.A,props:{user:n,displayName:this.userData[n].label,primary:this.userData[n].primary}}}),{mentions:t,message:e}},isEmptyMessage(){return!this.localMessage||""===this.localMessage.trim()},timestamp(){return Date.parse(this.creationDateTime)},isLimbo(){return this.deletedCommentLimboStore.checkForId(this.id)}},watch:{message(t){this.updateLocalMessage(t)}},beforeMount(){this.updateLocalMessage(this.message)},methods:{t:i.Tl,updateLocalMessage(t){this.localMessage=t.toString(),this.submitted=!1},onSubmit(){if(""!==this.localMessage.trim())return this.editor?(this.onNewComment(this.localMessage.trim()),void this.$nextTick(()=>{this.$refs.editor.$el.focus()})):void this.onEditComment(this.localMessage.trim())},onExpand(){this.expanded=!0}}}},36564:(t,e,n)=>{n.d(e,{h:()=>o});const o=(0,n(65899).nY)("deletedCommentLimbo",{state:()=>({idsInLimbo:[]}),actions:{addId(t){this.idsInLimbo.push(t)},removeId(t){const e=this.idsInLimbo.indexOf(t);e>-1&&this.idsInLimbo.splice(e,1)},checkForId(t){return this.idsInLimbo.includes(t)}}})},51195:(t,e,n)=>{function o(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=new DOMParser;let o=t;for(let t=0;to})},54416:(t,e,n)=>{n.d(e,{A:()=>o});const o=n(29369).A},65463:(t,e,n)=>{n.d(e,{A:()=>a});var o=n(19987),i=n(54416);n(84889);const a=(0,n(14486).A)(i.A,o.X,o.Y,!1,null,"4692aa67",null).exports},70395:(t,e,n)=>{n.d(e,{A:()=>c});var o=n(21777),i=n(65043),a=n(17003),s=n(51195),r=n(35550);async function c(t,e,n){const c=["",t,e].join("/"),d=await i.Ay.post((0,a.e)()+c,{actorDisplayName:(0,o.HW)().displayName,actorId:(0,o.HW)().uid,actorType:"users",creationDateTime:(new Date).toUTCString(),message:n,objectType:t,verb:"comment"}),m=c+"/"+parseInt(d.headers["content-location"].split("/").pop()),l=await r.A.stat(m,{details:!0}),A=l.data.props;return A.actorDisplayName=(0,s.j)(A.actorDisplayName,2),A.message=(0,s.j)(A.message,2),l.data}},70452:(t,e,n)=>{n.d(e,{A:()=>r});var o=n(21777),i=n(65043),a=n(81222),s=n(63814);const r=(0,n(85471).pM)({props:{resourceId:{type:Number,required:!0},resourceType:{type:String,default:"files"}},data(){return{editorData:{actorDisplayName:(0,o.HW)().displayName,actorId:(0,o.HW)().uid,key:"editor"},userData:{},currentResourceId:this.resourceId}},methods:{async autoComplete(t,e){const{data:n}=await i.Ay.get((0,s.KT)("core/autocomplete/get"),{params:{search:t,itemType:this.resourceType,itemId:this.currentResourceId,sorter:"commenters|share-recipients",limit:(0,a.C)("comments","maxAutoCompleteResults")}});return n.ocs.data.forEach(t=>{this.userData[t.id]=t}),e(Object.values(this.userData))},genMentionsData(t){return Object.values(t).flat().forEach(t=>{this.userData[t.mentionId]={icon:"icon-user",id:t.mentionId,label:t.mentionDisplayName,source:"users",primary:(0,o.HW)()?.uid===t.mentionId}}),this.userData}}})},80486:(t,e,n)=>{n.d(e,{A:()=>i});var o=n(35550);async function i(t,e,n){const i=["",t,e,n].join("/");await o.A.deleteFile(i)}},84889:(t,e,n)=>{n(3100)},90195:(t,e,n)=>{n.d(e,{A:()=>r});var o=n(71354),i=n.n(o),a=n(76314),s=n.n(a)()(i());s.push([t.id,".comment[data-v-4692aa67]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-4692aa67]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-4692aa67]{display:flex;flex-grow:1;flex-direction:column;container-type:inline-size}.comment__header[data-v-4692aa67]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-4692aa67]{margin-inline-start:10px !important}.comment__author[data-v-4692aa67]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-4692aa67],.comment__timestamp[data-v-4692aa67]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-4692aa67]{position:relative}.comment__editor-description[data-v-4692aa67]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-4692aa67]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-4692aa67]{white-space:pre-wrap;word-break:normal;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-4692aa67]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-4692aa67]{min-height:44px;margin:0;padding:10px}","",{version:3,sources:["webpack://./apps/comments/src/components/Comment.vue"],names:[],mappings:"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CACA,0BAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,iBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA5EiB",sourcesContent:['\n@use "sass:math";\n\n$comment-padding: 10px;\n\n.comment {\n\tdisplay: flex;\n\tgap: 8px;\n\tpadding: 5px $comment-padding;\n\n\t&__side {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding-top: 6px;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t\tcontainer-type: inline-size;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-height: 44px;\n\t}\n\n\t&__actions {\n\t\tmargin-inline-start: $comment-padding !important;\n\t}\n\n\t&__author {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&_loading,\n\t&__timestamp {\n\t\tmargin-inline-start: auto;\n\t\ttext-align: end;\n\t\twhite-space: nowrap;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__editor-group {\n\t\tposition: relative;\n\t}\n\n\t&__editor-description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tpadding-block: var(--default-grid-baseline);\n\t}\n\n\t&__submit {\n\t\tposition: absolute !important;\n\t\tbottom: 5px;\n\t\tinset-inline-end: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: normal;\n\t\tmax-height: 70px;\n\t\toverflow: hidden;\n\t\tmargin-top: -6px;\n\t\t&--expanded {\n\t\t\tmax-height: none;\n\t\t\toverflow: visible;\n\t\t}\n\t}\n}\n\n.rich-contenteditable__input {\n\tmin-height: 44px;\n\tmargin: 0;\n\tpadding: $comment-padding;\n}\n\n'],sourceRoot:""}]);const r=s}}]); +//# sourceMappingURL=7462-7462.js.map?v=d95559eea9d6df1250eb \ No newline at end of file diff --git a/dist/7462-7462.js.map b/dist/7462-7462.js.map index 3899caf416d6b..74d853904bac7 100644 --- a/dist/7462-7462.js.map +++ b/dist/7462-7462.js.map @@ -1 +1 @@ -{"version":3,"file":"7462-7462.js?v=eb024406769582d5e2fe","mappings":"6OAWIA,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IACxBF,EAAQG,OAAS,SAAc,KAAM,QACrCH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKJ,KAAW,IAAQM,QAAS,IAAQA,M,oHCX1D,SACCC,MAAO,CACNC,GAAI,CACHC,KAAMC,OACNC,QAAS,MAEVC,QAAS,CACRH,KAAMI,OACNF,QAAS,IAEVG,WAAY,CACXL,KAAM,CAACI,OAAQH,QACfK,UAAU,GAEXC,aAAc,CACbP,KAAMI,OACNF,QAAS,UAIXM,KAAIA,KACI,CACNC,SAAS,EACTC,SAAS,EACTC,SAAS,IAIXC,SAAU,KACNC,EAAAA,EAAAA,IAAUC,EAAAA,IAGdC,QAAS,CAERC,MAAAA,GACCC,KAAKP,SAAU,CAChB,EACAQ,YAAAA,GACCD,KAAKP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BpE,QAAS,CAOL,kBAAMmE,CAAa+F,EAAQC,GACvB,MAAM,KAAE1K,SAAeyJ,EAAAA,GAAMkB,KAAIC,EAAAA,EAAAA,IAAe,yBAA0B,CACtEC,OAAQ,CACJJ,SACAK,SAAU,QACVC,OAAQtK,KAAKZ,WACbmL,OAAQ,8BACRC,OAAOC,EAAAA,EAAAA,GAAU,WAAY,6BAOrC,OAHAlL,EAAKmL,IAAInL,KAAK8G,QAASC,IACnBtG,KAAKkE,SAASoC,EAAKxH,IAAMwH,IAEtB2D,EAASjE,OAAO2E,OAAO3K,KAAKkE,UACvC,EAOA0G,eAAAA,CAAgBrG,GAaZ,OAZAyB,OAAO2E,OAAOpG,GACTsG,OACAxE,QAASyE,IACV9K,KAAKkE,SAAS4G,EAAQC,WAAa,CAE/BC,KAAM,YACNlM,GAAIgM,EAAQC,UACZjE,MAAOgE,EAAQG,mBACfC,OAAQ,QACRnE,SAASb,EAAAA,EAAAA,OAAkBC,MAAQ2E,EAAQC,aAG5C/K,KAAKkE,QAChB,I,kDC3DOxC,eAAA,EAAepC,EAAcF,EAAYuC,GACvD,MAAMC,EAAc,CAAC,GAAItC,EAAcF,EAAYuC,GAAWE,KAAK,WAG7DC,EAAAA,EAAOqJ,WAAWvJ,EACzB,C,+FChBIwJ,E,MAA0B,GAA4B,KAE1DA,EAAwBrD,KAAK,CAACsD,EAAOvM,GAAI,gvCAAivC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wDAAwD,MAAQ,GAAG,SAAW,keAAke,eAAiB,CAAC,w5CAA05C,WAAa,MAE9xG,S","sources":["webpack://nextcloud/./apps/comments/src/components/Comment.vue?07dd","webpack:///nextcloud/apps/comments/src/mixins/CommentMixin.js","webpack:///nextcloud/apps/comments/src/services/EditComment.js","webpack://nextcloud/./apps/comments/src/components/Comment.vue?d1f7","webpack:///nextcloud/apps/comments/src/components/Comment.vue","webpack:///nextcloud/apps/comments/src/store/deletedCommentLimbo.js","webpack:///nextcloud/apps/comments/src/utils/decodeHtmlEntities.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=script&lang=js","webpack://nextcloud/./apps/comments/src/components/Comment.vue?7f26","webpack:///nextcloud/apps/comments/src/services/NewComment.js","webpack:///nextcloud/apps/comments/src/mixins/CommentView.ts","webpack:///nextcloud/apps/comments/src/services/DeleteComment.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true"],"sourcesContent":["\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { showError, showUndo, TOAST_UNDO_TIMEOUT } from '@nextcloud/dialogs'\nimport { mapStores } from 'pinia'\nimport logger from '../logger.js'\nimport DeleteComment from '../services/DeleteComment.js'\nimport EditComment from '../services/EditComment.js'\nimport NewComment from '../services/NewComment.js'\nimport { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'\n\nexport default {\n\tprops: {\n\t\tid: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tresourceId: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\t\tresourceType: {\n\t\t\ttype: String,\n\t\t\tdefault: 'files',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdeleted: false,\n\t\t\tediting: false,\n\t\t\tloading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapStores(useDeletedCommentLimbo),\n\t},\n\n\tmethods: {\n\t\t// EDITION\n\t\tonEdit() {\n\t\t\tthis.editing = true\n\t\t},\n\t\tonEditCancel() {\n\t\t\tthis.editing = false\n\t\t\t// Restore original value\n\t\t\tthis.updateLocalMessage(this.message)\n\t\t},\n\t\tasync onEditComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tawait EditComment(this.resourceType, this.resourceId, this.id, message)\n\t\t\t\tlogger.debug('Comment edited', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id, message })\n\t\t\t\tthis.$emit('update:message', message)\n\t\t\t\tthis.editing = false\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to edit the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to edit the comment', { error })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t// DELETION\n\t\tonDeleteWithUndo() {\n\t\t\tthis.$emit('delete')\n\t\t\tthis.deleted = true\n\t\t\tthis.deletedCommentLimboStore.addId(this.id)\n\t\t\tconst timeOutDelete = setTimeout(this.onDelete, TOAST_UNDO_TIMEOUT)\n\t\t\tshowUndo(t('comments', 'Comment deleted'), () => {\n\t\t\t\tclearTimeout(timeOutDelete)\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t})\n\t\t},\n\t\tasync onDelete() {\n\t\t\ttry {\n\t\t\t\tawait DeleteComment(this.resourceType, this.resourceId, this.id)\n\t\t\t\tlogger.debug('Comment deleted', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id })\n\t\t\t\tthis.$emit('delete', this.id)\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to delete the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to delete the comment', { error })\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t}\n\t\t},\n\n\t\t// CREATION\n\t\tasync onNewComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst newComment = await NewComment(this.resourceType, this.resourceId, message)\n\t\t\t\tlogger.debug('New comment posted', { resourceType: this.resourceType, resourceId: this.resourceId, newComment })\n\t\t\t\tthis.$emit('new', newComment)\n\n\t\t\t\t// Clear old content\n\t\t\t\tthis.$emit('update:message', '')\n\t\t\t\tthis.localMessage = ''\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to create the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to create the comment', { error })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Edit an existing comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n * @param {string} message the message content\n */\nexport default async function(resourceType, resourceId, commentId, message) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\treturn await client.customRequest(commentPath, {\n\t\tmethod: 'PROPPATCH',\n\t\tdata: `\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t${message}\n\t\t\t\t\n\t\t\t\n\t\t\t`,\n\t})\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c(_vm.tag,{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.deleted && !_vm.isLimbo),expression:\"!deleted && !isLimbo\"}],tag:\"component\",staticClass:\"comment\",class:{ 'comment--loading': _vm.loading }},[_c('div',{staticClass:\"comment__side\"},[_c('NcAvatar',{staticClass:\"comment__avatar\",attrs:{\"display-name\":_vm.actorDisplayName,\"user\":_vm.actorId,\"size\":32}})],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__body\"},[_c('div',{staticClass:\"comment__header\"},[_c('span',{staticClass:\"comment__author\"},[_vm._v(_vm._s(_vm.actorDisplayName))]),_vm._v(\" \"),(_vm.isOwnComment && _vm.id && !_vm.loading)?_c('NcActions',{staticClass:\"comment__actions\"},[(!_vm.editing)?[_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onEdit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconPencilOutline',{attrs:{\"size\":20}})]},proxy:true}],null,false,3345211262)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Edit comment'))+\"\\n\\t\\t\\t\\t\\t\")]),_vm._v(\" \"),_c('NcActionSeparator'),_vm._v(\" \"),_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onDeleteWithUndo},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconTrashCanOutline',{attrs:{\"size\":20}})]},proxy:true}],null,false,1034796883)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Delete comment'))+\"\\n\\t\\t\\t\\t\\t\")])]:_c('NcActionButton',{on:{\"click\":_vm.onEditCancel},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconClose',{attrs:{\"size\":20}})]},proxy:true}],null,false,2888946197)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Cancel edit'))+\"\\n\\t\\t\\t\\t\")])],2):_vm._e(),_vm._v(\" \"),(_vm.id && _vm.loading)?_c('div',{staticClass:\"comment_loading icon-loading-small\"}):(_vm.creationDateTime)?_c('NcDateTime',{staticClass:\"comment__timestamp\",attrs:{\"timestamp\":_vm.timestamp,\"ignore-seconds\":true}}):_vm._e()],1),_vm._v(\" \"),(_vm.editor || _vm.editing)?_c('form',{staticClass:\"comment__editor\",on:{\"submit\":function($event){$event.preventDefault();}}},[_c('div',{staticClass:\"comment__editor-group\"},[_c('NcRichContenteditable',{ref:\"editor\",attrs:{\"auto-complete\":_vm.autoComplete,\"contenteditable\":!_vm.loading,\"label\":_vm.editor ? _vm.t('comments', 'New comment') : _vm.t('comments', 'Edit comment'),\"placeholder\":_vm.t('comments', 'Write a comment …'),\"value\":_vm.localMessage,\"user-data\":_vm.userData,\"aria-describedby\":\"tab-comments__editor-description\"},on:{\"update:value\":_vm.updateLocalMessage,\"submit\":_vm.onSubmit}}),_vm._v(\" \"),_c('div',{staticClass:\"comment__submit\"},[_c('NcButton',{attrs:{\"variant\":\"tertiary-no-background\",\"type\":\"submit\",\"aria-label\":_vm.t('comments', 'Post comment'),\"disabled\":_vm.isEmptyMessage},on:{\"click\":_vm.onSubmit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.loading)?_c('NcLoadingIcon'):_c('IconArrowRight',{attrs:{\"size\":20}})]},proxy:true}],null,false,758946661)})],1)],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__editor-description\",attrs:{\"id\":\"tab-comments__editor-description\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', '@ for mentions, : for emoji, / for smart picker'))+\"\\n\\t\\t\\t\")])]):_c('NcRichText',{staticClass:\"comment__message\",class:{ 'comment__message--expanded': _vm.expanded },attrs:{\"text\":_vm.richContent.message,\"arguments\":_vm.richContent.mentions},nativeOn:{\"click\":function($event){return _vm.onExpand.apply(null, arguments)}}})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { defineStore } from 'pinia'\n\nexport const useDeletedCommentLimbo = defineStore('deletedCommentLimbo', {\n\tstate: () => ({\n\t\tidsInLimbo: [],\n\t}),\n\tactions: {\n\t\taddId(id) {\n\t\t\tthis.idsInLimbo.push(id)\n\t\t},\n\n\t\tremoveId(id) {\n\t\t\tconst index = this.idsInLimbo.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.idsInLimbo.splice(index, 1)\n\t\t\t}\n\t\t},\n\n\t\tcheckForId(id) {\n\t\t\treturn this.idsInLimbo.includes(id)\n\t\t},\n\t},\n})\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * @param {any} value -\n * @param {any} passes -\n */\nexport function decodeHtmlEntities(value, passes = 1) {\n\tconst parser = new DOMParser()\n\tlet decoded = value\n\tfor (let i = 0; i < passes; i++) {\n\t\tdecoded = parser.parseFromString(decoded, 'text/html').documentElement.textContent\n\t}\n\treturn decoded\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Comment.vue?vue&type=template&id=4692aa67&scoped=true\"\nimport script from \"./Comment.vue?vue&type=script&lang=js\"\nexport * from \"./Comment.vue?vue&type=script&lang=js\"\nimport style0 from \"./Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4692aa67\",\n null\n \n)\n\nexport default component.exports","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { getRootPath } from '../utils/davUtils.js'\nimport { decodeHtmlEntities } from '../utils/decodeHtmlEntities.js'\nimport client from './DavClient.js'\n\n/**\n * Retrieve the comments list\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {string} message the message\n * @return {object} the new comment\n */\nexport default async function(resourceType, resourceId, message) {\n\tconst resourcePath = ['', resourceType, resourceId].join('/')\n\n\tconst response = await axios.post(getRootPath() + resourcePath, {\n\t\tactorDisplayName: getCurrentUser().displayName,\n\t\tactorId: getCurrentUser().uid,\n\t\tactorType: 'users',\n\t\tcreationDateTime: (new Date()).toUTCString(),\n\t\tmessage,\n\t\tobjectType: resourceType,\n\t\tverb: 'comment',\n\t})\n\n\t// Retrieve comment id from resource location\n\tconst commentId = parseInt(response.headers['content-location'].split('/').pop())\n\tconst commentPath = resourcePath + '/' + commentId\n\n\t// Fetch newly created comment data\n\tconst comment = await client.stat(commentPath, {\n\t\tdetails: true,\n\t})\n\n\tconst props = comment.data.props\n\t// Decode twice to handle potentially double-encoded entities\n\t// FIXME Remove this once https://github.com/nextcloud/server/issues/29306\n\t// is resolved\n\tprops.actorDisplayName = decodeHtmlEntities(props.actorDisplayName, 2)\n\tprops.message = decodeHtmlEntities(props.message, 2)\n\n\treturn comment.data\n}\n","import { getCurrentUser } from '@nextcloud/auth';\n/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport axios from '@nextcloud/axios';\nimport { loadState } from '@nextcloud/initial-state';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { defineComponent } from 'vue';\nexport default defineComponent({\n props: {\n resourceId: {\n type: Number,\n required: true,\n },\n resourceType: {\n type: String,\n default: 'files',\n },\n },\n data() {\n return {\n editorData: {\n actorDisplayName: getCurrentUser().displayName,\n actorId: getCurrentUser().uid,\n key: 'editor',\n },\n userData: {},\n };\n },\n methods: {\n /**\n * Autocomplete @mentions\n *\n * @param search the query\n * @param callback the callback to process the results with\n */\n async autoComplete(search, callback) {\n const { data } = await axios.get(generateOcsUrl('core/autocomplete/get'), {\n params: {\n search,\n itemType: 'files',\n itemId: this.resourceId,\n sorter: 'commenters|share-recipients',\n limit: loadState('comments', 'maxAutoCompleteResults'),\n },\n });\n // Save user data so it can be used by the editor to replace mentions\n data.ocs.data.forEach((user) => {\n this.userData[user.id] = user;\n });\n return callback(Object.values(this.userData));\n },\n /**\n * Make sure we have all mentions as Array of objects\n *\n * @param mentions the mentions list\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n genMentionsData(mentions) {\n Object.values(mentions)\n .flat()\n .forEach((mention) => {\n this.userData[mention.mentionId] = {\n // TODO: support groups\n icon: 'icon-user',\n id: mention.mentionId,\n label: mention.mentionDisplayName,\n source: 'users',\n primary: getCurrentUser()?.uid === mention.mentionId,\n };\n });\n return this.userData;\n },\n },\n});\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Delete a comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n */\nexport default async function(resourceType, resourceId, commentId) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\t// Fetch newly created comment data\n\tawait client.deleteFile(commentPath)\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.comment[data-v-4692aa67]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-4692aa67]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-4692aa67]{display:flex;flex-grow:1;flex-direction:column;container-type:inline-size}.comment__header[data-v-4692aa67]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-4692aa67]{margin-inline-start:10px !important}.comment__author[data-v-4692aa67]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-4692aa67],.comment__timestamp[data-v-4692aa67]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-4692aa67]{position:relative}.comment__editor-description[data-v-4692aa67]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-4692aa67]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-4692aa67]{white-space:pre-wrap;word-break:normal;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-4692aa67]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-4692aa67]{min-height:44px;margin:0;padding:10px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/comments/src/components/Comment.vue\"],\"names\":[],\"mappings\":\"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CACA,0BAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,iBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA5EiB\",\"sourcesContent\":[\"\\n@use \\\"sass:math\\\";\\n\\n$comment-padding: 10px;\\n\\n.comment {\\n\\tdisplay: flex;\\n\\tgap: 8px;\\n\\tpadding: 5px $comment-padding;\\n\\n\\t&__side {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: flex-start;\\n\\t\\tpadding-top: 6px;\\n\\t}\\n\\n\\t&__body {\\n\\t\\tdisplay: flex;\\n\\t\\tflex-grow: 1;\\n\\t\\tflex-direction: column;\\n\\t\\tcontainer-type: inline-size;\\n\\t}\\n\\n\\t&__header {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t\\tmin-height: 44px;\\n\\t}\\n\\n\\t&__actions {\\n\\t\\tmargin-inline-start: $comment-padding !important;\\n\\t}\\n\\n\\t&__author {\\n\\t\\toverflow: hidden;\\n\\t\\twhite-space: nowrap;\\n\\t\\ttext-overflow: ellipsis;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&_loading,\\n\\t&__timestamp {\\n\\t\\tmargin-inline-start: auto;\\n\\t\\ttext-align: end;\\n\\t\\twhite-space: nowrap;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&__editor-group {\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t&__editor-description {\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t\\tpadding-block: var(--default-grid-baseline);\\n\\t}\\n\\n\\t&__submit {\\n\\t\\tposition: absolute !important;\\n\\t\\tbottom: 5px;\\n\\t\\tinset-inline-end: 0;\\n\\t}\\n\\n\\t&__message {\\n\\t\\twhite-space: pre-wrap;\\n\\t\\tword-break: normal;\\n\\t\\tmax-height: 70px;\\n\\t\\toverflow: hidden;\\n\\t\\tmargin-top: -6px;\\n\\t\\t&--expanded {\\n\\t\\t\\tmax-height: none;\\n\\t\\t\\toverflow: visible;\\n\\t\\t}\\n\\t}\\n}\\n\\n.rich-contenteditable__input {\\n\\tmin-height: 44px;\\n\\tmargin: 0;\\n\\tpadding: $comment-padding;\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n"],"names":["options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","props","id","type","Number","default","message","String","resourceId","required","resourceType","data","deleted","editing","loading","computed","mapStores","useDeletedCommentLimbo","methods","onEdit","this","onEditCancel","updateLocalMessage","onEditComment","EditComment","logger","debug","$emit","error","showError","t","onDeleteWithUndo","deletedCommentLimboStore","addId","timeOutDelete","setTimeout","onDelete","TOAST_UNDO_TIMEOUT","showUndo","clearTimeout","removeId","DeleteComment","onNewComment","newComment","NewComment","localMessage","async","commentId","commentPath","join","client","customRequest","method","render","_vm","_c","_self","tag","directives","name","rawName","value","isLimbo","expression","staticClass","class","attrs","actorDisplayName","actorId","_v","_s","isOwnComment","on","scopedSlots","_u","key","fn","proxy","_e","creationDateTime","timestamp","editor","$event","preventDefault","ref","autoComplete","userData","onSubmit","isEmptyMessage","expanded","richContent","mentions","nativeOn","onExpand","apply","arguments","staticRenderFns","components","IconArrowRight","IconClose","IconTrashCanOutline","IconPencilOutline","NcActionButton","NcActions","NcActionSeparator","NcAvatar","NcButton","NcDateTime","NcLoadingIcon","NcRichContenteditable","NcRichText","mixins","CommentMixin","inheritAttrs","Boolean","Function","Object","submitted","getCurrentUser","uid","keys","forEach","user","index","regex","RegExp","replace","component","NcUserBubble","displayName","label","primary","trim","Date","parse","checkForId","watch","beforeMount","toString","$nextTick","$refs","$el","focus","defineStore","state","idsInLimbo","actions","push","indexOf","splice","includes","decodeHtmlEntities","passes","length","undefined","parser","DOMParser","decoded","i","parseFromString","documentElement","textContent","resourcePath","response","axios","post","getRootPath","actorType","toUTCString","objectType","verb","parseInt","headers","split","pop","comment","stat","details","defineComponent","editorData","search","callback","get","generateOcsUrl","params","itemType","itemId","sorter","limit","loadState","ocs","values","genMentionsData","flat","mention","mentionId","icon","mentionDisplayName","source","deleteFile","___CSS_LOADER_EXPORT___","module"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"7462-7462.js?v=d95559eea9d6df1250eb","mappings":"6OAWIA,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IACxBF,EAAQG,OAAS,SAAc,KAAM,QACrCH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKJ,KAAW,IAAQM,QAAS,IAAQA,M,oHCX1D,SACCC,MAAO,CACNC,GAAI,CACHC,KAAMC,OACNC,QAAS,MAEVC,QAAS,CACRH,KAAMI,OACNF,QAAS,IAEVG,WAAY,CACXL,KAAM,CAACI,OAAQH,QACfK,UAAU,GAEXC,aAAc,CACbP,KAAMI,OACNF,QAAS,UAIXM,KAAIA,KACI,CACNC,SAAS,EACTC,SAAS,EACTC,SAAS,IAIXC,SAAU,KACNC,EAAAA,EAAAA,IAAUC,EAAAA,IAGdC,QAAS,CAERC,MAAAA,GACCC,KAAKP,SAAU,CAChB,EACAQ,YAAAA,GACCD,KAAKP,SAAU,EAEfO,KAAKE,mBAAmBF,KAAKd,QAC9B,EACA,mBAAMiB,CAAcjB,GACnBc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C,GACvB,MAAM,KAAE3K,SAAeyJ,EAAAA,GAAMmB,KAAIC,EAAAA,EAAAA,IAAe,yBAA0B,CACtEC,OAAQ,CACJJ,SACAK,SAAUtK,KAAKV,aACfiL,OAAQvK,KAAKgK,kBACbQ,OAAQ,8BACRC,OAAOC,EAAAA,EAAAA,GAAU,WAAY,6BAOrC,OAHAnL,EAAKoL,IAAIpL,KAAK8G,QAASC,IACnBtG,KAAKkE,SAASoC,EAAKxH,IAAMwH,IAEtB4D,EAASlE,OAAO4E,OAAO5K,KAAKkE,UACvC,EAOA2G,eAAAA,CAAgBtG,GAaZ,OAZAyB,OAAO4E,OAAOrG,GACTuG,OACAzE,QAAS0E,IACV/K,KAAKkE,SAAS6G,EAAQC,WAAa,CAE/BC,KAAM,YACNnM,GAAIiM,EAAQC,UACZlE,MAAOiE,EAAQG,mBACfC,OAAQ,QACRpE,SAASb,EAAAA,EAAAA,OAAkBC,MAAQ4E,EAAQC,aAG5ChL,KAAKkE,QAChB,I,kDC5DOxC,eAAA,EAAepC,EAAcF,EAAYuC,GACvD,MAAMC,EAAc,CAAC,GAAItC,EAAcF,EAAYuC,GAAWE,KAAK,WAG7DC,EAAAA,EAAOsJ,WAAWxJ,EACzB,C,+FChBIyJ,E,MAA0B,GAA4B,KAE1DA,EAAwBtD,KAAK,CAACuD,EAAOxM,GAAI,gvCAAivC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wDAAwD,MAAQ,GAAG,SAAW,keAAke,eAAiB,CAAC,w5CAA05C,WAAa,MAE9xG,S","sources":["webpack://nextcloud/./apps/comments/src/components/Comment.vue?07dd","webpack:///nextcloud/apps/comments/src/mixins/CommentMixin.js","webpack:///nextcloud/apps/comments/src/services/EditComment.js","webpack://nextcloud/./apps/comments/src/components/Comment.vue?d1f7","webpack:///nextcloud/apps/comments/src/components/Comment.vue","webpack:///nextcloud/apps/comments/src/store/deletedCommentLimbo.js","webpack:///nextcloud/apps/comments/src/utils/decodeHtmlEntities.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=script&lang=js","webpack://nextcloud/./apps/comments/src/components/Comment.vue?7f26","webpack:///nextcloud/apps/comments/src/services/NewComment.js","webpack:///nextcloud/apps/comments/src/mixins/CommentView.ts","webpack:///nextcloud/apps/comments/src/services/DeleteComment.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true"],"sourcesContent":["\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { showError, showUndo, TOAST_UNDO_TIMEOUT } from '@nextcloud/dialogs'\nimport { mapStores } from 'pinia'\nimport logger from '../logger.js'\nimport DeleteComment from '../services/DeleteComment.js'\nimport EditComment from '../services/EditComment.js'\nimport NewComment from '../services/NewComment.js'\nimport { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'\n\nexport default {\n\tprops: {\n\t\tid: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tresourceId: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\t\tresourceType: {\n\t\t\ttype: String,\n\t\t\tdefault: 'files',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdeleted: false,\n\t\t\tediting: false,\n\t\t\tloading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapStores(useDeletedCommentLimbo),\n\t},\n\n\tmethods: {\n\t\t// EDITION\n\t\tonEdit() {\n\t\t\tthis.editing = true\n\t\t},\n\t\tonEditCancel() {\n\t\t\tthis.editing = false\n\t\t\t// Restore original value\n\t\t\tthis.updateLocalMessage(this.message)\n\t\t},\n\t\tasync onEditComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tawait EditComment(this.resourceType, this.resourceId, this.id, message)\n\t\t\t\tlogger.debug('Comment edited', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id, message })\n\t\t\t\tthis.$emit('update:message', message)\n\t\t\t\tthis.editing = false\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to edit the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to edit the comment', { error })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t// DELETION\n\t\tonDeleteWithUndo() {\n\t\t\tthis.$emit('delete')\n\t\t\tthis.deleted = true\n\t\t\tthis.deletedCommentLimboStore.addId(this.id)\n\t\t\tconst timeOutDelete = setTimeout(this.onDelete, TOAST_UNDO_TIMEOUT)\n\t\t\tshowUndo(t('comments', 'Comment deleted'), () => {\n\t\t\t\tclearTimeout(timeOutDelete)\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t})\n\t\t},\n\t\tasync onDelete() {\n\t\t\ttry {\n\t\t\t\tawait DeleteComment(this.resourceType, this.resourceId, this.id)\n\t\t\t\tlogger.debug('Comment deleted', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id })\n\t\t\t\tthis.$emit('delete', this.id)\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to delete the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to delete the comment', { error })\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t}\n\t\t},\n\n\t\t// CREATION\n\t\tasync onNewComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst newComment = await NewComment(this.resourceType, this.resourceId, message)\n\t\t\t\tlogger.debug('New comment posted', { resourceType: this.resourceType, resourceId: this.resourceId, newComment })\n\t\t\t\tthis.$emit('new', newComment)\n\n\t\t\t\t// Clear old content\n\t\t\t\tthis.$emit('update:message', '')\n\t\t\t\tthis.localMessage = ''\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to create the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to create the comment', { error })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Edit an existing comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n * @param {string} message the message content\n */\nexport default async function(resourceType, resourceId, commentId, message) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\treturn await client.customRequest(commentPath, {\n\t\tmethod: 'PROPPATCH',\n\t\tdata: `\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t${message}\n\t\t\t\t\n\t\t\t\n\t\t\t`,\n\t})\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c(_vm.tag,{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.deleted && !_vm.isLimbo),expression:\"!deleted && !isLimbo\"}],tag:\"component\",staticClass:\"comment\",class:{ 'comment--loading': _vm.loading }},[_c('div',{staticClass:\"comment__side\"},[_c('NcAvatar',{staticClass:\"comment__avatar\",attrs:{\"display-name\":_vm.actorDisplayName,\"user\":_vm.actorId,\"size\":32}})],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__body\"},[_c('div',{staticClass:\"comment__header\"},[_c('span',{staticClass:\"comment__author\"},[_vm._v(_vm._s(_vm.actorDisplayName))]),_vm._v(\" \"),(_vm.isOwnComment && _vm.id && !_vm.loading)?_c('NcActions',{staticClass:\"comment__actions\"},[(!_vm.editing)?[_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onEdit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconPencilOutline',{attrs:{\"size\":20}})]},proxy:true}],null,false,3345211262)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Edit comment'))+\"\\n\\t\\t\\t\\t\\t\")]),_vm._v(\" \"),_c('NcActionSeparator'),_vm._v(\" \"),_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onDeleteWithUndo},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconTrashCanOutline',{attrs:{\"size\":20}})]},proxy:true}],null,false,1034796883)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Delete comment'))+\"\\n\\t\\t\\t\\t\\t\")])]:_c('NcActionButton',{on:{\"click\":_vm.onEditCancel},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconClose',{attrs:{\"size\":20}})]},proxy:true}],null,false,2888946197)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Cancel edit'))+\"\\n\\t\\t\\t\\t\")])],2):_vm._e(),_vm._v(\" \"),(_vm.id && _vm.loading)?_c('div',{staticClass:\"comment_loading icon-loading-small\"}):(_vm.creationDateTime)?_c('NcDateTime',{staticClass:\"comment__timestamp\",attrs:{\"timestamp\":_vm.timestamp,\"ignore-seconds\":true}}):_vm._e()],1),_vm._v(\" \"),(_vm.editor || _vm.editing)?_c('form',{staticClass:\"comment__editor\",on:{\"submit\":function($event){$event.preventDefault();}}},[_c('div',{staticClass:\"comment__editor-group\"},[_c('NcRichContenteditable',{ref:\"editor\",attrs:{\"auto-complete\":_vm.autoComplete,\"contenteditable\":!_vm.loading,\"label\":_vm.editor ? _vm.t('comments', 'New comment') : _vm.t('comments', 'Edit comment'),\"placeholder\":_vm.t('comments', 'Write a comment …'),\"value\":_vm.localMessage,\"user-data\":_vm.userData,\"aria-describedby\":\"tab-comments__editor-description\"},on:{\"update:value\":_vm.updateLocalMessage,\"submit\":_vm.onSubmit}}),_vm._v(\" \"),_c('div',{staticClass:\"comment__submit\"},[_c('NcButton',{attrs:{\"variant\":\"tertiary-no-background\",\"type\":\"submit\",\"aria-label\":_vm.t('comments', 'Post comment'),\"disabled\":_vm.isEmptyMessage},on:{\"click\":_vm.onSubmit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.loading)?_c('NcLoadingIcon'):_c('IconArrowRight',{attrs:{\"size\":20}})]},proxy:true}],null,false,758946661)})],1)],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__editor-description\",attrs:{\"id\":\"tab-comments__editor-description\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', '@ for mentions, : for emoji, / for smart picker'))+\"\\n\\t\\t\\t\")])]):_c('NcRichText',{staticClass:\"comment__message\",class:{ 'comment__message--expanded': _vm.expanded },attrs:{\"text\":_vm.richContent.message,\"arguments\":_vm.richContent.mentions},nativeOn:{\"click\":function($event){return _vm.onExpand.apply(null, arguments)}}})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { defineStore } from 'pinia'\n\nexport const useDeletedCommentLimbo = defineStore('deletedCommentLimbo', {\n\tstate: () => ({\n\t\tidsInLimbo: [],\n\t}),\n\tactions: {\n\t\taddId(id) {\n\t\t\tthis.idsInLimbo.push(id)\n\t\t},\n\n\t\tremoveId(id) {\n\t\t\tconst index = this.idsInLimbo.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.idsInLimbo.splice(index, 1)\n\t\t\t}\n\t\t},\n\n\t\tcheckForId(id) {\n\t\t\treturn this.idsInLimbo.includes(id)\n\t\t},\n\t},\n})\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * @param {any} value -\n * @param {any} passes -\n */\nexport function decodeHtmlEntities(value, passes = 1) {\n\tconst parser = new DOMParser()\n\tlet decoded = value\n\tfor (let i = 0; i < passes; i++) {\n\t\tdecoded = parser.parseFromString(decoded, 'text/html').documentElement.textContent\n\t}\n\treturn decoded\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Comment.vue?vue&type=template&id=4692aa67&scoped=true\"\nimport script from \"./Comment.vue?vue&type=script&lang=js\"\nexport * from \"./Comment.vue?vue&type=script&lang=js\"\nimport style0 from \"./Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4692aa67\",\n null\n \n)\n\nexport default component.exports","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { getRootPath } from '../utils/davUtils.js'\nimport { decodeHtmlEntities } from '../utils/decodeHtmlEntities.js'\nimport client from './DavClient.js'\n\n/**\n * Retrieve the comments list\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {string} message the message\n * @return {object} the new comment\n */\nexport default async function(resourceType, resourceId, message) {\n\tconst resourcePath = ['', resourceType, resourceId].join('/')\n\n\tconst response = await axios.post(getRootPath() + resourcePath, {\n\t\tactorDisplayName: getCurrentUser().displayName,\n\t\tactorId: getCurrentUser().uid,\n\t\tactorType: 'users',\n\t\tcreationDateTime: (new Date()).toUTCString(),\n\t\tmessage,\n\t\tobjectType: resourceType,\n\t\tverb: 'comment',\n\t})\n\n\t// Retrieve comment id from resource location\n\tconst commentId = parseInt(response.headers['content-location'].split('/').pop())\n\tconst commentPath = resourcePath + '/' + commentId\n\n\t// Fetch newly created comment data\n\tconst comment = await client.stat(commentPath, {\n\t\tdetails: true,\n\t})\n\n\tconst props = comment.data.props\n\t// Decode twice to handle potentially double-encoded entities\n\t// FIXME Remove this once https://github.com/nextcloud/server/issues/29306\n\t// is resolved\n\tprops.actorDisplayName = decodeHtmlEntities(props.actorDisplayName, 2)\n\tprops.message = decodeHtmlEntities(props.message, 2)\n\n\treturn comment.data\n}\n","import { getCurrentUser } from '@nextcloud/auth';\n/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport axios from '@nextcloud/axios';\nimport { loadState } from '@nextcloud/initial-state';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { defineComponent } from 'vue';\nexport default defineComponent({\n props: {\n resourceId: {\n type: Number,\n required: true,\n },\n resourceType: {\n type: String,\n default: 'files',\n },\n },\n data() {\n return {\n editorData: {\n actorDisplayName: getCurrentUser().displayName,\n actorId: getCurrentUser().uid,\n key: 'editor',\n },\n userData: {},\n currentResourceId: this.resourceId,\n };\n },\n methods: {\n /**\n * Autocomplete @mentions\n *\n * @param search the query\n * @param callback the callback to process the results with\n */\n async autoComplete(search, callback) {\n const { data } = await axios.get(generateOcsUrl('core/autocomplete/get'), {\n params: {\n search,\n itemType: this.resourceType,\n itemId: this.currentResourceId,\n sorter: 'commenters|share-recipients',\n limit: loadState('comments', 'maxAutoCompleteResults'),\n },\n });\n // Save user data so it can be used by the editor to replace mentions\n data.ocs.data.forEach((user) => {\n this.userData[user.id] = user;\n });\n return callback(Object.values(this.userData));\n },\n /**\n * Make sure we have all mentions as Array of objects\n *\n * @param mentions the mentions list\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n genMentionsData(mentions) {\n Object.values(mentions)\n .flat()\n .forEach((mention) => {\n this.userData[mention.mentionId] = {\n // TODO: support groups\n icon: 'icon-user',\n id: mention.mentionId,\n label: mention.mentionDisplayName,\n source: 'users',\n primary: getCurrentUser()?.uid === mention.mentionId,\n };\n });\n return this.userData;\n },\n },\n});\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Delete a comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n */\nexport default async function(resourceType, resourceId, commentId) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\t// Fetch newly created comment data\n\tawait client.deleteFile(commentPath)\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.comment[data-v-4692aa67]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-4692aa67]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-4692aa67]{display:flex;flex-grow:1;flex-direction:column;container-type:inline-size}.comment__header[data-v-4692aa67]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-4692aa67]{margin-inline-start:10px !important}.comment__author[data-v-4692aa67]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-4692aa67],.comment__timestamp[data-v-4692aa67]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-4692aa67]{position:relative}.comment__editor-description[data-v-4692aa67]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-4692aa67]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-4692aa67]{white-space:pre-wrap;word-break:normal;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-4692aa67]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-4692aa67]{min-height:44px;margin:0;padding:10px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/comments/src/components/Comment.vue\"],\"names\":[],\"mappings\":\"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CACA,0BAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,iBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA5EiB\",\"sourcesContent\":[\"\\n@use \\\"sass:math\\\";\\n\\n$comment-padding: 10px;\\n\\n.comment {\\n\\tdisplay: flex;\\n\\tgap: 8px;\\n\\tpadding: 5px $comment-padding;\\n\\n\\t&__side {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: flex-start;\\n\\t\\tpadding-top: 6px;\\n\\t}\\n\\n\\t&__body {\\n\\t\\tdisplay: flex;\\n\\t\\tflex-grow: 1;\\n\\t\\tflex-direction: column;\\n\\t\\tcontainer-type: inline-size;\\n\\t}\\n\\n\\t&__header {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t\\tmin-height: 44px;\\n\\t}\\n\\n\\t&__actions {\\n\\t\\tmargin-inline-start: $comment-padding !important;\\n\\t}\\n\\n\\t&__author {\\n\\t\\toverflow: hidden;\\n\\t\\twhite-space: nowrap;\\n\\t\\ttext-overflow: ellipsis;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&_loading,\\n\\t&__timestamp {\\n\\t\\tmargin-inline-start: auto;\\n\\t\\ttext-align: end;\\n\\t\\twhite-space: nowrap;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&__editor-group {\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t&__editor-description {\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t\\tpadding-block: var(--default-grid-baseline);\\n\\t}\\n\\n\\t&__submit {\\n\\t\\tposition: absolute !important;\\n\\t\\tbottom: 5px;\\n\\t\\tinset-inline-end: 0;\\n\\t}\\n\\n\\t&__message {\\n\\t\\twhite-space: pre-wrap;\\n\\t\\tword-break: normal;\\n\\t\\tmax-height: 70px;\\n\\t\\toverflow: hidden;\\n\\t\\tmargin-top: -6px;\\n\\t\\t&--expanded {\\n\\t\\t\\tmax-height: none;\\n\\t\\t\\toverflow: visible;\\n\\t\\t}\\n\\t}\\n}\\n\\n.rich-contenteditable__input {\\n\\tmin-height: 44px;\\n\\tmargin: 0;\\n\\tpadding: $comment-padding;\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n"],"names":["options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","props","id","type","Number","default","message","String","resourceId","required","resourceType","data","deleted","editing","loading","computed","mapStores","useDeletedCommentLimbo","methods","onEdit","this","onEditCancel","updateLocalMessage","onEditComment","EditComment","logger","debug","$emit","error","showError","t","onDeleteWithUndo","deletedCommentLimboStore","addId","timeOutDelete","setTimeout","onDelete","TOAST_UNDO_TIMEOUT","showUndo","clearTimeout","removeId","DeleteComment","onNewComment","newComment","NewComment","localMessage","async","commentId","commentPath","join","client","customRequest","method","render","_vm","_c","_self","tag","directives","name","rawName","value","isLimbo","expression","staticClass","class","attrs","actorDisplayName","actorId","_v","_s","isOwnComment","on","scopedSlots","_u","key","fn","proxy","_e","creationDateTime","timestamp","editor","$event","preventDefault","ref","autoComplete","userData","onSubmit","isEmptyMessage","expanded","richContent","mentions","nativeOn","onExpand","apply","arguments","staticRenderFns","components","IconArrowRight","IconClose","IconTrashCanOutline","IconPencilOutline","NcActionButton","NcActions","NcActionSeparator","NcAvatar","NcButton","NcDateTime","NcLoadingIcon","NcRichContenteditable","NcRichText","mixins","CommentMixin","inheritAttrs","Boolean","Function","Object","submitted","getCurrentUser","uid","keys","forEach","user","index","regex","RegExp","replace","component","NcUserBubble","displayName","label","primary","trim","Date","parse","checkForId","watch","beforeMount","toString","$nextTick","$refs","$el","focus","defineStore","state","idsInLimbo","actions","push","indexOf","splice","includes","decodeHtmlEntities","passes","length","undefined","parser","DOMParser","decoded","i","parseFromString","documentElement","textContent","resourcePath","response","axios","post","getRootPath","actorType","toUTCString","objectType","verb","parseInt","headers","split","pop","comment","stat","details","defineComponent","editorData","currentResourceId","search","callback","get","generateOcsUrl","params","itemType","itemId","sorter","limit","loadState","ocs","values","genMentionsData","flat","mention","mentionId","icon","mentionDisplayName","source","deleteFile","___CSS_LOADER_EXPORT___","module"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/comments-comments-app.js b/dist/comments-comments-app.js index 88c6c28e8bb91..85ad3b9c4c7df 100644 --- a/dist/comments-comments-app.js +++ b/dist/comments-comments-app.js @@ -1,2 +1,2 @@ -(()=>{var e,n,o,s={1598:(e,n,o)=>{"use strict";const s=(0,o(35947).YK)().setApp("comments").detectUser().build();var i=o(21777),r=o(53334),a=o(65899),c=o(85471),l=o(85168),m=o(55042),d=o(74095),u=o(11275),p=o(57578);const A={name:"MessageReplyTextOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var h=o(14486);const g=(0,h.A)(A,function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon message-reply-text-outline-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M9 11H18V13H9V11M18 7H6V9H18V7M22 4V22L18 18H4C2.9 18 2 17.11 2 16V4C2 2.9 2.9 2 4 2H20C21.1 2 22 2.89 22 4M20 4H4V16H18.83L20 17.17V4Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},[],!1,null,null,null).exports,C={name:"RefreshIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},f=(0,h.A)(C,function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon refresh-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},[],!1,null,null,null).exports;var y=o(57505),_=o(24764),v=o(15502),b=o(41944),x=o(4604),w=o(88289),I=o(77764),T=o(33691),k=o(66001),D=o(16502),N=o(37793),S=o(45505),O=o(63814);function E(){return(0,O.dC)("dav/comments")}const R=(0,S.UU)(E());function B(t){R.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}(0,i.zo)(B),B((0,i.do)());const M=R;var L=o(65043);function $(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=new DOMParser;let o=t;for(let t=0;t({idsInLimbo:[]}),actions:{addId(t){this.idsInLimbo.push(t)},removeId(t){const e=this.idsInLimbo.indexOf(t);e>-1&&this.idsInLimbo.splice(e,1)},checkForId(t){return this.idsInLimbo.includes(t)}}}),P={props:{id:{type:Number,default:null},message:{type:String,default:""},resourceId:{type:[String,Number],required:!0},resourceType:{type:String,default:"files"}},data:()=>({deleted:!1,editing:!1,loading:!1}),computed:{...(0,a.n2)(j)},methods:{onEdit(){this.editing=!0},onEditCancel(){this.editing=!1,this.updateLocalMessage(this.message)},async onEditComment(e){this.loading=!0;try{await async function(t,e,n,o){const s=["",t,e,n].join("/");return await M.customRequest(s,{method:"PROPPATCH",data:`\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t${o}\n\t\t\t\t\n\t\t\t\n\t\t\t`})}(this.resourceType,this.resourceId,this.id,e),s.debug("Comment edited",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id,message:e}),this.$emit("update:message",e),this.editing=!1}catch(e){(0,l.Qg)(t("comments","An error occurred while trying to edit the comment")),s.error("An error occurred while trying to edit the comment",{error:e})}finally{this.loading=!1}},onDeleteWithUndo(){this.$emit("delete"),this.deleted=!0,this.deletedCommentLimboStore.addId(this.id);const e=setTimeout(this.onDelete,l.Br);(0,l._h)(t("comments","Comment deleted"),()=>{clearTimeout(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)})},async onDelete(){try{await async function(t,e,n){const o=["",t,e,n].join("/");await M.deleteFile(o)}(this.resourceType,this.resourceId,this.id),s.debug("Comment deleted",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id}),this.$emit("delete",this.id)}catch(e){(0,l.Qg)(t("comments","An error occurred while trying to delete the comment")),s.error("An error occurred while trying to delete the comment",{error:e}),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)}},async onNewComment(e){this.loading=!0;try{const t=await async function(t,e,n){const o=["",t,e].join("/"),s=await L.Ay.post(E()+o,{actorDisplayName:(0,i.HW)().displayName,actorId:(0,i.HW)().uid,actorType:"users",creationDateTime:(new Date).toUTCString(),message:n,objectType:t,verb:"comment"}),r=o+"/"+parseInt(s.headers["content-location"].split("/").pop()),a=await M.stat(r,{details:!0}),c=a.data.props;return c.actorDisplayName=$(c.actorDisplayName,2),c.message=$(c.message,2),a.data}(this.resourceType,this.resourceId,e);s.debug("New comment posted",{resourceType:this.resourceType,resourceId:this.resourceId,newComment:t}),this.$emit("new",t),this.$emit("update:message",""),this.localMessage=""}catch(e){(0,l.Qg)(t("comments","An error occurred while trying to create the comment")),s.error("An error occurred while trying to create the comment",{error:e})}finally{this.loading=!1}}}},H={name:"Comment",components:{IconArrowRight:T.A,IconClose:k.A,IconTrashCanOutline:N.A,IconPencilOutline:D.A,NcActionButton:y.A,NcActions:_.A,NcActionSeparator:v.A,NcAvatar:b.A,NcButton:d.A,NcDateTime:x.A,NcLoadingIcon:w.A,NcRichContenteditable:()=>Promise.all([o.e(4208),o.e(5528)]).then(o.bind(o,95528)),NcRichText:()=>Promise.all([o.e(4208),o.e(4508)]).then(o.bind(o,64508))},mixins:[P],inheritAttrs:!1,props:{actorDisplayName:{type:String,required:!0},actorId:{type:String,required:!0},creationDateTime:{type:String,default:null},editor:{type:Boolean,default:!1},autoComplete:{type:Function,required:!0},userData:{type:Object,default:()=>({})},tag:{type:String,default:"div"}},data:()=>({expanded:!1,localMessage:"",submitted:!1}),computed:{...(0,a.n2)(j),isOwnComment(){return(0,i.HW)().uid===this.actorId},richContent(){const t={};let e=this.localMessage;return Object.keys(this.userData).forEach((n,o)=>{const s=`mention-${o}`,i=new RegExp(`@${n}|@"${n}"`,"g");e=e.replace(i,`{${s}}`),t[s]={component:I.A,props:{user:n,displayName:this.userData[n].label,primary:this.userData[n].primary}}}),{mentions:t,message:e}},isEmptyMessage(){return!this.localMessage||""===this.localMessage.trim()},timestamp(){return Date.parse(this.creationDateTime)},isLimbo(){return this.deletedCommentLimboStore.checkForId(this.id)}},watch:{message(t){this.updateLocalMessage(t)}},beforeMount(){this.updateLocalMessage(this.message)},methods:{t:r.Tl,updateLocalMessage(t){this.localMessage=t.toString(),this.submitted=!1},onSubmit(){if(""!==this.localMessage.trim())return this.editor?(this.onNewComment(this.localMessage.trim()),void this.$nextTick(()=>{this.$refs.editor.$el.focus()})):void this.onEditComment(this.localMessage.trim())},onExpand(){this.expanded=!0}}};var q=o(85072),V=o.n(q),z=o(97825),W=o.n(z),F=o(77659),G=o.n(F),U=o(55056),Y=o.n(U),Q=o(10540),K=o.n(Q),Z=o(41113),X=o.n(Z),J=o(90195),tt={};tt.styleTagTransform=X(),tt.setAttributes=Y(),tt.insert=G().bind(null,"head"),tt.domAPI=W(),tt.insertStyleElement=K(),V()(J.A,tt),J.A&&J.A.locals&&J.A.locals;const et=(0,h.A)(H,function(){var t=this,e=t._self._c;return e(t.tag,{directives:[{name:"show",rawName:"v-show",value:!t.deleted&&!t.isLimbo,expression:"!deleted && !isLimbo"}],tag:"component",staticClass:"comment",class:{"comment--loading":t.loading}},[e("div",{staticClass:"comment__side"},[e("NcAvatar",{staticClass:"comment__avatar",attrs:{"display-name":t.actorDisplayName,user:t.actorId,size:32}})],1),t._v(" "),e("div",{staticClass:"comment__body"},[e("div",{staticClass:"comment__header"},[e("span",{staticClass:"comment__author"},[t._v(t._s(t.actorDisplayName))]),t._v(" "),t.isOwnComment&&t.id&&!t.loading?e("NcActions",{staticClass:"comment__actions"},[t.editing?e("NcActionButton",{on:{click:t.onEditCancel},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconClose",{attrs:{size:20}})]},proxy:!0}],null,!1,2888946197)},[t._v("\n\t\t\t\t\t"+t._s(t.t("comments","Cancel edit"))+"\n\t\t\t\t")]):[e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onEdit},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconPencilOutline",{attrs:{size:20}})]},proxy:!0}],null,!1,3345211262)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Edit comment"))+"\n\t\t\t\t\t")]),t._v(" "),e("NcActionSeparator"),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onDeleteWithUndo},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconTrashCanOutline",{attrs:{size:20}})]},proxy:!0}],null,!1,1034796883)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Delete comment"))+"\n\t\t\t\t\t")])]],2):t._e(),t._v(" "),t.id&&t.loading?e("div",{staticClass:"comment_loading icon-loading-small"}):t.creationDateTime?e("NcDateTime",{staticClass:"comment__timestamp",attrs:{timestamp:t.timestamp,"ignore-seconds":!0}}):t._e()],1),t._v(" "),t.editor||t.editing?e("form",{staticClass:"comment__editor",on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"comment__editor-group"},[e("NcRichContenteditable",{ref:"editor",attrs:{"auto-complete":t.autoComplete,contenteditable:!t.loading,label:t.editor?t.t("comments","New comment"):t.t("comments","Edit comment"),placeholder:t.t("comments","Write a comment …"),value:t.localMessage,"user-data":t.userData,"aria-describedby":"tab-comments__editor-description"},on:{"update:value":t.updateLocalMessage,submit:t.onSubmit}}),t._v(" "),e("div",{staticClass:"comment__submit"},[e("NcButton",{attrs:{variant:"tertiary-no-background",type:"submit","aria-label":t.t("comments","Post comment"),disabled:t.isEmptyMessage},on:{click:t.onSubmit},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("NcLoadingIcon"):e("IconArrowRight",{attrs:{size:20}})]},proxy:!0}],null,!1,758946661)})],1)],1),t._v(" "),e("div",{staticClass:"comment__editor-description",attrs:{id:"tab-comments__editor-description"}},[t._v("\n\t\t\t\t"+t._s(t.t("comments","@ for mentions, : for emoji, / for smart picker"))+"\n\t\t\t")])]):e("NcRichText",{staticClass:"comment__message",class:{"comment__message--expanded":t.expanded},attrs:{text:t.richContent.message,arguments:t.richContent.mentions},nativeOn:{click:function(e){return t.onExpand.apply(null,arguments)}}})],1)])},[],!1,null,"4692aa67",null).exports;var nt=o(81222);const ot=(0,c.pM)({props:{resourceId:{type:Number,required:!0},resourceType:{type:String,default:"files"}},data:()=>({editorData:{actorDisplayName:(0,i.HW)().displayName,actorId:(0,i.HW)().uid,key:"editor"},userData:{}}),methods:{async autoComplete(t,e){const{data:n}=await L.Ay.get((0,O.KT)("core/autocomplete/get"),{params:{search:t,itemType:"files",itemId:this.resourceId,sorter:"commenters|share-recipients",limit:(0,nt.C)("comments","maxAutoCompleteResults")}});return n.ocs.data.forEach(t=>{this.userData[t.id]=t}),e(Object.values(this.userData))},genMentionsData(t){return Object.values(t).flat().forEach(t=>{this.userData[t.mentionId]={icon:"icon-user",id:t.mentionId,label:t.mentionDisplayName,source:"users",primary:(0,i.HW)()?.uid===t.mentionId}}),this.userData}}});var st=o(54290),it=o(90176);async function rt(t,e){let{resourceType:n,resourceId:o}=t;const s=["",n,o].join("/"),i=e.datetime?`${e.datetime.toISOString()}`:"",r=await M.customRequest(s,{method:"REPORT",data:`\n\t\t\t\n\t\t\t\t${e.limit??20}\n\t\t\t\t${e.offset||0}\n\t\t\t\t${i}\n\t\t\t`,...e}),a=await r.text(),c=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{multistatus:{response:n}}=t;return n.map(t=>{const n=t.propstat.prop;return(0,it.ch)(n,n.id.toString(),e)})}(await(0,S.h4)(a),!0);return(0,st.hq)(r,c,!0)}const at={name:"Comments",components:{Comment:et,NcEmptyContent:u.A,NcButton:d.A,IconRefresh:f,IconMessageReplyTextOutline:g,IconAlertCircleOutline:p.A},directives:{elementVisibility:m.Zx},mixins:[ot],data(){return{error:"",loading:!1,done:!1,currentResourceId:this.resourceId,offset:0,comments:[],cancelRequest:()=>{},Comment:et,userData:{}}},computed:{hasComments(){return this.comments.length>0},isFirstLoading(){return this.loading&&0===this.offset}},watch:{resourceId(){this.currentResourceId=this.resourceId}},methods:{t:r.Tl,async onVisibilityChange(t){if(t)try{await function(t,e,n){const o=["",t,e].join("/"),s=n.toUTCString();return M.customRequest(o,{method:"PROPPATCH",data:`\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t${s}\n\t\t\t\t\n\t\t\t\n\t\t\t`})}(this.resourceType,this.currentResourceId,new Date)}catch(t){(0,l.Qg)(t.message||(0,r.Tl)("comments","Failed to mark comments as read"))}},async update(t){this.currentResourceId=t,this.resetState(),this.getComments()},onScrollBottomReached(){this.error||this.done||this.loading||this.getComments()},async getComments(){this.cancelRequest("cancel");try{this.loading=!0,this.error="";const{request:t,abort:e}=function(t){const e=new AbortController,n=e.signal;return{request:async function(e,o){return await t(e,{signal:n,...o})},abort:()=>e.abort()}}(rt);this.cancelRequest=e;const{data:n}=await t({resourceType:this.resourceType,resourceId:this.currentResourceId},{offset:this.offset})||{data:[]};this.logger.debug(`Processed ${n.length} comments`,{comments:n}),n.length<20&&(this.done=!0),this.comments.push(...n),this.offset+=20}catch(t){if("cancel"===t.message)return;this.error=(0,r.Tl)("comments","Unable to load the comments list"),s.error("Error loading the comments list",{error:t})}finally{this.loading=!1}},onNewComment(t){this.comments.unshift(t)},onDelete(t){const e=this.comments.findIndex(e=>e.props.id===t);e>-1?this.comments.splice(e,1):s.error("Could not find the deleted comment in the list",{id:t})},resetState(){this.error="",this.loading=!1,this.done=!1,this.offset=0,this.comments=[]}}};var ct=o(23676),lt={};lt.styleTagTransform=X(),lt.setAttributes=Y(),lt.insert=G().bind(null,"head"),lt.domAPI=W(),lt.insertStyleElement=K(),V()(ct.A,lt),ct.A&&ct.A.locals&&ct.A.locals;const mt=(0,h.A)(at,function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"element-visibility",rawName:"v-element-visibility",value:t.onVisibilityChange,expression:"onVisibilityChange"}],staticClass:"comments",class:{"icon-loading":t.isFirstLoading}},[e("Comment",t._b({staticClass:"comments__writer",attrs:{"auto-complete":t.autoComplete,"resource-type":t.resourceType,editor:!0,"user-data":t.userData,"resource-id":t.currentResourceId},on:{new:t.onNewComment}},"Comment",t.editorData,!1)),t._v(" "),t.isFirstLoading?t._e():[!t.hasComments&&t.done?e("NcEmptyContent",{staticClass:"comments__empty",attrs:{name:t.t("comments","No comments yet, start the conversation!")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconMessageReplyTextOutline")]},proxy:!0}],null,!1,326612300)}):e("ul",t._l(t.comments,function(n){return e("Comment",t._b({key:n.props.id,staticClass:"comments__list",attrs:{tag:"li","auto-complete":t.autoComplete,"resource-type":t.resourceType,message:n.props.message,"resource-id":t.currentResourceId,"user-data":t.genMentionsData(n.props.mentions)},on:{"update:message":function(e){return t.$set(n.props,"message",e)},delete:t.onDelete}},"Comment",n.props,!1))}),1),t._v(" "),t.loading&&!t.isFirstLoading?e("div",{staticClass:"comments__info icon-loading"}):t.hasComments&&t.done?e("div",{staticClass:"comments__info"},[t._v("\n\t\t\t"+t._s(t.t("comments","No more messages"))+"\n\t\t")]):t.error?[e("NcEmptyContent",{staticClass:"comments__error",attrs:{name:t.error},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconAlertCircleOutline")]},proxy:!0}],null,!1,3663249556)}),t._v(" "),e("NcButton",{staticClass:"comments__retry",on:{click:t.getComments},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconRefresh")]},proxy:!0}],null,!1,2997625269)},[t._v("\n\t\t\t\t"+t._s(t.t("comments","Retry"))+"\n\t\t\t")])]:t._e()]],2)},[],!1,null,"678ce6fc",null).exports;c.Ay.use(a.R2),o.nc=(0,i.aV)(),c.Ay.mixin({data:()=>({logger:s}),methods:{t:r.t,n:r.n}}),window.OCA&&!window.OCA.Comments&&Object.assign(window.OCA,{Comments:{}}),Object.assign(window.OCA.Comments,{View:class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"files",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,a.Ey)();return e={...e,propsData:{...e.propsData??{},resourceType:t},pinia:n},new(c.Ay.extend(mt))(e)}}}),s.debug("OCA.Comments.View initialized")},23676:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(71354),s=n.n(o),i=n(76314),r=n.n(i)()(s());r.push([t.id,".comments[data-v-678ce6fc]{min-height:100%;display:flex;flex-direction:column}.comments__empty[data-v-678ce6fc],.comments__error[data-v-678ce6fc]{flex:1 0}.comments__retry[data-v-678ce6fc]{margin:0 auto}.comments__info[data-v-678ce6fc]{height:60px;color:var(--color-text-maxcontrast);text-align:center;line-height:60px}","",{version:3,sources:["webpack://./apps/comments/src/views/Comments.vue"],names:[],mappings:"AACA,2BACC,eAAA,CACA,YAAA,CACA,qBAAA,CAEA,oEAEC,QAAA,CAGD,kCACC,aAAA,CAGD,iCACC,WAAA,CACA,mCAAA,CACA,iBAAA,CACA,gBAAA",sourcesContent:["\n.comments {\n\tmin-height: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t&__empty,\n\t&__error {\n\t\tflex: 1 0;\n\t}\n\n\t&__retry {\n\t\tmargin: 0 auto;\n\t}\n\n\t&__info {\n\t\theight: 60px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t\ttext-align: center;\n\t\tline-height: 60px;\n\t}\n}\n"],sourceRoot:""}]);const a=r},42634:()=>{},59169:()=>{},63779:()=>{},77199:()=>{},86833:()=>{},90195:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(71354),s=n.n(o),i=n(76314),r=n.n(i)()(s());r.push([t.id,".comment[data-v-4692aa67]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-4692aa67]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-4692aa67]{display:flex;flex-grow:1;flex-direction:column;container-type:inline-size}.comment__header[data-v-4692aa67]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-4692aa67]{margin-inline-start:10px !important}.comment__author[data-v-4692aa67]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-4692aa67],.comment__timestamp[data-v-4692aa67]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-4692aa67]{position:relative}.comment__editor-description[data-v-4692aa67]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-4692aa67]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-4692aa67]{white-space:pre-wrap;word-break:normal;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-4692aa67]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-4692aa67]{min-height:44px;margin:0;padding:10px}","",{version:3,sources:["webpack://./apps/comments/src/components/Comment.vue"],names:[],mappings:"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CACA,0BAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,iBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA5EiB",sourcesContent:['\n@use "sass:math";\n\n$comment-padding: 10px;\n\n.comment {\n\tdisplay: flex;\n\tgap: 8px;\n\tpadding: 5px $comment-padding;\n\n\t&__side {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding-top: 6px;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t\tcontainer-type: inline-size;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-height: 44px;\n\t}\n\n\t&__actions {\n\t\tmargin-inline-start: $comment-padding !important;\n\t}\n\n\t&__author {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&_loading,\n\t&__timestamp {\n\t\tmargin-inline-start: auto;\n\t\ttext-align: end;\n\t\twhite-space: nowrap;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__editor-group {\n\t\tposition: relative;\n\t}\n\n\t&__editor-description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tpadding-block: var(--default-grid-baseline);\n\t}\n\n\t&__submit {\n\t\tposition: absolute !important;\n\t\tbottom: 5px;\n\t\tinset-inline-end: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: normal;\n\t\tmax-height: 70px;\n\t\toverflow: hidden;\n\t\tmargin-top: -6px;\n\t\t&--expanded {\n\t\t\tmax-height: none;\n\t\t\toverflow: visible;\n\t\t}\n\t}\n}\n\n.rich-contenteditable__input {\n\tmin-height: 44px;\n\tmargin: 0;\n\tpadding: $comment-padding;\n}\n\n'],sourceRoot:""}]);const a=r}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={id:t,loaded:!1,exports:{}};return s[t].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}r.m=s,e=[],r.O=(t,n,o,s)=>{if(!n){var i=1/0;for(m=0;m=s)&&Object.keys(r.O).every(t=>r.O[t](n[c]))?n.splice(c--,1):(a=!1,s0&&e[m-1][2]>s;m--)e[m]=e[m-1];e[m]=[n,o,s]},r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.f={},r.e=t=>Promise.all(Object.keys(r.f).reduce((e,n)=>(r.f[n](t,e),e),[])),r.u=t=>t+"-"+t+".js?v="+{640:"c5cc8d7f0213aa827c54",3564:"29e8338d43e0d4bd3995",4508:"55b817403e13f27fae56",5528:"d0a4ad859a898dce471a",5810:"b550a24d46f75f92c2d5",5862:"4ca96c4f928b038599cf",7471:"6423b9b898ffefeb7d1d",7615:"05564da6cf58bf2e44eb"}[t],r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n={},o="nextcloud:",r.l=(t,e,s,i)=>{if(n[t])n[t].push(e);else{var a,c;if(void 0!==s)for(var l=document.getElementsByTagName("script"),m=0;m{a.onerror=a.onload=null,clearTimeout(p);var s=n[t];if(delete n[t],a.parentNode&&a.parentNode.removeChild(a),s&&s.forEach(t=>t(o)),e)return e(o)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),c&&document.head.appendChild(a)}},r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),r.j=7062,(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!t||!/^http(s?):/.test(t));)t=n[o--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})(),(()=>{r.b=document&&document.baseURI||self.location.href;var t={7062:0};r.f.j=(e,n)=>{var o=r.o(t,e)?t[e]:void 0;if(0!==o)if(o)n.push(o[2]);else{var s=new Promise((n,s)=>o=t[e]=[n,s]);n.push(o[2]=s);var i=r.p+r.u(e),a=new Error;r.l(i,n=>{if(r.o(t,e)&&(0!==(o=t[e])&&(t[e]=void 0),o)){var s=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+s+": "+i+")",a.name="ChunkLoadError",a.type=s,a.request=i,o[1](a)}},"chunk-"+e,e)}},r.O.j=e=>0===t[e];var e=(e,n)=>{var o,s,i=n[0],a=n[1],c=n[2],l=0;if(i.some(e=>0!==t[e])){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(c)var m=c(r)}for(e&&e(n);lr(1598));a=r.O(a)})(); -//# sourceMappingURL=comments-comments-app.js.map?v=ab03482f10f615c9d562 \ No newline at end of file +(()=>{var e,n,o,s={42634:()=>{},49002:(e,n,o)=>{"use strict";const s=(0,o(35947).YK)().setApp("comments").detectUser().build();var i=o(21777),r=o(53334),a=o(65899),c=o(85471),l=o(85168),m=o(55042),d=o(74095),u=o(11275),p=o(57578);const A={name:"MessageReplyTextOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var h=o(14486);const g=(0,h.A)(A,function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon message-reply-text-outline-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M9 11H18V13H9V11M18 7H6V9H18V7M22 4V22L18 18H4C2.9 18 2 17.11 2 16V4C2 2.9 2.9 2 4 2H20C21.1 2 22 2.89 22 4M20 4H4V16H18.83L20 17.17V4Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},[],!1,null,null,null).exports,C={name:"RefreshIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},f=(0,h.A)(C,function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon refresh-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},[],!1,null,null,null).exports;var y=o(57505),_=o(24764),v=o(15502),b=o(41944),x=o(4604),w=o(88289),I=o(77764),T=o(33691),k=o(66001),D=o(16502),N=o(37793),S=o(45505),O=o(63814);function R(){return(0,O.dC)("dav/comments")}const E=(0,S.UU)(R());function B(t){E.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}(0,i.zo)(B),B((0,i.do)());const M=E;var L=o(65043);function $(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=new DOMParser;let o=t;for(let t=0;t({idsInLimbo:[]}),actions:{addId(t){this.idsInLimbo.push(t)},removeId(t){const e=this.idsInLimbo.indexOf(t);e>-1&&this.idsInLimbo.splice(e,1)},checkForId(t){return this.idsInLimbo.includes(t)}}}),P={props:{id:{type:Number,default:null},message:{type:String,default:""},resourceId:{type:[String,Number],required:!0},resourceType:{type:String,default:"files"}},data:()=>({deleted:!1,editing:!1,loading:!1}),computed:{...(0,a.n2)(j)},methods:{onEdit(){this.editing=!0},onEditCancel(){this.editing=!1,this.updateLocalMessage(this.message)},async onEditComment(e){this.loading=!0;try{await async function(t,e,n,o){const s=["",t,e,n].join("/");return await M.customRequest(s,{method:"PROPPATCH",data:`\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t${o}\n\t\t\t\t\n\t\t\t\n\t\t\t`})}(this.resourceType,this.resourceId,this.id,e),s.debug("Comment edited",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id,message:e}),this.$emit("update:message",e),this.editing=!1}catch(e){(0,l.Qg)(t("comments","An error occurred while trying to edit the comment")),s.error("An error occurred while trying to edit the comment",{error:e})}finally{this.loading=!1}},onDeleteWithUndo(){this.$emit("delete"),this.deleted=!0,this.deletedCommentLimboStore.addId(this.id);const e=setTimeout(this.onDelete,l.Br);(0,l._h)(t("comments","Comment deleted"),()=>{clearTimeout(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)})},async onDelete(){try{await async function(t,e,n){const o=["",t,e,n].join("/");await M.deleteFile(o)}(this.resourceType,this.resourceId,this.id),s.debug("Comment deleted",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id}),this.$emit("delete",this.id)}catch(e){(0,l.Qg)(t("comments","An error occurred while trying to delete the comment")),s.error("An error occurred while trying to delete the comment",{error:e}),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)}},async onNewComment(e){this.loading=!0;try{const t=await async function(t,e,n){const o=["",t,e].join("/"),s=await L.Ay.post(R()+o,{actorDisplayName:(0,i.HW)().displayName,actorId:(0,i.HW)().uid,actorType:"users",creationDateTime:(new Date).toUTCString(),message:n,objectType:t,verb:"comment"}),r=o+"/"+parseInt(s.headers["content-location"].split("/").pop()),a=await M.stat(r,{details:!0}),c=a.data.props;return c.actorDisplayName=$(c.actorDisplayName,2),c.message=$(c.message,2),a.data}(this.resourceType,this.resourceId,e);s.debug("New comment posted",{resourceType:this.resourceType,resourceId:this.resourceId,newComment:t}),this.$emit("new",t),this.$emit("update:message",""),this.localMessage=""}catch(e){(0,l.Qg)(t("comments","An error occurred while trying to create the comment")),s.error("An error occurred while trying to create the comment",{error:e})}finally{this.loading=!1}}}},H={name:"Comment",components:{IconArrowRight:T.A,IconClose:k.A,IconTrashCanOutline:N.A,IconPencilOutline:D.A,NcActionButton:y.A,NcActions:_.A,NcActionSeparator:v.A,NcAvatar:b.A,NcButton:d.A,NcDateTime:x.A,NcLoadingIcon:w.A,NcRichContenteditable:()=>Promise.all([o.e(4208),o.e(5528)]).then(o.bind(o,95528)),NcRichText:()=>Promise.all([o.e(4208),o.e(4508)]).then(o.bind(o,64508))},mixins:[P],inheritAttrs:!1,props:{actorDisplayName:{type:String,required:!0},actorId:{type:String,required:!0},creationDateTime:{type:String,default:null},editor:{type:Boolean,default:!1},autoComplete:{type:Function,required:!0},userData:{type:Object,default:()=>({})},tag:{type:String,default:"div"}},data:()=>({expanded:!1,localMessage:"",submitted:!1}),computed:{...(0,a.n2)(j),isOwnComment(){return(0,i.HW)().uid===this.actorId},richContent(){const t={};let e=this.localMessage;return Object.keys(this.userData).forEach((n,o)=>{const s=`mention-${o}`,i=new RegExp(`@${n}|@"${n}"`,"g");e=e.replace(i,`{${s}}`),t[s]={component:I.A,props:{user:n,displayName:this.userData[n].label,primary:this.userData[n].primary}}}),{mentions:t,message:e}},isEmptyMessage(){return!this.localMessage||""===this.localMessage.trim()},timestamp(){return Date.parse(this.creationDateTime)},isLimbo(){return this.deletedCommentLimboStore.checkForId(this.id)}},watch:{message(t){this.updateLocalMessage(t)}},beforeMount(){this.updateLocalMessage(this.message)},methods:{t:r.Tl,updateLocalMessage(t){this.localMessage=t.toString(),this.submitted=!1},onSubmit(){if(""!==this.localMessage.trim())return this.editor?(this.onNewComment(this.localMessage.trim()),void this.$nextTick(()=>{this.$refs.editor.$el.focus()})):void this.onEditComment(this.localMessage.trim())},onExpand(){this.expanded=!0}}};var q=o(85072),V=o.n(q),z=o(97825),W=o.n(z),F=o(77659),G=o.n(F),U=o(55056),Y=o.n(U),Q=o(10540),K=o.n(Q),Z=o(41113),X=o.n(Z),J=o(90195),tt={};tt.styleTagTransform=X(),tt.setAttributes=Y(),tt.insert=G().bind(null,"head"),tt.domAPI=W(),tt.insertStyleElement=K(),V()(J.A,tt),J.A&&J.A.locals&&J.A.locals;const et=(0,h.A)(H,function(){var t=this,e=t._self._c;return e(t.tag,{directives:[{name:"show",rawName:"v-show",value:!t.deleted&&!t.isLimbo,expression:"!deleted && !isLimbo"}],tag:"component",staticClass:"comment",class:{"comment--loading":t.loading}},[e("div",{staticClass:"comment__side"},[e("NcAvatar",{staticClass:"comment__avatar",attrs:{"display-name":t.actorDisplayName,user:t.actorId,size:32}})],1),t._v(" "),e("div",{staticClass:"comment__body"},[e("div",{staticClass:"comment__header"},[e("span",{staticClass:"comment__author"},[t._v(t._s(t.actorDisplayName))]),t._v(" "),t.isOwnComment&&t.id&&!t.loading?e("NcActions",{staticClass:"comment__actions"},[t.editing?e("NcActionButton",{on:{click:t.onEditCancel},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconClose",{attrs:{size:20}})]},proxy:!0}],null,!1,2888946197)},[t._v("\n\t\t\t\t\t"+t._s(t.t("comments","Cancel edit"))+"\n\t\t\t\t")]):[e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onEdit},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconPencilOutline",{attrs:{size:20}})]},proxy:!0}],null,!1,3345211262)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Edit comment"))+"\n\t\t\t\t\t")]),t._v(" "),e("NcActionSeparator"),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onDeleteWithUndo},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconTrashCanOutline",{attrs:{size:20}})]},proxy:!0}],null,!1,1034796883)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Delete comment"))+"\n\t\t\t\t\t")])]],2):t._e(),t._v(" "),t.id&&t.loading?e("div",{staticClass:"comment_loading icon-loading-small"}):t.creationDateTime?e("NcDateTime",{staticClass:"comment__timestamp",attrs:{timestamp:t.timestamp,"ignore-seconds":!0}}):t._e()],1),t._v(" "),t.editor||t.editing?e("form",{staticClass:"comment__editor",on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"comment__editor-group"},[e("NcRichContenteditable",{ref:"editor",attrs:{"auto-complete":t.autoComplete,contenteditable:!t.loading,label:t.editor?t.t("comments","New comment"):t.t("comments","Edit comment"),placeholder:t.t("comments","Write a comment …"),value:t.localMessage,"user-data":t.userData,"aria-describedby":"tab-comments__editor-description"},on:{"update:value":t.updateLocalMessage,submit:t.onSubmit}}),t._v(" "),e("div",{staticClass:"comment__submit"},[e("NcButton",{attrs:{variant:"tertiary-no-background",type:"submit","aria-label":t.t("comments","Post comment"),disabled:t.isEmptyMessage},on:{click:t.onSubmit},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("NcLoadingIcon"):e("IconArrowRight",{attrs:{size:20}})]},proxy:!0}],null,!1,758946661)})],1)],1),t._v(" "),e("div",{staticClass:"comment__editor-description",attrs:{id:"tab-comments__editor-description"}},[t._v("\n\t\t\t\t"+t._s(t.t("comments","@ for mentions, : for emoji, / for smart picker"))+"\n\t\t\t")])]):e("NcRichText",{staticClass:"comment__message",class:{"comment__message--expanded":t.expanded},attrs:{text:t.richContent.message,arguments:t.richContent.mentions},nativeOn:{click:function(e){return t.onExpand.apply(null,arguments)}}})],1)])},[],!1,null,"4692aa67",null).exports;var nt=o(81222);const ot=(0,c.pM)({props:{resourceId:{type:Number,required:!0},resourceType:{type:String,default:"files"}},data(){return{editorData:{actorDisplayName:(0,i.HW)().displayName,actorId:(0,i.HW)().uid,key:"editor"},userData:{},currentResourceId:this.resourceId}},methods:{async autoComplete(t,e){const{data:n}=await L.Ay.get((0,O.KT)("core/autocomplete/get"),{params:{search:t,itemType:this.resourceType,itemId:this.currentResourceId,sorter:"commenters|share-recipients",limit:(0,nt.C)("comments","maxAutoCompleteResults")}});return n.ocs.data.forEach(t=>{this.userData[t.id]=t}),e(Object.values(this.userData))},genMentionsData(t){return Object.values(t).flat().forEach(t=>{this.userData[t.mentionId]={icon:"icon-user",id:t.mentionId,label:t.mentionDisplayName,source:"users",primary:(0,i.HW)()?.uid===t.mentionId}}),this.userData}}});var st=o(54290),it=o(90176);async function rt(t,e){let{resourceType:n,resourceId:o}=t;const s=["",n,o].join("/"),i=e.datetime?`${e.datetime.toISOString()}`:"",r=await M.customRequest(s,{method:"REPORT",data:`\n\t\t\t\n\t\t\t\t${e.limit??20}\n\t\t\t\t${e.offset||0}\n\t\t\t\t${i}\n\t\t\t`,...e}),a=await r.text(),c=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{multistatus:{response:n}}=t;return n.map(t=>{const n=t.propstat.prop;return(0,it.ch)(n,n.id.toString(),e)})}(await(0,S.h4)(a),!0);return(0,st.hq)(r,c,!0)}const at={name:"Comments",components:{Comment:et,NcEmptyContent:u.A,NcButton:d.A,IconRefresh:f,IconMessageReplyTextOutline:g,IconAlertCircleOutline:p.A},directives:{elementVisibility:m.Zx},mixins:[ot],data:()=>({error:"",loading:!1,done:!1,offset:0,comments:[],cancelRequest:()=>{},Comment:et,userData:{}}),computed:{hasComments(){return this.comments.length>0},isFirstLoading(){return this.loading&&0===this.offset}},watch:{resourceId(){this.currentResourceId=this.resourceId}},methods:{t:r.Tl,async onVisibilityChange(t){if(t)try{await function(t,e,n){const o=["",t,e].join("/"),s=n.toUTCString();return M.customRequest(o,{method:"PROPPATCH",data:`\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t${s}\n\t\t\t\t\n\t\t\t\n\t\t\t`})}(this.resourceType,this.currentResourceId,new Date)}catch(t){(0,l.Qg)(t.message||(0,r.Tl)("comments","Failed to mark comments as read"))}},async update(t){this.currentResourceId=t,this.resetState(),await this.getComments()},onScrollBottomReached(){this.error||this.done||this.loading||this.getComments()},async getComments(){this.cancelRequest("cancel");try{this.loading=!0,this.error="";const{request:t,abort:e}=function(t){const e=new AbortController,n=e.signal;return{request:async function(e,o){return await t(e,{signal:n,...o})},abort:()=>e.abort()}}(rt);this.cancelRequest=e;const{data:n}=await t({resourceType:this.resourceType,resourceId:this.currentResourceId},{offset:this.offset})||{data:[]};this.logger.debug(`Processed ${n.length} comments`,{comments:n}),n.length<20&&(this.done=!0);for(const t of n)t.props.actorId=t.props.actorId.toString();this.comments=[...this.comments,...n],this.offset+=20}catch(t){if("cancel"===t.message)return;this.error=(0,r.Tl)("comments","Unable to load the comments list"),s.error("Error loading the comments list",{error:t})}finally{this.loading=!1}},onNewComment(t){this.comments.unshift(t)},onDelete(t){const e=this.comments.findIndex(e=>e.props.id===t);e>-1?this.comments.splice(e,1):s.error("Could not find the deleted comment in the list",{id:t})},resetState(){this.error="",this.loading=!1,this.done=!1,this.offset=0,this.comments=[]}}};var ct=o(94262),lt={};lt.styleTagTransform=X(),lt.setAttributes=Y(),lt.insert=G().bind(null,"head"),lt.domAPI=W(),lt.insertStyleElement=K(),V()(ct.A,lt),ct.A&&ct.A.locals&&ct.A.locals;const mt=(0,h.A)(at,function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"element-visibility",rawName:"v-element-visibility",value:t.onVisibilityChange,expression:"onVisibilityChange"}],staticClass:"comments",class:{"icon-loading":t.isFirstLoading}},[e("Comment",t._b({staticClass:"comments__writer",attrs:{"auto-complete":t.autoComplete,"resource-type":t.resourceType,editor:!0,"user-data":t.userData,"resource-id":t.currentResourceId},on:{new:t.onNewComment}},"Comment",t.editorData,!1)),t._v(" "),t.isFirstLoading?t._e():[!t.hasComments&&t.done?e("NcEmptyContent",{staticClass:"comments__empty",attrs:{name:t.t("comments","No comments yet, start the conversation!")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconMessageReplyTextOutline")]},proxy:!0}],null,!1,326612300)}):e("ul",t._l(t.comments,function(n){return e("Comment",t._b({key:n.props.id,staticClass:"comments__list",attrs:{tag:"li","auto-complete":t.autoComplete,"resource-type":t.resourceType,message:n.props.message,"resource-id":t.currentResourceId,"user-data":t.genMentionsData(n.props.mentions)},on:{"update:message":function(e){return t.$set(n.props,"message",e)},delete:t.onDelete}},"Comment",n.props,!1))}),1),t._v(" "),t.loading&&!t.isFirstLoading?e("div",{staticClass:"comments__info icon-loading"}):t.hasComments&&t.done?e("div",{staticClass:"comments__info"},[t._v("\n\t\t\t"+t._s(t.t("comments","No more messages"))+"\n\t\t")]):t.error?[e("NcEmptyContent",{staticClass:"comments__error",attrs:{name:t.error},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconAlertCircleOutline")]},proxy:!0}],null,!1,3663249556)}),t._v(" "),e("NcButton",{staticClass:"comments__retry",on:{click:t.getComments},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconRefresh")]},proxy:!0}],null,!1,2997625269)},[t._v("\n\t\t\t\t"+t._s(t.t("comments","Retry"))+"\n\t\t\t")])]:t._e()]],2)},[],!1,null,"6c8c157a",null).exports;c.Ay.use(a.R2),o.nc=(0,i.aV)(),c.Ay.mixin({data:()=>({logger:s}),methods:{t:r.t,n:r.n}}),window.OCA&&!window.OCA.Comments&&Object.assign(window.OCA,{Comments:{}}),Object.assign(window.OCA.Comments,{View:class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"files",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,a.Ey)();return e={...e,propsData:{...e.propsData??{},resourceType:t},pinia:n},new(c.Ay.extend(mt))(e)}}}),s.debug("OCA.Comments.View initialized")},59169:()=>{},63779:()=>{},77199:()=>{},86833:()=>{},90195:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(71354),s=n.n(o),i=n(76314),r=n.n(i)()(s());r.push([t.id,".comment[data-v-4692aa67]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-4692aa67]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-4692aa67]{display:flex;flex-grow:1;flex-direction:column;container-type:inline-size}.comment__header[data-v-4692aa67]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-4692aa67]{margin-inline-start:10px !important}.comment__author[data-v-4692aa67]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-4692aa67],.comment__timestamp[data-v-4692aa67]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-4692aa67]{position:relative}.comment__editor-description[data-v-4692aa67]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-4692aa67]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-4692aa67]{white-space:pre-wrap;word-break:normal;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-4692aa67]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-4692aa67]{min-height:44px;margin:0;padding:10px}","",{version:3,sources:["webpack://./apps/comments/src/components/Comment.vue"],names:[],mappings:"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CACA,0BAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,iBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA5EiB",sourcesContent:['\n@use "sass:math";\n\n$comment-padding: 10px;\n\n.comment {\n\tdisplay: flex;\n\tgap: 8px;\n\tpadding: 5px $comment-padding;\n\n\t&__side {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding-top: 6px;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t\tcontainer-type: inline-size;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-height: 44px;\n\t}\n\n\t&__actions {\n\t\tmargin-inline-start: $comment-padding !important;\n\t}\n\n\t&__author {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&_loading,\n\t&__timestamp {\n\t\tmargin-inline-start: auto;\n\t\ttext-align: end;\n\t\twhite-space: nowrap;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__editor-group {\n\t\tposition: relative;\n\t}\n\n\t&__editor-description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tpadding-block: var(--default-grid-baseline);\n\t}\n\n\t&__submit {\n\t\tposition: absolute !important;\n\t\tbottom: 5px;\n\t\tinset-inline-end: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: normal;\n\t\tmax-height: 70px;\n\t\toverflow: hidden;\n\t\tmargin-top: -6px;\n\t\t&--expanded {\n\t\t\tmax-height: none;\n\t\t\toverflow: visible;\n\t\t}\n\t}\n}\n\n.rich-contenteditable__input {\n\tmin-height: 44px;\n\tmargin: 0;\n\tpadding: $comment-padding;\n}\n\n'],sourceRoot:""}]);const a=r},94262:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(71354),s=n.n(o),i=n(76314),r=n.n(i)()(s());r.push([t.id,".comments[data-v-6c8c157a]{min-height:100%;display:flex;flex-direction:column}.comments__empty[data-v-6c8c157a],.comments__error[data-v-6c8c157a]{flex:1 0}.comments__retry[data-v-6c8c157a]{margin:0 auto}.comments__info[data-v-6c8c157a]{height:60px;color:var(--color-text-maxcontrast);text-align:center;line-height:60px}","",{version:3,sources:["webpack://./apps/comments/src/views/Comments.vue"],names:[],mappings:"AACA,2BACC,eAAA,CACA,YAAA,CACA,qBAAA,CAEA,oEAEC,QAAA,CAGD,kCACC,aAAA,CAGD,iCACC,WAAA,CACA,mCAAA,CACA,iBAAA,CACA,gBAAA",sourcesContent:["\n.comments {\n\tmin-height: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t&__empty,\n\t&__error {\n\t\tflex: 1 0;\n\t}\n\n\t&__retry {\n\t\tmargin: 0 auto;\n\t}\n\n\t&__info {\n\t\theight: 60px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t\ttext-align: center;\n\t\tline-height: 60px;\n\t}\n}\n"],sourceRoot:""}]);const a=r}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={id:t,loaded:!1,exports:{}};return s[t].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}r.m=s,e=[],r.O=(t,n,o,s)=>{if(!n){var i=1/0;for(m=0;m=s)&&Object.keys(r.O).every(t=>r.O[t](n[c]))?n.splice(c--,1):(a=!1,s0&&e[m-1][2]>s;m--)e[m]=e[m-1];e[m]=[n,o,s]},r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.f={},r.e=t=>Promise.all(Object.keys(r.f).reduce((e,n)=>(r.f[n](t,e),e),[])),r.u=t=>t+"-"+t+".js?v="+{640:"c5cc8d7f0213aa827c54",3564:"29e8338d43e0d4bd3995",4508:"55b817403e13f27fae56",5528:"d0a4ad859a898dce471a",5810:"b550a24d46f75f92c2d5",5862:"4ca96c4f928b038599cf",7471:"6423b9b898ffefeb7d1d",7615:"05564da6cf58bf2e44eb"}[t],r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n={},o="nextcloud:",r.l=(t,e,s,i)=>{if(n[t])n[t].push(e);else{var a,c;if(void 0!==s)for(var l=document.getElementsByTagName("script"),m=0;m{a.onerror=a.onload=null,clearTimeout(p);var s=n[t];if(delete n[t],a.parentNode&&a.parentNode.removeChild(a),s&&s.forEach(t=>t(o)),e)return e(o)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),c&&document.head.appendChild(a)}},r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),r.j=7062,(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!t||!/^http(s?):/.test(t));)t=n[o--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})(),(()=>{r.b=document&&document.baseURI||self.location.href;var t={7062:0};r.f.j=(e,n)=>{var o=r.o(t,e)?t[e]:void 0;if(0!==o)if(o)n.push(o[2]);else{var s=new Promise((n,s)=>o=t[e]=[n,s]);n.push(o[2]=s);var i=r.p+r.u(e),a=new Error;r.l(i,n=>{if(r.o(t,e)&&(0!==(o=t[e])&&(t[e]=void 0),o)){var s=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+s+": "+i+")",a.name="ChunkLoadError",a.type=s,a.request=i,o[1](a)}},"chunk-"+e,e)}},r.O.j=e=>0===t[e];var e=(e,n)=>{var o,s,i=n[0],a=n[1],c=n[2],l=0;if(i.some(e=>0!==t[e])){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(c)var m=c(r)}for(e&&e(n);lr(49002));a=r.O(a)})(); +//# sourceMappingURL=comments-comments-app.js.map?v=78817cd20a1e861f825b \ No newline at end of file diff --git a/dist/comments-comments-app.js.map b/dist/comments-comments-app.js.map index 18455c8e1069d..20e750a29f0e2 100644 --- a/dist/comments-comments-app.js.map +++ b/dist/comments-comments-app.js.map @@ -1 +1 @@ -{"version":3,"file":"comments-comments-app.js?v=ab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D,EAAuB,CAACC,EAA4B3T,KACvD,IAKImO,EAAUyB,EALVjB,EAAW3O,EAAK,GAChB4T,EAAc5T,EAAK,GACnB6T,EAAU7T,EAAK,GAGItB,EAAI,EAC3B,GAAGiQ,EAASmF,KAAM1U,GAAgC,IAAxB+T,EAAgB/T,IAAa,CACtD,IAAI+O,KAAYyF,EACZ1F,EAAoBsB,EAAEoE,EAAazF,KACrCD,EAAoBO,EAAEN,GAAYyF,EAAYzF,IAGhD,GAAG0F,EAAS,IAAI7J,EAAS6J,EAAQ3F,EAClC,CAEA,IADGyF,GAA4BA,EAA2B3T,GACrDtB,EAAIiQ,EAAStQ,OAAQK,IACzBkR,EAAUjB,EAASjQ,GAChBwP,EAAoBsB,EAAE2D,EAAiBvD,IAAYuD,EAAgBvD,IACrEuD,EAAgBvD,GAAS,KAE1BuD,EAAgBvD,GAAW,EAE5B,OAAO1B,EAAoBQ,EAAE1E,IAG1B+J,EAAqBd,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1Fc,EAAmBtO,QAAQiO,EAAqB7B,KAAK,KAAM,IAC3DkC,EAAmB1U,KAAOqU,EAAqB7B,KAAK,KAAMkC,EAAmB1U,KAAKwS,KAAKkC,G,KCvFvF7F,EAAoB+C,QAAK3S,ECGzB,IAAI0V,EAAsB9F,EAAoBQ,OAAEpQ,EAAW,CAAC,MAAO,IAAO4P,EAAoB,OAC9F8F,EAAsB9F,EAAoBQ,EAAEsF,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/comments/src/logger.js","webpack:///nextcloud/node_modules/vue-material-design-icons/MessageReplyTextOutline.vue","webpack:///nextcloud/node_modules/vue-material-design-icons/MessageReplyTextOutline.vue?vue&type=script&lang=js","webpack://nextcloud/./node_modules/vue-material-design-icons/MessageReplyTextOutline.vue?87e1","webpack:///nextcloud/node_modules/vue-material-design-icons/MessageReplyTextOutline.vue?vue&type=template&id=5d6c4e92","webpack:///nextcloud/node_modules/vue-material-design-icons/Refresh.vue?vue&type=script&lang=js","webpack:///nextcloud/node_modules/vue-material-design-icons/Refresh.vue","webpack://nextcloud/./node_modules/vue-material-design-icons/Refresh.vue?0940","webpack:///nextcloud/node_modules/vue-material-design-icons/Refresh.vue?vue&type=template&id=2864f909","webpack://nextcloud/./apps/comments/src/components/Comment.vue?d1f7","webpack:///nextcloud/apps/comments/src/utils/davUtils.js","webpack:///nextcloud/apps/comments/src/services/DavClient.js","webpack:///nextcloud/apps/comments/src/utils/decodeHtmlEntities.js","webpack:///nextcloud/apps/comments/src/store/deletedCommentLimbo.js","webpack:///nextcloud/apps/comments/src/mixins/CommentMixin.js","webpack:///nextcloud/apps/comments/src/services/EditComment.js","webpack:///nextcloud/apps/comments/src/services/DeleteComment.js","webpack:///nextcloud/apps/comments/src/services/NewComment.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=script&lang=js","webpack:///nextcloud/apps/comments/src/components/Comment.vue","webpack://nextcloud/./apps/comments/src/components/Comment.vue?07dd","webpack://nextcloud/./apps/comments/src/components/Comment.vue?7f26","webpack:///nextcloud/apps/comments/src/mixins/CommentView.ts","webpack:///nextcloud/apps/comments/src/services/GetComments.ts","webpack:///nextcloud/apps/comments/src/utils/cancelableRequest.js","webpack:///nextcloud/apps/comments/src/views/Comments.vue?vue&type=script&lang=js","webpack:///nextcloud/apps/comments/src/views/Comments.vue","webpack:///nextcloud/apps/comments/src/services/ReadComments.ts","webpack://nextcloud/./apps/comments/src/views/Comments.vue?95d8","webpack://nextcloud/./apps/comments/src/views/Comments.vue?f45b","webpack://nextcloud/./apps/comments/src/views/Comments.vue?0e41","webpack:///nextcloud/apps/comments/src/services/CommentsInstance.js","webpack:///nextcloud/apps/comments/src/comments-app.js","webpack:///nextcloud/apps/comments/src/views/Comments.vue?vue&type=style&index=0&id=678ce6fc&prod&lang=scss&scoped=true","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('comments')\n\t.detectUser()\n\t.build()\n","\n\n","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./MessageReplyTextOutline.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./MessageReplyTextOutline.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./MessageReplyTextOutline.vue?vue&type=template&id=5d6c4e92\"\nimport script from \"./MessageReplyTextOutline.vue?vue&type=script&lang=js\"\nexport * from \"./MessageReplyTextOutline.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',_vm._b({staticClass:\"material-design-icon message-reply-text-outline-icon\",attrs:{\"aria-hidden\":_vm.title ? null : 'true',\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M9 11H18V13H9V11M18 7H6V9H18V7M22 4V22L18 18H4C2.9 18 2 17.11 2 16V4C2 2.9 2.9 2 4 2H20C21.1 2 22 2.89 22 4M20 4H4V16H18.83L20 17.17V4Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./Refresh.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Refresh.vue?vue&type=script&lang=js\"","\n\n","import { render, staticRenderFns } from \"./Refresh.vue?vue&type=template&id=2864f909\"\nimport script from \"./Refresh.vue?vue&type=script&lang=js\"\nexport * from \"./Refresh.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',_vm._b({staticClass:\"material-design-icon refresh-icon\",attrs:{\"aria-hidden\":_vm.title ? null : 'true',\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c(_vm.tag,{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.deleted && !_vm.isLimbo),expression:\"!deleted && !isLimbo\"}],tag:\"component\",staticClass:\"comment\",class:{ 'comment--loading': _vm.loading }},[_c('div',{staticClass:\"comment__side\"},[_c('NcAvatar',{staticClass:\"comment__avatar\",attrs:{\"display-name\":_vm.actorDisplayName,\"user\":_vm.actorId,\"size\":32}})],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__body\"},[_c('div',{staticClass:\"comment__header\"},[_c('span',{staticClass:\"comment__author\"},[_vm._v(_vm._s(_vm.actorDisplayName))]),_vm._v(\" \"),(_vm.isOwnComment && _vm.id && !_vm.loading)?_c('NcActions',{staticClass:\"comment__actions\"},[(!_vm.editing)?[_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onEdit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconPencilOutline',{attrs:{\"size\":20}})]},proxy:true}],null,false,3345211262)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Edit comment'))+\"\\n\\t\\t\\t\\t\\t\")]),_vm._v(\" \"),_c('NcActionSeparator'),_vm._v(\" \"),_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onDeleteWithUndo},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconTrashCanOutline',{attrs:{\"size\":20}})]},proxy:true}],null,false,1034796883)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Delete comment'))+\"\\n\\t\\t\\t\\t\\t\")])]:_c('NcActionButton',{on:{\"click\":_vm.onEditCancel},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconClose',{attrs:{\"size\":20}})]},proxy:true}],null,false,2888946197)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Cancel edit'))+\"\\n\\t\\t\\t\\t\")])],2):_vm._e(),_vm._v(\" \"),(_vm.id && _vm.loading)?_c('div',{staticClass:\"comment_loading icon-loading-small\"}):(_vm.creationDateTime)?_c('NcDateTime',{staticClass:\"comment__timestamp\",attrs:{\"timestamp\":_vm.timestamp,\"ignore-seconds\":true}}):_vm._e()],1),_vm._v(\" \"),(_vm.editor || _vm.editing)?_c('form',{staticClass:\"comment__editor\",on:{\"submit\":function($event){$event.preventDefault();}}},[_c('div',{staticClass:\"comment__editor-group\"},[_c('NcRichContenteditable',{ref:\"editor\",attrs:{\"auto-complete\":_vm.autoComplete,\"contenteditable\":!_vm.loading,\"label\":_vm.editor ? _vm.t('comments', 'New comment') : _vm.t('comments', 'Edit comment'),\"placeholder\":_vm.t('comments', 'Write a comment …'),\"value\":_vm.localMessage,\"user-data\":_vm.userData,\"aria-describedby\":\"tab-comments__editor-description\"},on:{\"update:value\":_vm.updateLocalMessage,\"submit\":_vm.onSubmit}}),_vm._v(\" \"),_c('div',{staticClass:\"comment__submit\"},[_c('NcButton',{attrs:{\"variant\":\"tertiary-no-background\",\"type\":\"submit\",\"aria-label\":_vm.t('comments', 'Post comment'),\"disabled\":_vm.isEmptyMessage},on:{\"click\":_vm.onSubmit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.loading)?_c('NcLoadingIcon'):_c('IconArrowRight',{attrs:{\"size\":20}})]},proxy:true}],null,false,758946661)})],1)],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__editor-description\",attrs:{\"id\":\"tab-comments__editor-description\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', '@ for mentions, : for emoji, / for smart picker'))+\"\\n\\t\\t\\t\")])]):_c('NcRichText',{staticClass:\"comment__message\",class:{ 'comment__message--expanded': _vm.expanded },attrs:{\"text\":_vm.richContent.message,\"arguments\":_vm.richContent.mentions},nativeOn:{\"click\":function($event){return _vm.onExpand.apply(null, arguments)}}})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\n\n/**\n *\n */\nfunction getRootPath() {\n\treturn generateRemoteUrl('dav/comments')\n}\n\nexport { getRootPath }\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth'\nimport { createClient } from 'webdav'\nimport { getRootPath } from '../utils/davUtils.js'\n\n// init webdav client\nconst client = createClient(getRootPath())\n\n// set CSRF token header\n/**\n * @param token\n */\nfunction setHeaders(token) {\n\tclient.setHeaders({\n\t\t// Add this so the server knows it is an request from the browser\n\t\t'X-Requested-With': 'XMLHttpRequest',\n\t\t// Inject user auth\n\t\trequesttoken: token ?? '',\n\t})\n}\n\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders)\nsetHeaders(getRequestToken())\n\nexport default client\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * @param {any} value -\n * @param {any} passes -\n */\nexport function decodeHtmlEntities(value, passes = 1) {\n\tconst parser = new DOMParser()\n\tlet decoded = value\n\tfor (let i = 0; i < passes; i++) {\n\t\tdecoded = parser.parseFromString(decoded, 'text/html').documentElement.textContent\n\t}\n\treturn decoded\n}\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { defineStore } from 'pinia'\n\nexport const useDeletedCommentLimbo = defineStore('deletedCommentLimbo', {\n\tstate: () => ({\n\t\tidsInLimbo: [],\n\t}),\n\tactions: {\n\t\taddId(id) {\n\t\t\tthis.idsInLimbo.push(id)\n\t\t},\n\n\t\tremoveId(id) {\n\t\t\tconst index = this.idsInLimbo.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.idsInLimbo.splice(index, 1)\n\t\t\t}\n\t\t},\n\n\t\tcheckForId(id) {\n\t\t\treturn this.idsInLimbo.includes(id)\n\t\t},\n\t},\n})\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { showError, showUndo, TOAST_UNDO_TIMEOUT } from '@nextcloud/dialogs'\nimport { mapStores } from 'pinia'\nimport logger from '../logger.js'\nimport DeleteComment from '../services/DeleteComment.js'\nimport EditComment from '../services/EditComment.js'\nimport NewComment from '../services/NewComment.js'\nimport { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'\n\nexport default {\n\tprops: {\n\t\tid: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tresourceId: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\t\tresourceType: {\n\t\t\ttype: String,\n\t\t\tdefault: 'files',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdeleted: false,\n\t\t\tediting: false,\n\t\t\tloading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapStores(useDeletedCommentLimbo),\n\t},\n\n\tmethods: {\n\t\t// EDITION\n\t\tonEdit() {\n\t\t\tthis.editing = true\n\t\t},\n\t\tonEditCancel() {\n\t\t\tthis.editing = false\n\t\t\t// Restore original value\n\t\t\tthis.updateLocalMessage(this.message)\n\t\t},\n\t\tasync onEditComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tawait EditComment(this.resourceType, this.resourceId, this.id, message)\n\t\t\t\tlogger.debug('Comment edited', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id, message })\n\t\t\t\tthis.$emit('update:message', message)\n\t\t\t\tthis.editing = false\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to edit the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to edit the comment', { error })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t// DELETION\n\t\tonDeleteWithUndo() {\n\t\t\tthis.$emit('delete')\n\t\t\tthis.deleted = true\n\t\t\tthis.deletedCommentLimboStore.addId(this.id)\n\t\t\tconst timeOutDelete = setTimeout(this.onDelete, TOAST_UNDO_TIMEOUT)\n\t\t\tshowUndo(t('comments', 'Comment deleted'), () => {\n\t\t\t\tclearTimeout(timeOutDelete)\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t})\n\t\t},\n\t\tasync onDelete() {\n\t\t\ttry {\n\t\t\t\tawait DeleteComment(this.resourceType, this.resourceId, this.id)\n\t\t\t\tlogger.debug('Comment deleted', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id })\n\t\t\t\tthis.$emit('delete', this.id)\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to delete the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to delete the comment', { error })\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t}\n\t\t},\n\n\t\t// CREATION\n\t\tasync onNewComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst newComment = await NewComment(this.resourceType, this.resourceId, message)\n\t\t\t\tlogger.debug('New comment posted', { resourceType: this.resourceType, resourceId: this.resourceId, newComment })\n\t\t\t\tthis.$emit('new', newComment)\n\n\t\t\t\t// Clear old content\n\t\t\t\tthis.$emit('update:message', '')\n\t\t\t\tthis.localMessage = ''\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to create the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to create the comment', { error })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Edit an existing comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n * @param {string} message the message content\n */\nexport default async function(resourceType, resourceId, commentId, message) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\treturn await client.customRequest(commentPath, {\n\t\tmethod: 'PROPPATCH',\n\t\tdata: `\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t${message}\n\t\t\t\t\n\t\t\t\n\t\t\t`,\n\t})\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Delete a comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n */\nexport default async function(resourceType, resourceId, commentId) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\t// Fetch newly created comment data\n\tawait client.deleteFile(commentPath)\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { getRootPath } from '../utils/davUtils.js'\nimport { decodeHtmlEntities } from '../utils/decodeHtmlEntities.js'\nimport client from './DavClient.js'\n\n/**\n * Retrieve the comments list\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {string} message the message\n * @return {object} the new comment\n */\nexport default async function(resourceType, resourceId, message) {\n\tconst resourcePath = ['', resourceType, resourceId].join('/')\n\n\tconst response = await axios.post(getRootPath() + resourcePath, {\n\t\tactorDisplayName: getCurrentUser().displayName,\n\t\tactorId: getCurrentUser().uid,\n\t\tactorType: 'users',\n\t\tcreationDateTime: (new Date()).toUTCString(),\n\t\tmessage,\n\t\tobjectType: resourceType,\n\t\tverb: 'comment',\n\t})\n\n\t// Retrieve comment id from resource location\n\tconst commentId = parseInt(response.headers['content-location'].split('/').pop())\n\tconst commentPath = resourcePath + '/' + commentId\n\n\t// Fetch newly created comment data\n\tconst comment = await client.stat(commentPath, {\n\t\tdetails: true,\n\t})\n\n\tconst props = comment.data.props\n\t// Decode twice to handle potentially double-encoded entities\n\t// FIXME Remove this once https://github.com/nextcloud/server/issues/29306\n\t// is resolved\n\tprops.actorDisplayName = decodeHtmlEntities(props.actorDisplayName, 2)\n\tprops.message = decodeHtmlEntities(props.message, 2)\n\n\treturn comment.data\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"","\n\n\n\n\n\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Comment.vue?vue&type=template&id=4692aa67&scoped=true\"\nimport script from \"./Comment.vue?vue&type=script&lang=js\"\nexport * from \"./Comment.vue?vue&type=script&lang=js\"\nimport style0 from \"./Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4692aa67\",\n null\n \n)\n\nexport default component.exports","import { getCurrentUser } from '@nextcloud/auth';\n/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport axios from '@nextcloud/axios';\nimport { loadState } from '@nextcloud/initial-state';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { defineComponent } from 'vue';\nexport default defineComponent({\n props: {\n resourceId: {\n type: Number,\n required: true,\n },\n resourceType: {\n type: String,\n default: 'files',\n },\n },\n data() {\n return {\n editorData: {\n actorDisplayName: getCurrentUser().displayName,\n actorId: getCurrentUser().uid,\n key: 'editor',\n },\n userData: {},\n };\n },\n methods: {\n /**\n * Autocomplete @mentions\n *\n * @param search the query\n * @param callback the callback to process the results with\n */\n async autoComplete(search, callback) {\n const { data } = await axios.get(generateOcsUrl('core/autocomplete/get'), {\n params: {\n search,\n itemType: 'files',\n itemId: this.resourceId,\n sorter: 'commenters|share-recipients',\n limit: loadState('comments', 'maxAutoCompleteResults'),\n },\n });\n // Save user data so it can be used by the editor to replace mentions\n data.ocs.data.forEach((user) => {\n this.userData[user.id] = user;\n });\n return callback(Object.values(this.userData));\n },\n /**\n * Make sure we have all mentions as Array of objects\n *\n * @param mentions the mentions list\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n genMentionsData(mentions) {\n Object.values(mentions)\n .flat()\n .forEach((mention) => {\n this.userData[mention.mentionId] = {\n // TODO: support groups\n icon: 'icon-user',\n id: mention.mentionId,\n label: mention.mentionDisplayName,\n source: 'users',\n primary: getCurrentUser()?.uid === mention.mentionId,\n };\n });\n return this.userData;\n },\n },\n});\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { parseXML } from 'webdav';\nimport { processResponsePayload } from 'webdav/dist/node/response.js';\nimport { prepareFileFromProps } from 'webdav/dist/node/tools/dav.js';\nimport client from './DavClient.js';\nexport const DEFAULT_LIMIT = 20;\n/**\n * Retrieve the comments list\n *\n * @param data destructuring object\n * @param data.resourceType the resource type\n * @param data.resourceId the resource ID\n * @param [options] optional options for axios\n * @param [options.offset] the pagination offset\n * @param [options.limit] the pagination limit, defaults to 20\n * @param [options.datetime] optional date to query\n * @return the comments list\n */\nexport async function getComments({ resourceType, resourceId }, options) {\n const resourcePath = ['', resourceType, resourceId].join('/');\n const datetime = options.datetime ? `${options.datetime.toISOString()}` : '';\n const response = await client.customRequest(resourcePath, {\n method: 'REPORT',\n data: `\n\t\t\t\n\t\t\t\t${options.limit ?? DEFAULT_LIMIT}\n\t\t\t\t${options.offset || 0}\n\t\t\t\t${datetime}\n\t\t\t`,\n ...options,\n });\n const responseData = await response.text();\n const result = await parseXML(responseData);\n const stat = getDirectoryFiles(result, true);\n // https://github.com/perry-mitchell/webdav-client/issues/339\n return processResponsePayload(response, stat, true);\n}\n/**\n * https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/operations/directoryContents.ts\n *\n * @param result\n * @param isDetailed\n */\nfunction getDirectoryFiles(result, isDetailed = false) {\n // Extract the response items (directory contents)\n const { multistatus: { response: responseItems }, } = result;\n // Map all items to a consistent output structure (results)\n return responseItems.map((item) => {\n // Each item should contain a stat object\n const props = item.propstat.prop;\n return prepareFileFromProps(props, props.id.toString(), isDetailed);\n });\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * Creates a cancelable axios 'request object'.\n *\n * @param {Function} request the axios promise request\n * @return {object}\n */\nfunction cancelableRequest(request) {\n\tconst controller = new AbortController()\n\tconst signal = controller.signal\n\n\t/**\n\t * Execute the request\n\t *\n\t * @param {string} url the url to send the request to\n\t * @param {object} [options] optional config for the request\n\t */\n\tconst fetch = async function(url, options) {\n\t\tconst response = await request(\n\t\t\turl,\n\t\t\t{ signal, ...options },\n\t\t)\n\t\treturn response\n\t}\n\n\treturn {\n\t\trequest: fetch,\n\t\tabort: () => controller.abort(),\n\t}\n}\n\nexport default cancelableRequest\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=script&lang=js\"","\n\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport client from './DavClient.js';\n/**\n * Mark comments older than the date timestamp as read\n *\n * @param resourceType the resource type\n * @param resourceId the resource ID\n * @param date the date object\n */\nexport function markCommentsAsRead(resourceType, resourceId, date) {\n const resourcePath = ['', resourceType, resourceId].join('/');\n const readMarker = date.toUTCString();\n return client.customRequest(resourcePath, {\n method: 'PROPPATCH',\n data: `\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t${readMarker}\n\t\t\t\t\n\t\t\t\n\t\t\t`,\n });\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=style&index=0&id=678ce6fc&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=style&index=0&id=678ce6fc&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Comments.vue?vue&type=template&id=678ce6fc&scoped=true\"\nimport script from \"./Comments.vue?vue&type=script&lang=js\"\nexport * from \"./Comments.vue?vue&type=script&lang=js\"\nimport style0 from \"./Comments.vue?vue&type=style&index=0&id=678ce6fc&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"678ce6fc\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{directives:[{name:\"element-visibility\",rawName:\"v-element-visibility\",value:(_vm.onVisibilityChange),expression:\"onVisibilityChange\"}],staticClass:\"comments\",class:{ 'icon-loading': _vm.isFirstLoading }},[_c('Comment',_vm._b({staticClass:\"comments__writer\",attrs:{\"auto-complete\":_vm.autoComplete,\"resource-type\":_vm.resourceType,\"editor\":true,\"user-data\":_vm.userData,\"resource-id\":_vm.currentResourceId},on:{\"new\":_vm.onNewComment}},'Comment',_vm.editorData,false)),_vm._v(\" \"),(!_vm.isFirstLoading)?[(!_vm.hasComments && _vm.done)?_c('NcEmptyContent',{staticClass:\"comments__empty\",attrs:{\"name\":_vm.t('comments', 'No comments yet, start the conversation!')},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconMessageReplyTextOutline')]},proxy:true}],null,false,326612300)}):_c('ul',_vm._l((_vm.comments),function(comment){return _c('Comment',_vm._b({key:comment.props.id,staticClass:\"comments__list\",attrs:{\"tag\":\"li\",\"auto-complete\":_vm.autoComplete,\"resource-type\":_vm.resourceType,\"message\":comment.props.message,\"resource-id\":_vm.currentResourceId,\"user-data\":_vm.genMentionsData(comment.props.mentions)},on:{\"update:message\":function($event){return _vm.$set(comment.props, \"message\", $event)},\"delete\":_vm.onDelete}},'Comment',comment.props,false))}),1),_vm._v(\" \"),(_vm.loading && !_vm.isFirstLoading)?_c('div',{staticClass:\"comments__info icon-loading\"}):(_vm.hasComments && _vm.done)?_c('div',{staticClass:\"comments__info\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('comments', 'No more messages'))+\"\\n\\t\\t\")]):(_vm.error)?[_c('NcEmptyContent',{staticClass:\"comments__error\",attrs:{\"name\":_vm.error},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconAlertCircleOutline')]},proxy:true}],null,false,3663249556)}),_vm._v(\" \"),_c('NcButton',{staticClass:\"comments__retry\",on:{\"click\":_vm.getComments},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconRefresh')]},proxy:true}],null,false,2997625269)},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Retry'))+\"\\n\\t\\t\\t\")])]:_vm._e()]:_vm._e()],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCSPNonce } from '@nextcloud/auth'\nimport { n, t } from '@nextcloud/l10n'\nimport { createPinia, PiniaVuePlugin } from 'pinia'\nimport Vue from 'vue'\nimport CommentsApp from '../views/Comments.vue'\nimport logger from '../logger.js'\n\nVue.use(PiniaVuePlugin)\n\n__webpack_nonce__ = getCSPNonce()\n\n// Add translates functions\nVue.mixin({\n\tdata() {\n\t\treturn {\n\t\t\tlogger,\n\t\t}\n\t},\n\tmethods: {\n\t\tt,\n\t\tn,\n\t},\n})\n\nexport default class CommentInstance {\n\t/**\n\t * Initialize a new Comments instance for the desired type\n\t *\n\t * @param {string} resourceType the comments endpoint type\n\t * @param {object} options the vue options (propsData, parent, el...)\n\t */\n\tconstructor(resourceType = 'files', options = {}) {\n\t\tconst pinia = createPinia()\n\n\t\t// Merge options and set `resourceType` property\n\t\toptions = {\n\t\t\t...options,\n\t\t\tpropsData: {\n\t\t\t\t...(options.propsData ?? {}),\n\t\t\t\tresourceType,\n\t\t\t},\n\t\t\tpinia,\n\t\t}\n\t\t// Init Comments component\n\t\tconst View = Vue.extend(CommentsApp)\n\t\treturn new View(options)\n\t}\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport logger from './logger.js'\nimport CommentsInstance from './services/CommentsInstance.js'\n\n// Init Comments\nif (window.OCA && !window.OCA.Comments) {\n\tObject.assign(window.OCA, { Comments: {} })\n}\n\n// Init Comments App view\nObject.assign(window.OCA.Comments, { View: CommentsInstance })\nlogger.debug('OCA.Comments.View initialized')\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.comments[data-v-678ce6fc]{min-height:100%;display:flex;flex-direction:column}.comments__empty[data-v-678ce6fc],.comments__error[data-v-678ce6fc]{flex:1 0}.comments__retry[data-v-678ce6fc]{margin:0 auto}.comments__info[data-v-678ce6fc]{height:60px;color:var(--color-text-maxcontrast);text-align:center;line-height:60px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/comments/src/views/Comments.vue\"],\"names\":[],\"mappings\":\"AACA,2BACC,eAAA,CACA,YAAA,CACA,qBAAA,CAEA,oEAEC,QAAA,CAGD,kCACC,aAAA,CAGD,iCACC,WAAA,CACA,mCAAA,CACA,iBAAA,CACA,gBAAA\",\"sourcesContent\":[\"\\n.comments {\\n\\tmin-height: 100%;\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n\\n\\t&__empty,\\n\\t&__error {\\n\\t\\tflex: 1 0;\\n\\t}\\n\\n\\t&__retry {\\n\\t\\tmargin: 0 auto;\\n\\t}\\n\\n\\t&__info {\\n\\t\\theight: 60px;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t\\ttext-align: center;\\n\\t\\tline-height: 60px;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.comment[data-v-4692aa67]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-4692aa67]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-4692aa67]{display:flex;flex-grow:1;flex-direction:column;container-type:inline-size}.comment__header[data-v-4692aa67]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-4692aa67]{margin-inline-start:10px !important}.comment__author[data-v-4692aa67]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-4692aa67],.comment__timestamp[data-v-4692aa67]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-4692aa67]{position:relative}.comment__editor-description[data-v-4692aa67]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-4692aa67]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-4692aa67]{white-space:pre-wrap;word-break:normal;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-4692aa67]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-4692aa67]{min-height:44px;margin:0;padding:10px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/comments/src/components/Comment.vue\"],\"names\":[],\"mappings\":\"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CACA,0BAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,iBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA5EiB\",\"sourcesContent\":[\"\\n@use \\\"sass:math\\\";\\n\\n$comment-padding: 10px;\\n\\n.comment {\\n\\tdisplay: flex;\\n\\tgap: 8px;\\n\\tpadding: 5px $comment-padding;\\n\\n\\t&__side {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: flex-start;\\n\\t\\tpadding-top: 6px;\\n\\t}\\n\\n\\t&__body {\\n\\t\\tdisplay: flex;\\n\\t\\tflex-grow: 1;\\n\\t\\tflex-direction: column;\\n\\t\\tcontainer-type: inline-size;\\n\\t}\\n\\n\\t&__header {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t\\tmin-height: 44px;\\n\\t}\\n\\n\\t&__actions {\\n\\t\\tmargin-inline-start: $comment-padding !important;\\n\\t}\\n\\n\\t&__author {\\n\\t\\toverflow: hidden;\\n\\t\\twhite-space: nowrap;\\n\\t\\ttext-overflow: ellipsis;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&_loading,\\n\\t&__timestamp {\\n\\t\\tmargin-inline-start: auto;\\n\\t\\ttext-align: end;\\n\\t\\twhite-space: nowrap;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&__editor-group {\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t&__editor-description {\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t\\tpadding-block: var(--default-grid-baseline);\\n\\t}\\n\\n\\t&__submit {\\n\\t\\tposition: absolute !important;\\n\\t\\tbottom: 5px;\\n\\t\\tinset-inline-end: 0;\\n\\t}\\n\\n\\t&__message {\\n\\t\\twhite-space: pre-wrap;\\n\\t\\tword-break: normal;\\n\\t\\tmax-height: 70px;\\n\\t\\toverflow: hidden;\\n\\t\\tmargin-top: -6px;\\n\\t\\t&--expanded {\\n\\t\\t\\tmax-height: none;\\n\\t\\t\\toverflow: visible;\\n\\t\\t}\\n\\t}\\n}\\n\\n.rich-contenteditable__input {\\n\\tmin-height: 44px;\\n\\tmargin: 0;\\n\\tpadding: $comment-padding;\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"640\":\"c5cc8d7f0213aa827c54\",\"3564\":\"29e8338d43e0d4bd3995\",\"4508\":\"55b817403e13f27fae56\",\"5528\":\"d0a4ad859a898dce471a\",\"5810\":\"b550a24d46f75f92c2d5\",\"5862\":\"4ca96c4f928b038599cf\",\"7471\":\"6423b9b898ffefeb7d1d\",\"7615\":\"05564da6cf58bf2e44eb\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 7062;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = (document && document.baseURI) || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t7062: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(1598)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","getLoggerBuilder","setApp","detectUser","build","name","emits","props","title","type","String","fillColor","default","size","Number","_vm","this","_c","_self","_b","staticClass","attrs","on","$event","$emit","$attrs","_v","_s","_e","getRootPath","generateRemoteUrl","client","createClient","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","decodeHtmlEntities","value","passes","arguments","length","undefined","parser","DOMParser","decoded","i","parseFromString","documentElement","textContent","useDeletedCommentLimbo","defineStore","state","idsInLimbo","actions","addId","id","push","removeId","index","indexOf","splice","checkForId","includes","message","resourceId","required","resourceType","data","deleted","editing","loading","computed","mapStores","methods","onEdit","onEditCancel","updateLocalMessage","onEditComment","async","commentId","commentPath","join","customRequest","method","EditComment","logger","debug","error","showError","t","onDeleteWithUndo","deletedCommentLimboStore","timeOutDelete","setTimeout","onDelete","TOAST_UNDO_TIMEOUT","showUndo","clearTimeout","deleteFile","DeleteComment","onNewComment","newComment","resourcePath","response","axios","post","actorDisplayName","getCurrentUser","displayName","actorId","uid","actorType","creationDateTime","Date","toUTCString","objectType","verb","parseInt","headers","split","pop","comment","stat","details","NewComment","localMessage","components","IconArrowRight","IconClose","IconTrashCanOutline","IconPencilOutline","NcActionButton","NcActions","NcActionSeparator","NcAvatar","NcButton","NcDateTime","NcLoadingIcon","NcRichContenteditable","NcRichText","mixins","CommentMixin","inheritAttrs","editor","Boolean","autoComplete","Function","userData","Object","tag","expanded","submitted","isOwnComment","richContent","mentions","keys","forEach","user","key","regex","RegExp","replace","component","NcUserBubble","label","primary","isEmptyMessage","trim","timestamp","parse","isLimbo","watch","beforeMount","toString","onSubmit","$nextTick","$refs","$el","focus","onExpand","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","directives","rawName","expression","class","scopedSlots","_u","fn","proxy","preventDefault","ref","nativeOn","apply","defineComponent","editorData","search","callback","get","generateOcsUrl","params","itemType","itemId","sorter","limit","loadState","ocs","values","genMentionsData","flat","mention","mentionId","icon","mentionDisplayName","source","getComments","_ref","datetime","toISOString","offset","responseData","text","result","isDetailed","multistatus","responseItems","map","item","propstat","prop","prepareFileFromProps","getDirectoryFiles","parseXML","processResponsePayload","Comment","NcEmptyContent","IconRefresh","IconMessageReplyTextOutline","IconAlertCircleOutline","elementVisibility","CommentView","done","currentResourceId","comments","cancelRequest","hasComments","isFirstLoading","onVisibilityChange","isVisible","date","readMarker","markCommentsAsRead","e","update","resetState","onScrollBottomReached","request","abort","controller","AbortController","signal","url","cancelableRequest","unshift","findIndex","_l","$set","Vue","use","PiniaVuePlugin","__webpack_nonce__","getCSPNonce","mixin","n","window","OCA","Comments","assign","View","constructor","pinia","createPinia","propsData","extend","CommentsApp","___CSS_LOADER_EXPORT___","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","call","m","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","every","r","getter","__esModule","d","a","definition","o","defineProperty","enumerable","f","chunkId","Promise","all","reduce","promises","u","g","globalThis","obj","prototype","hasOwnProperty","l","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","timeout","doneFns","parentNode","removeChild","bind","target","head","appendChild","Symbol","toStringTag","nmd","paths","children","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","p","b","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","reject","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"comments-comments-app.js?v=78817cd20a1e861f825b","mappings":"UAAIA,ECAAC,EACAC,E,6CCMJ,SAAeC,E,SAAAA,MACbC,OAAO,YACPC,aACAC,Q,uGCUF,MCpB0H,EDoB1H,CACEC,KAAM,8BACNC,MAAO,CAAC,SACRC,MAAO,CACLC,MAAO,CACLC,KAAMC,QAERC,UAAW,CACTF,KAAMC,OACNE,QAAS,gBAEXC,KAAM,CACJJ,KAAMK,OACNF,QAAS,M,eEff,SAXgB,OACd,ECRW,WAAkB,IAAIG,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,OAAOF,EAAII,GAAG,CAACC,Y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AYzF,IAGhD,GAAG0F,EAAS,IAAI5J,EAAS4J,EAAQ3F,EAClC,CAEA,IADGyF,GAA4BA,EAA2B3T,GACrDtB,EAAIiQ,EAAStQ,OAAQK,IACzBkR,EAAUjB,EAASjQ,GAChBwP,EAAoBsB,EAAE2D,EAAiBvD,IAAYuD,EAAgBvD,IACrEuD,EAAgBvD,GAAS,KAE1BuD,EAAgBvD,GAAW,EAE5B,OAAO1B,EAAoBQ,EAAEzE,IAG1B8J,EAAqBd,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1Fc,EAAmBtO,QAAQiO,EAAqB7B,KAAK,KAAM,IAC3DkC,EAAmB1U,KAAOqU,EAAqB7B,KAAK,KAAMkC,EAAmB1U,KAAKwS,KAAKkC,G,KCvFvF7F,EAAoB+C,QAAK3S,ECGzB,IAAI0V,EAAsB9F,EAAoBQ,OAAEpQ,EAAW,CAAC,MAAO,IAAO4P,EAAoB,QAC9F8F,EAAsB9F,EAAoBQ,EAAEsF,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/comments/src/logger.js","webpack:///nextcloud/node_modules/vue-material-design-icons/MessageReplyTextOutline.vue","webpack:///nextcloud/node_modules/vue-material-design-icons/MessageReplyTextOutline.vue?vue&type=script&lang=js","webpack://nextcloud/./node_modules/vue-material-design-icons/MessageReplyTextOutline.vue?87e1","webpack:///nextcloud/node_modules/vue-material-design-icons/MessageReplyTextOutline.vue?vue&type=template&id=5d6c4e92","webpack:///nextcloud/node_modules/vue-material-design-icons/Refresh.vue?vue&type=script&lang=js","webpack:///nextcloud/node_modules/vue-material-design-icons/Refresh.vue","webpack://nextcloud/./node_modules/vue-material-design-icons/Refresh.vue?0940","webpack:///nextcloud/node_modules/vue-material-design-icons/Refresh.vue?vue&type=template&id=2864f909","webpack://nextcloud/./apps/comments/src/components/Comment.vue?d1f7","webpack:///nextcloud/apps/comments/src/utils/davUtils.js","webpack:///nextcloud/apps/comments/src/services/DavClient.js","webpack:///nextcloud/apps/comments/src/utils/decodeHtmlEntities.js","webpack:///nextcloud/apps/comments/src/store/deletedCommentLimbo.js","webpack:///nextcloud/apps/comments/src/mixins/CommentMixin.js","webpack:///nextcloud/apps/comments/src/services/EditComment.js","webpack:///nextcloud/apps/comments/src/services/DeleteComment.js","webpack:///nextcloud/apps/comments/src/services/NewComment.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=script&lang=js","webpack:///nextcloud/apps/comments/src/components/Comment.vue","webpack://nextcloud/./apps/comments/src/components/Comment.vue?07dd","webpack://nextcloud/./apps/comments/src/components/Comment.vue?7f26","webpack:///nextcloud/apps/comments/src/mixins/CommentView.ts","webpack:///nextcloud/apps/comments/src/services/GetComments.ts","webpack:///nextcloud/apps/comments/src/utils/cancelableRequest.js","webpack:///nextcloud/apps/comments/src/views/Comments.vue?vue&type=script&lang=js","webpack:///nextcloud/apps/comments/src/views/Comments.vue","webpack:///nextcloud/apps/comments/src/services/ReadComments.ts","webpack://nextcloud/./apps/comments/src/views/Comments.vue?4d55","webpack://nextcloud/./apps/comments/src/views/Comments.vue?f45b","webpack://nextcloud/./apps/comments/src/views/Comments.vue?0e41","webpack:///nextcloud/apps/comments/src/services/CommentsInstance.js","webpack:///nextcloud/apps/comments/src/comments-app.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true","webpack:///nextcloud/apps/comments/src/views/Comments.vue?vue&type=style&index=0&id=6c8c157a&prod&lang=scss&scoped=true","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('comments')\n\t.detectUser()\n\t.build()\n","\n\n","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./MessageReplyTextOutline.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./MessageReplyTextOutline.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./MessageReplyTextOutline.vue?vue&type=template&id=5d6c4e92\"\nimport script from \"./MessageReplyTextOutline.vue?vue&type=script&lang=js\"\nexport * from \"./MessageReplyTextOutline.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',_vm._b({staticClass:\"material-design-icon message-reply-text-outline-icon\",attrs:{\"aria-hidden\":_vm.title ? null : 'true',\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M9 11H18V13H9V11M18 7H6V9H18V7M22 4V22L18 18H4C2.9 18 2 17.11 2 16V4C2 2.9 2.9 2 4 2H20C21.1 2 22 2.89 22 4M20 4H4V16H18.83L20 17.17V4Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./Refresh.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Refresh.vue?vue&type=script&lang=js\"","\n\n","import { render, staticRenderFns } from \"./Refresh.vue?vue&type=template&id=2864f909\"\nimport script from \"./Refresh.vue?vue&type=script&lang=js\"\nexport * from \"./Refresh.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',_vm._b({staticClass:\"material-design-icon refresh-icon\",attrs:{\"aria-hidden\":_vm.title ? null : 'true',\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c(_vm.tag,{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.deleted && !_vm.isLimbo),expression:\"!deleted && !isLimbo\"}],tag:\"component\",staticClass:\"comment\",class:{ 'comment--loading': _vm.loading }},[_c('div',{staticClass:\"comment__side\"},[_c('NcAvatar',{staticClass:\"comment__avatar\",attrs:{\"display-name\":_vm.actorDisplayName,\"user\":_vm.actorId,\"size\":32}})],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__body\"},[_c('div',{staticClass:\"comment__header\"},[_c('span',{staticClass:\"comment__author\"},[_vm._v(_vm._s(_vm.actorDisplayName))]),_vm._v(\" \"),(_vm.isOwnComment && _vm.id && !_vm.loading)?_c('NcActions',{staticClass:\"comment__actions\"},[(!_vm.editing)?[_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onEdit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconPencilOutline',{attrs:{\"size\":20}})]},proxy:true}],null,false,3345211262)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Edit comment'))+\"\\n\\t\\t\\t\\t\\t\")]),_vm._v(\" \"),_c('NcActionSeparator'),_vm._v(\" \"),_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onDeleteWithUndo},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconTrashCanOutline',{attrs:{\"size\":20}})]},proxy:true}],null,false,1034796883)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Delete comment'))+\"\\n\\t\\t\\t\\t\\t\")])]:_c('NcActionButton',{on:{\"click\":_vm.onEditCancel},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconClose',{attrs:{\"size\":20}})]},proxy:true}],null,false,2888946197)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Cancel edit'))+\"\\n\\t\\t\\t\\t\")])],2):_vm._e(),_vm._v(\" \"),(_vm.id && _vm.loading)?_c('div',{staticClass:\"comment_loading icon-loading-small\"}):(_vm.creationDateTime)?_c('NcDateTime',{staticClass:\"comment__timestamp\",attrs:{\"timestamp\":_vm.timestamp,\"ignore-seconds\":true}}):_vm._e()],1),_vm._v(\" \"),(_vm.editor || _vm.editing)?_c('form',{staticClass:\"comment__editor\",on:{\"submit\":function($event){$event.preventDefault();}}},[_c('div',{staticClass:\"comment__editor-group\"},[_c('NcRichContenteditable',{ref:\"editor\",attrs:{\"auto-complete\":_vm.autoComplete,\"contenteditable\":!_vm.loading,\"label\":_vm.editor ? _vm.t('comments', 'New comment') : _vm.t('comments', 'Edit comment'),\"placeholder\":_vm.t('comments', 'Write a comment …'),\"value\":_vm.localMessage,\"user-data\":_vm.userData,\"aria-describedby\":\"tab-comments__editor-description\"},on:{\"update:value\":_vm.updateLocalMessage,\"submit\":_vm.onSubmit}}),_vm._v(\" \"),_c('div',{staticClass:\"comment__submit\"},[_c('NcButton',{attrs:{\"variant\":\"tertiary-no-background\",\"type\":\"submit\",\"aria-label\":_vm.t('comments', 'Post comment'),\"disabled\":_vm.isEmptyMessage},on:{\"click\":_vm.onSubmit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.loading)?_c('NcLoadingIcon'):_c('IconArrowRight',{attrs:{\"size\":20}})]},proxy:true}],null,false,758946661)})],1)],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__editor-description\",attrs:{\"id\":\"tab-comments__editor-description\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', '@ for mentions, : for emoji, / for smart picker'))+\"\\n\\t\\t\\t\")])]):_c('NcRichText',{staticClass:\"comment__message\",class:{ 'comment__message--expanded': _vm.expanded },attrs:{\"text\":_vm.richContent.message,\"arguments\":_vm.richContent.mentions},nativeOn:{\"click\":function($event){return _vm.onExpand.apply(null, arguments)}}})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\n\n/**\n *\n */\nfunction getRootPath() {\n\treturn generateRemoteUrl('dav/comments')\n}\n\nexport { getRootPath }\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth'\nimport { createClient } from 'webdav'\nimport { getRootPath } from '../utils/davUtils.js'\n\n// init webdav client\nconst client = createClient(getRootPath())\n\n// set CSRF token header\n/**\n * @param token\n */\nfunction setHeaders(token) {\n\tclient.setHeaders({\n\t\t// Add this so the server knows it is an request from the browser\n\t\t'X-Requested-With': 'XMLHttpRequest',\n\t\t// Inject user auth\n\t\trequesttoken: token ?? '',\n\t})\n}\n\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders)\nsetHeaders(getRequestToken())\n\nexport default client\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * @param {any} value -\n * @param {any} passes -\n */\nexport function decodeHtmlEntities(value, passes = 1) {\n\tconst parser = new DOMParser()\n\tlet decoded = value\n\tfor (let i = 0; i < passes; i++) {\n\t\tdecoded = parser.parseFromString(decoded, 'text/html').documentElement.textContent\n\t}\n\treturn decoded\n}\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { defineStore } from 'pinia'\n\nexport const useDeletedCommentLimbo = defineStore('deletedCommentLimbo', {\n\tstate: () => ({\n\t\tidsInLimbo: [],\n\t}),\n\tactions: {\n\t\taddId(id) {\n\t\t\tthis.idsInLimbo.push(id)\n\t\t},\n\n\t\tremoveId(id) {\n\t\t\tconst index = this.idsInLimbo.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.idsInLimbo.splice(index, 1)\n\t\t\t}\n\t\t},\n\n\t\tcheckForId(id) {\n\t\t\treturn this.idsInLimbo.includes(id)\n\t\t},\n\t},\n})\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { showError, showUndo, TOAST_UNDO_TIMEOUT } from '@nextcloud/dialogs'\nimport { mapStores } from 'pinia'\nimport logger from '../logger.js'\nimport DeleteComment from '../services/DeleteComment.js'\nimport EditComment from '../services/EditComment.js'\nimport NewComment from '../services/NewComment.js'\nimport { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'\n\nexport default {\n\tprops: {\n\t\tid: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tresourceId: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\t\tresourceType: {\n\t\t\ttype: String,\n\t\t\tdefault: 'files',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdeleted: false,\n\t\t\tediting: false,\n\t\t\tloading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapStores(useDeletedCommentLimbo),\n\t},\n\n\tmethods: {\n\t\t// EDITION\n\t\tonEdit() {\n\t\t\tthis.editing = true\n\t\t},\n\t\tonEditCancel() {\n\t\t\tthis.editing = false\n\t\t\t// Restore original value\n\t\t\tthis.updateLocalMessage(this.message)\n\t\t},\n\t\tasync onEditComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tawait EditComment(this.resourceType, this.resourceId, this.id, message)\n\t\t\t\tlogger.debug('Comment edited', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id, message })\n\t\t\t\tthis.$emit('update:message', message)\n\t\t\t\tthis.editing = false\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to edit the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to edit the comment', { error })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t// DELETION\n\t\tonDeleteWithUndo() {\n\t\t\tthis.$emit('delete')\n\t\t\tthis.deleted = true\n\t\t\tthis.deletedCommentLimboStore.addId(this.id)\n\t\t\tconst timeOutDelete = setTimeout(this.onDelete, TOAST_UNDO_TIMEOUT)\n\t\t\tshowUndo(t('comments', 'Comment deleted'), () => {\n\t\t\t\tclearTimeout(timeOutDelete)\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t})\n\t\t},\n\t\tasync onDelete() {\n\t\t\ttry {\n\t\t\t\tawait DeleteComment(this.resourceType, this.resourceId, this.id)\n\t\t\t\tlogger.debug('Comment deleted', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id })\n\t\t\t\tthis.$emit('delete', this.id)\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to delete the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to delete the comment', { error })\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t}\n\t\t},\n\n\t\t// CREATION\n\t\tasync onNewComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst newComment = await NewComment(this.resourceType, this.resourceId, message)\n\t\t\t\tlogger.debug('New comment posted', { resourceType: this.resourceType, resourceId: this.resourceId, newComment })\n\t\t\t\tthis.$emit('new', newComment)\n\n\t\t\t\t// Clear old content\n\t\t\t\tthis.$emit('update:message', '')\n\t\t\t\tthis.localMessage = ''\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to create the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to create the comment', { error })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Edit an existing comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n * @param {string} message the message content\n */\nexport default async function(resourceType, resourceId, commentId, message) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\treturn await client.customRequest(commentPath, {\n\t\tmethod: 'PROPPATCH',\n\t\tdata: `\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t${message}\n\t\t\t\t\n\t\t\t\n\t\t\t`,\n\t})\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Delete a comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n */\nexport default async function(resourceType, resourceId, commentId) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\t// Fetch newly created comment data\n\tawait client.deleteFile(commentPath)\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { getRootPath } from '../utils/davUtils.js'\nimport { decodeHtmlEntities } from '../utils/decodeHtmlEntities.js'\nimport client from './DavClient.js'\n\n/**\n * Retrieve the comments list\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {string} message the message\n * @return {object} the new comment\n */\nexport default async function(resourceType, resourceId, message) {\n\tconst resourcePath = ['', resourceType, resourceId].join('/')\n\n\tconst response = await axios.post(getRootPath() + resourcePath, {\n\t\tactorDisplayName: getCurrentUser().displayName,\n\t\tactorId: getCurrentUser().uid,\n\t\tactorType: 'users',\n\t\tcreationDateTime: (new Date()).toUTCString(),\n\t\tmessage,\n\t\tobjectType: resourceType,\n\t\tverb: 'comment',\n\t})\n\n\t// Retrieve comment id from resource location\n\tconst commentId = parseInt(response.headers['content-location'].split('/').pop())\n\tconst commentPath = resourcePath + '/' + commentId\n\n\t// Fetch newly created comment data\n\tconst comment = await client.stat(commentPath, {\n\t\tdetails: true,\n\t})\n\n\tconst props = comment.data.props\n\t// Decode twice to handle potentially double-encoded entities\n\t// FIXME Remove this once https://github.com/nextcloud/server/issues/29306\n\t// is resolved\n\tprops.actorDisplayName = decodeHtmlEntities(props.actorDisplayName, 2)\n\tprops.message = decodeHtmlEntities(props.message, 2)\n\n\treturn comment.data\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"","\n\n\n\n\n\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Comment.vue?vue&type=template&id=4692aa67&scoped=true\"\nimport script from \"./Comment.vue?vue&type=script&lang=js\"\nexport * from \"./Comment.vue?vue&type=script&lang=js\"\nimport style0 from \"./Comment.vue?vue&type=style&index=0&id=4692aa67&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4692aa67\",\n null\n \n)\n\nexport default component.exports","import { getCurrentUser } from '@nextcloud/auth';\n/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport axios from '@nextcloud/axios';\nimport { loadState } from '@nextcloud/initial-state';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { defineComponent } from 'vue';\nexport default defineComponent({\n props: {\n resourceId: {\n type: Number,\n required: true,\n },\n resourceType: {\n type: String,\n default: 'files',\n },\n },\n data() {\n return {\n editorData: {\n actorDisplayName: getCurrentUser().displayName,\n actorId: getCurrentUser().uid,\n key: 'editor',\n },\n userData: {},\n currentResourceId: this.resourceId,\n };\n },\n methods: {\n /**\n * Autocomplete @mentions\n *\n * @param search the query\n * @param callback the callback to process the results with\n */\n async autoComplete(search, callback) {\n const { data } = await axios.get(generateOcsUrl('core/autocomplete/get'), {\n params: {\n search,\n itemType: this.resourceType,\n itemId: this.currentResourceId,\n sorter: 'commenters|share-recipients',\n limit: loadState('comments', 'maxAutoCompleteResults'),\n },\n });\n // Save user data so it can be used by the editor to replace mentions\n data.ocs.data.forEach((user) => {\n this.userData[user.id] = user;\n });\n return callback(Object.values(this.userData));\n },\n /**\n * Make sure we have all mentions as Array of objects\n *\n * @param mentions the mentions list\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n genMentionsData(mentions) {\n Object.values(mentions)\n .flat()\n .forEach((mention) => {\n this.userData[mention.mentionId] = {\n // TODO: support groups\n icon: 'icon-user',\n id: mention.mentionId,\n label: mention.mentionDisplayName,\n source: 'users',\n primary: getCurrentUser()?.uid === mention.mentionId,\n };\n });\n return this.userData;\n },\n },\n});\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { parseXML } from 'webdav';\nimport { processResponsePayload } from 'webdav/dist/node/response.js';\nimport { prepareFileFromProps } from 'webdav/dist/node/tools/dav.js';\nimport client from './DavClient.js';\nexport const DEFAULT_LIMIT = 20;\n/**\n * Retrieve the comments list\n *\n * @param data destructuring object\n * @param data.resourceType the resource type\n * @param data.resourceId the resource ID\n * @param [options] optional options for axios\n * @param [options.offset] the pagination offset\n * @param [options.limit] the pagination limit, defaults to 20\n * @param [options.datetime] optional date to query\n * @return the comments list\n */\nexport async function getComments({ resourceType, resourceId }, options) {\n const resourcePath = ['', resourceType, resourceId].join('/');\n const datetime = options.datetime ? `${options.datetime.toISOString()}` : '';\n const response = await client.customRequest(resourcePath, {\n method: 'REPORT',\n data: `\n\t\t\t\n\t\t\t\t${options.limit ?? DEFAULT_LIMIT}\n\t\t\t\t${options.offset || 0}\n\t\t\t\t${datetime}\n\t\t\t`,\n ...options,\n });\n const responseData = await response.text();\n const result = await parseXML(responseData);\n const stat = getDirectoryFiles(result, true);\n // https://github.com/perry-mitchell/webdav-client/issues/339\n return processResponsePayload(response, stat, true);\n}\n/**\n * https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/operations/directoryContents.ts\n *\n * @param result\n * @param isDetailed\n */\nfunction getDirectoryFiles(result, isDetailed = false) {\n // Extract the response items (directory contents)\n const { multistatus: { response: responseItems }, } = result;\n // Map all items to a consistent output structure (results)\n return responseItems.map((item) => {\n // Each item should contain a stat object\n const props = item.propstat.prop;\n return prepareFileFromProps(props, props.id.toString(), isDetailed);\n });\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * Creates a cancelable axios 'request object'.\n *\n * @param {Function} request the axios promise request\n * @return {object}\n */\nfunction cancelableRequest(request) {\n\tconst controller = new AbortController()\n\tconst signal = controller.signal\n\n\t/**\n\t * Execute the request\n\t *\n\t * @param {string} url the url to send the request to\n\t * @param {object} [options] optional config for the request\n\t */\n\tconst fetch = async function(url, options) {\n\t\tconst response = await request(\n\t\t\turl,\n\t\t\t{ signal, ...options },\n\t\t)\n\t\treturn response\n\t}\n\n\treturn {\n\t\trequest: fetch,\n\t\tabort: () => controller.abort(),\n\t}\n}\n\nexport default cancelableRequest\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=script&lang=js\"","\n\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport client from './DavClient.js';\n/**\n * Mark comments older than the date timestamp as read\n *\n * @param resourceType the resource type\n * @param resourceId the resource ID\n * @param date the date object\n */\nexport function markCommentsAsRead(resourceType, resourceId, date) {\n const resourcePath = ['', resourceType, resourceId].join('/');\n const readMarker = date.toUTCString();\n return client.customRequest(resourcePath, {\n method: 'PROPPATCH',\n data: `\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t${readMarker}\n\t\t\t\t\n\t\t\t\n\t\t\t`,\n });\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=style&index=0&id=6c8c157a&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=style&index=0&id=6c8c157a&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Comments.vue?vue&type=template&id=6c8c157a&scoped=true\"\nimport script from \"./Comments.vue?vue&type=script&lang=js\"\nexport * from \"./Comments.vue?vue&type=script&lang=js\"\nimport style0 from \"./Comments.vue?vue&type=style&index=0&id=6c8c157a&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6c8c157a\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{directives:[{name:\"element-visibility\",rawName:\"v-element-visibility\",value:(_vm.onVisibilityChange),expression:\"onVisibilityChange\"}],staticClass:\"comments\",class:{ 'icon-loading': _vm.isFirstLoading }},[_c('Comment',_vm._b({staticClass:\"comments__writer\",attrs:{\"auto-complete\":_vm.autoComplete,\"resource-type\":_vm.resourceType,\"editor\":true,\"user-data\":_vm.userData,\"resource-id\":_vm.currentResourceId},on:{\"new\":_vm.onNewComment}},'Comment',_vm.editorData,false)),_vm._v(\" \"),(!_vm.isFirstLoading)?[(!_vm.hasComments && _vm.done)?_c('NcEmptyContent',{staticClass:\"comments__empty\",attrs:{\"name\":_vm.t('comments', 'No comments yet, start the conversation!')},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconMessageReplyTextOutline')]},proxy:true}],null,false,326612300)}):_c('ul',_vm._l((_vm.comments),function(comment){return _c('Comment',_vm._b({key:comment.props.id,staticClass:\"comments__list\",attrs:{\"tag\":\"li\",\"auto-complete\":_vm.autoComplete,\"resource-type\":_vm.resourceType,\"message\":comment.props.message,\"resource-id\":_vm.currentResourceId,\"user-data\":_vm.genMentionsData(comment.props.mentions)},on:{\"update:message\":function($event){return _vm.$set(comment.props, \"message\", $event)},\"delete\":_vm.onDelete}},'Comment',comment.props,false))}),1),_vm._v(\" \"),(_vm.loading && !_vm.isFirstLoading)?_c('div',{staticClass:\"comments__info icon-loading\"}):(_vm.hasComments && _vm.done)?_c('div',{staticClass:\"comments__info\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('comments', 'No more messages'))+\"\\n\\t\\t\")]):(_vm.error)?[_c('NcEmptyContent',{staticClass:\"comments__error\",attrs:{\"name\":_vm.error},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconAlertCircleOutline')]},proxy:true}],null,false,3663249556)}),_vm._v(\" \"),_c('NcButton',{staticClass:\"comments__retry\",on:{\"click\":_vm.getComments},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconRefresh')]},proxy:true}],null,false,2997625269)},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Retry'))+\"\\n\\t\\t\\t\")])]:_vm._e()]:_vm._e()],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCSPNonce } from '@nextcloud/auth'\nimport { n, t } from '@nextcloud/l10n'\nimport { createPinia, PiniaVuePlugin } from 'pinia'\nimport Vue from 'vue'\nimport CommentsApp from '../views/Comments.vue'\nimport logger from '../logger.js'\n\nVue.use(PiniaVuePlugin)\n\n__webpack_nonce__ = getCSPNonce()\n\n// Add translates functions\nVue.mixin({\n\tdata() {\n\t\treturn {\n\t\t\tlogger,\n\t\t}\n\t},\n\tmethods: {\n\t\tt,\n\t\tn,\n\t},\n})\n\nexport default class CommentInstance {\n\t/**\n\t * Initialize a new Comments instance for the desired type\n\t *\n\t * @param {string} resourceType the comments endpoint type\n\t * @param {object} options the vue options (propsData, parent, el...)\n\t */\n\tconstructor(resourceType = 'files', options = {}) {\n\t\tconst pinia = createPinia()\n\n\t\t// Merge options and set `resourceType` property\n\t\toptions = {\n\t\t\t...options,\n\t\t\tpropsData: {\n\t\t\t\t...(options.propsData ?? {}),\n\t\t\t\tresourceType,\n\t\t\t},\n\t\t\tpinia,\n\t\t}\n\t\t// Init Comments component\n\t\tconst View = Vue.extend(CommentsApp)\n\t\treturn new View(options)\n\t}\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport logger from './logger.js'\nimport CommentsInstance from './services/CommentsInstance.js'\n\n// Init Comments\nif (window.OCA && !window.OCA.Comments) {\n\tObject.assign(window.OCA, { Comments: {} })\n}\n\n// Init Comments App view\nObject.assign(window.OCA.Comments, { View: CommentsInstance })\nlogger.debug('OCA.Comments.View initialized')\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.comment[data-v-4692aa67]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-4692aa67]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-4692aa67]{display:flex;flex-grow:1;flex-direction:column;container-type:inline-size}.comment__header[data-v-4692aa67]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-4692aa67]{margin-inline-start:10px !important}.comment__author[data-v-4692aa67]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-4692aa67],.comment__timestamp[data-v-4692aa67]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-4692aa67]{position:relative}.comment__editor-description[data-v-4692aa67]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-4692aa67]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-4692aa67]{white-space:pre-wrap;word-break:normal;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-4692aa67]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-4692aa67]{min-height:44px;margin:0;padding:10px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/comments/src/components/Comment.vue\"],\"names\":[],\"mappings\":\"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CACA,0BAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,iBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA5EiB\",\"sourcesContent\":[\"\\n@use \\\"sass:math\\\";\\n\\n$comment-padding: 10px;\\n\\n.comment {\\n\\tdisplay: flex;\\n\\tgap: 8px;\\n\\tpadding: 5px $comment-padding;\\n\\n\\t&__side {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: flex-start;\\n\\t\\tpadding-top: 6px;\\n\\t}\\n\\n\\t&__body {\\n\\t\\tdisplay: flex;\\n\\t\\tflex-grow: 1;\\n\\t\\tflex-direction: column;\\n\\t\\tcontainer-type: inline-size;\\n\\t}\\n\\n\\t&__header {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t\\tmin-height: 44px;\\n\\t}\\n\\n\\t&__actions {\\n\\t\\tmargin-inline-start: $comment-padding !important;\\n\\t}\\n\\n\\t&__author {\\n\\t\\toverflow: hidden;\\n\\t\\twhite-space: nowrap;\\n\\t\\ttext-overflow: ellipsis;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&_loading,\\n\\t&__timestamp {\\n\\t\\tmargin-inline-start: auto;\\n\\t\\ttext-align: end;\\n\\t\\twhite-space: nowrap;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&__editor-group {\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t&__editor-description {\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t\\tpadding-block: var(--default-grid-baseline);\\n\\t}\\n\\n\\t&__submit {\\n\\t\\tposition: absolute !important;\\n\\t\\tbottom: 5px;\\n\\t\\tinset-inline-end: 0;\\n\\t}\\n\\n\\t&__message {\\n\\t\\twhite-space: pre-wrap;\\n\\t\\tword-break: normal;\\n\\t\\tmax-height: 70px;\\n\\t\\toverflow: hidden;\\n\\t\\tmargin-top: -6px;\\n\\t\\t&--expanded {\\n\\t\\t\\tmax-height: none;\\n\\t\\t\\toverflow: visible;\\n\\t\\t}\\n\\t}\\n}\\n\\n.rich-contenteditable__input {\\n\\tmin-height: 44px;\\n\\tmargin: 0;\\n\\tpadding: $comment-padding;\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.comments[data-v-6c8c157a]{min-height:100%;display:flex;flex-direction:column}.comments__empty[data-v-6c8c157a],.comments__error[data-v-6c8c157a]{flex:1 0}.comments__retry[data-v-6c8c157a]{margin:0 auto}.comments__info[data-v-6c8c157a]{height:60px;color:var(--color-text-maxcontrast);text-align:center;line-height:60px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/comments/src/views/Comments.vue\"],\"names\":[],\"mappings\":\"AACA,2BACC,eAAA,CACA,YAAA,CACA,qBAAA,CAEA,oEAEC,QAAA,CAGD,kCACC,aAAA,CAGD,iCACC,WAAA,CACA,mCAAA,CACA,iBAAA,CACA,gBAAA\",\"sourcesContent\":[\"\\n.comments {\\n\\tmin-height: 100%;\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n\\n\\t&__empty,\\n\\t&__error {\\n\\t\\tflex: 1 0;\\n\\t}\\n\\n\\t&__retry {\\n\\t\\tmargin: 0 auto;\\n\\t}\\n\\n\\t&__info {\\n\\t\\theight: 60px;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t\\ttext-align: center;\\n\\t\\tline-height: 60px;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"640\":\"c5cc8d7f0213aa827c54\",\"3564\":\"29e8338d43e0d4bd3995\",\"4508\":\"55b817403e13f27fae56\",\"5528\":\"d0a4ad859a898dce471a\",\"5810\":\"b550a24d46f75f92c2d5\",\"5862\":\"4ca96c4f928b038599cf\",\"7471\":\"6423b9b898ffefeb7d1d\",\"7615\":\"05564da6cf58bf2e44eb\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 7062;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = (document && document.baseURI) || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t7062: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(49002)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","getLoggerBuilder","setApp","detectUser","build","name","emits","props","title","type","String","fillColor","default","size","Number","_vm","this","_c","_self","_b","staticClass","attrs","on","$event","$emit","$attrs","_v","_s","_e","getRootPath","generateRemoteUrl","client","createClient","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","decodeHtmlEntities","value","passes","arguments","length","undefined","parser","DOMParser","decoded","i","parseFromString","documentElement","textContent","useDeletedCommentLimbo","defineStore","state","idsInLimbo","actions","addId","id","push","removeId","index","indexOf","splice","checkForId","includes","message","resourceId","required","resourceType","data","deleted","editing","loading","computed","mapStores","methods","onEdit","onEditCancel","updateLocalMessage","onEditComment","async","commentId","commentPath","join","customRequest","method","EditComment","logger","debug","error","showError","t","onDeleteWithUndo","deletedCommentLimboStore","timeOutDelete","setTimeout","onDelete","TOAST_UNDO_TIMEOUT","showUndo","clearTimeout","deleteFile","DeleteComment","onNewComment","newComment","resourcePath","response","axios","post","actorDisplayName","getCurrentUser","displayName","actorId","uid","actorType","creationDateTime","Date","toUTCString","objectType","verb","parseInt","headers","split","pop","comment","stat","details","NewComment","localMessage","components","IconArrowRight","IconClose","IconTrashCanOutline","IconPencilOutline","NcActionButton","NcActions","NcActionSeparator","NcAvatar","NcButton","NcDateTime","NcLoadingIcon","NcRichContenteditable","NcRichText","mixins","CommentMixin","inheritAttrs","editor","Boolean","autoComplete","Function","userData","Object","tag","expanded","submitted","isOwnComment","richContent","mentions","keys","forEach","user","key","regex","RegExp","replace","component","NcUserBubble","label","primary","isEmptyMessage","trim","timestamp","parse","isLimbo","watch","beforeMount","toString","onSubmit","$nextTick","$refs","$el","focus","onExpand","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","directives","rawName","expression","class","scopedSlots","_u","fn","proxy","preventDefault","ref","nativeOn","apply","defineComponent","editorData","currentResourceId","search","callback","get","generateOcsUrl","params","itemType","itemId","sorter","limit","loadState","ocs","values","genMentionsData","flat","mention","mentionId","icon","mentionDisplayName","source","getComments","_ref","datetime","toISOString","offset","responseData","text","result","isDetailed","multistatus","responseItems","map","item","propstat","prop","prepareFileFromProps","getDirectoryFiles","parseXML","processResponsePayload","Comment","NcEmptyContent","IconRefresh","IconMessageReplyTextOutline","IconAlertCircleOutline","elementVisibility","CommentView","done","comments","cancelRequest","hasComments","isFirstLoading","onVisibilityChange","isVisible","date","readMarker","markCommentsAsRead","e","update","resetState","onScrollBottomReached","request","abort","controller","AbortController","signal","url","cancelableRequest","unshift","findIndex","_l","$set","Vue","use","PiniaVuePlugin","__webpack_nonce__","getCSPNonce","mixin","n","window","OCA","Comments","assign","View","constructor","pinia","createPinia","propsData","extend","CommentsApp","___CSS_LOADER_EXPORT___","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","call","m","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","every","r","getter","__esModule","d","a","definition","o","defineProperty","enumerable","f","chunkId","Promise","all","reduce","promises","u","g","globalThis","obj","prototype","hasOwnProperty","l","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","timeout","doneFns","parentNode","removeChild","bind","target","head","appendChild","Symbol","toStringTag","nmd","paths","children","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","p","b","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","reject","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/comments-comments-tab.js b/dist/comments-comments-tab.js index 4a539c354be08..d84b705361aff 100644 --- a/dist/comments-comments-tab.js +++ b/dist/comments-comments-tab.js @@ -1,2 +1,2 @@ -(()=>{var e,o,n,r={1836:(e,o,n)=>{"use strict";var r=n(21777),i=n(81222),a=n(51651),s=n(65899),c=n(85471),d=n(96689),l=n(45505),u=n(54290),m=n(90176),f=n(35550);let p,b;if(c.Ay.use(s.R2),n.nc=(0,r.aV)(),(0,i.C)("comments","activityEnabled",!1)&&void 0!==OCA?.Activity?.registerSidebarAction)window.addEventListener("DOMContentLoaded",function(){window.OCA.Activity.registerSidebarAction({mount:async(e,t)=>{let{fileInfo:o,reload:r}=t;const i=(0,s.Ey)();if(!p){const{default:e}=await Promise.all([n.e(4208),n.e(7462),n.e(5679)]).then(n.bind(n,5679));p=c.Ay.extend(e)}b=new p({el:e,pinia:i,propsData:{reloadCallback:r,resourceId:o.id}}),d.A.info("Comments plugin mounted in Activity sidebar action",{fileInfo:o})},unmount:()=>{b&&b.$destroy()}}),window.OCA.Activity.registerSidebarEntries(async e=>{let{fileInfo:t,limit:o,offset:r}=e;const{data:i}=await async function(e,t){let{resourceType:o,resourceId:n}=e;const r=["",o,n].join("/"),i=t.datetime?`${t.datetime.toISOString()}`:"",a=await f.A.customRequest(r,{method:"REPORT",data:`\n\t\t\t\n\t\t\t\t${t.limit??20}\n\t\t\t\t${t.offset||0}\n\t\t\t\t${i}\n\t\t\t`,...t}),s=await a.text(),c=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{multistatus:{response:o}}=e;return o.map(e=>{const o=e.propstat.prop;return(0,m.ch)(o,o.id.toString(),t)})}(await(0,l.h4)(s),!0);return(0,u.hq)(a,c,!0)}({resourceType:"files",resourceId:t.id},{limit:o,offset:r});d.A.debug("Loaded comments",{fileInfo:t,comments:i});const{default:s}=await Promise.all([n.e(4208),n.e(7462),n.e(1543)]).then(n.bind(n,31543)),p=c.Ay.extend(s);return i.map(e=>({_CommentsViewInstance:void 0,timestamp:(0,a.A)(e.props?.creationDateTime).toDate().getTime(),mount(o,n){let{reload:r}=n;this._CommentsViewInstance=new p({el:o,propsData:{comment:e,resourceId:t.id,reloadCallback:r}})},unmount(){this._CommentsViewInstance?.$destroy()}}))}),window.OCA.Activity.registerSidebarFilter(e=>"comments"!==e.type),d.A.info("Comments plugin registered for Activity sidebar action")});else{let e=null;const o=new OCA.Files.Sidebar.Tab({id:"comments",name:t("comments","Comments"),iconSvg:'',async mount(t,o,n){e&&e.$destroy(),e=new OCA.Comments.View("files",{parent:n,propsData:{resourceId:o.id}}),await e.update(o.id),e.$mount(t)},update(t){e.update(t.id)},destroy(){e.$destroy(),e=null},scrollBottomReached(){e.onScrollBottomReached()}});window.addEventListener("DOMContentLoaded",function(){OCA.Files&&OCA.Files.Sidebar&&OCA.Files.Sidebar.registerTab(o)})}},17003:(e,t,o)=>{"use strict";o.d(t,{e:()=>r});var n=o(63814);function r(){return(0,n.dC)("dav/comments")}},35550:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var n=o(21777),r=o(45505),i=o(17003);const a=(0,r.UU)((0,i.e)());function s(e){a.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})}(0,n.zo)(s),s((0,n.do)());const c=a},42634:()=>{},59169:()=>{},63779:()=>{},77199:()=>{},86833:()=>{},96689:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=(0,o(35947).YK)().setApp("comments").detectUser().build()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={id:e,loaded:!1,exports:{}};return r[e].call(o.exports,o,o.exports,a),o.loaded=!0,o.exports}a.m=r,e=[],a.O=(t,o,n,r)=>{if(!o){var i=1/0;for(l=0;l=r)&&Object.keys(a.O).every(e=>a.O[e](o[c]))?o.splice(c--,1):(s=!1,r0&&e[l-1][2]>r;l--)e[l]=e[l-1];e[l]=[o,n,r]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,o)=>(a.f[o](e,t),t),[])),a.u=e=>e+"-"+e+".js?v="+{640:"c5cc8d7f0213aa827c54",1543:"d09c7d5e93297c3fd32f",3564:"29e8338d43e0d4bd3995",4508:"55b817403e13f27fae56",5528:"d0a4ad859a898dce471a",5679:"98929728c8cb4b6ddf55",5810:"b550a24d46f75f92c2d5",5862:"4ca96c4f928b038599cf",7462:"eb024406769582d5e2fe",7471:"6423b9b898ffefeb7d1d",7615:"05564da6cf58bf2e44eb"}[e],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},n="nextcloud:",a.l=(e,t,r,i)=>{if(o[e])o[e].push(t);else{var s,c;if(void 0!==r)for(var d=document.getElementsByTagName("script"),l=0;l{s.onerror=s.onload=null,clearTimeout(f);var r=o[e];if(delete o[e],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach(e=>e(n)),t)return t(n)},f=setTimeout(m.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=m.bind(null,s.onerror),s.onload=m.bind(null,s.onload),c&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=2122,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document&&document.baseURI||self.location.href;var e={2122:0};a.f.j=(t,o)=>{var n=a.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else{var r=new Promise((o,r)=>n=e[t]=[o,r]);o.push(n[2]=r);var i=a.p+a.u(t),s=new Error;a.l(i,o=>{if(a.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+i+")",s.name="ChunkLoadError",s.type=r,s.request=i,n[1](s)}},"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,o)=>{var n,r,i=o[0],s=o[1],c=o[2],d=0;if(i.some(t=>0!==e[t])){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);if(c)var l=c(a)}for(t&&t(o);da(1836));s=a.O(s)})(); -//# sourceMappingURL=comments-comments-tab.js.map?v=42eb1fbc1e2b366f83f2 \ No newline at end of file +(()=>{var e,o,n,r={1836:(e,o,n)=>{"use strict";var r=n(21777),i=n(81222),a=n(51651),s=n(65899),c=n(85471),d=n(96689),l=n(45505),u=n(54290),m=n(90176),f=n(35550);let p,b;if(c.Ay.use(s.R2),n.nc=(0,r.aV)(),(0,i.C)("comments","activityEnabled",!1)&&void 0!==OCA?.Activity?.registerSidebarAction)window.addEventListener("DOMContentLoaded",function(){window.OCA.Activity.registerSidebarAction({mount:async(e,t)=>{let{fileInfo:o,reload:r}=t;const i=(0,s.Ey)();if(!p){const{default:e}=await Promise.all([n.e(4208),n.e(7462),n.e(5679)]).then(n.bind(n,5679));p=c.Ay.extend(e)}b=new p({el:e,pinia:i,propsData:{reloadCallback:r,resourceId:o.id}}),d.A.info("Comments plugin mounted in Activity sidebar action",{fileInfo:o})},unmount:()=>{b&&b.$destroy()}}),window.OCA.Activity.registerSidebarEntries(async e=>{let{fileInfo:t,limit:o,offset:r}=e;const{data:i}=await async function(e,t){let{resourceType:o,resourceId:n}=e;const r=["",o,n].join("/"),i=t.datetime?`${t.datetime.toISOString()}`:"",a=await f.A.customRequest(r,{method:"REPORT",data:`\n\t\t\t\n\t\t\t\t${t.limit??20}\n\t\t\t\t${t.offset||0}\n\t\t\t\t${i}\n\t\t\t`,...t}),s=await a.text(),c=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{multistatus:{response:o}}=e;return o.map(e=>{const o=e.propstat.prop;return(0,m.ch)(o,o.id.toString(),t)})}(await(0,l.h4)(s),!0);return(0,u.hq)(a,c,!0)}({resourceType:"files",resourceId:t.id},{limit:o,offset:r});d.A.debug("Loaded comments",{fileInfo:t,comments:i});const{default:s}=await Promise.all([n.e(4208),n.e(7462),n.e(1543)]).then(n.bind(n,31543)),p=c.Ay.extend(s);return i.map(e=>({_CommentsViewInstance:void 0,timestamp:(0,a.A)(e.props?.creationDateTime).toDate().getTime(),mount(o,n){let{reload:r}=n;this._CommentsViewInstance=new p({el:o,propsData:{comment:e,resourceId:t.id,reloadCallback:r}})},unmount(){this._CommentsViewInstance?.$destroy()}}))}),window.OCA.Activity.registerSidebarFilter(e=>"comments"!==e.type),d.A.info("Comments plugin registered for Activity sidebar action")});else{let e=null;const o=new OCA.Files.Sidebar.Tab({id:"comments",name:t("comments","Comments"),iconSvg:'',async mount(t,o,n){e&&e.$destroy(),e=new OCA.Comments.View("files",{parent:n,propsData:{resourceId:o.id}}),await e.update(o.id),e.$mount(t)},update(t){e.update(t.id)},destroy(){e.$destroy(),e=null},scrollBottomReached(){e.onScrollBottomReached()}});window.addEventListener("DOMContentLoaded",function(){OCA.Files&&OCA.Files.Sidebar&&OCA.Files.Sidebar.registerTab(o)})}},17003:(e,t,o)=>{"use strict";o.d(t,{e:()=>r});var n=o(63814);function r(){return(0,n.dC)("dav/comments")}},35550:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var n=o(21777),r=o(45505),i=o(17003);const a=(0,r.UU)((0,i.e)());function s(e){a.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})}(0,n.zo)(s),s((0,n.do)());const c=a},42634:()=>{},59169:()=>{},63779:()=>{},77199:()=>{},86833:()=>{},96689:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=(0,o(35947).YK)().setApp("comments").detectUser().build()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={id:e,loaded:!1,exports:{}};return r[e].call(o.exports,o,o.exports,a),o.loaded=!0,o.exports}a.m=r,e=[],a.O=(t,o,n,r)=>{if(!o){var i=1/0;for(l=0;l=r)&&Object.keys(a.O).every(e=>a.O[e](o[c]))?o.splice(c--,1):(s=!1,r0&&e[l-1][2]>r;l--)e[l]=e[l-1];e[l]=[o,n,r]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,o)=>(a.f[o](e,t),t),[])),a.u=e=>e+"-"+e+".js?v="+{640:"c5cc8d7f0213aa827c54",1543:"d09c7d5e93297c3fd32f",3564:"29e8338d43e0d4bd3995",4508:"55b817403e13f27fae56",5528:"d0a4ad859a898dce471a",5679:"98929728c8cb4b6ddf55",5810:"b550a24d46f75f92c2d5",5862:"4ca96c4f928b038599cf",7462:"d95559eea9d6df1250eb",7471:"6423b9b898ffefeb7d1d",7615:"05564da6cf58bf2e44eb"}[e],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},n="nextcloud:",a.l=(e,t,r,i)=>{if(o[e])o[e].push(t);else{var s,c;if(void 0!==r)for(var d=document.getElementsByTagName("script"),l=0;l{s.onerror=s.onload=null,clearTimeout(f);var r=o[e];if(delete o[e],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach(e=>e(n)),t)return t(n)},f=setTimeout(m.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=m.bind(null,s.onerror),s.onload=m.bind(null,s.onload),c&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=2122,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document&&document.baseURI||self.location.href;var e={2122:0};a.f.j=(t,o)=>{var n=a.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else{var r=new Promise((o,r)=>n=e[t]=[o,r]);o.push(n[2]=r);var i=a.p+a.u(t),s=new Error;a.l(i,o=>{if(a.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+i+")",s.name="ChunkLoadError",s.type=r,s.request=i,n[1](s)}},"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,o)=>{var n,r,i=o[0],s=o[1],c=o[2],d=0;if(i.some(t=>0!==e[t])){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);if(c)var l=c(a)}for(t&&t(o);da(1836));s=a.O(s)})(); +//# sourceMappingURL=comments-comments-tab.js.map?v=fbcbc91c5ba04c33bdb8 \ No newline at end of file diff --git a/dist/comments-comments-tab.js.map b/dist/comments-comments-tab.js.map index ea718ff1f8b1d..8d17cffd0d0b3 100644 --- a/dist/comments-comments-tab.js.map +++ b/dist/comments-comments-tab.js.map @@ -1 +1 @@ -{"version":3,"file":"comments-comments-tab.js?v=42eb1fbc1e2b366f83f2","mappings":"UAAIA,ECAAC,EACAC,E,iJCSJ,IAAIC,EACAC,ECEJ,GDJAC,EAAAA,GAAIC,IAAIC,EAAAA,ICERC,EAAAA,IAAoBC,EAAAA,EAAAA,OAEhBC,EAAAA,EAAAA,GAAU,WAAY,mBAAmB,SAAmDC,IAAzCC,KAAKC,UAAUC,sBAErEC,OAAOC,iBAAiB,mBAAoB,WDCzCD,OAAOH,IAAIC,SAASC,sBAAsB,CACtCG,MAAOC,MAAOC,EAAEC,KAA2B,IAAzB,SAAEC,EAAQ,OAAEC,GAAQF,EAClC,MAAMG,GAAQC,EAAAA,EAAAA,MACd,IAAKrB,EAAuB,CACxB,MAAQsB,QAASC,SAAgC,kEAEjDvB,EAA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KAAK,KAAMuC,EAAmBhE,KAAKyB,KAAKuC,G,KCvFvFnH,EAAoB6D,QAAKzK,ECGzB,IAAIgO,EAAsBpH,EAAoBS,OAAErH,EAAW,CAAC,MAAO,IAAO4G,EAAoB,OAC9FoH,EAAsBpH,EAAoBS,EAAE2G,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/comments/src/comments-activity-tab.ts","webpack:///nextcloud/apps/comments/src/comments-tab.js","webpack:///nextcloud/apps/comments/src/services/GetComments.ts","webpack:///nextcloud/apps/comments/src/utils/davUtils.js","webpack:///nextcloud/apps/comments/src/services/DavClient.js","webpack:///nextcloud/apps/comments/src/logger.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport moment from '@nextcloud/moment';\nimport { createPinia, PiniaVuePlugin } from 'pinia';\nimport Vue, {} from 'vue';\nimport logger from './logger.js';\nimport { getComments } from './services/GetComments.js';\nVue.use(PiniaVuePlugin);\nlet ActivityTabPluginView;\nlet ActivityTabPluginInstance;\n/**\n * Register the comments plugins for the Activity sidebar\n */\nexport function registerCommentsPlugins() {\n window.OCA.Activity.registerSidebarAction({\n mount: async (el, { fileInfo, reload }) => {\n const pinia = createPinia();\n if (!ActivityTabPluginView) {\n const { default: ActivityCommentAction } = await import('./views/ActivityCommentAction.vue');\n // @ts-expect-error Types are broken for Vue2\n ActivityTabPluginView = Vue.extend(ActivityCommentAction);\n }\n ActivityTabPluginInstance = new ActivityTabPluginView({\n el,\n pinia,\n propsData: {\n reloadCallback: reload,\n resourceId: fileInfo.id,\n },\n });\n logger.info('Comments plugin mounted in Activity sidebar action', { fileInfo });\n },\n unmount: () => {\n // destroy previous instance if available\n if (ActivityTabPluginInstance) {\n ActivityTabPluginInstance.$destroy();\n }\n },\n });\n window.OCA.Activity.registerSidebarEntries(async ({ fileInfo, limit, offset }) => {\n const { data: comments } = await getComments({ resourceType: 'files', resourceId: fileInfo.id }, { limit, offset });\n logger.debug('Loaded comments', { fileInfo, comments });\n const { default: CommentView } = await import('./views/ActivityCommentEntry.vue');\n // @ts-expect-error Types are broken for Vue2\n const CommentsViewObject = Vue.extend(CommentView);\n return comments.map((comment) => ({\n _CommentsViewInstance: undefined,\n timestamp: moment(comment.props?.creationDateTime).toDate().getTime(),\n mount(element, { reload }) {\n this._CommentsViewInstance = new CommentsViewObject({\n el: element,\n propsData: {\n comment,\n resourceId: fileInfo.id,\n reloadCallback: reload,\n },\n });\n },\n unmount() {\n this._CommentsViewInstance?.$destroy();\n },\n }));\n });\n window.OCA.Activity.registerSidebarFilter((activity) => activity.type !== 'comments');\n logger.info('Comments plugin registered for Activity sidebar action');\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport MessageReplyText from '@mdi/svg/svg/message-reply-text.svg?raw'\nimport { getCSPNonce } from '@nextcloud/auth'\nimport { loadState } from '@nextcloud/initial-state'\nimport { registerCommentsPlugins } from './comments-activity-tab.ts'\n\n// @ts-expect-error __webpack_nonce__ is injected by webpack\n__webpack_nonce__ = getCSPNonce()\n\nif (loadState('comments', 'activityEnabled', false) && OCA?.Activity?.registerSidebarAction !== undefined) {\n\t// Do not mount own tab but mount into activity\n\twindow.addEventListener('DOMContentLoaded', function() {\n\t\tregisterCommentsPlugins()\n\t})\n} else {\n\t// Init Comments tab component\n\tlet TabInstance = null\n\tconst commentTab = new OCA.Files.Sidebar.Tab({\n\t\tid: 'comments',\n\t\tname: t('comments', 'Comments'),\n\t\ticonSvg: MessageReplyText,\n\n\t\tasync mount(el, fileInfo, context) {\n\t\t\tif (TabInstance) {\n\t\t\t\tTabInstance.$destroy()\n\t\t\t}\n\t\t\tTabInstance = new OCA.Comments.View('files', {\n\t\t\t\t// Better integration with vue parent component\n\t\t\t\tparent: context,\n\t\t\t\tpropsData: {\n\t\t\t\t\tresourceId: fileInfo.id,\n\t\t\t\t},\n\t\t\t})\n\t\t\t// Only mount after we have all the info we need\n\t\t\tawait TabInstance.update(fileInfo.id)\n\t\t\tTabInstance.$mount(el)\n\t\t},\n\t\tupdate(fileInfo) {\n\t\t\tTabInstance.update(fileInfo.id)\n\t\t},\n\t\tdestroy() {\n\t\t\tTabInstance.$destroy()\n\t\t\tTabInstance = null\n\t\t},\n\t\tscrollBottomReached() {\n\t\t\tTabInstance.onScrollBottomReached()\n\t\t},\n\t})\n\n\twindow.addEventListener('DOMContentLoaded', function() {\n\t\tif (OCA.Files && OCA.Files.Sidebar) {\n\t\t\tOCA.Files.Sidebar.registerTab(commentTab)\n\t\t}\n\t})\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { parseXML } from 'webdav';\nimport { processResponsePayload } from 'webdav/dist/node/response.js';\nimport { prepareFileFromProps } from 'webdav/dist/node/tools/dav.js';\nimport client from './DavClient.js';\nexport const DEFAULT_LIMIT = 20;\n/**\n * Retrieve the comments list\n *\n * @param data destructuring object\n * @param data.resourceType the resource type\n * @param data.resourceId the resource ID\n * @param [options] optional options for axios\n * @param [options.offset] the pagination offset\n * @param [options.limit] the pagination limit, defaults to 20\n * @param [options.datetime] optional date to query\n * @return the comments list\n */\nexport async function getComments({ resourceType, resourceId }, options) {\n const resourcePath = ['', resourceType, resourceId].join('/');\n const datetime = options.datetime ? `${options.datetime.toISOString()}` : '';\n const response = await client.customRequest(resourcePath, {\n method: 'REPORT',\n data: `\n\t\t\t\n\t\t\t\t${options.limit ?? DEFAULT_LIMIT}\n\t\t\t\t${options.offset || 0}\n\t\t\t\t${datetime}\n\t\t\t`,\n ...options,\n });\n const responseData = await response.text();\n const result = await parseXML(responseData);\n const stat = getDirectoryFiles(result, true);\n // https://github.com/perry-mitchell/webdav-client/issues/339\n return processResponsePayload(response, stat, true);\n}\n/**\n * https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/operations/directoryContents.ts\n *\n * @param result\n * @param isDetailed\n */\nfunction getDirectoryFiles(result, isDetailed = false) {\n // Extract the response items (directory contents)\n const { multistatus: { response: responseItems }, } = result;\n // Map all items to a consistent output structure (results)\n return responseItems.map((item) => {\n // Each item should contain a stat object\n const props = item.propstat.prop;\n return prepareFileFromProps(props, props.id.toString(), isDetailed);\n });\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\n\n/**\n *\n */\nfunction getRootPath() {\n\treturn generateRemoteUrl('dav/comments')\n}\n\nexport { getRootPath }\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth'\nimport { createClient } from 'webdav'\nimport { getRootPath } from '../utils/davUtils.js'\n\n// init webdav client\nconst client = createClient(getRootPath())\n\n// set CSRF token header\n/**\n * @param token\n */\nfunction setHeaders(token) {\n\tclient.setHeaders({\n\t\t// Add this so the server knows it is an request from the browser\n\t\t'X-Requested-With': 'XMLHttpRequest',\n\t\t// Inject user auth\n\t\trequesttoken: token ?? '',\n\t})\n}\n\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders)\nsetHeaders(getRequestToken())\n\nexport default client\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('comments')\n\t.detectUser()\n\t.build()\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"640\":\"c5cc8d7f0213aa827c54\",\"1543\":\"d09c7d5e93297c3fd32f\",\"3564\":\"29e8338d43e0d4bd3995\",\"4508\":\"55b817403e13f27fae56\",\"5528\":\"d0a4ad859a898dce471a\",\"5679\":\"98929728c8cb4b6ddf55\",\"5810\":\"b550a24d46f75f92c2d5\",\"5862\":\"4ca96c4f928b038599cf\",\"7462\":\"eb024406769582d5e2fe\",\"7471\":\"6423b9b898ffefeb7d1d\",\"7615\":\"05564da6cf58bf2e44eb\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2122;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = (document && document.baseURI) || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2122: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(1836)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","ActivityTabPluginView","ActivityTabPluginInstance","Vue","use","PiniaVuePlugin","__webpack_nonce__","getCSPNonce","loadState","undefined","OCA","Activity","registerSidebarAction","window","addEventListener","mount","async","el","_ref","fileInfo","reload","pinia","createPinia","default","ActivityCommentAction","extend","propsData","reloadCallback","resourceId","id","logger","info","unmount","$destroy","registerSidebarEntries","limit","offset","_ref2","data","comments","options","resourceType","resourcePath","join","datetime","toISOString","response","client","customRequest","method","responseData","text","stat","result","isDetailed","arguments","length","multistatus","responseItems","map","item","props","propstat","prop","prepareFileFromProps","toString","getDirectoryFiles","parseXML","processResponsePayload","getComments","debug","CommentView","CommentsViewObject","comment","_CommentsViewInstance","timestamp","moment","creationDateTime","toDate","getTime","element","_ref3","this","registerSidebarFilter","activity","type","TabInstance","commentTab","Files","Sidebar","Tab","name","t","iconSvg","context","Comments","View","parent","update","$mount","destroy","scrollBottomReached","onScrollBottomReached","registerTab","getRootPath","generateRemoteUrl","createClient","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","getLoggerBuilder","setApp","detectUser","build","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","loaded","__webpack_modules__","call","m","O","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","f","e","chunkId","Promise","all","reduce","promises","u","g","globalThis","Function","obj","prototype","hasOwnProperty","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","timeout","doneFns","parentNode","removeChild","forEach","setTimeout","bind","target","head","appendChild","Symbol","toStringTag","value","nmd","paths","children","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","replace","p","b","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","reject","error","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"comments-comments-tab.js?v=fbcbc91c5ba04c33bdb8","mappings":"UAAIA,ECAAC,EACAC,E,iJCSJ,IAAIC,EACAC,ECEJ,GDJAC,EAAAA,GAAIC,IAAIC,EAAAA,ICERC,EAAAA,IAAoBC,EAAAA,EAAAA,OAEhBC,EAAAA,EAAAA,GAAU,WAAY,mBAAmB,SAAmDC,IAAzCC,KAAKC,UAAUC,sBAErEC,OAAOC,iBAAiB,mBAAoB,WDCzCD,OAAOH,IAAIC,SAASC,sBAAsB,CACtCG,MAAOC,MAAOC,EAAEC,KAA2B,IAAzB,SAAEC,EAAQ,OAAEC,GAA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KAA4B,uBAAK,GAC1FiB,EAAmBzC,QAAQoC,EAAqBlC,KAAK,KAAM,IAC3DuC,EAAmBhE,KAAO2D,EAAqBlC,KAAK,KAAMuC,EAAmBhE,KAAKyB,KAAKuC,G,KCvFvFnH,EAAoB6D,QAAKzK,ECGzB,IAAIgO,EAAsBpH,EAAoBS,OAAErH,EAAW,CAAC,MAAO,IAAO4G,EAAoB,OAC9FoH,EAAsBpH,EAAoBS,EAAE2G,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/comments/src/comments-activity-tab.ts","webpack:///nextcloud/apps/comments/src/comments-tab.js","webpack:///nextcloud/apps/comments/src/services/GetComments.ts","webpack:///nextcloud/apps/comments/src/utils/davUtils.js","webpack:///nextcloud/apps/comments/src/services/DavClient.js","webpack:///nextcloud/apps/comments/src/logger.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport moment from '@nextcloud/moment';\nimport { createPinia, PiniaVuePlugin } from 'pinia';\nimport Vue, {} from 'vue';\nimport logger from './logger.js';\nimport { getComments } from './services/GetComments.js';\nVue.use(PiniaVuePlugin);\nlet ActivityTabPluginView;\nlet ActivityTabPluginInstance;\n/**\n * Register the comments plugins for the Activity sidebar\n */\nexport function registerCommentsPlugins() {\n window.OCA.Activity.registerSidebarAction({\n mount: async (el, { fileInfo, reload }) => {\n const pinia = createPinia();\n if (!ActivityTabPluginView) {\n const { default: ActivityCommentAction } = await import('./views/ActivityCommentAction.vue');\n // @ts-expect-error Types are broken for Vue2\n ActivityTabPluginView = Vue.extend(ActivityCommentAction);\n }\n ActivityTabPluginInstance = new ActivityTabPluginView({\n el,\n pinia,\n propsData: {\n reloadCallback: reload,\n resourceId: fileInfo.id,\n },\n });\n logger.info('Comments plugin mounted in Activity sidebar action', { fileInfo });\n },\n unmount: () => {\n // destroy previous instance if available\n if (ActivityTabPluginInstance) {\n ActivityTabPluginInstance.$destroy();\n }\n },\n });\n window.OCA.Activity.registerSidebarEntries(async ({ fileInfo, limit, offset }) => {\n const { data: comments } = await getComments({ resourceType: 'files', resourceId: fileInfo.id }, { limit, offset });\n logger.debug('Loaded comments', { fileInfo, comments });\n const { default: CommentView } = await import('./views/ActivityCommentEntry.vue');\n // @ts-expect-error Types are broken for Vue2\n const CommentsViewObject = Vue.extend(CommentView);\n return comments.map((comment) => ({\n _CommentsViewInstance: undefined,\n timestamp: moment(comment.props?.creationDateTime).toDate().getTime(),\n mount(element, { reload }) {\n this._CommentsViewInstance = new CommentsViewObject({\n el: element,\n propsData: {\n comment,\n resourceId: fileInfo.id,\n reloadCallback: reload,\n },\n });\n },\n unmount() {\n this._CommentsViewInstance?.$destroy();\n },\n }));\n });\n window.OCA.Activity.registerSidebarFilter((activity) => activity.type !== 'comments');\n logger.info('Comments plugin registered for Activity sidebar action');\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport MessageReplyText from '@mdi/svg/svg/message-reply-text.svg?raw'\nimport { getCSPNonce } from '@nextcloud/auth'\nimport { loadState } from '@nextcloud/initial-state'\nimport { registerCommentsPlugins } from './comments-activity-tab.ts'\n\n// @ts-expect-error __webpack_nonce__ is injected by webpack\n__webpack_nonce__ = getCSPNonce()\n\nif (loadState('comments', 'activityEnabled', false) && OCA?.Activity?.registerSidebarAction !== undefined) {\n\t// Do not mount own tab but mount into activity\n\twindow.addEventListener('DOMContentLoaded', function() {\n\t\tregisterCommentsPlugins()\n\t})\n} else {\n\t// Init Comments tab component\n\tlet TabInstance = null\n\tconst commentTab = new OCA.Files.Sidebar.Tab({\n\t\tid: 'comments',\n\t\tname: t('comments', 'Comments'),\n\t\ticonSvg: MessageReplyText,\n\n\t\tasync mount(el, fileInfo, context) {\n\t\t\tif (TabInstance) {\n\t\t\t\tTabInstance.$destroy()\n\t\t\t}\n\t\t\tTabInstance = new OCA.Comments.View('files', {\n\t\t\t\t// Better integration with vue parent component\n\t\t\t\tparent: context,\n\t\t\t\tpropsData: {\n\t\t\t\t\tresourceId: fileInfo.id,\n\t\t\t\t},\n\t\t\t})\n\t\t\t// Only mount after we have all the info we need\n\t\t\tawait TabInstance.update(fileInfo.id)\n\t\t\tTabInstance.$mount(el)\n\t\t},\n\t\tupdate(fileInfo) {\n\t\t\tTabInstance.update(fileInfo.id)\n\t\t},\n\t\tdestroy() {\n\t\t\tTabInstance.$destroy()\n\t\t\tTabInstance = null\n\t\t},\n\t\tscrollBottomReached() {\n\t\t\tTabInstance.onScrollBottomReached()\n\t\t},\n\t})\n\n\twindow.addEventListener('DOMContentLoaded', function() {\n\t\tif (OCA.Files && OCA.Files.Sidebar) {\n\t\t\tOCA.Files.Sidebar.registerTab(commentTab)\n\t\t}\n\t})\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { parseXML } from 'webdav';\nimport { processResponsePayload } from 'webdav/dist/node/response.js';\nimport { prepareFileFromProps } from 'webdav/dist/node/tools/dav.js';\nimport client from './DavClient.js';\nexport const DEFAULT_LIMIT = 20;\n/**\n * Retrieve the comments list\n *\n * @param data destructuring object\n * @param data.resourceType the resource type\n * @param data.resourceId the resource ID\n * @param [options] optional options for axios\n * @param [options.offset] the pagination offset\n * @param [options.limit] the pagination limit, defaults to 20\n * @param [options.datetime] optional date to query\n * @return the comments list\n */\nexport async function getComments({ resourceType, resourceId }, options) {\n const resourcePath = ['', resourceType, resourceId].join('/');\n const datetime = options.datetime ? `${options.datetime.toISOString()}` : '';\n const response = await client.customRequest(resourcePath, {\n method: 'REPORT',\n data: `\n\t\t\t\n\t\t\t\t${options.limit ?? DEFAULT_LIMIT}\n\t\t\t\t${options.offset || 0}\n\t\t\t\t${datetime}\n\t\t\t`,\n ...options,\n });\n const responseData = await response.text();\n const result = await parseXML(responseData);\n const stat = getDirectoryFiles(result, true);\n // https://github.com/perry-mitchell/webdav-client/issues/339\n return processResponsePayload(response, stat, true);\n}\n/**\n * https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/operations/directoryContents.ts\n *\n * @param result\n * @param isDetailed\n */\nfunction getDirectoryFiles(result, isDetailed = false) {\n // Extract the response items (directory contents)\n const { multistatus: { response: responseItems }, } = result;\n // Map all items to a consistent output structure (results)\n return responseItems.map((item) => {\n // Each item should contain a stat object\n const props = item.propstat.prop;\n return prepareFileFromProps(props, props.id.toString(), isDetailed);\n });\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\n\n/**\n *\n */\nfunction getRootPath() {\n\treturn generateRemoteUrl('dav/comments')\n}\n\nexport { getRootPath }\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth'\nimport { createClient } from 'webdav'\nimport { getRootPath } from '../utils/davUtils.js'\n\n// init webdav client\nconst client = createClient(getRootPath())\n\n// set CSRF token header\n/**\n * @param token\n */\nfunction setHeaders(token) {\n\tclient.setHeaders({\n\t\t// Add this so the server knows it is an request from the browser\n\t\t'X-Requested-With': 'XMLHttpRequest',\n\t\t// Inject user auth\n\t\trequesttoken: token ?? '',\n\t})\n}\n\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders)\nsetHeaders(getRequestToken())\n\nexport default client\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('comments')\n\t.detectUser()\n\t.build()\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"640\":\"c5cc8d7f0213aa827c54\",\"1543\":\"d09c7d5e93297c3fd32f\",\"3564\":\"29e8338d43e0d4bd3995\",\"4508\":\"55b817403e13f27fae56\",\"5528\":\"d0a4ad859a898dce471a\",\"5679\":\"98929728c8cb4b6ddf55\",\"5810\":\"b550a24d46f75f92c2d5\",\"5862\":\"4ca96c4f928b038599cf\",\"7462\":\"d95559eea9d6df1250eb\",\"7471\":\"6423b9b898ffefeb7d1d\",\"7615\":\"05564da6cf58bf2e44eb\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2122;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = (document && document.baseURI) || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2122: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(1836)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","ActivityTabPluginView","ActivityTabPluginInstance","Vue","use","PiniaVuePlugin","__webpack_nonce__","getCSPNonce","loadState","undefined","OCA","Activity","registerSidebarAction","window","addEventListener","mount","async","el","_ref","fileInfo","reload","pinia","createPinia","default","ActivityCommentAction","extend","propsData","reloadCallback","resourceId","id","logger","info","unmount","$destroy","registerSidebarEntries","limit","offset","_ref2","data","comments","options","resourceType","resourcePath","join","datetime","toISOString","response","client","customRequest","method","responseData","text","stat","result","isDetailed","arguments","length","multistatus","responseItems","map","item","props","propstat","prop","prepareFileFromProps","toString","getDirectoryFiles","parseXML","processResponsePayload","getComments","debug","CommentView","CommentsViewObject","comment","_CommentsViewInstance","timestamp","moment","creationDateTime","toDate","getTime","element","_ref3","this","registerSidebarFilter","activity","type","TabInstance","commentTab","Files","Sidebar","Tab","name","t","iconSvg","context","Comments","View","parent","update","$mount","destroy","scrollBottomReached","onScrollBottomReached","registerTab","getRootPath","generateRemoteUrl","createClient","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","getLoggerBuilder","setApp","detectUser","build","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","loaded","__webpack_modules__","call","m","O","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","f","e","chunkId","Promise","all","reduce","promises","u","g","globalThis","Function","obj","prototype","hasOwnProperty","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","timeout","doneFns","parentNode","removeChild","forEach","setTimeout","bind","target","head","appendChild","Symbol","toStringTag","value","nmd","paths","children","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","replace","p","b","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","reject","error","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file