7608-7608.js 95 KB

123
  1. /*! For license information please see 7608-7608.js.LICENSE.txt */
  2. (self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[7608,6318],{42761:function(t){"use strict";t.exports="data:image/svg+xml;base64,PCEtLSBUaGlzIGljb24gaXMgcGFydCBvZiBNYXRlcmlhbCBVSSBJY29ucy4gQ29weXJpZ2h0IDIwMjAgR29vZ2xlIEluYy4sIEFwYWNoZS0yLjAgTGljZW5zZSAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTS00LTRoMjR2MjRILTRWLTR6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTggMEMzLjYgMCAwIDMuNiAwIDhzMy42IDggOCA4IDgtMy42IDgtOC0zLjYtOC04LTh6IiBmaWxsPSIjZWQ0ODRjIi8+PHBhdGggZD0iTTUgNi41aDZjLjggMCAxLjUuNyAxLjUgMS41cy0uNyAxLjUtMS41IDEuNUg1Yy0uOCAwLTEuNS0uNy0xLjUtMS41UzQuMiA2LjUgNSA2LjV6IiBmaWxsPSIjZmRmZmZmIi8+PC9zdmc+Cg=="},87210:function(t){"use strict";t.exports="data:image/svg+xml;base64,PCEtLSBUaGlzIGljb24gaXMgcGFydCBvZiBNYXRlcmlhbCBVSSBJY29ucy4gQ29weXJpZ2h0IDIwMjAgR29vZ2xlIEluYy4sIEFwYWNoZS0yLjAgTGljZW5zZSAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTQuOCAxMS4yaDYuNFY0LjhINC44djYuNHpNOCAwQzMuNiAwIDAgMy42IDAgOHMzLjYgOCA4IDggOC0zLjYgOC04LTMuNi04LTgtOHoiIGZpbGw9IiM0OWIzODIiLz48L3N2Zz4K"},94659:function(t){"use strict";t.exports="data:image/svg+xml;base64,PCEtLSBUaGlzIGljb24gaXMgcGFydCBvZiBNYXRlcmlhbCBVSSBJY29ucy4gQ29weXJpZ2h0IDIwMjAgR29vZ2xlIEluYy4sIEFwYWNoZS0yLjAgTGljZW5zZSAtLT4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTS00LTRoMjR2MjRILTR6Ii8+PHBhdGggZD0iTTYuOS4xQzMgLjYtLjEgNC0uMSA4YzAgNC40IDMuNiA4IDggOCA0IDAgNy40LTMgOC02LjktMS4yIDEuMy0yLjkgMi4xLTQuNyAyLjEtMy41IDAtNi40LTIuOS02LjQtNi40IDAtMS45LjgtMy42IDIuMS00Ljd6IiBmaWxsPSIjZjRhMzMxIi8+PC9zdmc+Cg=="},39896:function(t){"use strict";t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0iIzIyMiI+PHBhdGggZD0iTTE1LjQgMTYuNkwxMC44IDEybDQuNi00LjZMMTQgNmwtNiA2IDYgNiAxLjQtMS40eiIvPjwvc3ZnPg=="},76899:function(t){"use strict";t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0iIzIyMiI+PHBhdGggZD0iTTE4LjQgNy40TDE3IDZsLTYgNiA2IDYgMS40LTEuNC00LjYtNC42IDQuNi00LjZtLTYgMEwxMSA2bC02IDYgNiA2IDEuNC0xLjRMNy44IDEybDQuNi00LjZ6Ii8+PC9zdmc+"},88931:function(t){"use strict";t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0iIzIyMiI+PHBhdGggZD0iTTUuNiA3LjRMNyA2bDYgNi02IDYtMS40LTEuNCA0LjYtNC42LTQuNi00LjZtNiAwTDEzIDZsNiA2LTYgNi0xLjQtMS40IDQuNi00LjYtNC42LTQuNnoiLz48L3N2Zz4="},16556:function(t){"use strict";t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0iIzIyMiI+PHBhdGggZD0iTTguNiAxNi42bDQuNi00LjYtNC42LTQuNkwxMCA2bDYgNi02IDYtMS40LTEuNHoiLz48L3N2Zz4="},24654:function(){},52361:function(){},94616:function(){},57462:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return R}});var n=i(20144),r=i(64882);function o(t){return"function"==typeof t?t():(0,n.unref)(t)}n.default.util.warn,i(25108);const s="undefined"!=typeof window&&"undefined"!=typeof document;function a(t){const e=Object.create(null);return i=>e[i]||(e[i]=t(i))}Object.prototype.toString;const l=/\B([A-Z])/g,c=(a((t=>t.replace(l,"-$1").toLowerCase())),/-(\w)/g);function u(t){var e;const i=o(t);return null!=(e=null==i?void 0:i.$el)?e:i}a((t=>t.replace(c,((t,e)=>e?e.toUpperCase():"")))),n.default.util.warn,i(25108);const d=s?window:void 0;function p(t,e,i={}){const{window:r=d,...o}=i;let s;const a=function(t){const e=function(){const t=(0,n.ref)(!1);return(0,n.getCurrentInstance)()&&(0,n.onMounted)((()=>{t.value=!0})),t}();return(0,n.computed)((()=>(e.value,Boolean(t()))))}((()=>r&&"ResizeObserver"in r)),l=()=>{s&&(s.disconnect(),s=void 0)},c=(0,n.computed)((()=>Array.isArray(t)?t.map((t=>u(t))):[u(t)])),p=(0,n.watch)(c,(t=>{if(l(),a.value&&r){s=new ResizeObserver(e);for(const e of t)e&&s.observe(e,o)}}),{immediate:!0,flush:"post",deep:!0}),f=()=>{l(),p()};return h=f,!!(0,n.getCurrentScope)()&&(0,n.onScopeDispose)(h),{isSupported:a,stop:f};var h}s&&window.document,s&&window.navigator,s&&window.location,"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,Number.POSITIVE_INFINITY;var f=i(5656),h=i(31352),m=i(62520),g=i(43554),v=i(93664),w=i(79753),y=i(68188),_=i(74139);function b(t,e,i,n,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){!(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)&&typeof __VUE_SSR_CONTEXT__<"u"&&(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}const x=b({name:"FileIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon file-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,N=b((0,n.defineComponent)({__name:"DialogButton",props:{callback:null,label:null,icon:{default:void 0},type:{default:"secondary"}},emits:["click"],setup(t,{emit:e}){const i=t;return{__sfc:!0,props:i,emit:e,handleClick:t=>{var n;null==(n=i.callback)||n.call(i),e("click",t)},NcButton:r.P2,NcIconSvgWrapper:r.FK}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e(i.NcButton,{attrs:{"aria-label":i.props.label,type:i.props.type},on:{click:i.handleClick},scopedSlots:t._u([void 0!==i.props.icon?{key:"icon",fn:function(){return["string"==typeof i.props.icon?e(i.NcIconSvgWrapper,{attrs:{svg:i.props.icon}}):e(i.props.icon,{tag:"component",attrs:{size:20}})]},proxy:!0}:null],null,!0)},[t._v(" "+t._s(i.props.label)+" ")])}),[],!1,null,null,null,null).exports,C=b((0,n.defineComponent)({__name:"DialogBase",props:{name:null,message:{default:""},additionalTrapElements:{default:()=>[]},container:{default:void 0},size:{default:"small"},buttons:{default:()=>[]},navigationClasses:{default:()=>[]},contentClasses:{default:()=>[]},dialogClasses:{default:()=>[]}},emits:["close"],setup(t,{emit:e}){const i=t,o=(0,n.useSlots)(),s=(0,n.ref)(),{width:a}=function(t,e={width:0,height:0},i={}){const{window:r=d,box:o="content-box"}=i,s=(0,n.computed)((()=>{var e,i;return null==(i=null==(e=u(t))?void 0:e.namespaceURI)?void 0:i.includes("svg")})),a=(0,n.ref)(e.width),l=(0,n.ref)(e.height);return p(t,(([e])=>{const i="border-box"===o?e.borderBoxSize:"content-box"===o?e.contentBoxSize:e.devicePixelContentBoxSize;if(r&&s.value){const e=u(t);if(e){const t=r.getComputedStyle(e);a.value=Number.parseFloat(t.width),l.value=Number.parseFloat(t.height)}}else if(i){const t=Array.isArray(i)?i:[i];a.value=t.reduce(((t,{inlineSize:e})=>t+e),0),l.value=t.reduce(((t,{blockSize:e})=>t+e),0)}else a.value=e.contentRect.width,l.value=e.contentRect.height}),i),(0,n.watch)((()=>u(t)),(t=>{a.value=t?e.width:0,l.value=t?e.height:0})),{width:a,height:l}}(s),l=(0,n.computed)((()=>a.value<876)),c=(0,n.computed)((()=>void 0!==(null==o?void 0:o.navigation))),f=(0,n.ref)(!0),h=(0,n.computed)((()=>({additionalTrapElements:i.additionalTrapElements,container:void 0===i.container?"body":i.container,name:i.name,size:i.size,enableSlideshow:!1,enableSwipe:!1})));return{__sfc:!0,props:i,emit:e,slots:o,wrapper:s,dialogWidth:a,isNavigationCollapsed:l,hasNavigation:c,open:f,handleClose:()=>{f.value=!1,e("close")},modalProps:h,NcModal:r.Jc,DialogButton:N}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return i.open?e(i.NcModal,t._b({staticClass:"dialog__modal",on:{close:i.handleClose}},"NcModal",i.modalProps,!1),[e("h2",{staticClass:"dialog__name",domProps:{textContent:t._s(t.name)}}),e("div",{staticClass:"dialog",class:t.dialogClasses},[e("div",{ref:"wrapper",class:["dialog__wrapper",{"dialog__wrapper--collapsed":i.isNavigationCollapsed}]},[i.hasNavigation?e("nav",{staticClass:"dialog__navigation",class:t.navigationClasses},[t._t("navigation",null,{isCollapsed:i.isNavigationCollapsed})],2):t._e(),e("div",{staticClass:"dialog__content",class:t.contentClasses},[t._t("default",(function(){return[e("p",[t._v(t._s(i.props.message))])]}))],2)]),e("div",{staticClass:"dialog__actions"},[t._t("actions",(function(){return t._l(i.props.buttons,(function(n,r){return e(i.DialogButton,t._b({key:r,on:{click:i.handleClose}},"DialogButton",n,!1))}))}))],2)])]):t._e()}),[],!1,null,"89afd3fd",null,null).exports,E=()=>{var t,e,i;const r=(0,g.j)("files","config",null),o=(0,n.ref)(null!=(t=null==r?void 0:r.show_hidden)&&t),s=(0,n.ref)(null==(e=null==r?void 0:r.sort_favorites_first)||e),a=(0,n.ref)(null==(i=null==r?void 0:r.crop_image_previews)||i);return(0,n.onMounted)((()=>{v.Z.get((0,w.generateUrl)("/apps/files/api/v1/configs")).then((t=>{var e,i,n,r,l,c,u,d,p;o.value=null!=(n=null==(i=null==(e=t.data)?void 0:e.data)?void 0:i.show_hidden)&&n,s.value=null==(c=null==(l=null==(r=t.data)?void 0:r.data)?void 0:l.sort_favorites_first)||c,a.value=null==(p=null==(d=null==(u=t.data)?void 0:u.data)?void 0:d.crop_image_previews)||p}))})),{showHiddenFiles:o,sortFavoritesFirst:s,cropImagePreviews:a}},I=b({name:"MenuUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon menu-up-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M7,15L12,10L17,15H7Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,k=b({name:"MenuDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon menu-down-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M7,10L12,15L17,10H7Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,S={"file-picker__file-icon":"_file-picker__file-icon_1vgv4_5"},T=b((0,n.defineComponent)({__name:"LoadingTableRow",props:{showCheckbox:{type:Boolean}},setup(t){return{__sfc:!0,fileListIconStyles:S}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e("tr",{staticClass:"file-picker__row loading-row",attrs:{"aria-hidden":"true"}},[t.showCheckbox?e("td",{staticClass:"row-checkbox"},[e("span")]):t._e(),e("td",{staticClass:"row-name"},[e("div",{staticClass:"row-wrapper"},[e("span",{class:i.fileListIconStyles["file-picker__file-icon"]}),e("span")])]),t._m(0),t._m(1)])}),[function(){var t=this._self._c;return this._self._setupProxy,t("td",{staticClass:"row-size"},[t("span")])},function(){var t=this._self._c;return this._self._setupProxy,t("td",{staticClass:"row-modified"},[t("span")])}],!1,null,"6aded0d9",null,null).exports,A=b({name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon folder-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,L=b((0,n.defineComponent)({name:"FilePreview",props:{node:null},setup(t){const e=t,i=(0,n.ref)(S),{cropImagePreviews:r}=E(),o=(0,n.computed)((()=>function(t,e={}){var i;e={size:32,cropPreview:!1,mimeFallback:!0,...e};try{const n=(null==(i=t.attributes)?void 0:i.previewUrl)||(0,w.generateUrl)("/core/preview?fileId={fileid}",{fileid:t.fileid});let r;try{r=new URL(n)}catch{r=new URL(n,window.location.origin)}return r.searchParams.set("x","".concat(e.size)),r.searchParams.set("y","".concat(e.size)),r.searchParams.set("mimeFallback","".concat(e.mimeFallback)),r.searchParams.set("a",!0===e.cropPreview?"0":"1"),r.searchParams.set("c","".concat(t.attributes.etag)),r}catch{return null}}(e.node,{cropPreview:r.value}))),s=(0,n.computed)((()=>e.node.type===f.Tv.File)),a=(0,n.ref)(!1);return(0,n.watch)(o,(()=>{if(a.value=!1,o.value){const t=document.createElement("img");t.src=o.value.href,t.onerror=()=>t.remove(),t.onload=()=>{a.value=!0,t.remove()},document.body.appendChild(t)}}),{immediate:!0}),{__sfc:!0,fileListIconStyles:i,props:e,cropImagePreviews:r,previewURL:o,isFile:s,canLoadPreview:a,t:y.t,IconFile:x,IconFolder:A}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e("div",{class:i.fileListIconStyles["file-picker__file-icon"],style:i.canLoadPreview?{backgroundImage:"url(".concat(i.previewURL,")")}:void 0,attrs:{"aria-label":i.t("MIME type {mime}",{mime:t.node.mime||i.t("unknown")})}},[i.canLoadPreview?t._e():[i.isFile?e(i.IconFile,{attrs:{size:20}}):e(i.IconFolder,{attrs:{size:20}})]],2)}),[],!1,null,null,null,null).exports,P=b((0,n.defineComponent)({__name:"FileListRow",props:{allowPickDirectory:{type:Boolean},selected:{type:Boolean},showCheckbox:{type:Boolean},canPick:{type:Boolean},node:null},emits:["update:selected","enter-directory"],setup(t,{emit:e}){const i=t,o=(0,n.computed)((()=>{var t;return(null==(t=i.node.attributes)?void 0:t.displayName)||i.node.basename.slice(0,i.node.extension?-i.node.extension.length:void 0)})),s=(0,n.computed)((()=>i.node.extension)),a=(0,n.computed)((()=>i.node.type===f.Tv.Folder)),l=(0,n.computed)((()=>i.canPick&&(i.allowPickDirectory||!a.value)));function c(){e("update:selected",!i.selected)}function u(){a.value?e("enter-directory",i.node):c()}return{__sfc:!0,props:i,emit:e,displayName:o,fileExtension:s,isDirectory:a,isPickable:l,toggleSelected:c,handleClick:u,handleKeyDown:function(t){"Enter"===t.key&&u()},formatFileSize:f.sS,NcCheckboxRadioSwitch:r.rw,NcDateTime:r.Jh,t:y.t,FilePreview:L}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e("tr",t._g({class:["file-picker__row",{"file-picker__row--selected":t.selected&&!t.showCheckbox}],attrs:{tabindex:t.showCheckbox&&!i.isDirectory?void 0:0,"aria-selected":i.isPickable?t.selected:void 0,"data-filename":t.node.basename,"data-testid":"file-list-row"},on:{click:i.handleClick}},!t.showCheckbox||i.isDirectory?{keydown:i.handleKeyDown}:{}),[t.showCheckbox?e("td",{staticClass:"row-checkbox"},[e(i.NcCheckboxRadioSwitch,{attrs:{disabled:!i.isPickable,checked:t.selected,"aria-label":i.t("Select the row for {nodename}",{nodename:i.displayName}),"data-testid":"row-checkbox"},on:{click:function(t){t.stopPropagation()},"update:checked":i.toggleSelected}})],1):t._e(),e("td",{staticClass:"row-name"},[e("div",{staticClass:"file-picker__name-container",attrs:{"data-testid":"row-name"}},[e(i.FilePreview,{attrs:{node:t.node}}),e("div",{staticClass:"file-picker__file-name",attrs:{title:i.displayName},domProps:{textContent:t._s(i.displayName)}}),e("div",{staticClass:"file-picker__file-extension",domProps:{textContent:t._s(i.fileExtension)}})],1)]),e("td",{staticClass:"row-size"},[t._v(" "+t._s(i.formatFileSize(t.node.size||0))+" ")]),e("td",{staticClass:"row-modified"},[e(i.NcDateTime,{attrs:{timestamp:t.node.mtime,"ignore-seconds":!0}})],1)])}),[],!1,null,"d337ebac",null,null).exports,D=b((0,n.defineComponent)({__name:"FileList",props:{currentView:null,multiselect:{type:Boolean},allowPickDirectory:{type:Boolean},loading:{type:Boolean},files:null,selectedFiles:null,path:null},emits:["update:path","update:selectedFiles"],setup(t,{emit:e}){const i=t,s=(0,n.ref)(),{currentConfig:a}=(t=>{var e,i,r,s,a,l,c,u,d,p,f,h;const m=t=>"asc"===t?"ascending":"desc"===t?"descending":"none",y=(0,g.j)("files","viewConfigs",null),_=(0,n.ref)({sortBy:null!=(i=null==(e=null==y?void 0:y.files)?void 0:e.sorting_mode)?i:"basename",order:m(null!=(s=null==(r=null==y?void 0:y.files)?void 0:r.sorting_direction)?s:"asc")}),b=(0,n.ref)({sortBy:null!=(l=null==(a=null==y?void 0:y.recent)?void 0:a.sorting_mode)?l:"basename",order:m(null!=(u=null==(c=null==y?void 0:y.recent)?void 0:c.sorting_direction)?u:"asc")}),x=(0,n.ref)({sortBy:null!=(p=null==(d=null==y?void 0:y.favorites)?void 0:d.sorting_mode)?p:"basename",order:m(null!=(h=null==(f=null==y?void 0:y.favorites)?void 0:f.sorting_direction)?h:"asc")});(0,n.onMounted)((()=>{v.Z.get((0,w.generateUrl)("/apps/files/api/v1/views")).then((t=>{var e,i,n,r,o,s,a,l,c,u,d,p,f,h,g,v,w,y,N,C,E;_.value={sortBy:null!=(r=null==(n=null==(i=null==(e=t.data)?void 0:e.data)?void 0:i.files)?void 0:n.sorting_mode)?r:"basename",order:m(null==(a=null==(s=null==(o=t.data)?void 0:o.data)?void 0:s.files)?void 0:a.sorting_direction)},x.value={sortBy:null!=(d=null==(u=null==(c=null==(l=t.data)?void 0:l.data)?void 0:c.favorites)?void 0:u.sorting_mode)?d:"basename",order:m(null==(h=null==(f=null==(p=t.data)?void 0:p.data)?void 0:f.favorites)?void 0:h.sorting_direction)},b.value={sortBy:null!=(y=null==(w=null==(v=null==(g=t.data)?void 0:g.data)?void 0:v.recent)?void 0:w.sorting_mode)?y:"basename",order:m(null==(E=null==(C=null==(N=t.data)?void 0:N.data)?void 0:C.recent)?void 0:E.sorting_direction)}}))}));const N=(0,n.computed)((()=>"files"===o(t||"files")?_.value:"recent"===o(t)?b.value:x.value)),C=(0,n.computed)((()=>N.value.sortBy)),E=(0,n.computed)((()=>N.value.order));return{filesViewConfig:_,favoritesViewConfig:x,recentViewConfig:b,currentConfig:N,sortBy:C,order:E}})(i.currentView),l=(0,n.computed)((()=>{var t;return null!=(t=s.value)?t:a.value})),c=(0,n.computed)((()=>"basename"===l.value.sortBy?"none"===l.value.order?void 0:l.value.order:void 0)),u=(0,n.computed)((()=>"size"===l.value.sortBy?"none"===l.value.order?void 0:l.value.order:void 0)),d=(0,n.computed)((()=>"mtime"===l.value.sortBy?"none"===l.value.order?void 0:l.value.order:void 0)),{sortFavoritesFirst:p}=E(),_=(0,n.computed)((()=>{const t={ascending:(t,e,i)=>i(t,e),descending:(t,e,i)=>i(e,t),none:(t,e,i)=>0},e={basename:(t,e)=>{var i,n;return((null==(i=t.attributes)?void 0:i.displayName)||t.basename).localeCompare((null==(n=e.attributes)?void 0:n.displayName)||e.basename,(0,h.aj)())},size:(t,e)=>(t.size||0)-(e.size||0),mtime:(t,e)=>{var i,n,r,o;return((null==(n=null==(i=e.mtime)?void 0:i.getTime)?void 0:n.call(i))||0)-((null==(o=null==(r=t.mtime)?void 0:r.getTime)?void 0:o.call(r))||0)}};return[...i.files].sort(((i,n)=>(n.type===f.Tv.Folder?1:0)-(i.type===f.Tv.Folder?1:0)||(p?(n.attributes.favorite?1:0)-(i.attributes.favorite?1:0):0)||t[l.value.order](i,n,e[l.value.sortBy])))})),b=(0,n.computed)((()=>i.files.filter((t=>i.allowPickDirectory||t.type!==f.Tv.Folder)))),x=(0,n.computed)((()=>!i.loading&&i.selectedFiles.length>0&&i.selectedFiles.length>=b.value.length)),N=(0,n.ref)(4),C=(0,n.ref)();{const t=()=>(0,n.nextTick)((()=>{var t,e,i,n,r;const o=(null==(e=null==(t=C.value)?void 0:t.parentElement)?void 0:e.children)||[];let s=(null==(n=null==(i=C.value)?void 0:i.parentElement)?void 0:n.clientHeight)||450;for(let t=0;t<o.length;t++)null!=(r=C.value)&&r.isSameNode(o[t])||(s-=o[t].clientHeight);N.value=Math.floor((s-50)/50)}));(0,n.onMounted)((()=>{window.addEventListener("resize",t),t()})),(0,n.onUnmounted)((()=>{window.removeEventListener("resize",t)}))}return{__sfc:!0,props:i,emit:e,customSortingConfig:s,filesAppSorting:a,sortingConfig:l,sortByName:c,sortBySize:u,sortByModified:d,toggleSorting:t=>{l.value.sortBy===t?"ascending"===l.value.order?s.value={sortBy:l.value.sortBy,order:"descending"}:s.value={sortBy:l.value.sortBy,order:"ascending"}:s.value={sortBy:t,order:"ascending"}},sortFavoritesFirst:p,sortedFiles:_,selectableFiles:b,allSelected:x,onSelectAll:function(){i.selectedFiles.length<b.value.length?e("update:selectedFiles",b.value):e("update:selectedFiles",[])},onNodeSelected:function(t){i.selectedFiles.includes(t)?e("update:selectedFiles",i.selectedFiles.filter((e=>e.path!==t.path))):i.multiselect?e("update:selectedFiles",[...i.selectedFiles,t]):e("update:selectedFiles",[t])},onChangeDirectory:function(t){e("update:path",(0,m.join)(i.path,t.basename))},skeletonNumber:N,fileContainer:C,NcButton:r.P2,NcCheckboxRadioSwitch:r.rw,t:y.t,IconSortAscending:I,IconSortDescending:k,LoadingTableRow:T,FileListRow:P}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e("div",{ref:"fileContainer",staticClass:"file-picker__files"},[e("table",[e("thead",[e("tr",[t.multiselect?e("th",{staticClass:"row-checkbox"},[e("span",{staticClass:"hidden-visually"},[t._v(" "+t._s(i.t("Select entry"))+" ")]),t.multiselect?e(i.NcCheckboxRadioSwitch,{attrs:{"aria-label":i.t("Select all entries"),checked:i.allSelected,"data-testid":"select-all-checkbox"},on:{"update:checked":i.onSelectAll}}):t._e()],1):t._e(),e("th",{staticClass:"row-name",attrs:{"aria-sort":i.sortByName}},[e("div",{staticClass:"header-wrapper"},[e("span",{staticClass:"file-picker__header-preview"}),e(i.NcButton,{attrs:{wide:!0,type:"tertiary","data-test":"file-picker_sort-name"},on:{click:function(t){return i.toggleSorting("basename")}},scopedSlots:t._u([{key:"icon",fn:function(){return["ascending"===i.sortByName?e(i.IconSortAscending,{attrs:{size:20}}):"descending"===i.sortByName?e(i.IconSortDescending,{attrs:{size:20}}):e("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[t._v(" "+t._s(i.t("Name"))+" ")])],1)]),e("th",{staticClass:"row-size",attrs:{"aria-sort":i.sortBySize}},[e(i.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:function(t){return i.toggleSorting("size")}},scopedSlots:t._u([{key:"icon",fn:function(){return["ascending"===i.sortBySize?e(i.IconSortAscending,{attrs:{size:20}}):"descending"===i.sortBySize?e(i.IconSortDescending,{attrs:{size:20}}):e("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[t._v(" "+t._s(i.t("Size"))+" ")])],1),e("th",{staticClass:"row-modified",attrs:{"aria-sort":i.sortByModified}},[e(i.NcButton,{attrs:{wide:!0,type:"tertiary"},on:{click:function(t){return i.toggleSorting("mtime")}},scopedSlots:t._u([{key:"icon",fn:function(){return["ascending"===i.sortByModified?e(i.IconSortAscending,{attrs:{size:20}}):"descending"===i.sortByModified?e(i.IconSortDescending,{attrs:{size:20}}):e("span",{staticStyle:{width:"44px"}})]},proxy:!0}])},[t._v(" "+t._s(i.t("Modified"))+" ")])],1)])]),e("tbody",[t.loading?t._l(i.skeletonNumber,(function(n){return e(i.LoadingTableRow,{key:n,attrs:{"show-checkbox":t.multiselect}})})):t._l(i.sortedFiles,(function(n){return e(i.FileListRow,{key:n.fileid||n.path,attrs:{"allow-pick-directory":t.allowPickDirectory,"show-checkbox":t.multiselect,"can-pick":t.multiselect||0===t.selectedFiles.length||t.selectedFiles.includes(n),selected:t.selectedFiles.includes(n),node:n},on:{"update:selected":function(t){return i.onNodeSelected(n)},"enter-directory":i.onChangeDirectory}})}))],2)])])}),[],!1,null,"ecc68c3c",null,null).exports,M=b({name:"HomeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon home-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,Z=b({name:"PlusIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon plus-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,F=b((0,n.defineComponent)({__name:"FilePickerBreadcrumbs",props:{path:null,showMenu:{type:Boolean}},emits:["update:path","create-node"],setup(t,{emit:e}){const i=t,o=(0,n.ref)(""),s=(0,n.ref)();function a(){var t,e,i,n;const r=o.value.trim(),a=null==(e=null==(t=s.value)?void 0:t.$el)?void 0:e.querySelector("input");let l="";return 0===r.length?l=(0,y.t)("Folder name cannot be empty."):r.includes("/")?l=(0,y.t)('"/" is not allowed inside a folder name.'):["..","."].includes(r)?l=(0,y.t)('"{name}" is an invalid folder name.',{name:r}):null!=(i=window.OC.config)&&i.blacklist_files_regex&&r.match(null==(n=window.OC.config)?void 0:n.blacklist_files_regex)&&(l=(0,y.t)('"{name}" is not an allowed folder name',{name:r})),a&&a.setCustomValidity(l),""===l}const l=(0,n.computed)((()=>i.path.split("/").filter((t=>""!==t)).map(((t,e,i)=>({name:t,path:"/"+i.slice(0,e+1).join("/")})))));return{__sfc:!0,props:i,emit:e,newNodeName:o,nameInput:s,validateInput:a,onSubmit:function(){const t=o.value.trim();a()&&(e("create-node",t),o.value="")},pathElements:l,IconFolder:A,IconHome:M,IconPlus:Z,NcActions:r.O3,NcActionInput:r.Iw,NcBreadcrumbs:r.fg,NcBreadcrumb:r.$U,t:y.t}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e(i.NcBreadcrumbs,{staticClass:"file-picker__breadcrumbs",scopedSlots:t._u([{key:"default",fn:function(){return[e(i.NcBreadcrumb,{attrs:{name:i.t("Home"),title:i.t("Home")},on:{click:function(t){return i.emit("update:path","/")}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(i.IconHome,{attrs:{size:20}})]},proxy:!0}])}),t._l(i.pathElements,(function(t){return e(i.NcBreadcrumb,{key:t.path,attrs:{name:t.name,title:t.path},on:{click:function(e){return i.emit("update:path",t.path)}}})}))]},proxy:!0},t.showMenu?{key:"actions",fn:function(){return[e(i.NcActions,{attrs:{"aria-label":i.t("Create directory"),"force-menu":!0,"force-name":!0,"menu-name":i.t("New"),type:"secondary"},on:{close:function(t){i.newNodeName=""}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(i.IconPlus,{attrs:{size:20}})]},proxy:!0}],null,!1,2971667417)},[e(i.NcActionInput,{ref:"nameInput",attrs:{value:i.newNodeName,label:i.t("New folder"),placeholder:i.t("New folder name")},on:{"update:value":function(t){i.newNodeName=t},submit:i.onSubmit,input:i.validateInput},scopedSlots:t._u([{key:"icon",fn:function(){return[e(i.IconFolder,{attrs:{size:20}})]},proxy:!0}],null,!1,1614167509)})],1)]},proxy:!0}:null],null,!0)})}),[],!1,null,"3bc9efa5",null,null).exports,B=b({name:"ClockIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon clock-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,O=b({name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon close-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,j=b({name:"MagnifyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon magnify-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,z=b({name:"StarIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon star-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null,null).exports,V=b((0,n.defineComponent)({__name:"FilePickerNavigation",props:{currentView:null,filterString:null,isCollapsed:{type:Boolean}},emits:["update:currentView","update:filterString"],setup(t,{emit:e}){const i=t,o=[{id:"files",label:(0,y.t)("All files"),icon:A},{id:"recent",label:(0,y.t)("Recent"),icon:B},{id:"favorites",label:(0,y.t)("Favorites"),icon:z}],s=(0,n.computed)((()=>o.filter((t=>t.id===i.currentView))[0]));return{__sfc:!0,allViews:o,props:i,emit:e,currentViewObject:s,updateFilterValue:t=>e("update:filterString",t),IconClose:O,IconMagnify:j,NcButton:r.P2,NcSelect:r.QG,NcTextField:r.h3,t:y.t,Fragment:_.H}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e(i.Fragment,[e(i.NcTextField,{staticClass:"file-picker__filter-input",attrs:{value:t.filterString,label:i.t("Filter file list"),"show-trailing-button":!!t.filterString},on:{"update:value":i.updateFilterValue,"trailing-button-click":function(t){return i.updateFilterValue("")}},scopedSlots:t._u([{key:"trailing-button-icon",fn:function(){return[e(i.IconClose,{attrs:{size:16}})]},proxy:!0}])},[e(i.IconMagnify,{attrs:{size:16}})],1),t.isCollapsed?e(i.NcSelect,{attrs:{"aria-label":i.t("Current view selector"),clearable:!1,searchable:!1,options:i.allViews,value:i.currentViewObject},on:{input:t=>i.emit("update:currentView",t.id)}}):e("ul",{staticClass:"file-picker__side",attrs:{role:"tablist","aria-label":i.t("Filepicker sections")}},t._l(i.allViews,(function(n){return e("li",{key:n.id},[e(i.NcButton,{attrs:{"aria-selected":t.currentView===n.id,type:t.currentView===n.id?"primary":"tertiary",wide:!0,role:"tab"},on:{click:function(e){return t.$emit("update:currentView",n.id)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(n.icon,{tag:"component",attrs:{size:20}})]},proxy:!0}],null,!0)},[t._v(" "+t._s(n.label)+" ")])],1)})),0)],1)}),[],!1,null,"fcfd0f23",null,null).exports,R=b((0,n.defineComponent)({name:"FilePicker",props:{buttons:null,name:null,allowPickDirectory:{type:Boolean,default:!1},container:{default:"body"},filterFn:{default:void 0},mimetypeFilter:{default:()=>[]},multiselect:{type:Boolean,default:!0},path:{default:"/"}},emits:["close"],setup(t,{emit:e}){const i=t,o=(0,n.computed)((()=>({container:i.container,name:i.name,buttons:s.value,size:"large",contentClasses:["file-picker__content"],dialogClasses:["file-picker"],navigationClasses:["file-picker__navigation"]}))),s=(0,n.computed)((()=>("function"==typeof i.buttons?i.buttons(c.value,p.value,a.value):i.buttons).map((t=>({...t,callback:async()=>{const n=0===c.value.length&&i.allowPickDirectory?[await b(p.value)]:c.value;t.callback(n),e("close",c.value)}}))))),a=(0,n.ref)("files"),l=(0,n.computed)((()=>"favorites"===a.value?(0,y.t)("Favorites"):"recent"===a.value?(0,y.t)("Recent"):"")),c=(0,n.ref)([]),u=(0,n.ref)((null==window?void 0:window.sessionStorage.getItem("NC.FilePicker.LastPath"))||"/"),d=(0,n.ref)(),p=(0,n.computed)({get:()=>"files"===a.value?d.value||i.path||u.value:"/",set:t=>{void 0===i.path&&window.sessionStorage.setItem("NC.FilePicker.LastPath",t),d.value=t,c.value=[]}}),h=(0,n.ref)(""),{isSupportedMimeType:g}=function(t){const e=(0,n.computed)((()=>t.value.map((t=>t.split("/")))));return{isSupportedMimeType:t=>{const i=t.split("/");return e.value.some((([t,e])=>!(i[0]!==t&&"*"!==t||i[1]!==e&&"*"!==e)))}}}((0,n.toRef)(i,"mimetypeFilter")),{files:v,isLoading:w,loadFiles:_,getFile:b,client:N}=function(t,e){const i=(0,f.rp)(),r=(0,n.ref)([]),o=(0,n.ref)(!0);async function s(){if(o.value=!0,"favorites"===t.value)r.value=await(0,f.pC)(i,e.value);else if("recent"===t.value){const t=Math.round(Date.now()/1e3)-1209600,{data:e}=await i.search("/",{details:!0,data:(0,f.tB)(t)});r.value=e.results.map((t=>(0,f.RL)(t)))}else{const t=await i.getDirectoryContents("".concat(f._o).concat(e.value),{details:!0,data:(0,f.h7)()});r.value=t.data.map((t=>(0,f.RL)(t)))}o.value=!1}return(0,n.watch)([t,e],(()=>s())),(0,n.onMounted)((()=>s())),{isLoading:o,files:r,loadFiles:()=>s(),getFile:async function(t,e=f._o){const n=await i.stat("".concat(e).concat(t),{details:!0});return(0,f.RL)(n.data)},client:i}}(a,p);(0,n.onMounted)((()=>_()));const{showHiddenFiles:I}=E(),k=(0,n.computed)((()=>{let t=v.value;return I.value||(t=t.filter((t=>!t.basename.startsWith(".")))),i.mimetypeFilter.length>0&&(t=t.filter((t=>"folder"===t.type||t.mime&&g(t.mime)))),h.value&&(t=t.filter((t=>t.basename.toLowerCase().includes(h.value.toLowerCase())))),i.filterFn&&(t=t.filter((t=>i.filterFn(t)))),t})),S=(0,n.computed)((()=>"files"===a.value?(0,y.t)("Upload some content or sync with your devices!"):"recent"===a.value?(0,y.t)("Files and folders you recently modified will show up here."):(0,y.t)("Files and folders you mark as favorite will show up here.")));return{__sfc:!0,props:i,emit:e,dialogProps:o,dialogButtons:s,currentView:a,viewHeadline:l,selectedFiles:c,savedPath:u,navigatedPath:d,currentPath:p,filterString:h,isSupportedMimeType:g,files:v,isLoading:w,loadFiles:_,getFile:b,client:N,showHiddenFiles:I,filteredFiles:k,noFilesDescription:S,onCreateFolder:t=>{N.createDirectory((0,m.join)(f._o,p.value,t)).then((()=>_())).catch((t=>(0,y.k)((0,y.t)("Could not create the new folder"))))},IconFile:x,DialogBase:C,FileList:D,FilePickerBreadcrumbs:F,FilePickerNavigation:V,NcEmptyContent:r.SL,t:y.t}}}),(function(){var t=this,e=t._self._c,i=t._self._setupProxy;return e(i.DialogBase,t._b({on:{close:function(t){return i.emit("close")}},scopedSlots:t._u([{key:"navigation",fn:function({isCollapsed:t}){return[e(i.FilePickerNavigation,{attrs:{"is-collapsed":t,"current-view":i.currentView,"filter-string":i.filterString},on:{"update:currentView":function(t){i.currentView=t},"update:current-view":function(t){i.currentView=t},"update:filterString":function(t){i.filterString=t},"update:filter-string":function(t){i.filterString=t}}})]}}])},"DialogBase",i.dialogProps,!1),[e("div",{staticClass:"file-picker__main"},["files"===i.currentView?e(i.FilePickerBreadcrumbs,{attrs:{path:i.currentPath,"show-menu":t.allowPickDirectory},on:{"update:path":function(t){i.currentPath=t},"create-node":i.onCreateFolder}}):e("div",{staticClass:"file-picker__view"},[e("h3",[t._v(t._s(i.viewHeadline))])]),i.isLoading||i.filteredFiles.length>0?e(i.FileList,{attrs:{"allow-pick-directory":t.allowPickDirectory,"current-view":i.currentView,files:i.filteredFiles,multiselect:t.multiselect,loading:i.isLoading,path:i.currentPath,"selected-files":i.selectedFiles,name:i.viewHeadline},on:{"update:path":[function(t){i.currentPath=t},function(t){i.currentView="files"}],"update:selectedFiles":function(t){i.selectedFiles=t},"update:selected-files":function(t){i.selectedFiles=t}}}):i.filterString?e(i.NcEmptyContent,{attrs:{name:i.t("No matching files"),description:i.t("No files matching your filter were found.")},scopedSlots:t._u([{key:"icon",fn:function(){return[e(i.IconFile)]},proxy:!0}])}):e(i.NcEmptyContent,{attrs:{name:i.t("No files in here"),description:i.noFilesDescription},scopedSlots:t._u([{key:"icon",fn:function(){return[e(i.IconFile)]},proxy:!0}])})],1)])}),[],!1,null,"f979a44d",null,null).exports},5656:function(t,e,i){"use strict";i.d(e,{$B:function(){return F},DT:function(){return w},De:function(){return x},G7:function(){return ce},Ir:function(){return fe},NB:function(){return Z},RL:function(){return R},Ti:function(){return H},Tv:function(){return L},Vn:function(){return b},_o:function(){return O},cd:function(){return de},e4:function(){return M},gt:function(){return B},h7:function(){return S},m0:function(){return I},oE:function(){return pe},p$:function(){return y},p4:function(){return _},pC:function(){return V},rp:function(){return z},sS:function(){return v},sg:function(){return U},tB:function(){return T},w4:function(){return k},y3:function(){return N},zu:function(){return A}});var n=i(77958),r=i(17499),o=i(31352),s=i(62520),a=i(65358),l=i(79753),c=i(14596),u=i(26721);const d=null===(p=(0,n.ts)())?(0,r.IY)().setApp("files").build():(0,r.IY)().setApp("files").setUid(p.uid).build();var p;class f{_entries=[];registerEntry(t){this.validateEntry(t),this._entries.push(t)}unregisterEntry(t){const e="string"==typeof t?this.getEntryIndex(t):this.getEntryIndex(t.id);-1!==e?this._entries.splice(e,1):d.warn("Entry not found, nothing removed",{entry:t,entries:this.getEntries()})}getEntries(t){return t?this._entries.filter((e=>"function"!=typeof e.enabled||e.enabled(t))):this._entries}getEntryIndex(t){return this._entries.findIndex((e=>e.id===t))}validateEntry(t){if(!t.id||!t.displayName||!t.iconSvgInline&&!t.iconClass||!t.handler)throw new Error("Invalid entry");if("string"!=typeof t.id||"string"!=typeof t.displayName)throw new Error("Invalid id or displayName property");if(t.iconClass&&"string"!=typeof t.iconClass||t.iconSvgInline&&"string"!=typeof t.iconSvgInline)throw new Error("Invalid icon provided");if(void 0!==t.enabled&&"function"!=typeof t.enabled)throw new Error("Invalid enabled property");if("function"!=typeof t.handler)throw new Error("Invalid handler property");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order property");if(-1!==this.getEntryIndex(t.id))throw new Error("Duplicate entry")}}const h=function(){return typeof window._nc_newfilemenu>"u"&&(window._nc_newfilemenu=new f,d.debug("NewFileMenu initialized")),window._nc_newfilemenu},m=["B","KB","MB","GB","TB","PB"],g=["B","KiB","MiB","GiB","TiB","PiB"];function v(t,e=!1,i=!0){"string"==typeof t&&(t=Number(t));let n=t>0?Math.floor(Math.log(t)/Math.log(i?1024:1e3)):0;n=Math.min((i?g.length:m.length)-1,n);const r=i?g[n]:m[n];let s=(t/Math.pow(i?1024:1e3,n)).toFixed(1);return!0===e&&0===n?("0.0"!==s?"< 1 ":"0 ")+(i?g[1]:m[1]):(s=n<2?parseFloat(s).toFixed(0):parseFloat(s).toLocaleString((0,o.aj)()),s+" "+r)}var w=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(w||{});class y{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}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("title"in t&&"function"!=typeof t.title)throw new Error("Invalid title 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(w).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")}}const _=function(t){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],d.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?d.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)},b=function(){return typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],d.debug("FileActions initialized")),window._nc_fileactions},x=function(){return typeof window._nc_filelistheader>"u"&&(window._nc_filelistheader=[],d.debug("FileListHeaders initialized")),window._nc_filelistheader};var N=(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))(N||{});const C=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","nc:share-attributes","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:share-types","oc:size","ocs:share-permissions"],E={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},I=function(){return typeof window._nc_dav_properties>"u"&&(window._nc_dav_properties=[...C]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},k=function(){return typeof window._nc_dav_namespaces>"u"&&(window._nc_dav_namespaces={...E}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},S=function(){return`<?xml version="1.0"?>\n\t\t<d:propfind ${k()}>\n\t\t\t<d:prop>\n\t\t\t\t${I()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`},T=function(t){return`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${k()}\n\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${I()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${(0,n.ts)()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${t}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`},A=function(t=""){let e=N.NONE;return t&&((t.includes("C")||t.includes("K"))&&(e|=N.CREATE),t.includes("G")&&(e|=N.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=N.UPDATE),t.includes("D")&&(e|=N.DELETE),t.includes("R")&&(e|=N.SHARE)),e};var L=(t=>(t.Folder="folder",t.File="file",t))(L||{});const P=function(t,e){return null!==t.match(e)},D=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch{throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=N.NONE&&t.permissions<=N.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&P(t.source,e)){const i=t.source.match(e)[0];if(!t.source.includes((0,s.join)(i,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(M).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var M=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(M||{});class Z{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;constructor(t,e){D(t,e||this._knownDavService),this._data=t;const i={set:(t,e,i)=>(this.updateMtime(),Reflect.set(t,e,i)),deleteProperty:(t,e)=>(this.updateMtime(),Reflect.deleteProperty(t,e))};this._attributes=new Proxy(t.attributes||{},i),delete this._data.attributes,e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,a.Ec)(this.source.slice(t.length))}get basename(){return(0,s.basename)(this.source)}get extension(){return(0,s.extname)(this.source)}get dirname(){if(this.root){const t=this.source.indexOf(this.root);return(0,s.dirname)(this.source.slice(t+this.root.length)||"/")}const t=new URL(this.source);return(0,s.dirname)(t.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}get crtime(){return this._data.crtime}get size(){return this._data.size}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:N.NONE:N.READ}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return P(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,s.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){const t=this.source.indexOf(this.root);return this.source.slice(t+this.root.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id||this.attributes?.fileid}get status(){return this._data?.status}set status(t){this._data.status=t}move(t){D({...this._data,source:t},this._knownDavService),this._data.source=t,this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,s.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}}class F extends Z{get type(){return L.File}}class B extends Z{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return L.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const O=`/files/${(0,n.ts)()?.uid}`,j=(0,l.generateRemoteUrl)("dav"),z=function(t=j){const e=(0,c.eI)(t,{headers:{requesttoken:(0,n.IH)()||""}});return(0,c.lD)().patch("request",(t=>(t.headers?.method&&(t.method=t.headers.method,delete t.headers.method),(0,u.W)(t)))),e},V=async(t,e="/",i=O)=>(await t.getDirectoryContents(`${i}${e}`,{details:!0,data:`<?xml version="1.0"?>\n\t\t<oc:filter-files ${k()}>\n\t\t\t<d:prop>\n\t\t\t\t${I()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>R(t,i))),R=function(t,e=O,i=j){const r=t.props,o=A(r?.permissions),s=(0,n.ts)()?.uid,a={id:r?.fileid||0,source:`${i}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime,size:r?.size||Number.parseInt(r.getcontentlength||"0"),permissions:o,owner:s,root:e,attributes:{...t,...r,hasPreview:r?.["has-preview"]}};return delete a.attributes?.props,"file"===t.type?new F(a):new B(a)};class ${_views=[];_currentView=null;register(t){if(this._views.find((e=>e.id===t.id)))throw new Error(`View id ${t.id} is already registered`);this._views.push(t)}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&this._views.splice(e,1)}get views(){return this._views}setActive(t){this._currentView=t}get active(){return this._currentView}}const H=function(){return typeof window._nc_navigation>"u"&&(window._nc_navigation=new $,d.debug("Navigation service initialized")),window._nc_navigation};class U{_column;constructor(t){Y(t),this._column=t}get id(){return this._column.id}get title(){return this._column.title}get render(){return this._column.render}get sort(){return this._column.sort}get summary(){return this._column.summary}}const Y=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("A column id is required");if(!t.title||"string"!=typeof t.title)throw new Error("A column title is required");if(!t.render||"function"!=typeof t.render)throw new Error("A render function is required");if(t.sort&&"function"!=typeof t.sort)throw new Error("Column sortFunction must be a function");if(t.summary&&"function"!=typeof t.summary)throw new Error("Column summary must be a function");return!0};var G={},W={};!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 typeof t<"u"},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 o=0;o<r;o++)t[n[o]]="strict"===i?[e[n[o]]]:e[n[o]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(t){const e=n.exec(t);return!(null===e||typeof e>"u")},t.getAllMatches=function(t,e){const i=[];let n=e.exec(t);for(;n;){const r=[];r.startIndex=e.lastIndex-n[0].length;const o=n.length;for(let t=0;t<o;t++)r.push(n[t]);i.push(r),n=e.exec(t)}return i},t.nameRegexp=i}(W);const X=W,q={allowBooleanAttributes:!1,unpairedTags:[]};function K(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function Q(t,e){const i=e;for(;e<t.length;e++)if("?"==t[e]||" "==t[e]){const n=t.substr(i,e-i);if(e>5&&"xml"===n)return st("InvalidXml","XML declaration allowed only at the start of the document.",ct(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}continue}return e}function J(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===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.length;e++)if("<"===t[e])i++;else if(">"===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.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}G.validate=function(t,e){e=Object.assign({},q,e);const i=[];let n=!1,r=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let o=0;o<t.length;o++)if("<"===t[o]&&"?"===t[o+1]){if(o+=2,o=Q(t,o),o.err)return o}else{if("<"!==t[o]){if(K(t[o]))continue;return st("InvalidChar","char '"+t[o]+"' is not expected.",ct(t,o))}{let s=o;if(o++,"!"===t[o]){o=J(t,o);continue}{let a=!1;"/"===t[o]&&(a=!0,o++);let l="";for(;o<t.length&&">"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)l+=t[o];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),o--),!lt(l)){let e;return e=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",st("InvalidTag",e,ct(t,o))}const c=it(t,o);if(!1===c)return st("InvalidAttr","Attributes for '"+l+"' have open quote.",ct(t,o));let u=c.value;if(o=c.index,"/"===u[u.length-1]){const i=o-u.length;u=u.substring(0,u.length-1);const r=rt(u,e);if(!0!==r)return st(r.err.code,r.err.msg,ct(t,i+r.err.line));n=!0}else if(a){if(!c.tagClosed)return st("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",ct(t,o));if(u.trim().length>0)return st("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",ct(t,s));{const e=i.pop();if(l!==e.tagName){let i=ct(t,e.tagStartPos);return st("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+i.line+", col "+i.col+") instead of closing tag '"+l+"'.",ct(t,s))}0==i.length&&(r=!0)}}else{const a=rt(u,e);if(!0!==a)return st(a.err.code,a.err.msg,ct(t,o-u.length+a.err.line));if(!0===r)return st("InvalidXml","Multiple possible root nodes found.",ct(t,o));-1!==e.unpairedTags.indexOf(l)||i.push({tagName:l,tagStartPos:s}),n=!0}for(o++;o<t.length;o++)if("<"===t[o]){if("!"===t[o+1]){o++,o=J(t,o);continue}if("?"!==t[o+1])break;if(o=Q(t,++o),o.err)return o}else if("&"===t[o]){const e=ot(t,o);if(-1==e)return st("InvalidChar","char '&' is not expected.",ct(t,o));o=e}else if(!0===r&&!K(t[o]))return st("InvalidXml","Extra text at the end",ct(t,o));"<"===t[o]&&o--}}}return n?1==i.length?st("InvalidTag","Unclosed tag '"+i[0].tagName+"'.",ct(t,i[0].tagStartPos)):!(i.length>0)||st("InvalidXml","Invalid '"+JSON.stringify(i.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):st("InvalidXml","Start tag expected.",1)};const tt='"',et="'";function it(t,e){let i="",n="",r=!1;for(;e<t.length;e++){if(t[e]===tt||t[e]===et)""===n?n=t[e]:n!==t[e]||(n="");else if(">"===t[e]&&""===n){r=!0;break}i+=t[e]}return""===n&&{value:i,index:e,tagClosed:r}}const nt=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function rt(t,e){const i=X.getAllMatches(t,nt),n={};for(let t=0;t<i.length;t++){if(0===i[t][1].length)return st("InvalidAttr","Attribute '"+i[t][2]+"' has no space in starting.",ut(i[t]));if(void 0!==i[t][3]&&void 0===i[t][4])return st("InvalidAttr","Attribute '"+i[t][2]+"' is without value.",ut(i[t]));if(void 0===i[t][3]&&!e.allowBooleanAttributes)return st("InvalidAttr","boolean attribute '"+i[t][2]+"' is not allowed.",ut(i[t]));const r=i[t][2];if(!at(r))return st("InvalidAttr","Attribute '"+r+"' is an invalid name.",ut(i[t]));if(n.hasOwnProperty(r))return st("InvalidAttr","Attribute '"+r+"' is repeated.",ut(i[t]));n[r]=1}return!0}function ot(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let i=/\d/;for("x"===t[e]&&(e++,i=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(i))break}return-1}(t,++e);let i=0;for(;e<t.length;e++,i++)if(!(t[e].match(/\w/)&&i<20)){if(";"===t[e])break;return-1}return e}function st(t,e,i){return{err:{code:t,msg:e,line:i.line||i,col:i.col}}}function at(t){return X.isName(t)}function lt(t){return X.isName(t)}function ct(t,e){const i=t.substring(0,e).split(/\r?\n/);return{line:i.length,col:i[i.length-1].length+1}}function ut(t){return t.startIndex+t[1].length}var dt={};const pt={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,i){return t}};dt.buildOptions=function(t){return Object.assign({},pt,t)},dt.defaultOptions=pt;const ft=W;function ht(t,e){let i="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)i+=t[e];if(i=i.trim(),-1!==i.indexOf(" "))throw new Error("External entites are not supported");const n=t[e++];let r="";for(;e<t.length&&t[e]!==n;e++)r+=t[e];return[i,r,e]}function mt(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function gt(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function vt(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function wt(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function yt(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function _t(t){if(ft.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}const bt=/^[-+]?0x[a-fA-F0-9]+$/,xt=/^([\-\+])?(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 Nt={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const Ct=W,Et=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})}},It=function(t,e){const i={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let n=1,r=!1,o=!1,s="";for(;e<t.length;e++)if("<"!==t[e]||o)if(">"===t[e]){if(o?"-"===t[e-1]&&"-"===t[e-2]&&(o=!1,n--):n--,0===n)break}else"["===t[e]?r=!0:s+=t[e];else{if(r&&gt(t,e))e+=7,[entityName,val,e]=ht(t,e+1),-1===val.indexOf("&")&&(i[_t(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(r&&vt(t,e))e+=8;else if(r&&wt(t,e))e+=8;else if(r&&yt(t,e))e+=9;else{if(!mt)throw new Error("Invalid DOCTYPE");o=!0}n++,s=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:i,i:e}},kt=function(t,e={}){if(e=Object.assign({},Nt,e),!t||"string"!=typeof t)return t;let i=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(i))return t;if(e.hex&&bt.test(i))return Number.parseInt(i,16);{const n=xt.exec(i);if(n){const r=n[1],o=n[2];let s=function(t){return t&&-1!==t.indexOf(".")&&("."===(t=t.replace(/0+$/,""))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substr(0,t.length-1))),t}(n[3]);const a=n[4]||n[6];if(!e.leadingZeros&&o.length>0&&r&&"."!==i[2])return t;if(!e.leadingZeros&&o.length>0&&!r&&"."!==i[1])return t;{const n=Number(i),l=""+n;return-1!==l.search(/[eE]/)||a?e.eNotation?n:t:-1!==i.indexOf(".")?"0"===l&&""===s||l===s||r&&l==="-"+s?n:t:o?s===l||r+s===l?n:t:i===l||i===r+l?n:t}}return t}};function St(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:t[n]}}}function Tt(t,e,i,n,r,o,s){if(void 0!==t&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){s||(t=this.replaceEntitiesValue(t));const n=this.options.tagValueProcessor(e,t,i,r,o);return null==n?t:typeof n!=typeof t||n!==t?n:this.options.trimValues||t.trim()===t?Vt(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function At(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}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,Ct.nameRegexp);const Lt=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Pt(t,e,i){if(!this.options.ignoreAttributes&&"string"==typeof t){const i=Ct.getAllMatches(t,Lt),n=i.length,r={};for(let t=0;t<n;t++){const n=this.resolveNameSpace(i[t][1]);let o=i[t][4],s=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==o){this.options.trimValues&&(o=o.trim()),o=this.replaceEntitiesValue(o);const t=this.options.attributeValueProcessor(n,o,e);r[s]=null==t?o:typeof t!=typeof o||t!==o?t:Vt(o,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[s]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=r,t}return r}}const Dt=function(t){t=t.replace(/\r\n?/g,"\n");const e=new Et("!xml");let i=e,n="",r="";for(let o=0;o<t.length;o++)if("<"===t[o])if("/"===t[o+1]){const e=Ot(t,">",o,"Closing Tag is not closed.");let s=t.substring(o+2,e).trim();if(this.options.removeNSPrefix){const t=s.indexOf(":");-1!==t&&(s=s.substr(t+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),i&&(n=this.saveTextToParentTag(n,i,r));const a=r.substring(r.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=r.lastIndexOf("."),r=r.substring(0,l),i=this.tagsNodeStack.pop(),n="",o=e}else if("?"===t[o+1]){let e=jt(t,o,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,i,r),!(this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags)){const t=new Et(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,r,e.tagName)),this.addChild(i,t,r)}o=e.closeIndex+1}else if("!--"===t.substr(o+1,3)){const e=Ot(t,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const s=t.substring(o+4,e-2);n=this.saveTextToParentTag(n,i,r),i.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}o=e}else if("!D"===t.substr(o+1,2)){const e=It(t,o);this.docTypeEntities=e.entities,o=e.i}else if("!["===t.substr(o+1,2)){const e=Ot(t,"]]>",o,"CDATA is not closed.")-2,s=t.substring(o+9,e);if(n=this.saveTextToParentTag(n,i,r),this.options.cdataPropName)i.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]);else{let t=this.parseTextData(s,i.tagname,r,!0,!1,!0);null==t&&(t=""),i.add(this.options.textNodeName,t)}o=e+2}else{let s=jt(t,o,this.options.removeNSPrefix),a=s.tagName;const l=s.rawTagName;let c=s.tagExp,u=s.attrExpPresent,d=s.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),i&&n&&"!xml"!==i.tagname&&(n=this.saveTextToParentTag(n,i,r,!1));const p=i;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(i=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),a!==e.tagname&&(r+=r?"."+a:a),this.isItStopNode(this.options.stopNodes,r,a)){let e="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)o=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))o=s.closeIndex;else{const i=this.readStopNodeData(t,l,d+1);if(!i)throw new Error(`Unexpected end of ${l}`);o=i.i,e=i.tagContent}const n=new Et(a);a!==c&&u&&(n[":@"]=this.buildAttributesMap(c,r,a)),e&&(e=this.parseTextData(e,a,r,!0,u,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),n.add(this.options.textNodeName,e),this.addChild(i,n,r)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),c=a):c=c.substr(0,c.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new Et(a);a!==c&&u&&(t[":@"]=this.buildAttributesMap(c,r,a)),this.addChild(i,t,r),r=r.substr(0,r.lastIndexOf("."))}else{const t=new Et(a);this.tagsNodeStack.push(i),a!==c&&u&&(t[":@"]=this.buildAttributesMap(c,r,a)),this.addChild(i,t,r),i=t}n="",o=d}}else n+=t[o];return e.child};function Mt(t,e,i){const n=this.options.updateTag(e.tagname,i,e[":@"]);!1===n||("string"==typeof n&&(e.tagname=n),t.addChild(e))}const Zt=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 Ft(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 Bt(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 Ot(t,e,i,n){const r=t.indexOf(e,i);if(-1===r)throw new Error(n);return r+e.length-1}function jt(t,e,i,n=">"){const r=function(t,e,i=">"){let n,r="";for(let o=e;o<t.length;o++){let e=t[o];if(n)e===n&&(n="");else if('"'===e||"'"===e)n=e;else if(e===i[0]){if(!i[1])return{data:r,index:o};if(t[o+1]===i[1])return{data:r,index:o}}else"\t"===e&&(e=" ");r+=e}}(t,e+1,n);if(!r)return;let o=r.data;const s=r.index,a=o.search(/\s/);let l=o,c=!0;-1!==a&&(l=o.substr(0,a).replace(/\s\s*$/,""),o=o.substr(a+1));const u=l;if(i){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),c=l!==r.data.substr(t+1))}return{tagName:l,tagExp:o,closeIndex:s,attrExpPresent:c,rawTagName:u}}function zt(t,e,i){const n=i;let r=1;for(;i<t.length;i++)if("<"===t[i])if("/"===t[i+1]){const o=Ot(t,">",i,`${e} is not closed`);if(t.substring(i+2,o).trim()===e&&(r--,0===r))return{tagContent:t.substring(n,i),i:o};i=o}else if("?"===t[i+1])i=Ot(t,"?>",i+1,"StopNode is not closed.");else if("!--"===t.substr(i+1,3))i=Ot(t,"--\x3e",i+3,"StopNode is not closed.");else if("!["===t.substr(i+1,2))i=Ot(t,"]]>",i,"StopNode is not closed.")-2;else{const n=jt(t,i,">");n&&((n&&n.tagName)===e&&"/"!==n.tagExp[n.tagExp.length-1]&&r++,i=n.closeIndex)}}function Vt(t,e,i){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&kt(t,i)}return Ct.isExist(t)?t:""}var Rt={};function $t(t,e,i){let n;const r={};for(let o=0;o<t.length;o++){const s=t[o],a=Ht(s);let l="";if(l=void 0===i?a:i+"."+a,a===e.textNodeName)void 0===n?n=s[a]:n+=""+s[a];else{if(void 0===a)continue;if(s[a]){let t=$t(s[a],e,l);const i=Yt(t,e);s[":@"]?Ut(t,s[":@"],l,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!==r[a]&&r.hasOwnProperty(a)?(Array.isArray(r[a])||(r[a]=[r[a]]),r[a].push(t)):e.isArray(a,l,i)?r[a]=[t]:r[a]=t}}}return"string"==typeof n?n.length>0&&(r[e.textNodeName]=n):void 0!==n&&(r[e.textNodeName]=n),r}function Ht(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const i=e[t];if(":@"!==i)return i}}function Ut(t,e,i,n){if(e){const r=Object.keys(e),o=r.length;for(let s=0;s<o;s++){const o=r[s];n.isArray(o,i+"."+o,!0,!0)?t[o]=[e[o]]:t[o]=e[o]}}}function Yt(t,e){const{textNodeName:i}=e,n=Object.keys(t).length;return!(0!==n&&(1!==n||!t[i]&&"boolean"!=typeof t[i]&&0!==t[i]))}Rt.prettify=function(t,e){return $t(t,e)};const{buildOptions:Gt}=dt,Wt=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:"₹"}},this.addExternalEntities=St,this.parseXml=Dt,this.parseTextData=Tt,this.resolveNameSpace=At,this.buildAttributesMap=Pt,this.isItStopNode=Bt,this.replaceEntitiesValue=Zt,this.readStopNodeData=zt,this.saveTextToParentTag=Ft,this.addChild=Mt}},{prettify:Xt}=Rt,qt=G;function Kt(t,e,i,n){let r="",o=!1;for(let s=0;s<t.length;s++){const a=t[s],l=Qt(a);if(void 0===l)continue;let c="";if(c=0===i.length?l:`${i}.${l}`,l===e.textNodeName){let t=a[l];te(c,e)||(t=e.tagValueProcessor(l,t),t=ee(t,e)),o&&(r+=n),r+=t,o=!1;continue}if(l===e.cdataPropName){o&&(r+=n),r+=`<![CDATA[${a[l][0][e.textNodeName]}]]>`,o=!1;continue}if(l===e.commentPropName){r+=n+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,o=!0;continue}if("?"===l[0]){const t=Jt(a[":@"],e),i="?xml"===l?"":n;let s=a[l][0][e.textNodeName];s=0!==s.length?" "+s:"",r+=i+`<${l}${s}${t}?>`,o=!0;continue}let u=n;""!==u&&(u+=e.indentBy);const d=n+`<${l}${Jt(a[":@"],e)}`,p=Kt(a[l],e,c,u);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?r+=d+">":r+=d+"/>":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(">")?r+=d+`>${p}${n}</${l}>`:(r+=d+">",p&&""!==n&&(p.includes("/>")||p.includes("</"))?r+=n+e.indentBy+p+n:r+=p,r+=`</${l}>`):r+=d+"/>",o=!0}return r}function Qt(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];if(t.hasOwnProperty(n)&&":@"!==n)return n}}function Jt(t,e){let i="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let r=e.attributeValueProcessor(n,t[n]);r=ee(r,e),!0===r&&e.suppressBooleanAttributes?i+=` ${n.substr(e.attributeNamePrefix.length)}`:i+=` ${n.substr(e.attributeNamePrefix.length)}="${r}"`}return i}function te(t,e){let i=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+i)return!0;return!1}function ee(t,e){if(t&&t.length>0&&e.processEntities)for(let i=0;i<e.entities.length;i++){const n=e.entities[i];t=t.replace(n.regex,n.val)}return t}const ie=function(t,e){let i="";return e.format&&e.indentBy.length>0&&(i="\n"),Kt(t,e,"",i)},ne={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 re(t){this.options=Object.assign({},ne,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ae),this.processTextOrObjNode=oe,this.options.format?(this.indentate=se,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function oe(t,e,i){const n=this.j2x(t,i+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,i):this.buildObjectNode(n.val,e,n.attrStr,i)}function se(t){return this.options.indentBy.repeat(t)}function ae(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}re.prototype.build=function(t){return this.options.preserveOrder?ie(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},re.prototype.j2x=function(t,e){let i="",n="";for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r))if(typeof t[r]>"u")this.isAttribute(r)&&(n+="");else if(null===t[r])this.isAttribute(r)?n+="":"?"===r[0]?n+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+r+"/"+this.tagEndChar;else if(t[r]instanceof Date)n+=this.buildTextValNode(t[r],r,"",e);else if("object"!=typeof t[r]){const o=this.isAttribute(r);if(o)i+=this.buildAttrPairStr(o,""+t[r]);else if(r===this.options.textNodeName){let e=this.options.tagValueProcessor(r,""+t[r]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[r],r,"",e)}else if(Array.isArray(t[r])){const i=t[r].length;let o="";for(let s=0;s<i;s++){const i=t[r][s];typeof i>"u"||(null===i?"?"===r[0]?n+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+r+"/"+this.tagEndChar:"object"==typeof i?this.options.oneListGroup?o+=this.j2x(i,e+1).val:o+=this.processTextOrObjNode(i,r,e):o+=this.buildTextValNode(i,r,"",e))}this.options.oneListGroup&&(o=this.buildObjectNode(o,r,"",e)),n+=o}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const e=Object.keys(t[r]),n=e.length;for(let o=0;o<n;o++)i+=this.buildAttrPairStr(e[o],""+t[r][e[o]])}else n+=this.processTextOrObjNode(t[r],r,e);return{attrStr:i,val:n}},re.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},re.prototype.buildObjectNode=function(t,e,i,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+i+"?"+this.tagEndChar:this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar;{let r="</"+e+this.tagEndChar,o="";return"?"===e[0]&&(o="?",r=""),!i&&""!==i||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===o.length?this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(n)+"<"+e+i+o+this.tagEndChar+t+this.indentate(n)+r:this.indentate(n)+"<"+e+i+o+">"+t+r}},re.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},re.prototype.buildTextValNode=function(t,e,i,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+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+"</"+e+this.tagEndChar}},re.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const i=this.options.entities[e];t=t.replace(i.regex,i.val)}return t};var le={XMLParser:class{constructor(t){this.externalEntities={},this.options=Gt(t)}parse(t,e){if("string"!=typeof t){if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const i=qt.validate(t,e);if(!0!==i)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}const i=new Wt(this.options);i.addExternalEntities(this.externalEntities);const n=i.parseXml(t);return this.options.preserveOrder||void 0===n?n:Xt(n,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 '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}},XMLValidator:G,XMLBuilder:re};class ce{_view;constructor(t){ue(t),this._view=t}get id(){return this._view.id}get name(){return this._view.name}get caption(){return this._view.caption}get emptyTitle(){return this._view.emptyTitle}get emptyCaption(){return this._view.emptyCaption}get getContents(){return this._view.getContents}get icon(){return this._view.icon}set icon(t){this._view.icon=t}get order(){return this._view.order}set order(t){this._view.order=t}get params(){return this._view.params}set params(t){this._view.params=t}get columns(){return this._view.columns}get emptyView(){return this._view.emptyView}get parent(){return this._view.parent}get sticky(){return this._view.sticky}get expanded(){return this._view.expanded}set expanded(t){this._view.expanded=t}get defaultSortKey(){return this._view.defaultSortKey}}const ue=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("View id is required and must be a string");if(!t.name||"string"!=typeof t.name)throw new Error("View name is required and must be a string");if(t.columns&&t.columns.length>0&&(!t.caption||"string"!=typeof t.caption))throw new Error("View caption is required for top-level views and must be a string");if(!t.getContents||"function"!=typeof t.getContents)throw new Error("View getContents is required and must be a function");if(!t.icon||"string"!=typeof t.icon||!function(t){if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);if(0===(t=t.trim()).length||!0!==le.XMLValidator.validate(t))return!1;let e;const i=new le.XMLParser;try{e=i.parse(t)}catch{return!1}return!(!e||!("svg"in e))}(t.icon))throw new Error("View icon is required and must be a valid svg string");if(!("order"in t)||"number"!=typeof t.order)throw new Error("View order is required and must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof U))throw new Error("View columns must be an array of Column. Invalid column found")})),t.emptyView&&"function"!=typeof t.emptyView)throw new Error("View emptyView must be a function");if(t.parent&&"string"!=typeof t.parent)throw new Error("View parent must be a string");if("sticky"in t&&"boolean"!=typeof t.sticky)throw new Error("View sticky must be a boolean");if("expanded"in t&&"boolean"!=typeof t.expanded)throw new Error("View expanded must be a boolean");if(t.defaultSortKey&&"string"!=typeof t.defaultSortKey)throw new Error("View defaultSortKey must be a string");return!0},de=function(t){return h().registerEntry(t)},pe=function(t){return h().unregisterEntry(t)},fe=function(t){return h().getEntries(t).sort(((t,e)=>void 0!==t.order&&void 0!==e.order?t.order-e.order:t.displayName.localeCompare(e.displayName)))}},46318:function(t,e,i){"use strict";i.r(e),i.d(e,{NcAutoCompleteResult:function(){return v},NcMentionBubble:function(){return n.N},default:function(){return b}}),i(29774);var n=i(22663),r=i(79753),o=i(76311),s=i(66238),a=(i(79845),i(93911)),l=i(21617),c=(i(93664),i(22175),i(99114),i(25751),i(20435),i(49368),i(89115),i(57274),i(6136),i(69183),i(32219),i(82675),i(65507)),u=i(20296),d=i(36683),p=i(73045),f=i(25108);const h={name:"NcAutoCompleteResult",props:{title:{type:String,required:!0},subline:{type:String,default:null},id:{type:String,default:null},icon:{type:String,required:!0},iconUrl:{type:String,default:null},source:{type:String,required:!0},status:{type:[Object,Array],default:()=>({})}},computed:{avatarUrl(){return this.iconUrl?this.iconUrl:this.id&&"users"===this.source?this.getAvatarUrl(this.id,44):null},haveStatus(){var t,e,i;return(null==(t=this.status)?void 0:t.icon)||(null==(e=this.status)?void 0:e.status)&&"offline"!==(null==(i=this.status)?void 0:i.status)}},methods:{getAvatarUrl(t,e){return(0,r.generateUrl)("/avatar/{user}/{size}",{user:t,size:e})}}};var m=function(){var t=this,e=t._self._c;return e("div",{staticClass:"autocomplete-result"},[e("div",{staticClass:"autocomplete-result__icon",class:[t.icon,"autocomplete-result__icon--"+(t.avatarUrl?"with-avatar":"")],style:t.avatarUrl?{backgroundImage:`url(${t.avatarUrl})`}:null},[t.haveStatus?e("div",{staticClass:"autocomplete-result__status",class:[`autocomplete-result__status--${t.status&&t.status.icon?"icon":t.status.status}`]},[t._v(" "+t._s(t.status&&t.status.icon||"")+" ")]):t._e()]),e("span",{staticClass:"autocomplete-result__content"},[e("span",{staticClass:"autocomplete-result__title",attrs:{title:t.title}},[t._v(" "+t._s(t.title)+" ")]),t.subline?e("span",{staticClass:"autocomplete-result__subline"},[t._v(" "+t._s(t.subline)+" ")]):t._e()])])},g=[];const v=(0,o.n)(h,m,g,!1,null,"25cf09d8",null,null).exports,w={name:"NcRichContenteditable",directives:{tooltip:p.VTooltip},mixins:[n.r],props:{value:{type:String,default:"",required:!0},placeholder:{type:String,default:(0,s.t)("Write a message …")},autoComplete:{type:Function,default:()=>[]},menuContainer:{type:Element,default:()=>document.body},multiline:{type:Boolean,default:!1},contenteditable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},maxlength:{type:Number,default:null},emojiAutocomplete:{type:Boolean,default:!0},linkAutocomplete:{type:Boolean,default:!0}},emits:["submit","paste","update:value","smart-picker-submit"],data(){return{textSmiles:[],tribute:null,autocompleteOptions:{allowSpaces:!0,fillAttr:"id",lookup:t=>`${t.id} ${t.title}`,menuContainer:this.menuContainer,menuItemTemplate:t=>this.renderComponentHtml(t.original,v),noMatchTemplate:()=>'<span class="hidden"></span>',selectTemplate:t=>{var e;return this.genSelectTemplate(null==(e=null==t?void 0:t.original)?void 0:e.id)},values:this.debouncedAutoComplete},emojiOptions:{trigger:":",lookup:(t,e)=>e,menuContainer:this.menuContainer,menuItemTemplate:t=>this.textSmiles.includes(t.original)?t.original:`<span class="tribute-container-emoji__item__emoji">${t.original.native}</span> :${t.original.short_name}`,noMatchTemplate:()=>(0,s.t)("No emoji found"),selectTemplate:t=>this.textSmiles.includes(t.original)?t.original:((0,a.R)(t.original),t.original.native),values:(t,e)=>{const i=(0,a.K)(t);this.textSmiles.includes(":"+t)&&i.unshift(":"+t),e(i)},containerClass:"tribute-container-emoji",itemClass:"tribute-container-emoji__item"},linkOptions:{trigger:"/",lookup:(t,e)=>e,menuContainer:this.menuContainer,menuItemTemplate:t=>`<img class="tribute-container-link__item__icon" src="${t.original.icon_url}"> <span class="tribute-container-link__item__title">${t.original.title}</span>`,noMatchTemplate:()=>(0,s.t)("No link provider found"),selectTemplate:this.getLink,values:(t,e)=>e((0,l.n)(t)),containerClass:"tribute-container-link",itemClass:"tribute-container-link__item"},localValue:this.value,isComposing:!1}},computed:{isEmptyValue(){return!this.localValue||this.localValue&&""===this.localValue.trim()},isFF(){return!!navigator.userAgent.match(/firefox/i)},isOverMaxlength(){return!(this.isEmptyValue||!this.maxlength)&&(0,d.default)(this.localValue)>this.maxlength},tooltipString(){return this.isOverMaxlength?{content:(0,s.t)("Message limit of {count} characters reached",{count:this.maxlength}),shown:!0,trigger:"manual"}:null},canEdit(){return this.contenteditable&&!this.disabled},listeners(){const t={...this.$listeners};return delete t.paste,t}},watch:{value(){const t=this.$refs.contenteditable.innerHTML;this.value.trim()!==this.parseContent(t).trim()&&this.updateContent(this.value)}},mounted(){this.textSmiles=[],["d","D","p","P","s","S","x","X",")","(","|","/"].forEach((t=>{this.textSmiles.push(":"+t),this.textSmiles.push(":-"+t)})),this.autocompleteTribute=new c.default(this.autocompleteOptions),this.autocompleteTribute.attach(this.$el),this.emojiAutocomplete&&(this.emojiTribute=new c.default(this.emojiOptions),this.emojiTribute.attach(this.$el)),this.linkAutocomplete&&(this.linkTribute=new c.default(this.linkOptions),this.linkTribute.attach(this.$el)),this.updateContent(this.value),this.$refs.contenteditable.contentEditable=this.canEdit},beforeDestroy(){this.autocompleteTribute&&this.autocompleteTribute.detach(this.$el),this.emojiTribute&&this.emojiTribute.detach(this.$el),this.linkTribute&&this.linkTribute.detach(this.$el)},methods:{focus(){this.$refs.contenteditable.focus()},getLink(t){return(0,l.j)(t.original.id).then((t=>{const e=document.getElementById("tmp-smart-picker-result-node"),i={result:t,insertText:!0};if(this.$emit("smart-picker-submit",i),i.insertText){const i=document.createTextNode(t);e.replaceWith(i),this.setCursorAfter(i),this.updateValue(this.$refs.contenteditable.innerHTML)}else e.remove()})).catch((t=>{f.debug("Smart picker promise rejected:",t);const e=document.getElementById("tmp-smart-picker-result-node");this.setCursorAfter(e),e.remove()})),'<span id="tmp-smart-picker-result-node"></span>'},setCursorAfter(t){const e=document.createRange();e.setEndAfter(t),e.collapse();const i=window.getSelection();i.removeAllRanges(),i.addRange(e)},onInput(t){this.updateValue(t.target.innerHTML)},onPaste(t){if(!this.canEdit)return;t.preventDefault();const e=t.clipboardData;if(this.$emit("paste",t),0!==e.files.length||!Object.values(e.items).find((t=>null==t?void 0:t.type.startsWith("text"))))return;const i=e.getData("text"),n=window.getSelection();if(!n.rangeCount)return void this.updateValue(i);const r=n.getRangeAt(0);n.deleteFromDocument(),r.insertNode(document.createTextNode(i));const o=document.createRange();o.setStart(t.target,r.endOffset),o.collapse(!0),n.removeAllRanges(),n.addRange(o),this.updateValue(this.$refs.contenteditable.innerHTML)},updateValue(t){const e=this.parseContent(t);this.localValue=e,this.$emit("update:value",e)},updateContent(t){const e=this.renderContent(t);this.$refs.contenteditable.innerHTML=e,this.localValue=t},onDelete(t){if(!this.isFF||!window.getSelection||!this.canEdit)return;const e=window.getSelection(),i=t.target;if(!e.isCollapsed||!e.rangeCount)return;const n=e.getRangeAt(e.rangeCount-1);if(3===n.commonAncestorContainer.nodeType&&n.startOffset>0)return;const r=document.createRange();if(e.anchorNode!==i)r.selectNodeContents(i),r.setEndBefore(e.anchorNode);else{if(!(e.anchorOffset>0))return;r.setEnd(i,e.anchorOffset)}r.setStart(i,r.endOffset-1);const o=r.cloneContents().lastChild;o&&"false"===o.contentEditable&&(r.deleteContents(),t.preventDefault())},onEnter(t){this.multiline||this.isOverMaxlength||this.autocompleteTribute.isActive||this.emojiTribute.isActive||this.linkTribute.isActive||this.isComposing||(t.preventDefault(),t.stopPropagation(),this.$emit("submit",t))},onCtrlEnter(t){this.isOverMaxlength||this.$emit("submit",t)},debouncedAutoComplete:u((async function(t,e){this.autoComplete(t,e)}),100),onKeyUp(t){t.stopImmediatePropagation()}}};var y=function(){var t=this;return(0,t._self._c)("div",t._g({directives:[{name:"tooltip",rawName:"v-tooltip",value:t.tooltipString,expression:"tooltipString"}],ref:"contenteditable",staticClass:"rich-contenteditable__input",class:{"rich-contenteditable__input--empty":t.isEmptyValue,"rich-contenteditable__input--multiline":t.multiline,"rich-contenteditable__input--overflow":t.isOverMaxlength,"rich-contenteditable__input--disabled":t.disabled},attrs:{contenteditable:t.canEdit,placeholder:t.placeholder,"aria-placeholder":t.placeholder,"aria-multiline":"true",role:"textbox"},on:{input:t.onInput,compositionstart:function(e){t.isComposing=!0},compositionend:function(e){t.isComposing=!1},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:t.onDelete.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.onEnter.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")||!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:(e.stopPropagation(),e.preventDefault(),t.onCtrlEnter.apply(null,arguments))}],paste:t.onPaste,"!keyup":function(e){return e.stopPropagation(),e.preventDefault(),t.onKeyUp.apply(null,arguments)}}},t.listeners))},_=[];const b=(0,o.n)(w,y,_,!1,null,"599f92d5",null,null).exports},58397:function(t,e,i){"use strict";i.d(e,{N:function(){return S}});var n=i(21617),r=i(93664),o=i(79753),s=i(76311),a=i(28600),l=i(21955),c=i(10979),u=i(41074),d=i(38878),p=i(27172),f=i(20469),h=i(66875),m=i(72090),g=i(25108);const v=/(\s|^)(https?:\/\/)((?:[-A-Z0-9+_]+\.)+[-A-Z]+(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/gi,w=/(\s|\(|^)((https?:\/\/)((?:[-A-Z0-9+_]+\.)+[-A-Z0-9]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\s|\)|$)/gi,y={name:"NcReferenceList",components:{NcReferenceWidget:n.N},props:{text:{type:String,default:""},referenceData:{type:Object,default:null},limit:{type:Number,default:1}},data(){return{references:null,loading:!0}},computed:{isVisible(){return this.loading||this.displayedReferences},values(){return this.referenceData?this.referenceData:this.references?Object.values(this.references):[]},firstReference(){var t;return null!=(t=this.values[0])?t:null},displayedReferences(){return this.values.slice(0,this.limit)}},watch:{text:"fetch"},mounted(){this.fetch()},methods:{fetch(){this.loading=!0,this.referenceData?this.loading=!1:new RegExp(v).exec(this.text)?this.resolve().then((t=>{this.references=t.data.ocs.data.references,this.loading=!1})).catch((t=>{g.error("Failed to extract references",t),this.loading=!1})):this.loading=!1},resolve(){const t=new RegExp(v).exec(this.text.trim());return 1===this.limit&&t?r.Z.get((0,o.generateOcsUrl)("references/resolve",2)+`?reference=${encodeURIComponent(t[0])}`):r.Z.post((0,o.generateOcsUrl)("references/extract",2),{text:this.text,resolve:!0,limit:this.limit})}}};var _=function(){var t=this,e=t._self._c;return t.isVisible?e("div",{staticClass:"widgets--list",class:{"icon-loading":t.loading}},t._l(t.displayedReferences,(function(t){var i;return e("div",{key:null==(i=null==t?void 0:t.openGraphObject)?void 0:i.id},[e("NcReferenceWidget",{attrs:{reference:t}})],1)})),0):t._e()},b=[];const x=(0,s.n)(y,_,b,!1,null,"bd1fbb02",null,null).exports,N={name:"NcLink",props:{href:{type:String,required:!0}},render(t){return t("a",{attrs:{href:this.href,rel:"noopener noreferrer",target:"_blank",class:"rich-text--external-link"}},[this.href.trim()])}},C=function({autolink:t,useMarkdown:e}){return function(i){!e||!t||(0,a.Vn)(i,(t=>"text"===t.type),((t,e,i)=>{let n=E(t.value);return n=n.map((t=>"string"==typeof t?(0,c.u)("text",t):(0,c.u)("link",{url:t.props.href},[(0,c.u)("text",t.props.href)]))).filter((t=>t)),i.children.splice(e,1,...n.flat()),[l.AM,e+n.flat().length]}))}},E=t=>{let e=w.exec(t);const i=[];let n=0;for(;null!==e;){let r,o=e[2],s=t.substring(n,e.index+e[1].length);" "===o[0]&&(s+=o[0],o=o.substring(1).trim());const a=o[o.length-1];("."===a||","===a||";"===a||"("===e[0][0]&&")"===a)&&(o=o.substring(0,o.length-1),r=a),i.push(s),i.push({component:N,props:{href:o}}),r&&i.push(r),n=e.index+e[0].length,e=w.exec(t)}return i.push(t.substring(n)),t===i.map((t=>"string"==typeof t?t:t.props.href)).join("")?i:(g.error("Failed to reassemble the chunked text: "+t),t)},I=function(){return function(t){(0,a.Vn)(t,(t=>"text"===t.type),(function(t,e,i){const n=t.value.split(/(\{[a-z\-_.0-9]+\})/gi).map(((t,e,i)=>{const n=t.match(/^\{([a-z\-_.0-9]+)\}$/i);if(!n)return(0,c.u)("text",t);const[,r]=n;return(0,c.u)("element",{tagName:`#${r}`})}));i.children.splice(e,1,...n)}))}},k={name:"NcRichText",components:{NcReferenceList:x},props:{text:{type:String,default:""},arguments:{type:Object,default:()=>({})},referenceLimit:{type:Number,default:0},references:{type:Object,default:null},markdownCssClasses:{type:Object,default:()=>({a:"rich-text--external-link",ol:"rich-text--ordered-list",ul:"rich-text--un-ordered-list",li:"rich-text--list-item",strong:"rich-text--strong",em:"rich-text--italic",h1:"rich-text--heading rich-text--heading-1",h2:"rich-text--heading rich-text--heading-2",h3:"rich-text--heading rich-text--heading-3",h4:"rich-text--heading rich-text--heading-4",h5:"rich-text--heading rich-text--heading-5",h6:"rich-text--heading rich-text--heading-6",hr:"rich-text--hr",table:"rich-text--table",pre:"rich-text--pre",code:"rich-text--code",blockquote:"rich-text--blockquote"})},useMarkdown:{type:Boolean,default:!1},autolink:{type:Boolean,default:!0}},methods:{renderPlaintext(t){const e=this,i=this.text.split(/(\{[a-z\-_.0-9]+\})/gi).map((function(i,n,r){const o=i.match(/^\{([a-z\-_.0-9]+)\}$/i);if(!o)return(({h:t,context:e},i)=>(e.autolink&&(i=E(i)),Array.isArray(i)?i.map((e=>{if("string"==typeof e)return e;const{component:i,props:n}=e,r="NcLink"===i.name?void 0:"rich-text--component";return t(i,{props:n,class:r})})):i))({h:t,context:e},i);const s=o[1],a=e.arguments[s];if("object"==typeof a){const{component:e,props:i}=a;return t(e,{props:i,class:"rich-text--component"})}return a?t("span",{class:"rich-text--fallback"},a):i}));return t("div",{class:"rich-text--wrapper"},[t("div",{},i.flat()),this.referenceLimit>0?t("div",{class:"rich-text--reference-widget"},[t(x,{props:{text:this.text,referenceData:this.references}})]):null])},renderMarkdown(t){const e=(0,u.l)().use(d.Z).use(C,{autolink:this.autolink,useMarkdown:this.useMarkdown}).use(p.Z).use(f.Z,{handlers:{component(t,e){return t(e,e.component,{value:e.value})}}}).use(I).use(m.Z,{target:"_blank",rel:["noopener noreferrer"]}).use(h.Z,{createElement:(e,i,n)=>{if(n=null==n?void 0:n.map((t=>"string"==typeof t?t.replace(/&lt;/gim,"<"):t)),!e.startsWith("#"))return t(e,i,n);const r=this.arguments[e.slice(1)];return r?r.component?t(r.component,{attrs:i,props:r.props,class:"rich-text--component"},n):t("span",i,[r]):t("span",{attrs:i,class:"rich-text--fallback"},[`{${e.slice(1)}}`])},prefix:!1}).processSync(this.text.replace(/</gim,"&lt;").replace(/&gt;/gim,">")).result;return t("div",{class:"rich-text--wrapper rich-text--wrapper-markdown"},[e,this.referenceLimit>0?t("div",{class:"rich-text--reference-widget"},[t(x,{props:{text:this.text,referenceData:this.references}})]):null])}},render(t){return this.useMarkdown?this.renderMarkdown(t):this.renderPlaintext(t)}},S=(0,s.n)(k,null,null,!1,null,"5f33f45b",null,null).exports},64882:function(t,e,i){"use strict";i.d(e,{$U:function(){return L.Z},FK:function(){return q.Z},Iw:function(){return a.Z},Jc:function(){return tt.Z},Jh:function(){return z.Z},O3:function(){return d.Z},P2:function(){return D.Z},QG:function(){return ct.Z},SL:function(){return Y.Z},Z9:function(){return V.Z},fg:function(){return P.Z},h3:function(){return ut.Z},rw:function(){return M.Z}});var n=i(63357),r=i(66236),o=i(34791),s=i(56562),a=i(46187),l=i(80472),c=i(52300),u=i(86653),d=i(51103),p=i(68763),f=i(41748),h=i(94162),m=i(67397),g=i(27657),v=i(2047),w=i(6378),y=i(82002),_=i(89998),b=i(28505),x=i(36065),N=i(96315),C=i(66845),E=i(87875),I=i(35273),k=i(34739),S=i(55188),T=i(98445),A=i(9261),L=i(36402),P=i(49231),D=i(57274),M=i(19642),Z=i(37776),F=i(73743),B=i(93182),O=i(89241),j=i(96226),z=i(97947),V=i(2623),R=i(37008),$=i(93757),H=i(6318),U=i(78573),Y=i(22175),G=i(93428),W=i(93815),X=i(40873),q=i(64865),K=i(48741),Q=i(88175),J=i(20435),tt=i(6136),et=i(6156),it=i(16972),nt=i(34246),rt=i(34854),ot=i(42213),st=i(22663),at=i(46318),lt=i(58397),ct=(i(21617),i(93664),i(79753),i(99114)),ut=(i(66238),i(25751),i(49368)),dt=(i(89115),i(69183),i(32219),i(82675),i(74911)),pt=i(35380),ft=i(56857),ht=i(67912),mt=i(90436),gt=i(47414),vt=i(16024),wt=i(64722),yt=(i(93911),i(85302),i(90318)),_t=i(17593),bt=(i(79845),i(84722),i(76692),i(40946),i(73045));n.Z,r.Z,o.Z,s.Z,a.Z,l.Z,c.Z,u.Z,p.Z,f.Z,h.Z,d.Z,m.Z,g.Z,v.Z,w.Z,y.Z,_.Z,b.Z,x.Z,N.Z,C.Z,E.Z,I.Z,k.Z,S.Z,T.Z,at.NcAutoCompleteResult,A.N,L.Z,P.Z,D.Z,M.Z,Z.Z,F.Z,B.Z,O.Z,j.Z,z.Z,V.Z,R.Z,$.Z,H.Z,U.Z,Y.Z,G.Z,W.Z,X.N,q.Z,K.Z,Q.Z,J.Z,st.N,tt.Z,et.Z,it.Z,nt.Z,rt.Z,ot.Z,at.default,lt.N,dt.Z,ct.Z,pt.Z,ft.Z,ht.Z,mt.N,wt.Z,ut.Z,gt.Z,vt.Z,Symbol.toStringTag,yt.X,_t.X,bt.VTooltip,Symbol.toStringTag}}]);
  3. //# sourceMappingURL=7608-7608.js.map?v=79fdfed407dde075e048