diff --git a/apps/systemtags/src/components/SystemTagPicker.vue b/apps/systemtags/src/components/SystemTagPicker.vue index b6a1b652cdc91..07ce186d349d8 100644 --- a/apps/systemtags/src/components/SystemTagPicker.vue +++ b/apps/systemtags/src/components/SystemTagPicker.vue @@ -484,6 +484,12 @@ export default defineComponent({ bottom: 0; padding-block: 8px; + :deep(.notecard) { + // min 2 lines of text to avoid jumping + min-height: 2lh; + align-items: center; + } + & > div { margin: 0 !important; } diff --git a/core/Migrations/Version31000Date20241018063111.php b/core/Migrations/Version31000Date20241018063111.php index b9326f388e59d..eefda981dcbf3 100644 --- a/core/Migrations/Version31000Date20241018063111.php +++ b/core/Migrations/Version31000Date20241018063111.php @@ -10,6 +10,7 @@ namespace OC\Core\Migrations; use Closure; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -41,7 +42,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table = $schema->getTable('systemtag'); if (!$table->hasColumn('etag')) { - $table->addColumn('etag', 'string', [ + $table->addColumn('etag', Types::STRING, [ 'notnull' => false, 'length' => 32, ]); diff --git a/dist/6028-6028.js b/dist/6028-6028.js new file mode 100644 index 0000000000000..8c95250aaf756 --- /dev/null +++ b/dist/6028-6028.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[6028],{20530:(t,e,s)=>{s.d(e,{A:()=>l});var a=s(71354),i=s.n(a),n=s(76314),o=s.n(n)()(i());o.push([t.id,".systemtags-picker__create[data-v-272b44d0],.systemtags-picker__note[data-v-272b44d0]{position:sticky;z-index:9;background-color:var(--color-main-background)}.systemtags-picker__create[data-v-272b44d0]{display:flex;top:0;gap:8px;padding-block-end:8px;align-items:flex-end}.systemtags-picker__create button[data-v-272b44d0]{flex-shrink:0}.systemtags-picker__note[data-v-272b44d0]{bottom:0;padding-block:8px}.systemtags-picker__note[data-v-272b44d0] .notecard{min-height:2lh;align-items:center}.systemtags-picker__note>div[data-v-272b44d0]{margin:0 !important}.systemtags-picker--done[data-v-272b44d0] .empty-content__icon{opacity:1}.nc-chip[data-v-272b44d0]{display:inline !important}","",{version:3,sources:["webpack://./apps/systemtags/src/components/SystemTagPicker.vue"],names:[],mappings:"AAEA,sFAEC,eAAA,CACA,SAAA,CACA,6CAAA,CAGD,4CACC,YAAA,CACA,KAAA,CACA,OAAA,CACA,qBAAA,CACA,oBAAA,CAEA,mDACC,aAAA,CAIF,0CACC,QAAA,CACA,iBAAA,CAEA,oDAEC,cAAA,CACA,kBAAA,CAGD,8CACC,mBAAA,CAIF,+DACC,SAAA,CAID,0BACC,yBAAA",sourceRoot:""}]);const l=o},16028:(t,e,s)=>{s.r(e),s.d(e,{default:()=>Z});var a=s(85471),i=s(61338),n=s(42838),o=s(85168),l=s(53334),r=s(70580),c=s.n(r),d=s(18740),g=s(32073),h=s(32036),p=s(94219),m=s(34196),u=s(84237),A=s(80910),y=s(82182);const f={name:"TagIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var C=s(14486);const v=(0,C.A)(f,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon tag-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M5.5,7A1.5,1.5 0 0,1 4,5.5A1.5,1.5 0 0,1 5.5,4A1.5,1.5 0 0,1 7,5.5A1.5,1.5 0 0,1 5.5,7M21.41,11.58L12.41,2.58C12.05,2.22 11.55,2 11,2H4C2.89,2 2,2.89 2,4V11C2,11.55 2.22,12.05 2.59,12.41L11.58,21.41C11.95,21.77 12.45,22 13,22C13.55,22 14.05,21.77 14.41,21.41L21.41,14.41C21.78,14.05 22,13.55 22,13C22,12.44 21.77,11.94 21.41,11.58Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,b={name:"CheckCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},_=(0,C.A)(b,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon check-circle-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var N=s(12686),k=s(82528);const T=(0,s(35947).YK)().setApp("systemtags").detectUser().build();var S;!function(t){t.BASE="base",t.LOADING="loading",t.CREATING_TAG="creating-tag",t.DONE="done"}(S||(S={}));const w=(0,a.pM)({name:"SystemTagPicker",components:{CheckIcon:_,NcButton:d.A,NcCheckboxRadioSwitch:g.A,NcChip:h.A,NcDialog:p.A,NcEmptyContent:m.A,NcLoadingIcon:u.A,NcNoteCard:A.A,NcTextField:y.A,TagIcon:v},props:{nodes:{type:Array,required:!0}},setup:()=>({emit:i.Ic,Status:S,t:l.t}),data:()=>({status:S.BASE,opened:!0,input:"",tags:[],tagList:{},toAdd:[],toRemove:[]}),computed:{filteredTags(){return""===this.input.trim()?this.tags:this.tags.filter((t=>t.displayName.normalize().includes(this.input.normalize())))},hasChanges(){return this.toAdd.length>0||this.toRemove.length>0},statusMessage(){if(0===this.toAdd.length&&0===this.toRemove.length)return"";if(1===this.toAdd.length&&1===this.toRemove.length)return(0,l.n)("systemtags","{tag1} will be set and {tag2} will be removed from 1 file.","{tag1} and {tag2} will be set and removed from {count} files.",this.nodes.length,{tag1:this.formatTagChip(this.toAdd[0]),tag2:this.formatTagChip(this.toRemove[0]),count:this.nodes.length},{escape:!1});const t=this.toAdd.map(this.formatTagChip),e=t.pop(),s=this.toRemove.map(this.formatTagChip),a=s.pop(),i=(0,l.n)("systemtags","{tag} will be set to 1 file.","{tag} will be set to {count} files.",this.nodes.length,{tag:e,count:this.nodes.length},{escape:!1}),n=(0,l.n)("systemtags","{tag} will be removed from 1 file.","{tag} will be removed from {count} files.",this.nodes.length,{tag:a,count:this.nodes.length},{escape:!1}),o=(0,l.n)("systemtags","{tags} and {lastTag} will be set to 1 file.","{tags} and {lastTag} will be set to {count} files.",this.nodes.length,{tags:t.join(", "),lastTag:e,count:this.nodes.length},{escape:!1}),r=(0,l.n)("systemtags","{tags} and {lastTag} will be removed from 1 file.","{tags} and {lastTag} will be removed from {count} files.",this.nodes.length,{tags:s.join(", "),lastTag:a,count:this.nodes.length},{escape:!1});return 1===this.toAdd.length&&0===this.toRemove.length?i:0===this.toAdd.length&&1===this.toRemove.length?n:this.toAdd.length>1&&0===this.toRemove.length?o:0===this.toAdd.length&&this.toRemove.length>1?r:this.toAdd.length>1&&1===this.toRemove.length?`${o} ${n}`:1===this.toAdd.length&&this.toRemove.length>1?`${i} ${r}`:`${o} ${r}`}},beforeMount(){(0,k.un)().then((t=>{this.tags=t})),this.tagList=this.nodes.reduce(((t,e)=>(((0,N.rA)(e)||[]).forEach((e=>{t[e]=(t[e]||0)+1})),t)),{})},methods:{formatTagChip(t){return this.$refs.chip.$el.outerHTML.replace("%s",c()((0,n.sanitize)(t.displayName)))},formatTagName:t=>t.userVisible?t.userAssignable?t.displayName:(0,l.t)("systemtags","{displayName} (restricted)",{displayName:t.displayName}):(0,l.t)("systemtags","{displayName} (hidden)",{displayName:t.displayName}),isChecked(t){return t.displayName in this.tagList&&this.tagList[t.displayName]===this.nodes.length},isIndeterminate(t){return t.displayName in this.tagList&&0!==this.tagList[t.displayName]&&this.tagList[t.displayName]!==this.nodes.length},onCheckUpdate(t,e){e?(this.toAdd.push(t),this.toRemove=this.toRemove.filter((e=>e.id!==t.id)),this.tagList[t.displayName]=this.nodes.length):(this.toRemove.push(t),this.toAdd=this.toAdd.filter((e=>e.id!==t.id)),this.tagList[t.displayName]=0)},async onNewTag(){this.status=S.CREATING_TAG;try{const t={displayName:this.input.trim(),userAssignable:!0,userVisible:!0,canAssign:!0},e=await(0,k.VZ)(t),s=await(0,k.xI)(e);this.tags.push(s),this.input="",this.onCheckUpdate(s,!0)}catch(t){(0,o.Qg)(t?.message||(0,l.t)("systemtags","Failed to create tag"))}finally{this.status=S.BASE}},async onSubmit(){this.status=S.LOADING,T.debug("Applying tags",{toAdd:this.toAdd,toRemove:this.toRemove});try{for(const t of this.toAdd){const{etag:e,objects:s}=await(0,k.b0)(t,"files"),a=[...new Set([...s.map((t=>t.id)).filter(Boolean),...this.nodes.map((t=>t.fileid)).filter(Boolean)])];await(0,k.T0)(t,"files",a.map((t=>({id:t,type:"files"}))),e)}for(const t of this.toRemove){const{etag:e,objects:s}=await(0,k.b0)(t,"files"),a=new Set(this.nodes.map((t=>t.fileid))),i=s.map((t=>t.id)).filter(((t,e,s)=>!a.has(t)&&s.indexOf(t)===e));await(0,k.T0)(t,"files",i.map((t=>({id:t,type:"files"}))),e)}}catch(t){return T.error("Failed to apply tags",{error:t}),(0,o.Qg)((0,l.t)("systemtags","Failed to apply tags changes")),void(this.status=S.BASE)}const t=[];this.toAdd.forEach((e=>{this.nodes.forEach((s=>{const a=[...(0,N.rA)(s)||[],e.displayName].sort(((t,e)=>t.localeCompare(e,(0,l.Z0)(),{ignorePunctuation:!0})));(0,N.Pq)(s,a),t.push(s)}))})),this.toRemove.forEach((e=>{this.nodes.forEach((s=>{const a=[...(0,N.rA)(s)||[]].filter((t=>t!==e.displayName)).sort(((t,e)=>t.localeCompare(e,(0,l.Z0)(),{ignorePunctuation:!0})));(0,N.Pq)(s,a),t.push(s)}))})),t.forEach((t=>(0,i.Ic)("systemtags:node:updated",t))),this.status=S.DONE,setTimeout((()=>{this.opened=!1,this.$emit("close",!0)}),2e3)},onCancel(){this.opened=!1,(0,o.cf)((0,l.t)("systemtags","File tags modification canceled")),this.$emit("close",null)}}});var E=s(85072),x=s.n(E),L=s(97825),I=s.n(L),R=s(77659),B=s.n(R),D=s(55056),$=s.n(D),G=s(10540),z=s.n(G),M=s(41113),P=s.n(M),F=s(20530),O={};O.styleTagTransform=P(),O.setAttributes=$(),O.insert=B().bind(null,"head"),O.domAPI=I(),O.insertStyleElement=z(),x()(F.A,O),F.A&&F.A.locals&&F.A.locals;const Z=(0,C.A)(w,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcDialog",{staticClass:"systemtags-picker",class:"systemtags-picker--"+t.status,attrs:{"data-cy-systemtags-picker":"",name:t.t("systemtags","Manage tags"),open:t.opened,"close-on-click-outside":"","out-transition":""},on:{"update:open":t.onCancel},scopedSlots:t._u([{key:"actions",fn:function(){return[e("NcButton",{attrs:{disabled:t.status!==t.Status.BASE,type:"tertiary","data-cy-systemtags-picker-button-cancel":""},on:{click:t.onCancel}},[t._v("\n\t\t\t"+t._s(t.t("systemtags","Cancel"))+"\n\t\t")]),t._v(" "),e("NcButton",{attrs:{disabled:!t.hasChanges||t.status!==t.Status.BASE,"data-cy-systemtags-picker-button-submit":""},on:{click:t.onSubmit}},[t._v("\n\t\t\t"+t._s(t.t("systemtags","Apply changes"))+"\n\t\t")])]},proxy:!0}])},[t.status===t.Status.LOADING||t.status===t.Status.DONE?e("NcEmptyContent",{attrs:{name:t.t("systemtags","Applying tags changes…")},scopedSlots:t._u([{key:"icon",fn:function(){return[t.status===t.Status.LOADING?e("NcLoadingIcon"):e("CheckIcon",{attrs:{"fill-color":"var(--color-success)"}})]},proxy:!0}],null,!1,1067531430)}):[e("form",{staticClass:"systemtags-picker__create",on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.onNewTag.apply(null,arguments)}}},[e("NcTextField",{attrs:{value:t.input,label:t.t("systemtags","Search or create tag"),"data-cy-systemtags-picker-input":""},on:{"update:value":function(e){t.input=e}}},[e("TagIcon",{attrs:{size:20}})],1),t._v(" "),e("NcButton",{attrs:{disabled:t.status===t.Status.CREATING_TAG,"native-type":"submit","data-cy-systemtags-picker-input-submit":""}},[t._v("\n\t\t\t\t"+t._s(t.t("systemtags","Create tag"))+"\n\t\t\t")])],1),t._v(" "),t.filteredTags.length>0?e("div",{staticClass:"systemtags-picker__tags",attrs:{"data-cy-systemtags-picker-tags":""}},t._l(t.filteredTags,(function(s){return e("NcCheckboxRadioSwitch",{key:s.id,attrs:{label:s.displayName,checked:t.isChecked(s),indeterminate:t.isIndeterminate(s),disabled:!s.canAssign,"data-cy-systemtags-picker-tag":s.id},on:{"update:checked":function(e){return t.onCheckUpdate(s,e)}}},[t._v("\n\t\t\t\t"+t._s(t.formatTagName(s))+"\n\t\t\t")])})),1):e("NcEmptyContent",{attrs:{name:t.t("systemtags","No tags found")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("TagIcon")]},proxy:!0}])}),t._v(" "),e("div",{staticClass:"systemtags-picker__note"},[t.hasChanges?e("NcNoteCard",{attrs:{type:"info"}},[e("span",{domProps:{innerHTML:t._s(t.statusMessage)}})]):e("NcNoteCard",{attrs:{type:"info"}},[t._v("\n\t\t\t\t"+t._s(t.t("systemtags","Select or create tags to apply to all selected files"))+"\n\t\t\t")])],1)],t._v(" "),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}]},[e("NcChip",{ref:"chip",attrs:{text:"%s",type:"primary","no-close":""}})],1)],2)}),[],!1,null,"272b44d0",null).exports}}]); +//# sourceMappingURL=6028-6028.js.map?v=5ce1128bba38461a1848 \ No newline at end of file diff --git a/dist/8699-8699.js.license b/dist/6028-6028.js.license similarity index 100% rename from dist/8699-8699.js.license rename to dist/6028-6028.js.license diff --git a/dist/6028-6028.js.map b/dist/6028-6028.js.map new file mode 100644 index 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AIW,GAAG,KAAKT,EAAG,MAAM,CAAC2J,WAAW,CAAC,CAACvK,KAAK,OAAOwK,QAAQ,SAASC,OAAO,EAAOC,WAAW,WAAW,CAAC9J,EAAG,SAAS,CAAC+J,IAAI,OAAO3J,MAAM,CAAC,KAAO,KAAK,KAAO,UAAU,WAAW,OAAO,IAAI,EAC/kG,GACsB,IYUpB,EACA,KACA,WACA,MAI8B,O","sources":["webpack:///nextcloud/apps/systemtags/src/components/SystemTagPicker.vue?vue&type=style&index=0&id=272b44d0&prod&scoped=true&lang=scss","webpack:///nextcloud/apps/systemtags/src/components/SystemTagPicker.vue","webpack:///nextcloud/node_modules/vue-material-design-icons/Tag.vue","webpack:///nextcloud/node_modules/vue-material-design-icons/Tag.vue?vue&type=script&lang=js","webpack://nextcloud/./node_modules/vue-material-design-icons/Tag.vue?6116","webpack:///nextcloud/node_modules/vue-material-design-icons/Tag.vue?vue&type=template&id=75dd05e4","webpack:///nextcloud/node_modules/vue-material-design-icons/CheckCircle.vue?vue&type=script&lang=js","webpack:///nextcloud/node_modules/vue-material-design-icons/CheckCircle.vue","webpack://nextcloud/./node_modules/vue-material-design-icons/CheckCircle.vue?7685","webpack:///nextcloud/node_modules/vue-material-design-icons/CheckCircle.vue?vue&type=template&id=6dcc36c2","webpack:///nextcloud/apps/systemtags/src/services/logger.ts","webpack:///nextcloud/apps/systemtags/src/components/SystemTagPicker.vue?vue&type=script&lang=ts","webpack://nextcloud/./apps/systemtags/src/components/SystemTagPicker.vue?1262","webpack://nextcloud/./apps/systemtags/src/components/SystemTagPicker.vue?ff5c"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.systemtags-picker__create[data-v-272b44d0],.systemtags-picker__note[data-v-272b44d0]{position:sticky;z-index:9;background-color:var(--color-main-background)}.systemtags-picker__create[data-v-272b44d0]{display:flex;top:0;gap:8px;padding-block-end:8px;align-items:flex-end}.systemtags-picker__create button[data-v-272b44d0]{flex-shrink:0}.systemtags-picker__note[data-v-272b44d0]{bottom:0;padding-block:8px}.systemtags-picker__note[data-v-272b44d0] .notecard{min-height:2lh;align-items:center}.systemtags-picker__note>div[data-v-272b44d0]{margin:0 !important}.systemtags-picker--done[data-v-272b44d0] .empty-content__icon{opacity:1}.nc-chip[data-v-272b44d0]{display:inline !important}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/systemtags/src/components/SystemTagPicker.vue\"],\"names\":[],\"mappings\":\"AAEA,sFAEC,eAAA,CACA,SAAA,CACA,6CAAA,CAGD,4CACC,YAAA,CACA,KAAA,CACA,OAAA,CACA,qBAAA,CACA,oBAAA,CAEA,mDACC,aAAA,CAIF,0CACC,QAAA,CACA,iBAAA,CAEA,oDAEC,cAAA,CACA,kBAAA,CAGD,8CACC,mBAAA,CAIF,+DACC,SAAA,CAID,0BACC,yBAAA\",\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('NcDialog',{staticClass:\"systemtags-picker\",class:'systemtags-picker--' + _vm.status,attrs:{\"data-cy-systemtags-picker\":\"\",\"name\":_vm.t('systemtags', 'Manage tags'),\"open\":_vm.opened,\"close-on-click-outside\":\"\",\"out-transition\":\"\"},on:{\"update:open\":_vm.onCancel},scopedSlots:_vm._u([{key:\"actions\",fn:function(){return [_c('NcButton',{attrs:{\"disabled\":_vm.status !== _vm.Status.BASE,\"type\":\"tertiary\",\"data-cy-systemtags-picker-button-cancel\":\"\"},on:{\"click\":_vm.onCancel}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('systemtags', 'Cancel'))+\"\\n\\t\\t\")]),_vm._v(\" \"),_c('NcButton',{attrs:{\"disabled\":!_vm.hasChanges || _vm.status !== _vm.Status.BASE,\"data-cy-systemtags-picker-button-submit\":\"\"},on:{\"click\":_vm.onSubmit}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('systemtags', 'Apply changes'))+\"\\n\\t\\t\")])]},proxy:true}])},[(_vm.status === _vm.Status.LOADING || _vm.status === _vm.Status.DONE)?_c('NcEmptyContent',{attrs:{\"name\":_vm.t('systemtags', 'Applying tags changes…')},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.status === _vm.Status.LOADING)?_c('NcLoadingIcon'):_c('CheckIcon',{attrs:{\"fill-color\":\"var(--color-success)\"}})]},proxy:true}],null,false,1067531430)}):[_c('form',{staticClass:\"systemtags-picker__create\",on:{\"submit\":function($event){$event.stopPropagation();$event.preventDefault();return _vm.onNewTag.apply(null, arguments)}}},[_c('NcTextField',{attrs:{\"value\":_vm.input,\"label\":_vm.t('systemtags', 'Search or create tag'),\"data-cy-systemtags-picker-input\":\"\"},on:{\"update:value\":function($event){_vm.input=$event}}},[_c('TagIcon',{attrs:{\"size\":20}})],1),_vm._v(\" \"),_c('NcButton',{attrs:{\"disabled\":_vm.status === _vm.Status.CREATING_TAG,\"native-type\":\"submit\",\"data-cy-systemtags-picker-input-submit\":\"\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('systemtags', 'Create tag'))+\"\\n\\t\\t\\t\")])],1),_vm._v(\" \"),(_vm.filteredTags.length > 0)?_c('div',{staticClass:\"systemtags-picker__tags\",attrs:{\"data-cy-systemtags-picker-tags\":\"\"}},_vm._l((_vm.filteredTags),function(tag){return _c('NcCheckboxRadioSwitch',{key:tag.id,attrs:{\"label\":tag.displayName,\"checked\":_vm.isChecked(tag),\"indeterminate\":_vm.isIndeterminate(tag),\"disabled\":!tag.canAssign,\"data-cy-systemtags-picker-tag\":tag.id},on:{\"update:checked\":function($event){return _vm.onCheckUpdate(tag, $event)}}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.formatTagName(tag))+\"\\n\\t\\t\\t\")])}),1):_c('NcEmptyContent',{attrs:{\"name\":_vm.t('systemtags', 'No tags found')},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('TagIcon')]},proxy:true}])}),_vm._v(\" \"),_c('div',{staticClass:\"systemtags-picker__note\"},[(!_vm.hasChanges)?_c('NcNoteCard',{attrs:{\"type\":\"info\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('systemtags', 'Select or create tags to apply to all selected files'))+\"\\n\\t\\t\\t\")]):_c('NcNoteCard',{attrs:{\"type\":\"info\"}},[_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.statusMessage)}})])],1)],_vm._v(\" \"),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(false),expression:\"false\"}]},[_c('NcChip',{ref:\"chip\",attrs:{\"text\":\"%s\",\"type\":\"primary\",\"no-close\":\"\"}})],1)],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./Tag.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Tag.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Tag.vue?vue&type=template&id=75dd05e4\"\nimport script from \"./Tag.vue?vue&type=script&lang=js\"\nexport * from \"./Tag.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',_vm._b({staticClass:\"material-design-icon tag-icon\",attrs:{\"aria-hidden\":_vm.title ? null : true,\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M5.5,7A1.5,1.5 0 0,1 4,5.5A1.5,1.5 0 0,1 5.5,4A1.5,1.5 0 0,1 7,5.5A1.5,1.5 0 0,1 5.5,7M21.41,11.58L12.41,2.58C12.05,2.22 11.55,2 11,2H4C2.89,2 2,2.89 2,4V11C2,11.55 2.22,12.05 2.59,12.41L11.58,21.41C11.95,21.77 12.45,22 13,22C13.55,22 14.05,21.77 14.41,21.41L21.41,14.41C21.78,14.05 22,13.55 22,13C22,12.44 21.77,11.94 21.41,11.58Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./CheckCircle.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./CheckCircle.vue?vue&type=script&lang=js\"","\n\n","import { render, staticRenderFns } from \"./CheckCircle.vue?vue&type=template&id=6dcc36c2\"\nimport script from \"./CheckCircle.vue?vue&type=script&lang=js\"\nexport * from \"./CheckCircle.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',_vm._b({staticClass:\"material-design-icon check-circle-icon\",attrs:{\"aria-hidden\":_vm.title ? null : true,\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport default getLoggerBuilder()\n .setApp('systemtags')\n .detectUser()\n .build();\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SystemTagPicker.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SystemTagPicker.vue?vue&type=script&lang=ts\"","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SystemTagPicker.vue?vue&type=style&index=0&id=272b44d0&prod&scoped=true&lang=scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SystemTagPicker.vue?vue&type=style&index=0&id=272b44d0&prod&scoped=true&lang=scss\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./SystemTagPicker.vue?vue&type=template&id=272b44d0&scoped=true\"\nimport script from \"./SystemTagPicker.vue?vue&type=script&lang=ts\"\nexport * from \"./SystemTagPicker.vue?vue&type=script&lang=ts\"\nimport style0 from \"./SystemTagPicker.vue?vue&type=style&index=0&id=272b44d0&prod&scoped=true&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"272b44d0\",\n null\n \n)\n\nexport default component.exports"],"names":["___CSS_LOADER_EXPORT___","push","module","id","name","emits","props","title","type","String","fillColor","default","size","Number","_vm","this","_c","_self","_b","staticClass","attrs","on","$event","$emit","$attrs","_v","_s","_e","getLoggerBuilder","setApp","detectUser","build","Status","defineComponent","components","CheckIcon","NcButton","NcCheckboxRadioSwitch","NcChip","NcDialog","NcEmptyContent","NcLoadingIcon","NcNoteCard","NcTextField","TagIcon","nodes","Array","required","setup","emit","t","data","status","BASE","opened","input","tags","tagList","toAdd","toRemove","computed","filteredTags","trim","filter","tag","displayName","normalize","includes","hasChanges","length","statusMessage","n","tag1","formatTagChip","tag2","count","escape","tagsAdd","map","lastTagAdd","pop","tagsRemove","lastTagRemove","addStringSingular","removeStringSingular","addStringPlural","join","lastTag","removeStringPlural","beforeMount","fetchTags","then","reduce","acc","node","getNodeSystemTags","forEach","methods","$refs","chip","$el","outerHTML","replace","escapeHTML","sanitize","formatTagName","userVisible","userAssignable","isChecked","isIndeterminate","onCheckUpdate","checked","search","onNewTag","CREATING_TAG","payload","canAssign","createTag","fetchTag","error","showError","message","onSubmit","LOADING","logger","debug","etag","objects","getTagObjects","ids","Set","obj","Boolean","fileid","setTagObjects","nodeFileIds","index","self","has","indexOf","sort","a","b","localeCompare","getLanguage","ignorePunctuation","setNodeSystemTags","DONE","setTimeout","onCancel","showInfo","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","_setupProxy","class","scopedSlots","_u","key","fn","proxy","stopPropagation","preventDefault","apply","arguments","_l","domProps","directives","rawName","value","expression","ref"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/6028-6028.js.map.license b/dist/6028-6028.js.map.license new file mode 120000 index 0000000000000..e476919ef14c0 --- /dev/null +++ b/dist/6028-6028.js.map.license @@ -0,0 +1 @@ +6028-6028.js.license \ No newline at end of file diff --git a/dist/8699-8699.js b/dist/8699-8699.js deleted file mode 100644 index 28d2a5bbcb06b..0000000000000 --- a/dist/8699-8699.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[8699],{93221:(t,e,s)=>{s.d(e,{A:()=>l});var a=s(71354),i=s.n(a),n=s(76314),o=s.n(n)()(i());o.push([t.id,".systemtags-picker__create[data-v-82c6457a],.systemtags-picker__note[data-v-82c6457a]{position:sticky;z-index:9;background-color:var(--color-main-background)}.systemtags-picker__create[data-v-82c6457a]{display:flex;top:0;gap:8px;padding-block-end:8px;align-items:flex-end}.systemtags-picker__create button[data-v-82c6457a]{flex-shrink:0}.systemtags-picker__note[data-v-82c6457a]{bottom:0;padding-block:8px}.systemtags-picker__note>div[data-v-82c6457a]{margin:0 !important}.systemtags-picker--done[data-v-82c6457a] .empty-content__icon{opacity:1}.nc-chip[data-v-82c6457a]{display:inline !important}","",{version:3,sources:["webpack://./apps/systemtags/src/components/SystemTagPicker.vue"],names:[],mappings:"AAEA,sFAEC,eAAA,CACA,SAAA,CACA,6CAAA,CAGD,4CACC,YAAA,CACA,KAAA,CACA,OAAA,CACA,qBAAA,CACA,oBAAA,CAEA,mDACC,aAAA,CAIF,0CACC,QAAA,CACA,iBAAA,CAEA,8CACC,mBAAA,CAIF,+DACC,SAAA,CAID,0BACC,yBAAA",sourceRoot:""}]);const l=o},88699:(t,e,s)=>{s.r(e),s.d(e,{default:()=>Z});var a=s(85471),i=s(61338),n=s(42838),o=s(85168),l=s(53334),c=s(70580),r=s.n(c),d=s(18740),g=s(32073),h=s(32036),p=s(94219),m=s(34196),u=s(84237),A=s(80910),y=s(82182);const f={name:"TagIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var C=s(14486);const v=(0,C.A)(f,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon tag-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M5.5,7A1.5,1.5 0 0,1 4,5.5A1.5,1.5 0 0,1 5.5,4A1.5,1.5 0 0,1 7,5.5A1.5,1.5 0 0,1 5.5,7M21.41,11.58L12.41,2.58C12.05,2.22 11.55,2 11,2H4C2.89,2 2,2.89 2,4V11C2,11.55 2.22,12.05 2.59,12.41L11.58,21.41C11.95,21.77 12.45,22 13,22C13.55,22 14.05,21.77 14.41,21.41L21.41,14.41C21.78,14.05 22,13.55 22,13C22,12.44 21.77,11.94 21.41,11.58Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,_={name:"CheckCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},N=(0,C.A)(_,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon check-circle-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var k=s(12686),b=s(82528);const T=(0,s(35947).YK)().setApp("systemtags").detectUser().build();var S;!function(t){t.BASE="base",t.LOADING="loading",t.CREATING_TAG="creating-tag",t.DONE="done"}(S||(S={}));const w=(0,a.pM)({name:"SystemTagPicker",components:{CheckIcon:N,NcButton:d.A,NcCheckboxRadioSwitch:g.A,NcChip:h.A,NcDialog:p.A,NcEmptyContent:m.A,NcLoadingIcon:u.A,NcNoteCard:A.A,NcTextField:y.A,TagIcon:v},props:{nodes:{type:Array,required:!0}},setup:()=>({emit:i.Ic,Status:S,t:l.t}),data:()=>({status:S.BASE,opened:!0,input:"",tags:[],tagList:{},toAdd:[],toRemove:[]}),computed:{filteredTags(){return""===this.input.trim()?this.tags:this.tags.filter((t=>t.displayName.normalize().includes(this.input.normalize())))},hasChanges(){return this.toAdd.length>0||this.toRemove.length>0},statusMessage(){if(0===this.toAdd.length&&0===this.toRemove.length)return"";if(1===this.toAdd.length&&1===this.toRemove.length)return(0,l.n)("systemtags","{tag1} will be set and {tag2} will be removed from 1 file.","{tag1} and {tag2} will be set and removed from {count} files.",this.nodes.length,{tag1:this.formatTagChip(this.toAdd[0]),tag2:this.formatTagChip(this.toRemove[0]),count:this.nodes.length},{escape:!1});const t=this.toAdd.map(this.formatTagChip),e=t.pop(),s=this.toRemove.map(this.formatTagChip),a=s.pop(),i=(0,l.n)("systemtags","{tag} will be set to 1 file.","{tag} will be set to {count} files.",this.nodes.length,{tag:e,count:this.nodes.length},{escape:!1}),n=(0,l.n)("systemtags","{tag} will be removed from 1 file.","{tag} will be removed from {count} files.",this.nodes.length,{tag:a,count:this.nodes.length},{escape:!1}),o=(0,l.n)("systemtags","{tags} and {lastTag} will be set to 1 file.","{tags} and {lastTag} will be set to {count} files.",this.nodes.length,{tags:t.join(", "),lastTag:e,count:this.nodes.length},{escape:!1}),c=(0,l.n)("systemtags","{tags} and {lastTag} will be removed from 1 file.","{tags} and {lastTag} will be removed from {count} files.",this.nodes.length,{tags:s.join(", "),lastTag:a,count:this.nodes.length},{escape:!1});return 1===this.toAdd.length&&0===this.toRemove.length?i:0===this.toAdd.length&&1===this.toRemove.length?n:this.toAdd.length>1&&0===this.toRemove.length?o:0===this.toAdd.length&&this.toRemove.length>1?c:this.toAdd.length>1&&1===this.toRemove.length?`${o} ${n}`:1===this.toAdd.length&&this.toRemove.length>1?`${i} ${c}`:`${o} ${c}`}},beforeMount(){(0,b.un)().then((t=>{this.tags=t})),this.tagList=this.nodes.reduce(((t,e)=>(((0,k.rA)(e)||[]).forEach((e=>{t[e]=(t[e]||0)+1})),t)),{})},methods:{formatTagChip(t){return this.$refs.chip.$el.outerHTML.replace("%s",r()((0,n.sanitize)(t.displayName)))},formatTagName:t=>t.userVisible?t.userAssignable?t.displayName:(0,l.t)("systemtags","{displayName} (restricted)",{displayName:t.displayName}):(0,l.t)("systemtags","{displayName} (hidden)",{displayName:t.displayName}),isChecked(t){return t.displayName in this.tagList&&this.tagList[t.displayName]===this.nodes.length},isIndeterminate(t){return t.displayName in this.tagList&&0!==this.tagList[t.displayName]&&this.tagList[t.displayName]!==this.nodes.length},onCheckUpdate(t,e){e?(this.toAdd.push(t),this.toRemove=this.toRemove.filter((e=>e.id!==t.id)),this.tagList[t.displayName]=this.nodes.length):(this.toRemove.push(t),this.toAdd=this.toAdd.filter((e=>e.id!==t.id)),this.tagList[t.displayName]=0)},async onNewTag(){this.status=S.CREATING_TAG;try{const t={displayName:this.input.trim(),userAssignable:!0,userVisible:!0,canAssign:!0},e=await(0,b.VZ)(t),s=await(0,b.xI)(e);this.tags.push(s),this.input="",this.onCheckUpdate(s,!0)}catch(t){(0,o.Qg)(t?.message||(0,l.t)("systemtags","Failed to create tag"))}finally{this.status=S.BASE}},async onSubmit(){this.status=S.LOADING,T.debug("Applying tags",{toAdd:this.toAdd,toRemove:this.toRemove});try{for(const t of this.toAdd){const{etag:e,objects:s}=await(0,b.b0)(t,"files"),a=[...new Set([...s.map((t=>t.id)).filter(Boolean),...this.nodes.map((t=>t.fileid)).filter(Boolean)])];await(0,b.T0)(t,"files",a.map((t=>({id:t,type:"files"}))),e)}for(const t of this.toRemove){const{etag:e,objects:s}=await(0,b.b0)(t,"files"),a=new Set(this.nodes.map((t=>t.fileid))),i=s.map((t=>t.id)).filter(((t,e,s)=>!a.has(t)&&s.indexOf(t)===e));await(0,b.T0)(t,"files",i.map((t=>({id:t,type:"files"}))),e)}}catch(t){return T.error("Failed to apply tags",{error:t}),(0,o.Qg)((0,l.t)("systemtags","Failed to apply tags changes")),void(this.status=S.BASE)}const t=[];this.toAdd.forEach((e=>{this.nodes.forEach((s=>{const a=[...(0,k.rA)(s)||[],e.displayName].sort(((t,e)=>t.localeCompare(e,(0,l.Z0)(),{ignorePunctuation:!0})));(0,k.Pq)(s,a),t.push(s)}))})),this.toRemove.forEach((e=>{this.nodes.forEach((s=>{const a=[...(0,k.rA)(s)||[]].filter((t=>t!==e.displayName)).sort(((t,e)=>t.localeCompare(e,(0,l.Z0)(),{ignorePunctuation:!0})));(0,k.Pq)(s,a),t.push(s)}))})),t.forEach((t=>(0,i.Ic)("systemtags:node:updated",t))),this.status=S.DONE,setTimeout((()=>{this.opened=!1,this.$emit("close",!0)}),2e3)},onCancel(){this.opened=!1,(0,o.cf)((0,l.t)("systemtags","File tags modification canceled")),this.$emit("close",null)}}});var x=s(85072),E=s.n(x),L=s(97825),I=s.n(L),R=s(77659),B=s.n(R),D=s(55056),$=s.n(D),z=s(10540),G=s.n(z),M=s(41113),P=s.n(M),F=s(93221),O={};O.styleTagTransform=P(),O.setAttributes=$(),O.insert=B().bind(null,"head"),O.domAPI=I(),O.insertStyleElement=G(),E()(F.A,O),F.A&&F.A.locals&&F.A.locals;const Z=(0,C.A)(w,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcDialog",{staticClass:"systemtags-picker",class:"systemtags-picker--"+t.status,attrs:{"data-cy-systemtags-picker":"",name:t.t("systemtags","Manage tags"),open:t.opened,"close-on-click-outside":"","out-transition":""},on:{"update:open":t.onCancel},scopedSlots:t._u([{key:"actions",fn:function(){return[e("NcButton",{attrs:{disabled:t.status!==t.Status.BASE,type:"tertiary","data-cy-systemtags-picker-button-cancel":""},on:{click:t.onCancel}},[t._v("\n\t\t\t"+t._s(t.t("systemtags","Cancel"))+"\n\t\t")]),t._v(" "),e("NcButton",{attrs:{disabled:!t.hasChanges||t.status!==t.Status.BASE,"data-cy-systemtags-picker-button-submit":""},on:{click:t.onSubmit}},[t._v("\n\t\t\t"+t._s(t.t("systemtags","Apply changes"))+"\n\t\t")])]},proxy:!0}])},[t.status===t.Status.LOADING||t.status===t.Status.DONE?e("NcEmptyContent",{attrs:{name:t.t("systemtags","Applying tags changes…")},scopedSlots:t._u([{key:"icon",fn:function(){return[t.status===t.Status.LOADING?e("NcLoadingIcon"):e("CheckIcon",{attrs:{"fill-color":"var(--color-success)"}})]},proxy:!0}],null,!1,1067531430)}):[e("form",{staticClass:"systemtags-picker__create",on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.onNewTag.apply(null,arguments)}}},[e("NcTextField",{attrs:{value:t.input,label:t.t("systemtags","Search or create tag"),"data-cy-systemtags-picker-input":""},on:{"update:value":function(e){t.input=e}}},[e("TagIcon",{attrs:{size:20}})],1),t._v(" "),e("NcButton",{attrs:{disabled:t.status===t.Status.CREATING_TAG,"native-type":"submit","data-cy-systemtags-picker-input-submit":""}},[t._v("\n\t\t\t\t"+t._s(t.t("systemtags","Create tag"))+"\n\t\t\t")])],1),t._v(" "),t.filteredTags.length>0?e("div",{staticClass:"systemtags-picker__tags",attrs:{"data-cy-systemtags-picker-tags":""}},t._l(t.filteredTags,(function(s){return e("NcCheckboxRadioSwitch",{key:s.id,attrs:{label:s.displayName,checked:t.isChecked(s),indeterminate:t.isIndeterminate(s),disabled:!s.canAssign,"data-cy-systemtags-picker-tag":s.id},on:{"update:checked":function(e){return t.onCheckUpdate(s,e)}}},[t._v("\n\t\t\t\t"+t._s(t.formatTagName(s))+"\n\t\t\t")])})),1):e("NcEmptyContent",{attrs:{name:t.t("systemtags","No tags found")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("TagIcon")]},proxy:!0}])}),t._v(" "),e("div",{staticClass:"systemtags-picker__note"},[t.hasChanges?e("NcNoteCard",{attrs:{type:"info"}},[e("span",{domProps:{innerHTML:t._s(t.statusMessage)}})]):e("NcNoteCard",{attrs:{type:"info"}},[t._v("\n\t\t\t\t"+t._s(t.t("systemtags","Select or create tags to apply to all selected files"))+"\n\t\t\t")])],1)],t._v(" "),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}]},[e("NcChip",{ref:"chip",attrs:{text:"%s",type:"primary","no-close":""}})],1)],2)}),[],!1,null,"82c6457a",null).exports}}]); -//# sourceMappingURL=8699-8699.js.map?v=6b7a12a16e2a8dae7313 \ No newline at end of file diff --git a/dist/8699-8699.js.map b/dist/8699-8699.js.map deleted file mode 100644 index 1eb22c6276471..0000000000000 --- a/dist/8699-8699.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"8699-8699.js?v=6b7a12a16e2a8dae7313","mappings":"2JAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KA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AM,CAAC,KAAO,KAAK,KAAO,UAAU,WAAW,OAAO,IAAI,EAC/kG,GACsB,IYUpB,EACA,KACA,WACA,MAI8B,O","sources":["webpack:///nextcloud/apps/systemtags/src/components/SystemTagPicker.vue?vue&type=style&index=0&id=82c6457a&prod&scoped=true&lang=scss","webpack:///nextcloud/apps/systemtags/src/components/SystemTagPicker.vue","webpack:///nextcloud/node_modules/vue-material-design-icons/Tag.vue","webpack:///nextcloud/node_modules/vue-material-design-icons/Tag.vue?vue&type=script&lang=js","webpack://nextcloud/./node_modules/vue-material-design-icons/Tag.vue?6116","webpack:///nextcloud/node_modules/vue-material-design-icons/Tag.vue?vue&type=template&id=75dd05e4","webpack:///nextcloud/node_modules/vue-material-design-icons/CheckCircle.vue?vue&type=script&lang=js","webpack:///nextcloud/node_modules/vue-material-design-icons/CheckCircle.vue","webpack://nextcloud/./node_modules/vue-material-design-icons/CheckCircle.vue?7685","webpack:///nextcloud/node_modules/vue-material-design-icons/CheckCircle.vue?vue&type=template&id=6dcc36c2","webpack:///nextcloud/apps/systemtags/src/services/logger.ts","webpack:///nextcloud/apps/systemtags/src/components/SystemTagPicker.vue?vue&type=script&lang=ts","webpack://nextcloud/./apps/systemtags/src/components/SystemTagPicker.vue?c786","webpack://nextcloud/./apps/systemtags/src/components/SystemTagPicker.vue?ff5c"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.systemtags-picker__create[data-v-82c6457a],.systemtags-picker__note[data-v-82c6457a]{position:sticky;z-index:9;background-color:var(--color-main-background)}.systemtags-picker__create[data-v-82c6457a]{display:flex;top:0;gap:8px;padding-block-end:8px;align-items:flex-end}.systemtags-picker__create button[data-v-82c6457a]{flex-shrink:0}.systemtags-picker__note[data-v-82c6457a]{bottom:0;padding-block:8px}.systemtags-picker__note>div[data-v-82c6457a]{margin:0 !important}.systemtags-picker--done[data-v-82c6457a] .empty-content__icon{opacity:1}.nc-chip[data-v-82c6457a]{display:inline !important}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/systemtags/src/components/SystemTagPicker.vue\"],\"names\":[],\"mappings\":\"AAEA,sFAEC,eAAA,CACA,SAAA,CACA,6CAAA,CAGD,4CACC,YAAA,CACA,KAAA,CACA,OAAA,CACA,qBAAA,CACA,oBAAA,CAEA,mDACC,aAAA,CAIF,0CACC,QAAA,CACA,iBAAA,CAEA,8CACC,mBAAA,CAIF,+DACC,SAAA,CAID,0BACC,yBAAA\",\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('NcDialog',{staticClass:\"systemtags-picker\",class:'systemtags-picker--' + _vm.status,attrs:{\"data-cy-systemtags-picker\":\"\",\"name\":_vm.t('systemtags', 'Manage tags'),\"open\":_vm.opened,\"close-on-click-outside\":\"\",\"out-transition\":\"\"},on:{\"update:open\":_vm.onCancel},scopedSlots:_vm._u([{key:\"actions\",fn:function(){return [_c('NcButton',{attrs:{\"disabled\":_vm.status !== _vm.Status.BASE,\"type\":\"tertiary\",\"data-cy-systemtags-picker-button-cancel\":\"\"},on:{\"click\":_vm.onCancel}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('systemtags', 'Cancel'))+\"\\n\\t\\t\")]),_vm._v(\" \"),_c('NcButton',{attrs:{\"disabled\":!_vm.hasChanges || _vm.status !== _vm.Status.BASE,\"data-cy-systemtags-picker-button-submit\":\"\"},on:{\"click\":_vm.onSubmit}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('systemtags', 'Apply changes'))+\"\\n\\t\\t\")])]},proxy:true}])},[(_vm.status === _vm.Status.LOADING || _vm.status === _vm.Status.DONE)?_c('NcEmptyContent',{attrs:{\"name\":_vm.t('systemtags', 'Applying tags changes…')},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.status === _vm.Status.LOADING)?_c('NcLoadingIcon'):_c('CheckIcon',{attrs:{\"fill-color\":\"var(--color-success)\"}})]},proxy:true}],null,false,1067531430)}):[_c('form',{staticClass:\"systemtags-picker__create\",on:{\"submit\":function($event){$event.stopPropagation();$event.preventDefault();return _vm.onNewTag.apply(null, arguments)}}},[_c('NcTextField',{attrs:{\"value\":_vm.input,\"label\":_vm.t('systemtags', 'Search or create tag'),\"data-cy-systemtags-picker-input\":\"\"},on:{\"update:value\":function($event){_vm.input=$event}}},[_c('TagIcon',{attrs:{\"size\":20}})],1),_vm._v(\" \"),_c('NcButton',{attrs:{\"disabled\":_vm.status === _vm.Status.CREATING_TAG,\"native-type\":\"submit\",\"data-cy-systemtags-picker-input-submit\":\"\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('systemtags', 'Create tag'))+\"\\n\\t\\t\\t\")])],1),_vm._v(\" \"),(_vm.filteredTags.length > 0)?_c('div',{staticClass:\"systemtags-picker__tags\",attrs:{\"data-cy-systemtags-picker-tags\":\"\"}},_vm._l((_vm.filteredTags),function(tag){return _c('NcCheckboxRadioSwitch',{key:tag.id,attrs:{\"label\":tag.displayName,\"checked\":_vm.isChecked(tag),\"indeterminate\":_vm.isIndeterminate(tag),\"disabled\":!tag.canAssign,\"data-cy-systemtags-picker-tag\":tag.id},on:{\"update:checked\":function($event){return _vm.onCheckUpdate(tag, $event)}}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.formatTagName(tag))+\"\\n\\t\\t\\t\")])}),1):_c('NcEmptyContent',{attrs:{\"name\":_vm.t('systemtags', 'No tags found')},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('TagIcon')]},proxy:true}])}),_vm._v(\" \"),_c('div',{staticClass:\"systemtags-picker__note\"},[(!_vm.hasChanges)?_c('NcNoteCard',{attrs:{\"type\":\"info\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('systemtags', 'Select or create tags to apply to all selected files'))+\"\\n\\t\\t\\t\")]):_c('NcNoteCard',{attrs:{\"type\":\"info\"}},[_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.statusMessage)}})])],1)],_vm._v(\" \"),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(false),expression:\"false\"}]},[_c('NcChip',{ref:\"chip\",attrs:{\"text\":\"%s\",\"type\":\"primary\",\"no-close\":\"\"}})],1)],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./Tag.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Tag.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Tag.vue?vue&type=template&id=75dd05e4\"\nimport script from \"./Tag.vue?vue&type=script&lang=js\"\nexport * from \"./Tag.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',_vm._b({staticClass:\"material-design-icon tag-icon\",attrs:{\"aria-hidden\":_vm.title ? null : true,\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M5.5,7A1.5,1.5 0 0,1 4,5.5A1.5,1.5 0 0,1 5.5,4A1.5,1.5 0 0,1 7,5.5A1.5,1.5 0 0,1 5.5,7M21.41,11.58L12.41,2.58C12.05,2.22 11.55,2 11,2H4C2.89,2 2,2.89 2,4V11C2,11.55 2.22,12.05 2.59,12.41L11.58,21.41C11.95,21.77 12.45,22 13,22C13.55,22 14.05,21.77 14.41,21.41L21.41,14.41C21.78,14.05 22,13.55 22,13C22,12.44 21.77,11.94 21.41,11.58Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./CheckCircle.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./CheckCircle.vue?vue&type=script&lang=js\"","\n\n","import { render, staticRenderFns } from \"./CheckCircle.vue?vue&type=template&id=6dcc36c2\"\nimport script from \"./CheckCircle.vue?vue&type=script&lang=js\"\nexport * from \"./CheckCircle.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',_vm._b({staticClass:\"material-design-icon check-circle-icon\",attrs:{\"aria-hidden\":_vm.title ? null : true,\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport default getLoggerBuilder()\n .setApp('systemtags')\n .detectUser()\n .build();\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SystemTagPicker.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??clonedRuleSet-4.use[1]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SystemTagPicker.vue?vue&type=script&lang=ts\"","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SystemTagPicker.vue?vue&type=style&index=0&id=82c6457a&prod&scoped=true&lang=scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SystemTagPicker.vue?vue&type=style&index=0&id=82c6457a&prod&scoped=true&lang=scss\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./SystemTagPicker.vue?vue&type=template&id=82c6457a&scoped=true\"\nimport script from \"./SystemTagPicker.vue?vue&type=script&lang=ts\"\nexport * from \"./SystemTagPicker.vue?vue&type=script&lang=ts\"\nimport style0 from \"./SystemTagPicker.vue?vue&type=style&index=0&id=82c6457a&prod&scoped=true&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"82c6457a\",\n null\n \n)\n\nexport default component.exports"],"names":["___CSS_LOADER_EXPORT___","push","module","id","name","emits","props","title","type","String","fillColor","default","size","Number","_vm","this","_c","_self","_b","staticClass","attrs","on","$event","$emit","$attrs","_v","_s","_e","getLoggerBuilder","setApp","detectUser","build","Status","defineComponent","components","CheckIcon","NcButton","NcCheckboxRadioSwitch","NcChip","NcDialog","NcEmptyContent","NcLoadingIcon","NcNoteCard","NcTextField","TagIcon","nodes","Array","required","setup","emit","t","data","status","BASE","opened","input","tags","tagList","toAdd","toRemove","computed","filteredTags","trim","filter","tag","displayName","normalize","includes","hasChanges","length","statusMessage","n","tag1","formatTagChip","tag2","count","escape","tagsAdd","map","lastTagAdd","pop","tagsRemove","lastTagRemove","addStringSingular","removeStringSingular","addStringPlural","join","lastTag","removeStringPlural","beforeMount","fetchTags","then","reduce","acc","node","getNodeSystemTags","forEach","methods","$refs","chip","$el","outerHTML","replace","escapeHTML","sanitize","formatTagName","userVisible","userAssignable","isChecked","isIndeterminate","onCheckUpdate","checked","search","onNewTag","CREATING_TAG","payload","canAssign","createTag","fetchTag","error","showError","message","onSubmit","LOADING","logger","debug","etag","objects","getTagObjects","ids","Set","obj","Boolean","fileid","setTagObjects","nodeFileIds","index","self","has","indexOf","sort","a","b","localeCompare","getLanguage","ignorePunctuation","setNodeSystemTags","DONE","setTimeout","onCancel","showInfo","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","_setupProxy","class","scopedSlots","_u","key","fn","proxy","stopPropagation","preventDefault","apply","arguments","_l","domProps","directives","rawName","value","expression","ref"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/8699-8699.js.map.license b/dist/8699-8699.js.map.license deleted file mode 120000 index 28128fe7f1a27..0000000000000 --- a/dist/8699-8699.js.map.license +++ /dev/null @@ -1 +0,0 @@ -8699-8699.js.license \ No newline at end of file diff --git a/dist/systemtags-init.js b/dist/systemtags-init.js index 84ff2dc2515ef..219e055bac123 100644 --- a/dist/systemtags-init.js +++ b/dist/systemtags-init.js @@ -1,2 +1,2 @@ -(()=>{var t,e,n,i={3253:(t,e,n)=>{"use strict";var i=n(35810),r=n(85471),s=n(82680),o=n(85168),a=n(53334);const l='';async function d(t){const e=await new Promise((e=>{(0,o.Ss)((0,r.$V)((()=>Promise.all([n.e(4208),n.e(8699)]).then(n.bind(n,88699)))),{nodes:t},(t=>{e(t)}))}));return Array(t.length).fill(e)}const c=new i.hY({id:"systemtags:bulk",displayName:()=>(0,a.t)("systemtags","Manage tags"),iconSvgInline:()=>l,enabled:t=>!(0,s.f)()&&0!==t.length,exec:async t=>d([t])[0],execBatch:d});var u=n(61338),p=n(85072),h=n.n(p),f=n(97825),g=n.n(f),m=n(77659),E=n.n(m),w=n(55056),v=n.n(w),A=n(10540),y=n.n(A),N=n(41113),b=n.n(N),x=n(73911),I={};I.styleTagTransform=b(),I.setAttributes=v(),I.insert=E().bind(null,"head"),I.domAPI=g(),I.insertStyleElement=y(),h()(x.A,I),x.A&&x.A.locals&&x.A.locals;var O=n(12686);const _=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=document.createElement("li");return n.classList.add("files-list__system-tag"),n.textContent=t,e&&n.classList.add("files-list__system-tag--more"),n},T=async function(t){const e=(0,O.rA)(t),n=document.createElement("ul");if(n.classList.add("files-list__system-tags"),n.setAttribute("aria-label",(0,a.t)("files","Assigned collaborative tags")),n.setAttribute("data-systemtags-fileid",t.fileid?.toString()||""),0===e.length)return n;if(n.append(_(e[0])),2===e.length)n.append(_(e[1]));else if(e.length>1){const t=_("+"+(e.length-1),!0);t.setAttribute("title",e.slice(1).join(", ")),t.setAttribute("aria-hidden","true"),t.setAttribute("role","presentation"),n.append(t);for(const t of e.slice(1)){const e=_(t);e.classList.add("hidden-visually"),n.append(e)}}return n},C=new i.hY({id:"system-tags",displayName:()=>"",iconSvgInline:()=>"",enabled:t=>1===t.length,exec:async()=>null,renderInline:T,order:0});(0,u.B1)("systemtags:node:updated",(function(t){T(t).then((e=>{document.querySelectorAll(`[data-systemtags-fileid="${t.fileid}"]`).forEach((t=>{t.replaceWith(e)}))}))}));var R=n(21777),L=n(82528);const $="/systemtags",S=(0,i.H4)(),P=t=>(0,i.Al)(t),D=t=>`\n\n\t\n\t\t${(0,i.VX)()}\n\t\n\t\n\t\t${t}\n\t\n`,F=function(t){return new i.vd({id:t.id,source:`${i.PY}${$}/${t.id}`,owner:String((0,R.HW)()?.uid??"anonymous"),root:$,displayname:t.displayName,permissions:i.aX.READ,attributes:{...t,"is-tag":!0}})},M="tags",V=new i.hY({id:"systemtags:open-in-files",displayName:()=>(0,a.t)("systemtags","Open in Files"),iconSvgInline:()=>"",enabled:(t,e)=>e.id===M&&1===t.length&&!0!==t[0].attributes["is-tag"]&&t[0].type===i.pt.Folder,async exec(t){let e=t.dirname;return t.type===i.pt.Folder&&(e=t.path),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:String(t.fileid)},{dir:e,openfile:"true"}),null},order:-1e3,default:i.m9.HIDDEN});(0,i.Yc)("nc:system-tags"),(0,i.Gg)(c),(0,i.Gg)(C),(0,i.Gg)(V),(0,i.bh)().register(new i.Ss({id:M,name:(0,a.Tl)("systemtags","Tags"),caption:(0,a.Tl)("systemtags","List of tags and their associated files and folders."),emptyTitle:(0,a.Tl)("systemtags","No tags found"),emptyCaption:(0,a.Tl)("systemtags","Tags you have created will show up here."),icon:l,order:25,getContents:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const e=(await(0,L.un)()).filter((t=>t.userVisible));if("/"===t)return{folder:new i.vd({id:0,source:`${i.PY}${$}`,owner:(0,R.HW)()?.uid,root:$,permissions:i.aX.NONE}),contents:e.map(F)};const n=parseInt(t.split("/",2)[1]),r=e.find((t=>t.id===n));if(!r)throw new Error("Tag not found");return{folder:F(r),contents:(await S.getDirectoryContents(i.lJ,{details:!0,data:D(n),headers:{method:"REPORT"}})).data.map(P)}}}))},25631:(t,e,n)=>{"use strict";n.d(e,{v:()=>i});const i=(0,n(35947).YK)().setApp("systemtags").detectUser().build()},82528:(t,e,n)=>{"use strict";n.d(e,{T0:()=>p,VZ:()=>c,b0:()=>u,un:()=>l,xI:()=>d}),n(65043);var i=n(53334),r=n(8828),s=n(12686),o=n(25631);const a='\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n',l=async()=>{try{const{data:t}=await r.R.getDirectoryContents("/systemtags",{data:a,details:!0,glob:"/systemtags/*"});return(0,s.rL)(t)}catch(t){throw o.v.error((0,i.t)("systemtags","Failed to load tags"),{error:t}),new Error((0,i.t)("systemtags","Failed to load tags"))}},d=async t=>{const e="/systemtags/"+t;try{const{data:t}=await r.R.stat(e,{data:a,details:!0});return(0,s.rL)([t])[0]}catch(t){throw o.v.error((0,i.t)("systemtags","Failed to load tag"),{error:t}),new Error((0,i.t)("systemtags","Failed to load tag"))}},c=async t=>{const e=(0,s._3)(t);try{const{headers:t}=await r.R.customRequest("/systemtags",{method:"POST",data:e}),n=t.get("content-location");if(n)return(0,s.GX)(n);throw o.v.error((0,i.t)("systemtags",'Missing "Content-Location" header')),new Error((0,i.t)("systemtags",'Missing "Content-Location" header'))}catch(t){if(409===t?.response?.status)throw o.v.error((0,i.t)("systemtags","A tag with the same name already exists"),{error:t}),new Error((0,i.t)("systemtags","A tag with the same name already exists"));throw o.v.error((0,i.t)("systemtags","Failed to create tag"),{error:t}),new Error((0,i.t)("systemtags","Failed to create tag"))}},u=async function(t,e){const n=`/systemtags/${t.id}/${e}`,i=await r.R.stat(n,{data:'\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t',details:!0});return{etag:i?.data?.props?.getetag||'""',objects:Object.values(i?.data?.props?.["object-ids"]||[]).flat()}},p=async function(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const s=`/systemtags/${t.id}/${e}`;let o=`\n\t\n\t\t\n\t\t\t\n\t\t\t\t${n.map((t=>{let{id:e,type:n}=t;return`${e}${n}`})).join("")}\n\t\t\t\n\t\t\n\t`;0===n.length&&(o='\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t'),await r.R.customRequest(s,{method:"PROPPATCH",data:o,headers:{"if-match":i}})}},8828:(t,e,n)=>{"use strict";n.d(e,{R:()=>a});var i=n(60669),r=n(63814),s=n(21777);const o=(0,r.dC)("dav"),a=(0,i.UU)(o),l=t=>{a.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})};(0,s.zo)(l),l((0,s.do)())},12686:(t,e,n)=>{"use strict";n.d(e,{GX:()=>o,Pq:()=>d,_3:()=>a,rA:()=>l,rL:()=>s});var i=n(71654),r=n(85471);const s=t=>t.map((t=>{let{props:e}=t;return Object.fromEntries(Object.entries(e).map((t=>{let[e,n]=t;return[(0,i.A)(e),"displayName"===(0,i.A)(e)?String(n):n]})))})),o=t=>{const e=t.indexOf("?");e>0&&(t=t.substring(0,e));const n=t.split("/");let i;do{i=n[n.length-1],n.pop()}while(!i&&n.length>0);return Number(i)},a=t=>{if("name"in t&&!("displayName"in t))return{...t};const e={...t};return e.name=e.displayName,delete e.displayName,e},l=function(t){const e=t.attributes?.["system-tags"]?.["system-tag"];return void 0===e?[]:[e].flat()},d=function(t,e){r.Ay.set(t.attributes,"system-tags",{"system-tag":e})}},73911:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var i=n(71354),r=n.n(i),s=n(76314),o=n.n(s)()(r());o.push([t.id,".files-list__system-tags{--min-size: 32px;display:none;justify-content:center;align-items:center;min-width:calc(var(--min-size)*2);max-width:300px}.files-list__system-tag{padding:5px 10px;border:1px solid;border-radius:var(--border-radius-pill);border-color:var(--color-border);color:var(--color-text-maxcontrast);height:var(--min-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:22px;text-align:center}.files-list__system-tag--more{overflow:visible;text-overflow:initial}.files-list__system-tag+.files-list__system-tag{margin-inline-start:5px}@media(min-width: 512px){.files-list__system-tags{display:flex}}","",{version:3,sources:["webpack://./apps/systemtags/src/css/fileEntryInlineSystemTags.scss"],names:[],mappings:"AAKA,yBACC,gBAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,iCAAA,CACA,eAAA,CAGD,wBACC,gBAAA,CACA,gBAAA,CACA,uCAAA,CACA,gCAAA,CACA,mCAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,gBAAA,CACA,iBAAA,CAEA,8BACC,gBAAA,CACA,qBAAA,CAID,gDACC,uBAAA,CAIF,yBACC,yBACC,YAAA,CAAA",sourceRoot:""}]);const a=o},42634:()=>{},63779:()=>{},77199:()=>{},59169:()=>{},86833:()=>{},35810:(t,e,n)=>{"use strict";n.d(e,{Al:()=>M,CP:()=>b,Gg:()=>E,H4:()=>D,PY:()=>P,Q$:()=>F,R3:()=>I,Ss:()=>le,VL:()=>x,VX:()=>N,Yc:()=>y,aX:()=>w,bh:()=>X,hY:()=>m,lJ:()=>S,m9:()=>g,pt:()=>O,ur:()=>B,v7:()=>G,vd:()=>$});var i=n(35947),r=n(21777),s=n(43627),o=n(71225),a=n(63814),l=n(36117),d=n(44719),c=n(82680),u=n(53334),p=n(380),h=n(65606);const f=(0,i.YK)().setApp("@nextcloud/files").detectUser().build();var g=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(g||{});class m{_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 parent(){return this._action.parent}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("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(g).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 E=function(t){void 0===window._nc_fileactions&&(window._nc_fileactions=[],f.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?f.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)};var w=(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))(w||{});const v=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],A={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},y=function(t,e={nc:"http://nextcloud.org/ns"}){void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...v],window._nc_dav_namespaces={...A});const n={...window._nc_dav_namespaces,...e};return window._nc_dav_properties.find((e=>e===t))?(f.warn(`${t} already registered`,{prop:t}),!1):t.startsWith("<")||2!==t.split(":").length?(f.error(`${t} is not valid. See example: 'oc:fileid'`,{prop:t}),!1):n[t.split(":")[0]]?(window._nc_dav_properties.push(t),window._nc_dav_namespaces=n,!0):(f.error(`${t} namespace unknown`,{prop:t,namespaces:n}),!1)},N=function(){return void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...v]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},b=function(){return void 0===window._nc_dav_namespaces&&(window._nc_dav_namespaces={...A}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},x=function(){return`\n\t\t\n\t\t\t\n\t\t\t\t${N()}\n\t\t\t\n\t\t`},I=function(t){return`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${N()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,r.HW)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${t}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`};var O=(t=>(t.Folder="folder",t.File="file",t))(O||{});const _=function(t,e){return null!==t.match(e)},T=(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(t){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.displayname&&"string"!=typeof t.displayname)throw new Error("Invalid displayname type");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>=w.NONE&&t.permissions<=w.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&&_(t.source,e)){const n=t.source.match(e)[0];if(!t.source.includes((0,s.join)(n,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(C).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var C=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(C||{});class R{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(R.prototype)).filter((t=>"function"==typeof t[1].get&&"__proto__"!==t[0])).map((t=>t[0]));handler={set:(t,e,n)=>!this.readonlyAttributes.includes(e)&&Reflect.set(t,e,n),deleteProperty:(t,e)=>!this.readonlyAttributes.includes(e)&&Reflect.deleteProperty(t,e),get:(t,e,n)=>this.readonlyAttributes.includes(e)?(f.warn(`Accessing "Node.attributes.${e}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,e)):Reflect.get(t,e,n)};constructor(t,e){T(t,e||this._knownDavService),this._data={displayname:t.attributes?.displayname,...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.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,o.O0)(this.source.slice(t.length))}get basename(){return(0,s.basename)(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(t){this._data.displayname=t}get extension(){return(0,s.extname)(this.source)}get dirname(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),n=this.root.replace(/\/$/,"");return(0,s.dirname)(t.slice(e+n.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}set mtime(t){this._data.mtime=t}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:w.NONE:w.READ}set permissions(t){this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return _(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){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),n=this.root.replace(/\/$/,"");return t.slice(e+n.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){this._data.status=t}move(t){T({...this._data,source:t},this._knownDavService);const e=this.basename;this._data.source=t,this.displayname===e&&this.basename!==e&&(this.displayname=this.basename),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)}update(t){for(const[e,n]of Object.entries(t))try{void 0===n?delete this.attributes[e]:this.attributes[e]=n}catch(t){if(t instanceof TypeError)continue;throw t}}}class L extends R{get type(){return O.File}}class $ extends R{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return O.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const S=(0,c.f)()?`/files/${(0,c.G)()}`:`/files/${(0,r.HW)()?.uid}`,P=function(){const t=(0,a.dC)("dav");return(0,c.f)()?t.replace("remote.php","public.php"):t}(),D=function(t=P,e={}){const n=(0,d.UU)(t,{headers:e});function i(t){n.setHeaders({...e,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,r.zo)(i),i((0,r.do)()),(0,d.Gu)().patch("fetch",((t,e)=>{const n=e.headers;return n?.method&&(e.method=n.method,delete n.method),fetch(t,e)})),n},F=(t,e="/",n=S)=>{const i=new AbortController;return new l.CancelablePromise((async(r,s,o)=>{o((()=>i.abort()));try{r((await t.getDirectoryContents(`${n}${e}`,{signal:i.signal,details:!0,data:`\n\t\t\n\t\t\t\n\t\t\t\t${N()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>M(t,n))))}catch(t){s(t)}}))},M=function(t,e=S,n=P){let i=(0,r.HW)()?.uid;if((0,c.f)())i=i??"anonymous";else if(!i)throw new Error("No user id found");const s=t.props,o=function(t=""){let e=w.NONE;return t?((t.includes("C")||t.includes("K"))&&(e|=w.CREATE),t.includes("G")&&(e|=w.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=w.UPDATE),t.includes("D")&&(e|=w.DELETE),t.includes("R")&&(e|=w.SHARE),e):e}(s?.permissions),a=String(s?.["owner-id"]||i),l=s.fileid||0,d={id:l,source:`${n}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime||"application/octet-stream",displayname:void 0!==s.displayname?String(s.displayname):void 0,size:s?.size||Number.parseInt(s.getcontentlength||"0"),status:l<0?C.FAILED:void 0,permissions:o,owner:a,root:e,attributes:{...t,...s,hasPreview:s?.["has-preview"]}};return delete d.attributes?.props,"file"===t.type?new L(d):new $(d)};Error;const V=["B","KB","MB","GB","TB","PB"],j=["B","KiB","MiB","GiB","TiB","PiB"];function G(t,e=!1,n=!1,i=!1){n=n&&!i,"string"==typeof t&&(t=Number(t));let r=t>0?Math.floor(Math.log(t)/Math.log(i?1e3:1024)):0;r=Math.min((n?j.length:V.length)-1,r);const s=n?j[r]:V[r];let o=(t/Math.pow(i?1e3:1024,r)).toFixed(1);return!0===e&&0===r?("0.0"!==o?"< 1 ":"0 ")+(n?j[1]:V[1]):(o=r<2?parseFloat(o).toFixed(0):parseFloat(o).toLocaleString((0,u.lO)()),o+" "+s)}function k(t){return t instanceof Date?t.toISOString():String(t)}function B(t,e={}){const n={sortingMode:"basename",sortingOrder:"asc",...e};return function(t,e,n){n=n??[];const i=(e=e??[t=>t]).map(((t,e)=>"asc"===(n[e]??"asc")?1:-1)),r=Intl.Collator([(0,u.Z0)(),(0,u.lO)()],{numeric:!0,usage:"sort"});return[...t].sort(((t,n)=>{for(const[s,o]of e.entries()){const e=r.compare(k(o(t)),k(o(n)));if(0!==e)return e*i[s]}return 0}))}(t,[...n.sortFavoritesFirst?[t=>1!==t.attributes?.favorite]:[],...n.sortFoldersFirst?[t=>"folder"!==t.type]:[],..."basename"!==n.sortingMode?[t=>t[n.sortingMode]]:[],t=>{return(e=t.attributes?.displayname||t.basename).lastIndexOf(".")>0?e.slice(0,e.lastIndexOf(".")):e;var e},t=>t.basename],[...n.sortFavoritesFirst?["asc"]:[],...n.sortFoldersFirst?["asc"]:[],..."mtime"===n.sortingMode?["asc"===n.sortingOrder?"desc":"asc"]:[],..."mtime"!==n.sortingMode&&"basename"!==n.sortingMode?[n.sortingOrder]:[],n.sortingOrder,n.sortingOrder])}class U extends p.m{_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),this.dispatchTypedEvent("update",new CustomEvent("update"))}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&(this._views.splice(e,1),this.dispatchTypedEvent("update",new CustomEvent("update")))}setActive(t){this._currentView=t;const e=new CustomEvent("updateActive",{detail:t});this.dispatchTypedEvent("updateActive",e)}get active(){return this._currentView}get views(){return this._views}}const X=function(){return void 0===window._nc_navigation&&(window._nc_navigation=new U,f.debug("Navigation service initialized")),window._nc_navigation};class q{_column;constructor(t){H(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 H=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 z={},Y={};!function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+n+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,n){if(e){const i=Object.keys(e),r=i.length;for(let s=0;s5&&"xml"===i)return ot("InvalidXml","XML declaration allowed only at the start of the document.",lt(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function Q(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}z.validate=function(t,e){e=Object.assign({},K,e);const n=[];let i=!1,r=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let o=0;o"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)d+=t[o];if(d=d.trim(),"/"===d[d.length-1]&&(d=d.substring(0,d.length-1),o--),s=d,!W.isName(s)){let e;return e=0===d.trim().length?"Invalid space after '<'.":"Tag '"+d+"' is an invalid name.",ot("InvalidTag",e,lt(t,o))}const c=nt(t,o);if(!1===c)return ot("InvalidAttr","Attributes for '"+d+"' have open quote.",lt(t,o));let u=c.value;if(o=c.index,"/"===u[u.length-1]){const n=o-u.length;u=u.substring(0,u.length-1);const r=rt(u,e);if(!0!==r)return ot(r.err.code,r.err.msg,lt(t,n+r.err.line));i=!0}else if(l){if(!c.tagClosed)return ot("InvalidTag","Closing tag '"+d+"' doesn't have proper closing.",lt(t,o));if(u.trim().length>0)return ot("InvalidTag","Closing tag '"+d+"' can't have attributes or invalid starting.",lt(t,a));if(0===n.length)return ot("InvalidTag","Closing tag '"+d+"' has not been opened.",lt(t,a));{const e=n.pop();if(d!==e.tagName){let n=lt(t,e.tagStartPos);return ot("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+d+"'.",lt(t,a))}0==n.length&&(r=!0)}}else{const s=rt(u,e);if(!0!==s)return ot(s.err.code,s.err.msg,lt(t,o-u.length+s.err.line));if(!0===r)return ot("InvalidXml","Multiple possible root nodes found.",lt(t,o));-1!==e.unpairedTags.indexOf(d)||n.push({tagName:d,tagStartPos:a}),i=!0}for(o++;o0)||ot("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):ot("InvalidXml","Start tag expected.",1)};const tt='"',et="'";function nt(t,e){let n="",i="",r=!1;for(;e"===t[e]&&""===i){r=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:r}}const it=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function rt(t,e){const n=W.getAllMatches(t,it),i={};for(let t=0;t!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}};ct.buildOptions=function(t){return Object.assign({},ut,t)},ct.defaultOptions=ut;const pt=Y;function ht(t,e){let n="";for(;e0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}},It=function(t,e){const n={};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 i=1,r=!1,s=!1,o="";for(;e"===t[e]){if(s?"-"===t[e-1]&&"-"===t[e-2]&&(s=!1,i--):i--,0===i)break}else"["===t[e]?r=!0:o+=t[e];else{if(r&>(t,e))e+=7,[entityName,val,e]=ht(t,e+1),-1===val.indexOf("&")&&(n[vt(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(r&&mt(t,e))e+=8;else if(r&&Et(t,e))e+=8;else if(r&&wt(t,e))e+=9;else{if(!ft)throw new Error("Invalid DOCTYPE");s=!0}i++,o=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}},Ot=function(t,e={}){if(e=Object.assign({},Nt,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if(e.hex&&At.test(n))return Number.parseInt(n,16);{const r=yt.exec(n);if(r){const s=r[1],o=r[2];let a=(i=r[3])&&-1!==i.indexOf(".")?("."===(i=i.replace(/0+$/,""))?i="0":"."===i[0]?i="0"+i:"."===i[i.length-1]&&(i=i.substr(0,i.length-1)),i):i;const l=r[4]||r[6];if(!e.leadingZeros&&o.length>0&&s&&"."!==n[2])return t;if(!e.leadingZeros&&o.length>0&&!s&&"."!==n[1])return t;{const i=Number(n),r=""+i;return-1!==r.search(/[eE]/)||l?e.eNotation?i:t:-1!==n.indexOf(".")?"0"===r&&""===a||r===a||s&&r==="-"+a?i:t:o?a===r||s+a===r?i:t:n===r||n===s+r?i:t}}return t}var i};function _t(t){const e=Object.keys(t);for(let n=0;n0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,r,s);return null==i?t:typeof i!=typeof t||i!==t?i:this.options.trimValues||t.trim()===t?Gt(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function Ct(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const Rt=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Lt(t,e,n){if(!this.options.ignoreAttributes&&"string"==typeof t){const n=bt.getAllMatches(t,Rt),i=n.length,r={};for(let t=0;t",s,"Closing Tag is not closed.");let o=t.substring(s+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(i=this.saveTextToParentTag(i,n,r));const a=r.substring(r.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: `);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),n=this.tagsNodeStack.pop(),i="",s=e}else if("?"===t[s+1]){let e=Vt(t,s,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,r),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new xt(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,r,e.tagName)),this.addChild(n,t,r)}s=e.closeIndex+1}else if("!--"===t.substr(s+1,3)){const e=Mt(t,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(s+4,e-2);i=this.saveTextToParentTag(i,n,r),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}s=e}else if("!D"===t.substr(s+1,2)){const e=It(t,s);this.docTypeEntities=e.entities,s=e.i}else if("!["===t.substr(s+1,2)){const e=Mt(t,"]]>",s,"CDATA is not closed.")-2,o=t.substring(s+9,e);i=this.saveTextToParentTag(i,n,r);let a=this.parseTextData(o,n.tagname,r,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):n.add(this.options.textNodeName,a),s=e+2}else{let o=Vt(t,s,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let d=o.tagExp,c=o.attrExpPresent,u=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,r,!1));const p=n;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=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(d.length>0&&d.lastIndexOf("/")===d.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),d=a):d=d.substr(0,d.length-1),s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))s=o.closeIndex;else{const n=this.readStopNodeData(t,l,u+1);if(!n)throw new Error(`Unexpected end of ${l}`);s=n.i,e=n.tagContent}const i=new xt(a);a!==d&&c&&(i[":@"]=this.buildAttributesMap(d,r,a)),e&&(e=this.parseTextData(e,a,r,!0,c,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,r)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),d=a):d=d.substr(0,d.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new xt(a);a!==d&&c&&(t[":@"]=this.buildAttributesMap(d,r,a)),this.addChild(n,t,r),r=r.substr(0,r.lastIndexOf("."))}else{const t=new xt(a);this.tagsNodeStack.push(n),a!==d&&c&&(t[":@"]=this.buildAttributesMap(d,r,a)),this.addChild(n,t,r),n=t}i="",s=u}}else i+=t[s];return e.child};function St(t,e,n){const i=this.options.updateTag(e.tagname,n,e[":@"]);!1===i||("string"==typeof i?(e.tagname=i,t.addChild(e)):t.addChild(e))}const Pt=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function Dt(t,e,n,i){return t&&(void 0===i&&(i=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Ft(t,e,n){const i="*."+n;for(const n in t){const r=t[n];if(i===r||e===r)return!0}return!1}function Mt(t,e,n,i){const r=t.indexOf(e,n);if(-1===r)throw new Error(i);return r+e.length-1}function Vt(t,e,n,i=">"){const r=function(t,e,n=">"){let i,r="";for(let s=e;s",n,`${e} is not closed`);if(t.substring(n+2,s).trim()===e&&(r--,0===r))return{tagContent:t.substring(i,n),i:s};n=s}else if("?"===t[n+1])n=Mt(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=Mt(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=Mt(t,"]]>",n,"StopNode is not closed.")-2;else{const i=Vt(t,n,">");i&&((i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&r++,n=i.closeIndex)}}function Gt(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&Ot(t,n)}return bt.isExist(t)?t:""}var kt={};function Bt(t,e,n){let i;const r={};for(let s=0;s0&&(r[e.textNodeName]=i):void 0!==i&&(r[e.textNodeName]=i),r}function Ut(t){const e=Object.keys(t);for(let t=0;t"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=_t,this.parseXml=$t,this.parseTextData=Tt,this.resolveNameSpace=Ct,this.buildAttributesMap=Lt,this.isItStopNode=Ft,this.replaceEntitiesValue=Pt,this.readStopNodeData=jt,this.saveTextToParentTag=Dt,this.addChild=St}},{prettify:Yt}=kt,Wt=z;function Kt(t,e,n,i){let r="",s=!1;for(let o=0;o`,s=!1;continue}if(l===e.commentPropName){r+=i+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const t=Jt(a[":@"],e),n="?xml"===l?"":i;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",r+=n+`<${l}${o}${t}?>`,s=!0;continue}let c=i;""!==c&&(c+=e.indentBy);const u=i+`<${l}${Jt(a[":@"],e)}`,p=Kt(a[l],e,d,c);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?r+=u+">":r+=u+"/>":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(">")?r+=u+`>${p}${i}`:(r+=u+">",p&&""!==i&&(p.includes("/>")||p.includes("`):r+=u+"/>",s=!0}return r}function Zt(t){const e=Object.keys(t);for(let n=0;n0&&e.processEntities)for(let n=0;n0&&(n="\n"),Kt(t,e,"",n)},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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function ie(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=oe),this.processTextOrObjNode=re,this.options.format?(this.indentate=se,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function re(t,e,n){const i=this.j2x(t,n+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,n):this.buildObjectNode(i.val,e,i.attrStr,n)}function se(t){return this.options.indentBy.repeat(t)}function oe(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}ie.prototype.build=function(t){return this.options.preserveOrder?ee(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},ie.prototype.j2x=function(t,e){let n="",i="";for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r))if(void 0===t[r])this.isAttribute(r)&&(i+="");else if(null===t[r])this.isAttribute(r)?i+="":"?"===r[0]?i+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+r+"/"+this.tagEndChar;else if(t[r]instanceof Date)i+=this.buildTextValNode(t[r],r,"",e);else if("object"!=typeof t[r]){const s=this.isAttribute(r);if(s)n+=this.buildAttrPairStr(s,""+t[r]);else if(r===this.options.textNodeName){let e=this.options.tagValueProcessor(r,""+t[r]);i+=this.replaceEntitiesValue(e)}else i+=this.buildTextValNode(t[r],r,"",e)}else if(Array.isArray(t[r])){const n=t[r].length;let s="",o="";for(let a=0;a"+t+r}},ie.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),""===r?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+r+"0&&this.options.processEntities)for(let e=0;e0&&(!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)return!1;if(!0!==ae.XMLValidator.validate(t))return!1;let e;const n=new ae.XMLParser;try{e=n.parse(t)}catch{return!1}return!!e&&!!Object.keys(e).some((t=>"svg"===t.toLowerCase()))}(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 must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof q))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");if(t.loadChildViews&&"function"!=typeof t.loadChildViews)throw new Error("View loadChildViews must be a function");return!0};var ce="object"==typeof h&&h.env&&h.env.NODE_DEBUG&&/\bsemver\b/i.test(h.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{},ue={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},pe={exports:{}};!function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=ue,s=ce,o=(e=t.exports={}).re=[],a=e.safeRe=[],l=e.src=[],d=e.t={};let c=0;const u="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",r],[u,i]],h=(t,e,n)=>{const i=(t=>{for(const[e,n]of p)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t})(e),r=c++;s(t,r,e),d[t]=r,l[r]=e,o[r]=new RegExp(e,n?"g":void 0),a[r]=new RegExp(i,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),h("MAINVERSION",`(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${l[d.NUMERICIDENTIFIER]}|${l[d.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${l[d.NUMERICIDENTIFIERLOOSE]}|${l[d.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${l[d.PRERELEASEIDENTIFIER]}(?:\\.${l[d.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${l[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[d.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${u}+`),h("BUILD",`(?:\\+(${l[d.BUILDIDENTIFIER]}(?:\\.${l[d.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${l[d.MAINVERSION]}${l[d.PRERELEASE]}?${l[d.BUILD]}?`),h("FULL",`^${l[d.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${l[d.MAINVERSIONLOOSE]}${l[d.PRERELEASELOOSE]}?${l[d.BUILD]}?`),h("LOOSE",`^${l[d.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${l[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${l[d.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:${l[d.PRERELEASE]})?${l[d.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:${l[d.PRERELEASELOOSE]})?${l[d.BUILD]}?)?)?`),h("XRANGE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${l[d.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",l[d.COERCEPLAIN]+`(?:${l[d.PRERELEASE]})?(?:${l[d.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",l[d.COERCE],!0),h("COERCERTLFULL",l[d.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${l[d.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",h("TILDE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${l[d.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",h("CARET",`^${l[d.LONECARET]}${l[d.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${l[d.LONECARET]}${l[d.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${l[d.GTLT]}\\s*(${l[d.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]}|${l[d.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${l[d.XRANGEPLAIN]})\\s+-\\s+(${l[d.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${l[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[d.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(pe,pe.exports);var he=pe.exports;Object.freeze({loose:!0}),Object.freeze({});const fe=/^[0-9]+$/,ge=(t,e)=>{const n=fe.test(t),i=fe.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:tge(e,t)};const{MAX_LENGTH:Ee,MAX_SAFE_INTEGER:we}=ue,{safeRe:ve,t:Ae}=he,{compareIdentifiers:ye}=me;p.m},71654:(t,e,n)=>{"use strict";n.d(e,{A:()=>f});const i=/[\p{Lu}]/u,r=/[\p{Ll}]/u,s=/^[\p{Lu}](?![\p{Lu}])/gu,o=/([\p{Alpha}\p{N}_]|$)/u,a=/[_.\- ]+/,l=new RegExp("^"+a.source),d=new RegExp(a.source+o.source,"gu"),c=new RegExp("\\d+"+o.source,"gu"),u=(t,e,n,s)=>{let o=!1,a=!1,l=!1,d=!1;for(let c=0;c2)||"-"===t[c-3],o&&i.test(u)?(t=t.slice(0,c)+"-"+t.slice(c),o=!1,l=a,a=!0,c++):a&&l&&r.test(u)&&(!d||s)?(t=t.slice(0,c-1)+"-"+t.slice(c-1),l=a,a=!1,o=!0):(o=e(u)===u&&n(u)!==u,l=a,a=n(u)===u&&e(u)!==u)}return t},p=(t,e)=>(s.lastIndex=0,t.replaceAll(s,(t=>e(t)))),h=(t,e)=>(d.lastIndex=0,c.lastIndex=0,t.replaceAll(c,((n,i,r)=>["_","-"].includes(t.charAt(r+n.length))?n:e(n))).replaceAll(d,((t,n)=>e(n))));function f(t,e){if("string"!=typeof t&&!Array.isArray(t))throw new TypeError("Expected the input to be `string | string[]`");if(e={pascalCase:!1,preserveConsecutiveUppercase:!1,...e},0===(t=Array.isArray(t)?t.map((t=>t.trim())).filter((t=>t.length)).join("-"):t.trim()).length)return"";const n=!1===e.locale?t=>t.toLowerCase():t=>t.toLocaleLowerCase(e.locale),i=!1===e.locale?t=>t.toUpperCase():t=>t.toLocaleUpperCase(e.locale);return 1===t.length?a.test(t)?"":e.pascalCase?i(t):n(t):(t!==n(t)&&(t=u(t,n,i,e.preserveConsecutiveUppercase)),t=t.replace(l,""),t=e.preserveConsecutiveUppercase?p(t,n):n(t),e.pascalCase&&(t=i(t.charAt(0))+t.slice(1)),h(t,i))}}},r={};function s(t){var e=r[t];if(void 0!==e)return e.exports;var n=r[t]={id:t,loaded:!1,exports:{}};return i[t].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=i,t=[],s.O=(e,n,i,r)=>{if(!n){var o=1/0;for(c=0;c=r)&&Object.keys(s.O).every((t=>s.O[t](n[l])))?n.splice(l--,1):(a=!1,r0&&t[c-1][2]>r;c--)t[c]=t[c-1];t[c]=[n,i,r]},s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.f={},s.e=t=>Promise.all(Object.keys(s.f).reduce(((e,n)=>(s.f[n](t,e),e)),[])),s.u=t=>t+"-"+t+".js?v="+{802:"387187865bf364bcd145",8699:"6b7a12a16e2a8dae7313",9291:"077955af818a227340aa"}[t],s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),e={},n="nextcloud:",s.l=(t,i,r,o)=>{if(e[t])e[t].push(i);else{var a,l;if(void 0!==r)for(var d=document.getElementsByTagName("script"),c=0;c{a.onerror=a.onload=null,clearTimeout(h);var r=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((t=>t(i))),n)return n(i)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),s.j=2766,(()=>{var t;s.g.importScripts&&(t=s.g.location+"");var e=s.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&(!t||!/^http(s?):/.test(t));)t=n[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=t})(),(()=>{s.b=document.baseURI||self.location.href;var t={2766:0};s.f.j=(e,n)=>{var i=s.o(t,e)?t[e]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise(((n,r)=>i=t[e]=[n,r]));n.push(i[2]=r);var o=s.p+s.u(e),a=new Error;s.l(o,(n=>{if(s.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",a.name="ChunkLoadError",a.type=r,a.request=o,i[1](a)}}),"chunk-"+e,e)}},s.O.j=e=>0===t[e];var e=(e,n)=>{var i,r,o=n[0],a=n[1],l=n[2],d=0;if(o.some((e=>0!==t[e]))){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);if(l)var c=l(s)}for(e&&e(n);ds(3253)));o=s.O(o)})(); -//# sourceMappingURL=systemtags-init.js.map?v=781ed6f5340ae866c66e \ No newline at end of file +(()=>{var t,e,n,i={3253:(t,e,n)=>{"use strict";var i=n(35810),r=n(85471),s=n(82680),o=n(85168),a=n(53334);const l='';async function d(t){const e=await new Promise((e=>{(0,o.Ss)((0,r.$V)((()=>Promise.all([n.e(4208),n.e(6028)]).then(n.bind(n,16028)))),{nodes:t},(t=>{e(t)}))}));return Array(t.length).fill(e)}const c=new i.hY({id:"systemtags:bulk",displayName:()=>(0,a.t)("systemtags","Manage tags"),iconSvgInline:()=>l,enabled:t=>!(0,s.f)()&&0!==t.length,exec:async t=>d([t])[0],execBatch:d});var u=n(61338),p=n(85072),h=n.n(p),f=n(97825),g=n.n(f),m=n(77659),E=n.n(m),w=n(55056),v=n.n(w),A=n(10540),y=n.n(A),N=n(41113),b=n.n(N),x=n(73911),I={};I.styleTagTransform=b(),I.setAttributes=v(),I.insert=E().bind(null,"head"),I.domAPI=g(),I.insertStyleElement=y(),h()(x.A,I),x.A&&x.A.locals&&x.A.locals;var O=n(12686);const _=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=document.createElement("li");return n.classList.add("files-list__system-tag"),n.textContent=t,e&&n.classList.add("files-list__system-tag--more"),n},T=async function(t){const e=(0,O.rA)(t),n=document.createElement("ul");if(n.classList.add("files-list__system-tags"),n.setAttribute("aria-label",(0,a.t)("files","Assigned collaborative tags")),n.setAttribute("data-systemtags-fileid",t.fileid?.toString()||""),0===e.length)return n;if(n.append(_(e[0])),2===e.length)n.append(_(e[1]));else if(e.length>1){const t=_("+"+(e.length-1),!0);t.setAttribute("title",e.slice(1).join(", ")),t.setAttribute("aria-hidden","true"),t.setAttribute("role","presentation"),n.append(t);for(const t of e.slice(1)){const e=_(t);e.classList.add("hidden-visually"),n.append(e)}}return n},C=new i.hY({id:"system-tags",displayName:()=>"",iconSvgInline:()=>"",enabled:t=>1===t.length,exec:async()=>null,renderInline:T,order:0});(0,u.B1)("systemtags:node:updated",(function(t){T(t).then((e=>{document.querySelectorAll(`[data-systemtags-fileid="${t.fileid}"]`).forEach((t=>{t.replaceWith(e)}))}))}));var R=n(21777),L=n(82528);const $="/systemtags",S=(0,i.H4)(),P=t=>(0,i.Al)(t),D=t=>`\n\n\t\n\t\t${(0,i.VX)()}\n\t\n\t\n\t\t${t}\n\t\n`,F=function(t){return new i.vd({id:t.id,source:`${i.PY}${$}/${t.id}`,owner:String((0,R.HW)()?.uid??"anonymous"),root:$,displayname:t.displayName,permissions:i.aX.READ,attributes:{...t,"is-tag":!0}})},M="tags",V=new i.hY({id:"systemtags:open-in-files",displayName:()=>(0,a.t)("systemtags","Open in Files"),iconSvgInline:()=>"",enabled:(t,e)=>e.id===M&&1===t.length&&!0!==t[0].attributes["is-tag"]&&t[0].type===i.pt.Folder,async exec(t){let e=t.dirname;return t.type===i.pt.Folder&&(e=t.path),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:String(t.fileid)},{dir:e,openfile:"true"}),null},order:-1e3,default:i.m9.HIDDEN});(0,i.Yc)("nc:system-tags"),(0,i.Gg)(c),(0,i.Gg)(C),(0,i.Gg)(V),(0,i.bh)().register(new i.Ss({id:M,name:(0,a.Tl)("systemtags","Tags"),caption:(0,a.Tl)("systemtags","List of tags and their associated files and folders."),emptyTitle:(0,a.Tl)("systemtags","No tags found"),emptyCaption:(0,a.Tl)("systemtags","Tags you have created will show up here."),icon:l,order:25,getContents:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const e=(await(0,L.un)()).filter((t=>t.userVisible));if("/"===t)return{folder:new i.vd({id:0,source:`${i.PY}${$}`,owner:(0,R.HW)()?.uid,root:$,permissions:i.aX.NONE}),contents:e.map(F)};const n=parseInt(t.split("/",2)[1]),r=e.find((t=>t.id===n));if(!r)throw new Error("Tag not found");return{folder:F(r),contents:(await S.getDirectoryContents(i.lJ,{details:!0,data:D(n),headers:{method:"REPORT"}})).data.map(P)}}}))},25631:(t,e,n)=>{"use strict";n.d(e,{v:()=>i});const i=(0,n(35947).YK)().setApp("systemtags").detectUser().build()},82528:(t,e,n)=>{"use strict";n.d(e,{T0:()=>p,VZ:()=>c,b0:()=>u,un:()=>l,xI:()=>d}),n(65043);var i=n(53334),r=n(8828),s=n(12686),o=n(25631);const a='\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n',l=async()=>{try{const{data:t}=await r.R.getDirectoryContents("/systemtags",{data:a,details:!0,glob:"/systemtags/*"});return(0,s.rL)(t)}catch(t){throw o.v.error((0,i.t)("systemtags","Failed to load tags"),{error:t}),new Error((0,i.t)("systemtags","Failed to load tags"))}},d=async t=>{const e="/systemtags/"+t;try{const{data:t}=await r.R.stat(e,{data:a,details:!0});return(0,s.rL)([t])[0]}catch(t){throw o.v.error((0,i.t)("systemtags","Failed to load tag"),{error:t}),new Error((0,i.t)("systemtags","Failed to load tag"))}},c=async t=>{const e=(0,s._3)(t);try{const{headers:t}=await r.R.customRequest("/systemtags",{method:"POST",data:e}),n=t.get("content-location");if(n)return(0,s.GX)(n);throw o.v.error((0,i.t)("systemtags",'Missing "Content-Location" header')),new Error((0,i.t)("systemtags",'Missing "Content-Location" header'))}catch(t){if(409===t?.response?.status)throw o.v.error((0,i.t)("systemtags","A tag with the same name already exists"),{error:t}),new Error((0,i.t)("systemtags","A tag with the same name already exists"));throw o.v.error((0,i.t)("systemtags","Failed to create tag"),{error:t}),new Error((0,i.t)("systemtags","Failed to create tag"))}},u=async function(t,e){const n=`/systemtags/${t.id}/${e}`,i=await r.R.stat(n,{data:'\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t',details:!0});return{etag:i?.data?.props?.getetag||'""',objects:Object.values(i?.data?.props?.["object-ids"]||[]).flat()}},p=async function(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const s=`/systemtags/${t.id}/${e}`;let o=`\n\t\n\t\t\n\t\t\t\n\t\t\t\t${n.map((t=>{let{id:e,type:n}=t;return`${e}${n}`})).join("")}\n\t\t\t\n\t\t\n\t`;0===n.length&&(o='\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t'),await r.R.customRequest(s,{method:"PROPPATCH",data:o,headers:{"if-match":i}})}},8828:(t,e,n)=>{"use strict";n.d(e,{R:()=>a});var i=n(60669),r=n(63814),s=n(21777);const o=(0,r.dC)("dav"),a=(0,i.UU)(o),l=t=>{a.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})};(0,s.zo)(l),l((0,s.do)())},12686:(t,e,n)=>{"use strict";n.d(e,{GX:()=>o,Pq:()=>d,_3:()=>a,rA:()=>l,rL:()=>s});var i=n(71654),r=n(85471);const s=t=>t.map((t=>{let{props:e}=t;return Object.fromEntries(Object.entries(e).map((t=>{let[e,n]=t;return[(0,i.A)(e),"displayName"===(0,i.A)(e)?String(n):n]})))})),o=t=>{const e=t.indexOf("?");e>0&&(t=t.substring(0,e));const n=t.split("/");let i;do{i=n[n.length-1],n.pop()}while(!i&&n.length>0);return Number(i)},a=t=>{if("name"in t&&!("displayName"in t))return{...t};const e={...t};return e.name=e.displayName,delete e.displayName,e},l=function(t){const e=t.attributes?.["system-tags"]?.["system-tag"];return void 0===e?[]:[e].flat()},d=function(t,e){r.Ay.set(t.attributes,"system-tags",{"system-tag":e})}},73911:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var i=n(71354),r=n.n(i),s=n(76314),o=n.n(s)()(r());o.push([t.id,".files-list__system-tags{--min-size: 32px;display:none;justify-content:center;align-items:center;min-width:calc(var(--min-size)*2);max-width:300px}.files-list__system-tag{padding:5px 10px;border:1px solid;border-radius:var(--border-radius-pill);border-color:var(--color-border);color:var(--color-text-maxcontrast);height:var(--min-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:22px;text-align:center}.files-list__system-tag--more{overflow:visible;text-overflow:initial}.files-list__system-tag+.files-list__system-tag{margin-inline-start:5px}@media(min-width: 512px){.files-list__system-tags{display:flex}}","",{version:3,sources:["webpack://./apps/systemtags/src/css/fileEntryInlineSystemTags.scss"],names:[],mappings:"AAKA,yBACC,gBAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,iCAAA,CACA,eAAA,CAGD,wBACC,gBAAA,CACA,gBAAA,CACA,uCAAA,CACA,gCAAA,CACA,mCAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,gBAAA,CACA,iBAAA,CAEA,8BACC,gBAAA,CACA,qBAAA,CAID,gDACC,uBAAA,CAIF,yBACC,yBACC,YAAA,CAAA",sourceRoot:""}]);const a=o},42634:()=>{},63779:()=>{},77199:()=>{},59169:()=>{},86833:()=>{},35810:(t,e,n)=>{"use strict";n.d(e,{Al:()=>M,CP:()=>b,Gg:()=>E,H4:()=>D,PY:()=>P,Q$:()=>F,R3:()=>I,Ss:()=>le,VL:()=>x,VX:()=>N,Yc:()=>y,aX:()=>w,bh:()=>X,hY:()=>m,lJ:()=>S,m9:()=>g,pt:()=>O,ur:()=>B,v7:()=>G,vd:()=>$});var i=n(35947),r=n(21777),s=n(43627),o=n(71225),a=n(63814),l=n(36117),d=n(44719),c=n(82680),u=n(53334),p=n(380),h=n(65606);const f=(0,i.YK)().setApp("@nextcloud/files").detectUser().build();var g=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(g||{});class m{_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 parent(){return this._action.parent}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("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(g).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 E=function(t){void 0===window._nc_fileactions&&(window._nc_fileactions=[],f.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?f.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)};var w=(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))(w||{});const v=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],A={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},y=function(t,e={nc:"http://nextcloud.org/ns"}){void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...v],window._nc_dav_namespaces={...A});const n={...window._nc_dav_namespaces,...e};return window._nc_dav_properties.find((e=>e===t))?(f.warn(`${t} already registered`,{prop:t}),!1):t.startsWith("<")||2!==t.split(":").length?(f.error(`${t} is not valid. See example: 'oc:fileid'`,{prop:t}),!1):n[t.split(":")[0]]?(window._nc_dav_properties.push(t),window._nc_dav_namespaces=n,!0):(f.error(`${t} namespace unknown`,{prop:t,namespaces:n}),!1)},N=function(){return void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...v]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},b=function(){return void 0===window._nc_dav_namespaces&&(window._nc_dav_namespaces={...A}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},x=function(){return`\n\t\t\n\t\t\t\n\t\t\t\t${N()}\n\t\t\t\n\t\t`},I=function(t){return`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${N()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,r.HW)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${t}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`};var O=(t=>(t.Folder="folder",t.File="file",t))(O||{});const _=function(t,e){return null!==t.match(e)},T=(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(t){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.displayname&&"string"!=typeof t.displayname)throw new Error("Invalid displayname type");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>=w.NONE&&t.permissions<=w.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&&_(t.source,e)){const n=t.source.match(e)[0];if(!t.source.includes((0,s.join)(n,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(C).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var C=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(C||{});class R{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(R.prototype)).filter((t=>"function"==typeof t[1].get&&"__proto__"!==t[0])).map((t=>t[0]));handler={set:(t,e,n)=>!this.readonlyAttributes.includes(e)&&Reflect.set(t,e,n),deleteProperty:(t,e)=>!this.readonlyAttributes.includes(e)&&Reflect.deleteProperty(t,e),get:(t,e,n)=>this.readonlyAttributes.includes(e)?(f.warn(`Accessing "Node.attributes.${e}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,e)):Reflect.get(t,e,n)};constructor(t,e){T(t,e||this._knownDavService),this._data={displayname:t.attributes?.displayname,...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.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,o.O0)(this.source.slice(t.length))}get basename(){return(0,s.basename)(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(t){this._data.displayname=t}get extension(){return(0,s.extname)(this.source)}get dirname(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),n=this.root.replace(/\/$/,"");return(0,s.dirname)(t.slice(e+n.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}set mtime(t){this._data.mtime=t}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:w.NONE:w.READ}set permissions(t){this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return _(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){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),n=this.root.replace(/\/$/,"");return t.slice(e+n.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){this._data.status=t}move(t){T({...this._data,source:t},this._knownDavService);const e=this.basename;this._data.source=t,this.displayname===e&&this.basename!==e&&(this.displayname=this.basename),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)}update(t){for(const[e,n]of Object.entries(t))try{void 0===n?delete this.attributes[e]:this.attributes[e]=n}catch(t){if(t instanceof TypeError)continue;throw t}}}class L extends R{get type(){return O.File}}class $ extends R{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return O.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const S=(0,c.f)()?`/files/${(0,c.G)()}`:`/files/${(0,r.HW)()?.uid}`,P=function(){const t=(0,a.dC)("dav");return(0,c.f)()?t.replace("remote.php","public.php"):t}(),D=function(t=P,e={}){const n=(0,d.UU)(t,{headers:e});function i(t){n.setHeaders({...e,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,r.zo)(i),i((0,r.do)()),(0,d.Gu)().patch("fetch",((t,e)=>{const n=e.headers;return n?.method&&(e.method=n.method,delete n.method),fetch(t,e)})),n},F=(t,e="/",n=S)=>{const i=new AbortController;return new l.CancelablePromise((async(r,s,o)=>{o((()=>i.abort()));try{r((await t.getDirectoryContents(`${n}${e}`,{signal:i.signal,details:!0,data:`\n\t\t\n\t\t\t\n\t\t\t\t${N()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>M(t,n))))}catch(t){s(t)}}))},M=function(t,e=S,n=P){let i=(0,r.HW)()?.uid;if((0,c.f)())i=i??"anonymous";else if(!i)throw new Error("No user id found");const s=t.props,o=function(t=""){let e=w.NONE;return t?((t.includes("C")||t.includes("K"))&&(e|=w.CREATE),t.includes("G")&&(e|=w.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=w.UPDATE),t.includes("D")&&(e|=w.DELETE),t.includes("R")&&(e|=w.SHARE),e):e}(s?.permissions),a=String(s?.["owner-id"]||i),l=s.fileid||0,d={id:l,source:`${n}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime||"application/octet-stream",displayname:void 0!==s.displayname?String(s.displayname):void 0,size:s?.size||Number.parseInt(s.getcontentlength||"0"),status:l<0?C.FAILED:void 0,permissions:o,owner:a,root:e,attributes:{...t,...s,hasPreview:s?.["has-preview"]}};return delete d.attributes?.props,"file"===t.type?new L(d):new $(d)};Error;const V=["B","KB","MB","GB","TB","PB"],j=["B","KiB","MiB","GiB","TiB","PiB"];function G(t,e=!1,n=!1,i=!1){n=n&&!i,"string"==typeof t&&(t=Number(t));let r=t>0?Math.floor(Math.log(t)/Math.log(i?1e3:1024)):0;r=Math.min((n?j.length:V.length)-1,r);const s=n?j[r]:V[r];let o=(t/Math.pow(i?1e3:1024,r)).toFixed(1);return!0===e&&0===r?("0.0"!==o?"< 1 ":"0 ")+(n?j[1]:V[1]):(o=r<2?parseFloat(o).toFixed(0):parseFloat(o).toLocaleString((0,u.lO)()),o+" "+s)}function k(t){return t instanceof Date?t.toISOString():String(t)}function B(t,e={}){const n={sortingMode:"basename",sortingOrder:"asc",...e};return function(t,e,n){n=n??[];const i=(e=e??[t=>t]).map(((t,e)=>"asc"===(n[e]??"asc")?1:-1)),r=Intl.Collator([(0,u.Z0)(),(0,u.lO)()],{numeric:!0,usage:"sort"});return[...t].sort(((t,n)=>{for(const[s,o]of e.entries()){const e=r.compare(k(o(t)),k(o(n)));if(0!==e)return e*i[s]}return 0}))}(t,[...n.sortFavoritesFirst?[t=>1!==t.attributes?.favorite]:[],...n.sortFoldersFirst?[t=>"folder"!==t.type]:[],..."basename"!==n.sortingMode?[t=>t[n.sortingMode]]:[],t=>{return(e=t.attributes?.displayname||t.basename).lastIndexOf(".")>0?e.slice(0,e.lastIndexOf(".")):e;var e},t=>t.basename],[...n.sortFavoritesFirst?["asc"]:[],...n.sortFoldersFirst?["asc"]:[],..."mtime"===n.sortingMode?["asc"===n.sortingOrder?"desc":"asc"]:[],..."mtime"!==n.sortingMode&&"basename"!==n.sortingMode?[n.sortingOrder]:[],n.sortingOrder,n.sortingOrder])}class U extends p.m{_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),this.dispatchTypedEvent("update",new CustomEvent("update"))}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&(this._views.splice(e,1),this.dispatchTypedEvent("update",new CustomEvent("update")))}setActive(t){this._currentView=t;const e=new CustomEvent("updateActive",{detail:t});this.dispatchTypedEvent("updateActive",e)}get active(){return this._currentView}get views(){return this._views}}const X=function(){return void 0===window._nc_navigation&&(window._nc_navigation=new U,f.debug("Navigation service initialized")),window._nc_navigation};class q{_column;constructor(t){H(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 H=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 z={},Y={};!function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+n+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,n){if(e){const i=Object.keys(e),r=i.length;for(let s=0;s5&&"xml"===i)return ot("InvalidXml","XML declaration allowed only at the start of the document.",lt(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function Q(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}z.validate=function(t,e){e=Object.assign({},K,e);const n=[];let i=!1,r=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let o=0;o"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)d+=t[o];if(d=d.trim(),"/"===d[d.length-1]&&(d=d.substring(0,d.length-1),o--),s=d,!W.isName(s)){let e;return e=0===d.trim().length?"Invalid space after '<'.":"Tag '"+d+"' is an invalid name.",ot("InvalidTag",e,lt(t,o))}const c=nt(t,o);if(!1===c)return ot("InvalidAttr","Attributes for '"+d+"' have open quote.",lt(t,o));let u=c.value;if(o=c.index,"/"===u[u.length-1]){const n=o-u.length;u=u.substring(0,u.length-1);const r=rt(u,e);if(!0!==r)return ot(r.err.code,r.err.msg,lt(t,n+r.err.line));i=!0}else if(l){if(!c.tagClosed)return ot("InvalidTag","Closing tag '"+d+"' doesn't have proper closing.",lt(t,o));if(u.trim().length>0)return ot("InvalidTag","Closing tag '"+d+"' can't have attributes or invalid starting.",lt(t,a));if(0===n.length)return ot("InvalidTag","Closing tag '"+d+"' has not been opened.",lt(t,a));{const e=n.pop();if(d!==e.tagName){let n=lt(t,e.tagStartPos);return ot("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+d+"'.",lt(t,a))}0==n.length&&(r=!0)}}else{const s=rt(u,e);if(!0!==s)return ot(s.err.code,s.err.msg,lt(t,o-u.length+s.err.line));if(!0===r)return ot("InvalidXml","Multiple possible root nodes found.",lt(t,o));-1!==e.unpairedTags.indexOf(d)||n.push({tagName:d,tagStartPos:a}),i=!0}for(o++;o0)||ot("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):ot("InvalidXml","Start tag expected.",1)};const tt='"',et="'";function nt(t,e){let n="",i="",r=!1;for(;e"===t[e]&&""===i){r=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:r}}const it=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function rt(t,e){const n=W.getAllMatches(t,it),i={};for(let t=0;t!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}};ct.buildOptions=function(t){return Object.assign({},ut,t)},ct.defaultOptions=ut;const pt=Y;function ht(t,e){let n="";for(;e0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}},It=function(t,e){const n={};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 i=1,r=!1,s=!1,o="";for(;e"===t[e]){if(s?"-"===t[e-1]&&"-"===t[e-2]&&(s=!1,i--):i--,0===i)break}else"["===t[e]?r=!0:o+=t[e];else{if(r&>(t,e))e+=7,[entityName,val,e]=ht(t,e+1),-1===val.indexOf("&")&&(n[vt(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(r&&mt(t,e))e+=8;else if(r&&Et(t,e))e+=8;else if(r&&wt(t,e))e+=9;else{if(!ft)throw new Error("Invalid DOCTYPE");s=!0}i++,o=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}},Ot=function(t,e={}){if(e=Object.assign({},Nt,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if(e.hex&&At.test(n))return Number.parseInt(n,16);{const r=yt.exec(n);if(r){const s=r[1],o=r[2];let a=(i=r[3])&&-1!==i.indexOf(".")?("."===(i=i.replace(/0+$/,""))?i="0":"."===i[0]?i="0"+i:"."===i[i.length-1]&&(i=i.substr(0,i.length-1)),i):i;const l=r[4]||r[6];if(!e.leadingZeros&&o.length>0&&s&&"."!==n[2])return t;if(!e.leadingZeros&&o.length>0&&!s&&"."!==n[1])return t;{const i=Number(n),r=""+i;return-1!==r.search(/[eE]/)||l?e.eNotation?i:t:-1!==n.indexOf(".")?"0"===r&&""===a||r===a||s&&r==="-"+a?i:t:o?a===r||s+a===r?i:t:n===r||n===s+r?i:t}}return t}var i};function _t(t){const e=Object.keys(t);for(let n=0;n0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,r,s);return null==i?t:typeof i!=typeof t||i!==t?i:this.options.trimValues||t.trim()===t?Gt(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function Ct(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const Rt=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Lt(t,e,n){if(!this.options.ignoreAttributes&&"string"==typeof t){const n=bt.getAllMatches(t,Rt),i=n.length,r={};for(let t=0;t",s,"Closing Tag is not closed.");let o=t.substring(s+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(i=this.saveTextToParentTag(i,n,r));const a=r.substring(r.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: `);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),n=this.tagsNodeStack.pop(),i="",s=e}else if("?"===t[s+1]){let e=Vt(t,s,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,r),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new xt(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,r,e.tagName)),this.addChild(n,t,r)}s=e.closeIndex+1}else if("!--"===t.substr(s+1,3)){const e=Mt(t,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(s+4,e-2);i=this.saveTextToParentTag(i,n,r),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}s=e}else if("!D"===t.substr(s+1,2)){const e=It(t,s);this.docTypeEntities=e.entities,s=e.i}else if("!["===t.substr(s+1,2)){const e=Mt(t,"]]>",s,"CDATA is not closed.")-2,o=t.substring(s+9,e);i=this.saveTextToParentTag(i,n,r);let a=this.parseTextData(o,n.tagname,r,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):n.add(this.options.textNodeName,a),s=e+2}else{let o=Vt(t,s,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let d=o.tagExp,c=o.attrExpPresent,u=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,r,!1));const p=n;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=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(d.length>0&&d.lastIndexOf("/")===d.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),d=a):d=d.substr(0,d.length-1),s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))s=o.closeIndex;else{const n=this.readStopNodeData(t,l,u+1);if(!n)throw new Error(`Unexpected end of ${l}`);s=n.i,e=n.tagContent}const i=new xt(a);a!==d&&c&&(i[":@"]=this.buildAttributesMap(d,r,a)),e&&(e=this.parseTextData(e,a,r,!0,c,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,r)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),d=a):d=d.substr(0,d.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new xt(a);a!==d&&c&&(t[":@"]=this.buildAttributesMap(d,r,a)),this.addChild(n,t,r),r=r.substr(0,r.lastIndexOf("."))}else{const t=new xt(a);this.tagsNodeStack.push(n),a!==d&&c&&(t[":@"]=this.buildAttributesMap(d,r,a)),this.addChild(n,t,r),n=t}i="",s=u}}else i+=t[s];return e.child};function St(t,e,n){const i=this.options.updateTag(e.tagname,n,e[":@"]);!1===i||("string"==typeof i?(e.tagname=i,t.addChild(e)):t.addChild(e))}const Pt=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function Dt(t,e,n,i){return t&&(void 0===i&&(i=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Ft(t,e,n){const i="*."+n;for(const n in t){const r=t[n];if(i===r||e===r)return!0}return!1}function Mt(t,e,n,i){const r=t.indexOf(e,n);if(-1===r)throw new Error(i);return r+e.length-1}function Vt(t,e,n,i=">"){const r=function(t,e,n=">"){let i,r="";for(let s=e;s",n,`${e} is not closed`);if(t.substring(n+2,s).trim()===e&&(r--,0===r))return{tagContent:t.substring(i,n),i:s};n=s}else if("?"===t[n+1])n=Mt(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=Mt(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=Mt(t,"]]>",n,"StopNode is not closed.")-2;else{const i=Vt(t,n,">");i&&((i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&r++,n=i.closeIndex)}}function Gt(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&Ot(t,n)}return bt.isExist(t)?t:""}var kt={};function Bt(t,e,n){let i;const r={};for(let s=0;s0&&(r[e.textNodeName]=i):void 0!==i&&(r[e.textNodeName]=i),r}function Ut(t){const e=Object.keys(t);for(let t=0;t"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=_t,this.parseXml=$t,this.parseTextData=Tt,this.resolveNameSpace=Ct,this.buildAttributesMap=Lt,this.isItStopNode=Ft,this.replaceEntitiesValue=Pt,this.readStopNodeData=jt,this.saveTextToParentTag=Dt,this.addChild=St}},{prettify:Yt}=kt,Wt=z;function Kt(t,e,n,i){let r="",s=!1;for(let o=0;o`,s=!1;continue}if(l===e.commentPropName){r+=i+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const t=Jt(a[":@"],e),n="?xml"===l?"":i;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",r+=n+`<${l}${o}${t}?>`,s=!0;continue}let c=i;""!==c&&(c+=e.indentBy);const u=i+`<${l}${Jt(a[":@"],e)}`,p=Kt(a[l],e,d,c);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?r+=u+">":r+=u+"/>":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(">")?r+=u+`>${p}${i}`:(r+=u+">",p&&""!==i&&(p.includes("/>")||p.includes("`):r+=u+"/>",s=!0}return r}function Zt(t){const e=Object.keys(t);for(let n=0;n0&&e.processEntities)for(let n=0;n0&&(n="\n"),Kt(t,e,"",n)},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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function ie(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=oe),this.processTextOrObjNode=re,this.options.format?(this.indentate=se,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function re(t,e,n){const i=this.j2x(t,n+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,n):this.buildObjectNode(i.val,e,i.attrStr,n)}function se(t){return this.options.indentBy.repeat(t)}function oe(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}ie.prototype.build=function(t){return this.options.preserveOrder?ee(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},ie.prototype.j2x=function(t,e){let n="",i="";for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r))if(void 0===t[r])this.isAttribute(r)&&(i+="");else if(null===t[r])this.isAttribute(r)?i+="":"?"===r[0]?i+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+r+"/"+this.tagEndChar;else if(t[r]instanceof Date)i+=this.buildTextValNode(t[r],r,"",e);else if("object"!=typeof t[r]){const s=this.isAttribute(r);if(s)n+=this.buildAttrPairStr(s,""+t[r]);else if(r===this.options.textNodeName){let e=this.options.tagValueProcessor(r,""+t[r]);i+=this.replaceEntitiesValue(e)}else i+=this.buildTextValNode(t[r],r,"",e)}else if(Array.isArray(t[r])){const n=t[r].length;let s="",o="";for(let a=0;a"+t+r}},ie.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),""===r?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+r+"0&&this.options.processEntities)for(let e=0;e0&&(!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)return!1;if(!0!==ae.XMLValidator.validate(t))return!1;let e;const n=new ae.XMLParser;try{e=n.parse(t)}catch{return!1}return!!e&&!!Object.keys(e).some((t=>"svg"===t.toLowerCase()))}(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 must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof q))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");if(t.loadChildViews&&"function"!=typeof t.loadChildViews)throw new Error("View loadChildViews must be a function");return!0};var ce="object"==typeof h&&h.env&&h.env.NODE_DEBUG&&/\bsemver\b/i.test(h.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{},ue={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},pe={exports:{}};!function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=ue,s=ce,o=(e=t.exports={}).re=[],a=e.safeRe=[],l=e.src=[],d=e.t={};let c=0;const u="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",r],[u,i]],h=(t,e,n)=>{const i=(t=>{for(const[e,n]of p)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t})(e),r=c++;s(t,r,e),d[t]=r,l[r]=e,o[r]=new RegExp(e,n?"g":void 0),a[r]=new RegExp(i,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),h("MAINVERSION",`(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${l[d.NUMERICIDENTIFIER]}|${l[d.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${l[d.NUMERICIDENTIFIERLOOSE]}|${l[d.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${l[d.PRERELEASEIDENTIFIER]}(?:\\.${l[d.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${l[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[d.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${u}+`),h("BUILD",`(?:\\+(${l[d.BUILDIDENTIFIER]}(?:\\.${l[d.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${l[d.MAINVERSION]}${l[d.PRERELEASE]}?${l[d.BUILD]}?`),h("FULL",`^${l[d.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${l[d.MAINVERSIONLOOSE]}${l[d.PRERELEASELOOSE]}?${l[d.BUILD]}?`),h("LOOSE",`^${l[d.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${l[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${l[d.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:${l[d.PRERELEASE]})?${l[d.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:${l[d.PRERELEASELOOSE]})?${l[d.BUILD]}?)?)?`),h("XRANGE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${l[d.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",l[d.COERCEPLAIN]+`(?:${l[d.PRERELEASE]})?(?:${l[d.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",l[d.COERCE],!0),h("COERCERTLFULL",l[d.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${l[d.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",h("TILDE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${l[d.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",h("CARET",`^${l[d.LONECARET]}${l[d.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${l[d.LONECARET]}${l[d.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${l[d.GTLT]}\\s*(${l[d.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]}|${l[d.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${l[d.XRANGEPLAIN]})\\s+-\\s+(${l[d.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${l[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[d.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(pe,pe.exports);var he=pe.exports;Object.freeze({loose:!0}),Object.freeze({});const fe=/^[0-9]+$/,ge=(t,e)=>{const n=fe.test(t),i=fe.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:tge(e,t)};const{MAX_LENGTH:Ee,MAX_SAFE_INTEGER:we}=ue,{safeRe:ve,t:Ae}=he,{compareIdentifiers:ye}=me;p.m},71654:(t,e,n)=>{"use strict";n.d(e,{A:()=>f});const i=/[\p{Lu}]/u,r=/[\p{Ll}]/u,s=/^[\p{Lu}](?![\p{Lu}])/gu,o=/([\p{Alpha}\p{N}_]|$)/u,a=/[_.\- ]+/,l=new RegExp("^"+a.source),d=new RegExp(a.source+o.source,"gu"),c=new RegExp("\\d+"+o.source,"gu"),u=(t,e,n,s)=>{let o=!1,a=!1,l=!1,d=!1;for(let c=0;c2)||"-"===t[c-3],o&&i.test(u)?(t=t.slice(0,c)+"-"+t.slice(c),o=!1,l=a,a=!0,c++):a&&l&&r.test(u)&&(!d||s)?(t=t.slice(0,c-1)+"-"+t.slice(c-1),l=a,a=!1,o=!0):(o=e(u)===u&&n(u)!==u,l=a,a=n(u)===u&&e(u)!==u)}return t},p=(t,e)=>(s.lastIndex=0,t.replaceAll(s,(t=>e(t)))),h=(t,e)=>(d.lastIndex=0,c.lastIndex=0,t.replaceAll(c,((n,i,r)=>["_","-"].includes(t.charAt(r+n.length))?n:e(n))).replaceAll(d,((t,n)=>e(n))));function f(t,e){if("string"!=typeof t&&!Array.isArray(t))throw new TypeError("Expected the input to be `string | string[]`");if(e={pascalCase:!1,preserveConsecutiveUppercase:!1,...e},0===(t=Array.isArray(t)?t.map((t=>t.trim())).filter((t=>t.length)).join("-"):t.trim()).length)return"";const n=!1===e.locale?t=>t.toLowerCase():t=>t.toLocaleLowerCase(e.locale),i=!1===e.locale?t=>t.toUpperCase():t=>t.toLocaleUpperCase(e.locale);return 1===t.length?a.test(t)?"":e.pascalCase?i(t):n(t):(t!==n(t)&&(t=u(t,n,i,e.preserveConsecutiveUppercase)),t=t.replace(l,""),t=e.preserveConsecutiveUppercase?p(t,n):n(t),e.pascalCase&&(t=i(t.charAt(0))+t.slice(1)),h(t,i))}}},r={};function s(t){var e=r[t];if(void 0!==e)return e.exports;var n=r[t]={id:t,loaded:!1,exports:{}};return i[t].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=i,t=[],s.O=(e,n,i,r)=>{if(!n){var o=1/0;for(c=0;c=r)&&Object.keys(s.O).every((t=>s.O[t](n[l])))?n.splice(l--,1):(a=!1,r0&&t[c-1][2]>r;c--)t[c]=t[c-1];t[c]=[n,i,r]},s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.f={},s.e=t=>Promise.all(Object.keys(s.f).reduce(((e,n)=>(s.f[n](t,e),e)),[])),s.u=t=>t+"-"+t+".js?v="+{802:"387187865bf364bcd145",6028:"5ce1128bba38461a1848",9291:"077955af818a227340aa"}[t],s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),e={},n="nextcloud:",s.l=(t,i,r,o)=>{if(e[t])e[t].push(i);else{var a,l;if(void 0!==r)for(var d=document.getElementsByTagName("script"),c=0;c{a.onerror=a.onload=null,clearTimeout(h);var r=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((t=>t(i))),n)return n(i)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),s.j=2766,(()=>{var t;s.g.importScripts&&(t=s.g.location+"");var e=s.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&(!t||!/^http(s?):/.test(t));)t=n[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=t})(),(()=>{s.b=document.baseURI||self.location.href;var t={2766:0};s.f.j=(e,n)=>{var i=s.o(t,e)?t[e]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise(((n,r)=>i=t[e]=[n,r]));n.push(i[2]=r);var o=s.p+s.u(e),a=new Error;s.l(o,(n=>{if(s.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",a.name="ChunkLoadError",a.type=r,a.request=o,i[1](a)}}),"chunk-"+e,e)}},s.O.j=e=>0===t[e];var e=(e,n)=>{var i,r,o=n[0],a=n[1],l=n[2],d=0;if(o.some((e=>0!==t[e]))){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);if(l)var c=l(s)}for(e&&e(n);ds(3253)));o=s.O(o)})(); +//# sourceMappingURL=systemtags-init.js.map?v=830cc2a970a0cc3deccf \ No newline at end of file diff --git a/dist/systemtags-init.js.map b/dist/systemtags-init.js.map index e571c95db24d5..f90f33e365fad 100644 --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,IAAY2C,EAAgB3C,IACrE2C,EAAgB3C,GAAS,KAE1B2C,EAAgB3C,GAAW,EAE5B,OAAOvB,EAAoBM,EAAE3kB,EAAO,EAGjCipB,EAAqBZ,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FY,EAAmB7wB,QAAQywB,EAAqBtB,KAAK,KAAM,IAC3D0B,EAAmB1oB,KAAOsoB,EAAqBtB,KAAK,KAAM0B,EAAmB1oB,KAAKgnB,KAAK0B,G,KCvFvF5E,EAAoB5iB,QAAK5K,ECGzB,IAAIqyB,EAAsB7E,EAAoBM,OAAE9tB,EAAW,CAAC,OAAO,IAAOwtB,EAAoB,QAC9F6E,EAAsB7E,EAAoBM,EAAEuE,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/systemtags/src/files_actions/bulkSystemTagsAction.ts","webpack://nextcloud/./apps/systemtags/src/css/fileEntryInlineSystemTags.scss?0a01","webpack:///nextcloud/apps/systemtags/src/files_actions/inlineSystemTagsAction.ts","webpack:///nextcloud/apps/systemtags/src/services/systemtags.ts","webpack:///nextcloud/apps/systemtags/src/files_views/systemtagsView.ts","webpack:///nextcloud/apps/systemtags/src/files_actions/openInFilesAction.ts","webpack:///nextcloud/apps/systemtags/src/init.ts","webpack:///nextcloud/apps/systemtags/src/logger.ts","webpack:///nextcloud/apps/systemtags/src/services/api.ts","webpack:///nextcloud/apps/systemtags/src/services/davClient.ts","webpack:///nextcloud/apps/systemtags/src/utils.ts","webpack:///nextcloud/apps/systemtags/src/css/fileEntryInlineSystemTags.scss","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack:///nextcloud/node_modules/camelcase/index.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport {} from '@nextcloud/files';\nimport { defineAsyncComponent } from 'vue';\nimport { FileAction } from '@nextcloud/files';\nimport { isPublicShare } from '@nextcloud/sharing/public';\nimport { spawnDialog } from '@nextcloud/dialogs';\nimport { t } from '@nextcloud/l10n';\nimport TagMultipleSvg from '@mdi/svg/svg/tag-multiple.svg?raw';\nasync function execBatch(nodes) {\n const response = await new Promise((resolve) => {\n spawnDialog(defineAsyncComponent(() => import('../components/SystemTagPicker.vue')), {\n nodes,\n }, (status) => {\n resolve(status);\n });\n });\n return Array(nodes.length).fill(response);\n}\nexport const action = new FileAction({\n id: 'systemtags:bulk',\n displayName: () => t('systemtags', 'Manage tags'),\n iconSvgInline: () => TagMultipleSvg,\n // If the app is disabled, the action is not available anyway\n enabled(nodes) {\n if (isPublicShare()) {\n return false;\n }\n if (nodes.length === 0) {\n return false;\n }\n // If the user is not logged in, the action is not available\n return true;\n },\n async exec(node) {\n return execBatch([node])[0];\n },\n execBatch,\n});\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./fileEntryInlineSystemTags.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./fileEntryInlineSystemTags.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import { FileAction } from '@nextcloud/files';\nimport { subscribe } from '@nextcloud/event-bus';\nimport { t } from '@nextcloud/l10n';\nimport '../css/fileEntryInlineSystemTags.scss';\nimport { getNodeSystemTags } from '../utils';\nconst renderTag = function (tag, isMore = false) {\n const tagElement = document.createElement('li');\n tagElement.classList.add('files-list__system-tag');\n tagElement.textContent = tag;\n if (isMore) {\n tagElement.classList.add('files-list__system-tag--more');\n }\n return tagElement;\n};\nconst renderInline = async function (node) {\n // Ensure we have the system tags as an array\n const tags = getNodeSystemTags(node);\n const systemTagsElement = document.createElement('ul');\n systemTagsElement.classList.add('files-list__system-tags');\n systemTagsElement.setAttribute('aria-label', t('files', 'Assigned collaborative tags'));\n systemTagsElement.setAttribute('data-systemtags-fileid', node.fileid?.toString() || '');\n if (tags.length === 0) {\n return systemTagsElement;\n }\n systemTagsElement.append(renderTag(tags[0]));\n if (tags.length === 2) {\n // Special case only two tags:\n // the overflow fake tag would take the same space as this, so render it\n systemTagsElement.append(renderTag(tags[1]));\n }\n else if (tags.length > 1) {\n // More tags than the one we're showing\n // So we add a overflow element indicating there are more tags\n const moreTagElement = renderTag('+' + (tags.length - 1), true);\n moreTagElement.setAttribute('title', tags.slice(1).join(', '));\n // because the title is not accessible we hide this element for screen readers (see alternative below)\n moreTagElement.setAttribute('aria-hidden', 'true');\n moreTagElement.setAttribute('role', 'presentation');\n systemTagsElement.append(moreTagElement);\n // For accessibility the tags are listed, as the title is not accessible\n // but those tags are visually hidden\n for (const tag of tags.slice(1)) {\n const tagElement = renderTag(tag);\n tagElement.classList.add('hidden-visually');\n systemTagsElement.append(tagElement);\n }\n }\n return systemTagsElement;\n};\nexport const action = new FileAction({\n id: 'system-tags',\n displayName: () => '',\n iconSvgInline: () => '',\n enabled(nodes) {\n // Only show the action on single nodes\n if (nodes.length !== 1) {\n return false;\n }\n // Always show the action, even if there are no tags\n // This will render an empty tag list and allow events to update it\n return true;\n },\n exec: async () => null,\n renderInline,\n order: 0,\n});\nconst updateSystemTagsHtml = function (node) {\n renderInline(node).then((systemTagsHtml) => {\n document.querySelectorAll(`[data-systemtags-fileid=\"${node.fileid}\"]`).forEach((element) => {\n element.replaceWith(systemTagsHtml);\n });\n });\n};\nsubscribe('systemtags:node:updated', updateSystemTagsHtml);\n","import { getCurrentUser } from '@nextcloud/auth';\nimport { Folder, Permission, getDavNameSpaces, getDavProperties, davGetClient, davResultToNode, davRemoteURL, davRootPath } from '@nextcloud/files';\nimport { fetchTags } from './api';\nconst rootPath = '/systemtags';\nconst client = davGetClient();\nconst resultToNode = (node) => davResultToNode(node);\nconst formatReportPayload = (tagId) => `\n\n\t\n\t\t${getDavProperties()}\n\t\n\t\n\t\t${tagId}\n\t\n`;\nconst tagToNode = function (tag) {\n return new Folder({\n id: tag.id,\n source: `${davRemoteURL}${rootPath}/${tag.id}`,\n owner: String(getCurrentUser()?.uid ?? 'anonymous'),\n root: rootPath,\n displayname: tag.displayName,\n permissions: Permission.READ,\n attributes: {\n ...tag,\n 'is-tag': true,\n },\n });\n};\nexport const getContents = async (path = '/') => {\n // List tags in the root\n const tagsCache = (await fetchTags()).filter(tag => tag.userVisible);\n if (path === '/') {\n return {\n folder: new Folder({\n id: 0,\n source: `${davRemoteURL}${rootPath}`,\n owner: getCurrentUser()?.uid,\n root: rootPath,\n permissions: Permission.NONE,\n }),\n contents: tagsCache.map(tagToNode),\n };\n }\n const tagId = parseInt(path.split('/', 2)[1]);\n const tag = tagsCache.find(tag => tag.id === tagId);\n if (!tag) {\n throw new Error('Tag not found');\n }\n const folder = tagToNode(tag);\n const contentsResponse = await client.getDirectoryContents(davRootPath, {\n details: true,\n // Only filter favorites if we're at the root\n data: formatReportPayload(tagId),\n headers: {\n // Patched in WebdavClient.ts\n method: 'REPORT',\n },\n });\n return {\n folder,\n contents: contentsResponse.data.map(resultToNode),\n };\n};\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport { View, getNavigation } from '@nextcloud/files';\nimport { getContents } from '../services/systemtags.js';\nimport svgTagMultiple from '@mdi/svg/svg/tag-multiple.svg?raw';\nexport const systemTagsViewId = 'tags';\n/**\n * Register the system tags files view\n */\nexport function registerSystemTagsView() {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: systemTagsViewId,\n name: t('systemtags', 'Tags'),\n caption: t('systemtags', 'List of tags and their associated files and folders.'),\n emptyTitle: t('systemtags', 'No tags found'),\n emptyCaption: t('systemtags', 'Tags you have created will show up here.'),\n icon: svgTagMultiple,\n order: 25,\n getContents,\n }));\n}\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport {} from '@nextcloud/files';\nimport { FileType, FileAction, DefaultType } from '@nextcloud/files';\nimport { t } from '@nextcloud/l10n';\nimport { systemTagsViewId } from '../files_views/systemtagsView';\nexport const action = new FileAction({\n id: 'systemtags:open-in-files',\n displayName: () => t('systemtags', 'Open in Files'),\n iconSvgInline: () => '',\n enabled(nodes, view) {\n // Only for the system tags view\n if (view.id !== systemTagsViewId) {\n return false;\n }\n // Only for single nodes\n if (nodes.length !== 1) {\n return false;\n }\n // Do not open tags (keep the default action) and only open folders\n return nodes[0].attributes['is-tag'] !== true\n && nodes[0].type === FileType.Folder;\n },\n async exec(node) {\n let dir = node.dirname;\n if (node.type === FileType.Folder) {\n dir = node.path;\n }\n window.OCP.Files.Router.goToRoute(null, // use default route\n { view: 'files', fileid: String(node.fileid) }, { dir, openfile: 'true' });\n return null;\n },\n // Before openFolderAction\n order: -1000,\n default: DefaultType.HIDDEN,\n});\n","/**\n * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { registerDavProperty, registerFileAction } from '@nextcloud/files';\nimport { action as bulkSystemTagsAction } from './files_actions/bulkSystemTagsAction';\nimport { action as inlineSystemTagsAction } from './files_actions/inlineSystemTagsAction';\nimport { action as openInFilesAction } from './files_actions/openInFilesAction';\nimport { registerSystemTagsView } from './files_views/systemtagsView';\nregisterDavProperty('nc:system-tags');\nregisterFileAction(bulkSystemTagsAction);\nregisterFileAction(inlineSystemTagsAction);\nregisterFileAction(openInFilesAction);\nregisterSystemTagsView();\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport const logger = getLoggerBuilder()\n .setApp('systemtags')\n .detectUser()\n .build();\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport axios from '@nextcloud/axios';\nimport { generateUrl } from '@nextcloud/router';\nimport { t } from '@nextcloud/l10n';\nimport { davClient } from './davClient.js';\nimport { formatTag, parseIdFromLocation, parseTags } from '../utils';\nimport { logger } from '../logger.js';\nexport const fetchTagsPayload = `\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n`;\nexport const fetchTags = async () => {\n const path = '/systemtags';\n try {\n const { data: tags } = await davClient.getDirectoryContents(path, {\n data: fetchTagsPayload,\n details: true,\n glob: '/systemtags/*', // Filter out first empty tag\n });\n return parseTags(tags);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to load tags'), { error });\n throw new Error(t('systemtags', 'Failed to load tags'));\n }\n};\nexport const fetchTag = async (tagId) => {\n const path = '/systemtags/' + tagId;\n try {\n const { data: tag } = await davClient.stat(path, {\n data: fetchTagsPayload,\n details: true\n });\n return parseTags([tag])[0];\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to load tag'), { error });\n throw new Error(t('systemtags', 'Failed to load tag'));\n }\n};\nexport const fetchLastUsedTagIds = async () => {\n const url = generateUrl('/apps/systemtags/lastused');\n try {\n const { data: lastUsedTagIds } = await axios.get(url);\n return lastUsedTagIds.map(Number);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to load last used tags'), { error });\n throw new Error(t('systemtags', 'Failed to load last used tags'));\n }\n};\n/**\n * Create a tag and return the Id of the newly created tag.\n *\n * @param tag The tag to create\n */\nexport const createTag = async (tag) => {\n const path = '/systemtags';\n const tagToPost = formatTag(tag);\n try {\n const { headers } = await davClient.customRequest(path, {\n method: 'POST',\n data: tagToPost,\n });\n const contentLocation = headers.get('content-location');\n if (contentLocation) {\n return parseIdFromLocation(contentLocation);\n }\n logger.error(t('systemtags', 'Missing \"Content-Location\" header'));\n throw new Error(t('systemtags', 'Missing \"Content-Location\" header'));\n }\n catch (error) {\n if (error?.response?.status === 409) {\n logger.error(t('systemtags', 'A tag with the same name already exists'), { error });\n throw new Error(t('systemtags', 'A tag with the same name already exists'));\n }\n logger.error(t('systemtags', 'Failed to create tag'), { error });\n throw new Error(t('systemtags', 'Failed to create tag'));\n }\n};\nexport const updateTag = async (tag) => {\n const path = '/systemtags/' + tag.id;\n const data = `\n\t\n\t\t\n\t\t\t\n\t\t\t\t${tag.displayName}\n\t\t\t\t${tag.userVisible}\n\t\t\t\t${tag.userAssignable}\n\t\t\t\n\t\t\n\t`;\n try {\n await davClient.customRequest(path, {\n method: 'PROPPATCH',\n data,\n });\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to update tag'), { error });\n throw new Error(t('systemtags', 'Failed to update tag'));\n }\n};\nexport const deleteTag = async (tag) => {\n const path = '/systemtags/' + tag.id;\n try {\n await davClient.deleteFile(path);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to delete tag'), { error });\n throw new Error(t('systemtags', 'Failed to delete tag'));\n }\n};\nexport const getTagObjects = async function (tag, type) {\n const path = `/systemtags/${tag.id}/${type}`;\n const data = `\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t`;\n const response = await davClient.stat(path, { data, details: true });\n const etag = response?.data?.props?.getetag || '\"\"';\n const objects = Object.values(response?.data?.props?.['object-ids'] || []).flat();\n return {\n etag,\n objects,\n };\n};\n/**\n * Set the objects for a tag.\n * Warning: This will overwrite the existing objects.\n * @param tag The tag to set the objects for\n * @param type The type of the objects\n * @param objectIds The objects to set\n * @param etag Strongly recommended to avoid conflict and data loss.\n */\nexport const setTagObjects = async function (tag, type, objectIds, etag = '') {\n const path = `/systemtags/${tag.id}/${type}`;\n let data = `\n\t\n\t\t\n\t\t\t\n\t\t\t\t${objectIds.map(({ id, type }) => `${id}${type}`).join('')}\n\t\t\t\n\t\t\n\t`;\n if (objectIds.length === 0) {\n data = `\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t`;\n }\n await davClient.customRequest(path, {\n method: 'PROPPATCH',\n data,\n headers: {\n 'if-match': etag,\n },\n });\n};\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { createClient } from 'webdav';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth';\n// init webdav client\nconst rootUrl = generateRemoteUrl('dav');\nexport const davClient = createClient(rootUrl);\n// set CSRF token header\nconst setHeaders = (token) => {\n davClient.setHeaders({\n // Add this so the server knows it is an request from the browser\n 'X-Requested-With': 'XMLHttpRequest',\n // Inject user auth\n requesttoken: token ?? '',\n });\n};\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders);\nsetHeaders(getRequestToken());\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport camelCase from 'camelcase';\nimport Vue from 'vue';\nexport const defaultBaseTag = {\n userVisible: true,\n userAssignable: true,\n canAssign: true,\n};\nexport const parseTags = (tags) => {\n return tags.map(({ props }) => Object.fromEntries(Object.entries(props)\n .map(([key, value]) => [camelCase(key), camelCase(key) === 'displayName' ? String(value) : value])));\n};\n/**\n * Parse id from `Content-Location` header\n * @param url URL to parse\n */\nexport const parseIdFromLocation = (url) => {\n const queryPos = url.indexOf('?');\n if (queryPos > 0) {\n url = url.substring(0, queryPos);\n }\n const parts = url.split('/');\n let result;\n do {\n result = parts[parts.length - 1];\n parts.pop();\n // note: first result can be empty when there is a trailing slash,\n // so we take the part before that\n } while (!result && parts.length > 0);\n return Number(result);\n};\nexport const formatTag = (initialTag) => {\n if ('name' in initialTag && !('displayName' in initialTag)) {\n return { ...initialTag };\n }\n const tag = { ...initialTag };\n tag.name = tag.displayName;\n delete tag.displayName;\n return tag;\n};\nexport const getNodeSystemTags = function (node) {\n const tags = node.attributes?.['system-tags']?.['system-tag'];\n if (tags === undefined) {\n return [];\n }\n return [tags].flat();\n};\nexport const setNodeSystemTags = function (node, tags) {\n Vue.set(node.attributes, 'system-tags', {\n 'system-tag': tags,\n });\n};\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.files-list__system-tags{--min-size: 32px;display:none;justify-content:center;align-items:center;min-width:calc(var(--min-size)*2);max-width:300px}.files-list__system-tag{padding:5px 10px;border:1px solid;border-radius:var(--border-radius-pill);border-color:var(--color-border);color:var(--color-text-maxcontrast);height:var(--min-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:22px;text-align:center}.files-list__system-tag--more{overflow:visible;text-overflow:initial}.files-list__system-tag+.files-list__system-tag{margin-inline-start:5px}@media(min-width: 512px){.files-list__system-tags{display:flex}}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/systemtags/src/css/fileEntryInlineSystemTags.scss\"],\"names\":[],\"mappings\":\"AAKA,yBACC,gBAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,iCAAA,CACA,eAAA,CAGD,wBACC,gBAAA,CACA,gBAAA,CACA,uCAAA,CACA,gCAAA,CACA,mCAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,gBAAA,CACA,iBAAA,CAEA,8BACC,gBAAA,CACA,qBAAA,CAID,gDACC,uBAAA,CAIF,yBACC,yBACC,YAAA,CAAA\",\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import { getLoggerBuilder } from \"@nextcloud/logger\";\nimport { getCurrentUser, onRequestTokenUpdate, getRequestToken } from \"@nextcloud/auth\";\nimport { join, basename, extname, dirname } from \"path\";\nimport { encodePath } from \"@nextcloud/paths\";\nimport { generateRemoteUrl } from \"@nextcloud/router\";\nimport { CancelablePromise } from \"cancelable-promise\";\nimport { createClient, getPatcher } from \"webdav\";\nimport { isPublicShare, getSharingToken } from \"@nextcloud/sharing/public\";\nimport { getCapabilities } from \"@nextcloud/capabilities\";\nimport { getCanonicalLocale, getLanguage } from \"@nextcloud/l10n\";\nimport { TypedEventTarget } from \"typescript-event-target\";\nconst logger = getLoggerBuilder().setApp(\"@nextcloud/files\").detectUser().build();\nvar NewMenuEntryCategory = /* @__PURE__ */ ((NewMenuEntryCategory2) => {\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"UploadFromDevice\"] = 0] = \"UploadFromDevice\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"CreateNew\"] = 1] = \"CreateNew\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"Other\"] = 2] = \"Other\";\n return NewMenuEntryCategory2;\n})(NewMenuEntryCategory || {});\nclass NewFileMenu {\n _entries = [];\n registerEntry(entry) {\n this.validateEntry(entry);\n entry.category = entry.category ?? 1;\n this._entries.push(entry);\n }\n unregisterEntry(entry) {\n const entryIndex = typeof entry === \"string\" ? this.getEntryIndex(entry) : this.getEntryIndex(entry.id);\n if (entryIndex === -1) {\n logger.warn(\"Entry not found, nothing removed\", { entry, entries: this.getEntries() });\n return;\n }\n this._entries.splice(entryIndex, 1);\n }\n /**\n * Get the list of registered entries\n *\n * @param {Folder} context the creation context. Usually the current folder\n */\n getEntries(context) {\n if (context) {\n return this._entries.filter((entry) => typeof entry.enabled === \"function\" ? entry.enabled(context) : true);\n }\n return this._entries;\n }\n getEntryIndex(id) {\n return this._entries.findIndex((entry) => entry.id === id);\n }\n validateEntry(entry) {\n if (!entry.id || !entry.displayName || !(entry.iconSvgInline || entry.iconClass) || !entry.handler) {\n throw new Error(\"Invalid entry\");\n }\n if (typeof entry.id !== \"string\" || typeof entry.displayName !== \"string\") {\n throw new Error(\"Invalid id or displayName property\");\n }\n if (entry.iconClass && typeof entry.iconClass !== \"string\" || entry.iconSvgInline && typeof entry.iconSvgInline !== \"string\") {\n throw new Error(\"Invalid icon provided\");\n }\n if (entry.enabled !== void 0 && typeof entry.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (typeof entry.handler !== \"function\") {\n throw new Error(\"Invalid handler property\");\n }\n if (\"order\" in entry && typeof entry.order !== \"number\") {\n throw new Error(\"Invalid order property\");\n }\n if (this.getEntryIndex(entry.id) !== -1) {\n throw new Error(\"Duplicate entry\");\n }\n }\n}\nconst getNewFileMenu = function() {\n if (typeof window._nc_newfilemenu === \"undefined\") {\n window._nc_newfilemenu = new NewFileMenu();\n logger.debug(\"NewFileMenu initialized\");\n }\n return window._nc_newfilemenu;\n};\nvar DefaultType = /* @__PURE__ */ ((DefaultType2) => {\n DefaultType2[\"DEFAULT\"] = \"default\";\n DefaultType2[\"HIDDEN\"] = \"hidden\";\n return DefaultType2;\n})(DefaultType || {});\nclass FileAction {\n _action;\n constructor(action) {\n this.validateAction(action);\n this._action = action;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get title() {\n return this._action.title;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n get execBatch() {\n return this._action.execBatch;\n }\n get order() {\n return this._action.order;\n }\n get parent() {\n return this._action.parent;\n }\n get default() {\n return this._action.default;\n }\n get inline() {\n return this._action.inline;\n }\n get renderInline() {\n return this._action.renderInline;\n }\n validateAction(action) {\n if (!action.id || typeof action.id !== \"string\") {\n throw new Error(\"Invalid id\");\n }\n if (!action.displayName || typeof action.displayName !== \"function\") {\n throw new Error(\"Invalid displayName function\");\n }\n if (\"title\" in action && typeof action.title !== \"function\") {\n throw new Error(\"Invalid title function\");\n }\n if (!action.iconSvgInline || typeof action.iconSvgInline !== \"function\") {\n throw new Error(\"Invalid iconSvgInline function\");\n }\n if (!action.exec || typeof action.exec !== \"function\") {\n throw new Error(\"Invalid exec function\");\n }\n if (\"enabled\" in action && typeof action.enabled !== \"function\") {\n throw new Error(\"Invalid enabled function\");\n }\n if (\"execBatch\" in action && typeof action.execBatch !== \"function\") {\n throw new Error(\"Invalid execBatch function\");\n }\n if (\"order\" in action && typeof action.order !== \"number\") {\n throw new Error(\"Invalid order\");\n }\n if (\"parent\" in action && typeof action.parent !== \"string\") {\n throw new Error(\"Invalid parent\");\n }\n if (action.default && !Object.values(DefaultType).includes(action.default)) {\n throw new Error(\"Invalid default\");\n }\n if (\"inline\" in action && typeof action.inline !== \"function\") {\n throw new Error(\"Invalid inline function\");\n }\n if (\"renderInline\" in action && typeof action.renderInline !== \"function\") {\n throw new Error(\"Invalid renderInline function\");\n }\n }\n}\nconst registerFileAction = function(action) {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n if (window._nc_fileactions.find((search) => search.id === action.id)) {\n logger.error(`FileAction ${action.id} already registered`, { action });\n return;\n }\n window._nc_fileactions.push(action);\n};\nconst getFileActions = function() {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n return window._nc_fileactions;\n};\nclass Header {\n _header;\n constructor(header) {\n this.validateHeader(header);\n this._header = header;\n }\n get id() {\n return this._header.id;\n }\n get order() {\n return this._header.order;\n }\n get enabled() {\n return this._header.enabled;\n }\n get render() {\n return this._header.render;\n }\n get updated() {\n return this._header.updated;\n }\n validateHeader(header) {\n if (!header.id || !header.render || !header.updated) {\n throw new Error(\"Invalid header: id, render and updated are required\");\n }\n if (typeof header.id !== \"string\") {\n throw new Error(\"Invalid id property\");\n }\n if (header.enabled !== void 0 && typeof header.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (header.render && typeof header.render !== \"function\") {\n throw new Error(\"Invalid render property\");\n }\n if (header.updated && typeof header.updated !== \"function\") {\n throw new Error(\"Invalid updated property\");\n }\n }\n}\nconst registerFileListHeaders = function(header) {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n if (window._nc_filelistheader.find((search) => search.id === header.id)) {\n logger.error(`Header ${header.id} already registered`, { header });\n return;\n }\n window._nc_filelistheader.push(header);\n};\nconst getFileListHeaders = function() {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n return window._nc_filelistheader;\n};\nvar Permission = /* @__PURE__ */ ((Permission2) => {\n Permission2[Permission2[\"NONE\"] = 0] = \"NONE\";\n Permission2[Permission2[\"CREATE\"] = 4] = \"CREATE\";\n Permission2[Permission2[\"READ\"] = 1] = \"READ\";\n Permission2[Permission2[\"UPDATE\"] = 2] = \"UPDATE\";\n Permission2[Permission2[\"DELETE\"] = 8] = \"DELETE\";\n Permission2[Permission2[\"SHARE\"] = 16] = \"SHARE\";\n Permission2[Permission2[\"ALL\"] = 31] = \"ALL\";\n return Permission2;\n})(Permission || {});\nconst defaultDavProperties = [\n \"d:getcontentlength\",\n \"d:getcontenttype\",\n \"d:getetag\",\n \"d:getlastmodified\",\n \"d:creationdate\",\n \"d:displayname\",\n \"d:quota-available-bytes\",\n \"d:resourcetype\",\n \"nc:has-preview\",\n \"nc:is-encrypted\",\n \"nc:mount-type\",\n \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:size\"\n];\nconst defaultDavNamespaces = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n};\nconst registerDavProperty = function(prop, namespace = { nc: \"http://nextcloud.org/ns\" }) {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n const namespaces = { ...window._nc_dav_namespaces, ...namespace };\n if (window._nc_dav_properties.find((search) => search === prop)) {\n logger.warn(`${prop} already registered`, { prop });\n return false;\n }\n if (prop.startsWith(\"<\") || prop.split(\":\").length !== 2) {\n logger.error(`${prop} is not valid. See example: 'oc:fileid'`, { prop });\n return false;\n }\n const ns = prop.split(\":\")[0];\n if (!namespaces[ns]) {\n logger.error(`${prop} namespace unknown`, { prop, namespaces });\n return false;\n }\n window._nc_dav_properties.push(prop);\n window._nc_dav_namespaces = namespaces;\n return true;\n};\nconst getDavProperties = function() {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n }\n return window._nc_dav_properties.map((prop) => `<${prop} />`).join(\" \");\n};\nconst getDavNameSpaces = function() {\n if (typeof window._nc_dav_namespaces === \"undefined\") {\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n return Object.keys(window._nc_dav_namespaces).map((ns) => `xmlns:${ns}=\"${window._nc_dav_namespaces?.[ns]}\"`).join(\" \");\n};\nconst davGetDefaultPropfind = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t`;\n};\nconst davGetFavoritesReport = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`;\n};\nconst davGetRecentSearch = function(lastModified) {\n return `\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${getCurrentUser()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${lastModified}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;\n};\nconst davParsePermissions = function(permString = \"\") {\n let permissions = Permission.NONE;\n if (!permString) {\n return permissions;\n }\n if (permString.includes(\"C\") || permString.includes(\"K\")) {\n permissions |= Permission.CREATE;\n }\n if (permString.includes(\"G\")) {\n permissions |= Permission.READ;\n }\n if (permString.includes(\"W\") || permString.includes(\"N\") || permString.includes(\"V\")) {\n permissions |= Permission.UPDATE;\n }\n if (permString.includes(\"D\")) {\n permissions |= Permission.DELETE;\n }\n if (permString.includes(\"R\")) {\n permissions |= Permission.SHARE;\n }\n return permissions;\n};\nvar FileType = /* @__PURE__ */ ((FileType2) => {\n FileType2[\"Folder\"] = \"folder\";\n FileType2[\"File\"] = \"file\";\n return FileType2;\n})(FileType || {});\nconst isDavRessource = function(source, davService) {\n return source.match(davService) !== null;\n};\nconst validateData = (data, davService) => {\n if (data.id && typeof data.id !== \"number\") {\n throw new Error(\"Invalid id type of value\");\n }\n if (!data.source) {\n throw new Error(\"Missing mandatory source\");\n }\n try {\n new URL(data.source);\n } catch (e) {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!data.source.startsWith(\"http\")) {\n throw new Error(\"Invalid source format, only http(s) is supported\");\n }\n if (data.displayname && typeof data.displayname !== \"string\") {\n throw new Error(\"Invalid displayname type\");\n }\n if (data.mtime && !(data.mtime instanceof Date)) {\n throw new Error(\"Invalid mtime type\");\n }\n if (data.crtime && !(data.crtime instanceof Date)) {\n throw new Error(\"Invalid crtime type\");\n }\n if (!data.mime || typeof data.mime !== \"string\" || !data.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi)) {\n throw new Error(\"Missing or invalid mandatory mime\");\n }\n if (\"size\" in data && typeof data.size !== \"number\" && data.size !== void 0) {\n throw new Error(\"Invalid size type\");\n }\n if (\"permissions\" in data && data.permissions !== void 0 && !(typeof data.permissions === \"number\" && data.permissions >= Permission.NONE && data.permissions <= Permission.ALL)) {\n throw new Error(\"Invalid permissions\");\n }\n if (data.owner && data.owner !== null && typeof data.owner !== \"string\") {\n throw new Error(\"Invalid owner type\");\n }\n if (data.attributes && typeof data.attributes !== \"object\") {\n throw new Error(\"Invalid attributes type\");\n }\n if (data.root && typeof data.root !== \"string\") {\n throw new Error(\"Invalid root type\");\n }\n if (data.root && !data.root.startsWith(\"/\")) {\n throw new Error(\"Root must start with a leading slash\");\n }\n if (data.root && !data.source.includes(data.root)) {\n throw new Error(\"Root must be part of the source\");\n }\n if (data.root && isDavRessource(data.source, davService)) {\n const service = data.source.match(davService)[0];\n if (!data.source.includes(join(service, data.root))) {\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n }\n if (data.status && !Object.values(NodeStatus).includes(data.status)) {\n throw new Error(\"Status must be a valid NodeStatus\");\n }\n};\nvar NodeStatus = /* @__PURE__ */ ((NodeStatus2) => {\n NodeStatus2[\"NEW\"] = \"new\";\n NodeStatus2[\"FAILED\"] = \"failed\";\n NodeStatus2[\"LOADING\"] = \"loading\";\n NodeStatus2[\"LOCKED\"] = \"locked\";\n return NodeStatus2;\n})(NodeStatus || {});\nclass Node {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n readonlyAttributes = Object.entries(Object.getOwnPropertyDescriptors(Node.prototype)).filter((e) => typeof e[1].get === \"function\" && e[0] !== \"__proto__\").map((e) => e[0]);\n handler = {\n set: (target, prop, value) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n return Reflect.set(target, prop, value);\n },\n deleteProperty: (target, prop) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n return Reflect.deleteProperty(target, prop);\n },\n // TODO: This is deprecated and only needed for files v3\n get: (target, prop, receiver) => {\n if (this.readonlyAttributes.includes(prop)) {\n logger.warn(`Accessing \"Node.attributes.${prop}\" is deprecated, access it directly on the Node instance.`);\n return Reflect.get(this, prop);\n }\n return Reflect.get(target, prop, receiver);\n }\n };\n constructor(data, davService) {\n validateData(data, davService || this._knownDavService);\n this._data = {\n // TODO: Remove with next major release, this is just for compatibility\n displayname: data.attributes?.displayname,\n ...data,\n attributes: {}\n };\n this._attributes = new Proxy(this._data.attributes, this.handler);\n this.update(data.attributes ?? {});\n if (davService) {\n this._knownDavService = davService;\n }\n }\n /**\n * Get the source url to this object\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get source() {\n return this._data.source.replace(/\\/$/i, \"\");\n }\n /**\n * Get the encoded source url to this object for requests purposes\n */\n get encodedSource() {\n const { origin } = new URL(this.source);\n return origin + encodePath(this.source.slice(origin.length));\n }\n /**\n * Get this object name\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get basename() {\n return basename(this.source);\n }\n /**\n * The nodes displayname\n * By default the display name and the `basename` are identical,\n * but it is possible to have a different name. This happens\n * on the files app for example for shared folders.\n */\n get displayname() {\n return this._data.displayname || this.basename;\n }\n /**\n * Set the displayname\n */\n set displayname(displayname) {\n this._data.displayname = displayname;\n }\n /**\n * Get this object's extension\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get extension() {\n return extname(this.source);\n }\n /**\n * Get the directory path leading to this object\n * Will use the relative path to root if available\n *\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get dirname() {\n if (this.root) {\n let source = this.source;\n if (this.isDavRessource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return dirname(source.slice(firstMatch + root.length) || \"/\");\n }\n const url = new URL(this.source);\n return dirname(url.pathname);\n }\n /**\n * Get the file mime\n * There is no setter as the mime is not meant to be changed\n */\n get mime() {\n return this._data.mime;\n }\n /**\n * Get the file modification time\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Set the file modification time\n */\n set mtime(mtime) {\n this._data.mtime = mtime;\n }\n /**\n * Get the file creation time\n * There is no setter as the creation time is not meant to be changed\n */\n get crtime() {\n return this._data.crtime;\n }\n /**\n * Get the file size\n */\n get size() {\n return this._data.size;\n }\n /**\n * Set the file size\n */\n set size(size) {\n this.updateMtime();\n this._data.size = size;\n }\n /**\n * Get the file attribute\n * This contains all additional attributes not provided by the Node class\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n if (this.owner === null && !this.isDavRessource) {\n return Permission.READ;\n }\n return this._data.permissions !== void 0 ? this._data.permissions : Permission.NONE;\n }\n /**\n * Set the file permissions\n */\n set permissions(permissions) {\n this.updateMtime();\n this._data.permissions = permissions;\n }\n /**\n * Get the file owner\n * There is no setter as the owner is not meant to be changed\n */\n get owner() {\n if (!this.isDavRessource) {\n return null;\n }\n return this._data.owner;\n }\n /**\n * Is this a dav-related ressource ?\n */\n get isDavRessource() {\n return isDavRessource(this.source, this._knownDavService);\n }\n /**\n * Get the dav root of this object\n * There is no setter as the root is not meant to be changed\n */\n get root() {\n if (this._data.root) {\n return this._data.root.replace(/^(.+)\\/$/, \"$1\");\n }\n if (this.isDavRessource) {\n const root = dirname(this.source);\n return root.split(this._knownDavService).pop() || null;\n }\n return null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n let source = this.source;\n if (this.isDavRessource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return source.slice(firstMatch + root.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * There is no setter as the fileid is not meant to be changed\n */\n get fileid() {\n return this._data?.id;\n }\n /**\n * Get the node status.\n */\n get status() {\n return this._data?.status;\n }\n /**\n * Set the node status.\n */\n set status(status) {\n this._data.status = status;\n }\n /**\n * Move the node to a new destination\n *\n * @param {string} destination the new source.\n * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n */\n move(destination) {\n validateData({ ...this._data, source: destination }, this._knownDavService);\n const oldBasename = this.basename;\n this._data.source = destination;\n if (this.displayname === oldBasename && this.basename !== oldBasename) {\n this.displayname = this.basename;\n }\n this.updateMtime();\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(basename2) {\n if (basename2.includes(\"/\")) {\n throw new Error(\"Invalid basename\");\n }\n this.move(dirname(this.source) + \"/\" + basename2);\n }\n /**\n * Update the mtime if exists\n */\n updateMtime() {\n if (this._data.mtime) {\n this._data.mtime = /* @__PURE__ */ new Date();\n }\n }\n /**\n * Update the attributes of the node\n * Warning, updating attributes will NOT automatically update the mtime.\n *\n * @param attributes The new attributes to update on the Node attributes\n */\n update(attributes) {\n for (const [name, value] of Object.entries(attributes)) {\n try {\n if (value === void 0) {\n delete this.attributes[name];\n } else {\n this.attributes[name] = value;\n }\n } catch (e) {\n if (e instanceof TypeError) {\n continue;\n }\n throw e;\n }\n }\n }\n}\nclass File extends Node {\n get type() {\n return FileType.File;\n }\n}\nclass Folder extends Node {\n constructor(data) {\n super({\n ...data,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return FileType.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\nfunction davGetRootPath() {\n if (isPublicShare()) {\n return `/files/${getSharingToken()}`;\n }\n return `/files/${getCurrentUser()?.uid}`;\n}\nconst davRootPath = davGetRootPath();\nfunction davGetRemoteURL() {\n const url = generateRemoteUrl(\"dav\");\n if (isPublicShare()) {\n return url.replace(\"remote.php\", \"public.php\");\n }\n return url;\n}\nconst davRemoteURL = davGetRemoteURL();\nconst davGetClient = function(remoteURL = davRemoteURL, headers = {}) {\n const client = createClient(remoteURL, { headers });\n function setHeaders(token) {\n client.setHeaders({\n ...headers,\n // Add this so the server knows it is an request from the browser\n \"X-Requested-With\": \"XMLHttpRequest\",\n // Inject user auth\n requesttoken: token ?? \"\"\n });\n }\n onRequestTokenUpdate(setHeaders);\n setHeaders(getRequestToken());\n const patcher = getPatcher();\n patcher.patch(\"fetch\", (url, options) => {\n const headers2 = options.headers;\n if (headers2?.method) {\n options.method = headers2.method;\n delete headers2.method;\n }\n return fetch(url, options);\n });\n return client;\n};\nconst getFavoriteNodes = (davClient, path = \"/\", davRoot = davRootPath) => {\n const controller = new AbortController();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const contentsResponse = await davClient.getDirectoryContents(`${davRoot}${path}`, {\n signal: controller.signal,\n details: true,\n data: davGetFavoritesReport(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: true\n });\n const nodes = contentsResponse.data.filter((node) => node.filename !== path).map((result) => davResultToNode(result, davRoot));\n resolve(nodes);\n } catch (error) {\n reject(error);\n }\n });\n};\nconst davResultToNode = function(node, filesRoot = davRootPath, remoteURL = davRemoteURL) {\n let userId = getCurrentUser()?.uid;\n if (isPublicShare()) {\n userId = userId ?? \"anonymous\";\n } else if (!userId) {\n throw new Error(\"No user id found\");\n }\n const props = node.props;\n const permissions = davParsePermissions(props?.permissions);\n const owner = String(props?.[\"owner-id\"] || userId);\n const id = props.fileid || 0;\n const nodeData = {\n id,\n source: `${remoteURL}${node.filename}`,\n mtime: new Date(Date.parse(node.lastmod)),\n mime: node.mime || \"application/octet-stream\",\n // Manually cast to work around for https://github.com/perry-mitchell/webdav-client/pull/380\n displayname: props.displayname !== void 0 ? String(props.displayname) : void 0,\n size: props?.size || Number.parseInt(props.getcontentlength || \"0\"),\n // The fileid is set to -1 for failed requests\n status: id < 0 ? NodeStatus.FAILED : void 0,\n permissions,\n owner,\n root: filesRoot,\n attributes: {\n ...node,\n ...props,\n hasPreview: props?.[\"has-preview\"]\n }\n };\n delete nodeData.attributes?.props;\n return node.type === \"file\" ? new File(nodeData) : new Folder(nodeData);\n};\nvar InvalidFilenameErrorReason = /* @__PURE__ */ ((InvalidFilenameErrorReason2) => {\n InvalidFilenameErrorReason2[\"ReservedName\"] = \"reserved name\";\n InvalidFilenameErrorReason2[\"Character\"] = \"character\";\n InvalidFilenameErrorReason2[\"Extension\"] = \"extension\";\n return InvalidFilenameErrorReason2;\n})(InvalidFilenameErrorReason || {});\nclass InvalidFilenameError extends Error {\n constructor(options) {\n super(`Invalid ${options.reason} '${options.segment}' in filename '${options.filename}'`, { cause: options });\n }\n /**\n * The filename that was validated\n */\n get filename() {\n return this.cause.filename;\n }\n /**\n * Reason why the validation failed\n */\n get reason() {\n return this.cause.reason;\n }\n /**\n * Part of the filename that caused this error\n */\n get segment() {\n return this.cause.segment;\n }\n}\nfunction validateFilename(filename) {\n const capabilities = getCapabilities().files;\n const forbiddenCharacters = capabilities.forbidden_filename_characters ?? window._oc_config?.forbidden_filenames_characters ?? [\"/\", \"\\\\\"];\n for (const character of forbiddenCharacters) {\n if (filename.includes(character)) {\n throw new InvalidFilenameError({ segment: character, reason: \"character\", filename });\n }\n }\n filename = filename.toLocaleLowerCase();\n const forbiddenFilenames = capabilities.forbidden_filenames ?? [\".htaccess\"];\n if (forbiddenFilenames.includes(filename)) {\n throw new InvalidFilenameError({\n filename,\n segment: filename,\n reason: \"reserved name\"\n /* ReservedName */\n });\n }\n const endOfBasename = filename.indexOf(\".\", 1);\n const basename2 = filename.substring(0, endOfBasename === -1 ? void 0 : endOfBasename);\n const forbiddenFilenameBasenames = capabilities.forbidden_filename_basenames ?? [];\n if (forbiddenFilenameBasenames.includes(basename2)) {\n throw new InvalidFilenameError({\n filename,\n segment: basename2,\n reason: \"reserved name\"\n /* ReservedName */\n });\n }\n const forbiddenFilenameExtensions = capabilities.forbidden_filename_extensions ?? [\".part\", \".filepart\"];\n for (const extension of forbiddenFilenameExtensions) {\n if (filename.length > extension.length && filename.endsWith(extension)) {\n throw new InvalidFilenameError({ segment: extension, reason: \"extension\", filename });\n }\n }\n}\nfunction isFilenameValid(filename) {\n try {\n validateFilename(filename);\n return true;\n } catch (error) {\n if (error instanceof InvalidFilenameError) {\n return false;\n }\n throw error;\n }\n}\nfunction getUniqueName(name, otherNames, options) {\n const opts = {\n suffix: (n) => `(${n})`,\n ignoreFileExtension: false,\n ...options\n };\n let newName = name;\n let i = 1;\n while (otherNames.includes(newName)) {\n const ext = opts.ignoreFileExtension ? \"\" : extname(name);\n const base = basename(name, ext);\n newName = `${base} ${opts.suffix(i++)}${ext}`;\n }\n return newName;\n}\nconst humanList = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"];\nconst humanListBinary = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction formatFileSize(size, skipSmallSizes = false, binaryPrefixes = false, base1000 = false) {\n binaryPrefixes = binaryPrefixes && !base1000;\n if (typeof size === \"string\") {\n size = Number(size);\n }\n let order = size > 0 ? Math.floor(Math.log(size) / Math.log(base1000 ? 1e3 : 1024)) : 0;\n order = Math.min((binaryPrefixes ? humanListBinary.length : humanList.length) - 1, order);\n const readableFormat = binaryPrefixes ? humanListBinary[order] : humanList[order];\n let relativeSize = (size / Math.pow(base1000 ? 1e3 : 1024, order)).toFixed(1);\n if (skipSmallSizes === true && order === 0) {\n return (relativeSize !== \"0.0\" ? \"< 1 \" : \"0 \") + (binaryPrefixes ? humanListBinary[1] : humanList[1]);\n }\n if (order < 2) {\n relativeSize = parseFloat(relativeSize).toFixed(0);\n } else {\n relativeSize = parseFloat(relativeSize).toLocaleString(getCanonicalLocale());\n }\n return relativeSize + \" \" + readableFormat;\n}\nfunction parseFileSize(value, forceBinary = false) {\n try {\n value = `${value}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch (e) {\n return null;\n }\n const match = value.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (match === null || match[1] === \".\" || match[1] === \"\") {\n return null;\n }\n const bytesArray = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n };\n const decimalString = `${match[1]}`;\n const base = match[4] === \"i\" || forceBinary ? 1024 : 1e3;\n return Math.round(Number.parseFloat(decimalString) * base ** bytesArray[match[3]]);\n}\nfunction stringify(value) {\n if (value instanceof Date) {\n return value.toISOString();\n }\n return String(value);\n}\nfunction orderBy(collection, identifiers2, orders) {\n identifiers2 = identifiers2 ?? [(value) => value];\n orders = orders ?? [];\n const sorting = identifiers2.map((_, index) => (orders[index] ?? \"asc\") === \"asc\" ? 1 : -1);\n const collator = Intl.Collator(\n [getLanguage(), getCanonicalLocale()],\n {\n // handle 10 as ten and not as one-zero\n numeric: true,\n usage: \"sort\"\n }\n );\n return [...collection].sort((a, b) => {\n for (const [index, identifier] of identifiers2.entries()) {\n const value = collator.compare(stringify(identifier(a)), stringify(identifier(b)));\n if (value !== 0) {\n return value * sorting[index];\n }\n }\n return 0;\n });\n}\nvar FilesSortingMode = /* @__PURE__ */ ((FilesSortingMode2) => {\n FilesSortingMode2[\"Name\"] = \"basename\";\n FilesSortingMode2[\"Modified\"] = \"mtime\";\n FilesSortingMode2[\"Size\"] = \"size\";\n return FilesSortingMode2;\n})(FilesSortingMode || {});\nfunction sortNodes(nodes, options = {}) {\n const sortingOptions = {\n // Default to sort by name\n sortingMode: \"basename\",\n // Default to sort ascending\n sortingOrder: \"asc\",\n ...options\n };\n const basename2 = (name) => name.lastIndexOf(\".\") > 0 ? name.slice(0, name.lastIndexOf(\".\")) : name;\n const identifiers2 = [\n // 1: Sort favorites first if enabled\n ...sortingOptions.sortFavoritesFirst ? [(v) => v.attributes?.favorite !== 1] : [],\n // 2: Sort folders first if sorting by name\n ...sortingOptions.sortFoldersFirst ? [(v) => v.type !== \"folder\"] : [],\n // 3: Use sorting mode if NOT basename (to be able to use display name too)\n ...sortingOptions.sortingMode !== \"basename\" ? [(v) => v[sortingOptions.sortingMode]] : [],\n // 4: Use display name if available, fallback to name\n (v) => basename2(v.attributes?.displayname || v.basename),\n // 5: Finally, use basename if all previous sorting methods failed\n (v) => v.basename\n ];\n const orders = [\n // (for 1): always sort favorites before normal files\n ...sortingOptions.sortFavoritesFirst ? [\"asc\"] : [],\n // (for 2): always sort folders before files\n ...sortingOptions.sortFoldersFirst ? [\"asc\"] : [],\n // (for 3): Reverse if sorting by mtime as mtime higher means edited more recent -> lower\n ...sortingOptions.sortingMode === \"mtime\" ? [sortingOptions.sortingOrder === \"asc\" ? \"desc\" : \"asc\"] : [],\n // (also for 3 so make sure not to conflict with 2 and 3)\n ...sortingOptions.sortingMode !== \"mtime\" && sortingOptions.sortingMode !== \"basename\" ? [sortingOptions.sortingOrder] : [],\n // for 4: use configured sorting direction\n sortingOptions.sortingOrder,\n // for 5: use configured sorting direction\n sortingOptions.sortingOrder\n ];\n return orderBy(nodes, identifiers2, orders);\n}\nclass Navigation extends TypedEventTarget {\n _views = [];\n _currentView = null;\n /**\n * Register a new view on the navigation\n * @param view The view to register\n * @throws `Error` is thrown if a view with the same id is already registered\n */\n register(view) {\n if (this._views.find((search) => search.id === view.id)) {\n throw new Error(`View id ${view.id} is already registered`);\n }\n this._views.push(view);\n this.dispatchTypedEvent(\"update\", new CustomEvent(\"update\"));\n }\n /**\n * Remove a registered view\n * @param id The id of the view to remove\n */\n remove(id) {\n const index = this._views.findIndex((view) => view.id === id);\n if (index !== -1) {\n this._views.splice(index, 1);\n this.dispatchTypedEvent(\"update\", new CustomEvent(\"update\"));\n }\n }\n /**\n * Set the currently active view\n * @fires UpdateActiveViewEvent\n * @param view New active view\n */\n setActive(view) {\n this._currentView = view;\n const event = new CustomEvent(\"updateActive\", { detail: view });\n this.dispatchTypedEvent(\"updateActive\", event);\n }\n /**\n * The currently active files view\n */\n get active() {\n return this._currentView;\n }\n /**\n * All registered views\n */\n get views() {\n return this._views;\n }\n}\nconst getNavigation = function() {\n if (typeof window._nc_navigation === \"undefined\") {\n window._nc_navigation = new Navigation();\n logger.debug(\"Navigation service initialized\");\n }\n return window._nc_navigation;\n};\nclass Column {\n _column;\n constructor(column) {\n isValidColumn(column);\n this._column = column;\n }\n get id() {\n return this._column.id;\n }\n get title() {\n return this._column.title;\n }\n get render() {\n return this._column.render;\n }\n get sort() {\n return this._column.sort;\n }\n get summary() {\n return this._column.summary;\n }\n}\nconst isValidColumn = function(column) {\n if (!column.id || typeof column.id !== \"string\") {\n throw new Error(\"A column id is required\");\n }\n if (!column.title || typeof column.title !== \"string\") {\n throw new Error(\"A column title is required\");\n }\n if (!column.render || typeof column.render !== \"function\") {\n throw new Error(\"A render function is required\");\n }\n if (column.sort && typeof column.sort !== \"function\") {\n throw new Error(\"Column sortFunction must be a function\");\n }\n if (column.summary && typeof column.summary !== \"function\") {\n throw new Error(\"Column summary must be a function\");\n }\n return true;\n};\nfunction getDefaultExportFromCjs(x) {\n return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, \"default\") ? x[\"default\"] : x;\n}\nvar validator$2 = {};\nvar util$3 = {};\n(function(exports) {\n const nameStartChar = \":A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n const nameChar = nameStartChar + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n const nameRegexp = \"[\" + nameStartChar + \"][\" + nameChar + \"]*\";\n const regexName = new RegExp(\"^\" + nameRegexp + \"$\");\n const getAllMatches = function(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n };\n const isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === \"undefined\");\n };\n exports.isExist = function(v) {\n return typeof v !== \"undefined\";\n };\n exports.isEmptyObject = function(obj) {\n return Object.keys(obj).length === 0;\n };\n exports.merge = function(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a);\n const len = keys.length;\n for (let i = 0; i < len; i++) {\n if (arrayMode === \"strict\") {\n target[keys[i]] = [a[keys[i]]];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n };\n exports.getValue = function(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return \"\";\n }\n };\n exports.isName = isName;\n exports.getAllMatches = getAllMatches;\n exports.nameRegexp = nameRegexp;\n})(util$3);\nconst util$2 = util$3;\nconst defaultOptions$2 = {\n allowBooleanAttributes: false,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nvalidator$2.validate = function(xmlData, options) {\n options = Object.assign({}, defaultOptions$2, options);\n const tags = [];\n let tagFound = false;\n let reachedRoot = false;\n if (xmlData[0] === \"\\uFEFF\") {\n xmlData = xmlData.substr(1);\n }\n for (let i = 0; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\" && xmlData[i + 1] === \"?\") {\n i += 2;\n i = readPI(xmlData, i);\n if (i.err) return i;\n } else if (xmlData[i] === \"<\") {\n let tagStartPos = i;\n i++;\n if (xmlData[i] === \"!\") {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === \"/\") {\n closingTag = true;\n i++;\n }\n let tagName = \"\";\n for (; i < xmlData.length && xmlData[i] !== \">\" && xmlData[i] !== \" \" && xmlData[i] !== \"\t\" && xmlData[i] !== \"\\n\" && xmlData[i] !== \"\\r\"; i++) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substring(0, tagName.length - 1);\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\" + tagName + \"' is an invalid name.\";\n }\n return getErrorObject(\"InvalidTag\", msg, getLineNumberForPosition(xmlData, i));\n }\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject(\"InvalidAttr\", \"Attributes for '\" + tagName + \"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n if (attrStr[attrStr.length - 1] === \"/\") {\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n } else {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else if (tags.length === 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' has not been opened.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject(\n \"InvalidTag\",\n \"Expected closing tag '\" + otg.tagName + \"' (opened in line \" + openPos.line + \", col \" + openPos.col + \") instead of closing tag '\" + tagName + \"'.\",\n getLineNumberForPosition(xmlData, tagStartPos)\n );\n }\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n if (reachedRoot === true) {\n return getErrorObject(\"InvalidXml\", \"Multiple possible root nodes found.\", getLineNumberForPosition(xmlData, i));\n } else if (options.unpairedTags.indexOf(tagName) !== -1) ;\n else {\n tags.push({ tagName, tagStartPos });\n }\n tagFound = true;\n }\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n if (xmlData[i + 1] === \"!\") {\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i + 1] === \"?\") {\n i = readPI(xmlData, ++i);\n if (i.err) return i;\n } else {\n break;\n }\n } else if (xmlData[i] === \"&\") {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject(\"InvalidChar\", \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n } else {\n if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {\n return getErrorObject(\"InvalidXml\", \"Extra text at the end\", getLineNumberForPosition(xmlData, i));\n }\n }\n }\n if (xmlData[i] === \"<\") {\n i--;\n }\n }\n } else {\n if (isWhiteSpace(xmlData[i])) {\n continue;\n }\n return getErrorObject(\"InvalidChar\", \"char '\" + xmlData[i] + \"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n if (!tagFound) {\n return getErrorObject(\"InvalidXml\", \"Start tag expected.\", 1);\n } else if (tags.length == 1) {\n return getErrorObject(\"InvalidTag\", \"Unclosed tag '\" + tags[0].tagName + \"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n } else if (tags.length > 0) {\n return getErrorObject(\"InvalidXml\", \"Invalid '\" + JSON.stringify(tags.map((t2) => t2.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n }\n return true;\n};\nfunction isWhiteSpace(char) {\n return char === \" \" || char === \"\t\" || char === \"\\n\" || char === \"\\r\";\n}\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == \"?\" || xmlData[i] == \" \") {\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === \"xml\") {\n return getErrorObject(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == \"?\" && xmlData[i + 1] == \">\") {\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === \"-\" && xmlData[i + 2] === \"-\") {\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === \"-\" && xmlData[i + 1] === \"-\" && xmlData[i + 2] === \">\") {\n i += 2;\n break;\n }\n }\n } else if (xmlData.length > i + 8 && xmlData[i + 1] === \"D\" && xmlData[i + 2] === \"O\" && xmlData[i + 3] === \"C\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"Y\" && xmlData[i + 6] === \"P\" && xmlData[i + 7] === \"E\") {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n angleBracketsCount++;\n } else if (xmlData[i] === \">\") {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (xmlData.length > i + 9 && xmlData[i + 1] === \"[\" && xmlData[i + 2] === \"C\" && xmlData[i + 3] === \"D\" && xmlData[i + 4] === \"A\" && xmlData[i + 5] === \"T\" && xmlData[i + 6] === \"A\" && xmlData[i + 7] === \"[\") {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === \"]\" && xmlData[i + 1] === \"]\" && xmlData[i + 2] === \">\") {\n i += 2;\n break;\n }\n }\n }\n return i;\n}\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\nfunction readAttributeStr(xmlData, i) {\n let attrStr = \"\";\n let startChar = \"\";\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === \"\") {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i]) ;\n else {\n startChar = \"\";\n }\n } else if (xmlData[i] === \">\") {\n if (startChar === \"\") {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== \"\") {\n return false;\n }\n return {\n value: attrStr,\n index: i,\n tagClosed\n };\n}\nconst validAttrStrRegxp = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction validateAttributeString(attrStr, options) {\n const matches = util$2.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i][2] + \"' has no space in starting.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i][2] + \"' is without value.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) {\n return getErrorObject(\"InvalidAttr\", \"boolean attribute '\" + matches[i][2] + \"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n attrNames[attrName] = 1;\n } else {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n return true;\n}\nfunction validateNumberAmpersand(xmlData, i) {\n let re2 = /\\d/;\n if (xmlData[i] === \"x\") {\n i++;\n re2 = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \";\")\n return i;\n if (!xmlData[i].match(re2))\n break;\n }\n return -1;\n}\nfunction validateAmpersand(xmlData, i) {\n i++;\n if (xmlData[i] === \";\")\n return -1;\n if (xmlData[i] === \"#\") {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === \";\")\n break;\n return -1;\n }\n return i;\n}\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col\n }\n };\n}\nfunction validateAttrName(attrName) {\n return util$2.isName(attrName);\n}\nfunction validateTagName(tagname) {\n return util$2.isName(tagname);\n}\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\nvar OptionsBuilder = {};\nconst defaultOptions$1 = {\n preserveOrder: false,\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n removeNSPrefix: false,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true,\n //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function(tagName, val2) {\n return val2;\n },\n attributeValueProcessor: function(attrName, val2) {\n return val2;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n updateTag: function(tagName, jPath, attrs) {\n return tagName;\n }\n // skipEmptyListItem: false\n};\nconst buildOptions$1 = function(options) {\n return Object.assign({}, defaultOptions$1, options);\n};\nOptionsBuilder.buildOptions = buildOptions$1;\nOptionsBuilder.defaultOptions = defaultOptions$1;\nclass XmlNode {\n constructor(tagname) {\n this.tagname = tagname;\n this.child = [];\n this[\":@\"] = {};\n }\n add(key, val2) {\n if (key === \"__proto__\") key = \"#__proto__\";\n this.child.push({ [key]: val2 });\n }\n addChild(node) {\n if (node.tagname === \"__proto__\") node.tagname = \"#__proto__\";\n if (node[\":@\"] && Object.keys(node[\":@\"]).length > 0) {\n this.child.push({ [node.tagname]: node.child, [\":@\"]: node[\":@\"] });\n } else {\n this.child.push({ [node.tagname]: node.child });\n }\n }\n}\nvar xmlNode$1 = XmlNode;\nconst util$1 = util$3;\nfunction readDocType$1(xmlData, i) {\n const entities = {};\n if (xmlData[i + 3] === \"O\" && xmlData[i + 4] === \"C\" && xmlData[i + 5] === \"T\" && xmlData[i + 6] === \"Y\" && xmlData[i + 7] === \"P\" && xmlData[i + 8] === \"E\") {\n i = i + 9;\n let angleBracketsCount = 1;\n let hasBody = false, comment = false;\n let exp = \"\";\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\" && !comment) {\n if (hasBody && isEntity(xmlData, i)) {\n i += 7;\n [entityName, val, i] = readEntityExp(xmlData, i + 1);\n if (val.indexOf(\"&\") === -1)\n entities[validateEntityName(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n };\n } else if (hasBody && isElement(xmlData, i)) i += 8;\n else if (hasBody && isAttlist(xmlData, i)) i += 8;\n else if (hasBody && isNotation(xmlData, i)) i += 9;\n else if (isComment) comment = true;\n else throw new Error(\"Invalid DOCTYPE\");\n angleBracketsCount++;\n exp = \"\";\n } else if (xmlData[i] === \">\") {\n if (comment) {\n if (xmlData[i - 1] === \"-\" && xmlData[i - 2] === \"-\") {\n comment = false;\n angleBracketsCount--;\n }\n } else {\n angleBracketsCount--;\n }\n if (angleBracketsCount === 0) {\n break;\n }\n } else if (xmlData[i] === \"[\") {\n hasBody = true;\n } else {\n exp += xmlData[i];\n }\n }\n if (angleBracketsCount !== 0) {\n throw new Error(`Unclosed DOCTYPE`);\n }\n } else {\n throw new Error(`Invalid Tag instead of DOCTYPE`);\n }\n return { entities, i };\n}\nfunction readEntityExp(xmlData, i) {\n let entityName2 = \"\";\n for (; i < xmlData.length && (xmlData[i] !== \"'\" && xmlData[i] !== '\"'); i++) {\n entityName2 += xmlData[i];\n }\n entityName2 = entityName2.trim();\n if (entityName2.indexOf(\" \") !== -1) throw new Error(\"External entites are not supported\");\n const startChar = xmlData[i++];\n let val2 = \"\";\n for (; i < xmlData.length && xmlData[i] !== startChar; i++) {\n val2 += xmlData[i];\n }\n return [entityName2, val2, i];\n}\nfunction isComment(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"-\" && xmlData[i + 3] === \"-\") return true;\n return false;\n}\nfunction isEntity(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"E\" && xmlData[i + 3] === \"N\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"I\" && xmlData[i + 6] === \"T\" && xmlData[i + 7] === \"Y\") return true;\n return false;\n}\nfunction isElement(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"E\" && xmlData[i + 3] === \"L\" && xmlData[i + 4] === \"E\" && xmlData[i + 5] === \"M\" && xmlData[i + 6] === \"E\" && xmlData[i + 7] === \"N\" && xmlData[i + 8] === \"T\") return true;\n return false;\n}\nfunction isAttlist(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"A\" && xmlData[i + 3] === \"T\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"L\" && xmlData[i + 6] === \"I\" && xmlData[i + 7] === \"S\" && xmlData[i + 8] === \"T\") return true;\n return false;\n}\nfunction isNotation(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"N\" && xmlData[i + 3] === \"O\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"A\" && xmlData[i + 6] === \"T\" && xmlData[i + 7] === \"I\" && xmlData[i + 8] === \"O\" && xmlData[i + 9] === \"N\") return true;\n return false;\n}\nfunction validateEntityName(name) {\n if (util$1.isName(name))\n return name;\n else\n throw new Error(`Invalid entity name ${name}`);\n}\nvar DocTypeReader = readDocType$1;\nconst hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\nif (!Number.parseInt && window.parseInt) {\n Number.parseInt = window.parseInt;\n}\nif (!Number.parseFloat && window.parseFloat) {\n Number.parseFloat = window.parseFloat;\n}\nconst consider = {\n hex: true,\n leadingZeros: true,\n decimalPoint: \".\",\n eNotation: true\n //skipLike: /regex/\n};\nfunction toNumber$1(str, options = {}) {\n options = Object.assign({}, consider, options);\n if (!str || typeof str !== \"string\") return str;\n let trimmedStr = str.trim();\n if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str;\n else if (options.hex && hexRegex.test(trimmedStr)) {\n return Number.parseInt(trimmedStr, 16);\n } else {\n const match = numRegex.exec(trimmedStr);\n if (match) {\n const sign = match[1];\n const leadingZeros = match[2];\n let numTrimmedByZeros = trimZeros(match[3]);\n const eNotation = match[4] || match[6];\n if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== \".\") return str;\n else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== \".\") return str;\n else {\n const num = Number(trimmedStr);\n const numStr = \"\" + num;\n if (numStr.search(/[eE]/) !== -1) {\n if (options.eNotation) return num;\n else return str;\n } else if (eNotation) {\n if (options.eNotation) return num;\n else return str;\n } else if (trimmedStr.indexOf(\".\") !== -1) {\n if (numStr === \"0\" && numTrimmedByZeros === \"\") return num;\n else if (numStr === numTrimmedByZeros) return num;\n else if (sign && numStr === \"-\" + numTrimmedByZeros) return num;\n else return str;\n }\n if (leadingZeros) {\n if (numTrimmedByZeros === numStr) return num;\n else if (sign + numTrimmedByZeros === numStr) return num;\n else return str;\n }\n if (trimmedStr === numStr) return num;\n else if (trimmedStr === sign + numStr) return num;\n return str;\n }\n } else {\n return str;\n }\n }\n}\nfunction trimZeros(numStr) {\n if (numStr && numStr.indexOf(\".\") !== -1) {\n numStr = numStr.replace(/0+$/, \"\");\n if (numStr === \".\") numStr = \"0\";\n else if (numStr[0] === \".\") numStr = \"0\" + numStr;\n else if (numStr[numStr.length - 1] === \".\") numStr = numStr.substr(0, numStr.length - 1);\n return numStr;\n }\n return numStr;\n}\nvar strnum = toNumber$1;\nconst util = util$3;\nconst xmlNode = xmlNode$1;\nconst readDocType = DocTypeReader;\nconst toNumber = strnum;\nlet OrderedObjParser$1 = class OrderedObjParser {\n constructor(options) {\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.docTypeEntities = {};\n this.lastEntities = {\n \"apos\": { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n \"gt\": { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n \"lt\": { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n \"quot\": { regex: /&(quot|#34|#x22);/g, val: '\"' }\n };\n this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" };\n this.htmlEntities = {\n \"space\": { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n \"cent\": { regex: /&(cent|#162);/g, val: \"¢\" },\n \"pound\": { regex: /&(pound|#163);/g, val: \"£\" },\n \"yen\": { regex: /&(yen|#165);/g, val: \"¥\" },\n \"euro\": { regex: /&(euro|#8364);/g, val: \"€\" },\n \"copyright\": { regex: /&(copy|#169);/g, val: \"©\" },\n \"reg\": { regex: /&(reg|#174);/g, val: \"®\" },\n \"inr\": { regex: /&(inr|#8377);/g, val: \"₹\" },\n \"num_dec\": { regex: /&#([0-9]{1,7});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 10)) },\n \"num_hex\": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 16)) }\n };\n this.addExternalEntities = addExternalEntities;\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue$1;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n this.addChild = addChild;\n }\n};\nfunction addExternalEntities(externalEntities) {\n const entKeys = Object.keys(externalEntities);\n for (let i = 0; i < entKeys.length; i++) {\n const ent = entKeys[i];\n this.lastEntities[ent] = {\n regex: new RegExp(\"&\" + ent + \";\", \"g\"),\n val: externalEntities[ent]\n };\n }\n}\nfunction parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n if (val2 !== void 0) {\n if (this.options.trimValues && !dontTrim) {\n val2 = val2.trim();\n }\n if (val2.length > 0) {\n if (!escapeEntities) val2 = this.replaceEntitiesValue(val2);\n const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode);\n if (newval === null || newval === void 0) {\n return val2;\n } else if (typeof newval !== typeof val2 || newval !== val2) {\n return newval;\n } else if (this.options.trimValues) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n const trimmedVal = val2.trim();\n if (trimmedVal === val2) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n return val2;\n }\n }\n }\n }\n}\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(\":\");\n const prefix = tagname.charAt(0) === \"/\" ? \"/\" : \"\";\n if (tags[0] === \"xmlns\") {\n return \"\";\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\nconst attrsRegx = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction buildAttributesMap(attrStr, jPath, tagName) {\n if (!this.options.ignoreAttributes && typeof attrStr === \"string\") {\n const matches = util.getAllMatches(attrStr, attrsRegx);\n const len = matches.length;\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n let oldVal = matches[i][4];\n let aName = this.options.attributeNamePrefix + attrName;\n if (attrName.length) {\n if (this.options.transformAttributeName) {\n aName = this.options.transformAttributeName(aName);\n }\n if (aName === \"__proto__\") aName = \"#__proto__\";\n if (oldVal !== void 0) {\n if (this.options.trimValues) {\n oldVal = oldVal.trim();\n }\n oldVal = this.replaceEntitiesValue(oldVal);\n const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);\n if (newVal === null || newVal === void 0) {\n attrs[aName] = oldVal;\n } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) {\n attrs[aName] = newVal;\n } else {\n attrs[aName] = parseValue(\n oldVal,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n }\n } else if (this.options.allowBooleanAttributes) {\n attrs[aName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (this.options.attributesGroupName) {\n const attrCollection = {};\n attrCollection[this.options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs;\n }\n}\nconst parseXml = function(xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\");\n const xmlObj = new xmlNode(\"!xml\");\n let currentNode = xmlObj;\n let textData = \"\";\n let jPath = \"\";\n for (let i = 0; i < xmlData.length; i++) {\n const ch = xmlData[i];\n if (ch === \"<\") {\n if (xmlData[i + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\");\n let tagName = xmlData.substring(i + 2, closeIndex).trim();\n if (this.options.removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n }\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode) {\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n }\n const lastTagName = jPath.substring(jPath.lastIndexOf(\".\") + 1);\n if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) {\n throw new Error(`Unpaired tag can not be used as closing tag: `);\n }\n let propIndex = 0;\n if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) {\n propIndex = jPath.lastIndexOf(\".\", jPath.lastIndexOf(\".\") - 1);\n this.tagsNodeStack.pop();\n } else {\n propIndex = jPath.lastIndexOf(\".\");\n }\n jPath = jPath.substring(0, propIndex);\n currentNode = this.tagsNodeStack.pop();\n textData = \"\";\n i = closeIndex;\n } else if (xmlData[i + 1] === \"?\") {\n let tagData = readTagExp(xmlData, i, false, \"?>\");\n if (!tagData) throw new Error(\"Pi Tag is not closed.\");\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n if (this.options.ignoreDeclaration && tagData.tagName === \"?xml\" || this.options.ignorePiTags) ;\n else {\n const childNode = new xmlNode(tagData.tagName);\n childNode.add(this.options.textNodeName, \"\");\n if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n }\n i = tagData.closeIndex + 1;\n } else if (xmlData.substr(i + 1, 3) === \"!--\") {\n const endIndex = findClosingIndex(xmlData, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const comment = xmlData.substring(i + 4, endIndex - 2);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]);\n }\n i = endIndex;\n } else if (xmlData.substr(i + 1, 2) === \"!D\") {\n const result = readDocType(xmlData, i);\n this.docTypeEntities = result.entities;\n i = result.i;\n } else if (xmlData.substr(i + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i + 9, closeIndex);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true);\n if (val2 == void 0) val2 = \"\";\n if (this.options.cdataPropName) {\n currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]);\n } else {\n currentNode.add(this.options.textNodeName, val2);\n }\n i = closeIndex + 2;\n } else {\n let result = readTagExp(xmlData, i, this.options.removeNSPrefix);\n let tagName = result.tagName;\n const rawTagName = result.rawTagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode && textData) {\n if (currentNode.tagname !== \"!xml\") {\n textData = this.saveTextToParentTag(textData, currentNode, jPath, false);\n }\n }\n const lastTag = currentNode;\n if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) {\n currentNode = this.tagsNodeStack.pop();\n jPath = jPath.substring(0, jPath.lastIndexOf(\".\"));\n }\n if (tagName !== xmlObj.tagname) {\n jPath += jPath ? \".\" + tagName : tagName;\n }\n if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) {\n let tagContent = \"\";\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n i = result.closeIndex;\n } else if (this.options.unpairedTags.indexOf(tagName) !== -1) {\n i = result.closeIndex;\n } else {\n const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);\n if (!result2) throw new Error(`Unexpected end of ${rawTagName}`);\n i = result2.i;\n tagContent = result2.tagContent;\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n if (tagContent) {\n tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);\n }\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n childNode.add(this.options.textNodeName, tagContent);\n this.addChild(currentNode, childNode, jPath);\n } else {\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n } else {\n const childNode = new xmlNode(tagName);\n this.tagsNodeStack.push(currentNode);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }\n } else {\n textData += xmlData[i];\n }\n }\n return xmlObj.child;\n};\nfunction addChild(currentNode, childNode, jPath) {\n const result = this.options.updateTag(childNode.tagname, jPath, childNode[\":@\"]);\n if (result === false) ;\n else if (typeof result === \"string\") {\n childNode.tagname = result;\n currentNode.addChild(childNode);\n } else {\n currentNode.addChild(childNode);\n }\n}\nconst replaceEntitiesValue$1 = function(val2) {\n if (this.options.processEntities) {\n for (let entityName2 in this.docTypeEntities) {\n const entity = this.docTypeEntities[entityName2];\n val2 = val2.replace(entity.regx, entity.val);\n }\n for (let entityName2 in this.lastEntities) {\n const entity = this.lastEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n if (this.options.htmlEntities) {\n for (let entityName2 in this.htmlEntities) {\n const entity = this.htmlEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n }\n val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return val2;\n};\nfunction saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {\n if (textData) {\n if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0;\n textData = this.parseTextData(\n textData,\n currentNode.tagname,\n jPath,\n false,\n currentNode[\":@\"] ? Object.keys(currentNode[\":@\"]).length !== 0 : false,\n isLeafNode\n );\n if (textData !== void 0 && textData !== \"\")\n currentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\nfunction isItStopNode(stopNodes, jPath, currentTagName) {\n const allNodesExp = \"*.\" + currentTagName;\n for (const stopNodePath in stopNodes) {\n const stopNodeExp = stopNodes[stopNodePath];\n if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true;\n }\n return false;\n}\nfunction tagExpWithClosingIndex(xmlData, i, closingChar = \">\") {\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < xmlData.length; index++) {\n let ch = xmlData[index];\n if (attrBoundary) {\n if (ch === attrBoundary) attrBoundary = \"\";\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === closingChar[0]) {\n if (closingChar[1]) {\n if (xmlData[index + 1] === closingChar[1]) {\n return {\n data: tagExp,\n index\n };\n }\n } else {\n return {\n data: tagExp,\n index\n };\n }\n } else if (ch === \"\t\") {\n ch = \" \";\n }\n tagExp += ch;\n }\n}\nfunction findClosingIndex(xmlData, str, i, errMsg) {\n const closingIndex = xmlData.indexOf(str, i);\n if (closingIndex === -1) {\n throw new Error(errMsg);\n } else {\n return closingIndex + str.length - 1;\n }\n}\nfunction readTagExp(xmlData, i, removeNSPrefix, closingChar = \">\") {\n const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar);\n if (!result) return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if (separatorIndex !== -1) {\n tagName = tagExp.substring(0, separatorIndex);\n tagExp = tagExp.substring(separatorIndex + 1).trimStart();\n }\n const rawTagName = tagName;\n if (removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n return {\n tagName,\n tagExp,\n closeIndex,\n attrExpPresent,\n rawTagName\n };\n}\nfunction readStopNodeData(xmlData, tagName, i) {\n const startIndex = i;\n let openTagCount = 1;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n if (xmlData[i + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i + 2, closeIndex).trim();\n if (closeTagName === tagName) {\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i),\n i: closeIndex\n };\n }\n }\n i = closeIndex;\n } else if (xmlData[i + 1] === \"?\") {\n const closeIndex = findClosingIndex(xmlData, \"?>\", i + 1, \"StopNode is not closed.\");\n i = closeIndex;\n } else if (xmlData.substr(i + 1, 3) === \"!--\") {\n const closeIndex = findClosingIndex(xmlData, \"-->\", i + 3, \"StopNode is not closed.\");\n i = closeIndex;\n } else if (xmlData.substr(i + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"StopNode is not closed.\") - 2;\n i = closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i, \">\");\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== \"/\") {\n openTagCount++;\n }\n i = tagData.closeIndex;\n }\n }\n }\n }\n}\nfunction parseValue(val2, shouldParse, options) {\n if (shouldParse && typeof val2 === \"string\") {\n const newval = val2.trim();\n if (newval === \"true\") return true;\n else if (newval === \"false\") return false;\n else return toNumber(val2, options);\n } else {\n if (util.isExist(val2)) {\n return val2;\n } else {\n return \"\";\n }\n }\n}\nvar OrderedObjParser_1 = OrderedObjParser$1;\nvar node2json = {};\nfunction prettify$1(node, options) {\n return compress(node, options);\n}\nfunction compress(arr, options, jPath) {\n let text;\n const compressedObj = {};\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const property = propName$1(tagObj);\n let newJpath = \"\";\n if (jPath === void 0) newJpath = property;\n else newJpath = jPath + \".\" + property;\n if (property === options.textNodeName) {\n if (text === void 0) text = tagObj[property];\n else text += \"\" + tagObj[property];\n } else if (property === void 0) {\n continue;\n } else if (tagObj[property]) {\n let val2 = compress(tagObj[property], options, newJpath);\n const isLeaf = isLeafTag(val2, options);\n if (tagObj[\":@\"]) {\n assignAttributes(val2, tagObj[\":@\"], newJpath, options);\n } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) {\n val2 = val2[options.textNodeName];\n } else if (Object.keys(val2).length === 0) {\n if (options.alwaysCreateTextNode) val2[options.textNodeName] = \"\";\n else val2 = \"\";\n }\n if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) {\n if (!Array.isArray(compressedObj[property])) {\n compressedObj[property] = [compressedObj[property]];\n }\n compressedObj[property].push(val2);\n } else {\n if (options.isArray(property, newJpath, isLeaf)) {\n compressedObj[property] = [val2];\n } else {\n compressedObj[property] = val2;\n }\n }\n }\n }\n if (typeof text === \"string\") {\n if (text.length > 0) compressedObj[options.textNodeName] = text;\n } else if (text !== void 0) compressedObj[options.textNodeName] = text;\n return compressedObj;\n}\nfunction propName$1(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (key !== \":@\") return key;\n }\n}\nfunction assignAttributes(obj, attrMap, jpath, options) {\n if (attrMap) {\n const keys = Object.keys(attrMap);\n const len = keys.length;\n for (let i = 0; i < len; i++) {\n const atrrName = keys[i];\n if (options.isArray(atrrName, jpath + \".\" + atrrName, true, true)) {\n obj[atrrName] = [attrMap[atrrName]];\n } else {\n obj[atrrName] = attrMap[atrrName];\n }\n }\n }\n}\nfunction isLeafTag(obj, options) {\n const { textNodeName } = options;\n const propCount = Object.keys(obj).length;\n if (propCount === 0) {\n return true;\n }\n if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === \"boolean\" || obj[textNodeName] === 0)) {\n return true;\n }\n return false;\n}\nnode2json.prettify = prettify$1;\nconst { buildOptions } = OptionsBuilder;\nconst OrderedObjParser2 = OrderedObjParser_1;\nconst { prettify } = node2json;\nconst validator$1 = validator$2;\nlet XMLParser$1 = class XMLParser {\n constructor(options) {\n this.externalEntities = {};\n this.options = buildOptions(options);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(xmlData, validationOption) {\n if (typeof xmlData === \"string\") ;\n else if (xmlData.toString) {\n xmlData = xmlData.toString();\n } else {\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n }\n if (validationOption) {\n if (validationOption === true) validationOption = {};\n const result = validator$1.validate(xmlData, validationOption);\n if (result !== true) {\n throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`);\n }\n }\n const orderedObjParser = new OrderedObjParser2(this.options);\n orderedObjParser.addExternalEntities(this.externalEntities);\n const orderedResult = orderedObjParser.parseXml(xmlData);\n if (this.options.preserveOrder || orderedResult === void 0) return orderedResult;\n else return prettify(orderedResult, this.options);\n }\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(key, value) {\n if (value.indexOf(\"&\") !== -1) {\n throw new Error(\"Entity value can't have '&'\");\n } else if (key.indexOf(\"&\") !== -1 || key.indexOf(\";\") !== -1) {\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for ' '\");\n } else if (value === \"&\") {\n throw new Error(\"An entity with value '&' is not permitted\");\n } else {\n this.externalEntities[key] = value;\n }\n }\n};\nvar XMLParser_1 = XMLParser$1;\nconst EOL = \"\\n\";\nfunction toXml(jArray, options) {\n let indentation = \"\";\n if (options.format && options.indentBy.length > 0) {\n indentation = EOL;\n }\n return arrToStr(jArray, options, \"\", indentation);\n}\nfunction arrToStr(arr, options, jPath, indentation) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n if (tagName === void 0) continue;\n let newJPath = \"\";\n if (jPath.length === 0) newJPath = tagName;\n else newJPath = `${jPath}.${tagName}`;\n if (tagName === options.textNodeName) {\n let tagText = tagObj[tagName];\n if (!isStopNode(newJPath, options)) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += ``;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.commentPropName) {\n xmlStr += indentation + ``;\n isPreviousElementTag = true;\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr2 = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\";\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`;\n isPreviousElementTag = true;\n continue;\n }\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tagStart = indentation + `<${tagName}${attStr}`;\n const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode) xmlStr += tagStart + \">\";\n else xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"`;\n }\n isPreviousElementTag = true;\n }\n return xmlStr;\n}\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (!obj.hasOwnProperty(key)) continue;\n if (key !== \":@\") return key;\n }\n}\nfunction attr_to_str(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n if (!attrMap.hasOwnProperty(attr)) continue;\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\nfunction isStopNode(jPath, options) {\n jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for (let index in options.stopNodes) {\n if (options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\" + tagName) return true;\n }\n return false;\n}\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i = 0; i < options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\nvar orderedJs2Xml = toXml;\nconst buildFromOrderedJs = orderedJs2Xml;\nconst defaultOptions = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: \" \",\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },\n //it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"'\", \"g\"), val: \"'\" },\n { regex: new RegExp('\"', \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function() {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n this.processTextOrObjNode = processTextOrObjNode;\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = \">\\n\";\n this.newLine = \"\\n\";\n } else {\n this.indentate = function() {\n return \"\";\n };\n this.tagEndChar = \">\";\n this.newLine = \"\";\n }\n}\nBuilder.prototype.build = function(jObj) {\n if (this.options.preserveOrder) {\n return buildFromOrderedJs(jObj, this.options);\n } else {\n if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {\n jObj = {\n [this.options.arrayNodeName]: jObj\n };\n }\n return this.j2x(jObj, 0).val;\n }\n};\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = \"\";\n let val2 = \"\";\n for (let key in jObj) {\n if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue;\n if (typeof jObj[key] === \"undefined\") {\n if (this.isAttribute(key)) {\n val2 += \"\";\n }\n } else if (jObj[key] === null) {\n if (this.isAttribute(key)) {\n val2 += \"\";\n } else if (key[0] === \"?\") {\n val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n } else {\n val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n }\n } else if (jObj[key] instanceof Date) {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n } else if (typeof jObj[key] !== \"object\") {\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, \"\" + jObj[key]);\n } else {\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, \"\" + jObj[key]);\n val2 += this.replaceEntitiesValue(newval);\n } else {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n let listTagAttr = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === \"undefined\") ;\n else if (item === null) {\n if (key[0] === \"?\") val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n else val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n } else if (typeof item === \"object\") {\n if (this.options.oneListGroup) {\n const result = this.j2x(item, level + 1);\n listTagVal += result.val;\n if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {\n listTagAttr += result.attrStr;\n }\n } else {\n listTagVal += this.processTextOrObjNode(item, key, level);\n }\n } else {\n if (this.options.oneListGroup) {\n let textValue = this.options.tagValueProcessor(key, item);\n textValue = this.replaceEntitiesValue(textValue);\n listTagVal += textValue;\n } else {\n listTagVal += this.buildTextValNode(item, key, \"\", level);\n }\n }\n }\n if (this.options.oneListGroup) {\n listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);\n }\n val2 += listTagVal;\n } else {\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], \"\" + jObj[key][Ks[j]]);\n }\n } else {\n val2 += this.processTextOrObjNode(jObj[key], key, level);\n }\n }\n }\n return { attrStr, val: val2 };\n};\nBuilder.prototype.buildAttrPairStr = function(attrName, val2) {\n val2 = this.options.attributeValueProcessor(attrName, \"\" + val2);\n val2 = this.replaceEntitiesValue(val2);\n if (this.options.suppressBooleanAttributes && val2 === \"true\") {\n return \" \" + attrName;\n } else return \" \" + attrName + '=\"' + val2 + '\"';\n};\nfunction processTextOrObjNode(object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\nBuilder.prototype.buildObjectNode = function(val2, key, attrStr, level) {\n if (val2 === \"\") {\n if (key[0] === \"?\") return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n else {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n } else {\n let tagEndExp = \"\" + val2 + tagEndExp;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `` + this.newLine;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp;\n }\n }\n};\nBuilder.prototype.closeTag = function(key) {\n let closeTag = \"\";\n if (this.options.unpairedTags.indexOf(key) !== -1) {\n if (!this.options.suppressUnpairedNode) closeTag = \"/\";\n } else if (this.options.suppressEmptyNode) {\n closeTag = \"/\";\n } else {\n closeTag = `>` + this.newLine;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `` + this.newLine;\n } else if (key[0] === \"?\") {\n return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n } else {\n let textValue = this.options.tagValueProcessor(key, val2);\n textValue = this.replaceEntitiesValue(textValue);\n if (textValue === \"\") {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + \">\" + textValue + \" 0 && this.options.processEntities) {\n for (let i = 0; i < this.options.entities.length; i++) {\n const entity = this.options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n};\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\nfunction isAttribute(name) {\n if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}\nvar json2xml = Builder;\nconst validator = validator$2;\nconst XMLParser2 = XMLParser_1;\nconst XMLBuilder = json2xml;\nvar fxp = {\n XMLParser: XMLParser2,\n XMLValidator: validator,\n XMLBuilder\n};\nfunction isSvg(string) {\n if (typeof string !== \"string\") {\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n }\n string = string.trim();\n if (string.length === 0) {\n return false;\n }\n if (fxp.XMLValidator.validate(string) !== true) {\n return false;\n }\n let jsonObject;\n const parser = new fxp.XMLParser();\n try {\n jsonObject = parser.parse(string);\n } catch {\n return false;\n }\n if (!jsonObject) {\n return false;\n }\n if (!Object.keys(jsonObject).some((x) => x.toLowerCase() === \"svg\")) {\n return false;\n }\n return true;\n}\nclass View {\n _view;\n constructor(view) {\n isValidView(view);\n this._view = view;\n }\n get id() {\n return this._view.id;\n }\n get name() {\n return this._view.name;\n }\n get caption() {\n return this._view.caption;\n }\n get emptyTitle() {\n return this._view.emptyTitle;\n }\n get emptyCaption() {\n return this._view.emptyCaption;\n }\n get getContents() {\n return this._view.getContents;\n }\n get icon() {\n return this._view.icon;\n }\n set icon(icon) {\n this._view.icon = icon;\n }\n get order() {\n return this._view.order;\n }\n set order(order) {\n this._view.order = order;\n }\n get params() {\n return this._view.params;\n }\n set params(params) {\n this._view.params = params;\n }\n get columns() {\n return this._view.columns;\n }\n get emptyView() {\n return this._view.emptyView;\n }\n get parent() {\n return this._view.parent;\n }\n get sticky() {\n return this._view.sticky;\n }\n get expanded() {\n return this._view.expanded;\n }\n set expanded(expanded) {\n this._view.expanded = expanded;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n get loadChildViews() {\n return this._view.loadChildViews;\n }\n}\nconst isValidView = function(view) {\n if (!view.id || typeof view.id !== \"string\") {\n throw new Error(\"View id is required and must be a string\");\n }\n if (!view.name || typeof view.name !== \"string\") {\n throw new Error(\"View name is required and must be a string\");\n }\n if (view.columns && view.columns.length > 0 && (!view.caption || typeof view.caption !== \"string\")) {\n throw new Error(\"View caption is required for top-level views and must be a string\");\n }\n if (!view.getContents || typeof view.getContents !== \"function\") {\n throw new Error(\"View getContents is required and must be a function\");\n }\n if (!view.icon || typeof view.icon !== \"string\" || !isSvg(view.icon)) {\n throw new Error(\"View icon is required and must be a valid svg string\");\n }\n if (\"order\" in view && typeof view.order !== \"number\") {\n throw new Error(\"View order must be a number\");\n }\n if (view.columns) {\n view.columns.forEach((column) => {\n if (!(column instanceof Column)) {\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }\n });\n }\n if (view.emptyView && typeof view.emptyView !== \"function\") {\n throw new Error(\"View emptyView must be a function\");\n }\n if (view.parent && typeof view.parent !== \"string\") {\n throw new Error(\"View parent must be a string\");\n }\n if (\"sticky\" in view && typeof view.sticky !== \"boolean\") {\n throw new Error(\"View sticky must be a boolean\");\n }\n if (\"expanded\" in view && typeof view.expanded !== \"boolean\") {\n throw new Error(\"View expanded must be a boolean\");\n }\n if (view.defaultSortKey && typeof view.defaultSortKey !== \"string\") {\n throw new Error(\"View defaultSortKey must be a string\");\n }\n if (view.loadChildViews && typeof view.loadChildViews !== \"function\") {\n throw new Error(\"View loadChildViews must be a function\");\n }\n return true;\n};\nconst debug$1 = typeof process === \"object\" && process.env && process.env.NODE_DEBUG && /\\bsemver\\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error(\"SEMVER\", ...args) : () => {\n};\nvar debug_1 = debug$1;\nconst SEMVER_SPEC_VERSION = \"2.0.0\";\nconst MAX_LENGTH$1 = 256;\nconst MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */\n9007199254740991;\nconst MAX_SAFE_COMPONENT_LENGTH = 16;\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH$1 - 6;\nconst RELEASE_TYPES = [\n \"major\",\n \"premajor\",\n \"minor\",\n \"preminor\",\n \"patch\",\n \"prepatch\",\n \"prerelease\"\n];\nvar constants = {\n MAX_LENGTH: MAX_LENGTH$1,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 1,\n FLAG_LOOSE: 2\n};\nvar re$1 = { exports: {} };\n(function(module, exports) {\n const {\n MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH2,\n MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH2,\n MAX_LENGTH: MAX_LENGTH2\n } = constants;\n const debug2 = debug_1;\n exports = module.exports = {};\n const re2 = exports.re = [];\n const safeRe = exports.safeRe = [];\n const src = exports.src = [];\n const t2 = exports.t = {};\n let R = 0;\n const LETTERDASHNUMBER = \"[a-zA-Z0-9-]\";\n const safeRegexReplacements = [\n [\"\\\\s\", 1],\n [\"\\\\d\", MAX_LENGTH2],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH2]\n ];\n const makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);\n }\n return value;\n };\n const createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value);\n const index = R++;\n debug2(name, index, value);\n t2[name] = index;\n src[index] = value;\n re2[index] = new RegExp(value, isGlobal ? \"g\" : void 0);\n safeRe[index] = new RegExp(safe, isGlobal ? \"g\" : void 0);\n };\n createToken(\"NUMERICIDENTIFIER\", \"0|[1-9]\\\\d*\");\n createToken(\"NUMERICIDENTIFIERLOOSE\", \"\\\\d+\");\n createToken(\"NONNUMERICIDENTIFIER\", `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);\n createToken(\"MAINVERSION\", `(${src[t2.NUMERICIDENTIFIER]})\\\\.(${src[t2.NUMERICIDENTIFIER]})\\\\.(${src[t2.NUMERICIDENTIFIER]})`);\n createToken(\"MAINVERSIONLOOSE\", `(${src[t2.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})`);\n createToken(\"PRERELEASEIDENTIFIER\", `(?:${src[t2.NUMERICIDENTIFIER]}|${src[t2.NONNUMERICIDENTIFIER]})`);\n createToken(\"PRERELEASEIDENTIFIERLOOSE\", `(?:${src[t2.NUMERICIDENTIFIERLOOSE]}|${src[t2.NONNUMERICIDENTIFIER]})`);\n createToken(\"PRERELEASE\", `(?:-(${src[t2.PRERELEASEIDENTIFIER]}(?:\\\\.${src[t2.PRERELEASEIDENTIFIER]})*))`);\n createToken(\"PRERELEASELOOSE\", `(?:-?(${src[t2.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${src[t2.PRERELEASEIDENTIFIERLOOSE]})*))`);\n createToken(\"BUILDIDENTIFIER\", `${LETTERDASHNUMBER}+`);\n createToken(\"BUILD\", `(?:\\\\+(${src[t2.BUILDIDENTIFIER]}(?:\\\\.${src[t2.BUILDIDENTIFIER]})*))`);\n createToken(\"FULLPLAIN\", `v?${src[t2.MAINVERSION]}${src[t2.PRERELEASE]}?${src[t2.BUILD]}?`);\n createToken(\"FULL\", `^${src[t2.FULLPLAIN]}$`);\n createToken(\"LOOSEPLAIN\", `[v=\\\\s]*${src[t2.MAINVERSIONLOOSE]}${src[t2.PRERELEASELOOSE]}?${src[t2.BUILD]}?`);\n createToken(\"LOOSE\", `^${src[t2.LOOSEPLAIN]}$`);\n createToken(\"GTLT\", \"((?:<|>)?=?)\");\n createToken(\"XRANGEIDENTIFIERLOOSE\", `${src[t2.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);\n createToken(\"XRANGEIDENTIFIER\", `${src[t2.NUMERICIDENTIFIER]}|x|X|\\\\*`);\n createToken(\"XRANGEPLAIN\", `[v=\\\\s]*(${src[t2.XRANGEIDENTIFIER]})(?:\\\\.(${src[t2.XRANGEIDENTIFIER]})(?:\\\\.(${src[t2.XRANGEIDENTIFIER]})(?:${src[t2.PRERELEASE]})?${src[t2.BUILD]}?)?)?`);\n createToken(\"XRANGEPLAINLOOSE\", `[v=\\\\s]*(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:${src[t2.PRERELEASELOOSE]})?${src[t2.BUILD]}?)?)?`);\n createToken(\"XRANGE\", `^${src[t2.GTLT]}\\\\s*${src[t2.XRANGEPLAIN]}$`);\n createToken(\"XRANGELOOSE\", `^${src[t2.GTLT]}\\\\s*${src[t2.XRANGEPLAINLOOSE]}$`);\n createToken(\"COERCEPLAIN\", `${\"(^|[^\\\\d])(\\\\d{1,\"}${MAX_SAFE_COMPONENT_LENGTH2}})(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH2}}))?(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH2}}))?`);\n createToken(\"COERCE\", `${src[t2.COERCEPLAIN]}(?:$|[^\\\\d])`);\n createToken(\"COERCEFULL\", src[t2.COERCEPLAIN] + `(?:${src[t2.PRERELEASE]})?(?:${src[t2.BUILD]})?(?:$|[^\\\\d])`);\n createToken(\"COERCERTL\", src[t2.COERCE], true);\n createToken(\"COERCERTLFULL\", src[t2.COERCEFULL], true);\n createToken(\"LONETILDE\", \"(?:~>?)\");\n createToken(\"TILDETRIM\", `(\\\\s*)${src[t2.LONETILDE]}\\\\s+`, true);\n exports.tildeTrimReplace = \"$1~\";\n createToken(\"TILDE\", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAIN]}$`);\n createToken(\"TILDELOOSE\", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAINLOOSE]}$`);\n createToken(\"LONECARET\", \"(?:\\\\^)\");\n createToken(\"CARETTRIM\", `(\\\\s*)${src[t2.LONECARET]}\\\\s+`, true);\n exports.caretTrimReplace = \"$1^\";\n createToken(\"CARET\", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAIN]}$`);\n createToken(\"CARETLOOSE\", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAINLOOSE]}$`);\n createToken(\"COMPARATORLOOSE\", `^${src[t2.GTLT]}\\\\s*(${src[t2.LOOSEPLAIN]})$|^$`);\n createToken(\"COMPARATOR\", `^${src[t2.GTLT]}\\\\s*(${src[t2.FULLPLAIN]})$|^$`);\n createToken(\"COMPARATORTRIM\", `(\\\\s*)${src[t2.GTLT]}\\\\s*(${src[t2.LOOSEPLAIN]}|${src[t2.XRANGEPLAIN]})`, true);\n exports.comparatorTrimReplace = \"$1$2$3\";\n createToken(\"HYPHENRANGE\", `^\\\\s*(${src[t2.XRANGEPLAIN]})\\\\s+-\\\\s+(${src[t2.XRANGEPLAIN]})\\\\s*$`);\n createToken(\"HYPHENRANGELOOSE\", `^\\\\s*(${src[t2.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${src[t2.XRANGEPLAINLOOSE]})\\\\s*$`);\n createToken(\"STAR\", \"(<|>)?=?\\\\s*\\\\*\");\n createToken(\"GTE0\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\");\n createToken(\"GTE0PRE\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\");\n})(re$1, re$1.exports);\nvar reExports = re$1.exports;\nconst looseOption = Object.freeze({ loose: true });\nconst emptyOpts = Object.freeze({});\nconst parseOptions$1 = (options) => {\n if (!options) {\n return emptyOpts;\n }\n if (typeof options !== \"object\") {\n return looseOption;\n }\n return options;\n};\nvar parseOptions_1 = parseOptions$1;\nconst numeric = /^[0-9]+$/;\nconst compareIdentifiers$1 = (a, b) => {\n const anum = numeric.test(a);\n const bnum = numeric.test(b);\n if (anum && bnum) {\n a = +a;\n b = +b;\n }\n return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;\n};\nconst rcompareIdentifiers = (a, b) => compareIdentifiers$1(b, a);\nvar identifiers = {\n compareIdentifiers: compareIdentifiers$1,\n rcompareIdentifiers\n};\nconst debug = debug_1;\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = constants;\nconst { safeRe: re, t } = reExports;\nconst parseOptions = parseOptions_1;\nconst { compareIdentifiers } = identifiers;\nlet SemVer$2 = class SemVer {\n constructor(version, options) {\n options = parseOptions(options);\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {\n return version;\n } else {\n version = version.version;\n }\n } else if (typeof version !== \"string\") {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`);\n }\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n );\n }\n debug(\"SemVer\", version, options);\n this.options = options;\n this.loose = !!options.loose;\n this.includePrerelease = !!options.includePrerelease;\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`);\n }\n this.raw = version;\n this.major = +m[1];\n this.minor = +m[2];\n this.patch = +m[3];\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError(\"Invalid major version\");\n }\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError(\"Invalid minor version\");\n }\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError(\"Invalid patch version\");\n }\n if (!m[4]) {\n this.prerelease = [];\n } else {\n this.prerelease = m[4].split(\".\").map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id;\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num;\n }\n }\n return id;\n });\n }\n this.build = m[5] ? m[5].split(\".\") : [];\n this.format();\n }\n format() {\n this.version = `${this.major}.${this.minor}.${this.patch}`;\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join(\".\")}`;\n }\n return this.version;\n }\n toString() {\n return this.version;\n }\n compare(other) {\n debug(\"SemVer.compare\", this.version, this.options, other);\n if (!(other instanceof SemVer)) {\n if (typeof other === \"string\" && other === this.version) {\n return 0;\n }\n other = new SemVer(other, this.options);\n }\n if (other.version === this.version) {\n return 0;\n }\n return this.compareMain(other) || this.comparePre(other);\n }\n compareMain(other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options);\n }\n return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);\n }\n comparePre(other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options);\n }\n if (this.prerelease.length && !other.prerelease.length) {\n return -1;\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1;\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0;\n }\n let i = 0;\n do {\n const a = this.prerelease[i];\n const b = other.prerelease[i];\n debug(\"prerelease compare\", i, a, b);\n if (a === void 0 && b === void 0) {\n return 0;\n } else if (b === void 0) {\n return 1;\n } else if (a === void 0) {\n return -1;\n } else if (a === b) {\n continue;\n } else {\n return compareIdentifiers(a, b);\n }\n } while (++i);\n }\n compareBuild(other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options);\n }\n let i = 0;\n do {\n const a = this.build[i];\n const b = other.build[i];\n debug(\"build compare\", i, a, b);\n if (a === void 0 && b === void 0) {\n return 0;\n } else if (b === void 0) {\n return 1;\n } else if (a === void 0) {\n return -1;\n } else if (a === b) {\n continue;\n } else {\n return compareIdentifiers(a, b);\n }\n } while (++i);\n }\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc(release, identifier, identifierBase) {\n switch (release) {\n case \"premajor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor = 0;\n this.major++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"preminor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prepatch\":\n this.prerelease.length = 0;\n this.inc(\"patch\", identifier, identifierBase);\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prerelease\":\n if (this.prerelease.length === 0) {\n this.inc(\"patch\", identifier, identifierBase);\n }\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"major\":\n if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {\n this.major++;\n }\n this.minor = 0;\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"minor\":\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++;\n }\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"patch\":\n if (this.prerelease.length === 0) {\n this.patch++;\n }\n this.prerelease = [];\n break;\n case \"pre\": {\n const base = Number(identifierBase) ? 1 : 0;\n if (!identifier && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier is empty\");\n }\n if (this.prerelease.length === 0) {\n this.prerelease = [base];\n } else {\n let i = this.prerelease.length;\n while (--i >= 0) {\n if (typeof this.prerelease[i] === \"number\") {\n this.prerelease[i]++;\n i = -2;\n }\n }\n if (i === -1) {\n if (identifier === this.prerelease.join(\".\") && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier already exists\");\n }\n this.prerelease.push(base);\n }\n }\n if (identifier) {\n let prerelease = [identifier, base];\n if (identifierBase === false) {\n prerelease = [identifier];\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease;\n }\n } else {\n this.prerelease = prerelease;\n }\n }\n break;\n }\n default:\n throw new Error(`invalid increment argument: ${release}`);\n }\n this.raw = this.format();\n if (this.build.length) {\n this.raw += `+${this.build.join(\".\")}`;\n }\n return this;\n }\n};\nvar semver = SemVer$2;\nconst SemVer$1 = semver;\nconst parse$1 = (version, options, throwErrors = false) => {\n if (version instanceof SemVer$1) {\n return version;\n }\n try {\n return new SemVer$1(version, options);\n } catch (er) {\n if (!throwErrors) {\n return null;\n }\n throw er;\n }\n};\nvar parse_1 = parse$1;\nconst parse = parse_1;\nconst valid = (version, options) => {\n const v = parse(version, options);\n return v ? v.version : null;\n};\nvar valid_1 = valid;\nconst valid$1 = /* @__PURE__ */ getDefaultExportFromCjs(valid_1);\nconst SemVer2 = semver;\nconst major = (a, loose) => new SemVer2(a, loose).major;\nvar major_1 = major;\nconst major$1 = /* @__PURE__ */ getDefaultExportFromCjs(major_1);\nclass ProxyBus {\n bus;\n constructor(bus2) {\n if (typeof bus2.getVersion !== \"function\" || !valid$1(bus2.getVersion())) {\n console.warn(\"Proxying an event bus with an unknown or invalid version\");\n } else if (major$1(bus2.getVersion()) !== major$1(this.getVersion())) {\n console.warn(\n \"Proxying an event bus of version \" + bus2.getVersion() + \" with \" + this.getVersion()\n );\n }\n this.bus = bus2;\n }\n getVersion() {\n return \"3.3.1\";\n }\n subscribe(name, handler) {\n this.bus.subscribe(name, handler);\n }\n unsubscribe(name, handler) {\n this.bus.unsubscribe(name, handler);\n }\n emit(name, event) {\n this.bus.emit(name, event);\n }\n}\nclass SimpleBus {\n handlers = /* @__PURE__ */ new Map();\n getVersion() {\n return \"3.3.1\";\n }\n subscribe(name, handler) {\n this.handlers.set(\n name,\n (this.handlers.get(name) || []).concat(\n handler\n )\n );\n }\n unsubscribe(name, handler) {\n this.handlers.set(\n name,\n (this.handlers.get(name) || []).filter((h) => h !== handler)\n );\n }\n emit(name, event) {\n (this.handlers.get(name) || []).forEach((h) => {\n try {\n h(event);\n } catch (e) {\n console.error(\"could not invoke event listener\", e);\n }\n });\n }\n}\nlet bus = null;\nfunction getBus() {\n if (bus !== null) {\n return bus;\n }\n if (typeof window === \"undefined\") {\n return new Proxy({}, {\n get: () => {\n return () => console.error(\n \"Window not available, EventBus can not be established!\"\n );\n }\n });\n }\n if (window.OC?._eventBus && typeof window._nc_event_bus === \"undefined\") {\n console.warn(\n \"found old event bus instance at OC._eventBus. Update your version!\"\n );\n window._nc_event_bus = window.OC._eventBus;\n }\n if (typeof window?._nc_event_bus !== \"undefined\") {\n bus = new ProxyBus(window._nc_event_bus);\n } else {\n bus = window._nc_event_bus = new SimpleBus();\n }\n return bus;\n}\nfunction emit(name, event) {\n getBus().emit(name, event);\n}\n/*!\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nclass FileListFilter extends TypedEventTarget {\n id;\n order;\n constructor(id, order = 100) {\n super();\n this.id = id;\n this.order = order;\n }\n filter(nodes) {\n throw new Error(\"Not implemented\");\n }\n updateChips(chips) {\n this.dispatchTypedEvent(\"update:chips\", new CustomEvent(\"update:chips\", { detail: chips }));\n }\n filterUpdated() {\n this.dispatchTypedEvent(\"update:filter\", new CustomEvent(\"update:filter\"));\n }\n}\nfunction registerFileListFilter(filter) {\n if (!window._nc_filelist_filters) {\n window._nc_filelist_filters = /* @__PURE__ */ new Map();\n }\n if (window._nc_filelist_filters.has(filter.id)) {\n throw new Error(`File list filter \"${filter.id}\" already registered`);\n }\n window._nc_filelist_filters.set(filter.id, filter);\n emit(\"files:filter:added\", filter);\n}\nfunction unregisterFileListFilter(filterId) {\n if (window._nc_filelist_filters && window._nc_filelist_filters.has(filterId)) {\n window._nc_filelist_filters.delete(filterId);\n emit(\"files:filter:removed\", filterId);\n }\n}\nfunction getFileListFilters() {\n if (!window._nc_filelist_filters) {\n return [];\n }\n return [...window._nc_filelist_filters.values()];\n}\nconst addNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.registerEntry(entry);\n};\nconst removeNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.unregisterEntry(entry);\n};\nconst getNewFileMenuEntries = function(context) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.getEntries(context).sort((a, b) => {\n if (a.order !== void 0 && b.order !== void 0 && a.order !== b.order) {\n return a.order - b.order;\n }\n return a.displayName.localeCompare(b.displayName, void 0, { numeric: true, sensitivity: \"base\" });\n });\n};\nexport {\n Column,\n DefaultType,\n File,\n FileAction,\n FileListFilter,\n FileType,\n FilesSortingMode,\n Folder,\n Header,\n InvalidFilenameError,\n InvalidFilenameErrorReason,\n Navigation,\n NewMenuEntryCategory,\n Node,\n NodeStatus,\n Permission,\n View,\n addNewFileMenuEntry,\n davGetClient,\n davGetDefaultPropfind,\n davGetFavoritesReport,\n davGetRecentSearch,\n davGetRemoteURL,\n davGetRootPath,\n davParsePermissions,\n davRemoteURL,\n davResultToNode,\n davRootPath,\n defaultDavNamespaces,\n defaultDavProperties,\n formatFileSize,\n getDavNameSpaces,\n getDavProperties,\n getFavoriteNodes,\n getFileActions,\n getFileListFilters,\n getFileListHeaders,\n getNavigation,\n getNewFileMenuEntries,\n getUniqueName,\n isFilenameValid,\n orderBy,\n parseFileSize,\n registerDavProperty,\n registerFileAction,\n registerFileListFilter,\n registerFileListHeaders,\n removeNewFileMenuEntry,\n sortNodes,\n unregisterFileListFilter,\n validateFilename\n};\n","const UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\tlet isLastLastCharPreserved = false;\n\n\tfor (let index = 0; index < string.length; index++) {\n\t\tconst character = string[index];\n\t\tisLastLastCharPreserved = index > 2 ? string[index - 3] === '-' : true;\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, index) + '-' + string.slice(index);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\tindex++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase)) {\n\t\t\tstring = string.slice(0, index - 1) + '-' + string.slice(index - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replaceAll(LEADING_CAPITAL, match => toLowerCase(match));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input\n\t\t.replaceAll(NUMBERS_AND_IDENTIFIER, (match, pattern, offset) => ['_', '-'].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match))\n\t\t.replaceAll(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier));\n};\n\nexport default function camelCase(input, options) {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options,\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false\n\t\t? string => string.toLowerCase()\n\t\t: string => string.toLocaleLowerCase(options.locale);\n\n\tconst toUpperCase = options.locale === false\n\t\t? string => string.toUpperCase()\n\t\t: string => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\tif (SEPARATORS.test(input)) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\tinput = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"802\":\"387187865bf364bcd145\",\"8699\":\"6b7a12a16e2a8dae7313\",\"9291\":\"077955af818a227340aa\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2766;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2766: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(3253)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","async","execBatch","nodes","response","Promise","resolve","spawnDialog","defineAsyncComponent","status","Array","length","fill","action","FileAction","id","displayName","t","iconSvgInline","TagMultipleSvg","enabled","isPublicShare","exec","node","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","renderTag","tag","isMore","arguments","undefined","tagElement","document","createElement","classList","add","textContent","renderInline","tags","getNodeSystemTags","systemTagsElement","setAttribute","fileid","toString","append","moreTagElement","slice","join","order","subscribe","then","systemTagsHtml","querySelectorAll","forEach","element","replaceWith","rootPath","client","davGetClient","resultToNode","davResultToNode","formatReportPayload","tagId","getDavNameSpaces","getDavProperties","tagToNode","Folder","source","davRemoteURL","owner","String","getCurrentUser","uid","root","displayname","permissions","Permission","READ","attributes","systemTagsViewId","view","type","FileType","dir","dirname","path","window","OCP","Files","Router","goToRoute","openfile","default","DefaultType","HIDDEN","registerDavProperty","registerFileAction","bulkSystemTagsAction","inlineSystemTagsAction","openInFilesAction","getNavigation","register","View","name","caption","emptyTitle","emptyCaption","icon","svgTagMultiple","getContents","tagsCache","fetchTags","filter","userVisible","folder","NONE","contents","map","parseInt","split","find","Error","getDirectoryContents","davRootPath","details","data","headers","method","logger","getLoggerBuilder","setApp","detectUser","build","fetchTagsPayload","davClient","glob","parseTags","error","fetchTag","stat","createTag","tagToPost","formatTag","customRequest","contentLocation","get","parseIdFromLocation","getTagObjects","etag","props","getetag","objects","Object","values","flat","setTagObjects","objectIds","_ref","rootUrl","generateRemoteUrl","createClient","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","fromEntries","entries","_ref2","key","value","camelCase","url","queryPos","indexOf","substring","parts","result","pop","Number","initialTag","setNodeSystemTags","Vue","___CSS_LOADER_EXPORT___","push","module","DefaultType2","_action","constructor","this","validateAction","title","parent","inline","includes","_nc_fileactions","debug","search","Permission2","defaultDavProperties","defaultDavNamespaces","d","nc","oc","ocs","prop","namespace","_nc_dav_properties","_nc_dav_namespaces","namespaces","warn","startsWith","keys","ns","davGetDefaultPropfind","davGetRecentSearch","lastModified","FileType2","isDavRessource","davService","match","validateData","URL","e","mtime","Date","crtime","mime","size","ALL","service","NodeStatus","NodeStatus2","Node","_data","_attributes","_knownDavService","readonlyAttributes","getOwnPropertyDescriptors","prototype","handler","set","target","Reflect","deleteProperty","receiver","Proxy","update","replace","encodedSource","origin","basename","extension","extname","firstMatch","pathname","updateMtime","move","destination","oldBasename","rename","basename2","TypeError","File","super","davGetRemoteURL","remoteURL","patch","headers2","fetch","getFavoriteNodes","davRoot","controller","AbortController","CancelablePromise","reject","onCancel","abort","signal","includeSelf","filename","filesRoot","userId","permString","CREATE","UPDATE","DELETE","SHARE","davParsePermissions","nodeData","parse","lastmod","getcontentlength","FAILED","hasPreview","humanList","humanListBinary","formatFileSize","skipSmallSizes","binaryPrefixes","base1000","Math","floor","log","min","readableFormat","relativeSize","pow","toFixed","parseFloat","toLocaleString","stringify","toISOString","sortNodes","sortingOptions","sortingMode","sortingOrder","collection","identifiers2","orders","sorting","_","index","collator","Intl","Collator","numeric","usage","sort","a","b","identifier","compare","orderBy","sortFavoritesFirst","v","favorite","sortFoldersFirst","lastIndexOf","Navigation","_views","_currentView","dispatchTypedEvent","CustomEvent","remove","findIndex","splice","setActive","event","detail","active","views","_nc_navigation","Column","_column","column","isValidColumn","render","summary","validator$2","util$3","exports","nameStartChar","nameRegexp","regexName","RegExp","isExist","isEmptyObject","obj","merge","arrayMode","len","i","getValue","isName","string","getAllMatches","regex","matches","allmatches","startIndex","lastIndex","util$2","defaultOptions$2","allowBooleanAttributes","unpairedTags","isWhiteSpace","char","readPI","xmlData","start","tagname","substr","getErrorObject","getLineNumberForPosition","readCommentAndCDATA","angleBracketsCount","validate","assign","tagFound","reachedRoot","err","tagStartPos","closingTag","tagName","trim","msg","readAttributeStr","attrStr","attrStrStart","isValid","validateAttributeString","code","line","tagClosed","otg","openPos","col","afterAmp","validateAmpersand","JSON","t2","doubleQuote","singleQuote","startChar","validAttrStrRegxp","attrNames","getPositionFromMatch","attrName","validateAttrName","hasOwnProperty","re2","validateNumberAmpersand","count","message","lineNumber","lines","OptionsBuilder","defaultOptions$1","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","val2","attributeValueProcessor","stopNodes","alwaysCreateTextNode","isArray","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","jPath","attrs","buildOptions","defaultOptions","util$1","readEntityExp","entityName2","isComment","isEntity","isElement","isAttlist","isNotation","validateEntityName","hexRegex","numRegex","consider","decimalPoint","util","xmlNode","child","addChild","readDocType","entities","hasBody","comment","exp","entityName","val","regx","toNumber","str","trimmedStr","skipLike","test","sign","numTrimmedByZeros","numStr","num","addExternalEntities","externalEntities","entKeys","ent","lastEntities","parseTextData","dontTrim","hasAttributes","isLeafNode","escapeEntities","replaceEntitiesValue","newval","parseValue","resolveNameSpace","prefix","charAt","attrsRegx","buildAttributesMap","oldVal","aName","newVal","attrCollection","parseXml","xmlObj","currentNode","textData","closeIndex","findClosingIndex","colonIndex","saveTextToParentTag","lastTagName","propIndex","tagsNodeStack","tagData","readTagExp","childNode","tagExp","attrExpPresent","endIndex","docTypeEntities","rawTagName","lastTag","isItStopNode","tagContent","result2","readStopNodeData","replaceEntitiesValue$1","entity","ampEntity","currentTagName","allNodesExp","stopNodePath","stopNodeExp","errMsg","closingIndex","closingChar","attrBoundary","ch","tagExpWithClosingIndex","separatorIndex","trimStart","openTagCount","shouldParse","node2json","compress","arr","text","compressedObj","tagObj","property","propName$1","newJpath","isLeaf","isLeafTag","assignAttributes","attrMap","jpath","atrrName","propCount","prettify","OrderedObjParser2","fromCharCode","validator$1","arrToStr","indentation","xmlStr","isPreviousElementTag","propName","newJPath","tagText","isStopNode","attStr2","attr_to_str","tempInd","piTextNodeName","newIdentation","indentBy","tagStart","tagValue","suppressUnpairedNode","suppressEmptyNode","endsWith","attr","attrVal","suppressBooleanAttributes","textValue","buildFromOrderedJs","jArray","format","oneListGroup","Builder","isAttribute","attrPrefixLen","processTextOrObjNode","indentate","tagEndChar","newLine","object","level","j2x","buildTextValNode","buildObjectNode","repeat","jObj","arrayNodeName","call","buildAttrPairStr","arrLen","listTagVal","listTagAttr","j","item","Ks","L","closeTag","tagEndExp","piClosingChar","fxp","XMLParser","validationOption","orderedObjParser","orderedResult","addEntity","XMLValidator","XMLBuilder","_view","isValidView","params","columns","emptyView","sticky","expanded","defaultSortKey","loadChildViews","jsonObject","parser","some","x","toLowerCase","isSvg","debug_1","process","env","NODE_DEBUG","args","console","constants","MAX_LENGTH","MAX_SAFE_COMPONENT_LENGTH","MAX_SAFE_BUILD_LENGTH","MAX_LENGTH$1","MAX_SAFE_INTEGER","RELEASE_TYPES","SEMVER_SPEC_VERSION","FLAG_INCLUDE_PRERELEASE","FLAG_LOOSE","re$1","MAX_SAFE_COMPONENT_LENGTH2","MAX_SAFE_BUILD_LENGTH2","MAX_LENGTH2","debug2","re","safeRe","src","R","LETTERDASHNUMBER","safeRegexReplacements","createToken","isGlobal","safe","max","makeSafeRegex","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","COERCEPLAIN","COERCE","COERCEFULL","LONETILDE","tildeTrimReplace","LONECARET","caretTrimReplace","comparatorTrimReplace","reExports","freeze","loose","compareIdentifiers$1","anum","bnum","identifiers","compareIdentifiers","rcompareIdentifiers","UPPERCASE","LOWERCASE","LEADING_CAPITAL","IDENTIFIER","SEPARATORS","LEADING_SEPARATORS","SEPARATORS_AND_IDENTIFIER","NUMBERS_AND_IDENTIFIER","preserveCamelCase","toUpperCase","preserveConsecutiveUppercase","isLastCharLower","isLastCharUpper","isLastLastCharUpper","isLastLastCharPreserved","character","input","replaceAll","postProcess","pattern","offset","pascalCase","locale","toLocaleLowerCase","toLocaleUpperCase","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","m","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","every","r","n","getter","__esModule","definition","o","defineProperty","enumerable","f","chunkId","all","reduce","promises","u","g","globalThis","Function","l","done","script","needAttach","scripts","getElementsByTagName","s","getAttribute","charset","timeout","onScriptComplete","prev","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","setTimeout","bind","head","appendChild","Symbol","toStringTag","nmd","paths","children","scriptUrl","importScripts","location","currentScript","p","baseURI","self","href","installedChunks","installedChunkData","promise","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"systemtags-init.js?v=830cc2a970a0cc3deccf","mappings":"UAAIA,ECAAC,EACAC,E,2pBCUJC,eAAeC,EAAUC,GACrB,MAAMC,QAAiB,IAAIC,SAASC,KAChCC,EAAAA,EAAAA,KAAYC,EAAAA,EAAAA,KAAqB,IAAM,2DAA8C,CACjFL,UACAM,IACAH,EAAQG,EAAO,GACjB,IAEN,OAAOC,MAAMP,EAAMQ,QAAQC,KAAKR,EACpC,CACO,MAAMS,EAAS,IAAIC,EAAAA,GAAW,CACjCC,GAAI,kBACJC,YAAaA,KAAMC,EAAAA,EAAAA,GAAE,aAAc,eACnCC,cAAeA,IAAMC,EAErBC,QAAQjB,KACAkB,EAAAA,EAAAA,MAGiB,IAAjBlB,EAAMQ,OAMdV,KAAUqB,MAACC,GACArB,EAAU,CAACqB,IAAO,GAE7BrB,c,kJC5BAsB,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IACxBF,EAAQG,OAAS,SAAc,KAAM,QACrCH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,G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D,EAAuB,CAACC,EAA4BlsB,KACvD,IAKI0nB,EAAUsB,EALVhB,EAAWhoB,EAAK,GAChBmsB,EAAcnsB,EAAK,GACnBosB,EAAUpsB,EAAK,GAGIuP,EAAI,EAC3B,GAAGyY,EAASxG,MAAM3oB,GAAgC,IAAxB8yB,EAAgB9yB,KAAa,CACtD,IAAI6uB,KAAYyE,EACZ1E,EAAoBmB,EAAEuD,EAAazE,KACrCD,EAAoBK,EAAEJ,GAAYyE,EAAYzE,IAGhD,GAAG0E,EAAS,IAAIhpB,EAASgpB,EAAQ3E,EAClC,CAEA,IADGyE,GAA4BA,EAA2BlsB,GACrDuP,EAAIyY,EAASvvB,OAAQ8W,IACzByZ,EAAUhB,EAASzY,GAChBkY,EAAoBmB,EAAE+C,EAAiB3C,IAAY2C,EAAgB3C,IACrE2C,EAAgB3C,GAAS,KAE1B2C,EAAgB3C,GAAW,EAE5B,OAAOvB,EAAoBM,EAAE3kB,EAAO,EAGjCipB,EAAqBZ,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FY,EAAmB7wB,QAAQywB,EAAqBtB,KAAK,KAAM,IAC3D0B,EAAmB1oB,KAAOsoB,EAAqBtB,KAAK,KAAM0B,EAAmB1oB,KAAKgnB,KAAK0B,G,KCvFvF5E,EAAoB5iB,QAAK5K,ECGzB,IAAIqyB,EAAsB7E,EAAoBM,OAAE9tB,EAAW,CAAC,OAAO,IAAOwtB,EAAoB,QAC9F6E,EAAsB7E,EAAoBM,EAAEuE,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/systemtags/src/files_actions/bulkSystemTagsAction.ts","webpack://nextcloud/./apps/systemtags/src/css/fileEntryInlineSystemTags.scss?0a01","webpack:///nextcloud/apps/systemtags/src/files_actions/inlineSystemTagsAction.ts","webpack:///nextcloud/apps/systemtags/src/services/systemtags.ts","webpack:///nextcloud/apps/systemtags/src/files_views/systemtagsView.ts","webpack:///nextcloud/apps/systemtags/src/files_actions/openInFilesAction.ts","webpack:///nextcloud/apps/systemtags/src/init.ts","webpack:///nextcloud/apps/systemtags/src/logger.ts","webpack:///nextcloud/apps/systemtags/src/services/api.ts","webpack:///nextcloud/apps/systemtags/src/services/davClient.ts","webpack:///nextcloud/apps/systemtags/src/utils.ts","webpack:///nextcloud/apps/systemtags/src/css/fileEntryInlineSystemTags.scss","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack:///nextcloud/node_modules/camelcase/index.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport {} from '@nextcloud/files';\nimport { defineAsyncComponent } from 'vue';\nimport { FileAction } from '@nextcloud/files';\nimport { isPublicShare } from '@nextcloud/sharing/public';\nimport { spawnDialog } from '@nextcloud/dialogs';\nimport { t } from '@nextcloud/l10n';\nimport TagMultipleSvg from '@mdi/svg/svg/tag-multiple.svg?raw';\nasync function execBatch(nodes) {\n const response = await new Promise((resolve) => {\n spawnDialog(defineAsyncComponent(() => import('../components/SystemTagPicker.vue')), {\n nodes,\n }, (status) => {\n resolve(status);\n });\n });\n return Array(nodes.length).fill(response);\n}\nexport const action = new FileAction({\n id: 'systemtags:bulk',\n displayName: () => t('systemtags', 'Manage tags'),\n iconSvgInline: () => TagMultipleSvg,\n // If the app is disabled, the action is not available anyway\n enabled(nodes) {\n if (isPublicShare()) {\n return false;\n }\n if (nodes.length === 0) {\n return false;\n }\n // If the user is not logged in, the action is not available\n return true;\n },\n async exec(node) {\n return execBatch([node])[0];\n },\n execBatch,\n});\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./fileEntryInlineSystemTags.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./fileEntryInlineSystemTags.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import { FileAction } from '@nextcloud/files';\nimport { subscribe } from '@nextcloud/event-bus';\nimport { t } from '@nextcloud/l10n';\nimport '../css/fileEntryInlineSystemTags.scss';\nimport { getNodeSystemTags } from '../utils';\nconst renderTag = function (tag, isMore = false) {\n const tagElement = document.createElement('li');\n tagElement.classList.add('files-list__system-tag');\n tagElement.textContent = tag;\n if (isMore) {\n tagElement.classList.add('files-list__system-tag--more');\n }\n return tagElement;\n};\nconst renderInline = async function (node) {\n // Ensure we have the system tags as an array\n const tags = getNodeSystemTags(node);\n const systemTagsElement = document.createElement('ul');\n systemTagsElement.classList.add('files-list__system-tags');\n systemTagsElement.setAttribute('aria-label', t('files', 'Assigned collaborative tags'));\n systemTagsElement.setAttribute('data-systemtags-fileid', node.fileid?.toString() || '');\n if (tags.length === 0) {\n return systemTagsElement;\n }\n systemTagsElement.append(renderTag(tags[0]));\n if (tags.length === 2) {\n // Special case only two tags:\n // the overflow fake tag would take the same space as this, so render it\n systemTagsElement.append(renderTag(tags[1]));\n }\n else if (tags.length > 1) {\n // More tags than the one we're showing\n // So we add a overflow element indicating there are more tags\n const moreTagElement = renderTag('+' + (tags.length - 1), true);\n moreTagElement.setAttribute('title', tags.slice(1).join(', '));\n // because the title is not accessible we hide this element for screen readers (see alternative below)\n moreTagElement.setAttribute('aria-hidden', 'true');\n moreTagElement.setAttribute('role', 'presentation');\n systemTagsElement.append(moreTagElement);\n // For accessibility the tags are listed, as the title is not accessible\n // but those tags are visually hidden\n for (const tag of tags.slice(1)) {\n const tagElement = renderTag(tag);\n tagElement.classList.add('hidden-visually');\n systemTagsElement.append(tagElement);\n }\n }\n return systemTagsElement;\n};\nexport const action = new FileAction({\n id: 'system-tags',\n displayName: () => '',\n iconSvgInline: () => '',\n enabled(nodes) {\n // Only show the action on single nodes\n if (nodes.length !== 1) {\n return false;\n }\n // Always show the action, even if there are no tags\n // This will render an empty tag list and allow events to update it\n return true;\n },\n exec: async () => null,\n renderInline,\n order: 0,\n});\nconst updateSystemTagsHtml = function (node) {\n renderInline(node).then((systemTagsHtml) => {\n document.querySelectorAll(`[data-systemtags-fileid=\"${node.fileid}\"]`).forEach((element) => {\n element.replaceWith(systemTagsHtml);\n });\n });\n};\nsubscribe('systemtags:node:updated', updateSystemTagsHtml);\n","import { getCurrentUser } from '@nextcloud/auth';\nimport { Folder, Permission, getDavNameSpaces, getDavProperties, davGetClient, davResultToNode, davRemoteURL, davRootPath } from '@nextcloud/files';\nimport { fetchTags } from './api';\nconst rootPath = '/systemtags';\nconst client = davGetClient();\nconst resultToNode = (node) => davResultToNode(node);\nconst formatReportPayload = (tagId) => `\n\n\t\n\t\t${getDavProperties()}\n\t\n\t\n\t\t${tagId}\n\t\n`;\nconst tagToNode = function (tag) {\n return new Folder({\n id: tag.id,\n source: `${davRemoteURL}${rootPath}/${tag.id}`,\n owner: String(getCurrentUser()?.uid ?? 'anonymous'),\n root: rootPath,\n displayname: tag.displayName,\n permissions: Permission.READ,\n attributes: {\n ...tag,\n 'is-tag': true,\n },\n });\n};\nexport const getContents = async (path = '/') => {\n // List tags in the root\n const tagsCache = (await fetchTags()).filter(tag => tag.userVisible);\n if (path === '/') {\n return {\n folder: new Folder({\n id: 0,\n source: `${davRemoteURL}${rootPath}`,\n owner: getCurrentUser()?.uid,\n root: rootPath,\n permissions: Permission.NONE,\n }),\n contents: tagsCache.map(tagToNode),\n };\n }\n const tagId = parseInt(path.split('/', 2)[1]);\n const tag = tagsCache.find(tag => tag.id === tagId);\n if (!tag) {\n throw new Error('Tag not found');\n }\n const folder = tagToNode(tag);\n const contentsResponse = await client.getDirectoryContents(davRootPath, {\n details: true,\n // Only filter favorites if we're at the root\n data: formatReportPayload(tagId),\n headers: {\n // Patched in WebdavClient.ts\n method: 'REPORT',\n },\n });\n return {\n folder,\n contents: contentsResponse.data.map(resultToNode),\n };\n};\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport { View, getNavigation } from '@nextcloud/files';\nimport { getContents } from '../services/systemtags.js';\nimport svgTagMultiple from '@mdi/svg/svg/tag-multiple.svg?raw';\nexport const systemTagsViewId = 'tags';\n/**\n * Register the system tags files view\n */\nexport function registerSystemTagsView() {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: systemTagsViewId,\n name: t('systemtags', 'Tags'),\n caption: t('systemtags', 'List of tags and their associated files and folders.'),\n emptyTitle: t('systemtags', 'No tags found'),\n emptyCaption: t('systemtags', 'Tags you have created will show up here.'),\n icon: svgTagMultiple,\n order: 25,\n getContents,\n }));\n}\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport {} from '@nextcloud/files';\nimport { FileType, FileAction, DefaultType } from '@nextcloud/files';\nimport { t } from '@nextcloud/l10n';\nimport { systemTagsViewId } from '../files_views/systemtagsView';\nexport const action = new FileAction({\n id: 'systemtags:open-in-files',\n displayName: () => t('systemtags', 'Open in Files'),\n iconSvgInline: () => '',\n enabled(nodes, view) {\n // Only for the system tags view\n if (view.id !== systemTagsViewId) {\n return false;\n }\n // Only for single nodes\n if (nodes.length !== 1) {\n return false;\n }\n // Do not open tags (keep the default action) and only open folders\n return nodes[0].attributes['is-tag'] !== true\n && nodes[0].type === FileType.Folder;\n },\n async exec(node) {\n let dir = node.dirname;\n if (node.type === FileType.Folder) {\n dir = node.path;\n }\n window.OCP.Files.Router.goToRoute(null, // use default route\n { view: 'files', fileid: String(node.fileid) }, { dir, openfile: 'true' });\n return null;\n },\n // Before openFolderAction\n order: -1000,\n default: DefaultType.HIDDEN,\n});\n","/**\n * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { registerDavProperty, registerFileAction } from '@nextcloud/files';\nimport { action as bulkSystemTagsAction } from './files_actions/bulkSystemTagsAction';\nimport { action as inlineSystemTagsAction } from './files_actions/inlineSystemTagsAction';\nimport { action as openInFilesAction } from './files_actions/openInFilesAction';\nimport { registerSystemTagsView } from './files_views/systemtagsView';\nregisterDavProperty('nc:system-tags');\nregisterFileAction(bulkSystemTagsAction);\nregisterFileAction(inlineSystemTagsAction);\nregisterFileAction(openInFilesAction);\nregisterSystemTagsView();\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport const logger = getLoggerBuilder()\n .setApp('systemtags')\n .detectUser()\n .build();\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport axios from '@nextcloud/axios';\nimport { generateUrl } from '@nextcloud/router';\nimport { t } from '@nextcloud/l10n';\nimport { davClient } from './davClient.js';\nimport { formatTag, parseIdFromLocation, parseTags } from '../utils';\nimport { logger } from '../logger.js';\nexport const fetchTagsPayload = `\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n`;\nexport const fetchTags = async () => {\n const path = '/systemtags';\n try {\n const { data: tags } = await davClient.getDirectoryContents(path, {\n data: fetchTagsPayload,\n details: true,\n glob: '/systemtags/*', // Filter out first empty tag\n });\n return parseTags(tags);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to load tags'), { error });\n throw new Error(t('systemtags', 'Failed to load tags'));\n }\n};\nexport const fetchTag = async (tagId) => {\n const path = '/systemtags/' + tagId;\n try {\n const { data: tag } = await davClient.stat(path, {\n data: fetchTagsPayload,\n details: true\n });\n return parseTags([tag])[0];\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to load tag'), { error });\n throw new Error(t('systemtags', 'Failed to load tag'));\n }\n};\nexport const fetchLastUsedTagIds = async () => {\n const url = generateUrl('/apps/systemtags/lastused');\n try {\n const { data: lastUsedTagIds } = await axios.get(url);\n return lastUsedTagIds.map(Number);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to load last used tags'), { error });\n throw new Error(t('systemtags', 'Failed to load last used tags'));\n }\n};\n/**\n * Create a tag and return the Id of the newly created tag.\n *\n * @param tag The tag to create\n */\nexport const createTag = async (tag) => {\n const path = '/systemtags';\n const tagToPost = formatTag(tag);\n try {\n const { headers } = await davClient.customRequest(path, {\n method: 'POST',\n data: tagToPost,\n });\n const contentLocation = headers.get('content-location');\n if (contentLocation) {\n return parseIdFromLocation(contentLocation);\n }\n logger.error(t('systemtags', 'Missing \"Content-Location\" header'));\n throw new Error(t('systemtags', 'Missing \"Content-Location\" header'));\n }\n catch (error) {\n if (error?.response?.status === 409) {\n logger.error(t('systemtags', 'A tag with the same name already exists'), { error });\n throw new Error(t('systemtags', 'A tag with the same name already exists'));\n }\n logger.error(t('systemtags', 'Failed to create tag'), { error });\n throw new Error(t('systemtags', 'Failed to create tag'));\n }\n};\nexport const updateTag = async (tag) => {\n const path = '/systemtags/' + tag.id;\n const data = `\n\t\n\t\t\n\t\t\t\n\t\t\t\t${tag.displayName}\n\t\t\t\t${tag.userVisible}\n\t\t\t\t${tag.userAssignable}\n\t\t\t\n\t\t\n\t`;\n try {\n await davClient.customRequest(path, {\n method: 'PROPPATCH',\n data,\n });\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to update tag'), { error });\n throw new Error(t('systemtags', 'Failed to update tag'));\n }\n};\nexport const deleteTag = async (tag) => {\n const path = '/systemtags/' + tag.id;\n try {\n await davClient.deleteFile(path);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to delete tag'), { error });\n throw new Error(t('systemtags', 'Failed to delete tag'));\n }\n};\nexport const getTagObjects = async function (tag, type) {\n const path = `/systemtags/${tag.id}/${type}`;\n const data = `\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t`;\n const response = await davClient.stat(path, { data, details: true });\n const etag = response?.data?.props?.getetag || '\"\"';\n const objects = Object.values(response?.data?.props?.['object-ids'] || []).flat();\n return {\n etag,\n objects,\n };\n};\n/**\n * Set the objects for a tag.\n * Warning: This will overwrite the existing objects.\n * @param tag The tag to set the objects for\n * @param type The type of the objects\n * @param objectIds The objects to set\n * @param etag Strongly recommended to avoid conflict and data loss.\n */\nexport const setTagObjects = async function (tag, type, objectIds, etag = '') {\n const path = `/systemtags/${tag.id}/${type}`;\n let data = `\n\t\n\t\t\n\t\t\t\n\t\t\t\t${objectIds.map(({ id, type }) => `${id}${type}`).join('')}\n\t\t\t\n\t\t\n\t`;\n if (objectIds.length === 0) {\n data = `\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t`;\n }\n await davClient.customRequest(path, {\n method: 'PROPPATCH',\n data,\n headers: {\n 'if-match': etag,\n },\n });\n};\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { createClient } from 'webdav';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth';\n// init webdav client\nconst rootUrl = generateRemoteUrl('dav');\nexport const davClient = createClient(rootUrl);\n// set CSRF token header\nconst setHeaders = (token) => {\n davClient.setHeaders({\n // Add this so the server knows it is an request from the browser\n 'X-Requested-With': 'XMLHttpRequest',\n // Inject user auth\n requesttoken: token ?? '',\n });\n};\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders);\nsetHeaders(getRequestToken());\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport camelCase from 'camelcase';\nimport Vue from 'vue';\nexport const defaultBaseTag = {\n userVisible: true,\n userAssignable: true,\n canAssign: true,\n};\nexport const parseTags = (tags) => {\n return tags.map(({ props }) => Object.fromEntries(Object.entries(props)\n .map(([key, value]) => [camelCase(key), camelCase(key) === 'displayName' ? String(value) : value])));\n};\n/**\n * Parse id from `Content-Location` header\n * @param url URL to parse\n */\nexport const parseIdFromLocation = (url) => {\n const queryPos = url.indexOf('?');\n if (queryPos > 0) {\n url = url.substring(0, queryPos);\n }\n const parts = url.split('/');\n let result;\n do {\n result = parts[parts.length - 1];\n parts.pop();\n // note: first result can be empty when there is a trailing slash,\n // so we take the part before that\n } while (!result && parts.length > 0);\n return Number(result);\n};\nexport const formatTag = (initialTag) => {\n if ('name' in initialTag && !('displayName' in initialTag)) {\n return { ...initialTag };\n }\n const tag = { ...initialTag };\n tag.name = tag.displayName;\n delete tag.displayName;\n return tag;\n};\nexport const getNodeSystemTags = function (node) {\n const tags = node.attributes?.['system-tags']?.['system-tag'];\n if (tags === undefined) {\n return [];\n }\n return [tags].flat();\n};\nexport const setNodeSystemTags = function (node, tags) {\n Vue.set(node.attributes, 'system-tags', {\n 'system-tag': tags,\n });\n};\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.files-list__system-tags{--min-size: 32px;display:none;justify-content:center;align-items:center;min-width:calc(var(--min-size)*2);max-width:300px}.files-list__system-tag{padding:5px 10px;border:1px solid;border-radius:var(--border-radius-pill);border-color:var(--color-border);color:var(--color-text-maxcontrast);height:var(--min-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:22px;text-align:center}.files-list__system-tag--more{overflow:visible;text-overflow:initial}.files-list__system-tag+.files-list__system-tag{margin-inline-start:5px}@media(min-width: 512px){.files-list__system-tags{display:flex}}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/systemtags/src/css/fileEntryInlineSystemTags.scss\"],\"names\":[],\"mappings\":\"AAKA,yBACC,gBAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,iCAAA,CACA,eAAA,CAGD,wBACC,gBAAA,CACA,gBAAA,CACA,uCAAA,CACA,gCAAA,CACA,mCAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,gBAAA,CACA,iBAAA,CAEA,8BACC,gBAAA,CACA,qBAAA,CAID,gDACC,uBAAA,CAIF,yBACC,yBACC,YAAA,CAAA\",\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import { getLoggerBuilder } from \"@nextcloud/logger\";\nimport { getCurrentUser, onRequestTokenUpdate, getRequestToken } from \"@nextcloud/auth\";\nimport { join, basename, extname, dirname } from \"path\";\nimport { encodePath } from \"@nextcloud/paths\";\nimport { generateRemoteUrl } from \"@nextcloud/router\";\nimport { CancelablePromise } from \"cancelable-promise\";\nimport { createClient, getPatcher } from \"webdav\";\nimport { isPublicShare, getSharingToken } from \"@nextcloud/sharing/public\";\nimport { getCapabilities } from \"@nextcloud/capabilities\";\nimport { getCanonicalLocale, getLanguage } from \"@nextcloud/l10n\";\nimport { TypedEventTarget } from \"typescript-event-target\";\nconst logger = getLoggerBuilder().setApp(\"@nextcloud/files\").detectUser().build();\nvar NewMenuEntryCategory = /* @__PURE__ */ ((NewMenuEntryCategory2) => {\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"UploadFromDevice\"] = 0] = \"UploadFromDevice\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"CreateNew\"] = 1] = \"CreateNew\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"Other\"] = 2] = \"Other\";\n return NewMenuEntryCategory2;\n})(NewMenuEntryCategory || {});\nclass NewFileMenu {\n _entries = [];\n registerEntry(entry) {\n this.validateEntry(entry);\n entry.category = entry.category ?? 1;\n this._entries.push(entry);\n }\n unregisterEntry(entry) {\n const entryIndex = typeof entry === \"string\" ? this.getEntryIndex(entry) : this.getEntryIndex(entry.id);\n if (entryIndex === -1) {\n logger.warn(\"Entry not found, nothing removed\", { entry, entries: this.getEntries() });\n return;\n }\n this._entries.splice(entryIndex, 1);\n }\n /**\n * Get the list of registered entries\n *\n * @param {Folder} context the creation context. Usually the current folder\n */\n getEntries(context) {\n if (context) {\n return this._entries.filter((entry) => typeof entry.enabled === \"function\" ? entry.enabled(context) : true);\n }\n return this._entries;\n }\n getEntryIndex(id) {\n return this._entries.findIndex((entry) => entry.id === id);\n }\n validateEntry(entry) {\n if (!entry.id || !entry.displayName || !(entry.iconSvgInline || entry.iconClass) || !entry.handler) {\n throw new Error(\"Invalid entry\");\n }\n if (typeof entry.id !== \"string\" || typeof entry.displayName !== \"string\") {\n throw new Error(\"Invalid id or displayName property\");\n }\n if (entry.iconClass && typeof entry.iconClass !== \"string\" || entry.iconSvgInline && typeof entry.iconSvgInline !== \"string\") {\n throw new Error(\"Invalid icon provided\");\n }\n if (entry.enabled !== void 0 && typeof entry.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (typeof entry.handler !== \"function\") {\n throw new Error(\"Invalid handler property\");\n }\n if (\"order\" in entry && typeof entry.order !== \"number\") {\n throw new Error(\"Invalid order property\");\n }\n if (this.getEntryIndex(entry.id) !== -1) {\n throw new Error(\"Duplicate entry\");\n }\n }\n}\nconst getNewFileMenu = function() {\n if (typeof window._nc_newfilemenu === \"undefined\") {\n window._nc_newfilemenu = new NewFileMenu();\n logger.debug(\"NewFileMenu initialized\");\n }\n return window._nc_newfilemenu;\n};\nvar DefaultType = /* @__PURE__ */ ((DefaultType2) => {\n DefaultType2[\"DEFAULT\"] = \"default\";\n DefaultType2[\"HIDDEN\"] = \"hidden\";\n return DefaultType2;\n})(DefaultType || {});\nclass FileAction {\n _action;\n constructor(action) {\n this.validateAction(action);\n this._action = action;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get title() {\n return this._action.title;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n get execBatch() {\n return this._action.execBatch;\n }\n get order() {\n return this._action.order;\n }\n get parent() {\n return this._action.parent;\n }\n get default() {\n return this._action.default;\n }\n get inline() {\n return this._action.inline;\n }\n get renderInline() {\n return this._action.renderInline;\n }\n validateAction(action) {\n if (!action.id || typeof action.id !== \"string\") {\n throw new Error(\"Invalid id\");\n }\n if (!action.displayName || typeof action.displayName !== \"function\") {\n throw new Error(\"Invalid displayName function\");\n }\n if (\"title\" in action && typeof action.title !== \"function\") {\n throw new Error(\"Invalid title function\");\n }\n if (!action.iconSvgInline || typeof action.iconSvgInline !== \"function\") {\n throw new Error(\"Invalid iconSvgInline function\");\n }\n if (!action.exec || typeof action.exec !== \"function\") {\n throw new Error(\"Invalid exec function\");\n }\n if (\"enabled\" in action && typeof action.enabled !== \"function\") {\n throw new Error(\"Invalid enabled function\");\n }\n if (\"execBatch\" in action && typeof action.execBatch !== \"function\") {\n throw new Error(\"Invalid execBatch function\");\n }\n if (\"order\" in action && typeof action.order !== \"number\") {\n throw new Error(\"Invalid order\");\n }\n if (\"parent\" in action && typeof action.parent !== \"string\") {\n throw new Error(\"Invalid parent\");\n }\n if (action.default && !Object.values(DefaultType).includes(action.default)) {\n throw new Error(\"Invalid default\");\n }\n if (\"inline\" in action && typeof action.inline !== \"function\") {\n throw new Error(\"Invalid inline function\");\n }\n if (\"renderInline\" in action && typeof action.renderInline !== \"function\") {\n throw new Error(\"Invalid renderInline function\");\n }\n }\n}\nconst registerFileAction = function(action) {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n if (window._nc_fileactions.find((search) => search.id === action.id)) {\n logger.error(`FileAction ${action.id} already registered`, { action });\n return;\n }\n window._nc_fileactions.push(action);\n};\nconst getFileActions = function() {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n return window._nc_fileactions;\n};\nclass Header {\n _header;\n constructor(header) {\n this.validateHeader(header);\n this._header = header;\n }\n get id() {\n return this._header.id;\n }\n get order() {\n return this._header.order;\n }\n get enabled() {\n return this._header.enabled;\n }\n get render() {\n return this._header.render;\n }\n get updated() {\n return this._header.updated;\n }\n validateHeader(header) {\n if (!header.id || !header.render || !header.updated) {\n throw new Error(\"Invalid header: id, render and updated are required\");\n }\n if (typeof header.id !== \"string\") {\n throw new Error(\"Invalid id property\");\n }\n if (header.enabled !== void 0 && typeof header.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (header.render && typeof header.render !== \"function\") {\n throw new Error(\"Invalid render property\");\n }\n if (header.updated && typeof header.updated !== \"function\") {\n throw new Error(\"Invalid updated property\");\n }\n }\n}\nconst registerFileListHeaders = function(header) {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n if (window._nc_filelistheader.find((search) => search.id === header.id)) {\n logger.error(`Header ${header.id} already registered`, { header });\n return;\n }\n window._nc_filelistheader.push(header);\n};\nconst getFileListHeaders = function() {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n return window._nc_filelistheader;\n};\nvar Permission = /* @__PURE__ */ ((Permission2) => {\n Permission2[Permission2[\"NONE\"] = 0] = \"NONE\";\n Permission2[Permission2[\"CREATE\"] = 4] = \"CREATE\";\n Permission2[Permission2[\"READ\"] = 1] = \"READ\";\n Permission2[Permission2[\"UPDATE\"] = 2] = \"UPDATE\";\n Permission2[Permission2[\"DELETE\"] = 8] = \"DELETE\";\n Permission2[Permission2[\"SHARE\"] = 16] = \"SHARE\";\n Permission2[Permission2[\"ALL\"] = 31] = \"ALL\";\n return Permission2;\n})(Permission || {});\nconst defaultDavProperties = [\n \"d:getcontentlength\",\n \"d:getcontenttype\",\n \"d:getetag\",\n \"d:getlastmodified\",\n \"d:creationdate\",\n \"d:displayname\",\n \"d:quota-available-bytes\",\n \"d:resourcetype\",\n \"nc:has-preview\",\n \"nc:is-encrypted\",\n \"nc:mount-type\",\n \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:size\"\n];\nconst defaultDavNamespaces = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n};\nconst registerDavProperty = function(prop, namespace = { nc: \"http://nextcloud.org/ns\" }) {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n const namespaces = { ...window._nc_dav_namespaces, ...namespace };\n if (window._nc_dav_properties.find((search) => search === prop)) {\n logger.warn(`${prop} already registered`, { prop });\n return false;\n }\n if (prop.startsWith(\"<\") || prop.split(\":\").length !== 2) {\n logger.error(`${prop} is not valid. See example: 'oc:fileid'`, { prop });\n return false;\n }\n const ns = prop.split(\":\")[0];\n if (!namespaces[ns]) {\n logger.error(`${prop} namespace unknown`, { prop, namespaces });\n return false;\n }\n window._nc_dav_properties.push(prop);\n window._nc_dav_namespaces = namespaces;\n return true;\n};\nconst getDavProperties = function() {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n }\n return window._nc_dav_properties.map((prop) => `<${prop} />`).join(\" \");\n};\nconst getDavNameSpaces = function() {\n if (typeof window._nc_dav_namespaces === \"undefined\") {\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n return Object.keys(window._nc_dav_namespaces).map((ns) => `xmlns:${ns}=\"${window._nc_dav_namespaces?.[ns]}\"`).join(\" \");\n};\nconst davGetDefaultPropfind = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t`;\n};\nconst davGetFavoritesReport = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`;\n};\nconst davGetRecentSearch = function(lastModified) {\n return `\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${getCurrentUser()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${lastModified}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;\n};\nconst davParsePermissions = function(permString = \"\") {\n let permissions = Permission.NONE;\n if (!permString) {\n return permissions;\n }\n if (permString.includes(\"C\") || permString.includes(\"K\")) {\n permissions |= Permission.CREATE;\n }\n if (permString.includes(\"G\")) {\n permissions |= Permission.READ;\n }\n if (permString.includes(\"W\") || permString.includes(\"N\") || permString.includes(\"V\")) {\n permissions |= Permission.UPDATE;\n }\n if (permString.includes(\"D\")) {\n permissions |= Permission.DELETE;\n }\n if (permString.includes(\"R\")) {\n permissions |= Permission.SHARE;\n }\n return permissions;\n};\nvar FileType = /* @__PURE__ */ ((FileType2) => {\n FileType2[\"Folder\"] = \"folder\";\n FileType2[\"File\"] = \"file\";\n return FileType2;\n})(FileType || {});\nconst isDavRessource = function(source, davService) {\n return source.match(davService) !== null;\n};\nconst validateData = (data, davService) => {\n if (data.id && typeof data.id !== \"number\") {\n throw new Error(\"Invalid id type of value\");\n }\n if (!data.source) {\n throw new Error(\"Missing mandatory source\");\n }\n try {\n new URL(data.source);\n } catch (e) {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!data.source.startsWith(\"http\")) {\n throw new Error(\"Invalid source format, only http(s) is supported\");\n }\n if (data.displayname && typeof data.displayname !== \"string\") {\n throw new Error(\"Invalid displayname type\");\n }\n if (data.mtime && !(data.mtime instanceof Date)) {\n throw new Error(\"Invalid mtime type\");\n }\n if (data.crtime && !(data.crtime instanceof Date)) {\n throw new Error(\"Invalid crtime type\");\n }\n if (!data.mime || typeof data.mime !== \"string\" || !data.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi)) {\n throw new Error(\"Missing or invalid mandatory mime\");\n }\n if (\"size\" in data && typeof data.size !== \"number\" && data.size !== void 0) {\n throw new Error(\"Invalid size type\");\n }\n if (\"permissions\" in data && data.permissions !== void 0 && !(typeof data.permissions === \"number\" && data.permissions >= Permission.NONE && data.permissions <= Permission.ALL)) {\n throw new Error(\"Invalid permissions\");\n }\n if (data.owner && data.owner !== null && typeof data.owner !== \"string\") {\n throw new Error(\"Invalid owner type\");\n }\n if (data.attributes && typeof data.attributes !== \"object\") {\n throw new Error(\"Invalid attributes type\");\n }\n if (data.root && typeof data.root !== \"string\") {\n throw new Error(\"Invalid root type\");\n }\n if (data.root && !data.root.startsWith(\"/\")) {\n throw new Error(\"Root must start with a leading slash\");\n }\n if (data.root && !data.source.includes(data.root)) {\n throw new Error(\"Root must be part of the source\");\n }\n if (data.root && isDavRessource(data.source, davService)) {\n const service = data.source.match(davService)[0];\n if (!data.source.includes(join(service, data.root))) {\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n }\n if (data.status && !Object.values(NodeStatus).includes(data.status)) {\n throw new Error(\"Status must be a valid NodeStatus\");\n }\n};\nvar NodeStatus = /* @__PURE__ */ ((NodeStatus2) => {\n NodeStatus2[\"NEW\"] = \"new\";\n NodeStatus2[\"FAILED\"] = \"failed\";\n NodeStatus2[\"LOADING\"] = \"loading\";\n NodeStatus2[\"LOCKED\"] = \"locked\";\n return NodeStatus2;\n})(NodeStatus || {});\nclass Node {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n readonlyAttributes = Object.entries(Object.getOwnPropertyDescriptors(Node.prototype)).filter((e) => typeof e[1].get === \"function\" && e[0] !== \"__proto__\").map((e) => e[0]);\n handler = {\n set: (target, prop, value) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n return Reflect.set(target, prop, value);\n },\n deleteProperty: (target, prop) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n return Reflect.deleteProperty(target, prop);\n },\n // TODO: This is deprecated and only needed for files v3\n get: (target, prop, receiver) => {\n if (this.readonlyAttributes.includes(prop)) {\n logger.warn(`Accessing \"Node.attributes.${prop}\" is deprecated, access it directly on the Node instance.`);\n return Reflect.get(this, prop);\n }\n return Reflect.get(target, prop, receiver);\n }\n };\n constructor(data, davService) {\n validateData(data, davService || this._knownDavService);\n this._data = {\n // TODO: Remove with next major release, this is just for compatibility\n displayname: data.attributes?.displayname,\n ...data,\n attributes: {}\n };\n this._attributes = new Proxy(this._data.attributes, this.handler);\n this.update(data.attributes ?? {});\n if (davService) {\n this._knownDavService = davService;\n }\n }\n /**\n * Get the source url to this object\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get source() {\n return this._data.source.replace(/\\/$/i, \"\");\n }\n /**\n * Get the encoded source url to this object for requests purposes\n */\n get encodedSource() {\n const { origin } = new URL(this.source);\n return origin + encodePath(this.source.slice(origin.length));\n }\n /**\n * Get this object name\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get basename() {\n return basename(this.source);\n }\n /**\n * The nodes displayname\n * By default the display name and the `basename` are identical,\n * but it is possible to have a different name. This happens\n * on the files app for example for shared folders.\n */\n get displayname() {\n return this._data.displayname || this.basename;\n }\n /**\n * Set the displayname\n */\n set displayname(displayname) {\n this._data.displayname = displayname;\n }\n /**\n * Get this object's extension\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get extension() {\n return extname(this.source);\n }\n /**\n * Get the directory path leading to this object\n * Will use the relative path to root if available\n *\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get dirname() {\n if (this.root) {\n let source = this.source;\n if (this.isDavRessource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return dirname(source.slice(firstMatch + root.length) || \"/\");\n }\n const url = new URL(this.source);\n return dirname(url.pathname);\n }\n /**\n * Get the file mime\n * There is no setter as the mime is not meant to be changed\n */\n get mime() {\n return this._data.mime;\n }\n /**\n * Get the file modification time\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Set the file modification time\n */\n set mtime(mtime) {\n this._data.mtime = mtime;\n }\n /**\n * Get the file creation time\n * There is no setter as the creation time is not meant to be changed\n */\n get crtime() {\n return this._data.crtime;\n }\n /**\n * Get the file size\n */\n get size() {\n return this._data.size;\n }\n /**\n * Set the file size\n */\n set size(size) {\n this.updateMtime();\n this._data.size = size;\n }\n /**\n * Get the file attribute\n * This contains all additional attributes not provided by the Node class\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n if (this.owner === null && !this.isDavRessource) {\n return Permission.READ;\n }\n return this._data.permissions !== void 0 ? this._data.permissions : Permission.NONE;\n }\n /**\n * Set the file permissions\n */\n set permissions(permissions) {\n this.updateMtime();\n this._data.permissions = permissions;\n }\n /**\n * Get the file owner\n * There is no setter as the owner is not meant to be changed\n */\n get owner() {\n if (!this.isDavRessource) {\n return null;\n }\n return this._data.owner;\n }\n /**\n * Is this a dav-related ressource ?\n */\n get isDavRessource() {\n return isDavRessource(this.source, this._knownDavService);\n }\n /**\n * Get the dav root of this object\n * There is no setter as the root is not meant to be changed\n */\n get root() {\n if (this._data.root) {\n return this._data.root.replace(/^(.+)\\/$/, \"$1\");\n }\n if (this.isDavRessource) {\n const root = dirname(this.source);\n return root.split(this._knownDavService).pop() || null;\n }\n return null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n let source = this.source;\n if (this.isDavRessource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return source.slice(firstMatch + root.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * There is no setter as the fileid is not meant to be changed\n */\n get fileid() {\n return this._data?.id;\n }\n /**\n * Get the node status.\n */\n get status() {\n return this._data?.status;\n }\n /**\n * Set the node status.\n */\n set status(status) {\n this._data.status = status;\n }\n /**\n * Move the node to a new destination\n *\n * @param {string} destination the new source.\n * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n */\n move(destination) {\n validateData({ ...this._data, source: destination }, this._knownDavService);\n const oldBasename = this.basename;\n this._data.source = destination;\n if (this.displayname === oldBasename && this.basename !== oldBasename) {\n this.displayname = this.basename;\n }\n this.updateMtime();\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(basename2) {\n if (basename2.includes(\"/\")) {\n throw new Error(\"Invalid basename\");\n }\n this.move(dirname(this.source) + \"/\" + basename2);\n }\n /**\n * Update the mtime if exists\n */\n updateMtime() {\n if (this._data.mtime) {\n this._data.mtime = /* @__PURE__ */ new Date();\n }\n }\n /**\n * Update the attributes of the node\n * Warning, updating attributes will NOT automatically update the mtime.\n *\n * @param attributes The new attributes to update on the Node attributes\n */\n update(attributes) {\n for (const [name, value] of Object.entries(attributes)) {\n try {\n if (value === void 0) {\n delete this.attributes[name];\n } else {\n this.attributes[name] = value;\n }\n } catch (e) {\n if (e instanceof TypeError) {\n continue;\n }\n throw e;\n }\n }\n }\n}\nclass File extends Node {\n get type() {\n return FileType.File;\n }\n}\nclass Folder extends Node {\n constructor(data) {\n super({\n ...data,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return FileType.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\nfunction davGetRootPath() {\n if (isPublicShare()) {\n return `/files/${getSharingToken()}`;\n }\n return `/files/${getCurrentUser()?.uid}`;\n}\nconst davRootPath = davGetRootPath();\nfunction davGetRemoteURL() {\n const url = generateRemoteUrl(\"dav\");\n if (isPublicShare()) {\n return url.replace(\"remote.php\", \"public.php\");\n }\n return url;\n}\nconst davRemoteURL = davGetRemoteURL();\nconst davGetClient = function(remoteURL = davRemoteURL, headers = {}) {\n const client = createClient(remoteURL, { headers });\n function setHeaders(token) {\n client.setHeaders({\n ...headers,\n // Add this so the server knows it is an request from the browser\n \"X-Requested-With\": \"XMLHttpRequest\",\n // Inject user auth\n requesttoken: token ?? \"\"\n });\n }\n onRequestTokenUpdate(setHeaders);\n setHeaders(getRequestToken());\n const patcher = getPatcher();\n patcher.patch(\"fetch\", (url, options) => {\n const headers2 = options.headers;\n if (headers2?.method) {\n options.method = headers2.method;\n delete headers2.method;\n }\n return fetch(url, options);\n });\n return client;\n};\nconst getFavoriteNodes = (davClient, path = \"/\", davRoot = davRootPath) => {\n const controller = new AbortController();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const contentsResponse = await davClient.getDirectoryContents(`${davRoot}${path}`, {\n signal: controller.signal,\n details: true,\n data: davGetFavoritesReport(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: true\n });\n const nodes = contentsResponse.data.filter((node) => node.filename !== path).map((result) => davResultToNode(result, davRoot));\n resolve(nodes);\n } catch (error) {\n reject(error);\n }\n });\n};\nconst davResultToNode = function(node, filesRoot = davRootPath, remoteURL = davRemoteURL) {\n let userId = getCurrentUser()?.uid;\n if (isPublicShare()) {\n userId = userId ?? \"anonymous\";\n } else if (!userId) {\n throw new Error(\"No user id found\");\n }\n const props = node.props;\n const permissions = davParsePermissions(props?.permissions);\n const owner = String(props?.[\"owner-id\"] || userId);\n const id = props.fileid || 0;\n const nodeData = {\n id,\n source: `${remoteURL}${node.filename}`,\n mtime: new Date(Date.parse(node.lastmod)),\n mime: node.mime || \"application/octet-stream\",\n // Manually cast to work around for https://github.com/perry-mitchell/webdav-client/pull/380\n displayname: props.displayname !== void 0 ? String(props.displayname) : void 0,\n size: props?.size || Number.parseInt(props.getcontentlength || \"0\"),\n // The fileid is set to -1 for failed requests\n status: id < 0 ? NodeStatus.FAILED : void 0,\n permissions,\n owner,\n root: filesRoot,\n attributes: {\n ...node,\n ...props,\n hasPreview: props?.[\"has-preview\"]\n }\n };\n delete nodeData.attributes?.props;\n return node.type === \"file\" ? new File(nodeData) : new Folder(nodeData);\n};\nvar InvalidFilenameErrorReason = /* @__PURE__ */ ((InvalidFilenameErrorReason2) => {\n InvalidFilenameErrorReason2[\"ReservedName\"] = \"reserved name\";\n InvalidFilenameErrorReason2[\"Character\"] = \"character\";\n InvalidFilenameErrorReason2[\"Extension\"] = \"extension\";\n return InvalidFilenameErrorReason2;\n})(InvalidFilenameErrorReason || {});\nclass InvalidFilenameError extends Error {\n constructor(options) {\n super(`Invalid ${options.reason} '${options.segment}' in filename '${options.filename}'`, { cause: options });\n }\n /**\n * The filename that was validated\n */\n get filename() {\n return this.cause.filename;\n }\n /**\n * Reason why the validation failed\n */\n get reason() {\n return this.cause.reason;\n }\n /**\n * Part of the filename that caused this error\n */\n get segment() {\n return this.cause.segment;\n }\n}\nfunction validateFilename(filename) {\n const capabilities = getCapabilities().files;\n const forbiddenCharacters = capabilities.forbidden_filename_characters ?? window._oc_config?.forbidden_filenames_characters ?? [\"/\", \"\\\\\"];\n for (const character of forbiddenCharacters) {\n if (filename.includes(character)) {\n throw new InvalidFilenameError({ segment: character, reason: \"character\", filename });\n }\n }\n filename = filename.toLocaleLowerCase();\n const forbiddenFilenames = capabilities.forbidden_filenames ?? [\".htaccess\"];\n if (forbiddenFilenames.includes(filename)) {\n throw new InvalidFilenameError({\n filename,\n segment: filename,\n reason: \"reserved name\"\n /* ReservedName */\n });\n }\n const endOfBasename = filename.indexOf(\".\", 1);\n const basename2 = filename.substring(0, endOfBasename === -1 ? void 0 : endOfBasename);\n const forbiddenFilenameBasenames = capabilities.forbidden_filename_basenames ?? [];\n if (forbiddenFilenameBasenames.includes(basename2)) {\n throw new InvalidFilenameError({\n filename,\n segment: basename2,\n reason: \"reserved name\"\n /* ReservedName */\n });\n }\n const forbiddenFilenameExtensions = capabilities.forbidden_filename_extensions ?? [\".part\", \".filepart\"];\n for (const extension of forbiddenFilenameExtensions) {\n if (filename.length > extension.length && filename.endsWith(extension)) {\n throw new InvalidFilenameError({ segment: extension, reason: \"extension\", filename });\n }\n }\n}\nfunction isFilenameValid(filename) {\n try {\n validateFilename(filename);\n return true;\n } catch (error) {\n if (error instanceof InvalidFilenameError) {\n return false;\n }\n throw error;\n }\n}\nfunction getUniqueName(name, otherNames, options) {\n const opts = {\n suffix: (n) => `(${n})`,\n ignoreFileExtension: false,\n ...options\n };\n let newName = name;\n let i = 1;\n while (otherNames.includes(newName)) {\n const ext = opts.ignoreFileExtension ? \"\" : extname(name);\n const base = basename(name, ext);\n newName = `${base} ${opts.suffix(i++)}${ext}`;\n }\n return newName;\n}\nconst humanList = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"];\nconst humanListBinary = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction formatFileSize(size, skipSmallSizes = false, binaryPrefixes = false, base1000 = false) {\n binaryPrefixes = binaryPrefixes && !base1000;\n if (typeof size === \"string\") {\n size = Number(size);\n }\n let order = size > 0 ? Math.floor(Math.log(size) / Math.log(base1000 ? 1e3 : 1024)) : 0;\n order = Math.min((binaryPrefixes ? humanListBinary.length : humanList.length) - 1, order);\n const readableFormat = binaryPrefixes ? humanListBinary[order] : humanList[order];\n let relativeSize = (size / Math.pow(base1000 ? 1e3 : 1024, order)).toFixed(1);\n if (skipSmallSizes === true && order === 0) {\n return (relativeSize !== \"0.0\" ? \"< 1 \" : \"0 \") + (binaryPrefixes ? humanListBinary[1] : humanList[1]);\n }\n if (order < 2) {\n relativeSize = parseFloat(relativeSize).toFixed(0);\n } else {\n relativeSize = parseFloat(relativeSize).toLocaleString(getCanonicalLocale());\n }\n return relativeSize + \" \" + readableFormat;\n}\nfunction parseFileSize(value, forceBinary = false) {\n try {\n value = `${value}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch (e) {\n return null;\n }\n const match = value.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (match === null || match[1] === \".\" || match[1] === \"\") {\n return null;\n }\n const bytesArray = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n };\n const decimalString = `${match[1]}`;\n const base = match[4] === \"i\" || forceBinary ? 1024 : 1e3;\n return Math.round(Number.parseFloat(decimalString) * base ** bytesArray[match[3]]);\n}\nfunction stringify(value) {\n if (value instanceof Date) {\n return value.toISOString();\n }\n return String(value);\n}\nfunction orderBy(collection, identifiers2, orders) {\n identifiers2 = identifiers2 ?? [(value) => value];\n orders = orders ?? [];\n const sorting = identifiers2.map((_, index) => (orders[index] ?? \"asc\") === \"asc\" ? 1 : -1);\n const collator = Intl.Collator(\n [getLanguage(), getCanonicalLocale()],\n {\n // handle 10 as ten and not as one-zero\n numeric: true,\n usage: \"sort\"\n }\n );\n return [...collection].sort((a, b) => {\n for (const [index, identifier] of identifiers2.entries()) {\n const value = collator.compare(stringify(identifier(a)), stringify(identifier(b)));\n if (value !== 0) {\n return value * sorting[index];\n }\n }\n return 0;\n });\n}\nvar FilesSortingMode = /* @__PURE__ */ ((FilesSortingMode2) => {\n FilesSortingMode2[\"Name\"] = \"basename\";\n FilesSortingMode2[\"Modified\"] = \"mtime\";\n FilesSortingMode2[\"Size\"] = \"size\";\n return FilesSortingMode2;\n})(FilesSortingMode || {});\nfunction sortNodes(nodes, options = {}) {\n const sortingOptions = {\n // Default to sort by name\n sortingMode: \"basename\",\n // Default to sort ascending\n sortingOrder: \"asc\",\n ...options\n };\n const basename2 = (name) => name.lastIndexOf(\".\") > 0 ? name.slice(0, name.lastIndexOf(\".\")) : name;\n const identifiers2 = [\n // 1: Sort favorites first if enabled\n ...sortingOptions.sortFavoritesFirst ? [(v) => v.attributes?.favorite !== 1] : [],\n // 2: Sort folders first if sorting by name\n ...sortingOptions.sortFoldersFirst ? [(v) => v.type !== \"folder\"] : [],\n // 3: Use sorting mode if NOT basename (to be able to use display name too)\n ...sortingOptions.sortingMode !== \"basename\" ? [(v) => v[sortingOptions.sortingMode]] : [],\n // 4: Use display name if available, fallback to name\n (v) => basename2(v.attributes?.displayname || v.basename),\n // 5: Finally, use basename if all previous sorting methods failed\n (v) => v.basename\n ];\n const orders = [\n // (for 1): always sort favorites before normal files\n ...sortingOptions.sortFavoritesFirst ? [\"asc\"] : [],\n // (for 2): always sort folders before files\n ...sortingOptions.sortFoldersFirst ? [\"asc\"] : [],\n // (for 3): Reverse if sorting by mtime as mtime higher means edited more recent -> lower\n ...sortingOptions.sortingMode === \"mtime\" ? [sortingOptions.sortingOrder === \"asc\" ? \"desc\" : \"asc\"] : [],\n // (also for 3 so make sure not to conflict with 2 and 3)\n ...sortingOptions.sortingMode !== \"mtime\" && sortingOptions.sortingMode !== \"basename\" ? [sortingOptions.sortingOrder] : [],\n // for 4: use configured sorting direction\n sortingOptions.sortingOrder,\n // for 5: use configured sorting direction\n sortingOptions.sortingOrder\n ];\n return orderBy(nodes, identifiers2, orders);\n}\nclass Navigation extends TypedEventTarget {\n _views = [];\n _currentView = null;\n /**\n * Register a new view on the navigation\n * @param view The view to register\n * @throws `Error` is thrown if a view with the same id is already registered\n */\n register(view) {\n if (this._views.find((search) => search.id === view.id)) {\n throw new Error(`View id ${view.id} is already registered`);\n }\n this._views.push(view);\n this.dispatchTypedEvent(\"update\", new CustomEvent(\"update\"));\n }\n /**\n * Remove a registered view\n * @param id The id of the view to remove\n */\n remove(id) {\n const index = this._views.findIndex((view) => view.id === id);\n if (index !== -1) {\n this._views.splice(index, 1);\n this.dispatchTypedEvent(\"update\", new CustomEvent(\"update\"));\n }\n }\n /**\n * Set the currently active view\n * @fires UpdateActiveViewEvent\n * @param view New active view\n */\n setActive(view) {\n this._currentView = view;\n const event = new CustomEvent(\"updateActive\", { detail: view });\n this.dispatchTypedEvent(\"updateActive\", event);\n }\n /**\n * The currently active files view\n */\n get active() {\n return this._currentView;\n }\n /**\n * All registered views\n */\n get views() {\n return this._views;\n }\n}\nconst getNavigation = function() {\n if (typeof window._nc_navigation === \"undefined\") {\n window._nc_navigation = new Navigation();\n logger.debug(\"Navigation service initialized\");\n }\n return window._nc_navigation;\n};\nclass Column {\n _column;\n constructor(column) {\n isValidColumn(column);\n this._column = column;\n }\n get id() {\n return this._column.id;\n }\n get title() {\n return this._column.title;\n }\n get render() {\n return this._column.render;\n }\n get sort() {\n return this._column.sort;\n }\n get summary() {\n return this._column.summary;\n }\n}\nconst isValidColumn = function(column) {\n if (!column.id || typeof column.id !== \"string\") {\n throw new Error(\"A column id is required\");\n }\n if (!column.title || typeof column.title !== \"string\") {\n throw new Error(\"A column title is required\");\n }\n if (!column.render || typeof column.render !== \"function\") {\n throw new Error(\"A render function is required\");\n }\n if (column.sort && typeof column.sort !== \"function\") {\n throw new Error(\"Column sortFunction must be a function\");\n }\n if (column.summary && typeof column.summary !== \"function\") {\n throw new Error(\"Column summary must be a function\");\n }\n return true;\n};\nfunction getDefaultExportFromCjs(x) {\n return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, \"default\") ? x[\"default\"] : x;\n}\nvar validator$2 = {};\nvar util$3 = {};\n(function(exports) {\n const nameStartChar = \":A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n const nameChar = nameStartChar + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n const nameRegexp = \"[\" + nameStartChar + \"][\" + nameChar + \"]*\";\n const regexName = new RegExp(\"^\" + nameRegexp + \"$\");\n const getAllMatches = function(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n };\n const isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === \"undefined\");\n };\n exports.isExist = function(v) {\n return typeof v !== \"undefined\";\n };\n exports.isEmptyObject = function(obj) {\n return Object.keys(obj).length === 0;\n };\n exports.merge = function(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a);\n const len = keys.length;\n for (let i = 0; i < len; i++) {\n if (arrayMode === \"strict\") {\n target[keys[i]] = [a[keys[i]]];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n };\n exports.getValue = function(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return \"\";\n }\n };\n exports.isName = isName;\n exports.getAllMatches = getAllMatches;\n exports.nameRegexp = nameRegexp;\n})(util$3);\nconst util$2 = util$3;\nconst defaultOptions$2 = {\n allowBooleanAttributes: false,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nvalidator$2.validate = function(xmlData, options) {\n options = Object.assign({}, defaultOptions$2, options);\n const tags = [];\n let tagFound = false;\n let reachedRoot = false;\n if (xmlData[0] === \"\\uFEFF\") {\n xmlData = xmlData.substr(1);\n }\n for (let i = 0; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\" && xmlData[i + 1] === \"?\") {\n i += 2;\n i = readPI(xmlData, i);\n if (i.err) return i;\n } else if (xmlData[i] === \"<\") {\n let tagStartPos = i;\n i++;\n if (xmlData[i] === \"!\") {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === \"/\") {\n closingTag = true;\n i++;\n }\n let tagName = \"\";\n for (; i < xmlData.length && xmlData[i] !== \">\" && xmlData[i] !== \" \" && xmlData[i] !== \"\t\" && xmlData[i] !== \"\\n\" && xmlData[i] !== \"\\r\"; i++) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substring(0, tagName.length - 1);\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\" + tagName + \"' is an invalid name.\";\n }\n return getErrorObject(\"InvalidTag\", msg, getLineNumberForPosition(xmlData, i));\n }\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject(\"InvalidAttr\", \"Attributes for '\" + tagName + \"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n if (attrStr[attrStr.length - 1] === \"/\") {\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n } else {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else if (tags.length === 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' has not been opened.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject(\n \"InvalidTag\",\n \"Expected closing tag '\" + otg.tagName + \"' (opened in line \" + openPos.line + \", col \" + openPos.col + \") instead of closing tag '\" + tagName + \"'.\",\n getLineNumberForPosition(xmlData, tagStartPos)\n );\n }\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n if (reachedRoot === true) {\n return getErrorObject(\"InvalidXml\", \"Multiple possible root nodes found.\", getLineNumberForPosition(xmlData, i));\n } else if (options.unpairedTags.indexOf(tagName) !== -1) ;\n else {\n tags.push({ tagName, tagStartPos });\n }\n tagFound = true;\n }\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n if (xmlData[i + 1] === \"!\") {\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i + 1] === \"?\") {\n i = readPI(xmlData, ++i);\n if (i.err) return i;\n } else {\n break;\n }\n } else if (xmlData[i] === \"&\") {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject(\"InvalidChar\", \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n } else {\n if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {\n return getErrorObject(\"InvalidXml\", \"Extra text at the end\", getLineNumberForPosition(xmlData, i));\n }\n }\n }\n if (xmlData[i] === \"<\") {\n i--;\n }\n }\n } else {\n if (isWhiteSpace(xmlData[i])) {\n continue;\n }\n return getErrorObject(\"InvalidChar\", \"char '\" + xmlData[i] + \"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n if (!tagFound) {\n return getErrorObject(\"InvalidXml\", \"Start tag expected.\", 1);\n } else if (tags.length == 1) {\n return getErrorObject(\"InvalidTag\", \"Unclosed tag '\" + tags[0].tagName + \"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n } else if (tags.length > 0) {\n return getErrorObject(\"InvalidXml\", \"Invalid '\" + JSON.stringify(tags.map((t2) => t2.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n }\n return true;\n};\nfunction isWhiteSpace(char) {\n return char === \" \" || char === \"\t\" || char === \"\\n\" || char === \"\\r\";\n}\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == \"?\" || xmlData[i] == \" \") {\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === \"xml\") {\n return getErrorObject(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == \"?\" && xmlData[i + 1] == \">\") {\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === \"-\" && xmlData[i + 2] === \"-\") {\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === \"-\" && xmlData[i + 1] === \"-\" && xmlData[i + 2] === \">\") {\n i += 2;\n break;\n }\n }\n } else if (xmlData.length > i + 8 && xmlData[i + 1] === \"D\" && xmlData[i + 2] === \"O\" && xmlData[i + 3] === \"C\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"Y\" && xmlData[i + 6] === \"P\" && xmlData[i + 7] === \"E\") {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n angleBracketsCount++;\n } else if (xmlData[i] === \">\") {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (xmlData.length > i + 9 && xmlData[i + 1] === \"[\" && xmlData[i + 2] === \"C\" && xmlData[i + 3] === \"D\" && xmlData[i + 4] === \"A\" && xmlData[i + 5] === \"T\" && xmlData[i + 6] === \"A\" && xmlData[i + 7] === \"[\") {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === \"]\" && xmlData[i + 1] === \"]\" && xmlData[i + 2] === \">\") {\n i += 2;\n break;\n }\n }\n }\n return i;\n}\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\nfunction readAttributeStr(xmlData, i) {\n let attrStr = \"\";\n let startChar = \"\";\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === \"\") {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i]) ;\n else {\n startChar = \"\";\n }\n } else if (xmlData[i] === \">\") {\n if (startChar === \"\") {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== \"\") {\n return false;\n }\n return {\n value: attrStr,\n index: i,\n tagClosed\n };\n}\nconst validAttrStrRegxp = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction validateAttributeString(attrStr, options) {\n const matches = util$2.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i][2] + \"' has no space in starting.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i][2] + \"' is without value.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) {\n return getErrorObject(\"InvalidAttr\", \"boolean attribute '\" + matches[i][2] + \"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n attrNames[attrName] = 1;\n } else {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n return true;\n}\nfunction validateNumberAmpersand(xmlData, i) {\n let re2 = /\\d/;\n if (xmlData[i] === \"x\") {\n i++;\n re2 = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \";\")\n return i;\n if (!xmlData[i].match(re2))\n break;\n }\n return -1;\n}\nfunction validateAmpersand(xmlData, i) {\n i++;\n if (xmlData[i] === \";\")\n return -1;\n if (xmlData[i] === \"#\") {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === \";\")\n break;\n return -1;\n }\n return i;\n}\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col\n }\n };\n}\nfunction validateAttrName(attrName) {\n return util$2.isName(attrName);\n}\nfunction validateTagName(tagname) {\n return util$2.isName(tagname);\n}\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\nvar OptionsBuilder = {};\nconst defaultOptions$1 = {\n preserveOrder: false,\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n removeNSPrefix: false,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true,\n //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function(tagName, val2) {\n return val2;\n },\n attributeValueProcessor: function(attrName, val2) {\n return val2;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n updateTag: function(tagName, jPath, attrs) {\n return tagName;\n }\n // skipEmptyListItem: false\n};\nconst buildOptions$1 = function(options) {\n return Object.assign({}, defaultOptions$1, options);\n};\nOptionsBuilder.buildOptions = buildOptions$1;\nOptionsBuilder.defaultOptions = defaultOptions$1;\nclass XmlNode {\n constructor(tagname) {\n this.tagname = tagname;\n this.child = [];\n this[\":@\"] = {};\n }\n add(key, val2) {\n if (key === \"__proto__\") key = \"#__proto__\";\n this.child.push({ [key]: val2 });\n }\n addChild(node) {\n if (node.tagname === \"__proto__\") node.tagname = \"#__proto__\";\n if (node[\":@\"] && Object.keys(node[\":@\"]).length > 0) {\n this.child.push({ [node.tagname]: node.child, [\":@\"]: node[\":@\"] });\n } else {\n this.child.push({ [node.tagname]: node.child });\n }\n }\n}\nvar xmlNode$1 = XmlNode;\nconst util$1 = util$3;\nfunction readDocType$1(xmlData, i) {\n const entities = {};\n if (xmlData[i + 3] === \"O\" && xmlData[i + 4] === \"C\" && xmlData[i + 5] === \"T\" && xmlData[i + 6] === \"Y\" && xmlData[i + 7] === \"P\" && xmlData[i + 8] === \"E\") {\n i = i + 9;\n let angleBracketsCount = 1;\n let hasBody = false, comment = false;\n let exp = \"\";\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\" && !comment) {\n if (hasBody && isEntity(xmlData, i)) {\n i += 7;\n [entityName, val, i] = readEntityExp(xmlData, i + 1);\n if (val.indexOf(\"&\") === -1)\n entities[validateEntityName(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n };\n } else if (hasBody && isElement(xmlData, i)) i += 8;\n else if (hasBody && isAttlist(xmlData, i)) i += 8;\n else if (hasBody && isNotation(xmlData, i)) i += 9;\n else if (isComment) comment = true;\n else throw new Error(\"Invalid DOCTYPE\");\n angleBracketsCount++;\n exp = \"\";\n } else if (xmlData[i] === \">\") {\n if (comment) {\n if (xmlData[i - 1] === \"-\" && xmlData[i - 2] === \"-\") {\n comment = false;\n angleBracketsCount--;\n }\n } else {\n angleBracketsCount--;\n }\n if (angleBracketsCount === 0) {\n break;\n }\n } else if (xmlData[i] === \"[\") {\n hasBody = true;\n } else {\n exp += xmlData[i];\n }\n }\n if (angleBracketsCount !== 0) {\n throw new Error(`Unclosed DOCTYPE`);\n }\n } else {\n throw new Error(`Invalid Tag instead of DOCTYPE`);\n }\n return { entities, i };\n}\nfunction readEntityExp(xmlData, i) {\n let entityName2 = \"\";\n for (; i < xmlData.length && (xmlData[i] !== \"'\" && xmlData[i] !== '\"'); i++) {\n entityName2 += xmlData[i];\n }\n entityName2 = entityName2.trim();\n if (entityName2.indexOf(\" \") !== -1) throw new Error(\"External entites are not supported\");\n const startChar = xmlData[i++];\n let val2 = \"\";\n for (; i < xmlData.length && xmlData[i] !== startChar; i++) {\n val2 += xmlData[i];\n }\n return [entityName2, val2, i];\n}\nfunction isComment(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"-\" && xmlData[i + 3] === \"-\") return true;\n return false;\n}\nfunction isEntity(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"E\" && xmlData[i + 3] === \"N\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"I\" && xmlData[i + 6] === \"T\" && xmlData[i + 7] === \"Y\") return true;\n return false;\n}\nfunction isElement(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"E\" && xmlData[i + 3] === \"L\" && xmlData[i + 4] === \"E\" && xmlData[i + 5] === \"M\" && xmlData[i + 6] === \"E\" && xmlData[i + 7] === \"N\" && xmlData[i + 8] === \"T\") return true;\n return false;\n}\nfunction isAttlist(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"A\" && xmlData[i + 3] === \"T\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"L\" && xmlData[i + 6] === \"I\" && xmlData[i + 7] === \"S\" && xmlData[i + 8] === \"T\") return true;\n return false;\n}\nfunction isNotation(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"N\" && xmlData[i + 3] === \"O\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"A\" && xmlData[i + 6] === \"T\" && xmlData[i + 7] === \"I\" && xmlData[i + 8] === \"O\" && xmlData[i + 9] === \"N\") return true;\n return false;\n}\nfunction validateEntityName(name) {\n if (util$1.isName(name))\n return name;\n else\n throw new Error(`Invalid entity name ${name}`);\n}\nvar DocTypeReader = readDocType$1;\nconst hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\nif (!Number.parseInt && window.parseInt) {\n Number.parseInt = window.parseInt;\n}\nif (!Number.parseFloat && window.parseFloat) {\n Number.parseFloat = window.parseFloat;\n}\nconst consider = {\n hex: true,\n leadingZeros: true,\n decimalPoint: \".\",\n eNotation: true\n //skipLike: /regex/\n};\nfunction toNumber$1(str, options = {}) {\n options = Object.assign({}, consider, options);\n if (!str || typeof str !== \"string\") return str;\n let trimmedStr = str.trim();\n if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str;\n else if (options.hex && hexRegex.test(trimmedStr)) {\n return Number.parseInt(trimmedStr, 16);\n } else {\n const match = numRegex.exec(trimmedStr);\n if (match) {\n const sign = match[1];\n const leadingZeros = match[2];\n let numTrimmedByZeros = trimZeros(match[3]);\n const eNotation = match[4] || match[6];\n if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== \".\") return str;\n else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== \".\") return str;\n else {\n const num = Number(trimmedStr);\n const numStr = \"\" + num;\n if (numStr.search(/[eE]/) !== -1) {\n if (options.eNotation) return num;\n else return str;\n } else if (eNotation) {\n if (options.eNotation) return num;\n else return str;\n } else if (trimmedStr.indexOf(\".\") !== -1) {\n if (numStr === \"0\" && numTrimmedByZeros === \"\") return num;\n else if (numStr === numTrimmedByZeros) return num;\n else if (sign && numStr === \"-\" + numTrimmedByZeros) return num;\n else return str;\n }\n if (leadingZeros) {\n if (numTrimmedByZeros === numStr) return num;\n else if (sign + numTrimmedByZeros === numStr) return num;\n else return str;\n }\n if (trimmedStr === numStr) return num;\n else if (trimmedStr === sign + numStr) return num;\n return str;\n }\n } else {\n return str;\n }\n }\n}\nfunction trimZeros(numStr) {\n if (numStr && numStr.indexOf(\".\") !== -1) {\n numStr = numStr.replace(/0+$/, \"\");\n if (numStr === \".\") numStr = \"0\";\n else if (numStr[0] === \".\") numStr = \"0\" + numStr;\n else if (numStr[numStr.length - 1] === \".\") numStr = numStr.substr(0, numStr.length - 1);\n return numStr;\n }\n return numStr;\n}\nvar strnum = toNumber$1;\nconst util = util$3;\nconst xmlNode = xmlNode$1;\nconst readDocType = DocTypeReader;\nconst toNumber = strnum;\nlet OrderedObjParser$1 = class OrderedObjParser {\n constructor(options) {\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.docTypeEntities = {};\n this.lastEntities = {\n \"apos\": { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n \"gt\": { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n \"lt\": { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n \"quot\": { regex: /&(quot|#34|#x22);/g, val: '\"' }\n };\n this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" };\n this.htmlEntities = {\n \"space\": { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n \"cent\": { regex: /&(cent|#162);/g, val: \"¢\" },\n \"pound\": { regex: /&(pound|#163);/g, val: \"£\" },\n \"yen\": { regex: /&(yen|#165);/g, val: \"¥\" },\n \"euro\": { regex: /&(euro|#8364);/g, val: \"€\" },\n \"copyright\": { regex: /&(copy|#169);/g, val: \"©\" },\n \"reg\": { regex: /&(reg|#174);/g, val: \"®\" },\n \"inr\": { regex: /&(inr|#8377);/g, val: \"₹\" },\n \"num_dec\": { regex: /&#([0-9]{1,7});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 10)) },\n \"num_hex\": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 16)) }\n };\n this.addExternalEntities = addExternalEntities;\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue$1;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n this.addChild = addChild;\n }\n};\nfunction addExternalEntities(externalEntities) {\n const entKeys = Object.keys(externalEntities);\n for (let i = 0; i < entKeys.length; i++) {\n const ent = entKeys[i];\n this.lastEntities[ent] = {\n regex: new RegExp(\"&\" + ent + \";\", \"g\"),\n val: externalEntities[ent]\n };\n }\n}\nfunction parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n if (val2 !== void 0) {\n if (this.options.trimValues && !dontTrim) {\n val2 = val2.trim();\n }\n if (val2.length > 0) {\n if (!escapeEntities) val2 = this.replaceEntitiesValue(val2);\n const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode);\n if (newval === null || newval === void 0) {\n return val2;\n } else if (typeof newval !== typeof val2 || newval !== val2) {\n return newval;\n } else if (this.options.trimValues) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n const trimmedVal = val2.trim();\n if (trimmedVal === val2) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n return val2;\n }\n }\n }\n }\n}\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(\":\");\n const prefix = tagname.charAt(0) === \"/\" ? \"/\" : \"\";\n if (tags[0] === \"xmlns\") {\n return \"\";\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\nconst attrsRegx = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction buildAttributesMap(attrStr, jPath, tagName) {\n if (!this.options.ignoreAttributes && typeof attrStr === \"string\") {\n const matches = util.getAllMatches(attrStr, attrsRegx);\n const len = matches.length;\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n let oldVal = matches[i][4];\n let aName = this.options.attributeNamePrefix + attrName;\n if (attrName.length) {\n if (this.options.transformAttributeName) {\n aName = this.options.transformAttributeName(aName);\n }\n if (aName === \"__proto__\") aName = \"#__proto__\";\n if (oldVal !== void 0) {\n if (this.options.trimValues) {\n oldVal = oldVal.trim();\n }\n oldVal = this.replaceEntitiesValue(oldVal);\n const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);\n if (newVal === null || newVal === void 0) {\n attrs[aName] = oldVal;\n } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) {\n attrs[aName] = newVal;\n } else {\n attrs[aName] = parseValue(\n oldVal,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n }\n } else if (this.options.allowBooleanAttributes) {\n attrs[aName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (this.options.attributesGroupName) {\n const attrCollection = {};\n attrCollection[this.options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs;\n }\n}\nconst parseXml = function(xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\");\n const xmlObj = new xmlNode(\"!xml\");\n let currentNode = xmlObj;\n let textData = \"\";\n let jPath = \"\";\n for (let i = 0; i < xmlData.length; i++) {\n const ch = xmlData[i];\n if (ch === \"<\") {\n if (xmlData[i + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\");\n let tagName = xmlData.substring(i + 2, closeIndex).trim();\n if (this.options.removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n }\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode) {\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n }\n const lastTagName = jPath.substring(jPath.lastIndexOf(\".\") + 1);\n if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) {\n throw new Error(`Unpaired tag can not be used as closing tag: `);\n }\n let propIndex = 0;\n if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) {\n propIndex = jPath.lastIndexOf(\".\", jPath.lastIndexOf(\".\") - 1);\n this.tagsNodeStack.pop();\n } else {\n propIndex = jPath.lastIndexOf(\".\");\n }\n jPath = jPath.substring(0, propIndex);\n currentNode = this.tagsNodeStack.pop();\n textData = \"\";\n i = closeIndex;\n } else if (xmlData[i + 1] === \"?\") {\n let tagData = readTagExp(xmlData, i, false, \"?>\");\n if (!tagData) throw new Error(\"Pi Tag is not closed.\");\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n if (this.options.ignoreDeclaration && tagData.tagName === \"?xml\" || this.options.ignorePiTags) ;\n else {\n const childNode = new xmlNode(tagData.tagName);\n childNode.add(this.options.textNodeName, \"\");\n if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n }\n i = tagData.closeIndex + 1;\n } else if (xmlData.substr(i + 1, 3) === \"!--\") {\n const endIndex = findClosingIndex(xmlData, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const comment = xmlData.substring(i + 4, endIndex - 2);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]);\n }\n i = endIndex;\n } else if (xmlData.substr(i + 1, 2) === \"!D\") {\n const result = readDocType(xmlData, i);\n this.docTypeEntities = result.entities;\n i = result.i;\n } else if (xmlData.substr(i + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i + 9, closeIndex);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true);\n if (val2 == void 0) val2 = \"\";\n if (this.options.cdataPropName) {\n currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]);\n } else {\n currentNode.add(this.options.textNodeName, val2);\n }\n i = closeIndex + 2;\n } else {\n let result = readTagExp(xmlData, i, this.options.removeNSPrefix);\n let tagName = result.tagName;\n const rawTagName = result.rawTagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode && textData) {\n if (currentNode.tagname !== \"!xml\") {\n textData = this.saveTextToParentTag(textData, currentNode, jPath, false);\n }\n }\n const lastTag = currentNode;\n if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) {\n currentNode = this.tagsNodeStack.pop();\n jPath = jPath.substring(0, jPath.lastIndexOf(\".\"));\n }\n if (tagName !== xmlObj.tagname) {\n jPath += jPath ? \".\" + tagName : tagName;\n }\n if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) {\n let tagContent = \"\";\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n i = result.closeIndex;\n } else if (this.options.unpairedTags.indexOf(tagName) !== -1) {\n i = result.closeIndex;\n } else {\n const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);\n if (!result2) throw new Error(`Unexpected end of ${rawTagName}`);\n i = result2.i;\n tagContent = result2.tagContent;\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n if (tagContent) {\n tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);\n }\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n childNode.add(this.options.textNodeName, tagContent);\n this.addChild(currentNode, childNode, jPath);\n } else {\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n } else {\n const childNode = new xmlNode(tagName);\n this.tagsNodeStack.push(currentNode);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }\n } else {\n textData += xmlData[i];\n }\n }\n return xmlObj.child;\n};\nfunction addChild(currentNode, childNode, jPath) {\n const result = this.options.updateTag(childNode.tagname, jPath, childNode[\":@\"]);\n if (result === false) ;\n else if (typeof result === \"string\") {\n childNode.tagname = result;\n currentNode.addChild(childNode);\n } else {\n currentNode.addChild(childNode);\n }\n}\nconst replaceEntitiesValue$1 = function(val2) {\n if (this.options.processEntities) {\n for (let entityName2 in this.docTypeEntities) {\n const entity = this.docTypeEntities[entityName2];\n val2 = val2.replace(entity.regx, entity.val);\n }\n for (let entityName2 in this.lastEntities) {\n const entity = this.lastEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n if (this.options.htmlEntities) {\n for (let entityName2 in this.htmlEntities) {\n const entity = this.htmlEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n }\n val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return val2;\n};\nfunction saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {\n if (textData) {\n if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0;\n textData = this.parseTextData(\n textData,\n currentNode.tagname,\n jPath,\n false,\n currentNode[\":@\"] ? Object.keys(currentNode[\":@\"]).length !== 0 : false,\n isLeafNode\n );\n if (textData !== void 0 && textData !== \"\")\n currentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\nfunction isItStopNode(stopNodes, jPath, currentTagName) {\n const allNodesExp = \"*.\" + currentTagName;\n for (const stopNodePath in stopNodes) {\n const stopNodeExp = stopNodes[stopNodePath];\n if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true;\n }\n return false;\n}\nfunction tagExpWithClosingIndex(xmlData, i, closingChar = \">\") {\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < xmlData.length; index++) {\n let ch = xmlData[index];\n if (attrBoundary) {\n if (ch === attrBoundary) attrBoundary = \"\";\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === closingChar[0]) {\n if (closingChar[1]) {\n if (xmlData[index + 1] === closingChar[1]) {\n return {\n data: tagExp,\n index\n };\n }\n } else {\n return {\n data: tagExp,\n index\n };\n }\n } else if (ch === \"\t\") {\n ch = \" \";\n }\n tagExp += ch;\n }\n}\nfunction findClosingIndex(xmlData, str, i, errMsg) {\n const closingIndex = xmlData.indexOf(str, i);\n if (closingIndex === -1) {\n throw new Error(errMsg);\n } else {\n return closingIndex + str.length - 1;\n }\n}\nfunction readTagExp(xmlData, i, removeNSPrefix, closingChar = \">\") {\n const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar);\n if (!result) return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if (separatorIndex !== -1) {\n tagName = tagExp.substring(0, separatorIndex);\n tagExp = tagExp.substring(separatorIndex + 1).trimStart();\n }\n const rawTagName = tagName;\n if (removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n return {\n tagName,\n tagExp,\n closeIndex,\n attrExpPresent,\n rawTagName\n };\n}\nfunction readStopNodeData(xmlData, tagName, i) {\n const startIndex = i;\n let openTagCount = 1;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n if (xmlData[i + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i + 2, closeIndex).trim();\n if (closeTagName === tagName) {\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i),\n i: closeIndex\n };\n }\n }\n i = closeIndex;\n } else if (xmlData[i + 1] === \"?\") {\n const closeIndex = findClosingIndex(xmlData, \"?>\", i + 1, \"StopNode is not closed.\");\n i = closeIndex;\n } else if (xmlData.substr(i + 1, 3) === \"!--\") {\n const closeIndex = findClosingIndex(xmlData, \"-->\", i + 3, \"StopNode is not closed.\");\n i = closeIndex;\n } else if (xmlData.substr(i + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"StopNode is not closed.\") - 2;\n i = closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i, \">\");\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== \"/\") {\n openTagCount++;\n }\n i = tagData.closeIndex;\n }\n }\n }\n }\n}\nfunction parseValue(val2, shouldParse, options) {\n if (shouldParse && typeof val2 === \"string\") {\n const newval = val2.trim();\n if (newval === \"true\") return true;\n else if (newval === \"false\") return false;\n else return toNumber(val2, options);\n } else {\n if (util.isExist(val2)) {\n return val2;\n } else {\n return \"\";\n }\n }\n}\nvar OrderedObjParser_1 = OrderedObjParser$1;\nvar node2json = {};\nfunction prettify$1(node, options) {\n return compress(node, options);\n}\nfunction compress(arr, options, jPath) {\n let text;\n const compressedObj = {};\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const property = propName$1(tagObj);\n let newJpath = \"\";\n if (jPath === void 0) newJpath = property;\n else newJpath = jPath + \".\" + property;\n if (property === options.textNodeName) {\n if (text === void 0) text = tagObj[property];\n else text += \"\" + tagObj[property];\n } else if (property === void 0) {\n continue;\n } else if (tagObj[property]) {\n let val2 = compress(tagObj[property], options, newJpath);\n const isLeaf = isLeafTag(val2, options);\n if (tagObj[\":@\"]) {\n assignAttributes(val2, tagObj[\":@\"], newJpath, options);\n } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) {\n val2 = val2[options.textNodeName];\n } else if (Object.keys(val2).length === 0) {\n if (options.alwaysCreateTextNode) val2[options.textNodeName] = \"\";\n else val2 = \"\";\n }\n if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) {\n if (!Array.isArray(compressedObj[property])) {\n compressedObj[property] = [compressedObj[property]];\n }\n compressedObj[property].push(val2);\n } else {\n if (options.isArray(property, newJpath, isLeaf)) {\n compressedObj[property] = [val2];\n } else {\n compressedObj[property] = val2;\n }\n }\n }\n }\n if (typeof text === \"string\") {\n if (text.length > 0) compressedObj[options.textNodeName] = text;\n } else if (text !== void 0) compressedObj[options.textNodeName] = text;\n return compressedObj;\n}\nfunction propName$1(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (key !== \":@\") return key;\n }\n}\nfunction assignAttributes(obj, attrMap, jpath, options) {\n if (attrMap) {\n const keys = Object.keys(attrMap);\n const len = keys.length;\n for (let i = 0; i < len; i++) {\n const atrrName = keys[i];\n if (options.isArray(atrrName, jpath + \".\" + atrrName, true, true)) {\n obj[atrrName] = [attrMap[atrrName]];\n } else {\n obj[atrrName] = attrMap[atrrName];\n }\n }\n }\n}\nfunction isLeafTag(obj, options) {\n const { textNodeName } = options;\n const propCount = Object.keys(obj).length;\n if (propCount === 0) {\n return true;\n }\n if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === \"boolean\" || obj[textNodeName] === 0)) {\n return true;\n }\n return false;\n}\nnode2json.prettify = prettify$1;\nconst { buildOptions } = OptionsBuilder;\nconst OrderedObjParser2 = OrderedObjParser_1;\nconst { prettify } = node2json;\nconst validator$1 = validator$2;\nlet XMLParser$1 = class XMLParser {\n constructor(options) {\n this.externalEntities = {};\n this.options = buildOptions(options);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(xmlData, validationOption) {\n if (typeof xmlData === \"string\") ;\n else if (xmlData.toString) {\n xmlData = xmlData.toString();\n } else {\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n }\n if (validationOption) {\n if (validationOption === true) validationOption = {};\n const result = validator$1.validate(xmlData, validationOption);\n if (result !== true) {\n throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`);\n }\n }\n const orderedObjParser = new OrderedObjParser2(this.options);\n orderedObjParser.addExternalEntities(this.externalEntities);\n const orderedResult = orderedObjParser.parseXml(xmlData);\n if (this.options.preserveOrder || orderedResult === void 0) return orderedResult;\n else return prettify(orderedResult, this.options);\n }\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(key, value) {\n if (value.indexOf(\"&\") !== -1) {\n throw new Error(\"Entity value can't have '&'\");\n } else if (key.indexOf(\"&\") !== -1 || key.indexOf(\";\") !== -1) {\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for ' '\");\n } else if (value === \"&\") {\n throw new Error(\"An entity with value '&' is not permitted\");\n } else {\n this.externalEntities[key] = value;\n }\n }\n};\nvar XMLParser_1 = XMLParser$1;\nconst EOL = \"\\n\";\nfunction toXml(jArray, options) {\n let indentation = \"\";\n if (options.format && options.indentBy.length > 0) {\n indentation = EOL;\n }\n return arrToStr(jArray, options, \"\", indentation);\n}\nfunction arrToStr(arr, options, jPath, indentation) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n if (tagName === void 0) continue;\n let newJPath = \"\";\n if (jPath.length === 0) newJPath = tagName;\n else newJPath = `${jPath}.${tagName}`;\n if (tagName === options.textNodeName) {\n let tagText = tagObj[tagName];\n if (!isStopNode(newJPath, options)) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += ``;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.commentPropName) {\n xmlStr += indentation + ``;\n isPreviousElementTag = true;\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr2 = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\";\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`;\n isPreviousElementTag = true;\n continue;\n }\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tagStart = indentation + `<${tagName}${attStr}`;\n const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode) xmlStr += tagStart + \">\";\n else xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"`;\n }\n isPreviousElementTag = true;\n }\n return xmlStr;\n}\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (!obj.hasOwnProperty(key)) continue;\n if (key !== \":@\") return key;\n }\n}\nfunction attr_to_str(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n if (!attrMap.hasOwnProperty(attr)) continue;\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\nfunction isStopNode(jPath, options) {\n jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for (let index in options.stopNodes) {\n if (options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\" + tagName) return true;\n }\n return false;\n}\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i = 0; i < options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\nvar orderedJs2Xml = toXml;\nconst buildFromOrderedJs = orderedJs2Xml;\nconst defaultOptions = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: \" \",\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },\n //it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"'\", \"g\"), val: \"'\" },\n { regex: new RegExp('\"', \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function() {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n this.processTextOrObjNode = processTextOrObjNode;\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = \">\\n\";\n this.newLine = \"\\n\";\n } else {\n this.indentate = function() {\n return \"\";\n };\n this.tagEndChar = \">\";\n this.newLine = \"\";\n }\n}\nBuilder.prototype.build = function(jObj) {\n if (this.options.preserveOrder) {\n return buildFromOrderedJs(jObj, this.options);\n } else {\n if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {\n jObj = {\n [this.options.arrayNodeName]: jObj\n };\n }\n return this.j2x(jObj, 0).val;\n }\n};\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = \"\";\n let val2 = \"\";\n for (let key in jObj) {\n if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue;\n if (typeof jObj[key] === \"undefined\") {\n if (this.isAttribute(key)) {\n val2 += \"\";\n }\n } else if (jObj[key] === null) {\n if (this.isAttribute(key)) {\n val2 += \"\";\n } else if (key[0] === \"?\") {\n val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n } else {\n val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n }\n } else if (jObj[key] instanceof Date) {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n } else if (typeof jObj[key] !== \"object\") {\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, \"\" + jObj[key]);\n } else {\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, \"\" + jObj[key]);\n val2 += this.replaceEntitiesValue(newval);\n } else {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n let listTagAttr = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === \"undefined\") ;\n else if (item === null) {\n if (key[0] === \"?\") val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n else val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n } else if (typeof item === \"object\") {\n if (this.options.oneListGroup) {\n const result = this.j2x(item, level + 1);\n listTagVal += result.val;\n if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {\n listTagAttr += result.attrStr;\n }\n } else {\n listTagVal += this.processTextOrObjNode(item, key, level);\n }\n } else {\n if (this.options.oneListGroup) {\n let textValue = this.options.tagValueProcessor(key, item);\n textValue = this.replaceEntitiesValue(textValue);\n listTagVal += textValue;\n } else {\n listTagVal += this.buildTextValNode(item, key, \"\", level);\n }\n }\n }\n if (this.options.oneListGroup) {\n listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);\n }\n val2 += listTagVal;\n } else {\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], \"\" + jObj[key][Ks[j]]);\n }\n } else {\n val2 += this.processTextOrObjNode(jObj[key], key, level);\n }\n }\n }\n return { attrStr, val: val2 };\n};\nBuilder.prototype.buildAttrPairStr = function(attrName, val2) {\n val2 = this.options.attributeValueProcessor(attrName, \"\" + val2);\n val2 = this.replaceEntitiesValue(val2);\n if (this.options.suppressBooleanAttributes && val2 === \"true\") {\n return \" \" + attrName;\n } else return \" \" + attrName + '=\"' + val2 + '\"';\n};\nfunction processTextOrObjNode(object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\nBuilder.prototype.buildObjectNode = function(val2, key, attrStr, level) {\n if (val2 === \"\") {\n if (key[0] === \"?\") return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n else {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n } else {\n let tagEndExp = \"\" + val2 + tagEndExp;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `` + this.newLine;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp;\n }\n }\n};\nBuilder.prototype.closeTag = function(key) {\n let closeTag = \"\";\n if (this.options.unpairedTags.indexOf(key) !== -1) {\n if (!this.options.suppressUnpairedNode) closeTag = \"/\";\n } else if (this.options.suppressEmptyNode) {\n closeTag = \"/\";\n } else {\n closeTag = `>` + this.newLine;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `` + this.newLine;\n } else if (key[0] === \"?\") {\n return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n } else {\n let textValue = this.options.tagValueProcessor(key, val2);\n textValue = this.replaceEntitiesValue(textValue);\n if (textValue === \"\") {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + \">\" + textValue + \" 0 && this.options.processEntities) {\n for (let i = 0; i < this.options.entities.length; i++) {\n const entity = this.options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n};\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\nfunction isAttribute(name) {\n if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}\nvar json2xml = Builder;\nconst validator = validator$2;\nconst XMLParser2 = XMLParser_1;\nconst XMLBuilder = json2xml;\nvar fxp = {\n XMLParser: XMLParser2,\n XMLValidator: validator,\n XMLBuilder\n};\nfunction isSvg(string) {\n if (typeof string !== \"string\") {\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n }\n string = string.trim();\n if (string.length === 0) {\n return false;\n }\n if (fxp.XMLValidator.validate(string) !== true) {\n return false;\n }\n let jsonObject;\n const parser = new fxp.XMLParser();\n try {\n jsonObject = parser.parse(string);\n } catch {\n return false;\n }\n if (!jsonObject) {\n return false;\n }\n if (!Object.keys(jsonObject).some((x) => x.toLowerCase() === \"svg\")) {\n return false;\n }\n return true;\n}\nclass View {\n _view;\n constructor(view) {\n isValidView(view);\n this._view = view;\n }\n get id() {\n return this._view.id;\n }\n get name() {\n return this._view.name;\n }\n get caption() {\n return this._view.caption;\n }\n get emptyTitle() {\n return this._view.emptyTitle;\n }\n get emptyCaption() {\n return this._view.emptyCaption;\n }\n get getContents() {\n return this._view.getContents;\n }\n get icon() {\n return this._view.icon;\n }\n set icon(icon) {\n this._view.icon = icon;\n }\n get order() {\n return this._view.order;\n }\n set order(order) {\n this._view.order = order;\n }\n get params() {\n return this._view.params;\n }\n set params(params) {\n this._view.params = params;\n }\n get columns() {\n return this._view.columns;\n }\n get emptyView() {\n return this._view.emptyView;\n }\n get parent() {\n return this._view.parent;\n }\n get sticky() {\n return this._view.sticky;\n }\n get expanded() {\n return this._view.expanded;\n }\n set expanded(expanded) {\n this._view.expanded = expanded;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n get loadChildViews() {\n return this._view.loadChildViews;\n }\n}\nconst isValidView = function(view) {\n if (!view.id || typeof view.id !== \"string\") {\n throw new Error(\"View id is required and must be a string\");\n }\n if (!view.name || typeof view.name !== \"string\") {\n throw new Error(\"View name is required and must be a string\");\n }\n if (view.columns && view.columns.length > 0 && (!view.caption || typeof view.caption !== \"string\")) {\n throw new Error(\"View caption is required for top-level views and must be a string\");\n }\n if (!view.getContents || typeof view.getContents !== \"function\") {\n throw new Error(\"View getContents is required and must be a function\");\n }\n if (!view.icon || typeof view.icon !== \"string\" || !isSvg(view.icon)) {\n throw new Error(\"View icon is required and must be a valid svg string\");\n }\n if (\"order\" in view && typeof view.order !== \"number\") {\n throw new Error(\"View order must be a number\");\n }\n if (view.columns) {\n view.columns.forEach((column) => {\n if (!(column instanceof Column)) {\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }\n });\n }\n if (view.emptyView && typeof view.emptyView !== \"function\") {\n throw new Error(\"View emptyView must be a function\");\n }\n if (view.parent && typeof view.parent !== \"string\") {\n throw new Error(\"View parent must be a string\");\n }\n if (\"sticky\" in view && typeof view.sticky !== \"boolean\") {\n throw new Error(\"View sticky must be a boolean\");\n }\n if (\"expanded\" in view && typeof view.expanded !== \"boolean\") {\n throw new Error(\"View expanded must be a boolean\");\n }\n if (view.defaultSortKey && typeof view.defaultSortKey !== \"string\") {\n throw new Error(\"View defaultSortKey must be a string\");\n }\n if (view.loadChildViews && typeof view.loadChildViews !== \"function\") {\n throw new Error(\"View loadChildViews must be a function\");\n }\n return true;\n};\nconst debug$1 = typeof process === \"object\" && process.env && process.env.NODE_DEBUG && /\\bsemver\\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error(\"SEMVER\", ...args) : () => {\n};\nvar debug_1 = debug$1;\nconst SEMVER_SPEC_VERSION = \"2.0.0\";\nconst MAX_LENGTH$1 = 256;\nconst MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */\n9007199254740991;\nconst MAX_SAFE_COMPONENT_LENGTH = 16;\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH$1 - 6;\nconst RELEASE_TYPES = [\n \"major\",\n \"premajor\",\n \"minor\",\n \"preminor\",\n \"patch\",\n \"prepatch\",\n \"prerelease\"\n];\nvar constants = {\n MAX_LENGTH: MAX_LENGTH$1,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 1,\n FLAG_LOOSE: 2\n};\nvar re$1 = { exports: {} };\n(function(module, exports) {\n const {\n MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH2,\n MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH2,\n MAX_LENGTH: MAX_LENGTH2\n } = constants;\n const debug2 = debug_1;\n exports = module.exports = {};\n const re2 = exports.re = [];\n const safeRe = exports.safeRe = [];\n const src = exports.src = [];\n const t2 = exports.t = {};\n let R = 0;\n const LETTERDASHNUMBER = \"[a-zA-Z0-9-]\";\n const safeRegexReplacements = [\n [\"\\\\s\", 1],\n [\"\\\\d\", MAX_LENGTH2],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH2]\n ];\n const makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);\n }\n return value;\n };\n const createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value);\n const index = R++;\n debug2(name, index, value);\n t2[name] = index;\n src[index] = value;\n re2[index] = new RegExp(value, isGlobal ? \"g\" : void 0);\n safeRe[index] = new RegExp(safe, isGlobal ? \"g\" : void 0);\n };\n createToken(\"NUMERICIDENTIFIER\", \"0|[1-9]\\\\d*\");\n createToken(\"NUMERICIDENTIFIERLOOSE\", \"\\\\d+\");\n createToken(\"NONNUMERICIDENTIFIER\", `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);\n createToken(\"MAINVERSION\", `(${src[t2.NUMERICIDENTIFIER]})\\\\.(${src[t2.NUMERICIDENTIFIER]})\\\\.(${src[t2.NUMERICIDENTIFIER]})`);\n createToken(\"MAINVERSIONLOOSE\", `(${src[t2.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})`);\n createToken(\"PRERELEASEIDENTIFIER\", `(?:${src[t2.NUMERICIDENTIFIER]}|${src[t2.NONNUMERICIDENTIFIER]})`);\n createToken(\"PRERELEASEIDENTIFIERLOOSE\", `(?:${src[t2.NUMERICIDENTIFIERLOOSE]}|${src[t2.NONNUMERICIDENTIFIER]})`);\n createToken(\"PRERELEASE\", `(?:-(${src[t2.PRERELEASEIDENTIFIER]}(?:\\\\.${src[t2.PRERELEASEIDENTIFIER]})*))`);\n createToken(\"PRERELEASELOOSE\", `(?:-?(${src[t2.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${src[t2.PRERELEASEIDENTIFIERLOOSE]})*))`);\n createToken(\"BUILDIDENTIFIER\", `${LETTERDASHNUMBER}+`);\n createToken(\"BUILD\", `(?:\\\\+(${src[t2.BUILDIDENTIFIER]}(?:\\\\.${src[t2.BUILDIDENTIFIER]})*))`);\n createToken(\"FULLPLAIN\", `v?${src[t2.MAINVERSION]}${src[t2.PRERELEASE]}?${src[t2.BUILD]}?`);\n createToken(\"FULL\", `^${src[t2.FULLPLAIN]}$`);\n createToken(\"LOOSEPLAIN\", `[v=\\\\s]*${src[t2.MAINVERSIONLOOSE]}${src[t2.PRERELEASELOOSE]}?${src[t2.BUILD]}?`);\n createToken(\"LOOSE\", `^${src[t2.LOOSEPLAIN]}$`);\n createToken(\"GTLT\", \"((?:<|>)?=?)\");\n createToken(\"XRANGEIDENTIFIERLOOSE\", `${src[t2.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);\n createToken(\"XRANGEIDENTIFIER\", `${src[t2.NUMERICIDENTIFIER]}|x|X|\\\\*`);\n createToken(\"XRANGEPLAIN\", `[v=\\\\s]*(${src[t2.XRANGEIDENTIFIER]})(?:\\\\.(${src[t2.XRANGEIDENTIFIER]})(?:\\\\.(${src[t2.XRANGEIDENTIFIER]})(?:${src[t2.PRERELEASE]})?${src[t2.BUILD]}?)?)?`);\n createToken(\"XRANGEPLAINLOOSE\", `[v=\\\\s]*(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:${src[t2.PRERELEASELOOSE]})?${src[t2.BUILD]}?)?)?`);\n createToken(\"XRANGE\", `^${src[t2.GTLT]}\\\\s*${src[t2.XRANGEPLAIN]}$`);\n createToken(\"XRANGELOOSE\", `^${src[t2.GTLT]}\\\\s*${src[t2.XRANGEPLAINLOOSE]}$`);\n createToken(\"COERCEPLAIN\", `${\"(^|[^\\\\d])(\\\\d{1,\"}${MAX_SAFE_COMPONENT_LENGTH2}})(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH2}}))?(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH2}}))?`);\n createToken(\"COERCE\", `${src[t2.COERCEPLAIN]}(?:$|[^\\\\d])`);\n createToken(\"COERCEFULL\", src[t2.COERCEPLAIN] + `(?:${src[t2.PRERELEASE]})?(?:${src[t2.BUILD]})?(?:$|[^\\\\d])`);\n createToken(\"COERCERTL\", src[t2.COERCE], true);\n createToken(\"COERCERTLFULL\", src[t2.COERCEFULL], true);\n createToken(\"LONETILDE\", \"(?:~>?)\");\n createToken(\"TILDETRIM\", `(\\\\s*)${src[t2.LONETILDE]}\\\\s+`, true);\n exports.tildeTrimReplace = \"$1~\";\n createToken(\"TILDE\", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAIN]}$`);\n createToken(\"TILDELOOSE\", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAINLOOSE]}$`);\n createToken(\"LONECARET\", \"(?:\\\\^)\");\n createToken(\"CARETTRIM\", `(\\\\s*)${src[t2.LONECARET]}\\\\s+`, true);\n exports.caretTrimReplace = \"$1^\";\n createToken(\"CARET\", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAIN]}$`);\n createToken(\"CARETLOOSE\", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAINLOOSE]}$`);\n createToken(\"COMPARATORLOOSE\", `^${src[t2.GTLT]}\\\\s*(${src[t2.LOOSEPLAIN]})$|^$`);\n createToken(\"COMPARATOR\", `^${src[t2.GTLT]}\\\\s*(${src[t2.FULLPLAIN]})$|^$`);\n createToken(\"COMPARATORTRIM\", `(\\\\s*)${src[t2.GTLT]}\\\\s*(${src[t2.LOOSEPLAIN]}|${src[t2.XRANGEPLAIN]})`, true);\n exports.comparatorTrimReplace = \"$1$2$3\";\n createToken(\"HYPHENRANGE\", `^\\\\s*(${src[t2.XRANGEPLAIN]})\\\\s+-\\\\s+(${src[t2.XRANGEPLAIN]})\\\\s*$`);\n createToken(\"HYPHENRANGELOOSE\", `^\\\\s*(${src[t2.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${src[t2.XRANGEPLAINLOOSE]})\\\\s*$`);\n createToken(\"STAR\", \"(<|>)?=?\\\\s*\\\\*\");\n createToken(\"GTE0\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\");\n createToken(\"GTE0PRE\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\");\n})(re$1, re$1.exports);\nvar reExports = re$1.exports;\nconst looseOption = Object.freeze({ loose: true });\nconst emptyOpts = Object.freeze({});\nconst parseOptions$1 = (options) => {\n if (!options) {\n return emptyOpts;\n }\n if (typeof options !== \"object\") {\n return looseOption;\n }\n return options;\n};\nvar parseOptions_1 = parseOptions$1;\nconst numeric = /^[0-9]+$/;\nconst compareIdentifiers$1 = (a, b) => {\n const anum = numeric.test(a);\n const bnum = numeric.test(b);\n if (anum && bnum) {\n a = +a;\n b = +b;\n }\n return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;\n};\nconst rcompareIdentifiers = (a, b) => compareIdentifiers$1(b, a);\nvar identifiers = {\n compareIdentifiers: compareIdentifiers$1,\n rcompareIdentifiers\n};\nconst debug = debug_1;\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = constants;\nconst { safeRe: re, t } = reExports;\nconst parseOptions = parseOptions_1;\nconst { compareIdentifiers } = identifiers;\nlet SemVer$2 = class SemVer {\n constructor(version, options) {\n options = parseOptions(options);\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {\n return version;\n } else {\n version = version.version;\n }\n } else if (typeof version !== \"string\") {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`);\n }\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n );\n }\n debug(\"SemVer\", version, options);\n this.options = options;\n this.loose = !!options.loose;\n this.includePrerelease = !!options.includePrerelease;\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`);\n }\n this.raw = version;\n this.major = +m[1];\n this.minor = +m[2];\n this.patch = +m[3];\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError(\"Invalid major version\");\n }\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError(\"Invalid minor version\");\n }\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError(\"Invalid patch version\");\n }\n if (!m[4]) {\n this.prerelease = [];\n } else {\n this.prerelease = m[4].split(\".\").map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id;\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num;\n }\n }\n return id;\n });\n }\n this.build = m[5] ? m[5].split(\".\") : [];\n this.format();\n }\n format() {\n this.version = `${this.major}.${this.minor}.${this.patch}`;\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join(\".\")}`;\n }\n return this.version;\n }\n toString() {\n return this.version;\n }\n compare(other) {\n debug(\"SemVer.compare\", this.version, this.options, other);\n if (!(other instanceof SemVer)) {\n if (typeof other === \"string\" && other === this.version) {\n return 0;\n }\n other = new SemVer(other, this.options);\n }\n if (other.version === this.version) {\n return 0;\n }\n return this.compareMain(other) || this.comparePre(other);\n }\n compareMain(other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options);\n }\n return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);\n }\n comparePre(other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options);\n }\n if (this.prerelease.length && !other.prerelease.length) {\n return -1;\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1;\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0;\n }\n let i = 0;\n do {\n const a = this.prerelease[i];\n const b = other.prerelease[i];\n debug(\"prerelease compare\", i, a, b);\n if (a === void 0 && b === void 0) {\n return 0;\n } else if (b === void 0) {\n return 1;\n } else if (a === void 0) {\n return -1;\n } else if (a === b) {\n continue;\n } else {\n return compareIdentifiers(a, b);\n }\n } while (++i);\n }\n compareBuild(other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options);\n }\n let i = 0;\n do {\n const a = this.build[i];\n const b = other.build[i];\n debug(\"build compare\", i, a, b);\n if (a === void 0 && b === void 0) {\n return 0;\n } else if (b === void 0) {\n return 1;\n } else if (a === void 0) {\n return -1;\n } else if (a === b) {\n continue;\n } else {\n return compareIdentifiers(a, b);\n }\n } while (++i);\n }\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc(release, identifier, identifierBase) {\n switch (release) {\n case \"premajor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor = 0;\n this.major++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"preminor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prepatch\":\n this.prerelease.length = 0;\n this.inc(\"patch\", identifier, identifierBase);\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prerelease\":\n if (this.prerelease.length === 0) {\n this.inc(\"patch\", identifier, identifierBase);\n }\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"major\":\n if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {\n this.major++;\n }\n this.minor = 0;\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"minor\":\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++;\n }\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"patch\":\n if (this.prerelease.length === 0) {\n this.patch++;\n }\n this.prerelease = [];\n break;\n case \"pre\": {\n const base = Number(identifierBase) ? 1 : 0;\n if (!identifier && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier is empty\");\n }\n if (this.prerelease.length === 0) {\n this.prerelease = [base];\n } else {\n let i = this.prerelease.length;\n while (--i >= 0) {\n if (typeof this.prerelease[i] === \"number\") {\n this.prerelease[i]++;\n i = -2;\n }\n }\n if (i === -1) {\n if (identifier === this.prerelease.join(\".\") && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier already exists\");\n }\n this.prerelease.push(base);\n }\n }\n if (identifier) {\n let prerelease = [identifier, base];\n if (identifierBase === false) {\n prerelease = [identifier];\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease;\n }\n } else {\n this.prerelease = prerelease;\n }\n }\n break;\n }\n default:\n throw new Error(`invalid increment argument: ${release}`);\n }\n this.raw = this.format();\n if (this.build.length) {\n this.raw += `+${this.build.join(\".\")}`;\n }\n return this;\n }\n};\nvar semver = SemVer$2;\nconst SemVer$1 = semver;\nconst parse$1 = (version, options, throwErrors = false) => {\n if (version instanceof SemVer$1) {\n return version;\n }\n try {\n return new SemVer$1(version, options);\n } catch (er) {\n if (!throwErrors) {\n return null;\n }\n throw er;\n }\n};\nvar parse_1 = parse$1;\nconst parse = parse_1;\nconst valid = (version, options) => {\n const v = parse(version, options);\n return v ? v.version : null;\n};\nvar valid_1 = valid;\nconst valid$1 = /* @__PURE__ */ getDefaultExportFromCjs(valid_1);\nconst SemVer2 = semver;\nconst major = (a, loose) => new SemVer2(a, loose).major;\nvar major_1 = major;\nconst major$1 = /* @__PURE__ */ getDefaultExportFromCjs(major_1);\nclass ProxyBus {\n bus;\n constructor(bus2) {\n if (typeof bus2.getVersion !== \"function\" || !valid$1(bus2.getVersion())) {\n console.warn(\"Proxying an event bus with an unknown or invalid version\");\n } else if (major$1(bus2.getVersion()) !== major$1(this.getVersion())) {\n console.warn(\n \"Proxying an event bus of version \" + bus2.getVersion() + \" with \" + this.getVersion()\n );\n }\n this.bus = bus2;\n }\n getVersion() {\n return \"3.3.1\";\n }\n subscribe(name, handler) {\n this.bus.subscribe(name, handler);\n }\n unsubscribe(name, handler) {\n this.bus.unsubscribe(name, handler);\n }\n emit(name, event) {\n this.bus.emit(name, event);\n }\n}\nclass SimpleBus {\n handlers = /* @__PURE__ */ new Map();\n getVersion() {\n return \"3.3.1\";\n }\n subscribe(name, handler) {\n this.handlers.set(\n name,\n (this.handlers.get(name) || []).concat(\n handler\n )\n );\n }\n unsubscribe(name, handler) {\n this.handlers.set(\n name,\n (this.handlers.get(name) || []).filter((h) => h !== handler)\n );\n }\n emit(name, event) {\n (this.handlers.get(name) || []).forEach((h) => {\n try {\n h(event);\n } catch (e) {\n console.error(\"could not invoke event listener\", e);\n }\n });\n }\n}\nlet bus = null;\nfunction getBus() {\n if (bus !== null) {\n return bus;\n }\n if (typeof window === \"undefined\") {\n return new Proxy({}, {\n get: () => {\n return () => console.error(\n \"Window not available, EventBus can not be established!\"\n );\n }\n });\n }\n if (window.OC?._eventBus && typeof window._nc_event_bus === \"undefined\") {\n console.warn(\n \"found old event bus instance at OC._eventBus. Update your version!\"\n );\n window._nc_event_bus = window.OC._eventBus;\n }\n if (typeof window?._nc_event_bus !== \"undefined\") {\n bus = new ProxyBus(window._nc_event_bus);\n } else {\n bus = window._nc_event_bus = new SimpleBus();\n }\n return bus;\n}\nfunction emit(name, event) {\n getBus().emit(name, event);\n}\n/*!\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nclass FileListFilter extends TypedEventTarget {\n id;\n order;\n constructor(id, order = 100) {\n super();\n this.id = id;\n this.order = order;\n }\n filter(nodes) {\n throw new Error(\"Not implemented\");\n }\n updateChips(chips) {\n this.dispatchTypedEvent(\"update:chips\", new CustomEvent(\"update:chips\", { detail: chips }));\n }\n filterUpdated() {\n this.dispatchTypedEvent(\"update:filter\", new CustomEvent(\"update:filter\"));\n }\n}\nfunction registerFileListFilter(filter) {\n if (!window._nc_filelist_filters) {\n window._nc_filelist_filters = /* @__PURE__ */ new Map();\n }\n if (window._nc_filelist_filters.has(filter.id)) {\n throw new Error(`File list filter \"${filter.id}\" already registered`);\n }\n window._nc_filelist_filters.set(filter.id, filter);\n emit(\"files:filter:added\", filter);\n}\nfunction unregisterFileListFilter(filterId) {\n if (window._nc_filelist_filters && window._nc_filelist_filters.has(filterId)) {\n window._nc_filelist_filters.delete(filterId);\n emit(\"files:filter:removed\", filterId);\n }\n}\nfunction getFileListFilters() {\n if (!window._nc_filelist_filters) {\n return [];\n }\n return [...window._nc_filelist_filters.values()];\n}\nconst addNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.registerEntry(entry);\n};\nconst removeNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.unregisterEntry(entry);\n};\nconst getNewFileMenuEntries = function(context) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.getEntries(context).sort((a, b) => {\n if (a.order !== void 0 && b.order !== void 0 && a.order !== b.order) {\n return a.order - b.order;\n }\n return a.displayName.localeCompare(b.displayName, void 0, { numeric: true, sensitivity: \"base\" });\n });\n};\nexport {\n Column,\n DefaultType,\n File,\n FileAction,\n FileListFilter,\n FileType,\n FilesSortingMode,\n Folder,\n Header,\n InvalidFilenameError,\n InvalidFilenameErrorReason,\n Navigation,\n NewMenuEntryCategory,\n Node,\n NodeStatus,\n Permission,\n View,\n addNewFileMenuEntry,\n davGetClient,\n davGetDefaultPropfind,\n davGetFavoritesReport,\n davGetRecentSearch,\n davGetRemoteURL,\n davGetRootPath,\n davParsePermissions,\n davRemoteURL,\n davResultToNode,\n davRootPath,\n defaultDavNamespaces,\n defaultDavProperties,\n formatFileSize,\n getDavNameSpaces,\n getDavProperties,\n getFavoriteNodes,\n getFileActions,\n getFileListFilters,\n getFileListHeaders,\n getNavigation,\n getNewFileMenuEntries,\n getUniqueName,\n isFilenameValid,\n orderBy,\n parseFileSize,\n registerDavProperty,\n registerFileAction,\n registerFileListFilter,\n registerFileListHeaders,\n removeNewFileMenuEntry,\n sortNodes,\n unregisterFileListFilter,\n validateFilename\n};\n","const UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\tlet isLastLastCharPreserved = false;\n\n\tfor (let index = 0; index < string.length; index++) {\n\t\tconst character = string[index];\n\t\tisLastLastCharPreserved = index > 2 ? string[index - 3] === '-' : true;\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, index) + '-' + string.slice(index);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\tindex++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase)) {\n\t\t\tstring = string.slice(0, index - 1) + '-' + string.slice(index - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replaceAll(LEADING_CAPITAL, match => toLowerCase(match));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input\n\t\t.replaceAll(NUMBERS_AND_IDENTIFIER, (match, pattern, offset) => ['_', '-'].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match))\n\t\t.replaceAll(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier));\n};\n\nexport default function camelCase(input, options) {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options,\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false\n\t\t? string => string.toLowerCase()\n\t\t: string => string.toLocaleLowerCase(options.locale);\n\n\tconst toUpperCase = options.locale === false\n\t\t? string => string.toUpperCase()\n\t\t: string => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\tif (SEPARATORS.test(input)) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\tinput = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"802\":\"387187865bf364bcd145\",\"6028\":\"5ce1128bba38461a1848\",\"9291\":\"077955af818a227340aa\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2766;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2766: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(3253)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","async","execBatch","nodes","response","Promise","resolve","spawnDialog","defineAsyncComponent","status","Array","length","fill","action","FileAction","id","displayName","t","iconSvgInline","TagMultipleSvg","enabled","isPublicShare","exec","node","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","renderTag","tag","isMore","arguments","undefined","tagElement","document","createElement","classList","add","textContent","renderInline","tags","getNodeSystemTags","systemTagsElement","setAttribute","fileid","toString","append","moreTagElement","slice","join","order","subscribe","then","systemTagsHtml","querySelectorAll","forEach","element","replaceWith","rootPath","client","davGetClient","resultToNode","davResultToNode","formatReportPayload","tagId","getDavNameSpaces","getDavProperties","tagToNode","Folder","source","davRemoteURL","owner","String","getCurrentUser","uid","root","displayname","permissions","Permission","READ","attributes","systemTagsViewId","view","type","FileType","dir","dirname","path","window","OCP","Files","Router","goToRoute","openfile","default","DefaultType","HIDDEN","registerDavProperty","registerFileAction","bulkSystemTagsAction","inlineSystemTagsAction","openInFilesAction","getNavigation","register","View","name","caption","emptyTitle","emptyCaption","icon","svgTagMultiple","getContents","tagsCache","fetchTags","filter","userVisible","folder","NONE","contents","map","parseInt","split","find","Error","getDirectoryContents","davRootPath","details","data","headers","method","logger","getLoggerBuilder","setApp","detectUser","build","fetchTagsPayload","davClient","glob","parseTags","error","fetchTag","stat","createTag","tagToPost","formatTag","customRequest","contentLocation","get","parseIdFromLocation","getTagObjects","etag","props","getetag","objects","Object","values","flat","setTagObjects","objectIds","_ref","rootUrl","generateRemoteUrl","createClient","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","fromEntries","entries","_ref2","key","value","camelCase","url","queryPos","indexOf","substring","parts","result","pop","Number","initialTag","setNodeSystemTags","Vue","___CSS_LOADER_EXPORT___","push","module","DefaultType2","_action","constructor","this","validateAction","title","parent","inline","includes","_nc_fileactions","debug","search","Permission2","defaultDavProperties","defaultDavNamespaces","d","nc","oc","ocs","prop","namespace","_nc_dav_properties","_nc_dav_namespaces","namespaces","warn","startsWith","keys","ns","davGetDefaultPropfind","davGetRecentSearch","lastModified","FileType2","isDavRessource","davService","match","validateData","URL","e","mtime","Date","crtime","mime","size","ALL","service","NodeStatus","NodeStatus2","Node","_data","_attributes","_knownDavService","readonlyAttributes","getOwnPropertyDescriptors","prototype","handler","set","target","Reflect","deleteProperty","receiver","Proxy","update","replace","encodedSource","origin","basename","extension","extname","firstMatch","pathname","updateMtime","move","destination","oldBasename","rename","basename2","TypeError","File","super","davGetRemoteURL","remoteURL","patch","headers2","fetch","getFavoriteNodes","davRoot","controller","AbortController","CancelablePromise","reject","onCancel","abort","signal","includeSelf","filename","filesRoot","userId","permString","CREATE","UPDATE","DELETE","SHARE","davParsePermissions","nodeData","parse","lastmod","getcontentlength","FAILED","hasPreview","humanList","humanListBinary","formatFileSize","skipSmallSizes","binaryPrefixes","base1000","Math","floor","log","min","readableFormat","relativeSize","pow","toFixed","parseFloat","toLocaleString","stringify","toISOString","sortNodes","sortingOptions","sortingMode","sortingOrder","collection","identifiers2","orders","sorting","_","index","collator","Intl","Collator","numeric","usage","sort","a","b","identifier","compare","orderBy","sortFavoritesFirst","v","favorite","sortFoldersFirst","lastIndexOf","Navigation","_views","_currentView","dispatchTypedEvent","CustomEvent","remove","findIndex","splice","setActive","event","detail","active","views","_nc_navigation","Column","_column","column","isValidColumn","render","summary","validator$2","util$3","exports","nameStartChar","nameRegexp","regexName","RegExp","isExist","isEmptyObject","obj","merge","arrayMode","len","i","getValue","isName","string","getAllMatches","regex","matches","allmatches","startIndex","lastIndex","util$2","defaultOptions$2","allowBooleanAttributes","unpairedTags","isWhiteSpace","char","readPI","xmlData","start","tagname","substr","getErrorObject","getLineNumberForPosition","readCommentAndCDATA","angleBracketsCount","validate","assign","tagFound","reachedRoot","err","tagStartPos","closingTag","tagName","trim","msg","readAttributeStr","attrStr","attrStrStart","isValid","validateAttributeString","code","line","tagClosed","otg","openPos","col","afterAmp","validateAmpersand","JSON","t2","doubleQuote","singleQuote","startChar","validAttrStrRegxp","attrNames","getPositionFromMatch","attrName","validateAttrName","hasOwnProperty","re2","validateNumberAmpersand","count","message","lineNumber","lines","OptionsBuilder","defaultOptions$1","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","val2","attributeValueProcessor","stopNodes","alwaysCreateTextNode","isArray","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","jPath","attrs","buildOptions","defaultOptions","util$1","readEntityExp","entityName2","isComment","isEntity","isElement","isAttlist","isNotation","validateEntityName","hexRegex","numRegex","consider","decimalPoint","util","xmlNode","child","addChild","readDocType","entities","hasBody","comment","exp","entityName","val","regx","toNumber","str","trimmedStr","skipLike","test","sign","numTrimmedByZeros","numStr","num","addExternalEntities","externalEntities","entKeys","ent","lastEntities","parseTextData","dontTrim","hasAttributes","isLeafNode","escapeEntities","replaceEntitiesValue","newval","parseValue","resolveNameSpace","prefix","charAt","attrsRegx","buildAttributesMap","oldVal","aName","newVal","attrCollection","parseXml","xmlObj","currentNode","textData","closeIndex","findClosingIndex","colonIndex","saveTextToParentTag","lastTagName","propIndex","tagsNodeStack","tagData","readTagExp","childNode","tagExp","attrExpPresent","endIndex","docTypeEntities","rawTagName","lastTag","isItStopNode","tagContent","result2","readStopNodeData","replaceEntitiesValue$1","entity","ampEntity","currentTagName","allNodesExp","stopNodePath","stopNodeExp","errMsg","closingIndex","closingChar","attrBoundary","ch","tagExpWithClosingIndex","separatorIndex","trimStart","openTagCount","shouldParse","node2json","compress","arr","text","compressedObj","tagObj","property","propName$1","newJpath","isLeaf","isLeafTag","assignAttributes","attrMap","jpath","atrrName","propCount","prettify","OrderedObjParser2","fromCharCode","validator$1","arrToStr","indentation","xmlStr","isPreviousElementTag","propName","newJPath","tagText","isStopNode","attStr2","attr_to_str","tempInd","piTextNodeName","newIdentation","indentBy","tagStart","tagValue","suppressUnpairedNode","suppressEmptyNode","endsWith","attr","attrVal","suppressBooleanAttributes","textValue","buildFromOrderedJs","jArray","format","oneListGroup","Builder","isAttribute","attrPrefixLen","processTextOrObjNode","indentate","tagEndChar","newLine","object","level","j2x","buildTextValNode","buildObjectNode","repeat","jObj","arrayNodeName","call","buildAttrPairStr","arrLen","listTagVal","listTagAttr","j","item","Ks","L","closeTag","tagEndExp","piClosingChar","fxp","XMLParser","validationOption","orderedObjParser","orderedResult","addEntity","XMLValidator","XMLBuilder","_view","isValidView","params","columns","emptyView","sticky","expanded","defaultSortKey","loadChildViews","jsonObject","parser","some","x","toLowerCase","isSvg","debug_1","process","env","NODE_DEBUG","args","console","constants","MAX_LENGTH","MAX_SAFE_COMPONENT_LENGTH","MAX_SAFE_BUILD_LENGTH","MAX_LENGTH$1","MAX_SAFE_INTEGER","RELEASE_TYPES","SEMVER_SPEC_VERSION","FLAG_INCLUDE_PRERELEASE","FLAG_LOOSE","re$1","MAX_SAFE_COMPONENT_LENGTH2","MAX_SAFE_BUILD_LENGTH2","MAX_LENGTH2","debug2","re","safeRe","src","R","LETTERDASHNUMBER","safeRegexReplacements","createToken","isGlobal","safe","max","makeSafeRegex","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","COERCEPLAIN","COERCE","COERCEFULL","LONETILDE","tildeTrimReplace","LONECARET","caretTrimReplace","comparatorTrimReplace","reExports","freeze","loose","compareIdentifiers$1","anum","bnum","identifiers","compareIdentifiers","rcompareIdentifiers","UPPERCASE","LOWERCASE","LEADING_CAPITAL","IDENTIFIER","SEPARATORS","LEADING_SEPARATORS","SEPARATORS_AND_IDENTIFIER","NUMBERS_AND_IDENTIFIER","preserveCamelCase","toUpperCase","preserveConsecutiveUppercase","isLastCharLower","isLastCharUpper","isLastLastCharUpper","isLastLastCharPreserved","character","input","replaceAll","postProcess","pattern","offset","pascalCase","locale","toLocaleLowerCase","toLocaleUpperCase","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","m","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","every","r","n","getter","__esModule","definition","o","defineProperty","enumerable","f","chunkId","all","reduce","promises","u","g","globalThis","Function","l","done","script","needAttach","scripts","getElementsByTagName","s","getAttribute","charset","timeout","onScriptComplete","prev","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","setTimeout","bind","head","appendChild","Symbol","toStringTag","nmd","paths","children","scriptUrl","importScripts","location","currentScript","p","baseURI","self","href","installedChunks","installedChunkData","promise","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file