comments-comments-app.js 50 KB

123
  1. /*! For license information please see comments-comments-app.js.LICENSE.txt */
  2. (()=>{var e,n,r,o={24921:(e,n,r)=>{"use strict";var o=r(31352),s=r(77958),i=r(20144),a=r(64024),c=r(2324),l=r(25108);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function d(t,e){if(t===e)return!0;if("object"===u(t)){for(var n in t)if(!d(t[n],e[n]))return!1;return!0}return!1}var m=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,r)}var e,n;return e=t,n=[{key:"createObserver",value:function(t,e){var n=this;if(this.observer&&this.destroyObserver(),!this.frozen){var r;if(this.options="function"==typeof(r=t)?{callback:r}:r,this.callback=function(t,e){n.options.callback(t,e),t&&n.options.once&&(n.frozen=!0,n.destroyObserver())},this.callback&&this.options.throttle){var o=(this.options.throttleOptions||{}).leading;this.callback=function(t,e){var n,r,o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=function(i){for(var a=arguments.length,c=new Array(a>1?a-1:0),l=1;l<a;l++)c[l-1]=arguments[l];if(o=c,!n||i!==r){var u=s.leading;"function"==typeof u&&(u=u(i,r)),n&&i===r||!u||t.apply(void 0,[i].concat(h(o))),r=i,clearTimeout(n),n=setTimeout((function(){t.apply(void 0,[i].concat(h(o))),n=0}),e)}};return i._clear=function(){clearTimeout(n),n=null},i}(this.callback,this.options.throttle,{leading:function(t){return"both"===o||"visible"===o&&t||"hidden"===o&&!t}})}this.oldResult=void 0,this.observer=new IntersectionObserver((function(t){var e=t[0];if(t.length>1){var r=t.find((function(t){return t.isIntersecting}));r&&(e=r)}if(n.callback){var o=e.isIntersecting&&e.intersectionRatio>=n.threshold;if(o===n.oldResult)return;n.oldResult=o,n.callback(o,e)}}),this.options.intersection),e.context.$nextTick((function(){n.observer&&n.observer.observe(n.el)}))}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&"number"==typeof this.options.intersection.threshold?this.options.intersection.threshold:0}}],n&&p(e.prototype,n),t}();function f(t,e,n){var r=e.value;if(r)if("undefined"==typeof IntersectionObserver)l.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var o=new m(t,r,n);t._vue_visibilityState=o}}function g(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var b={bind:f,update:function(t,e,n){var r=e.value;if(!d(r,e.oldValue)){var o=t._vue_visibilityState;r?o?o.createObserver(r,n):f(t,{value:r},n):g(t)}},unbind:g},v={version:"1.0.0",install:function(t){t.directive("observe-visibility",b)}},A=null;"undefined"!=typeof window?A=window.Vue:void 0!==r.g&&(A=r.g.Vue),A&&A.use(v);const y=v;var C=r(52506),w=r(54572);const _={name:"RefreshIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var x=r(51900);const O=(0,x.Z)(_,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon refresh-icon",attrs:{"aria-hidden":!t.title,"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,j={name:"MessageReplyTextIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},S=(0,x.Z)(j,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon message-reply-text-icon",attrs:{"aria-hidden":!t.title,"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:"M18,8H6V6H18V8M18,11H6V9H18V11M18,14H6V12H18V14M22,4A2,2 0 0,0 20,2H4A2,2 0 0,0 2,4V16A2,2 0 0,0 4,18H18L22,22V4Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var k=r(48950),E=r(43589),T=r(61057),M=r(81243),N=r(18519),P=r(97947),I=r(30589),$=r(73567),R=r(79753);const D=function(){return(0,R.generateRemoteUrl)("dav/comments")};function L(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=new DOMParser;let r=t;for(let t=0;t<e;t++)r=n.parseFromString(r,"text/html").documentElement.textContent;return r}var B=r(93664),Z=r(14596);const W=(0,Z.eI)(D(),{headers:{"X-Requested-With":"XMLHttpRequest",requesttoken:(0,s.IH)()??""}}),z=(0,r(17499).IY)().setApp("comments").detectUser().build();var V=r(25108);const q={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}),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,r){const o=["",t,e,n].join("/");return await W.customRequest(o,Object.assign({method:"PROPPATCH",data:`<?xml version="1.0"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:message>${r}</oc:message>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`}))}(this.resourceType,this.resourceId,this.id,e),z.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,a.x2)(t("comments","An error occurred while trying to edit the comment")),V.error(e)}finally{this.loading=!1}},onDeleteWithUndo(){this.deleted=!0;const e=setTimeout(this.onDelete,a.et);(0,a.yl)(t("comments","Comment deleted"),(()=>{clearTimeout(e),this.deleted=!1}))},async onDelete(){try{await async function(t,e,n){const r=["",t,e,n].join("/");await W.deleteFile(r)}(this.resourceType,this.resourceId,this.id),z.debug("Comment deleted",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id}),this.$emit("delete",this.id)}catch(e){(0,a.x2)(t("comments","An error occurred while trying to delete the comment")),V.error(e),this.deleted=!1}},async onNewComment(e){this.loading=!0;try{const t=await async function(t,e,n){const r=["",t,e].join("/"),o=await B.Z.post(D()+r,{actorDisplayName:(0,s.ts)().displayName,actorId:(0,s.ts)().uid,actorType:"users",creationDateTime:(new Date).toUTCString(),message:n,objectType:t,verb:"comment"}),i=r+"/"+parseInt(o.headers["content-location"].split("/").pop()),a=await W.stat(i,{details:!0}),c=a.data.props;return c.actorDisplayName=L(c.actorDisplayName,2),c.message=L(c.message,2),a.data}(this.resourceType,this.resourceId,e);z.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,a.x2)(t("comments","An error occurred while trying to create the comment")),V.error(e)}finally{this.loading=!1}}}},H={name:"Comment",components:{ArrowRight:$.Z,NcActionButton:E.Z,NcActions:T.Z,NcActionSeparator:M.Z,NcAvatar:N.Z,NcButton:w.Z,NcDateTime:P.Z,NcRichContenteditable:()=>Promise.all([r.e(7874),r.e(6318)]).then(r.bind(r,46318))},mixins:[I.ZP,q],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},tag:{type:String,default:"div"}},data:()=>({expanded:!1,localMessage:"",submitted:!1}),computed:{isOwnComment(){return(0,s.ts)().uid===this.actorId},renderedContent(){return this.isEmptyMessage?"":this.renderContent(this.localMessage)},isEmptyMessage(){return!this.localMessage||""===this.localMessage.trim()},timestamp(){return Date.parse(this.creationDateTime)}},watch:{message(t){this.updateLocalMessage(t)}},beforeMount(){this.updateLocalMessage(this.message)},methods:{t:o.Iu,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 G=r(93379),F=r.n(G),U=r(7795),Y=r.n(U),X=r(90569),Q=r.n(X),K=r(3565),J=r.n(K),tt=r(19216),et=r.n(tt),nt=r(44589),rt=r.n(nt),ot=r(8638),st={};st.styleTagTransform=rt(),st.setAttributes=J(),st.insert=Q().bind(null,"head"),st.domAPI=Y(),st.insertStyleElement=et(),F()(ot.Z,st),ot.Z&&ot.Z.locals&&ot.Z.locals;const it=(0,x.Z)(H,(function(){var t=this,e=t._self._c;return e(t.tag,{directives:[{name:"show",rawName:"v-show",value:!t.deleted,expression:"!deleted"}],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",{attrs:{icon:"icon-close"},on:{click:t.onEditCancel}},[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":!0,icon:"icon-rename"},on:{click:t.onEdit}},[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":!0,icon:"icon-delete"},on:{click:t.onDeleteWithUndo}},[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:{type:"tertiary-no-background","native-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("span",{staticClass:"icon-loading-small"}):e("ArrowRight",{attrs:{size:20}})]},proxy:!0}],null,!1,2357784758)})],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("div",{staticClass:"comment__message",class:{"comment__message--expanded":t.expanded},domProps:{innerHTML:t._s(t.renderedContent)},on:{click:t.onExpand}})])])}),[],!1,null,"e4ab9720",null).exports;var at=r(54298);const ct={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},lt=t=>t.replace(/[[\]\\-]/g,"\\$&"),ut=t=>t.join(""),pt=(t,e)=>{const n=e;if("["!==t.charAt(n))throw new Error("not in a brace expression");const r=[],o=[];let s=n+1,i=!1,a=!1,c=!1,l=!1,u=n,p="";t:for(;s<t.length;){const e=t.charAt(s);if("!"!==e&&"^"!==e||s!==n+1){if("]"===e&&i&&!c){u=s+1;break}if(i=!0,"\\"!==e||c){if("["===e&&!c)for(const[e,[i,c,l]]of Object.entries(ct))if(t.startsWith(e,s)){if(p)return["$.",!1,t.length-n,!0];s+=e.length,l?o.push(i):r.push(i),a=a||c;continue t}c=!1,p?(e>p?r.push(lt(p)+"-"+lt(e)):e===p&&r.push(lt(e)),p="",s++):t.startsWith("-]",s+1)?(r.push(lt(e+"-")),s+=2):t.startsWith("-",s+1)?(p=e,s+=2):(r.push(lt(e)),s++)}else c=!0,s++}else l=!0,s++}if(u<s)return["",!1,0,!1];if(!r.length&&!o.length)return["$.",!1,t.length-n,!0];if(0===o.length&&1===r.length&&/^\\?.$/.test(r[0])&&!l){return[(h=2===r[0].length?r[0].slice(-1):r[0],h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,u-n,!1]}var h;const d="["+(l?"^":"")+ut(r)+"]",m="["+(l?"":"^")+ut(o)+"]";return[r.length&&o.length?"("+d+"|"+m+")":r.length?d:m,a,u-n,!0]};var ht=r(34155),dt=r(25108);const mt=(t,e,n={})=>(Ht(e),!(!n.nocomment&&"#"===e.charAt(0))&&new Ut(e,n).match(t)),ft=/^\*+([^+@!?\*\[\(]*)$/,gt=t=>e=>!e.startsWith(".")&&e.endsWith(t),bt=t=>e=>e.endsWith(t),vt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),At=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),yt=/^\*+\.\*+$/,Ct=t=>!t.startsWith(".")&&t.includes("."),wt=t=>"."!==t&&".."!==t&&t.includes("."),_t=/^\.\*+$/,xt=t=>"."!==t&&".."!==t&&t.startsWith("."),Ot=/^\*+$/,jt=t=>0!==t.length&&!t.startsWith("."),St=t=>0!==t.length&&"."!==t&&".."!==t,kt=/^\?+([^+@!?\*\[\(]*)?$/,Et=([t,e=""])=>{const n=Pt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Tt=([t,e=""])=>{const n=It([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Mt=([t,e=""])=>{const n=It([t]);return e?t=>n(t)&&t.endsWith(e):n},Nt=([t,e=""])=>{const n=Pt([t]);return e?t=>n(t)&&t.endsWith(e):n},Pt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},It=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},$t="object"==typeof ht&&ht?"object"==typeof ht.env&&ht.env&&ht.env.__MINIMATCH_TESTING_PLATFORM__||ht.platform:"posix";mt.sep="win32"===$t?"\\":"/";const Rt=Symbol("globstar **");mt.GLOBSTAR=Rt;const Dt={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Lt="[^/]",Bt=Lt+"*?",Zt=t=>t.split("").reduce(((t,e)=>(t[e]=!0,t)),{}),Wt=Zt("().*{}+?[]^$\\!"),zt=Zt("[.(");mt.filter=(t,e={})=>n=>mt(n,t,e);const Vt=(t,e={})=>Object.assign({},t,e);mt.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return mt;const e=mt;return Object.assign(((n,r,o={})=>e(n,r,Vt(t,o))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,Vt(t,n))}static defaults(n){return e.defaults(Vt(t,n)).Minimatch}},unescape:(n,r={})=>e.unescape(n,Vt(t,r)),escape:(n,r={})=>e.escape(n,Vt(t,r)),filter:(n,r={})=>e.filter(n,Vt(t,r)),defaults:n=>e.defaults(Vt(t,n)),makeRe:(n,r={})=>e.makeRe(n,Vt(t,r)),braceExpand:(n,r={})=>e.braceExpand(n,Vt(t,r)),match:(n,r,o={})=>e.match(n,r,Vt(t,o)),sep:e.sep,GLOBSTAR:Rt})};const qt=(t,e={})=>(Ht(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:at(t));mt.braceExpand=qt;const Ht=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};mt.makeRe=(t,e={})=>new Ut(t,e).makeRe(),mt.match=(t,e,n={})=>{const r=new Ut(e,n);return t=t.filter((t=>r.match(t))),r.options.nonull&&!t.length&&t.push(e),t};const Gt=/[?*]|[+@!]\(.*?\)|\[|\]/,Ft=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Ut{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){Ht(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||$t,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>dt.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map(((t,e,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&Gt.test(t[2])||Gt.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,r),this.set=r.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const r=t[n];1===n&&""===r&&""===t[0]||"."!==r&&""!==r||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const r=t[n-1];r&&"."!==r&&".."!==r&&"**"!==r&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let r=-1;for(;-1!==(r=n.indexOf("**",r+1));){let o=r;for(;"**"===n[o+1];)o++;o>r&&n.splice(r+1,o-r);let s=n[r+1];const i=n[r+2],a=n[r+3];if(".."!==s)continue;if(!i||"."===i||".."===i||!a||"."===a||".."===a)continue;e=!0,n.splice(r,1);const c=n.slice(0);c[r]="**",t.push(c),r--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const r=n[t];1===t&&""===r&&""===n[0]||"."!==r&&""!==r||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let o=0;for(;-1!==(o=n.indexOf("..",o+1));){const t=n[o-1];if(t&&"."!==t&&".."!==t&&"**"!==t){e=!0;const t=1===o&&"**"===n[o+1]?["."]:[];n.splice(o-1,2,...t),0===n.length&&n.push(""),o-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const r=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);r&&(t[e]=r,t[n]=[])}return t.filter((t=>t.length))}partsMatch(t,e,n=!1){let r=0,o=0,s=[],i="";for(;r<t.length&&o<e.length;)if(t[r]===e[o])s.push("b"===i?e[o]:t[r]),r++,o++;else if(n&&"**"===t[r]&&e[o]===t[r+1])s.push(t[r]),r++;else if(n&&"**"===e[o]&&t[r]===e[o+1])s.push(e[o]),o++;else if("*"!==t[r]||!e[o]||!this.options.dot&&e[o].startsWith(".")||"**"===e[o]){if("*"!==e[o]||!t[r]||!this.options.dot&&t[r].startsWith(".")||"**"===t[r])return!1;if("a"===i)return!1;i="b",s.push(e[o]),r++,o++}else{if("b"===i)return!1;i="a",s.push(t[r]),r++,o++}return t.length===e.length&&s}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let r=0;r<t.length&&"!"===t.charAt(r);r++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const r=this.options;if(this.isWindows){const n=""===t[0]&&""===t[1]&&"?"===t[2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3]),r=""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3]);if(n&&r){const n=t[3],r=e[3];n.toLowerCase()===r.toLowerCase()&&(t[3]=r)}else if(r&&"string"==typeof t[0]){const n=e[3],r=t[0];n.toLowerCase()===r.toLowerCase()&&(e[3]=r,e=e.slice(3))}else if(n&&"string"==typeof e[0]){const n=t[3];n.toLowerCase()===e[0].toLowerCase()&&(e[0]=n,t=t.slice(3))}}const{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var s=0,i=0,a=t.length,c=e.length;s<a&&i<c;s++,i++){this.debug("matchOne loop");var l=e[i],u=t[s];if(this.debug(e,l,u),!1===l)return!1;if(l===Rt){this.debug("GLOBSTAR",[e,l,u]);var p=s,h=i+1;if(h===c){for(this.debug("** at the end");s<a;s++)if("."===t[s]||".."===t[s]||!r.dot&&"."===t[s].charAt(0))return!1;return!0}for(;p<a;){var d=t[p];if(this.debug("\nglobstar while",t,p,e,h,d),this.matchOne(t.slice(p),e.slice(h),n))return this.debug("globstar found match!",p,a,d),!0;if("."===d||".."===d||!r.dot&&"."===d.charAt(0)){this.debug("dot detected!",t,p,e,h);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!n||(this.debug("\n>>> no match, partial?",t,p,e,h),p!==a))}let o;if("string"==typeof l?(o=u===l,this.debug("string match",l,u,o)):(o=l.test(u),this.debug("pattern match",l,u,o)),!o)return!1}if(s===a&&i===c)return!0;if(s===a)return n;if(i===c)return s===a-1&&""===t[s];throw new Error("wtf?")}braceExpand(){return qt(this.pattern,this.options)}parse(t){Ht(t);const e=this.options;if("**"===t)return Rt;if(""===t)return"";let n,r=null;(n=t.match(Ot))?r=e.dot?St:jt:(n=t.match(ft))?r=(e.nocase?e.dot?At:vt:e.dot?bt:gt)(n[1]):(n=t.match(kt))?r=(e.nocase?e.dot?Tt:Et:e.dot?Mt:Nt)(n):(n=t.match(yt))?r=e.dot?wt:Ct:(n=t.match(_t))&&(r=xt);let o="",s=!1,i=!1;const a=[],c=[];let l,u=!1,p=!1,h="."===t.charAt(0),d=e.dot||h;const m=t=>"."===t.charAt(0)?"":e.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",f=()=>{if(u){switch(u){case"*":o+=Bt,s=!0;break;case"?":o+=Lt,s=!0;break;default:o+="\\"+u}this.debug("clearStateChar %j %j",u,o),u=!1}};for(let n,r=0;r<t.length&&(n=t.charAt(r));r++)if(this.debug("%s\t%s %s %j",t,r,o,n),i){if("/"===n)return!1;Wt[n]&&(o+="\\"),o+=n,i=!1}else switch(n){case"/":return!1;case"\\":f(),i=!0;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",t,r,o,n),this.debug("call clearStateChar %j",u),f(),u=n,e.noext&&f();continue;case"(":{if(!u){o+="\\(";continue}const e={type:u,start:r-1,reStart:o.length,open:Dt[u].open,close:Dt[u].close};this.debug(this.pattern,"\t",e),a.push(e),o+=e.open,0===e.start&&"!"!==e.type&&(h=!0,o+=m(t.slice(r+1))),this.debug("plType %j %j",u,o),u=!1;continue}case")":{const t=a[a.length-1];if(!t){o+="\\)";continue}a.pop(),f(),s=!0,l=t,o+=l.close,"!"===l.type&&c.push(Object.assign(l,{reEnd:o.length}));continue}case"|":{const e=a[a.length-1];if(!e){o+="\\|";continue}f(),o+="|",0===e.start&&"!"!==e.type&&(h=!0,o+=m(t.slice(r+1)));continue}case"[":f();const[d,g,b,v]=pt(t,r);b?(o+=d,p=p||g,r+=b-1,s=s||v):o+="\\[";continue;case"]":o+="\\"+n;continue;default:f(),o+=Ft(n)}for(l=a.pop();l;l=a.pop()){let t;t=o.slice(l.reStart+l.open.length),this.debug(this.pattern,"setting tail",o,l),t=t.replace(/((?:\\{2}){0,64})(\\?)\|/g,((t,e,n)=>(n||(n="\\"),e+e+n+"|"))),this.debug("tail=%j\n %s",t,t,l,o);const e="*"===l.type?Bt:"?"===l.type?Lt:"\\"+l.type;s=!0,o=o.slice(0,l.reStart)+e+"\\("+t}f(),i&&(o+="\\\\");const g=zt[o.charAt(0)];for(let t=c.length-1;t>-1;t--){const e=c[t],n=o.slice(0,e.reStart),r=o.slice(e.reStart,e.reEnd-8);let s=o.slice(e.reEnd);const i=o.slice(e.reEnd-8,e.reEnd)+s,a=n.split(")").length,l=n.split("(").length-a;let u=s;for(let t=0;t<l;t++)u=u.replace(/\)[+*?]?/,"");s=u,o=n+r+s+(""===s?"(?:$|\\/)":"")+i}if(""!==o&&s&&(o="(?=.)"+o),g&&(o=(h?"":d?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)")+o),!e.nocase||s||e.nocaseMagicOnly||(s=t.toUpperCase()!==t.toLowerCase()),!s)return o.replace(/\\(.)/g,"$1");const b=(e.nocase?"i":"")+(p?"u":"");try{const e=r?{_glob:t,_src:o,test:r}:{_glob:t,_src:o};return Object.assign(new RegExp("^"+o+"$",b),e)}catch(t){return this.debug("invalid regexp",t),new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?Bt:e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=e.nocase?"i":"";let o=t.map((t=>{const e=t.map((t=>"string"==typeof t?Ft(t):t===Rt?Rt:t._src));return e.forEach(((t,r)=>{const o=e[r+1],s=e[r-1];t===Rt&&s!==Rt&&(void 0===s?void 0!==o&&o!==Rt?e[r+1]="(?:\\/|"+n+"\\/)?"+o:e[r]=n:void 0===o?e[r-1]=s+"(?:\\/|"+n+")?":o!==Rt&&(e[r-1]=s+"(?:\\/|\\/"+n+"\\/)"+o,e[r+1]=Rt))})),e.filter((t=>t!==Rt)).join("/")})).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,r)}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const r=this.slashSplit(t);this.debug(this.pattern,"split",r);const o=this.set;this.debug(this.pattern,"set",o);let s=r[r.length-1];if(!s)for(let t=r.length-2;!s&&t>=0;t--)s=r[t];for(let t=0;t<o.length;t++){const i=o[t];let a=r;if(n.matchBase&&1===i.length&&(a=[s]),this.matchOne(a,i,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return mt.defaults(t).Minimatch}}function Yt(t){const e={};for(const n of t.keys())e[n]=t.get(n);return e}mt.Minimatch=Ut,mt.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),mt.unescape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Xt,Qt=r(23722);r(16932),r(65070),function(t){t.Array="array",t.Object="object",t.Original="original"}(Xt||(Xt={}));const Kt=async function(t,e){let{resourceType:n,resourceId:r}=t;const o=["",n,r].join("/"),s=e.datetime?`<oc:datetime>${e.datetime.toISOString()}</oc:datetime>`:"",i=await W.customRequest(o,Object.assign({method:"REPORT",data:`<?xml version="1.0"?>\n\t\t\t<oc:filter-comments\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t\t<oc:limit>${e.limit??20}</oc:limit>\n\t\t\t\t<oc:offset>${e.offset||0}</oc:offset>\n\t\t\t\t${s}\n\t\t\t</oc:filter-comments>`},e)),a=await i.text(),c=await(0,Z.sw)(a);return function(t,e,n=!1){return n?{data:e,headers:t.headers?Yt(t.headers):{},status:t.status,statusText:t.statusText}:e}(i,Jt(c,!0),!0)},Jt=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{multistatus:{response:n}}=t;return n.map((t=>{const{propstat:{prop:n}}=t;return function(t,e,n=!1){const{getlastmodified:r=null,getcontentlength:o="0",resourcetype:s=null,getcontenttype:i=null,getetag:a=null}=t,c=s&&"object"==typeof s&&void 0!==s.collection?"directory":"file",l={filename:e,basename:Qt.basename(e),lastmod:r,size:parseInt(o,10),type:c,etag:"string"==typeof a?a.replace(/"/g,""):null};return"file"===c&&(l.mime=i&&"string"==typeof i?i.split(";")[0]:""),n&&(l.props=t),l}(n,n.id.toString(),e)}))};var te=r(43554);const ee=(0,i.aZ)({props:{resourceId:{type:Number,required:!0},resourceType:{type:String,default:"files"}},data:()=>({editorData:{actorDisplayName:(0,s.ts)().displayName,actorId:(0,s.ts)().uid,key:"editor"},userData:{}}),methods:{async autoComplete(t,e){const{data:n}=await B.Z.get((0,R.generateOcsUrl)("core/autocomplete/get"),{params:{search:t,itemType:"files",itemId:this.resourceId,sorter:"commenters|share-recipients",limit:(0,te.j)("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,s.ts)()?.uid===t.mentionId}})),this.userData}}});var ne=r(25108);i.ZP.use(c.ZP),i.ZP.use(y);const re={name:"Comments",components:{Comment:it,NcEmptyContent:C.Z,NcButton:w.Z,RefreshIcon:O,MessageReplyTextIcon:S,AlertCircleOutlineIcon:k.Z},mixins:[ee],data:()=>({error:"",loading:!1,done:!1,resourceId:null,offset:0,comments:[],cancelRequest:()=>{},Comment:it,userData:{}}),computed:{hasComments(){return this.comments.length>0},isFirstLoading(){return this.loading&&0===this.offset}},methods:{t:o.Iu,async onVisibilityChange(t){if(t)try{await((t,e,n)=>{const r=["",t,e].join("/"),o=n.toUTCString();return W.customRequest(r,{method:"PROPPATCH",data:`<?xml version="1.0"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:readMarker>${o}</oc:readMarker>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`})})(this.resourceType,this.resourceId,new Date)}catch(t){(0,a.x2)(t.message||(0,o.Iu)("comments","Failed to mark comments as read"))}},async update(t){this.resourceId=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,r){return await t(e,Object.assign({signal:n},r))},abort:()=>e.abort()}}(Kt);this.cancelRequest=e;const{data:n}=await t({resourceType:this.resourceType,resourceId:this.resourceId},{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,o.Iu)("comments","Unable to load the comments list"),ne.error("Error loading the comments list",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):ne.error("Could not find the deleted comment in the list",t)},resetState(){this.error="",this.loading=!1,this.done=!1,this.offset=0,this.comments=[]}}};var oe=r(28559),se={};se.styleTagTransform=rt(),se.setAttributes=J(),se.insert=Q().bind(null,"head"),se.domAPI=Y(),se.insertStyleElement=et(),F()(oe.Z,se),oe.Z&&oe.Z.locals&&oe.Z.locals;const ie=(0,x.Z)(re,(function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"observe-visibility",rawName:"v-observe-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.resourceId},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("MessageReplyTextIcon")]},proxy:!0}],null,!1,1033639148)}):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.resourceId,"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("AlertCircleOutlineIcon")]},proxy:!0}],null,!1,66050004)}),t._v(" "),e("NcButton",{staticClass:"comments__retry",on:{click:t.getComments},scopedSlots:t._u([{key:"icon",fn:function(){return[e("RefreshIcon")]},proxy:!0}],null,!1,3924573781)},[t._v("\n\t\t\t\t"+t._s(t.t("comments","Retry"))+"\n\t\t\t")])]:t._e()]],2)}),[],!1,null,"b2489a3c",null).exports;r.nc=btoa((0,s.IH)()),i.ZP.mixin({data:()=>({logger:z}),methods:{t:o.Iu,n:o.uN}});var ae=r(25108);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]:{};return e={...e,propsData:{...e.propsData??{},resourceType:t}},new(i.ZP.extend(ie))(e)}}}),ae.debug("OCA.Comments.View initialized")},5623:t=>{"use strict";function e(t,e,o){t instanceof RegExp&&(t=n(t,o)),e instanceof RegExp&&(e=n(e,o));var s=r(t,e,o);return s&&{start:s[0],end:s[1],pre:o.slice(0,s[0]),body:o.slice(s[0]+t.length,s[1]),post:o.slice(s[1]+e.length)}}function n(t,e){var n=e.match(t);return n?n[0]:null}function r(t,e,n){var r,o,s,i,a,c=n.indexOf(t),l=n.indexOf(e,c+1),u=c;if(c>=0&&l>0){if(t===e)return[c,l];for(r=[],s=n.length;u>=0&&!a;)u==c?(r.push(u),c=n.indexOf(t,u+1)):1==r.length?a=[r.pop(),l]:((o=r.pop())<s&&(s=o,i=l),l=n.indexOf(e,u+1)),u=c<l&&c>=0?c:l;r.length&&(a=[s,i])}return a}t.exports=e,e.range=r},8638:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(87537),o=n.n(r),s=n(23645),i=n.n(s)()(o());i.push([t.id,".comment[data-v-e4ab9720]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-e4ab9720]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-e4ab9720]{display:flex;flex-grow:1;flex-direction:column}.comment__header[data-v-e4ab9720]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-e4ab9720]{margin-left:10px !important}.comment__author[data-v-e4ab9720]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-e4ab9720],.comment__timestamp[data-v-e4ab9720]{margin-left:auto;text-align:right;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-e4ab9720]{position:relative}.comment__editor-description[data-v-e4ab9720]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-e4ab9720]{position:absolute !important;bottom:0;right:0}.comment__message[data-v-e4ab9720]{white-space:pre-wrap;word-break:break-word;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-e4ab9720]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-e4ab9720]{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,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,2BAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,gBAAA,CACA,gBAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,QAAA,CACA,OAAA,CAGD,mCACC,oBAAA,CACA,qBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA3EiB",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}\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-left: $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-left: auto;\n\t\ttext-align: right;\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: 0;\n\t\tright: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: break-word;\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=i},28559:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(87537),o=n.n(r),s=n(23645),i=n.n(s)()(o());i.push([t.id,".comments[data-v-b2489a3c]{min-height:100%;display:flex;flex-direction:column}.comments__empty[data-v-b2489a3c],.comments__error[data-v-b2489a3c]{flex:1 0}.comments__retry[data-v-b2489a3c]{margin:0 auto}.comments__info[data-v-b2489a3c]{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=i},16932:(t,e,n)=>{"use strict";const r=n(78501),o=n(58844),s=n(41192);t.exports={XMLParser:o,XMLValidator:r,XMLBuilder:s}},65070:t=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var e="function"==typeof Map?new Map:void 0;return n=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return r(t,arguments,s(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),o(i,t)},n(t)}function r(t,e,n){return r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var s=new(Function.bind.apply(t,r));return n&&o(s,n.prototype),s},r.apply(null,arguments)}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}var i=function(t){function n(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=function(t,n){return!n||"object"!==e(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}(this,s(n).call(this,t))).name="ObjectPrototypeMutationError",r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(n,t),n}(n(Error));function a(t,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=n.split("."),s=o.length,i=function(e){var n=o[e];if(!t)return{v:void 0};if("+"===n){if(Array.isArray(t))return{v:t.map((function(n,s){var i=o.slice(e+1);return i.length>0?a(n,i.join("."),r):r(t,s,o,e)}))};var s=o.slice(0,e).join(".");throw new Error("Object at wildcard (".concat(s,") is not an array"))}t=r(t,n,o,e)},c=0;c<s;c++){var l=i(c);if("object"===e(l))return l.v}return t}function c(t,e){return t.length===e+1}t.exports={set:function(t,n,r){if("object"!=e(t)||null===t)return t;if(void 0===n)return t;if("number"==typeof n)return t[n]=r,t[n];try{return a(t,n,(function(t,e,n,o){if(t===Reflect.getPrototypeOf({}))throw new i("Attempting to mutate Object.prototype");if(!t[e]){var s=Number.isInteger(Number(n[o+1])),a="+"===n[o+1];t[e]=s||a?[]:{}}return c(n,o)&&(t[e]=r),t[e]}))}catch(e){if(e instanceof i)throw e;return t}},get:function(t,n){if("object"!=e(t)||null===t)return t;if(void 0===n)return t;if("number"==typeof n)return t[n];try{return a(t,n,(function(t,e){return t[e]}))}catch(e){return t}},has:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("object"!=e(t)||null===t)return!1;if(void 0===n)return!1;if("number"==typeof n)return n in t;try{var o=!1;return a(t,n,(function(t,e,n,s){if(!c(n,s))return t&&t[e];o=r.own?t.hasOwnProperty(e):e in t})),o}catch(t){return!1}},hasOwn:function(t,e,n){return this.has(t,e,n||{own:!0})},isIn:function(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("object"!=e(t)||null===t)return!1;if(void 0===n)return!1;try{var s=!1,i=!1;return a(t,n,(function(t,n,o,a){return s=s||t===r||!!t&&t[n]===r,i=c(o,a)&&"object"===e(t)&&n in t,t&&t[n]})),o.validPath?s&&i:s}catch(t){return!1}},ObjectPrototypeMutationError:i}},23722:(t,e,n)=>{"use strict";var r=n(34155),o=n(89539),s=function(t){return"string"==typeof t};function i(t,e){for(var n=[],r=0;r<t.length;r++){var o=t[r];o&&"."!==o&&(".."===o?n.length&&".."!==n[n.length-1]?n.pop():e&&n.push(".."):n.push(o))}return n}var a=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,c={};function l(t){return a.exec(t).slice(1)}c.resolve=function(){for(var t="",e=!1,n=arguments.length-1;n>=-1&&!e;n--){var o=n>=0?arguments[n]:r.cwd();if(!s(o))throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,e="/"===o.charAt(0))}return(e?"/":"")+(t=i(t.split("/"),!e).join("/"))||"."},c.normalize=function(t){var e=c.isAbsolute(t),n="/"===t.substr(-1);return(t=i(t.split("/"),!e).join("/"))||e||(t="."),t&&n&&(t+="/"),(e?"/":"")+t},c.isAbsolute=function(t){return"/"===t.charAt(0)},c.join=function(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];if(!s(n))throw new TypeError("Arguments to path.join must be strings");n&&(t+=t?"/"+n:n)}return c.normalize(t)},c.relative=function(t,e){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n+1)}t=c.resolve(t).substr(1),e=c.resolve(e).substr(1);for(var r=n(t.split("/")),o=n(e.split("/")),s=Math.min(r.length,o.length),i=s,a=0;a<s;a++)if(r[a]!==o[a]){i=a;break}var l=[];for(a=i;a<r.length;a++)l.push("..");return(l=l.concat(o.slice(i))).join("/")},c._makeLong=function(t){return t},c.dirname=function(t){var e=l(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},c.basename=function(t,e){var n=l(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},c.extname=function(t){return l(t)[3]},c.format=function(t){if(!o.isObject(t))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof t);var e=t.root||"";if(!s(e))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof t.root);return(t.dir?t.dir+c.sep:"")+(t.base||"")},c.parse=function(t){if(!s(t))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=l(t);if(!e||4!==e.length)throw new TypeError("Invalid path '"+t+"'");return e[1]=e[1]||"",e[2]=e[2]||"",e[3]=e[3]||"",{root:e[0],dir:e[0]+e[1].slice(0,e[1].length-1),base:e[2],ext:e[3],name:e[2].slice(0,e[2].length-e[3].length)}},c.sep="/",c.delimiter=":",t.exports=c},54298:(t,e,n)=>{var r=n(5623);t.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),g(function(t){return t.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(i).split("\\,").join(a).split("\\.").join(c)}(t),!0).map(u)):[]};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function l(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function u(t){return t.split(o).join("\\").split(s).join("{").split(i).join("}").split(a).join(",").split(c).join(".")}function p(t){if(!t)return[""];var e=[],n=r("{","}",t);if(!n)return t.split(",");var o=n.pre,s=n.body,i=n.post,a=o.split(",");a[a.length-1]+="{"+s+"}";var c=p(i);return i.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}function h(t){return"{"+t+"}"}function d(t){return/^-?0\d/.test(t)}function m(t,e){return t<=e}function f(t,e){return t>=e}function g(t,e){var n=[],o=r("{","}",t);if(!o)return[t];var s=o.pre,a=o.post.length?g(o.post,!1):[""];if(/\$$/.test(o.pre))for(var c=0;c<a.length;c++){var u=s+"{"+o.body+"}"+a[c];n.push(u)}else{var b,v,A=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),y=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),C=A||y,w=o.body.indexOf(",")>=0;if(!C&&!w)return o.post.match(/,.*\}/)?g(t=o.pre+"{"+o.body+i+o.post):[t];if(C)b=o.body.split(/\.\./);else if(1===(b=p(o.body)).length&&1===(b=g(b[0],!1).map(h)).length)return a.map((function(t){return o.pre+b[0]+t}));if(C){var _=l(b[0]),x=l(b[1]),O=Math.max(b[0].length,b[1].length),j=3==b.length?Math.abs(l(b[2])):1,S=m;x<_&&(j*=-1,S=f);var k=b.some(d);v=[];for(var E=_;S(E,x);E+=j){var T;if(y)"\\"===(T=String.fromCharCode(E))&&(T="");else if(T=String(E),k){var M=O-T.length;if(M>0){var N=new Array(M+1).join("0");T=E<0?"-"+N+T.slice(1):N+T}}v.push(T)}}else{v=[];for(var P=0;P<b.length;P++)v.push.apply(v,g(b[P],!1))}for(P=0;P<v.length;P++)for(c=0;c<a.length;c++)u=s+v[P]+a[c],(!e||C||u)&&n.push(u)}return n}}},s={};function i(t){var e=s[t];if(void 0!==e)return e.exports;var n=s[t]={id:t,loaded:!1,exports:{}};return o[t].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=o,e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){n=e[u][0],r=e[u][1],o=e[u][2];for(var a=!0,c=0;c<n.length;c++)(!1&o||s>=o)&&Object.keys(i.O).every((t=>i.O[t](n[c])))?n.splice(c--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var l=r();void 0!==l&&(t=l)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.f={},i.e=t=>Promise.all(Object.keys(i.f).reduce(((e,n)=>(i.f[n](t,e),e)),[])),i.u=t=>t+"-"+t+".js?v="+{4720:"67ff1816113751e83e78",6318:"86e386ff1cd5ff5bd1f1",6512:"930a9f0a458cd206d9d1"}[t],i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n={},r="nextcloud:",i.l=(t,e,o,s)=>{if(n[t])n[t].push(e);else{var a,c;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var p=l[u];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+o){a=p;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.setAttribute("data-webpack",r+o),a.src=t),n[t]=[e];var h=(e,r)=>{a.onerror=a.onload=null,clearTimeout(d);var o=n[t];if(delete n[t],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((t=>t(r))),e)return e(r)},d=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),c&&document.head.appendChild(a)}},i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),i.j=6335,(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!t;)t=n[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t})(),(()=>{i.b=document.baseURI||self.location.href;var t={6335:0};i.f.j=(e,n)=>{var r=i.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=t[e]=[n,o]));n.push(r[2]=o);var s=i.p+i.u(e),a=new Error;i.l(s,(n=>{if(i.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,r[1](a)}}),"chunk-"+e,e)}},i.O.j=e=>0===t[e];var e=(e,n)=>{var r,o,s=n[0],a=n[1],c=n[2],l=0;if(s.some((e=>0!==t[e]))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(c)var u=c(i)}for(e&&e(n);l<s.length;l++)o=s[l],i.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return i.O(u)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),i.nc=void 0;var a=i.O(void 0,[7874],(()=>i(24921)));a=i.O(a)})();
  3. //# sourceMappingURL=comments-comments-app.js.map?v=b0a2aa0c16674ce6ce83