1
0

comments-comments-app.js 48 KB

123
  1. /*! For license information please see comments-comments-app.js.license?v=2c88c3951134d07fb08b */
  2. (()=>{var e,n,r,s={67192:(e,n,r)=>{"use strict";var s=r(53334),o=r(92457),i=r(85471),a=r(85168),c=r(55042),l=r(10833),u=r(9518);const p={name:"RefreshIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var d=r(14486);const h=(0,d.A)(p,(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,"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,m={name:"MessageReplyTextIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},f=(0,d.A)(m,(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||null,"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,g={name:"AlertCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},A=(0,d.A)(g,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon alert-circle-outline-icon",attrs:{"aria-hidden":!t.title||null,"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:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var b=r(63420),v=r(24764),y=r(10501),C=r(41944),w=r(4604),_=r(80701),x=r(9191),O=r(63814);const j=function(){return(0,O.dC)("dav/comments")};function S(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 E=r(26287),M=r(44719);const T=(0,M.UU)(j()),N=t=>{T.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:null!=t?t:""})};(0,o.zo)(N),N((0,o.do)());const k=T,P=(0,r(53529).YK)().setApp("comments").detectUser().build();var R=r(96763);const I={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 s=["",t,e,n].join("/");return await k.customRequest(s,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>'.concat(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),P.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.Qg)(t("comments","An error occurred while trying to edit the comment")),R.error(e)}finally{this.loading=!1}},onDeleteWithUndo(){this.deleted=!0;const e=setTimeout(this.onDelete,a.Br);(0,a._h)(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 k.deleteFile(r)}(this.resourceType,this.resourceId,this.id),P.debug("Comment deleted",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id}),this.$emit("delete",this.id)}catch(e){(0,a.Qg)(t("comments","An error occurred while trying to delete the comment")),R.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("/"),s=await E.A.post(j()+r,{actorDisplayName:(0,o.HW)().displayName,actorId:(0,o.HW)().uid,actorType:"users",creationDateTime:(new Date).toUTCString(),message:n,objectType:t,verb:"comment"}),i=r+"/"+parseInt(s.headers["content-location"].split("/").pop()),a=await k.stat(i,{details:!0}),c=a.data.props;return c.actorDisplayName=S(c.actorDisplayName,2),c.message=S(c.message,2),a.data}(this.resourceType,this.resourceId,e);P.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.Qg)(t("comments","An error occurred while trying to create the comment")),R.error(e)}finally{this.loading=!1}}}},$={name:"Comment",components:{ArrowRight:x.A,NcActionButton:b.A,NcActions:v.A,NcActionSeparator:y.A,NcAvatar:C.A,NcButton:u.A,NcDateTime:w.A,NcRichContenteditable:()=>Promise.all([r.e(4208),r.e(5528)]).then(r.bind(r,95528))},mixins:[_.Ay,I],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,o.HW)().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:s.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 D=r(85072),L=r.n(D),B=r(97825),W=r.n(B),z=r(77659),H=r.n(z),V=r(55056),q=r.n(V),G=r(10540),F=r.n(G),U=r(41113),Z=r.n(U),Q=r(95039),Y={};Y.styleTagTransform=Z(),Y.setAttributes=q(),Y.insert=H().bind(null,"head"),Y.domAPI=W(),Y.insertStyleElement=F(),L()(Q.A,Y),Q.A&&Q.A.locals&&Q.A.locals;const X=(0,d.A)($,(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 K=r(38613);const J=(0,i.pM)({props:{resourceId:{type:Number,required:!0},resourceType:{type:String,default:"files"}},data:()=>({editorData:{actorDisplayName:(0,o.HW)().displayName,actorId:(0,o.HW)().uid,key:"editor"},userData:{}}),methods:{async autoComplete(t,e){const{data:n}=await E.A.get((0,O.KT)("core/autocomplete/get"),{params:{search:t,itemType:"files",itemId:this.resourceId,sorter:"commenters|share-recipients",limit:(0,K.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=>{var e;this.userData[t.mentionId]={icon:"icon-user",id:t.mentionId,label:t.mentionDisplayName,source:"users",primary:(null===(e=(0,o.HW)())||void 0===e?void 0:e.uid)===t.mentionId}})),this.userData}}});var tt=r(68928);const et={"[: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]},nt=t=>t.replace(/[[\]\\-]/g,"\\$&"),rt=t=>t.join(""),st=(t,e)=>{const n=e;if("["!==t.charAt(n))throw new Error("not in a brace expression");const r=[],s=[];let o=n+1,i=!1,a=!1,c=!1,l=!1,u=n,p="";t:for(;o<t.length;){const e=t.charAt(o);if("!"!==e&&"^"!==e||o!==n+1){if("]"===e&&i&&!c){u=o+1;break}if(i=!0,"\\"!==e||c){if("["===e&&!c)for(const[e,[i,c,l]]of Object.entries(et))if(t.startsWith(e,o)){if(p)return["$.",!1,t.length-n,!0];o+=e.length,l?s.push(i):r.push(i),a=a||c;continue t}c=!1,p?(e>p?r.push(nt(p)+"-"+nt(e)):e===p&&r.push(nt(e)),p="",o++):t.startsWith("-]",o+1)?(r.push(nt(e+"-")),o+=2):t.startsWith("-",o+1)?(p=e,o+=2):(r.push(nt(e)),o++)}else c=!0,o++}else l=!0,o++}if(u<o)return["",!1,0,!1];if(!r.length&&!s.length)return["$.",!1,t.length-n,!0];if(0===s.length&&1===r.length&&/^\\?.$/.test(r[0])&&!l){return[(d=2===r[0].length?r[0].slice(-1):r[0],d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,u-n,!1]}var d;const h="["+(l?"^":"")+rt(r)+"]",m="["+(l?"":"^")+rt(s)+"]";return[r.length&&s.length?"("+h+"|"+m+")":r.length?h:m,a,u-n,!0]};var ot=r(65606),it=r(96763);const at=(t,e,n={})=>(Lt(e),!(!n.nocomment&&"#"===e.charAt(0))&&new zt(e,n).match(t)),ct=/^\*+([^+@!?\*\[\(]*)$/,lt=t=>e=>!e.startsWith(".")&&e.endsWith(t),ut=t=>e=>e.endsWith(t),pt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),dt=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),ht=/^\*+\.\*+$/,mt=t=>!t.startsWith(".")&&t.includes("."),ft=t=>"."!==t&&".."!==t&&t.includes("."),gt=/^\.\*+$/,At=t=>"."!==t&&".."!==t&&t.startsWith("."),bt=/^\*+$/,vt=t=>0!==t.length&&!t.startsWith("."),yt=t=>0!==t.length&&"."!==t&&".."!==t,Ct=/^\?+([^+@!?\*\[\(]*)?$/,wt=([t,e=""])=>{const n=jt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},_t=([t,e=""])=>{const n=St([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},xt=([t,e=""])=>{const n=St([t]);return e?t=>n(t)&&t.endsWith(e):n},Ot=([t,e=""])=>{const n=jt([t]);return e?t=>n(t)&&t.endsWith(e):n},jt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},St=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},Et="object"==typeof ot&&ot?"object"==typeof ot.env&&ot.env&&ot.env.__MINIMATCH_TESTING_PLATFORM__||ot.platform:"posix";at.sep="win32"===Et?"\\":"/";const Mt=Symbol("globstar **");at.GLOBSTAR=Mt;const Tt={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Nt="[^/]",kt=Nt+"*?",Pt=t=>t.split("").reduce(((t,e)=>(t[e]=!0,t)),{}),Rt=Pt("().*{}+?[]^$\\!"),It=Pt("[.(");at.filter=(t,e={})=>n=>at(n,t,e);const $t=(t,e={})=>Object.assign({},t,e);at.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return at;const e=at;return Object.assign(((n,r,s={})=>e(n,r,$t(t,s))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,$t(t,n))}static defaults(n){return e.defaults($t(t,n)).Minimatch}},unescape:(n,r={})=>e.unescape(n,$t(t,r)),escape:(n,r={})=>e.escape(n,$t(t,r)),filter:(n,r={})=>e.filter(n,$t(t,r)),defaults:n=>e.defaults($t(t,n)),makeRe:(n,r={})=>e.makeRe(n,$t(t,r)),braceExpand:(n,r={})=>e.braceExpand(n,$t(t,r)),match:(n,r,s={})=>e.match(n,r,$t(t,s)),sep:e.sep,GLOBSTAR:Mt})};const Dt=(t,e={})=>(Lt(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:tt(t));at.braceExpand=Dt;const Lt=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};at.makeRe=(t,e={})=>new zt(t,e).makeRe(),at.match=(t,e,n={})=>{const r=new zt(e,n);return t=t.filter((t=>r.match(t))),r.options.nonull&&!t.length&&t.push(e),t};const Bt=/[?*]|[+@!]\(.*?\)|\[|\]/,Wt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class zt{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){Lt(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Et,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)=>it.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]&&Bt.test(t[2])||Bt.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 s=r;for(;"**"===n[s+1];)s++;s>r&&n.splice(r+1,s-r);let o=n[r+1];const i=n[r+2],a=n[r+3];if(".."!==o)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 s=0;for(;-1!==(s=n.indexOf("..",s+1));){const t=n[s-1];if(t&&"."!==t&&".."!==t&&"**"!==t){e=!0;const t=1===s&&"**"===n[s+1]?["."]:[];n.splice(s-1,2,...t),0===n.length&&n.push(""),s-=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,s=0,o=[],i="";for(;r<t.length&&s<e.length;)if(t[r]===e[s])o.push("b"===i?e[s]:t[r]),r++,s++;else if(n&&"**"===t[r]&&e[s]===t[r+1])o.push(t[r]),r++;else if(n&&"**"===e[s]&&t[r]===e[s+1])o.push(e[s]),s++;else if("*"!==t[r]||!e[s]||!this.options.dot&&e[s].startsWith(".")||"**"===e[s]){if("*"!==e[s]||!t[r]||!this.options.dot&&t[r].startsWith(".")||"**"===t[r])return!1;if("a"===i)return!1;i="b",o.push(e[s]),r++,s++}else{if("b"===i)return!1;i="a",o.push(t[r]),r++,s++}return t.length===e.length&&o}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:s=1}=this.options;s>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,i=0,a=t.length,c=e.length;o<a&&i<c;o++,i++){this.debug("matchOne loop");var l=e[i],u=t[o];if(this.debug(e,l,u),!1===l)return!1;if(l===Mt){this.debug("GLOBSTAR",[e,l,u]);var p=o,d=i+1;if(d===c){for(this.debug("** at the end");o<a;o++)if("."===t[o]||".."===t[o]||!r.dot&&"."===t[o].charAt(0))return!1;return!0}for(;p<a;){var h=t[p];if(this.debug("\nglobstar while",t,p,e,d,h),this.matchOne(t.slice(p),e.slice(d),n))return this.debug("globstar found match!",p,a,h),!0;if("."===h||".."===h||!r.dot&&"."===h.charAt(0)){this.debug("dot detected!",t,p,e,d);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!n||(this.debug("\n>>> no match, partial?",t,p,e,d),p!==a))}let s;if("string"==typeof l?(s=u===l,this.debug("string match",l,u,s)):(s=l.test(u),this.debug("pattern match",l,u,s)),!s)return!1}if(o===a&&i===c)return!0;if(o===a)return n;if(i===c)return o===a-1&&""===t[o];throw new Error("wtf?")}braceExpand(){return Dt(this.pattern,this.options)}parse(t){Lt(t);const e=this.options;if("**"===t)return Mt;if(""===t)return"";let n,r=null;(n=t.match(bt))?r=e.dot?yt:vt:(n=t.match(ct))?r=(e.nocase?e.dot?dt:pt:e.dot?ut:lt)(n[1]):(n=t.match(Ct))?r=(e.nocase?e.dot?_t:wt:e.dot?xt:Ot)(n):(n=t.match(ht))?r=e.dot?ft:mt:(n=t.match(gt))&&(r=At);let s="",o=!1,i=!1;const a=[],c=[];let l,u=!1,p=!1,d="."===t.charAt(0),h=e.dot||d;const m=t=>"."===t.charAt(0)?"":e.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",f=()=>{if(u){switch(u){case"*":s+=kt,o=!0;break;case"?":s+=Nt,o=!0;break;default:s+="\\"+u}this.debug("clearStateChar %j %j",u,s),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,s,n),i){if("/"===n)return!1;Rt[n]&&(s+="\\"),s+=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,s,n),this.debug("call clearStateChar %j",u),f(),u=n,e.noext&&f();continue;case"(":{if(!u){s+="\\(";continue}const e={type:u,start:r-1,reStart:s.length,open:Tt[u].open,close:Tt[u].close};this.debug(this.pattern,"\t",e),a.push(e),s+=e.open,0===e.start&&"!"!==e.type&&(d=!0,s+=m(t.slice(r+1))),this.debug("plType %j %j",u,s),u=!1;continue}case")":{const t=a[a.length-1];if(!t){s+="\\)";continue}a.pop(),f(),o=!0,l=t,s+=l.close,"!"===l.type&&c.push(Object.assign(l,{reEnd:s.length}));continue}case"|":{const e=a[a.length-1];if(!e){s+="\\|";continue}f(),s+="|",0===e.start&&"!"!==e.type&&(d=!0,s+=m(t.slice(r+1)));continue}case"[":f();const[h,g,A,b]=st(t,r);A?(s+=h,p=p||g,r+=A-1,o=o||b):s+="\\[";continue;case"]":s+="\\"+n;continue;default:f(),s+=Wt(n)}for(l=a.pop();l;l=a.pop()){let t;t=s.slice(l.reStart+l.open.length),this.debug(this.pattern,"setting tail",s,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,s);const e="*"===l.type?kt:"?"===l.type?Nt:"\\"+l.type;o=!0,s=s.slice(0,l.reStart)+e+"\\("+t}f(),i&&(s+="\\\\");const g=It[s.charAt(0)];for(let t=c.length-1;t>-1;t--){const e=c[t],n=s.slice(0,e.reStart),r=s.slice(e.reStart,e.reEnd-8);let o=s.slice(e.reEnd);const i=s.slice(e.reEnd-8,e.reEnd)+o,a=n.split(")").length,l=n.split("(").length-a;let u=o;for(let t=0;t<l;t++)u=u.replace(/\)[+*?]?/,"");o=u,s=n+r+o+(""===o?"(?:$|\\/)":"")+i}if(""!==s&&o&&(s="(?=.)"+s),g&&(s=(d?"":h?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)")+s),!e.nocase||o||e.nocaseMagicOnly||(o=t.toUpperCase()!==t.toLowerCase()),!o)return s.replace(/\\(.)/g,"$1");const A=(e.nocase?"i":"")+(p?"u":"");try{const e=r?{_glob:t,_src:s,test:r}:{_glob:t,_src:s};return Object.assign(new RegExp("^"+s+"$",A),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?kt:e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=e.nocase?"i":"";let s=t.map((t=>{const e=t.map((t=>"string"==typeof t?Wt(t):t===Mt?Mt:t._src));return e.forEach(((t,r)=>{const s=e[r+1],o=e[r-1];t===Mt&&o!==Mt&&(void 0===o?void 0!==s&&s!==Mt?e[r+1]="(?:\\/|"+n+"\\/)?"+s:e[r]=n:void 0===s?e[r-1]=o+"(?:\\/|"+n+")?":s!==Mt&&(e[r-1]=o+"(?:\\/|\\/"+n+"\\/)"+s,e[r+1]=Mt))})),e.filter((t=>t!==Mt)).join("/")})).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,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 s=this.set;this.debug(this.pattern,"set",s);let o=r[r.length-1];if(!o)for(let t=r.length-2;!o&&t>=0;t--)o=r[t];for(let t=0;t<s.length;t++){const i=s[t];let a=r;if(n.matchBase&&1===i.length&&(a=[o]),this.matchOne(a,i,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return at.defaults(t).Minimatch}}function Ht(t){const e={};for(const n of t.keys())e[n]=t.get(n);return e}at.Minimatch=zt,at.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),at.unescape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Vt,qt=r(12692);r(86454),r(26602),Error,function(t){t.Array="array",t.Object="object",t.Original="original"}(Vt||(Vt={}));const Gt=async function(t,e){var n;let{resourceType:r,resourceId:s}=t;const o=["",r,s].join("/"),i=e.datetime?"<oc:datetime>".concat(e.datetime.toISOString(),"</oc:datetime>"):"",a=await k.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>'.concat(null!==(n=e.limit)&&void 0!==n?n:20,"</oc:limit>\n\t\t\t\t<oc:offset>").concat(e.offset||0,"</oc:offset>\n\t\t\t\t").concat(i,"\n\t\t\t</oc:filter-comments>")},e)),c=await a.text(),l=await(0,M.h4)(c);return function(t,e,n=!1){return n?{data:e,headers:t.headers?Ht(t.headers):{},status:t.status,statusText:t.statusText}:e}(a,Ft(l,!0),!0)},Ft=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 function(t,e,n=!1){const{getlastmodified:r=null,getcontentlength:s="0",resourcetype:o=null,getcontenttype:i=null,getetag:a=null}=t,c=o&&"object"==typeof o&&void 0!==o.collection?"directory":"file",l={filename:e,basename:qt.basename(e),lastmod:r,size:parseInt(s,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 Ut=r(96763);const Zt={name:"Comments",components:{Comment:X,NcEmptyContent:l.A,NcButton:u.A,RefreshIcon:h,MessageReplyTextIcon:f,AlertCircleOutlineIcon:A},directives:{elementVisibility:c.Zx},mixins:[J],data(){return{error:"",loading:!1,done:!1,currentResourceId:this.resourceId,offset:0,comments:[],cancelRequest:()=>{},Comment:X,userData:{}}},computed:{hasComments(){return this.comments.length>0},isFirstLoading(){return this.loading&&0===this.offset}},watch:{resourceId(){this.currentResourceId=this.resourceId}},methods:{t:s.Tl,async onVisibilityChange(t){if(t)try{await((t,e,n)=>{const r=["",t,e].join("/"),s=n.toUTCString();return k.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>'.concat(s,"</oc:readMarker>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>")})})(this.resourceType,this.currentResourceId,new Date)}catch(t){(0,a.Qg)(t.message||(0,s.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,r){return await t(e,Object.assign({signal:n},r))},abort:()=>e.abort()}}(Gt);this.cancelRequest=e;const{data:n}=await t({resourceType:this.resourceType,resourceId:this.currentResourceId},{offset:this.offset})||{data:[]};this.logger.debug("Processed ".concat(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,s.Tl)("comments","Unable to load the comments list"),Ut.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):Ut.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 Qt=r(20278),Yt={};Yt.styleTagTransform=Z(),Yt.setAttributes=q(),Yt.insert=H().bind(null,"head"),Yt.domAPI=W(),Yt.insertStyleElement=F(),L()(Qt.A,Yt),Qt.A&&Qt.A.locals&&Qt.A.locals;const Xt=(0,d.A)(Zt,(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("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.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("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,"5b932050",null).exports;r.nc=btoa((0,o.do)()),i.Ay.mixin({data:()=>({logger:P}),methods:{t:s.Tl,n:s.zw}});var Kt=r(96763);window.OCA&&!window.OCA.Comments&&Object.assign(window.OCA,{Comments:{}}),Object.assign(window.OCA.Comments,{View:class{constructor(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"files",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n={...n,propsData:{...null!==(t=n.propsData)&&void 0!==t?t:{},resourceType:e}},new(i.Ay.extend(Xt))(n)}}}),Kt.debug("OCA.Comments.View initialized")},8505:t=>{"use strict";function e(t,e,s){t instanceof RegExp&&(t=n(t,s)),e instanceof RegExp&&(e=n(e,s));var o=r(t,e,s);return o&&{start:o[0],end:o[1],pre:s.slice(0,o[0]),body:s.slice(o[0]+t.length,o[1]),post:s.slice(o[1]+e.length)}}function n(t,e){var n=e.match(t);return n?n[0]:null}function r(t,e,n){var r,s,o,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=[],o=n.length;u>=0&&!a;)u==c?(r.push(u),c=n.indexOf(t,u+1)):1==r.length?a=[r.pop(),l]:((s=r.pop())<o&&(o=s,i=l),l=n.indexOf(e,u+1)),u=c<l&&c>=0?c:l;r.length&&(a=[o,i])}return a}t.exports=e,e.range=r},68928:(t,e,n)=>{var r=n(8505);t.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),g(function(t){return t.split("\\\\").join(s).split("\\{").join(o).split("\\}").join(i).split("\\,").join(a).split("\\.").join(c)}(t),!0).map(u)):[]};var s="\0SLASH"+Math.random()+"\0",o="\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(s).join("\\").split(o).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 s=n.pre,o=n.body,i=n.post,a=s.split(",");a[a.length-1]+="{"+o+"}";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 d(t){return"{"+t+"}"}function h(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=[],s=r("{","}",t);if(!s)return[t];var o=s.pre,a=s.post.length?g(s.post,!1):[""];if(/\$$/.test(s.pre))for(var c=0;c<a.length;c++){var u=o+"{"+s.body+"}"+a[c];n.push(u)}else{var A,b,v=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),y=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),C=v||y,w=s.body.indexOf(",")>=0;if(!C&&!w)return s.post.match(/,.*\}/)?g(t=s.pre+"{"+s.body+i+s.post):[t];if(C)A=s.body.split(/\.\./);else if(1===(A=p(s.body)).length&&1===(A=g(A[0],!1).map(d)).length)return a.map((function(t){return s.pre+A[0]+t}));if(C){var _=l(A[0]),x=l(A[1]),O=Math.max(A[0].length,A[1].length),j=3==A.length?Math.abs(l(A[2])):1,S=m;x<_&&(j*=-1,S=f);var E=A.some(h);b=[];for(var M=_;S(M,x);M+=j){var T;if(y)"\\"===(T=String.fromCharCode(M))&&(T="");else if(T=String(M),E){var N=O-T.length;if(N>0){var k=new Array(N+1).join("0");T=M<0?"-"+k+T.slice(1):k+T}}b.push(T)}}else{b=[];for(var P=0;P<A.length;P++)b.push.apply(b,g(A[P],!1))}for(P=0;P<b.length;P++)for(c=0;c<a.length;c++)u=o+b[P]+a[c],(!e||C||u)&&n.push(u)}return n}},95039:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(71354),s=n.n(r),o=n(76314),i=n.n(o)()(s());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},20278:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(71354),s=n.n(r),o=n(76314),i=n.n(o)()(s());i.push([t.id,".comments[data-v-5b932050]{min-height:100%;display:flex;flex-direction:column}.comments__empty[data-v-5b932050],.comments__error[data-v-5b932050]{flex:1 0}.comments__retry[data-v-5b932050]{margin:0 auto}.comments__info[data-v-5b932050]{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},86454:(t,e,n)=>{"use strict";const r=n(43918),s=n(32923),o=n(8904);t.exports={XMLParser:s,XMLValidator:r,XMLBuilder:o}},26602: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,o(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),s(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 o=new(Function.bind.apply(t,r));return n&&s(o,n.prototype),o},r.apply(null,arguments)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},o(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,o(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&&s(t,e)}(n,t),n}(n(Error));function a(t,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},s=n.split("."),o=s.length,i=function(e){var n=s[e];if(!t)return{v:void 0};if("+"===n){if(Array.isArray(t))return{v:t.map((function(n,o){var i=s.slice(e+1);return i.length>0?a(n,i.join("."),r):r(t,o,s,e)}))};var o=s.slice(0,e).join(".");throw new Error("Object at wildcard (".concat(o,") is not an array"))}t=r(t,n,s,e)},c=0;c<o;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,s){if(t===Reflect.getPrototypeOf({}))throw new i("Attempting to mutate Object.prototype");if(!t[e]){var o=Number.isInteger(Number(n[s+1])),a="+"===n[s+1];t[e]=o||a?[]:{}}return c(n,s)&&(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 s=!1;return a(t,n,(function(t,e,n,o){if(!c(n,o))return t&&t[e];s=r.own?t.hasOwnProperty(e):e in t})),s}catch(t){return!1}},hasOwn:function(t,e,n){return this.has(t,e,n||{own:!0})},isIn:function(t,n,r){var s=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 o=!1,i=!1;return a(t,n,(function(t,n,s,a){return o=o||t===r||!!t&&t[n]===r,i=c(s,a)&&"object"===e(t)&&n in t,t&&t[n]})),s.validPath?o&&i:o}catch(t){return!1}},ObjectPrototypeMutationError:i}},12692:(t,e,n)=>{"use strict";var r=n(65606),s=n(40537),o=function(t){return"string"==typeof t};function i(t,e){for(var n=[],r=0;r<t.length;r++){var s=t[r];s&&"."!==s&&(".."===s?n.length&&".."!==n[n.length-1]?n.pop():e&&n.push(".."):n.push(s))}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 s=n>=0?arguments[n]:r.cwd();if(!o(s))throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,e="/"===s.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(!o(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("/")),s=n(e.split("/")),o=Math.min(r.length,s.length),i=o,a=0;a<o;a++)if(r[a]!==s[a]){i=a;break}var l=[];for(a=i;a<r.length;a++)l.push("..");return(l=l.concat(s.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(!s.isObject(t))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof t);var e=t.root||"";if(!o(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(!o(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}},o={};function i(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={id:t,loaded:!1,exports:{}};return s[t].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=s,e=[],i.O=(t,n,r,s)=>{if(!n){var o=1/0;for(u=0;u<e.length;u++){n=e[u][0],r=e[u][1],s=e[u][2];for(var a=!0,c=0;c<n.length;c++)(!1&s||o>=s)&&Object.keys(i.O).every((t=>i.O[t](n[c])))?n.splice(c--,1):(a=!1,s<o&&(o=s));if(a){e.splice(u--,1);var l=r();void 0!==l&&(t=l)}}return t}s=s||0;for(var u=e.length;u>0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[n,r,s]},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="+{1110:"a5d6e6f59aa058840a1e",5455:"8915a218db5b7bc90f34",5528:"110b147bc8680f8c83f4"}[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,s,o)=>{if(n[t])n[t].push(e);else{var a,c;if(void 0!==s)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+s){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+s),a.src=t),n[t]=[e];var d=(e,r)=>{a.onerror=a.onload=null,clearTimeout(h);var s=n[t];if(delete n[t],a.parentNode&&a.parentNode.removeChild(a),s&&s.forEach((t=>t(r))),e)return e(r)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.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=7062,(()=>{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||!/^http(s?):/.test(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={7062: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 s=new Promise(((n,s)=>r=t[e]=[n,s]));n.push(r[2]=s);var o=i.p+i.u(e),a=new Error;i.l(o,(n=>{if(i.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var s=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+s+": "+o+")",a.name="ChunkLoadError",a.type=s,a.request=o,r[1](a)}}),"chunk-"+e,e)}},i.O.j=e=>0===t[e];var e=(e,n)=>{var r,s,o=n[0],a=n[1],c=n[2],l=0;if(o.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<o.length;l++)s=o[l],i.o(t,s)&&t[s]&&t[s][0](),t[s]=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,[4208],(()=>i(67192)));a=i.O(a)})();
  3. //# sourceMappingURL=comments-comments-app.js.map?v=2c88c3951134d07fb08b