aboutsummaryrefslogtreecommitdiffstats
path: root/dist/comments-comments.js
diff options
context:
space:
mode:
authorLucas Azevedo <lhs_azevedo@hotmail.com>2023-09-14 00:56:59 -0300
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2023-09-16 14:08:47 +0200
commit03ece129bf930f8e16be69a28a7a1faa369d8e1c (patch)
tree22e542d5bb1fb5ff731d0928ff627e704147bc86 /dist/comments-comments.js
parentf8ccaf8d580c60fa0bb44a81326023d5131a2df2 (diff)
downloadnextcloud-server-03ece129bf930f8e16be69a28a7a1faa369d8e1c.tar.gz
nextcloud-server-03ece129bf930f8e16be69a28a7a1faa369d8e1c.zip
refactor(f2v): Migrate unread comments action to the new FileAction API
Signed-off-by: Lucas Azevedo <lhs_azevedo@hotmail.com>
Diffstat (limited to 'dist/comments-comments.js')
-rw-r--r--dist/comments-comments.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/comments-comments.js b/dist/comments-comments.js
index a1023fb28a4..47436e6b285 100644
--- a/dist/comments-comments.js
+++ b/dist/comments-comments.js
@@ -1,3 +1,3 @@
/*! For license information please see comments-comments.js.LICENSE.txt */
-!function(){var e={4921:function(){OCA.Comments.ActivityTabViewPlugin={prepareModelForDisplay:function(e,n,t){if("comments"===e.get("app")&&"comments"===e.get("type")&&"ActivityTabView"===t&&(n.addClass("comment"),e.get("message")&&this._isLong(e.get("message")))){n.addClass("collapsed");var o=$("<div>").addClass("message-overlay");n.find(".activitymessage").after(o),n.on("click",this._onClickCollapsedComment)}},_onClickCollapsedComment:function(e){var n=$(e.target);n.is(".comment")||(n=n.closest(".comment")),n.removeClass("collapsed")},_isLong:function(e){return e.length>250||(e.match(/\n/g)||[]).length>1}},OC.Plugins.register("OCA.Activity.RenderingPlugins",OCA.Comments.ActivityTabViewPlugin)},75387:function(){OCA.Comments||(OCA.Comments={})},57702:function(){_.extend(OC.Files.Client,{PROPERTY_COMMENTS_UNREAD:"{"+OC.Files.Client.NS_OWNCLOUD+"}comments-unread"}),OCA.Comments=_.extend({},OCA.Comments),OCA.Comments||(OCA.Comments={}),OCA.Comments.FilesPlugin={ignoreLists:["trashbin","files.public"],_formatCommentCount:function(e){return OCA.Comments.Templates.filesplugin({count:e,countMessage:n("comments","%n unread comment","%n unread comments",e),iconUrl:OC.imagePath("core","actions/comment")})},attach:function(e){var o=this;if(!(this.ignoreLists.indexOf(e.id)>=0)){var i=e._getWebdavProperties;e._getWebdavProperties=function(){var e=i.apply(this,arguments);return e.push(OC.Files.Client.PROPERTY_COMMENTS_UNREAD),e},e.filesClient.addFileInfoParser((function(e){var n={},t=e.propStat[0].properties[OC.Files.Client.PROPERTY_COMMENTS_UNREAD];return _.isUndefined(t)||""===t||(n.commentsUnread=parseInt(t,10)),n})),e.$el.addClass("has-comments");var s=e._createRow;e._createRow=function(e){var n=s.apply(this,arguments);return e.commentsUnread&&n.attr("data-comments-unread",e.commentsUnread),n},e.fileActions.registerAction({name:"Comment",displayName:function(e){if(e&&e.$file){var o=parseInt(e.$file.data("comments-unread"),10);if(o>=0)return n("comments","1 new comment","{unread} new comments",o,{unread:o})}return t("comments","Comment")},mime:"all",order:-140,iconClass:"icon-comment",permissions:OC.PERMISSION_READ,type:OCA.Files.FileActions.TYPE_INLINE,render:function(e,n,t){var i=t.$file.data("comments-unread");if(i){var s=$(o._formatCommentCount(i));return t.$file.find("a.name>span.fileactions").append(s),s}return""},actionHandler:function(e,n){n.$file.find(".action-comment").tooltip("hide"),OCA.Files.Sidebar.setActiveTab("comments"),OCA.Files.Sidebar.open(n.dir+"/"+e)}});var r=e.elementToFile;e.elementToFile=function(e){var n=r.apply(this,arguments),t=e.data("comments-unread");return t&&(n.commentsUnread=t),n}}}},OC.Plugins.register("OCA.Files.FileList",OCA.Comments.FilesPlugin)},4543:function(){function e(n){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(n)}var n;n=Handlebars.template,(OCA.Comments.Templates=OCA.Comments.Templates||{}).filesplugin=n({compiler:[8,">= 4.3.0"],main:function(n,t,o,i,s){var r,a=null!=t?t:n.nullContext||{},m=n.hooks.helperMissing,l="function",c=n.escapeExpression,u=n.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return'<a class="action action-comment permanent" title="'+c(e(r=null!=(r=u(o,"countMessage")||(null!=t?u(t,"countMessage"):t))?r:m)===l?r.call(a,{name:"countMessage",hash:{},data:s,loc:{start:{line:1,column:50},end:{line:1,column:66}}}):r)+'" href="#">\n\t<img class="svg" src="'+c(e(r=null!=(r=u(o,"iconUrl")||(null!=t?u(t,"iconUrl"):t))?r:m)===l?r.call(a,{name:"iconUrl",hash:{},data:s,loc:{start:{line:2,column:23},end:{line:2,column:34}}}):r)+'"/>\n</a>\n'},useData:!0})}},o={};function i(n){var t=o[n];if(void 0!==t)return t.exports;var s=o[n]={exports:{}};return e[n](s,s.exports,i),s.exports}i.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(n,{a:n}),n},i.d=function(e,n){for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},i.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},function(){"use strict";i(75387),i(4543),i(57702),i(4921),window.OCA.Comments=OCA.Comments}()}();
-//# sourceMappingURL=comments-comments.js.map?v=ed7ca60a903b1c84a833 \ No newline at end of file
+!function(){var t,e={4921:function(){OCA.Comments.ActivityTabViewPlugin={prepareModelForDisplay:function(t,e,n){if("comments"===t.get("app")&&"comments"===t.get("type")&&"ActivityTabView"===n&&(e.addClass("comment"),t.get("message")&&this._isLong(t.get("message")))){e.addClass("collapsed");var r=$("<div>").addClass("message-overlay");e.find(".activitymessage").after(r),e.on("click",this._onClickCollapsedComment)}},_onClickCollapsedComment:function(t){var e=$(t.target);e.is(".comment")||(e=e.closest(".comment")),e.removeClass("collapsed")},_isLong:function(t){return t.length>250||(t.match(/\n/g)||[]).length>1}},OC.Plugins.register("OCA.Activity.RenderingPlugins",OCA.Comments.ActivityTabViewPlugin)},75387:function(){OCA.Comments||(OCA.Comments={})},63607:function(t,e,n){"use strict";n(75387),n(4543),n(4921);var r=n(77958),o=n(17499),i=n(31352),a=(n(62520),n(79753));n(14596),n(26721);const s=null===(u=(0,r.ts)())?(0,o.IY)().setApp("files").build():(0,o.IY)().setApp("files").setUid(u.uid).build();var u,c=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(c||{}),l=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(l||{}),f=(t=>(t.Folder="folder",t.File="file",t))(f||{}),h=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(h||{});(0,a.generateRemoteUrl)("dav");var d={};!function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",r=new RegExp("^"+n+"$");t.isExist=function(t){return typeof t<"u"},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,n){if(e){const r=Object.keys(e),o=r.length;for(let i=0;i<o;i++)t[r[i]]="strict"===n?[e[r[i]]]:e[r[i]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(t){const e=r.exec(t);return!(null===e||typeof e>"u")},t.getAllMatches=function(t,e){const n=[];let r=e.exec(t);for(;r;){const o=[];o.startIndex=e.lastIndex-r[0].length;const i=r.length;for(let t=0;t<i;t++)o.push(r[t]);n.push(o),r=e.exec(t)}return n},t.nameRegexp=n}(d);new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");var p={};const m={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}};p.buildOptions=function(t){return Object.assign({},m,t)},p.defaultOptions=m,!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,d.nameRegexp),new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");var g={};function y(t,e,n){let r;const o={};for(let i=0;i<t.length;i++){const a=t[i],s=v(a);let u="";if(u=void 0===n?s:n+"."+s,s===e.textNodeName)void 0===r?r=a[s]:r+=""+a[s];else{if(void 0===s)continue;if(a[s]){let t=y(a[s],e,u);const n=x(t,e);a[":@"]?b(t,a[":@"],u,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==o[s]&&o.hasOwnProperty(s)?(Array.isArray(o[s])||(o[s]=[o[s]]),o[s].push(t)):e.isArray(s,u,n)?o[s]=[t]:o[s]=t}}}return"string"==typeof r?r.length>0&&(o[e.textNodeName]=r):void 0!==r&&(o[e.textNodeName]=r),o}function v(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function b(t,e,n,r){if(e){const o=Object.keys(e),i=o.length;for(let a=0;a<i;a++){const i=o[a];r.isArray(i,n+"."+i,!0,!0)?t[i]=[e[i]]:t[i]=e[i]}}}function x(t,e){const{textNodeName:n}=e,r=Object.keys(t).length;return!(0!==r&&(1!==r||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n]))}g.prettify=function(t,e){return y(t,e)};const{buildOptions:w}=p,{prettify:N}=g;function E(t,e,n,r){let o="",i=!1;for(let a=0;a<t.length;a++){const s=t[a],u=A(s);let c="";if(c=0===n.length?u:`${n}.${u}`,u===e.textNodeName){let t=s[u];C(c,e)||(t=e.tagValueProcessor(u,t),t=P(t,e)),i&&(o+=r),o+=t,i=!1;continue}if(u===e.cdataPropName){i&&(o+=r),o+=`<![CDATA[${s[u][0][e.textNodeName]}]]>`,i=!1;continue}if(u===e.commentPropName){o+=r+`\x3c!--${s[u][0][e.textNodeName]}--\x3e`,i=!0;continue}if("?"===u[0]){const t=O(s[":@"],e),n="?xml"===u?"":r;let a=s[u][0][e.textNodeName];a=0!==a.length?" "+a:"",o+=n+`<${u}${a}${t}?>`,i=!0;continue}let l=r;""!==l&&(l+=e.indentBy);const f=r+`<${u}${O(s[":@"],e)}`,h=E(s[u],e,c,l);-1!==e.unpairedTags.indexOf(u)?e.suppressUnpairedNode?o+=f+">":o+=f+"/>":h&&0!==h.length||!e.suppressEmptyNode?h&&h.endsWith(">")?o+=f+`>${h}${r}</${u}>`:(o+=f+">",h&&""!==r&&(h.includes("/>")||h.includes("</"))?o+=r+e.indentBy+h+r:o+=h,o+=`</${u}>`):o+=f+"/>",i=!0}return o}function A(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function O(t,e){let n="";if(t&&!e.ignoreAttributes)for(let r in t){let o=e.attributeValueProcessor(r,t[r]);o=P(o,e),!0===o&&e.suppressBooleanAttributes?n+=` ${r.substr(e.attributeNamePrefix.length)}`:n+=` ${r.substr(e.attributeNamePrefix.length)}="${o}"`}return n}function C(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let r in e.stopNodes)if(e.stopNodes[r]===t||e.stopNodes[r]==="*."+n)return!0;return!1}function P(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const r=e.entities[n];t=t.replace(r.regex,r.val)}return t}const L=function(t,e){let n="";return e.format&&e.indentBy.length>0&&(n="\n"),E(t,e,"",n)},j={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function T(t){this.options=Object.assign({},j,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=S),this.processTextOrObjNode=_,this.options.format?(this.indentate=F,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function _(t,e,n){const r=this.j2x(t,n+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,r.attrStr,n):this.buildObjectNode(r.val,e,r.attrStr,n)}function F(t){return this.options.indentBy.repeat(t)}function S(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}T.prototype.build=function(t){return this.options.preserveOrder?L(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},T.prototype.j2x=function(t,e){let n="",r="";for(let o in t)if(typeof t[o]>"u")this.isAttribute(o)&&(r+="");else if(null===t[o])this.isAttribute(o)?r+="":"?"===o[0]?r+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)r+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const i=this.isAttribute(o);if(i)n+=this.buildAttrPairStr(i,""+t[o]);else if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);r+=this.replaceEntitiesValue(e)}else r+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const n=t[o].length;let i="";for(let a=0;a<n;a++){const n=t[o][a];typeof n>"u"||(null===n?"?"===o[0]?r+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+o+"/"+this.tagEndChar:"object"==typeof n?this.options.oneListGroup?i+=this.j2x(n,e+1).val:i+=this.processTextOrObjNode(n,o,e):i+=this.buildTextValNode(n,o,"",e))}this.options.oneListGroup&&(i=this.buildObjectNode(i,o,"",e)),r+=i}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const e=Object.keys(t[o]),r=e.length;for(let i=0;i<r;i++)n+=this.buildAttrPairStr(e[i],""+t[o][e[i]])}else r+=this.processTextOrObjNode(t[o],o,e);return{attrStr:n,val:r}},T.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},T.prototype.buildObjectNode=function(t,e,n,r){if(""===t)return"?"===e[0]?this.indentate(r)+"<"+e+n+"?"+this.tagEndChar:this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let o="</"+e+this.tagEndChar,i="";return"?"===e[0]&&(i="?",o=""),!n&&""!==n||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===i.length?this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(r)+"<"+e+n+i+this.tagEndChar+t+this.indentate(r)+o:this.indentate(r)+"<"+e+n+i+">"+t+o}},T.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},T.prototype.buildTextValNode=function(t,e,n,r){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(r)+"<"+e+n+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(e,t);return o=this.replaceEntitiesValue(o),""===o?this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(r)+"<"+e+n+">"+o+"</"+e+this.tagEndChar}},T.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t};var I=(0,o.IY)().setApp("comments").detectUser().build();function V(t){return V="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},V(t)}function k(){k=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),s=new O(o||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function h(){}function d(){}function p(){}var m={};u(m,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(C([])));y&&y!==e&&n.call(y,i)&&(m=y);var v=p.prototype=h.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(r,i,a,s){var u=l(t[r],t,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==V(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=N(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function N(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,N(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function C(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return d.prototype=p,r(v,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=u(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,s,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(x.prototype),u(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new x(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),u(v,s,"Generator"),u(v,i,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=C,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function D(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}var $=new class{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get default(){return this._action.default}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if(!t.iconSvgInline||"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if("execBatch"in t&&"function"!=typeof t.execBatch)throw new Error("Invalid execBatch function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if(t.default&&!Object.values(c).includes(t.default))throw new Error("Invalid default");if("inline"in t&&"function"!=typeof t.inline)throw new Error("Invalid inline function");if("renderInline"in t&&"function"!=typeof t.renderInline)throw new Error("Invalid renderInline function")}}({id:"comments-unread",displayName:function(t){var e=t[0].attributes["comments-unread"];return e>=0?(0,i.uN)("comments","1 new comment","{unread} new comments",e,{unread:e}):(0,i.Iu)("comments","Comment")},iconSvgInline:function(){return'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-comment-processing" viewBox="0 0 24 24"><path d="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M17,11V9H15V11H17M13,11V9H11V11H13M9,11V9H7V11H9Z" /></svg>'},enabled:function(t){var e=t[0].attributes["comments-unread"];return"number"==typeof e&&e>0},exec:function(t){return(e=k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,window.OCA.Files.Sidebar.setActiveTab("comments"),e.next=4,window.OCA.Files.Sidebar.open(t.path);case 4:return e.abrupt("return",null);case 7:return e.prev=7,e.t0=e.catch(0),I.error("Error while opening sidebar",{error:e.t0}),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(t){D(i,r,o,a,s,"next",t)}function s(t){D(i,r,o,a,s,"throw",t)}a(void 0)}))})();var e},inline:function(){return!0},order:-140});!function(t){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],s.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?s.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)}($),window.OCA.Comments=OCA.Comments},4543:function(){function t(e){return t="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},t(e)}var e;e=Handlebars.template,(OCA.Comments.Templates=OCA.Comments.Templates||{}).filesplugin=e({compiler:[8,">= 4.3.0"],main:function(e,n,r,o,i){var a,s=null!=n?n:e.nullContext||{},u=e.hooks.helperMissing,c="function",l=e.escapeExpression,f=e.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return'<a class="action action-comment permanent" title="'+l(t(a=null!=(a=f(r,"countMessage")||(null!=n?f(n,"countMessage"):n))?a:u)===c?a.call(s,{name:"countMessage",hash:{},data:i,loc:{start:{line:1,column:50},end:{line:1,column:66}}}):a)+'" href="#">\n\t<img class="svg" src="'+l(t(a=null!=(a=f(r,"iconUrl")||(null!=n?f(n,"iconUrl"):n))?a:u)===c?a.call(s,{name:"iconUrl",hash:{},data:i,loc:{start:{line:2,column:23},end:{line:2,column:34}}}):a)+'"/>\n</a>\n'},useData:!0})},24654:function(){},52361:function(){},94616:function(){}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={id:t,loaded:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=e,t=[],r.O=function(e,n,o,i){if(!n){var a=1/0;for(l=0;l<t.length;l++){n=t[l][0],o=t[l][1],i=t[l][2];for(var s=!0,u=0;u<n.length;u++)(!1&i||a>=i)&&Object.keys(r.O).every((function(t){return r.O[t](n[u])}))?n.splice(u--,1):(s=!1,i<a&&(a=i));if(s){t.splice(l--,1);var c=o();void 0!==c&&(e=c)}}return e}i=i||0;for(var l=t.length;l>0&&t[l-1][2]>i;l--)t[l]=t[l-1];t[l]=[n,o,i]},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.e=function(){return Promise.resolve()},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},r.j=5258,function(){r.b=document.baseURI||self.location.href;var t={5258:0};r.O.j=function(e){return 0===t[e]};var e=function(e,n){var o,i,a=n[0],s=n[1],u=n[2],c=0;if(a.some((function(e){return 0!==t[e]}))){for(o in s)r.o(s,o)&&(r.m[o]=s[o]);if(u)var l=u(r)}for(e&&e(n);c<a.length;c++)i=a[c],r.o(t,i)&&t[i]&&t[i][0](),t[i]=0;return r.O(l)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),r.nc=void 0;var o=r.O(void 0,[7874],(function(){return r(63607)}));o=r.O(o)}();
+//# sourceMappingURL=comments-comments.js.map?v=c80877da8a556d8e0262 \ No newline at end of file