(()=>{var e,i,n,r={9165:(t,e,i)=>{"use strict";i.d(e,{NZC:()=>n,ZL5:()=>s,dF:()=>o,fEr:()=>r});var n="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z",r="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",s="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z",o="M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z"},85638:(t,e,i)=>{"use strict";const{XMLParser:n,XMLValidator:r}=i(86454),s=t=>{if(null==t)return!1;if(0===(t=t.toString().trim()).length)return!1;if(!0!==r.validate(t))return!1;let e;const i=new n;try{e=i.parse(t)}catch(t){return!1}return!!e&&"svg"in e};t.exports=s,t.exports.default=s},99851:(e,i,n)=>{"use strict";var r=n(85471),s=n(53334),o=n(21777),a=n(87485),l=n(85168),c=n(61338),d=n(35810),u=n(71225),h=n(63814),p=n(77905),f=n(9165),g=n(65043),m=n(74692),E=n.n(m),b=n(65743),v=n(57505),A=n(4604),y=n(28326),N=n(6695);const I={name:"LegacyView",props:{component:{type:Object,required:!0},fileInfo:{type:Object,default:()=>{},required:!0}},watch:{fileInfo(t){this.setFileInfo(t)}},mounted(){this.component.$el.replaceAll(this.$el),this.setFileInfo(this.fileInfo)},methods:{setFileInfo(t){this.component.setFileInfo(new OCA.Files.FileInfoModel(t))}}};var T=n(14486);const w=(0,T.A)(I,(function(){return(0,this._self._c)("div")}),[],!1,null,null,null).exports,x={name:"SidebarTab",components:{NcAppSidebarTab:n(18608).A,NcEmptyContent:y.A},props:{fileInfo:{type:Object,default:()=>{},required:!0},id:{type:String,required:!0},name:{type:String,required:!0},icon:{type:String,required:!1},onMount:{type:Function,required:!0},onUpdate:{type:Function,required:!0},onDestroy:{type:Function,required:!0},onScrollBottomReached:{type:Function,default:()=>{}}},data:()=>({loading:!0}),computed:{activeTab(){return this.$parent.activeTab}},watch:{async fileInfo(t,e){t.id!==e.id&&(this.loading=!0,await this.onUpdate(this.fileInfo),this.loading=!1)}},async mounted(){this.loading=!0,await this.onMount(this.$refs.mount,this.fileInfo,this.$refs.tab),this.loading=!1},async beforeDestroy(){await this.onDestroy()}},O=(0,T.A)(x,(function(){var t=this,e=t._self._c;return e("NcAppSidebarTab",{ref:"tab",attrs:{id:t.id,name:t.name,icon:t.icon},on:{bottomReached:t.onScrollBottomReached},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0}],null,!0)},[t._v(" "),t.loading?e("NcEmptyContent",{attrs:{icon:"icon-loading"}}):t._e(),t._v(" "),e("div",{ref:"mount"})],1)}),[],!1,null,null,null).exports;var S=n(59892),L=n(5212);const C=/[\p{Lu}]/u,R=/[\p{Ll}]/u,_=/^[\p{Lu}](?![\p{Lu}])/gu,F=/([\p{Alpha}\p{N}_]|$)/u,$=/[_.\- ]+/,P=new RegExp("^"+$.source),D=new RegExp($.source+F.source,"gu"),M=new RegExp("\\d+"+F.source,"gu");function j(t,e){if("string"!=typeof t&&!Array.isArray(t))throw new TypeError("Expected the input to be `string | string[]`");if(e={pascalCase:!1,preserveConsecutiveUppercase:!1,...e},0===(t=Array.isArray(t)?t.map((t=>t.trim())).filter((t=>t.length)).join("-"):t.trim()).length)return"";const i=!1===e.locale?t=>t.toLowerCase():t=>t.toLocaleLowerCase(e.locale),n=!1===e.locale?t=>t.toUpperCase():t=>t.toLocaleUpperCase(e.locale);return 1===t.length?$.test(t)?"":e.pascalCase?n(t):i(t):(t!==i(t)&&(t=((t,e,i,n)=>{let r=!1,s=!1,o=!1,a=!1;for(let l=0;l2)||"-"===t[l-3],r&&C.test(c)?(t=t.slice(0,l)+"-"+t.slice(l),r=!1,o=s,s=!0,l++):s&&o&&R.test(c)&&(!a||n)?(t=t.slice(0,l-1)+"-"+t.slice(l-1),o=s,s=!1,r=!0):(r=e(c)===c&&i(c)!==c,o=s,s=i(c)===c&&e(c)!==c)}return t})(t,i,n,e.preserveConsecutiveUppercase)),t=t.replace(P,""),t=e.preserveConsecutiveUppercase?((t,e)=>(_.lastIndex=0,t.replaceAll(_,(t=>e(t)))))(t,i):i(t),e.pascalCase&&(t=n(t.charAt(0))+t.slice(1)),((t,e)=>(D.lastIndex=0,M.lastIndex=0,t.replaceAll(M,((i,n,r)=>["_","-"].includes(t.charAt(r+i.length))?i:e(i))).replaceAll(D,((t,i)=>e(i)))))(t,n))}const k={userVisible:!0,userAssignable:!0,canAssign:!0},U=t=>t.map((t=>{let{props:e}=t;return Object.fromEntries(Object.entries(e).map((t=>{let[e,i]=t;return[j(e),"displayName"===j(e)?String(i):i]})))})),B=t=>{if("name"in t&&!("displayName"in t))return{...t};const e={...t};return e.name=e.displayName,delete e.displayName,e};var G=n(60669);const V=(0,h.dC)("dav"),X=(0,G.UU)(V),q=t=>{X.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})};(0,o.zo)(q),q((0,o.do)());var H=n(35947);const z=(0,H.YK)().setApp("systemtags").detectUser().build(),Z='\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n',Y=async(e,i)=>{const n="/systemtags-relations/files/"+i+"/"+e.id,r=B(e);try{await X.customRequest(n,{method:"PUT",data:r})}catch(e){throw z.error(t("systemtags","Failed to set tag for file"),{error:e}),new Error(t("systemtags","Failed to set tag for file"))}},W=r.Ay.extend({name:"SystemTags",components:{NcLoadingIcon:S.A,NcSelectTags:L.A},props:{fileId:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},data:()=>({sortedTags:[],selectedTags:[],loadingTags:!1,loading:!1}),async created(){try{const t=await(async()=>{try{const{data:t}=await X.getDirectoryContents("/systemtags",{data:Z,details:!0,glob:"/systemtags/*"});return U(t)}catch(t){throw z.error((0,s.Tl)("systemtags","Failed to load tags"),{error:t}),new Error((0,s.Tl)("systemtags","Failed to load tags"))}})(),e=await(async()=>{const t=(0,h.Jv)("/apps/systemtags/lastused");try{const{data:e}=await g.Ay.get(t);return e.map(Number)}catch(t){throw z.error((0,s.Tl)("systemtags","Failed to load last used tags"),{error:t}),new Error((0,s.Tl)("systemtags","Failed to load last used tags"))}})(),i=[],n=[];for(const r of t)e.includes(r.id)?i.push(r):n.push(r);const r=(t,i)=>e.indexOf(t.id)-e.indexOf(i.id);i.sort(r),this.sortedTags=[...i,...n]}catch(t){(0,l.Qg)((0,s.Tl)("systemtags","Failed to load tags"))}},watch:{fileId:{immediate:!0,async handler(){this.loadingTags=!0;try{this.selectedTags=await(async()=>{const e="/systemtags-relations/files/"+this.fileId;try{const{data:t}=await X.getDirectoryContents(e,{data:Z,details:!0,glob:"/systemtags-relations/files/*/*"});return U(t)}catch(e){throw z.error(t("systemtags","Failed to load tags for file"),{error:e}),new Error(t("systemtags","Failed to load tags for file"))}})()}catch(t){(0,l.Qg)((0,s.Tl)("systemtags","Failed to load selected tags"))}this.loadingTags=!1}}},methods:{t:s.Tl,createOption(t){for(const e of this.sortedTags){const{id:i,displayName:n,...r}=e;if(n===t&&Object.entries(r).every((t=>{let[e,i]=t;return k[e]===i})))return e}return{...k,displayName:t}},handleInput(t){this.selectedTags=t.filter((t=>Boolean(t.id)))},async handleSelect(t){const e=t[t.length-1];if(!e.id)return;const i=e;this.loading=!0;try{await Y(i,this.fileId);const t=(t,e)=>t.id===i.id?-1:e.id===i.id?1:0;this.sortedTags.sort(t)}catch(t){(0,l.Qg)((0,s.Tl)("systemtags","Failed to select tag"))}this.loading=!1},async handleCreate(t){this.loading=!0;try{const e=await(async(t,e)=>{const i=B(t),n=await(async t=>{const e=B(t);try{const{headers:t}=await X.customRequest("/systemtags",{method:"POST",data:e}),i=t.get("content-location");if(i)return(t=>{const e=t.indexOf("?");e>0&&(t=t.substring(0,e));const i=t.split("/");let n;do{n=i[i.length-1],i.pop()}while(!n&&i.length>0);return Number(n)})(i);throw z.error((0,s.Tl)("systemtags",'Missing "Content-Location" header')),new Error((0,s.Tl)("systemtags",'Missing "Content-Location" header'))}catch(t){throw z.error((0,s.Tl)("systemtags","Failed to create tag"),{error:t}),new Error((0,s.Tl)("systemtags","Failed to create tag"))}})(i),r={...i,id:n};return await Y(r,e),r.id})(t,this.fileId),i={...t,id:e};this.sortedTags.unshift(i),this.selectedTags.push(i)}catch(t){(0,l.Qg)((0,s.Tl)("systemtags","Failed to create tag"))}this.loading=!1},async handleDeselect(e){this.loading=!0;try{await(async e=>{const i="/systemtags-relations/files/"+this.fileId+"/"+e.id;try{await X.deleteFile(i)}catch(e){throw z.error(t("systemtags","Failed to delete tag for file"),{error:e}),new Error(t("systemtags","Failed to delete tag for file"))}})(e)}catch(t){(0,l.Qg)((0,s.Tl)("systemtags","Failed to delete tag"))}this.loading=!1}}});var K=n(85072),Q=n.n(K),J=n(97825),tt=n.n(J),et=n(77659),it=n.n(et),nt=n(55056),rt=n.n(nt),st=n(10540),ot=n.n(st),at=n(41113),lt=n.n(at),ct=n(29317),dt={};dt.styleTagTransform=lt(),dt.setAttributes=rt(),dt.insert=it().bind(null,"head"),dt.domAPI=tt(),dt.insertStyleElement=ot(),Q()(ct.A,dt),ct.A&&ct.A.locals&&ct.A.locals;const ut=(0,T.A)(W,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{staticClass:"system-tags"},[t.loadingTags?e("NcLoadingIcon",{attrs:{name:t.t("systemtags","Loading collaborative tags …"),size:32}}):[e("NcSelectTags",{staticClass:"system-tags__select",attrs:{"input-label":t.t("systemtags","Search or create collaborative tags"),placeholder:t.t("systemtags","Collaborative tags …"),options:t.sortedTags,value:t.selectedTags,"create-option":t.createOption,disabled:t.disabled,taggable:!0,passthru:!0,"fetch-tags":!1,loading:t.loading},on:{input:t.handleInput,"option:selected":t.handleSelect,"option:created":t.handleCreate,"option:deselected":t.handleDeselect},scopedSlots:t._u([{key:"no-options",fn:function(){return[t._v("\n\t\t\t\t"+t._s(t.t("systemtags","No tags to select, type to create a new tag"))+"\n\t\t\t")]},proxy:!0}])})]],2)}),[],!1,null,"17f14596",null).exports,ht=(0,H.YK)().setApp("files").detectUser().build();var pt=n(96763);const ft={name:"Sidebar",components:{LegacyView:w,NcActionButton:v.A,NcAppSidebar:b.N,NcDateTime:A.A,NcEmptyContent:y.A,NcIconSvgWrapper:N.A,SidebarTab:O,SystemTags:ut},setup:()=>({currentUser:(0,o.HW)(),mdiStar:f.ZL5,mdiStarOutline:f.dF}),data:()=>({Sidebar:OCA.Files.Sidebar.state,showTags:!1,showTagsDefault:!0,error:null,loading:!0,fileInfo:null,isFullScreen:!1,hasLowHeight:!1}),computed:{file(){return this.Sidebar.file},tabs(){return this.Sidebar.tabs},views(){return this.Sidebar.views},davPath(){const t=this.currentUser.uid;return(0,h.dC)(`dav/files/${t}${(0,u.O0)(this.file)}`)},activeTab(){return this.Sidebar.activeTab},size(){return(0,d.v7)(this.fileInfo?.size)},background(){return this.getPreviewIfAny(this.fileInfo)},appSidebar(){return this.fileInfo?{"data-mimetype":this.fileInfo.mimetype,active:this.activeTab,background:this.background,class:{"app-sidebar--has-preview":this.fileInfo.hasPreview&&!this.isFullScreen,"app-sidebar--full":this.isFullScreen},compact:this.hasLowHeight||!this.fileInfo.hasPreview||this.isFullScreen,loading:this.loading,name:this.fileInfo.name,title:this.fileInfo.name}:this.error?{key:"error",subname:"",name:"",class:{"app-sidebar--full":this.isFullScreen}}:{loading:this.loading,subname:"",name:"",class:{"app-sidebar--full":this.isFullScreen}}},defaultAction(){return this.fileInfo&&OCA.Files&&OCA.Files.App&&OCA.Files.App.fileList&&OCA.Files.App.fileList.fileActions&&OCA.Files.App.fileList.fileActions.getDefaultFileAction&&OCA.Files.App.fileList.fileActions.getDefaultFileAction(this.fileInfo.mimetype,this.fileInfo.type,OC.PERMISSION_READ)},defaultActionListener(){return this.defaultAction?"figure-click":null},isSystemTagsEnabled:()=>!0===(0,a.F)()?.systemtags?.enabled},created(){(0,c.B1)("files:node:deleted",this.onNodeDeleted),window.addEventListener("resize",this.handleWindowResize),this.handleWindowResize()},beforeDestroy(){(0,c.al)("file:node:deleted",this.onNodeDeleted),window.removeEventListener("resize",this.handleWindowResize)},methods:{canDisplay(t){return t.enabled(this.fileInfo)},resetData(){this.error=null,this.fileInfo=null,this.$nextTick((()=>{this.$refs.tabs&&this.$refs.tabs.updateTabs()}))},getPreviewIfAny(t){if(t?.hasPreview&&!this.isFullScreen){const e=t?.etag||"";return(0,h.Jv)(`/core/preview?fileId=${t.id}&x=${screen.width}&y=${screen.height}&a=true&v=${e.slice(0,6)}`)}return this.getIconUrl(t)},getIconUrl(t){const e=t?.mimetype||"application/octet-stream";return"httpd/unix-directory"===e?"shared"===t.mountType||"shared-root"===t.mountType?OC.MimeType.getIconUrl("dir-shared"):"external-root"===t.mountType?OC.MimeType.getIconUrl("dir-external"):void 0!==t.mountType&&""!==t.mountType?OC.MimeType.getIconUrl("dir-"+t.mountType):t.shareTypes&&(t.shareTypes.indexOf(p.I.Link)>-1||t.shareTypes.indexOf(p.I.Email)>-1)?OC.MimeType.getIconUrl("dir-public"):t.shareTypes&&t.shareTypes.length>0?OC.MimeType.getIconUrl("dir-shared"):OC.MimeType.getIconUrl("dir"):OC.MimeType.getIconUrl(e)},setActiveTab(t){OCA.Files.Sidebar.setActiveTab(t),this.tabs.forEach((e=>{try{e.setIsActive(t===e.id)}catch(t){ht.error("Error while setting tab active state",{error:t,id:e.id,tab:e})}}))},async toggleStarred(e){try{await(0,g.Ay)({method:"PROPPATCH",url:this.davPath,data:`\n\t\t\t\t\t\t\n\t\t\t\t\t\t${e?"":""}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t1\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t${e?"":""}\n\t\t\t\t\t\t`});const t="dir"===this.fileInfo.type,i=new(t?d.vd:d.ZH)({fileid:this.fileInfo.id,source:`${d.PY}${d.lJ}${this.file}`,root:d.lJ,mime:t?void 0:this.fileInfo.mimetype,attributes:{favorite:1}});(0,c.Ic)(e?"files:favorites:added":"files:favorites:removed",i),this.fileInfo.isFavourited=e}catch(e){(0,l.Qg)(t("files","Unable to change the favorite state of the file")),ht.error("Unable to change favorite state",{error:e})}},onDefaultAction(){this.defaultAction&&this.defaultAction.action(this.fileInfo.name,{fileInfo:this.fileInfo,dir:this.fileInfo.dir,fileList:OCA.Files.App.fileList,$file:E()("body")})},toggleTags(){this.showTagsDefault=this.showTags=!this.showTags},async open(e){if(!e||""===e.trim())throw new Error(`Invalid path '${e}'`);const i=!!this.Sidebar.file;this.Sidebar.file=e,this.error=null,this.loading=!0;try{this.fileInfo=await async function(t){const e=await(0,g.Ay)({method:"PROPFIND",url:t,data:(0,d.VL)()}),i=OC.Files.getClient()._client.parseMultiStatus(e.data),n=OC.Files.getClient()._parseFileInfo(i[0]);return n.get=t=>n[t],n.isDirectory=()=>"httpd/unix-directory"===n.mimetype,n.canEdit=()=>Boolean(n.permissions&OC.PERMISSION_UPDATE),n}(this.davPath),this.fileInfo.dir=this.file.split("/").slice(0,-1).join("/"),this.views.forEach((t=>{t.setFileInfo(this.fileInfo)})),await this.$nextTick(),this.setActiveTab(this.Sidebar.activeTab||this.tabs[0].id),this.loading=!1,await this.$nextTick(),i&&this.$refs.sidebar&&this.$refs.sidebar.focusActiveTabContent()}catch(e){throw this.loading=!1,this.error=t("files","Error while loading the file data"),pt.error("Error while loading the file data",e),new Error(e)}},close(){this.Sidebar.file="",this.showTags=!1,this.resetData()},onNodeDeleted(t){this.fileInfo&&t&&this.fileInfo.id===t.fileid&&this.close()},setFullScreenMode(t){this.isFullScreen=t,t?document.querySelector("#content")?.classList.add("with-sidebar--full")||document.querySelector("#content-vue")?.classList.add("with-sidebar--full"):document.querySelector("#content")?.classList.remove("with-sidebar--full")||document.querySelector("#content-vue")?.classList.remove("with-sidebar--full")},setShowTagsDefault(t){this.showTagsDefault=t},handleOpening(){(0,c.Ic)("files:sidebar:opening")},handleOpened(){(0,c.Ic)("files:sidebar:opened")},handleClosing(){(0,c.Ic)("files:sidebar:closing")},handleClosed(){(0,c.Ic)("files:sidebar:closed")},handleWindowResize(){this.hasLowHeight=document.documentElement.clientHeight<1024}}},gt=ft;var mt=n(27138),Et={};Et.styleTagTransform=lt(),Et.setAttributes=rt(),Et.insert=it().bind(null,"head"),Et.domAPI=tt(),Et.insertStyleElement=ot(),Q()(mt.A,Et),mt.A&&mt.A.locals&&mt.A.locals;const bt=(0,T.A)(gt,(function(){var t=this,e=t._self._c;return t.file?e("NcAppSidebar",t._b({ref:"sidebar",attrs:{"data-cy-sidebar":"","force-menu":!0},on:t._d({close:t.close,"update:active":t.setActiveTab,opening:t.handleOpening,opened:t.handleOpened,closing:t.handleClosing,closed:t.handleClosed},[t.defaultActionListener,function(e){return e.stopPropagation(),e.preventDefault(),t.onDefaultAction.apply(null,arguments)}]),scopedSlots:t._u([t.fileInfo?{key:"subname",fn:function(){return[t.fileInfo.isFavourited?e("NcIconSvgWrapper",{attrs:{path:t.mdiStar,name:t.t("files","Favorite"),inline:""}}):t._e(),t._v("\n\t\t"+t._s(t.size)+"\n\t\t"),e("NcDateTime",{attrs:{timestamp:t.fileInfo.mtime}})]},proxy:!0}:null,t.fileInfo?{key:"description",fn:function(){return[e("div",{staticClass:"sidebar__description"},[t.isSystemTagsEnabled&&t.showTagsDefault?e("SystemTags",{directives:[{name:"show",rawName:"v-show",value:t.showTags,expression:"showTags"}],attrs:{disabled:!t.fileInfo?.canEdit(),"file-id":t.fileInfo.id},on:{"has-tags":e=>t.showTags=e}}):t._e(),t._v(" "),t._l(t.views,(function(i){return e("LegacyView",{key:i.cid,attrs:{component:i,"file-info":t.fileInfo}})}))],2)]},proxy:!0}:null,t.fileInfo?{key:"secondary-actions",fn:function(){return[e("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(e){return t.toggleStarred(!t.fileInfo.isFavourited)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.fileInfo.isFavourited?t.mdiStarOutline:t.mdiStar}})]},proxy:!0}],null,!1,3772937801)},[t._v("\n\t\t\t"+t._s(t.fileInfo.isFavourited?t.t("files","Remove from favorites"):t.t("files","Add to favorites"))+"\n\t\t")]),t._v(" "),t.isSystemTagsEnabled?e("NcActionButton",{attrs:{"close-after-click":!0,icon:"icon-tag"},on:{click:t.toggleTags}},[t._v("\n\t\t\t"+t._s(t.t("files","Tags"))+"\n\t\t")]):t._e()]},proxy:!0}:null],null,!0)},"NcAppSidebar",t.appSidebar,!1),[t._v(" "),t._v(" "),t._v(" "),t.error?e("NcEmptyContent",{attrs:{icon:"icon-error"}},[t._v("\n\t\t"+t._s(t.error)+"\n\t")]):t.fileInfo?t._l(t.tabs,(function(i){return[i.enabled(t.fileInfo)?e("SidebarTab",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"}],key:i.id,attrs:{id:i.id,name:i.name,icon:i.icon,"on-mount":i.mount,"on-update":i.update,"on-destroy":i.destroy,"on-scroll-bottom-reached":i.scrollBottomReached,"file-info":t.fileInfo},scopedSlots:t._u([void 0!==i.iconSvg?{key:"icon",fn:function(){return[e("span",{staticClass:"svg-icon",domProps:{innerHTML:t._s(i.iconSvg)}})]},proxy:!0}:null],null,!0)}):t._e()]})):t._e()],2):t._e()}),[],!1,null,"713d1f8e",null).exports;var vt=n(96763);var At=n(48287),yt=n(85638),Nt=n.n(yt);function It(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r.Ay.prototype.t=s.Tl,window.OCA.Files||(window.OCA.Files={}),Object.assign(window.OCA.Files,{Sidebar:new class{constructor(){(function(t,e,i){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i})(this,"_state",void 0),this._state={},this._state.tabs=[],this._state.views=[],this._state.file="",this._state.activeTab="",vt.debug("OCA.Files.Sidebar initialized")}get state(){return this._state}registerTab(t){return this._state.tabs.findIndex((e=>e.id===t.id))>-1?(vt.error(`An tab with the same id ${t.id} already exists`,t),!1):(this._state.tabs.push(t),!0)}registerSecondaryView(t){return this._state.views.findIndex((e=>e.id===t.id))>-1?(vt.error("A similar view already exists",t),!1):(this._state.views.push(t),!0)}get file(){return this._state.file}setActiveTab(t){this._state.activeTab=t}}}),Object.assign(window.OCA.Files.Sidebar,{Tab:class{constructor(){let{id:t,name:e,icon:i,iconSvg:n,mount:r,setIsActive:s,update:o,destroy:a,enabled:l,scrollBottomReached:c}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(It(this,"_id",void 0),It(this,"_name",void 0),It(this,"_icon",void 0),It(this,"_iconSvgSanitized",void 0),It(this,"_mount",void 0),It(this,"_setIsActive",void 0),It(this,"_update",void 0),It(this,"_destroy",void 0),It(this,"_enabled",void 0),It(this,"_scrollBottomReached",void 0),void 0===l&&(l=()=>!0),void 0===c&&(c=()=>{}),"string"!=typeof t||""===t.trim())throw new Error("The id argument is not a valid string");if("string"!=typeof e||""===e.trim())throw new Error("The name argument is not a valid string");if(("string"!=typeof i||""===i.trim())&&"string"!=typeof n)throw new Error("Missing valid string for icon or iconSvg argument");if("function"!=typeof r)throw new Error("The mount argument should be a function");if(void 0!==s&&"function"!=typeof s)throw new Error("The setIsActive argument should be a function");if("function"!=typeof o)throw new Error("The update argument should be a function");if("function"!=typeof a)throw new Error("The destroy argument should be a function");if("function"!=typeof l)throw new Error("The enabled argument should be a function");if("function"!=typeof c)throw new Error("The scrollBottomReached argument should be a function");this._id=t,this._name=e,this._icon=i,this._mount=r,this._setIsActive=s,this._update=o,this._destroy=a,this._enabled=l,this._scrollBottomReached=c,"string"==typeof n&&(async t=>{if(!t)throw new Error("Not an svg");let e="";if(e=At.Buffer.isBuffer(t)||t instanceof File?await(t=>new Promise((e=>{if(void 0!==t.size){const i=new FileReader;i.onload=()=>{e(i.result)},i.readAsText(t)}else e(t.toString("utf-8"))})))(t):t,!Nt()(e))throw new Error("Not an svg");const i=document.createElement("div");i.innerHTML=e;const n=i.firstElementChild,r=!!Array.from(n.attributes).map((({name:t})=>t)).find((t=>t.startsWith("on")));return 0!==n.getElementsByTagName("script").length||r?null:t})(n).then((t=>{this._iconSvgSanitized=t}))}get id(){return this._id}get name(){return this._name}get icon(){return this._icon}get iconSvg(){return this._iconSvgSanitized}get mount(){return this._mount}get setIsActive(){return this._setIsActive||(()=>{})}get update(){return this._update}get destroy(){return this._destroy}get enabled(){return this._enabled}get scrollBottomReached(){return this._scrollBottomReached}}}),window.addEventListener("DOMContentLoaded",(function(){const t=document.querySelector("body > .content")||document.querySelector("body > #content");if(t&&!document.getElementById("app-sidebar")){const e=document.createElement("div");e.id="app-sidebar",t.appendChild(e)}const e=new(r.Ay.extend(bt))({name:"SidebarRoot"});e.$mount("#app-sidebar"),window.OCA.Files.Sidebar.open=e.open,window.OCA.Files.Sidebar.close=e.close,window.OCA.Files.Sidebar.setFullScreenMode=e.setFullScreenMode,window.OCA.Files.Sidebar.setShowTagsDefault=e.setShowTagsDefault}))},27138:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(71354),r=i.n(n),s=i(76314),o=i.n(s)()(r());o.push([t.id,'.app-sidebar--has-preview[data-v-713d1f8e] .app-sidebar-header__figure{background-size:cover}.app-sidebar--has-preview[data-v-713d1f8e][data-mimetype="text/plain"] .app-sidebar-header__figure,.app-sidebar--has-preview[data-v-713d1f8e][data-mimetype="text/markdown"] .app-sidebar-header__figure{background-size:contain}.app-sidebar--full[data-v-713d1f8e]{position:fixed !important;z-index:2025 !important;top:0 !important;height:100% !important}.app-sidebar[data-v-713d1f8e] .app-sidebar-header__description{margin:0 16px 4px 16px !important}.app-sidebar .svg-icon[data-v-713d1f8e] svg{width:20px;height:20px;fill:currentColor}.sidebar__description[data-v-713d1f8e]{display:flex;flex-direction:column;width:100%;gap:8px 0}',"",{version:3,sources:["webpack://./apps/files/src/views/Sidebar.vue"],names:[],mappings:"AAGE,uEACC,qBAAA,CAKA,yMACC,uBAAA,CAKH,oCACC,yBAAA,CACA,uBAAA,CACA,gBAAA,CACA,sBAAA,CAIA,+DACC,iCAAA,CAKD,4CACC,UAAA,CACA,WAAA,CACA,iBAAA,CAKH,uCACC,YAAA,CACA,qBAAA,CACA,UAAA,CACA,SAAA",sourcesContent:['\n.app-sidebar {\n\t&--has-preview:deep {\n\t\t.app-sidebar-header__figure {\n\t\t\tbackground-size: cover;\n\t\t}\n\n\t\t&[data-mimetype="text/plain"],\n\t\t&[data-mimetype="text/markdown"] {\n\t\t\t.app-sidebar-header__figure {\n\t\t\t\tbackground-size: contain;\n\t\t\t}\n\t\t}\n\t}\n\n\t&--full {\n\t\tposition: fixed !important;\n\t\tz-index: 2025 !important;\n\t\ttop: 0 !important;\n\t\theight: 100% !important;\n\t}\n\n\t:deep {\n\t\t.app-sidebar-header__description {\n\t\t\tmargin: 0 16px 4px 16px !important;\n\t\t}\n\t}\n\n\t.svg-icon {\n\t\t::v-deep svg {\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n}\n\n.sidebar__description {\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\tgap: 8px 0;\n}\n'],sourceRoot:""}]);const a=o},29317:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(71354),r=i.n(n),s=i(76314),o=i.n(s)()(r());o.push([t.id,".system-tags[data-v-17f14596]{display:flex;flex-direction:column}.system-tags__select[data-v-17f14596]{width:100%}.system-tags__select[data-v-17f14596] .vs__deselect{padding:0}","",{version:3,sources:["webpack://./apps/systemtags/src/components/SystemTags.vue"],names:[],mappings:"AACA,8BACC,YAAA,CACA,qBAAA,CAGA,sCACC,UAAA,CAEC,oDACC,SAAA",sourcesContent:["\n.system-tags {\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t// Fix issue with AppSidebar styles overwriting NcSelect styles\n\t&__select {\n\t\twidth: 100%;\n\t\t:deep {\n\t\t\t.vs__deselect {\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=o},42634:()=>{},63779:()=>{},77199:()=>{},59169:()=>{},86833:()=>{},35810:(t,e,i)=>{"use strict";i.d(e,{Al:()=>n.r,H4:()=>n.c,PY:()=>n.b,Q$:()=>n.e,R3:()=>n.n,VL:()=>n.l,ZH:()=>n.q,lJ:()=>n.d,pt:()=>n.F,ur:()=>h,v7:()=>d,vd:()=>n.s});var n=i(68251),r=(i(87485),i(43627),i(53334)),s=i(380),o=i(65606),a=i(96763);Error;const l=["B","KB","MB","GB","TB","PB"],c=["B","KiB","MiB","GiB","TiB","PiB"];function d(t,e=!1,i=!1,n=!1){i=i&&!n,"string"==typeof t&&(t=Number(t));let s=t>0?Math.floor(Math.log(t)/Math.log(n?1e3:1024)):0;s=Math.min((i?c.length:l.length)-1,s);const o=i?c[s]:l[s];let a=(t/Math.pow(n?1e3:1024,s)).toFixed(1);return!0===e&&0===s?("0.0"!==a?"< 1 ":"0 ")+(i?c[1]:l[1]):(a=s<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,r.lO)()),a+" "+o)}function u(t){return t instanceof Date?t.toISOString():String(t)}function h(t,e={}){const i={sortingMode:"basename",sortingOrder:"asc",...e};return function(t,e,i){i=i??[];const n=(e=e??[t=>t]).map(((t,e)=>"asc"===(i[e]??"asc")?1:-1)),s=Intl.Collator([(0,r.Z0)(),(0,r.lO)()],{numeric:!0,usage:"sort"});return[...t].sort(((t,i)=>{for(const[r,o]of e.entries()){const e=s.compare(u(o(t)),u(o(i)));if(0!==e)return e*n[r]}return 0}))}(t,[...i.sortFavoritesFirst?[t=>1!==t.attributes?.favorite]:[],...i.sortFoldersFirst?[t=>"folder"!==t.type]:[],..."basename"!==i.sortingMode?[t=>t[i.sortingMode]]:[],t=>{return(e=t.displayname||t.attributes?.displayname||t.basename).lastIndexOf(".")>0?e.slice(0,e.lastIndexOf(".")):e;var e},t=>t.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 p,f,g={},m={};function E(){return p||(p=1,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",i="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,i){if(e){const n=Object.keys(e),r=n.length;for(let s=0;s5&&"xml"===n)return u("InvalidXml","XML declaration allowed only at the start of the document.",p(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function r(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let i=1;for(e+=8;e"===t[e]&&(i--,0===i))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}g.validate=function(s,o){o=Object.assign({},e,o);const l=[];let h=!1,f=!1;"\ufeff"===s[0]&&(s=s.substr(1));for(let e=0;e"!==s[e]&&" "!==s[e]&&"\t"!==s[e]&&"\n"!==s[e]&&"\r"!==s[e];e++)b+=s[e];if(b=b.trim(),"/"===b[b.length-1]&&(b=b.substring(0,b.length-1),e--),g=b,!t.isName(g)){let t;return t=0===b.trim().length?"Invalid space after '<'.":"Tag '"+b+"' is an invalid name.",u("InvalidTag",t,p(s,e))}const v=a(s,e);if(!1===v)return u("InvalidAttr","Attributes for '"+b+"' have open quote.",p(s,e));let A=v.value;if(e=v.index,"/"===A[A.length-1]){const t=e-A.length;A=A.substring(0,A.length-1);const i=c(A,o);if(!0!==i)return u(i.err.code,i.err.msg,p(s,t+i.err.line));h=!0}else if(E){if(!v.tagClosed)return u("InvalidTag","Closing tag '"+b+"' doesn't have proper closing.",p(s,e));if(A.trim().length>0)return u("InvalidTag","Closing tag '"+b+"' can't have attributes or invalid starting.",p(s,m));if(0===l.length)return u("InvalidTag","Closing tag '"+b+"' has not been opened.",p(s,m));{const t=l.pop();if(b!==t.tagName){let e=p(s,t.tagStartPos);return u("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+e.line+", col "+e.col+") instead of closing tag '"+b+"'.",p(s,m))}0==l.length&&(f=!0)}}else{const t=c(A,o);if(!0!==t)return u(t.err.code,t.err.msg,p(s,e-A.length+t.err.line));if(!0===f)return u("InvalidXml","Multiple possible root nodes found.",p(s,e));-1!==o.unpairedTags.indexOf(b)||l.push({tagName:b,tagStartPos:m}),h=!0}for(e++;e0)||u("InvalidXml","Invalid '"+JSON.stringify(l.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):u("InvalidXml","Start tag expected.",1)};const s='"',o="'";function a(t,e){let i="",n="",r=!1;for(;e"===t[e]&&""===n){r=!0;break}i+=t[e]}return""===n&&{value:i,index:e,tagClosed:r}}const l=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function c(e,i){const n=t.getAllMatches(e,l),r={};for(let t=0;t{for(const i of t){if("string"==typeof i&&e===i)return!0;if(i instanceof RegExp&&i.test(e))return!0}}:()=>!1})}var _,F,$,P,D,M,j,k,U,B,G,V,X,q={};function H(){if(_)return q;function t(r,s,o){let a;const l={};for(let c=0;c0&&(l[s.textNodeName]=a):void 0!==a&&(l[s.textNodeName]=a),l}function e(t){const e=Object.keys(t);for(let t=0;t!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,i){return t}};return C.buildOptions=function(e){return Object.assign({},t,e)},C.defaultOptions=t,C}(),e=function(){if(L)return S;L=1;const t=E(),e=y?A:(y=1,A=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}),i=function(){if(I)return N;I=1;const t=E();function e(t,e){let i="";for(;e"===t[a]){if(u?"-"===t[a-1]&&"-"===t[a-2]&&(u=!1,c--):c--,0===c)break}else"["===t[a]?d=!0:h+=t[a];else{if(d&&i(t,a)){let i,n;a+=7,[i,n,a]=e(t,a+1),-1===n.indexOf("&")&&(l[o(i)]={regx:RegExp(`&${i};`,"g"),val:n})}else d&&n(t,a)||d&&r(t,a)?a+=8:d&&s(t,a)?a+=9:u=!0;c++,h=""}if(0!==c)throw new Error("Unclosed DOCTYPE")}return{entities:l,i:a}}}(),n=function(){if(w)return T;w=1;const t=/^[-+]?0x[a-fA-F0-9]+$/,e=/^([\-\+])?(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 T=function(n,r={}){if(r=Object.assign({},i,r),!n||"string"!=typeof n)return n;let s=n.trim();if(void 0!==r.skipLike&&r.skipLike.test(s))return n;if(r.hex&&t.test(s))return Number.parseInt(s,16);{const t=e.exec(s);if(t){const e=t[1],i=t[2];let a=(o=t[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=t[4]||t[6];if(!r.leadingZeros&&i.length>0&&e&&"."!==s[2])return n;if(!r.leadingZeros&&i.length>0&&!e&&"."!==s[1])return n;{const t=Number(s),o=""+t;return-1!==o.search(/[eE]/)||l?r.eNotation?t:n:-1!==s.indexOf(".")?"0"===o&&""===a||o===a||e&&o==="-"+a?t:n:i?a===o||e+a===o?t:n:s===o||s===e+o?t:n}}return n}var o}}(),r=R();function s(t){const e=Object.keys(t);for(let i=0;i0)){o||(t=this.replaceEntitiesValue(t));const n=this.options.tagValueProcessor(e,t,i,r,s);return null==n?t:typeof n!=typeof t||n!==t?n:this.options.trimValues||t.trim()===t?v(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function a(t){if(this.options.removeNSPrefix){const e=t.split(":"),i="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=i+e[1])}return t}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function c(e,i,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const n=t.getAllMatches(e,l),r=n.length,s={};for(let t=0;t",a,"Closing Tag is not closed.");let i=t.substring(a+2,e).trim();if(this.options.removeNSPrefix){const t=i.indexOf(":");-1!==t&&(i=i.substr(t+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),r&&(s=this.saveTextToParentTag(s,r,o));const n=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;n&&-1!==this.options.unpairedTags.indexOf(n)?(l=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=o.lastIndexOf("."),o=o.substring(0,l),r=this.tagsNodeStack.pop(),s="",a=e}else if("?"===t[a+1]){let i=m(t,a,!1,"?>");if(!i)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,r,o),this.options.ignoreDeclaration&&"?xml"===i.tagName||this.options.ignorePiTags);else{const t=new e(i.tagName);t.add(this.options.textNodeName,""),i.tagName!==i.tagExp&&i.attrExpPresent&&(t[":@"]=this.buildAttributesMap(i.tagExp,o,i.tagName)),this.addChild(r,t,o)}a=i.closeIndex+1}else if("!--"===t.substr(a+1,3)){const e=g(t,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const i=t.substring(a+4,e-2);s=this.saveTextToParentTag(s,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}a=e}else if("!D"===t.substr(a+1,2)){const e=i(t,a);this.docTypeEntities=e.entities,a=e.i}else if("!["===t.substr(a+1,2)){const e=g(t,"]]>",a,"CDATA is not closed.")-2,i=t.substring(a+9,e);s=this.saveTextToParentTag(s,r,o);let n=this.parseTextData(i,r.tagname,o,!0,!1,!0,!0);null==n&&(n=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):r.add(this.options.textNodeName,n),a=e+2}else{let i=m(t,a,this.options.removeNSPrefix),l=i.tagName;const c=i.rawTagName;let d=i.tagExp,u=i.attrExpPresent,h=i.closeIndex;this.options.transformTagName&&(l=this.options.transformTagName(l)),r&&s&&"!xml"!==r.tagname&&(s=this.saveTextToParentTag(s,r,o,!1));const p=r;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),l!==n.tagname&&(o+=o?"."+l:l),this.isItStopNode(this.options.stopNodes,o,l)){let n="";if(d.length>0&&d.lastIndexOf("/")===d.length-1)"/"===l[l.length-1]?(l=l.substr(0,l.length-1),o=o.substr(0,o.length-1),d=l):d=d.substr(0,d.length-1),a=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))a=i.closeIndex;else{const e=this.readStopNodeData(t,c,h+1);if(!e)throw new Error(`Unexpected end of ${c}`);a=e.i,n=e.tagContent}const s=new e(l);l!==d&&u&&(s[":@"]=this.buildAttributesMap(d,o,l)),n&&(n=this.parseTextData(n,l,o,!0,u,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),s.add(this.options.textNodeName,n),this.addChild(r,s,o)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),o=o.substr(0,o.length-1),d=l):d=d.substr(0,d.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const t=new e(l);l!==d&&u&&(t[":@"]=this.buildAttributesMap(d,o,l)),this.addChild(r,t,o),o=o.substr(0,o.lastIndexOf("."))}else{const t=new e(l);this.tagsNodeStack.push(r),l!==d&&u&&(t[":@"]=this.buildAttributesMap(d,o,l)),this.addChild(r,t,o),r=t}s="",a=h}}else s+=t[a];return n.child};function u(t,e,i){const n=this.options.updateTag(e.tagname,i,e[":@"]);!1===n||("string"==typeof n?(e.tagname=n,t.addChild(e)):t.addChild(e))}const h=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const i=this.docTypeEntities[e];t=t.replace(i.regx,i.val)}for(let e in this.lastEntities){const i=this.lastEntities[e];t=t.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const i=this.htmlEntities[e];t=t.replace(i.regex,i.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function p(t,e,i,n){return t&&(void 0===n&&(n=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,i,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function f(t,e,i){const n="*."+i;for(const i in t){const r=t[i];if(n===r||e===r)return!0}return!1}function g(t,e,i,n){const r=t.indexOf(e,i);if(-1===r)throw new Error(n);return r+e.length-1}function m(t,e,i,n=">"){const r=function(t,e,i=">"){let n,r="";for(let s=e;s",i,`${e} is not closed`);if(t.substring(i+2,s).trim()===e&&(r--,0===r))return{tagContent:t.substring(n,i),i:s};i=s}else if("?"===t[i+1])i=g(t,"?>",i+1,"StopNode is not closed.");else if("!--"===t.substr(i+1,3))i=g(t,"--\x3e",i+3,"StopNode is not closed.");else if("!["===t.substr(i+1,2))i=g(t,"]]>",i,"StopNode is not closed.")-2;else{const n=m(t,i,">");n&&((n&&n.tagName)===e&&"/"!==n.tagExp[n.tagExp.length-1]&&r++,i=n.closeIndex)}}function v(e,i,r){if(i&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&n(e,r)}return t.isExist(e)?e:""}return S=class{constructor(t){this.options=t,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:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=s,this.parseXml=d,this.parseTextData=o,this.resolveNameSpace=a,this.buildAttributesMap=c,this.isItStopNode=f,this.replaceEntitiesValue=h,this.readStopNodeData=b,this.saveTextToParentTag=p,this.addChild=u,this.ignoreAttributesFn=r(this.options.ignoreAttributes)}}}(),{prettify:i}=H(),n=b();return F=class{constructor(e){this.externalEntities={},this.options=t(e)}parse(t,r){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(r){!0===r&&(r={});const e=n.validate(t,r);if(!0!==e)throw Error(`${e.err.msg}:${e.err.line}:${e.err.col}`)}const s=new e(this.options);s.addExternalEntities(this.externalEntities);const o=s.parseXml(t);return this.options.preserveOrder||void 0===o?o:i(o,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}}function Z(){if(D)return P;function t(s,o,a,l){let c="",d=!1;for(let u=0;u`,d=!1;continue}if(p===o.commentPropName){c+=l+`\x3c!--${h[p][0][o.textNodeName]}--\x3e`,d=!0;continue}if("?"===p[0]){const t=i(h[":@"],o),e="?xml"===p?"":l;let n=h[p][0][o.textNodeName];n=0!==n.length?" "+n:"",c+=e+`<${p}${n}${t}?>`,d=!0;continue}let g=l;""!==g&&(g+=o.indentBy);const m=l+`<${p}${i(h[":@"],o)}`,E=t(h[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+"/>",d=!0}return c}function e(t){const e=Object.keys(t);for(let i=0;i0&&e.processEntities)for(let i=0;i0&&(n="\n"),t(e,i,"",n)}}function Y(){if(G)return B;G=1;const t="object"==typeof o&&o.env&&o.env.NODE_DEBUG&&/\bsemver\b/i.test(o.env.NODE_DEBUG)?(...t)=>a.error("SEMVER",...t):()=>{};return B=t}function W(){if(X)return V;X=1;const t=Number.MAX_SAFE_INTEGER||9007199254740991;return V={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}!function(){if(U)return k;U=1;const t=b(),e=z(),i=function(){if(j)return M;j=1;const t=Z(),e=R(),i={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:"&"},{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 n(t){this.options=Object.assign({},i,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=e(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=o),this.processTextOrObjNode=r,this.options.format?(this.indentate=s,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function r(t,e,i,n){const r=this.j2x(t,i+1,n.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,r.attrStr,i):this.buildObjectNode(r.val,e,r.attrStr,i)}function s(t){return this.options.indentBy.repeat(t)}function o(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}return n.prototype.build=function(e){return this.options.preserveOrder?t(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},n.prototype.j2x=function(t,e,i){let n="",r="";const s=i.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])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&&!this.ignoreAttributesFn(i,s))n+=this.buildAttrPairStr(i,""+t[o]);else if(!i)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 s="",a="";for(let l=0;l"+t+r}},n.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+i+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),""===r?this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+i+">"+r+"0&&this.options.processEntities)for(let e=0;e{const n=(t=>{for(const[e,i]of h)t=t.split(`${e}*`).join(`${e}{0,${i}}`).split(`${e}+`).join(`${e}{1,${i}}`);return t})(e),r=d++;s(t,r,e),c[t]=r,l[r]=e,o[r]=new RegExp(e,i?"g":void 0),a[r]=new RegExp(n,i?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),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",`${u}+`),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),e.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),e.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),e.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*$")}(dt,dt.exports)),dt.exports),s=function(){if(J)return Q;J=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return Q=i=>i?"object"!=typeof i?t:i:e}(),{compareIdentifiers:o}=function(){if(et)return tt;et=1;const t=/^[0-9]+$/,e=(e,i)=>{const n=t.test(e),r=t.test(i);return n&&r&&(e=+e,i=+i),e===i?0:n&&!r?-1:r&&!n?1:ee(i,t)}}();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>e)throw new TypeError(`version is longer than ${e} characters`);t("SemVer",o,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=o.trim().match(l.loose?n[r.LOOSE]:n[r.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((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(e===this.prerelease.join(".")&&!1===i)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(t)}}if(e){let n=[e,t];!1===i&&(n=[e]),0===o(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return it=a}!function(){if(at)return ot;at=1;const t=function(){if(st)return rt;st=1;const t=ut();return rt=(e,i,n=!1)=>{if(e instanceof t)return e;try{return new t(e,i)}catch(t){if(!n)return null;throw t}}}();ot=(e,i)=>{const n=t(e,i);return n?n.version:null}}(),function(){if(ct)return lt;ct=1;const t=ut();lt=(e,i)=>new t(e,i).major}(),s.m}},s={};function o(t){var e=s[t];if(void 0!==e)return e.exports;var i=s[t]={id:t,loaded:!1,exports:{}};return r[t].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=r,e=[],o.O=(t,i,n,r)=>{if(!i){var s=1/0;for(d=0;d=r)&&Object.keys(o.O).every((t=>o.O[t](i[l])))?i.splice(l--,1):(a=!1,r0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[i,n,r]},o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,i)=>(o.f[i](t,e),e)),[])),o.u=t=>t+"-"+t+".js?v="+{2441:"818548e7203b55d23717",5862:"64a2c950a5aee9226eb1",6189:"74c27de7e7e9965fc2aa"}[t],o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i={},n="nextcloud:",o.l=(t,e,r,s)=>{if(i[t])i[t].push(e);else{var a,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),d=0;d{a.onerror=a.onload=null,clearTimeout(p);var r=i[t];if(delete i[t],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((t=>t(n))),e)return e(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),l&&document.head.appendChild(a)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),o.j=4763,(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");if(i.length)for(var n=i.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=i[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{o.b=document.baseURI||self.location.href;var t={4763:0};o.f.j=(e,i)=>{var n=o.o(t,e)?t[e]:void 0;if(0!==n)if(n)i.push(n[2]);else{var r=new Promise(((i,r)=>n=t[e]=[i,r]));i.push(n[2]=r);var s=o.p+o.u(e),a=new Error;o.l(s,(i=>{if(o.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var r=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;a.message="Loading chunk "+e+" failed.\n("+r+": "+s+")",a.name="ChunkLoadError",a.type=r,a.request=s,n[1](a)}}),"chunk-"+e,e)}},o.O.j=e=>0===t[e];var e=(e,i)=>{var n,r,s=i[0],a=i[1],l=i[2],c=0;if(s.some((e=>0!==t[e]))){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);if(l)var d=l(o)}for(e&&e(i);co(99851)));a=o.O(a)})(); //# sourceMappingURL=files-sidebar.js.map?v=203e7d6b0a95961fb292