(()=>{"use strict";var e,i,r,n={75673:(e,i,r)=>{var n=r(85471),s=r(53334),o=(r(51919),r(73933)),a=(r(13851),r(63814)),l=r(21777),c=r(85168),u=(r(35810),r(60557)),h=r(25866),d=r(43627),p=r.n(d);const f=(0,n.pM)({name:"ReferenceFileWidget",components:{FolderIcon:h.A,FileIcon:u.A},props:{richObject:{type:Object,required:!0},accessible:{type:Boolean,default:!0},interactive:{type:Boolean,default:!0}},data:()=>({previewUrl:null,failedViewer:!1}),computed:{availableViewerHandlers:()=>window?.OCA?.Viewer?.availableHandlers||[],viewerHandler(){return this.availableViewerHandlers.find((e=>e.mimes.includes(this.richObject.mimetype)))},viewerFile(){const e=(0,a.dC)(`dav/files/${(0,l.HW)()?.uid}/${this.richObject.path}`).replace(/\/\/$/,"/");return{filename:this.richObject.path,basename:this.richObject.name,lastmod:new Date(1e3*this.richObject.mtime),size:this.richObject.size,type:"file",mime:this.richObject.mimetype,fileid:this.richObject.id,failed:!1,loaded:!0,davPath:e,source:e}},fileSize(){return window.OC.Util.humanFileSize(this.richObject.size)},fileMtime(){return window.OC.Util.relativeModifiedDate(1e3*this.richObject.mtime)},filePath(){return p().dirname(this.richObject.path)},filePreviewStyle(){return this.previewUrl?{backgroundImage:"url("+this.previewUrl+")"}:{}},filePreviewClass(){return this.previewUrl?"widget-file__image--preview":"widget-file__image--icon"},isFolder(){return"httpd/unix-directory"===this.richObject.mimetype}},mounted(){if(this.richObject["preview-available"]){const e=(0,a.Jv)("/core/preview?fileId={fileId}&x=250&y=250",{fileId:this.richObject.id}),t=new Image;t.onload=()=>{this.previewUrl=e},t.onerror=e=>{console.error("could not load recommendation preview",e)},t.src=e}},methods:{navigate(e){this.isFolder?(e.stopPropagation(),e.preventDefault(),this.openFilePicker()):-1===window?.OCA?.Viewer?.mimetypes.indexOf(this.richObject.mimetype)||window?.OCA?.Viewer?.file||(e.stopPropagation(),e.preventDefault(),window?.OCA?.Viewer?.open({path:this.richObject.path}))},openFilePicker(){(0,c.a1)(t("settings","Your files")).allowDirectories(!0).setMultiSelect(!1).addButton({id:"open",label:this.t("settings","Open in files"),callback(e){e[0]&&window.open((0,a.Jv)("/f/{fileid}",{fileid:e[0].fileid}))},type:"primary"}).disableNavigation().startAt(this.richObject.path).build().pick()}}});var g=r(85072),m=r.n(g),E=r(97825),A=r.n(E),N=r(77659),b=r.n(N),v=r(55056),I=r.n(v),x=r(10540),O=r.n(x),C=r(41113),w=r.n(C),T=r(47390),y={};y.styleTagTransform=w(),y.setAttributes=I(),y.insert=b().bind(null,"head"),y.domAPI=A(),y.insertStyleElement=O(),m()(T.A,y),T.A&&T.A.locals&&T.A.locals;var R=r(14486);const L=(0,R.A)(f,(function(){var e=this,t=e._self._c;return e._self._setupProxy,e.accessible?e.interactive&&e.viewerHandler&&!e.failedViewer?t(e.viewerHandler.component,e._b({tag:"component",staticClass:"widget-file widget-file--interactive",attrs:{active:!1,"can-swipe":!1,"can-zoom":!1,"is-embedded":!0,"file-list":[e.viewerFile],"is-full-screen":!1,"is-sidebar-shown":!1},on:{error:function(t){e.failedViewer=!0}}},"component",e.viewerFile,!1)):t("a",{staticClass:"widget-file widget-file--link",attrs:{href:e.richObject.link,target:"_blank"},on:{click:e.navigate}},[t("span",{staticClass:"widget-file__image",class:e.filePreviewClass,style:e.filePreviewStyle},[e.previewUrl?e._e():[e.isFolder?t("FolderIcon",{attrs:{size:88,"fill-color":"var(--color-primary-element)"}}):t("FileIcon",{attrs:{size:88}})]],2),e._v(" "),t("span",{staticClass:"widget-file__details"},[t("p",{staticClass:"widget-file__title"},[e._v(e._s(e.richObject.name))]),e._v(" "),t("p",{staticClass:"widget-file__description"},[e._v(e._s(e.fileSize)),t("br"),e._v(e._s(e.fileMtime))]),e._v(" "),t("p",{staticClass:"widget-file__link"},[e._v(e._s(e.filePath))])])]):t("div",{staticClass:"widget-file widget-file--no-access"},[t("span",{staticClass:"widget-file__image widget-file__image--icon"},[e.isFolder?t("FolderIcon",{attrs:{size:88}}):t("FileIcon",{attrs:{size:88}})],1),e._v(" "),t("span",{staticClass:"widget-file__details"},[t("p",{staticClass:"widget-file__title"},[e._v("\n\t\t\t"+e._s(e.t("files","File cannot be accessed"))+"\n\t\t")]),e._v(" "),t("p",{staticClass:"widget-file__description"},[e._v("\n\t\t\t"+e._s(e.t("files","The file could not be found or you do not have permissions to view it. Ask the sender to share it."))+"\n\t\t")])])])}),[],!1,null,"f5ca5316",null).exports;var P=r(82441);const $=(0,n.pM)({name:"FileReferencePickerElement",components:{FilePicker:P.FilePickerVue},props:{providerId:{type:String,required:!0},accessible:{type:Boolean,default:!1}},computed:{containerId:()=>`filepicker-${Math.random().toString(36).slice(7)}`,filepickerOptions(){return{allowPickDirectory:!0,buttons:this.buttonFactory,container:`#${this.containerId}`,multiselect:!1,name:(0,s.Tl)("files","Select file or folder to link to")}}},methods:{t:s.Tl,buttonFactory(e){const t=[];if(0===e.length)return[];const i=e.at(0);return"/"===i.path?[]:(t.push({label:(0,s.Tl)("files","Choose {file}",{file:i.displayname}),type:"primary",callback:this.onClose}),t)},onClose(e){void 0===e||0===e.length?this.$emit("cancel"):this.onSubmit(e[0])},onSubmit(e){const t=new URL(window.location.href);t.pathname=(0,a.Jv)("/f/{fileId}",{fileId:e.fileid}),t.search="",this.$emit("submit",t.href)}}}),S=(0,R.A)($,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{attrs:{id:e.containerId}},[t("FilePicker",e._b({on:{close:e.onClose}},"FilePicker",e.filepickerOptions,!1))],1)}),[],!1,null,null,null).exports;n.Ay.mixin({methods:{t:s.t}}),(0,o.r)("file",((e,t)=>{let{richObjectType:i,richObject:r,accessible:s,interactive:o}=t;new(n.Ay.extend(L))({propsData:{richObjectType:i,richObject:r,accessible:s,interactive:o}}).$mount(e)}),(()=>{}),{hasInteractiveView:!0}),(0,o.b)("files",((e,t)=>{let{providerId:i,accessible:r}=t;const s=new(n.Ay.extend(S))({propsData:{providerId:i,accessible:r}}).$mount(e);return new o.N(s.$el,s)}),((e,t)=>{t.object.$destroy()}))},47390:(e,t,i)=>{i.d(t,{A:()=>a});var r=i(71354),n=i.n(r),s=i(76314),o=i.n(s)()(n());o.push([e.id,".widget-file[data-v-f5ca5316]{display:flex;flex-grow:1;color:var(--color-main-text) !important;text-decoration:none !important;padding:0 !important}.widget-file__image[data-v-f5ca5316]{width:30%;min-width:160px;max-width:320px;background-position:center;background-size:cover;background-repeat:no-repeat}.widget-file__image--icon[data-v-f5ca5316]{min-width:88px;max-width:88px;padding:12px;padding-inline-end:0;display:flex;align-items:center;justify-content:center}.widget-file__title[data-v-f5ca5316]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:bold}.widget-file__details[data-v-f5ca5316]{padding:12px;flex-grow:1;display:flex;flex-direction:column}.widget-file__details p[data-v-f5ca5316]{margin:0;padding:0}.widget-file__description[data-v-f5ca5316]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical}.widget-file--link[data-v-f5ca5316]{color:var(--color-text-maxcontrast)}.widget-file--interactive[data-v-f5ca5316]{position:relative;height:400px;max-height:50vh;margin:0}","",{version:3,sources:["webpack://./apps/files/src/views/ReferenceFileWidget.vue"],names:[],mappings:"AACA,8BACC,YAAA,CACA,WAAA,CACA,uCAAA,CACA,+BAAA,CACA,oBAAA,CAEA,qCACC,SAAA,CACA,eAAA,CACA,eAAA,CACA,0BAAA,CACA,qBAAA,CACA,2BAAA,CAEA,2CACC,cAAA,CACA,cAAA,CACA,YAAA,CACA,oBAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CAIF,qCACC,eAAA,CACA,sBAAA,CACA,kBAAA,CACA,gBAAA,CAGD,uCACC,YAAA,CACA,WAAA,CACA,YAAA,CACA,qBAAA,CAEA,yCACC,QAAA,CACA,SAAA,CAIF,2CACC,eAAA,CACA,sBAAA,CACA,mBAAA,CACA,oBAAA,CACA,YAAA,CACA,2BAAA,CAID,oCACC,mCAAA,CAGD,2CACC,iBAAA,CACA,YAAA,CACA,eAAA,CACA,QAAA",sourceRoot:""}]);const a=o},82441:(e,t,i)=>{i.d(t,{FilePickerVue:()=>r});const r=(0,i(85471).$V)((()=>Promise.all([i.e(4208),i.e(8289),i.e(6146)]).then(i.bind(i,26146))))},35810:(e,t,i)=>{i.d(t,{Al:()=>r.r,H4:()=>r.c,Q$:()=>r.e,R3:()=>r.n,VL:()=>r.l,lJ:()=>r.d,pt:()=>r.F,ur:()=>h,v7:()=>c});var r=i(68251),n=(i(43627),i(53334)),s=i(380),o=i(65606);Error;const a=["B","KB","MB","GB","TB","PB"],l=["B","KiB","MiB","GiB","TiB","PiB"];function c(e,t=!1,i=!1,r=!1){i=i&&!r,"string"==typeof e&&(e=Number(e));let s=e>0?Math.floor(Math.log(e)/Math.log(r?1e3:1024)):0;s=Math.min((i?l.length:a.length)-1,s);const o=i?l[s]:a[s];let c=(e/Math.pow(r?1e3:1024,s)).toFixed(1);return!0===t&&0===s?("0.0"!==c?"< 1 ":"0 ")+(i?l[1]:a[1]):(c=s<2?parseFloat(c).toFixed(0):parseFloat(c).toLocaleString((0,n.lO)()),c+" "+o)}function u(e){return e instanceof Date?e.toISOString():String(e)}function h(e,t={}){const i={sortingMode:"basename",sortingOrder:"asc",...t};return function(e,t,i){i=i??[];const r=(t=t??[e=>e]).map(((e,t)=>"asc"===(i[t]??"asc")?1:-1)),s=Intl.Collator([(0,n.Z0)(),(0,n.lO)()],{numeric:!0,usage:"sort"});return[...e].sort(((e,i)=>{for(const[n,o]of t.entries()){const t=s.compare(u(o(e)),u(o(i)));if(0!==t)return t*r[n]}return 0}))}(e,[...i.sortFavoritesFirst?[e=>1!==e.attributes?.favorite]:[],...i.sortFoldersFirst?[e=>"folder"!==e.type]:[],..."basename"!==i.sortingMode?[e=>e[i.sortingMode]]:[],e=>{return(t=e.displayname||e.attributes?.displayname||e.basename).lastIndexOf(".")>0?t.slice(0,t.lastIndexOf(".")):t;var t},e=>e.basename],[...i.sortFavoritesFirst?["asc"]:[],...i.sortFoldersFirst?["asc"]:[],..."mtime"===i.sortingMode?["asc"===i.sortingOrder?"desc":"asc"]:[],..."mtime"!==i.sortingMode&&"basename"!==i.sortingMode?[i.sortingOrder]:[],i.sortingOrder,i.sortingOrder])}var d,p,f={},g={};function m(){return d||(d=1,function(e){const t=":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",i="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",r=new RegExp("^"+i+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,i){if(t){const r=Object.keys(t),n=r.length;for(let s=0;s5&&"xml"===r)return h("InvalidXml","XML declaration allowed only at the start of the document.",g(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function n(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let i=1;for(t+=8;t"===e[t]&&(i--,0===i))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t"===e[t+2]){t+=2;break}return t}f.validate=function(s,o){o=Object.assign({},t,o);const l=[];let d=!1,p=!1;"\ufeff"===s[0]&&(s=s.substr(1));for(let t=0;t"!==s[t]&&" "!==s[t]&&"\t"!==s[t]&&"\n"!==s[t]&&"\r"!==s[t];t++)A+=s[t];if(A=A.trim(),"/"===A[A.length-1]&&(A=A.substring(0,A.length-1),t--),f=A,!e.isName(f)){let e;return e=0===A.trim().length?"Invalid space after '<'.":"Tag '"+A+"' is an invalid name.",h("InvalidTag",e,g(s,t))}const N=a(s,t);if(!1===N)return h("InvalidAttr","Attributes for '"+A+"' have open quote.",g(s,t));let b=N.value;if(t=N.index,"/"===b[b.length-1]){const e=t-b.length;b=b.substring(0,b.length-1);const i=c(b,o);if(!0!==i)return h(i.err.code,i.err.msg,g(s,e+i.err.line));d=!0}else if(E){if(!N.tagClosed)return h("InvalidTag","Closing tag '"+A+"' doesn't have proper closing.",g(s,t));if(b.trim().length>0)return h("InvalidTag","Closing tag '"+A+"' can't have attributes or invalid starting.",g(s,m));if(0===l.length)return h("InvalidTag","Closing tag '"+A+"' has not been opened.",g(s,m));{const e=l.pop();if(A!==e.tagName){let t=g(s,e.tagStartPos);return h("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+t.line+", col "+t.col+") instead of closing tag '"+A+"'.",g(s,m))}0==l.length&&(p=!0)}}else{const e=c(b,o);if(!0!==e)return h(e.err.code,e.err.msg,g(s,t-b.length+e.err.line));if(!0===p)return h("InvalidXml","Multiple possible root nodes found.",g(s,t));-1!==o.unpairedTags.indexOf(A)||l.push({tagName:A,tagStartPos:m}),d=!0}for(t++;t0)||h("InvalidXml","Invalid '"+JSON.stringify(l.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):h("InvalidXml","Start tag expected.",1)};const s='"',o="'";function a(e,t){let i="",r="",n=!1;for(;t"===e[t]&&""===r){n=!0;break}i+=e[t]}return""===r&&{value:i,index:t,tagClosed:n}}const l=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function c(t,i){const r=e.getAllMatches(t,l),n={};for(let e=0;e{for(const i of e){if("string"==typeof i&&t===i)return!0;if(i instanceof RegExp&&i.test(t))return!0}}:()=>!1})}var P,$,S,_,F,j,D,k,M,B,G,V,U,X={};function H(){if(P)return X;function e(n,s,o){let a;const l={};for(let c=0;c0&&(l[s.textNodeName]=a):void 0!==a&&(l[s.textNodeName]=a),l}function t(e){const t=Object.keys(e);for(let e=0;e!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,i){return e}};return R.buildOptions=function(t){return Object.assign({},e,t)},R.defaultOptions=e,R}(),t=function(){if(y)return T;y=1;const e=m(),t=b?N:(b=1,N=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}),i=function(){if(I)return v;I=1;const e=m();function t(e,t){let i="";for(;t"===e[a]){if(h?"-"===e[a-1]&&"-"===e[a-2]&&(h=!1,c--):c--,0===c)break}else"["===e[a]?u=!0:d+=e[a];else{if(u&&i(e,a)){let i,r;a+=7,[i,r,a]=t(e,a+1),-1===r.indexOf("&")&&(l[o(i)]={regx:RegExp(`&${i};`,"g"),val:r})}else u&&r(e,a)||u&&n(e,a)?a+=8:u&&s(e,a)?a+=9:h=!0;c++,d=""}if(0!==c)throw new Error("Unclosed DOCTYPE")}return{entities:l,i:a}}}(),r=function(){if(O)return x;O=1;const e=/^[-+]?0x[a-fA-F0-9]+$/,t=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};return x=function(r,n={}){if(n=Object.assign({},i,n),!r||"string"!=typeof r)return r;let s=r.trim();if(void 0!==n.skipLike&&n.skipLike.test(s))return r;if(n.hex&&e.test(s))return Number.parseInt(s,16);{const e=t.exec(s);if(e){const t=e[1],i=e[2];let a=(o=e[3])&&-1!==o.indexOf(".")?("."===(o=o.replace(/0+$/,""))?o="0":"."===o[0]?o="0"+o:"."===o[o.length-1]&&(o=o.substr(0,o.length-1)),o):o;const l=e[4]||e[6];if(!n.leadingZeros&&i.length>0&&t&&"."!==s[2])return r;if(!n.leadingZeros&&i.length>0&&!t&&"."!==s[1])return r;{const e=Number(s),o=""+e;return-1!==o.search(/[eE]/)||l?n.eNotation?e:r:-1!==s.indexOf(".")?"0"===o&&""===a||o===a||t&&o==="-"+a?e:r:i?a===o||t+a===o?e:r:s===o||s===t+o?e:r}}return r}var o}}(),n=L();function s(e){const t=Object.keys(e);for(let i=0;i0)){o||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,i,n,s);return null==r?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?C(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function a(e){if(this.options.removeNSPrefix){const t=e.split(":"),i="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=i+t[1])}return e}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function c(t,i,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const r=e.getAllMatches(t,l),n=r.length,s={};for(let e=0;e",a,"Closing Tag is not closed.");let i=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),n&&(s=this.saveTextToParentTag(s,n,o));const r=o.substring(o.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;r&&-1!==this.options.unpairedTags.indexOf(r)?(l=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=o.lastIndexOf("."),o=o.substring(0,l),n=this.tagsNodeStack.pop(),s="",a=t}else if("?"===e[a+1]){let i=E(e,a,!1,"?>");if(!i)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,n,o),this.options.ignoreDeclaration&&"?xml"===i.tagName||this.options.ignorePiTags);else{const e=new t(i.tagName);e.add(this.options.textNodeName,""),i.tagName!==i.tagExp&&i.attrExpPresent&&(e[":@"]=this.buildAttributesMap(i.tagExp,o,i.tagName)),this.addChild(n,e,o)}a=i.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=g(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(a+4,t-2);s=this.saveTextToParentTag(s,n,o),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}a=t}else if("!D"===e.substr(a+1,2)){const t=i(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=g(e,"]]>",a,"CDATA is not closed.")-2,i=e.substring(a+9,t);s=this.saveTextToParentTag(s,n,o);let r=this.parseTextData(i,n.tagname,o,!0,!1,!0,!0);null==r&&(r=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,r),a=t+2}else{let i=E(e,a,this.options.removeNSPrefix),l=i.tagName;const c=i.rawTagName;let u=i.tagExp,h=i.attrExpPresent,d=i.closeIndex;this.options.transformTagName&&(l=this.options.transformTagName(l)),n&&s&&"!xml"!==n.tagname&&(s=this.saveTextToParentTag(s,n,o,!1));const p=n;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),l!==r.tagname&&(o+=o?"."+l:l),this.isItStopNode(this.options.stopNodes,o,l)){let r="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===l[l.length-1]?(l=l.substr(0,l.length-1),o=o.substr(0,o.length-1),u=l):u=u.substr(0,u.length-1),a=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))a=i.closeIndex;else{const t=this.readStopNodeData(e,c,d+1);if(!t)throw new Error(`Unexpected end of ${c}`);a=t.i,r=t.tagContent}const s=new t(l);l!==u&&h&&(s[":@"]=this.buildAttributesMap(u,o,l)),r&&(r=this.parseTextData(r,l,o,!0,h,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),s.add(this.options.textNodeName,r),this.addChild(n,s,o)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),o=o.substr(0,o.length-1),u=l):u=u.substr(0,u.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const e=new t(l);l!==u&&h&&(e[":@"]=this.buildAttributesMap(u,o,l)),this.addChild(n,e,o),o=o.substr(0,o.lastIndexOf("."))}else{const e=new t(l);this.tagsNodeStack.push(n),l!==u&&h&&(e[":@"]=this.buildAttributesMap(u,o,l)),this.addChild(n,e,o),n=e}s="",a=d}}else s+=e[a];return r.child};function h(e,t,i){const r=this.options.updateTag(t.tagname,i,t[":@"]);!1===r||("string"==typeof r?(t.tagname=r,e.addChild(t)):e.addChild(t))}const d=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const i=this.docTypeEntities[t];e=e.replace(i.regx,i.val)}for(let t in this.lastEntities){const i=this.lastEntities[t];e=e.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const i=this.htmlEntities[t];e=e.replace(i.regex,i.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function p(e,t,i,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,i,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function f(e,t,i){const r="*."+i;for(const i in e){const n=e[i];if(r===n||t===n)return!0}return!1}function g(e,t,i,r){const n=e.indexOf(t,i);if(-1===n)throw new Error(r);return n+t.length-1}function E(e,t,i,r=">"){const n=function(e,t,i=">"){let r,n="";for(let s=t;s",i,`${t} is not closed`);if(e.substring(i+2,s).trim()===t&&(n--,0===n))return{tagContent:e.substring(r,i),i:s};i=s}else if("?"===e[i+1])i=g(e,"?>",i+1,"StopNode is not closed.");else if("!--"===e.substr(i+1,3))i=g(e,"--\x3e",i+3,"StopNode is not closed.");else if("!["===e.substr(i+1,2))i=g(e,"]]>",i,"StopNode is not closed.")-2;else{const r=E(e,i,">");r&&((r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&n++,i=r.closeIndex)}}function C(t,i,n){if(i&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&r(t,n)}return e.isExist(t)?t:""}return T=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=s,this.parseXml=u,this.parseTextData=o,this.resolveNameSpace=a,this.buildAttributesMap=c,this.isItStopNode=f,this.replaceEntitiesValue=d,this.readStopNodeData=A,this.saveTextToParentTag=p,this.addChild=h,this.ignoreAttributesFn=n(this.options.ignoreAttributes)}}}(),{prettify:i}=H(),r=E();return $=class{constructor(t){this.externalEntities={},this.options=e(t)}parse(e,n){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(n){!0===n&&(n={});const t=r.validate(e,n);if(!0!==t)throw Error(`${t.err.msg}:${t.err.line}:${t.err.col}`)}const s=new t(this.options);s.addExternalEntities(this.externalEntities);const o=s.parseXml(e);return this.options.preserveOrder||void 0===o?o:i(o,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}}function Y(){if(F)return _;function e(s,o,a,l){let c="",u=!1;for(let h=0;h`,u=!1;continue}if(p===o.commentPropName){c+=l+`\x3c!--${d[p][0][o.textNodeName]}--\x3e`,u=!0;continue}if("?"===p[0]){const e=i(d[":@"],o),t="?xml"===p?"":l;let r=d[p][0][o.textNodeName];r=0!==r.length?" "+r:"",c+=t+`<${p}${r}${e}?>`,u=!0;continue}let g=l;""!==g&&(g+=o.indentBy);const m=l+`<${p}${i(d[":@"],o)}`,E=e(d[p],o,f,g);-1!==o.unpairedTags.indexOf(p)?o.suppressUnpairedNode?c+=m+">":c+=m+"/>":E&&0!==E.length||!o.suppressEmptyNode?E&&E.endsWith(">")?c+=m+`>${E}${l}`:(c+=m+">",E&&""!==l&&(E.includes("/>")||E.includes("`):c+=m+"/>",u=!0}return c}function t(e){const t=Object.keys(e);for(let i=0;i0&&t.processEntities)for(let i=0;i0&&(r="\n"),e(t,i,"",r)}}function q(){if(G)return B;G=1;const e="object"==typeof o&&o.env&&o.env.NODE_DEBUG&&/\bsemver\b/i.test(o.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return B=e}function Z(){if(U)return V;U=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return V={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}!function(){if(M)return k;M=1;const e=E(),t=z(),i=function(){if(D)return j;D=1;const e=Y(),t=L(),i={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function r(e){this.options=Object.assign({},i,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=t(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=o),this.processTextOrObjNode=n,this.options.format?(this.indentate=s,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function n(e,t,i,r){const n=this.j2x(e,i+1,r.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,i):this.buildObjectNode(n.val,t,n.attrStr,i)}function s(e){return this.options.indentBy.repeat(e)}function o(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}return r.prototype.build=function(t){return this.options.preserveOrder?e(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},r.prototype.j2x=function(e,t,i){let r="",n="";const s=i.join(".");for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o))if(void 0===e[o])this.isAttribute(o)&&(n+="");else if(null===e[o])this.isAttribute(o)?n+="":"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)n+=this.buildTextValNode(e[o],o,"",t);else if("object"!=typeof e[o]){const i=this.isAttribute(o);if(i&&!this.ignoreAttributesFn(i,s))r+=this.buildAttrPairStr(i,""+e[o]);else if(!i)if(o===this.options.textNodeName){let t=this.options.tagValueProcessor(o,""+e[o]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[o],o,"",t)}else if(Array.isArray(e[o])){const r=e[o].length;let s="",a="";for(let l=0;l"+e+n}},r.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+i+"?"+this.tagEndChar;{let n=this.options.tagValueProcessor(t,e);return n=this.replaceEntitiesValue(n),""===n?this.indentate(r)+"<"+t+i+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+i+">"+n+"0&&this.options.processEntities)for(let t=0;t{const r=(e=>{for(const[t,i]of d)e=e.split(`${t}*`).join(`${t}{0,${i}}`).split(`${t}+`).join(`${t}{1,${i}}`);return e})(t),n=u++;s(e,n,t),c[e]=n,l[n]=t,o[n]=new RegExp(t,i?"g":void 0),a[n]=new RegExp(r,i?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),p("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${h}+`),p("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),p("FULL",`^${l[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),p("LOOSE",`^${l[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),p("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),p("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[c.COERCE],!0),p("COERCERTLFULL",l[c.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(ce,ce.exports)),ce.exports),s=function(){if(Q)return J;Q=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return J=i=>i?"object"!=typeof i?e:i:t}(),{compareIdentifiers:o}=function(){if(ee)return K;ee=1;const e=/^[0-9]+$/,t=(t,i)=>{const r=e.test(t),n=e.test(i);return r&&n&&(t=+t,i=+i),t===i?0:r&&!n?-1:n&&!r?1:tt(i,e)}}();class a{constructor(o,l){if(l=s(l),o instanceof a){if(o.loose===!!l.loose&&o.includePrerelease===!!l.includePrerelease)return o;o=o.version}else if("string"!=typeof o)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",o,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=o.trim().match(l.loose?r[n.LOOSE]:r[n.FULL]);if(!c)throw new TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===i)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===i&&(r=[t]),0===o(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return te=a}!function(){if(oe)return se;oe=1;const e=function(){if(ne)return re;ne=1;const e=ue();return re=(t,i,r=!1)=>{if(t instanceof e)return t;try{return new e(t,i)}catch(e){if(!r)return null;throw e}}}();se=(t,i)=>{const r=e(t,i);return r?r.version:null}}(),function(){if(le)return ae;le=1;const e=ue();ae=(t,i)=>new e(t,i).major}(),s.m}},s={};function o(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={id:e,loaded:!1,exports:{}};return n[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=n,e=[],o.O=(t,i,r,n)=>{if(!i){var s=1/0;for(u=0;u=n)&&Object.keys(o.O).every((e=>o.O[e](i[l])))?i.splice(l--,1):(a=!1,n0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[i,r,n]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,i)=>(o.f[i](e,t),t)),[])),o.u=e=>e+"-"+e+".js?v="+{2441:"44b85e4901c485417f88",5862:"142cd48ca8ec32e57725",6146:"5f2015343db7411125d5",8289:"8f098190dce9305dab1e"}[e],o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i={},r="nextcloud:",o.l=(e,t,n,s)=>{if(i[e])i[e].push(t);else{var a,l;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(p);var n=i[e];if(delete i[e],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach((e=>e(r))),t)return t(r)},p=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),l&&document.head.appendChild(a)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=54,(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var r=i.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=i[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{o.b=document.baseURI||self.location.href;var e={54:0,2441:0};o.f.j=(t,i)=>{var r=o.o(e,t)?e[t]:void 0;if(0!==r)if(r)i.push(r[2]);else{var n=new Promise(((i,n)=>r=e[t]=[i,n]));i.push(r[2]=n);var s=o.p+o.u(t),a=new Error;o.l(s,(i=>{if(o.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var n=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+n+": "+s+")",a.name="ChunkLoadError",a.type=n,a.request=s,r[1](a)}}),"chunk-"+t,t)}},o.O.j=t=>0===e[t];var t=(t,i)=>{var r,n,s=i[0],a=i[1],l=i[2],c=0;if(s.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(l)var u=l(o)}for(t&&t(i);co(75673)));a=o.O(a)})(); //# sourceMappingURL=files-reference-files.js.map?v=1c6cdd2eeebcb6b02a05