From 477a66ef7de76bfd4282d0d94624d790880f3dc6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Sep 2026 02:55:42 +0000 Subject: [PATCH 1/2] chore(deps): bump webdav from 5.10.0 to 5.11.0 Bumps [webdav](https://github.com/perry-mitchell/webdav-client) from 5.10.0 to 5.11.0. - [Changelog](https://github.com/perry-mitchell/webdav-client/blob/master/CHANGELOG.md) - [Commits](https://github.com/perry-mitchell/webdav-client/compare/v5.10.0...v5.11.0) --- updated-dependencies: - dependency-name: webdav dependency-version: 5.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 89 +++++++++++++++++++++++++++++++++++------------ package.json | 2 +- 2 files changed, 68 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7ca815189c793..eb14357f8f04d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,7 +35,7 @@ "sortablejs": "^1.15.7", "vue": "^3.5.42", "vuex": "^4.1.0", - "webdav": "^5.10.0" + "webdav": "^5.11.0" }, "devDependencies": { "@nextcloud/browserslist-config": "^3.1.2", @@ -2211,9 +2211,9 @@ } }, "node_modules/@nodable/entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-nyT7T3nbMyBI/lvr6L5TyWbFJAI9FTgVRakNoBqCD+PmID8DzFrrNdLLtHMwMszOtqZa8PAOV24ZqDnQrhQINA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-3.0.0.tgz", + "integrity": "sha512-8L9xFeTYKhm49xfIypoe2W5wV1m/3Z58kT+7kR9A8OyFxcPduI4VmxaUMQyKYrRjUoLLSXv6EKKID5Tvj9cUVw==", "funding": [ { "type": "github", @@ -4634,6 +4634,18 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/anynum": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/anynum/-/anynum-1.0.1.tgz", + "integrity": "sha512-N6//FLET/tXYNM/F6ABca1oH6fWB+KlTt909Le28WMDBk8oaT4vY17DCrwg2MvmuqUKt3Ni4N5dGJ/EoBgcO6A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, "node_modules/are-docs-informative": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", @@ -7398,9 +7410,9 @@ } }, "node_modules/fast-xml-parser": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.7.3.tgz", - "integrity": "sha512-C0AaNuC+mscy6vrAQKAc/rMq+zAPHodfHGZu4sGVehvAQt/JLG1O5zEcYcXSY5zSqr4YVgxsB+pHXTq0i7eDlg==", + "version": "5.11.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.11.1.tgz", + "integrity": "sha512-TBw6K/fxoQGGjCmZDw9w/ZwP3uDcnTM4YH/g+PFRWr8sbe5idXtxNN6vITh4+1ruCZaho6uBFurElsA7F0zzgw==", "funding": [ { "type": "github", @@ -7409,15 +7421,32 @@ ], "license": "MIT", "dependencies": { - "@nodable/entities": "^2.1.0", - "fast-xml-builder": "^1.1.7", - "path-expression-matcher": "^1.5.0", - "strnum": "^2.2.3" + "@nodable/entities": "^3.0.0", + "fast-xml-builder": "^1.2.0", + "is-unsafe": "^2.0.0", + "path-expression-matcher": "^1.6.2", + "strnum": "^2.4.2", + "xml-naming": "^0.3.0" }, "bin": { "fxparser": "src/cli/cli.js" } }, + "node_modules/fast-xml-parser/node_modules/xml-naming": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/xml-naming/-/xml-naming-0.3.0.tgz", + "integrity": "sha512-ghig2TBE/H11aOVgmahA3MhimvkBr6JIYknH/Dhdk10nXwdbIqBJsbfMxpvFPG8bAw77gN29aQWvKpmVoPlvPQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -8829,6 +8858,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-unsafe": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-unsafe/-/is-unsafe-2.0.2.tgz", + "integrity": "sha512-HgbIHPBH0KHHCcjLfGsCvhtPTVxjaAZlXjwdz7/GQC40SjSe4sfQsar8J5VFo8JOSbarkpV0OLG95bbaNd9aAQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, "node_modules/is-weakmap": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", @@ -10948,9 +10989,9 @@ } }, "node_modules/path-expression-matcher": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.5.0.tgz", - "integrity": "sha512-cbrerZV+6rvdQrrD+iGMcZFEiiSrbv9Tfdkvnusy6y0x0GKBXREFg/Y65GhIfm0tnLntThhzCnfKwp1WRjeCyQ==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.6.2.tgz", + "integrity": "sha512-enSlaiat05iasnzmgNxRj8reFdj3puY2QpNgP1aPIaVfT6nn9ICuPoFlKHk8EN22HcwewshO+mN2DGbkCEOtqQ==", "funding": [ { "type": "github", @@ -12734,16 +12775,19 @@ "license": "MIT" }, "node_modules/strnum": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.3.tgz", - "integrity": "sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.4.2.tgz", + "integrity": "sha512-rDG3Ah4TV0k1hWvLSzkZtMmLN9+eS+h3knq4MP6A42Y3Yh5qGNnOUs1jJkoSr8FG5dsL28c7KgkIBzSEykqtuw==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/NaturalIntelligence" } ], - "license": "MIT" + "license": "MIT", + "dependencies": { + "anynum": "^1.0.1" + } }, "node_modules/strtok3": { "version": "10.3.4", @@ -14962,16 +15006,17 @@ } }, "node_modules/webdav": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/webdav/-/webdav-5.10.0.tgz", - "integrity": "sha512-fVPuRLtcduVGvSO7Tn/6TQCzIvI/g6BO/+xPRctCvi/GytYpjn4czxWbh4HsArsdom9qz9BI63k9/v2HBUui1A==", + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/webdav/-/webdav-5.11.0.tgz", + "integrity": "sha512-DbUS8rHvWse55EiHM0q5q1z3eVRCLWW7Va7mUqA2/JJdQHIew4Op2HTglHkBJDOAVrQeQf0I+REUJkIrYqtL+w==", "license": "MIT", "dependencies": { "@buttercup/fetch": "^0.2.1", + "@nodable/entities": "^3.0.0", "base-64": "^1.0.0", "byte-length": "^1.0.2", "entities": "^6.0.1", - "fast-xml-parser": "^5.7.2", + "fast-xml-parser": "^5.11.1", "hot-patcher": "^2.0.1", "layerr": "^3.0.0", "md5": "^2.3.0", diff --git a/package.json b/package.json index 410e9cc9e3a6f..ce693e217bd4c 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "sortablejs": "^1.15.7", "vue": "^3.5.42", "vuex": "^4.1.0", - "webdav": "^5.10.0" + "webdav": "^5.11.0" }, "devDependencies": { "@nextcloud/browserslist-config": "^3.1.2", From c778e07736cd86746b1ace736378357d58649854 Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Sat, 26 Sep 2026 13:38:34 +0000 Subject: [PATCH 2/2] chore(assets): Recompile assets Signed-off-by: nextcloud-command --- ...unk.mjs => AuthMechanismRsa-DiZqNNSC.chunk.mjs} | 4 ++-- ...=> AuthMechanismRsa-DiZqNNSC.chunk.mjs.license} | 0 ...map => AuthMechanismRsa-DiZqNNSC.chunk.mjs.map} | 2 +- ...uthMechanismRsa-DiZqNNSC.chunk.mjs.map.license} | 0 ...lwO.chunk.mjs => FilePicker-Cghq-bGr.chunk.mjs} | 4 ++-- ...cense => FilePicker-Cghq-bGr.chunk.mjs.license} | 0 ...k.mjs.map => FilePicker-Cghq-bGr.chunk.mjs.map} | 2 +- ...e => FilePicker-Cghq-bGr.chunk.mjs.map.license} | 0 ... => FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs} | 4 ++-- ...sVersionsSidebarTab-C6E0TwdT.chunk.mjs.license} | 0 ...FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs.map} | 2 +- ...sionsSidebarTab-C6E0TwdT.chunk.mjs.map.license} | 0 ...chunk.mjs => SetStatusModal-BCek_Hdw.chunk.mjs} | 4 ++-- ...e => SetStatusModal-BCek_Hdw.chunk.mjs.license} | 0 ...s.map => SetStatusModal-BCek_Hdw.chunk.mjs.map} | 2 +- ... SetStatusModal-BCek_Hdw.chunk.mjs.map.license} | 0 ...hunk.mjs => SystemTagPicker-ZPzUvrd5.chunk.mjs} | 4 ++-- ... => SystemTagPicker-ZPzUvrd5.chunk.mjs.license} | 0 ....map => SystemTagPicker-ZPzUvrd5.chunk.mjs.map} | 2 +- ...SystemTagPicker-ZPzUvrd5.chunk.mjs.map.license} | 0 ...i-DS5xEpYc.chunk.mjs => api-j5ll7UqT.chunk.mjs} | 4 ++-- ....mjs.license => api-j5ll7UqT.chunk.mjs.license} | 0 ...Yc.chunk.mjs.map => api-j5ll7UqT.chunk.mjs.map} | 2 +- ....license => api-j5ll7UqT.chunk.mjs.map.license} | 0 ...v-q7lxn7Ev.chunk.mjs => dav-CSaJxXR-.chunk.mjs} | 8 ++++---- ....mjs.license => dav-CSaJxXR-.chunk.mjs.license} | 0 ...Ev.chunk.mjs.map => dav-CSaJxXR-.chunk.mjs.map} | 2 +- ....license => dav-CSaJxXR-.chunk.mjs.map.license} | 0 dist/dav-settings-admin-example-content.mjs | 2 +- dist/dav-settings-personal-availability.mjs | 14 +++++++------- dist/encryption-encryption.mjs | 2 +- dist/encryption-settings_admin.mjs | 2 +- dist/encryption-settings_personal.mjs | 2 +- dist/federatedfilesharing-init-files.mjs | 2 +- dist/federatedfilesharing-settings-admin.mjs | 2 +- dist/federatedfilesharing-settings-personal.mjs | 2 +- dist/federation-settings-admin.mjs | 2 +- dist/files_external-auth_rsa.mjs | 4 ++-- dist/files_external-init.mjs | 2 +- dist/files_external-settings.mjs | 2 +- dist/files_reminders-init.mjs | 2 +- dist/files_trashbin-init.mjs | 2 +- dist/files_versions-sidebar-tab.mjs | 4 ++-- dist/index-C5O29_27.chunk.mjs | 9 +++++++++ ...js.license => index-C5O29_27.chunk.mjs.license} | 2 +- dist/index-C5O29_27.chunk.mjs.map | 1 + ...icense => index-C5O29_27.chunk.mjs.map.license} | 2 +- dist/index-Ds0AsAbv.chunk.mjs | 9 --------- dist/index-Ds0AsAbv.chunk.mjs.map | 1 - ...DCJOwzzz.chunk.mjs => index-WQvok30H.chunk.mjs} | 6 +++--- ...js.license => index-WQvok30H.chunk.mjs.license} | 0 ....chunk.mjs.map => index-WQvok30H.chunk.mjs.map} | 2 +- ...icense => index-WQvok30H.chunk.mjs.map.license} | 0 dist/profile-main.mjs | 2 +- dist/sharebymail-admin-settings.mjs | 2 +- dist/systemtags-admin.mjs | 2 +- dist/systemtags-init.mjs | 4 ++-- dist/theming-settings-admin.mjs | 2 +- dist/theming-settings-personal.mjs | 2 +- dist/twofactor_backupcodes-settings-personal.mjs | 2 +- dist/user_ldap-settings-admin.mjs | 2 +- dist/user_status-menu.mjs | 4 ++-- 62 files changed, 73 insertions(+), 73 deletions(-) rename dist/{AuthMechanismRsa-DqH1rMWg.chunk.mjs => AuthMechanismRsa-DiZqNNSC.chunk.mjs} (96%) rename dist/{AuthMechanismRsa-DqH1rMWg.chunk.mjs.license => AuthMechanismRsa-DiZqNNSC.chunk.mjs.license} (100%) rename dist/{AuthMechanismRsa-DqH1rMWg.chunk.mjs.map => AuthMechanismRsa-DiZqNNSC.chunk.mjs.map} (98%) rename dist/{AuthMechanismRsa-DqH1rMWg.chunk.mjs.map.license => AuthMechanismRsa-DiZqNNSC.chunk.mjs.map.license} (100%) rename dist/{FilePicker-BRLNOlwO.chunk.mjs => FilePicker-Cghq-bGr.chunk.mjs} (99%) rename dist/{FilePicker-BRLNOlwO.chunk.mjs.license => FilePicker-Cghq-bGr.chunk.mjs.license} (100%) rename dist/{FilePicker-BRLNOlwO.chunk.mjs.map => FilePicker-Cghq-bGr.chunk.mjs.map} (99%) rename dist/{FilePicker-BRLNOlwO.chunk.mjs.map.license => FilePicker-Cghq-bGr.chunk.mjs.map.license} (100%) rename dist/{FilesVersionsSidebarTab-Bdeocctt.chunk.mjs => FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs} (98%) rename dist/{FilesVersionsSidebarTab-Bdeocctt.chunk.mjs.license => FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs.license} (100%) rename dist/{FilesVersionsSidebarTab-Bdeocctt.chunk.mjs.map => FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs.map} (99%) rename dist/{FilesVersionsSidebarTab-Bdeocctt.chunk.mjs.map.license => FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs.map.license} (100%) rename dist/{SetStatusModal-63728HX3.chunk.mjs => SetStatusModal-BCek_Hdw.chunk.mjs} (99%) rename dist/{SetStatusModal-63728HX3.chunk.mjs.license => SetStatusModal-BCek_Hdw.chunk.mjs.license} (100%) rename dist/{SetStatusModal-63728HX3.chunk.mjs.map => SetStatusModal-BCek_Hdw.chunk.mjs.map} (99%) rename dist/{SetStatusModal-63728HX3.chunk.mjs.map.license => SetStatusModal-BCek_Hdw.chunk.mjs.map.license} (100%) rename dist/{SystemTagPicker-te7EmT5I.chunk.mjs => SystemTagPicker-ZPzUvrd5.chunk.mjs} (98%) rename dist/{SystemTagPicker-te7EmT5I.chunk.mjs.license => SystemTagPicker-ZPzUvrd5.chunk.mjs.license} (100%) rename dist/{SystemTagPicker-te7EmT5I.chunk.mjs.map => SystemTagPicker-ZPzUvrd5.chunk.mjs.map} (99%) rename dist/{SystemTagPicker-te7EmT5I.chunk.mjs.map.license => SystemTagPicker-ZPzUvrd5.chunk.mjs.map.license} (100%) rename dist/{api-DS5xEpYc.chunk.mjs => api-j5ll7UqT.chunk.mjs} (97%) rename dist/{api-DS5xEpYc.chunk.mjs.license => api-j5ll7UqT.chunk.mjs.license} (100%) rename dist/{api-DS5xEpYc.chunk.mjs.map => api-j5ll7UqT.chunk.mjs.map} (99%) rename dist/{api-DS5xEpYc.chunk.mjs.map.license => api-j5ll7UqT.chunk.mjs.map.license} (100%) rename dist/{dav-q7lxn7Ev.chunk.mjs => dav-CSaJxXR-.chunk.mjs} (76%) rename dist/{dav-q7lxn7Ev.chunk.mjs.license => dav-CSaJxXR-.chunk.mjs.license} (100%) rename dist/{dav-q7lxn7Ev.chunk.mjs.map => dav-CSaJxXR-.chunk.mjs.map} (99%) rename dist/{dav-q7lxn7Ev.chunk.mjs.map.license => dav-CSaJxXR-.chunk.mjs.map.license} (100%) create mode 100644 dist/index-C5O29_27.chunk.mjs rename dist/{index-Ds0AsAbv.chunk.mjs.license => index-C5O29_27.chunk.mjs.license} (90%) create mode 100644 dist/index-C5O29_27.chunk.mjs.map rename dist/{index-Ds0AsAbv.chunk.mjs.map.license => index-C5O29_27.chunk.mjs.map.license} (90%) delete mode 100644 dist/index-Ds0AsAbv.chunk.mjs delete mode 100644 dist/index-Ds0AsAbv.chunk.mjs.map rename dist/{index-DCJOwzzz.chunk.mjs => index-WQvok30H.chunk.mjs} (99%) rename dist/{index-DCJOwzzz.chunk.mjs.license => index-WQvok30H.chunk.mjs.license} (100%) rename dist/{index-DCJOwzzz.chunk.mjs.map => index-WQvok30H.chunk.mjs.map} (99%) rename dist/{index-DCJOwzzz.chunk.mjs.map.license => index-WQvok30H.chunk.mjs.map.license} (100%) diff --git a/dist/AuthMechanismRsa-DqH1rMWg.chunk.mjs b/dist/AuthMechanismRsa-DiZqNNSC.chunk.mjs similarity index 96% rename from dist/AuthMechanismRsa-DqH1rMWg.chunk.mjs rename to dist/AuthMechanismRsa-DiZqNNSC.chunk.mjs index 42592e7f6f758..347bac13f0a99 100644 --- a/dist/AuthMechanismRsa-DqH1rMWg.chunk.mjs +++ b/dist/AuthMechanismRsa-DiZqNNSC.chunk.mjs @@ -1,2 +1,2 @@ -import{b as g,q as _,u as o,o as r,c as p,E as x,n as d,w as v,g as V,t as b,z as k,v as E,j as c,F as M,A as q,Z as K,_ as U,e as f,r as j}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{c as w}from"./index-9ZBo3L67.chunk.mjs";import{a as A}from"./index-DCJOwzzz.chunk.mjs";import{t as s}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{b as N}from"./index-DgEyzq8A.chunk.mjs";import{N as S}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{N as z}from"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import{N as C}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import{N as L}from"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import{_ as $}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{a as y,C as O}from"./types-CnbnigDb.chunk.mjs";import{a as B}from"./index-C3KLQ_oe.chunk.mjs";import{l as P}from"./logger-DTrLKxyb.chunk.mjs";const R=g({__name:"ConfigurationEntry",props:k({configKey:{},configOption:{}},{modelValue:{type:[String,Boolean],default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=_(e,"modelValue");return(l,i)=>e.configOption.type!==o(y).Boolean?(r(),p(x(e.configOption.type===o(y).Password?o(L):o($)),{key:0,modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=t=>a.value=t),name:e.configKey,required:!(e.configOption.flags&o(O).Optional),label:e.configOption.value,title:e.configOption.tooltip,class:d(l.$style.configurationEntry)},null,8,["modelValue","name","required","label","title","class"])):(r(),p(o(C),{key:1,modelValue:a.value,"onUpdate:modelValue":i[1]||(i[1]=t=>a.value=t),type:"switch",title:e.configOption.tooltip,class:d(l.$style.configurationEntry)},{default:v(()=>[V(b(e.configOption.value),1)]),_:1},8,["modelValue","title","class"]))}}),F="_configurationEntry_1cmcq_2",G={configurationEntry:F},H={$style:G},T=B(R,[["__cssModules",H]]),Z=g({__name:"AuthMechanismRsa",props:k({authMechanism:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=_(e,"modelValue"),l=j();E(l,()=>{l.value&&(a.value.private_key="",a.value.public_key="")});async function i(){try{const{data:t}=await w.post(N("/apps/files_external/ajax/public_key.php"),{keyLength:l.value});a.value.private_key=t.data.private_key,a.value.public_key=t.data.public_key}catch(t){P.error("Error generating RSA key pair",{error:t}),A(s("files_external","Error generating key pair"))}}return(t,m)=>(r(),c("div",null,[(r(!0),c(M,null,q(e.authMechanism.configuration,(n,u)=>K((r(),p(T,{key:n.value,modelValue:a.value[u],"onUpdate:modelValue":h=>a.value[u]=h,configKey:u,configOption:n},null,8,["modelValue","onUpdate:modelValue","configKey","configOption"])),[[U,!(n.flags&o(O).Hidden)]])),128)),f(o(z),{modelValue:l.value,"onUpdate:modelValue":m[0]||(m[0]=n=>l.value=n),clearable:!1,inputLabel:o(s)("files_external","Key size"),options:[1024,2048,4096],required:""},null,8,["modelValue","inputLabel"]),f(o(S),{disabled:!l.value,wide:"",onClick:i},{default:v(()=>[V(b(o(s)("files_external","Generate keys")),1)]),_:1},8,["disabled"])]))}}),ne=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"}));export{ne as A,T as C}; -//# sourceMappingURL=AuthMechanismRsa-DqH1rMWg.chunk.mjs.map +import{b as g,q as _,u as o,o as r,c as p,E as x,n as d,w as v,g as V,t as b,z as k,v as E,j as c,F as M,A as q,Z as K,_ as U,e as f,r as j}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{c as w}from"./index-9ZBo3L67.chunk.mjs";import{a as A}from"./index-WQvok30H.chunk.mjs";import{t as s}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{b as N}from"./index-DgEyzq8A.chunk.mjs";import{N as S}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{N as z}from"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import{N as C}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import{N as L}from"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import{_ as $}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{a as y,C as O}from"./types-CnbnigDb.chunk.mjs";import{a as B}from"./index-C3KLQ_oe.chunk.mjs";import{l as P}from"./logger-DTrLKxyb.chunk.mjs";const R=g({__name:"ConfigurationEntry",props:k({configKey:{},configOption:{}},{modelValue:{type:[String,Boolean],default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=_(e,"modelValue");return(l,i)=>e.configOption.type!==o(y).Boolean?(r(),p(x(e.configOption.type===o(y).Password?o(L):o($)),{key:0,modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=t=>a.value=t),name:e.configKey,required:!(e.configOption.flags&o(O).Optional),label:e.configOption.value,title:e.configOption.tooltip,class:d(l.$style.configurationEntry)},null,8,["modelValue","name","required","label","title","class"])):(r(),p(o(C),{key:1,modelValue:a.value,"onUpdate:modelValue":i[1]||(i[1]=t=>a.value=t),type:"switch",title:e.configOption.tooltip,class:d(l.$style.configurationEntry)},{default:v(()=>[V(b(e.configOption.value),1)]),_:1},8,["modelValue","title","class"]))}}),F="_configurationEntry_1cmcq_2",G={configurationEntry:F},H={$style:G},T=B(R,[["__cssModules",H]]),Z=g({__name:"AuthMechanismRsa",props:k({authMechanism:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=_(e,"modelValue"),l=j();E(l,()=>{l.value&&(a.value.private_key="",a.value.public_key="")});async function i(){try{const{data:t}=await w.post(N("/apps/files_external/ajax/public_key.php"),{keyLength:l.value});a.value.private_key=t.data.private_key,a.value.public_key=t.data.public_key}catch(t){P.error("Error generating RSA key pair",{error:t}),A(s("files_external","Error generating key pair"))}}return(t,m)=>(r(),c("div",null,[(r(!0),c(M,null,q(e.authMechanism.configuration,(n,u)=>K((r(),p(T,{key:n.value,modelValue:a.value[u],"onUpdate:modelValue":h=>a.value[u]=h,configKey:u,configOption:n},null,8,["modelValue","onUpdate:modelValue","configKey","configOption"])),[[U,!(n.flags&o(O).Hidden)]])),128)),f(o(z),{modelValue:l.value,"onUpdate:modelValue":m[0]||(m[0]=n=>l.value=n),clearable:!1,inputLabel:o(s)("files_external","Key size"),options:[1024,2048,4096],required:""},null,8,["modelValue","inputLabel"]),f(o(S),{disabled:!l.value,wide:"",onClick:i},{default:v(()=>[V(b(o(s)("files_external","Generate keys")),1)]),_:1},8,["disabled"])]))}}),ne=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"}));export{ne as A,T as C}; +//# sourceMappingURL=AuthMechanismRsa-DiZqNNSC.chunk.mjs.map diff --git a/dist/AuthMechanismRsa-DqH1rMWg.chunk.mjs.license b/dist/AuthMechanismRsa-DiZqNNSC.chunk.mjs.license similarity index 100% rename from dist/AuthMechanismRsa-DqH1rMWg.chunk.mjs.license rename to dist/AuthMechanismRsa-DiZqNNSC.chunk.mjs.license diff --git a/dist/AuthMechanismRsa-DqH1rMWg.chunk.mjs.map b/dist/AuthMechanismRsa-DiZqNNSC.chunk.mjs.map similarity index 98% rename from dist/AuthMechanismRsa-DqH1rMWg.chunk.mjs.map rename to dist/AuthMechanismRsa-DiZqNNSC.chunk.mjs.map index 3cf30512808f1..363078e54e173 100644 --- a/dist/AuthMechanismRsa-DqH1rMWg.chunk.mjs.map +++ b/dist/AuthMechanismRsa-DiZqNNSC.chunk.mjs.map @@ -1 +1 @@ -{"version":3,"file":"AuthMechanismRsa-DqH1rMWg.chunk.mjs","sources":["../build/frontend/apps/files_external/src/components/AddExternalStorageDialog/ConfigurationEntry.vue","../build/frontend/apps/files_external/src/views/AuthMechanismRsa.vue"],"sourcesContent":["\n\n\n\n\n\n\n","\n\n\n\n\n"],"names":["value","_useModel","__props","_unref","ConfigurationType","_createBlock","_resolveDynamicComponent","NcPasswordField","NcTextField","$event","ConfigurationFlag","_normalizeClass","$style","NcCheckboxRadioSwitch","_createTextVNode","_toDisplayString","modelValue","keySize","ref","watch","generateKeys","data","axios","generateUrl","error","logger","showError","t","_createElementBlock","_openBlock","_Fragment","configOption","configKey","ConfigurationEntry","_vShow","_createVNode","NcSelect","NcButton"],"mappings":"ojCAaA,MAAMA,EAAQC,EAA6BC,EAAC,YAA6B,eAWjEA,EAAA,aAAa,OAASC,EAAAC,CAAA,EAAkB,aAF/CC,EAQsCC,EAPhCJ,EAAA,aAAa,OAASC,EAAAC,CAAA,EAAkB,SAAWD,EAAAI,CAAA,EAAkBJ,EAAAK,CAAA,CAAW,EAAA,kBAE5ER,EAAA,2CAAAA,EAAK,MAAAS,GACb,KAAMP,EAAA,UACN,WAAYA,EAAA,aAAa,MAAQC,EAAAO,CAAA,EAAkB,UACnD,MAAOR,EAAA,aAAa,MACpB,MAAOA,EAAA,aAAa,QACpB,MAAKS,EAAEC,EAAAA,OAAO,kBAAkB,CAAA,yEAClCP,EAOwBF,EAAAU,CAAA,EAAA,kBALdb,EAAA,2CAAAA,EAAK,MAAAS,GACd,KAAK,SACJ,MAAOP,EAAA,aAAa,QACpB,MAAKS,EAAEC,EAAAA,OAAO,kBAAkB,CAAA,aACjC,IAAwB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A,eAAA,CAAA,EAAA,CAAA,CAAA"} \ No newline at end of file +{"version":3,"file":"AuthMechanismRsa-DiZqNNSC.chunk.mjs","sources":["../build/frontend/apps/files_external/src/components/AddExternalStorageDialog/ConfigurationEntry.vue","../build/frontend/apps/files_external/src/views/AuthMechanismRsa.vue"],"sourcesContent":["\n\n\n\n\n\n\n","\n\n\n\n\n"],"names":["value","_useModel","__props","_unref","ConfigurationType","_createBlock","_resolveDynamicComponent","NcPasswordField","NcTextField","$event","ConfigurationFlag","_normalizeClass","$style","NcCheckboxRadioSwitch","_createTextVNode","_toDisplayString","modelValue","keySize","ref","watch","generateKeys","data","axios","generateUrl","error","logger","showError","t","_createElementBlock","_openBlock","_Fragment","configOption","configKey","ConfigurationEntry","_vShow","_createVNode","NcSelect","NcButton"],"mappings":"ojCAaA,MAAMA,EAAQC,EAA6BC,EAAC,YAA6B,eAWjEA,EAAA,aAAa,OAASC,EAAAC,CAAA,EAAkB,aAF/CC,EAQsCC,EAPhCJ,EAAA,aAAa,OAASC,EAAAC,CAAA,EAAkB,SAAWD,EAAAI,CAAA,EAAkBJ,EAAAK,CAAA,CAAW,EAAA,kBAE5ER,EAAA,2CAAAA,EAAK,MAAAS,GACb,KAAMP,EAAA,UACN,WAAYA,EAAA,aAAa,MAAQC,EAAAO,CAAA,EAAkB,UACnD,MAAOR,EAAA,aAAa,MACpB,MAAOA,EAAA,aAAa,QACpB,MAAKS,EAAEC,EAAAA,OAAO,kBAAkB,CAAA,yEAClCP,EAOwBF,EAAAU,CAAA,EAAA,kBALdb,EAAA,2CAAAA,EAAK,MAAAS,GACd,KAAK,SACJ,MAAOP,EAAA,aAAa,QACpB,MAAKS,EAAEC,EAAAA,OAAO,kBAAkB,CAAA,aACjC,IAAwB,CAArBE,EAAAC,EAAAb,EAAA,aAAa,KAAK,EAAA,CAAA,CAAA,6RClBvB,MAAMc,EAAaf,EAA6CC,EAAA,YAAmB,EAM7Ee,EAAUC,EAAA,EAChBC,EAAMF,EAAS,IAAM,CAChBA,EAAQ,QACXD,EAAW,MAAM,YAAc,GAC/BA,EAAW,MAAM,WAAa,GAEhC,CAAC,EAKD,eAAeI,GAAe,CAC7B,GAAI,CAEH,KAAM,CAAE,KAAAC,GAAS,MAAMC,EAAM,KAAKC,EAAY,0CAA0C,EAAG,CAC1F,UAAWN,EAAQ,KAAA,CACnB,EAEDD,EAAW,MAAM,YAAcK,EAAK,KAAK,YACzCL,EAAW,MAAM,WAAaK,EAAK,KAAK,UACzC,OAASG,EAAO,CACfC,EAAO,MAAM,gCAAiC,CAAE,MAAAD,CAAA,CAAO,EACvDE,EAAUC,EAAE,iBAAkB,2BAA2B,CAAC,CAC3D,CACD,mBAICC,EAsBM,MAAA,KAAA,EArBLC,EAAA,EAAA,EAAAD,EAMgCE,SALG5B,EAAA,cAAc,cAAa,CAAtD6B,EAAcC,WADtB3B,EAMgC4B,EAAA,CAH9B,IAAKF,EAAa,MACV,WAAAf,EAAA,MAAWgB,CAAS,EAApB,sBAAAvB,GAAAO,EAAA,MAAWgB,CAAS,EAAAvB,EAC5B,UAAAuB,EACA,aAAAD,CAAA,4EAJS,CAAAG,EAAA,EAAAH,EAAa,MAAQ5B,EAAAO,CAAA,EAAkB,OAAM,CAAA,UAMxDyB,EAKYhC,EAAAiC,CAAA,EAAA,YAJFnB,EAAA,2CAAAA,EAAO,MAAAR,GACf,UAAW,GACX,WAAYN,EAAAwB,CAAA,EAAC,iBAAA,UAAA,EACb,QAAS,CAAA,KAAA,KAAA,IAAA,EACV,SAAA,EAAA,sCAEDQ,EAKWhC,EAAAkC,CAAA,EAAA,CAJT,UAAWpB,EAAA,MACZ,KAAA,GACC,QAAOG,CAAA,aACR,IAA0C,KAAvCjB,EAAAwB,CAAA,EAAC,iBAAA,eAAA,CAAA,EAAA,CAAA,CAAA"} \ No newline at end of file diff --git a/dist/AuthMechanismRsa-DqH1rMWg.chunk.mjs.map.license b/dist/AuthMechanismRsa-DiZqNNSC.chunk.mjs.map.license similarity index 100% rename from dist/AuthMechanismRsa-DqH1rMWg.chunk.mjs.map.license rename to dist/AuthMechanismRsa-DiZqNNSC.chunk.mjs.map.license diff --git a/dist/FilePicker-BRLNOlwO.chunk.mjs b/dist/FilePicker-Cghq-bGr.chunk.mjs similarity index 99% rename from dist/FilePicker-BRLNOlwO.chunk.mjs rename to dist/FilePicker-Cghq-bGr.chunk.mjs index 1d7ad489f4648..fd5dbe338de18 100644 --- a/dist/FilePicker-BRLNOlwO.chunk.mjs +++ b/dist/FilePicker-Cghq-bGr.chunk.mjs @@ -1,2 +1,2 @@ -import{f as re,o as s,j as c,c as C,x as Fe,w,l as ne,k as f,n as E,g as q,t as $,y as D,m as z,e as _,C as J,F as M,a5 as be,a6 as A,a3 as Ee,a0 as Z,r as L,b as H,v as Pe,U as G,u as d,p as b,a7 as de,q as ue,s as We,A as K,z as pe,a8 as Te,H as qe,Y as Ze,B as Oe,S as Se}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{u as je,d as Ye,s as Ge,b as me,f as Je,a as Ke}from"./index-DgEyzq8A.chunk.mjs";import{a as he,k as Qe,N as Xe}from"./index-CO7ZwNPX.chunk.mjs";import{N as we}from"./Plus-gXjhFOHV.chunk.mjs";import{v as et,I as tt,d as se,f as it,s as at}from"./index-CPriPmaq.chunk.mjs";import{N as O}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{N as Ne}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import{l as xe,i as Ve,j as Q,b as lt}from"./index-C3KLQ_oe.chunk.mjs";import{_ as rt,a as nt}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{s as st,t as ot,u as ct,v as dt,w as ut,x as pt,y as ke,p as ft,c as mt}from"./mdi-CYMOyMtM.chunk.mjs";import{S as _e}from"./ShareType-suoNfd7y.chunk.mjs";import{_ as ee,c as ht,N as Ie}from"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import{F as j,P as Ce}from"./externalStorageUtils-BzJyVKar.chunk.mjs";import"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{P as vt,a as gt}from"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import{t as h,l as Y,a as ve}from"./index-DCJOwzzz.chunk.mjs";import{c as De}from"./index-9ZBo3L67.chunk.mjs";import{N as Le}from"./PencilOutline-Byyi13ia.chunk.mjs";import{N as $e,a as ze}from"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{N as yt}from"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import{g as bt,h as wt,i as ge,j as kt,r as ye,k as Me}from"./dav-q7lxn7Ev.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./index-Ds0AsAbv.chunk.mjs";const _t={name:"ChevronRightIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ct=["aria-hidden","aria-label"],Lt=["fill","width","height"],$t={d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"},zt={key:0};function Bt(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon chevron-right-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",$t,[e.title?(s(),c("title",zt,$(e.title),1)):z("",!0)])],8,Lt))],16,Ct)}const Ft=ee(_t,[["render",Bt]]),Pt={name:"NcBreadcrumb",components:{NcActions:he,ChevronRight:Ft,NcButton:O},inheritAttrs:!1,props:{name:{type:String,required:!0},title:{type:String,default:null},to:{type:[String,Object],default:void 0},href:{type:String,default:void 0},icon:{type:String,default:""},forceIconText:{type:Boolean,default:!1},disableDrop:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},open:{type:Boolean,default:!1},class:{type:[String,Array,Object],default:""}},emits:["dragenter","dragleave","dropped","update:open"],setup(){const t=ht();return{actionsContainer:`.vue-crumb[data-crumb-id="${t}"]`,crumbId:t}},data(){return{hovering:!1}},computed:{linkAttributes(){return this.to?{to:this.to,...this.$attrs}:this.href?{href:this.href,...this.$attrs}:this.$attrs}},methods:{onOpenChange(t){this.$emit("update:open",t)},dropped(t){return this.disableDrop||(this.$emit("dropped",t,this.to||this.href),this.$parent.$emit("dropped",t,this.to||this.href),this.hovering=!1),!1},dragEnter(t){this.$emit("dragenter",t),!this.disableDrop&&(this.hovering=!0)},dragLeave(t){this.$emit("dragleave",t),!this.disableDrop&&(t.target.contains(t.relatedTarget)||this.$refs.crumb.contains(t.relatedTarget)||(this.hovering=!1))}}},St=["data-crumb-id"];function Nt(t,i,e,a,l,r){const n=re("NcButton"),u=re("NcActions"),p=re("ChevronRight");return s(),c("li",{ref:"crumb",class:E(["vue-crumb",[{"vue-crumb--hovered":l.hovering},t.$props.class]]),"data-crumb-id":a.crumbId,draggable:"false",onDragstart:J(()=>{},["prevent"]),onDrop:i[0]||(i[0]=J((...o)=>r.dropped&&r.dropped(...o),["prevent"])),onDragover:J(()=>{},["prevent"]),onDragenter:i[1]||(i[1]=(...o)=>r.dragEnter&&r.dragEnter(...o)),onDragleave:i[2]||(i[2]=(...o)=>r.dragLeave&&r.dragLeave(...o))},[(e.name||e.icon||t.$slots.icon)&&!t.$slots.default?(s(),C(n,D({key:0,"aria-label":e.icon?e.name:void 0,variant:"tertiary"},r.linkAttributes),Fe({_:2},[t.$slots.icon||e.icon?{name:"icon",fn:w(()=>[ne(t.$slots,"icon",{},()=>[f("span",{class:E([e.icon,"icon"])},null,2)],!0)]),key:"0"}:void 0,!(t.$slots.icon||e.icon)||e.forceIconText?{name:"default",fn:w(()=>[q($(e.name),1)]),key:"1"}:void 0]),1040,["aria-label"])):z("",!0),t.$slots.default?(s(),C(u,{key:1,ref:"actions",container:a.actionsContainer,forceMenu:e.forceMenu,forceName:"",menuName:e.name,open:e.open,title:e.title,variant:"tertiary","onUpdate:open":r.onOpenChange},{icon:w(()=>[ne(t.$slots,"menu-icon",{},void 0,!0)]),default:w(()=>[ne(t.$slots,"default",{},void 0,!0)]),_:3},8,["container","forceMenu","menuName","open","title","onUpdate:open"])):z("",!0),_(p,{class:"vue-crumb__separator",size:20})],42,St)}const X=ee(Pt,[["render",Nt],["__scopeId","data-v-7cec4a3e"]]),xt={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Vt=["aria-hidden","aria-label"],It=["fill","width","height"],Dt={d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"},Mt={key:0};function Rt(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon folder-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",Dt,[e.title?(s(),c("title",Mt,$(e.title),1)):z("",!0)])],8,It))],16,Vt)}const Be=ee(xt,[["render",Rt]]),N="vue-crumb",At={name:"NcBreadcrumbs",components:{NcActions:he,NcActionButton:Le,NcActionRouter:ze,NcActionLink:$e,NcBreadcrumb:X,IconFolder:Be},props:{rootIcon:{type:String,default:"icon-home"},ariaLabel:{type:String,default:null}},emits:["dropped"],data(){return{hiddenIndices:[],menuBreadcrumbProps:{name:"",forceMenu:!0,disableDrop:!0,open:!1},breadcrumbsRefs:[]}},created(){window.addEventListener("resize",Ye(()=>{this.handleWindowResize()},100)),Ge("navigation-toggled",this.delayedResize)},mounted(){this.handleWindowResize()},updated(){this.delayedResize(),this.$nextTick(()=>{this.hideCrumbs()})},beforeUnmount(){window.removeEventListener("resize",this.handleWindowResize),je("navigation-toggled",this.delayedResize)},methods:{closeActions(t){this.$refs.actionsBreadcrumb.$el.contains(t.relatedTarget)||(this.menuBreadcrumbProps.open=!1)},async delayedResize(){await this.$nextTick(),this.handleWindowResize()},handleWindowResize(){if(!this.$refs.container)return;const t=this.breadcrumbsRefs.length,i=[],e=this.$refs.container.offsetWidth;let a=this.getTotalWidth();this.$refs.breadcrumb__actions&&(a+=this.$refs.breadcrumb__actions.offsetWidth);let l=a-e;l+=l>0?64:0;let r=0;const n=Math.floor(t/2);for(;l>0&&ru-p))||(this.hiddenIndices=i)},arraysEqual(t,i){if(t.length!==i.length)return!1;if(t===i)return!0;if(t===null||i===null)return!1;for(let e=0;et+this.getWidth(i.$el,e===this.breadcrumbsRefs.length-1),0)},getWidth(t,i){if(!t?.classList)return 0;const e=t.classList.contains(`${N}--hidden`);t.style.minWidth="auto",i&&(t.style.maxWidth="210px"),t.classList.remove(`${N}--hidden`);const a=t.offsetWidth;return e&&t.classList.add(`${N}--hidden`),t.style.minWidth="",t.style.maxWidth="",a},preventDefault(t){return t.preventDefault&&t.preventDefault(),!1},dragStart(t){return this.preventDefault(t)},dropped(t,i,e){e||this.$emit("dropped",t,i),this.menuBreadcrumbProps.open=!1;const a=document.querySelectorAll(`.${N}`);for(const l of a)l.classList.remove(`${N}--hovered`);return this.preventDefault(t)},dragOver(t){return this.preventDefault(t)},dragEnter(t,i){if(!i&&t.target.closest){const e=t.target.closest(`.${N}`);if(e.classList&&e.classList.contains(N)){const a=document.querySelectorAll(`.${N}`);for(const l of a)l.classList.remove(`${N}--hovered`);e.classList.add(`${N}--hovered`)}}},dragLeave(t,i){if(!i&&!t.target.contains(t.relatedTarget)&&t.target.closest){const e=t.target.closest(`.${N}`);if(e.contains(t.relatedTarget))return;e.classList&&e.classList.contains(N)&&e.classList.remove(`${N}--hovered`)}},hideCrumbs(){this.breadcrumbsRefs.forEach((t,i)=>{t?.$el?.classList&&(this.hiddenIndices.includes(i)?t.$el.classList.add(`${N}--hidden`):t.$el.classList.remove(`${N}--hidden`))})},isBreadcrumb(t){return t?.type?.name==="NcBreadcrumb"}},render(){let t=[];if(this.$slots.default?.().forEach(l=>{if(this.isBreadcrumb(l)){t.push(l);return}l?.type===M&&l?.children?.forEach?.(r=>{this.isBreadcrumb(r)&&t.push(r)})}),t.length===0)return;t[0]=be(t[0],{icon:this.rootIcon,ref:"breadcrumbs"});const i=[];t=t.map((l,r)=>be(l,{ref:n=>{i[r]=n}}));const e=[...t];this.hiddenIndices.length&&e.splice(Math.round(t.length/2),0,A(X,{class:"dropdown",...this.menuBreadcrumbProps,"aria-hidden":!0,ref:"actionsBreadcrumb",key:"actions-breadcrumb-1",onDragenter:()=>{this.menuBreadcrumbProps.open=!0},onDragleave:this.closeActions,"onUpdate:open":l=>{this.menuBreadcrumbProps.open=l}},{default:()=>this.hiddenIndices.filter(l=>l<=t.length-1).map(l=>{const r=t[l],{to:n,href:u,disableDrop:p,name:o,...g}=r.props;delete g.ref;let y=Le,v="";u&&(y=$e,v=u),n&&(y=ze,v=n);const B=A(Be,{size:20});return A(y,{...g,class:N,href:u||null,to:n||null,draggable:!1,onDragstart:this.dragStart,onDrop:V=>this.dropped(V,v,p),onDragover:this.dragOver,onDragenter:V=>this.dragEnter(V,p),onDragleave:V=>this.dragLeave(V,p)},{default:()=>o,icon:()=>B})})}));const a=[A("nav",{"aria-label":this.ariaLabel},[A("ul",{class:"breadcrumb__crumbs"},[e])])];return Qe(this.$slots.actions?.())&&a.push(A("div",{class:"breadcrumb__actions",ref:"breadcrumb__actions"},this.$slots.actions?.())),this.breadcrumbsRefs=i,A("div",{class:["breadcrumb",{"breadcrumb--collapsed":this.hiddenIndices.length===t.length-2}],ref:"container"},a)}},Ht=ee(At,[["__scopeId","data-v-5a4d73af"]]),Ut=new vt({concurrency:5});function Et(t){const{resolve:i,promise:e}=Promise.withResolvers();return Ut.add(()=>{const a=new Image;return a.onerror=()=>i(!1),a.onload=()=>i(!0),a.src=t,e}),e}function Wt(t,i={}){i={size:32,cropPreview:!1,mimeFallback:!0,...i};try{const e=t.attributes?.previewUrl||me("/core/preview?fileId={fileid}",{fileid:t.fileid});let a;try{a=new URL(e)}catch{a=new URL(e,window.location.origin)}return a.searchParams.set("x",`${i.size}`),a.searchParams.set("y",`${i.size}`),a.searchParams.set("mimeFallback",`${i.mimeFallback}`),a.searchParams.set("a",i.cropPreview===!0?"0":"1"),a.searchParams.set("c",`${t.attributes.etag}`),a}catch{return null}}function Tt(t,i){const e=L(null),a=L(!1);return Ee(()=>{a.value=!1,e.value=Wt(Z(t),Z(i||{})),e.value&&Z(t).type===j.File&&Et(e.value.href).then(l=>{a.value=l})}),{previewURL:e,previewLoaded:a}}const x=(t,i)=>{const e=t.__vccOpts||t;for(const[a,l]of i)e[a]=l;return e},qt={name:"FileIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Zt=["aria-hidden","aria-label"],Ot=["fill","width","height"],jt={d:"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z"},Yt={key:0};function Gt(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon file-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",jt,[e.title?(s(),c("title",Yt,$(e.title),1)):z("",!0)])],8,Ot))],16,Zt)}const fe=x(qt,[["render",Gt]]),Jt={name:"MenuDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Kt=["aria-hidden","aria-label"],Qt=["fill","width","height"],Xt={d:"M7,10L12,15L17,10H7Z"},ei={key:0};function ti(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon menu-down-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",Xt,[e.title?(s(),c("title",ei,$(e.title),1)):z("",!0)])],8,Qt))],16,Kt)}const oe=x(Jt,[["render",ti]]),ii={name:"MenuUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ai=["aria-hidden","aria-label"],li=["fill","width","height"],ri={d:"M7,15L12,10L17,15H7Z"},ni={key:0};function si(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon menu-up-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",ri,[e.title?(s(),c("title",ni,$(e.title),1)):z("",!0)])],8,li))],16,ai)}const ce=x(ii,[["render",si]]),oi={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ci=["aria-hidden","aria-label"],di=["fill","width","height"],ui={d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"},pi={key:0};function fi(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon folder-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",ui,[e.title?(s(),c("title",pi,$(e.title),1)):z("",!0)])],8,di))],16,ci)}const Re=x(oi,[["render",fi]]),Ae={"file-picker__file-icon":"_file-picker__file-icon_1aykw_9","file-picker__file-icon--primary":"_file-picker__file-icon--primary_1aykw_22","file-picker__file-icon-overlay":"_file-picker__file-icon-overlay_1aykw_26"},mi=H({__name:"FilePreview",props:{node:{},cropImagePreviews:{type:Boolean}},setup(t){const i=t,e=L(Ae),{previewURL:a,previewLoaded:l}=Tt(Se(i,"node"),b(()=>({cropPreview:i.cropImagePreviews}))),r=b(()=>i.node.type===j.File),n=b(()=>{if(i.node.type!==j.Folder)return null;if(i.node.attributes?.["is-encrypted"]===1)return dt;if(i.node.attributes?.["is-tag"])return ut;const u=Object.values(i.node.attributes?.["share-types"]||{}).flat();if(u.some(p=>p===_e.Link||p===_e.Email))return pt;if(u.length>0)return ke;switch(i.node.attributes?.["mount-type"]){case"external":case"external-session":return mt;case"group":return ft;case"shared":return ke}return null});return(u,p)=>(s(),c("div",{style:Oe(d(l)?{backgroundImage:`url(${d(a)})`}:void 0),class:E(e.value["file-picker__file-icon"])},[d(l)?z("",!0):(s(),c(M,{key:0},[r.value?(s(),C(fe,{key:0,size:32})):(s(),c(M,{key:1},[n.value?(s(),C(d(Ie),{key:0,class:E(e.value["file-picker__file-icon-overlay"]),inline:"",path:n.value,size:16},null,8,["class","path"])):z("",!0),_(Re,{class:E(e.value["file-picker__file-icon--primary"]),size:32},null,8,["class"])],64))],64))],6))}}),hi=["tabindex","aria-selected","data-filename"],vi={class:"row-name"},gi={class:"file-picker__name-container","data-testid":"row-name"},yi=["title","textContent"],bi=["textContent"],wi={class:"row-size"},ki={class:"row-modified"},_i=H({__name:"FileListRow",props:{allowPickDirectory:{type:Boolean},selected:{type:Boolean},showCheckbox:{type:Boolean},canPick:{type:Boolean},node:{},cropImagePreviews:{type:Boolean}},emits:["update:selected","enterDirectory"],setup(t,{emit:i}){const e=t,a=i,l=b(()=>e.node.mtime??0),r=b(()=>lt(e.node.displayname)),n=b(()=>e.node.displayname.slice(0,r.value?-r.value.length:void 0)),u=b(()=>e.node.type===j.Folder),p=b(()=>e.canPick&&(e.allowPickDirectory||!u.value)),o=b(()=>(e.node.permissions&Ce.READ)===Ce.READ);function g(){p.value&&a("update:selected",!e.selected)}function y(){u.value?o.value&&a("enterDirectory",e.node):g()}function v(B){B.key==="Enter"&&y()}return(B,V)=>(s(),c("tr",D({tabindex:t.showCheckbox&&!u.value?void 0:0,"aria-selected":p.value?t.selected:void 0,class:["file-picker__row",[{"file-picker__row--selected":t.selected&&!t.showCheckbox,"file-picker__row--not-navigatable":u.value&&!o.value,"file-picker__row--not-pickable":!p.value}]],"data-filename":t.node.basename,"data-testid":"file-list-row"},Ze({click:y,...!t.showCheckbox||u.value?{keydown:v}:{}},!0)),[t.showCheckbox?(s(),c("td",{key:0,class:"row-checkbox",onClick:J(()=>{},["stop"])},[_(d(Ne),{"aria-label":d(h)("Select the row for {nodename}",{nodename:n.value}),disabled:!p.value,"data-testid":"row-checkbox",modelValue:t.selected,"onUpdate:modelValue":g},null,8,["aria-label","disabled","modelValue"])])):z("",!0),f("td",vi,[f("div",gi,[_(mi,{node:t.node,cropImagePreviews:t.cropImagePreviews},null,8,["node","cropImagePreviews"]),f("div",{class:"file-picker__file-name",title:n.value,textContent:$(n.value)},null,8,yi),f("div",{class:"file-picker__file-extension",textContent:$(r.value)},null,8,bi)])]),f("td",wi,$(d(it)(t.node.size||0)),1),f("td",ki,[_(d(nt),{timestamp:l.value,ignoreSeconds:""},null,8,["timestamp"])])],16,hi))}}),Ci=x(_i,[["__scopeId","data-v-7857e8bd"]]),Li={"aria-hidden":"true",class:"file-picker__row loading-row"},$i={key:0,class:"row-checkbox"},zi={class:"row-name"},Bi={class:"row-wrapper"},Fi=H({__name:"LoadingTableRow",props:{showCheckbox:{type:Boolean}},setup(t){return(i,e)=>(s(),c("tr",Li,[t.showCheckbox?(s(),c("td",$i,[...e[0]||(e[0]=[f("span",null,null,-1)])])):z("",!0),f("td",zi,[f("div",Bi,[f("span",{class:E(d(Ae)["file-picker__file-icon"])},null,2),e[1]||(e[1]=f("span",null,null,-1))])]),e[2]||(e[2]=f("td",{class:"row-size"},[f("span")],-1)),e[3]||(e[3]=f("td",{class:"row-modified"},[f("span")],-1))]))}}),Pi=x(Fi,[["__scopeId","data-v-1f96131b"]]);function He(){const t=xe("files","config",null),i=L(t?.show_hidden??!0),e=L(t?.sort_favorites_first??!0),a=L(t?.crop_image_previews??!0);return G(async()=>{if(Ve())Y.debug("Skip loading files settings - currently on public share");else try{const{data:l}=await De.get(me("/apps/files/api/v1/configs"));i.value=l?.data?.show_hidden??!1,e.value=l?.data?.sort_favorites_first??!0,a.value=l?.data?.crop_image_previews??!0}catch(l){Y.error("Could not load files settings",{error:l}),ve(h("Could not load files settings"))}}),{showHiddenFiles:i,sortFavoritesFirst:e,cropImagePreviews:a}}function Si(t){const i=o=>o==="asc"?"ascending":o==="desc"?"descending":"none",e=xe("files","viewConfigs",null),a=L({sortBy:e?.files?.sorting_mode??"basename",order:i(e?.files?.sorting_direction??"asc")}),l=L({sortBy:e?.recent?.sorting_mode??"basename",order:i(e?.recent?.sorting_direction??"asc")}),r=L({sortBy:e?.favorites?.sorting_mode??"basename",order:i(e?.favorites?.sorting_direction??"asc")});G(async()=>{if(Ve())Y.debug("Skip loading files views - currently on public share");else try{const{data:o}=await De.get(me("/apps/files/api/v1/views"));a.value={sortBy:o?.data?.files?.sorting_mode??"basename",order:i(o?.data?.files?.sorting_direction)},r.value={sortBy:o?.data?.favorites?.sorting_mode??"basename",order:i(o?.data?.favorites?.sorting_direction)},l.value={sortBy:o?.data?.recent?.sorting_mode??"basename",order:i(o?.data?.recent?.sorting_direction)}}catch(o){Y.error("Could not load files views",{error:o}),ve(h("Could not load files views"))}});const n=b(()=>Z(t||"files")==="files"?a.value:Z(t)==="recent"?l.value:r.value),u=b(()=>n.value.sortBy),p=b(()=>n.value.order);return{filesViewConfig:a,favoritesViewConfig:r,recentViewConfig:l,currentConfig:n,sortBy:u,order:p}}const Ni={key:0,class:"row-checkbox"},xi={class:"hidden-visually"},Vi=["aria-sort"],Ii={class:"header-wrapper"},Di={key:2,style:{width:"44px"}},Mi=["aria-sort"],Ri={key:2,style:{width:"44px"}},Ai=["aria-sort"],Hi={key:2,style:{width:"44px"}},Ui=H({__name:"FileList",props:pe({currentView:{},multiselect:{type:Boolean},allowPickDirectory:{type:Boolean},loading:{type:Boolean},files:{},canPick:{type:Function}},{path:{required:!0},pathModifiers:{},selectedFiles:{required:!0},selectedFilesModifiers:{}}),emits:["update:path","update:selectedFiles"],setup(t){const i=ue(t,"path"),e=ue(t,"selectedFiles"),a=t,l=L(),{currentConfig:r}=Si(a.currentView),n=b(()=>l.value??r.value),u=b(()=>n.value.sortBy==="basename"?n.value.order==="none"?void 0:n.value.order:void 0),p=b(()=>n.value.sortBy==="size"?n.value.order==="none"?void 0:n.value.order:void 0),o=b(()=>n.value.sortBy==="mtime"?n.value.order==="none"?void 0:n.value.order:void 0);function g(F){n.value.sortBy===F?n.value.order==="ascending"?l.value={sortBy:n.value.sortBy,order:"descending"}:l.value={sortBy:n.value.sortBy,order:"ascending"}:l.value={sortBy:F,order:"ascending"}}const{sortFavoritesFirst:y,cropImagePreviews:v}=He(),B=b(()=>at(a.files,{sortFoldersFirst:!0,sortFavoritesFirst:y.value,sortingOrder:n.value.order==="descending"?"desc":"asc",sortingMode:n.value.sortBy})),V=b(()=>a.files.filter(F=>a.allowPickDirectory||F.type!==j.Folder)),te=b(()=>!a.loading&&e.value.length>0&&e.value.length>=V.value.length);function W(){e.value.lengthP.path!==F.path):a.multiselect?e.value=[...e.value,F]:e.value=[F]}function ae(F){i.value=F.path}const T=L(4),U=L();{const F=()=>qe(()=>{const P=U.value?.parentElement?.children||[];let S=U.value?.parentElement?.clientHeight||450;for(let R=0;R{window.addEventListener("resize",F),F()}),Te(()=>{window.removeEventListener("resize",F)})}return(F,P)=>(s(),c("div",{ref_key:"fileContainer",ref:U,class:"file-picker__files"},[f("table",null,[f("thead",null,[f("tr",null,[t.multiselect?(s(),c("th",Ni,[f("span",xi,$(d(h)("Select entry")),1),t.multiselect?(s(),C(d(Ne),{key:0,"aria-label":d(h)("Select all entries"),"data-testid":"select-all-checkbox",modelValue:te.value,"onUpdate:modelValue":W},null,8,["aria-label","modelValue"])):z("",!0)])):z("",!0),f("th",{"aria-sort":u.value,class:"row-name"},[f("div",Ii,[P[3]||(P[3]=f("span",{class:"file-picker__header-preview"},null,-1)),_(d(O),{"data-test":"file-picker_sort-name",variant:"tertiary",wide:"",onClick:P[0]||(P[0]=S=>g("basename"))},{icon:w(()=>[u.value==="ascending"?(s(),C(ce,{key:0,size:20})):u.value==="descending"?(s(),C(oe,{key:1,size:20})):(s(),c("span",Di))]),default:w(()=>[q(" "+$(d(h)("Name")),1)]),_:1})])],8,Vi),f("th",{"aria-sort":p.value,class:"row-size"},[_(d(O),{variant:"tertiary",wide:"",onClick:P[1]||(P[1]=S=>g("size"))},{icon:w(()=>[p.value==="ascending"?(s(),C(ce,{key:0,size:20})):p.value==="descending"?(s(),C(oe,{key:1,size:20})):(s(),c("span",Ri))]),default:w(()=>[q(" "+$(d(h)("Size")),1)]),_:1})],8,Mi),f("th",{"aria-sort":o.value,class:"row-modified"},[_(d(O),{variant:"tertiary",wide:"",onClick:P[2]||(P[2]=S=>g("mtime"))},{icon:w(()=>[o.value==="ascending"?(s(),C(ce,{key:0,size:20})):o.value==="descending"?(s(),C(oe,{key:1,size:20})):(s(),c("span",Hi))]),default:w(()=>[q(" "+$(d(h)("Modified")),1)]),_:1})],8,Ai)])]),f("tbody",null,[t.loading?(s(!0),c(M,{key:0},K(T.value,S=>(s(),C(Pi,{key:S,showCheckbox:t.multiselect},null,8,["showCheckbox"]))),128)):(s(!0),c(M,{key:1},K(B.value,S=>(s(),C(Ci,{key:S.fileid||S.path,allowPickDirectory:t.allowPickDirectory,showCheckbox:t.multiselect,canPick:(t.multiselect||e.value.length===0||e.value.includes(S))&&(t.canPick===void 0||t.canPick(S)),selected:e.value.includes(S),node:S,cropImagePreviews:d(v),"onUpdate:selected":R=>ie(S),onEnterDirectory:ae},null,8,["allowPickDirectory","showCheckbox","canPick","selected","node","cropImagePreviews","onUpdate:selected"]))),128))])])],512))}}),Ei=x(Ui,[["__scopeId","data-v-412efd5c"]]),Wi={name:"HomeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ti=["aria-hidden","aria-label"],qi=["fill","width","height"],Zi={d:"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z"},Oi={key:0};function ji(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon home-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",Zi,[e.title?(s(),c("title",Oi,$(e.title),1)):z("",!0)])],8,qi))],16,Ti)}const Yi=x(Wi,[["render",ji]]),Gi={name:"PlusIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ji=["aria-hidden","aria-label"],Ki=["fill","width","height"],Qi={d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"},Xi={key:0};function ea(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon plus-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",Qi,[e.title?(s(),c("title",Xi,$(e.title),1)):z("",!0)])],8,Ki))],16,Ji)}const ta=x(Gi,[["render",ea]]),ia=H({__name:"FilePickerBreadcrumbs",props:pe({showMenu:{type:Boolean}},{path:{required:!0},pathModifiers:{}}),emits:pe(["createNode"],["update:path"]),setup(t,{emit:i}){const e=ue(t,"path"),a=i,l=L(!1),r=L(""),n=We("nameInput");function u(){const g=r.value.trim(),y=n.value?.$el?.querySelector("input");let v="";try{et(g)}catch(B){if(!(B instanceof tt))throw B;switch(B.reason){case se.Character:v=h('"{char}" is not allowed inside a folder name.',{char:B.segment});break;case se.ReservedName:v=h('"{segment}" is a reserved name and not allowed for folder names.',{segment:B.segment});break;case se.Extension:v=h('Folder names must not end with "{extension}".',{extension:B.segment});break;default:v=h("Invalid folder name.")}}return y&&y.setCustomValidity(v),v===""}function p(){const g=r.value.trim();u()&&(l.value=!1,a("createNode",g),r.value="")}const o=b(()=>e.value.split("/").filter(g=>g!=="").map((g,y,v)=>({name:g,path:"/"+v.slice(0,y+1).join("/")})));return(g,y)=>(s(),C(d(Ht),{class:"file-picker__breadcrumbs"},Fe({default:w(()=>[_(d(X),{name:d(h)("All files"),title:d(h)("Home"),onClick:y[0]||(y[0]=v=>e.value="/")},{icon:w(()=>[_(Yi,{size:20})]),_:1},8,["name","title"]),(s(!0),c(M,null,K(o.value,v=>(s(),C(d(X),{key:v.path,name:v.name,title:v.path,onClick:B=>e.value=v.path},null,8,["name","title","onClick"]))),128))]),_:2},[t.showMenu?{name:"actions",fn:w(()=>[_(d(he),{open:l.value,"onUpdate:open":y[2]||(y[2]=v=>l.value=v),"aria-label":d(h)("Create directory"),forceMenu:!0,forceName:!0,menuName:d(h)("New"),variant:"secondary",onClose:y[3]||(y[3]=v=>r.value="")},{icon:w(()=>[_(ta,{size:20})]),default:w(()=>[_(d(gt),{ref_key:"nameInput",ref:n,modelValue:r.value,"onUpdate:modelValue":[y[1]||(y[1]=v=>r.value=v),u],label:d(h)("New folder"),placeholder:d(h)("New folder name"),onSubmit:p},{icon:w(()=>[_(Re,{size:20})]),_:1},8,["modelValue","label","placeholder"])]),_:1},8,["open","aria-label","menuName"])]),key:"0"}:void 0]),1024))}}),aa=x(ia,[["__scopeId","data-v-b448b141"]]),la={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ra=["aria-hidden","aria-label"],na=["fill","width","height"],sa={d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},oa={key:0};function ca(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon close-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",sa,[e.title?(s(),c("title",oa,$(e.title),1)):z("",!0)])],8,na))],16,ra)}const da=x(la,[["render",ca]]),ua={name:"MagnifyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},pa=["aria-hidden","aria-label"],fa=["fill","width","height"],ma={d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"},ha={key:0};function va(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon magnify-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",ma,[e.title?(s(),c("title",ha,$(e.title),1)):z("",!0)])],8,fa))],16,pa)}const ga=x(ua,[["render",va]]);function ya(t){const i=[{id:"files",label:h("All files"),icon:st},{id:"recent",label:h("Recent"),icon:ot},{id:"favorites",label:h("Favorites"),icon:ct}],e=t.value?i.filter(({id:a})=>a==="files"):i;return{allViews:i,availableViews:e}}const ba={key:0,class:"file-picker__side"},wa=H({__name:"FilePickerNavigation",props:{currentView:{},filterString:{},isCollapsed:{type:Boolean},disabledNavigation:{type:Boolean}},emits:["update:currentView","update:filterString"],setup(t,{emit:i}){const e=t,a=i,{availableViews:l}=ya(L(Ke()===null)),r=b(()=>l.filter(u=>u.id===e.currentView)[0]??l[0]),n=u=>a("update:filterString",u.toString());return(u,p)=>(s(),c(M,null,[_(d(rt),{class:"file-picker__filter-input",label:d(h)("Filter file list"),showTrailingButton:!!t.filterString,modelValue:t.filterString,"onUpdate:modelValue":n,onTrailingButtonClick:p[0]||(p[0]=o=>n(""))},{"trailing-button-icon":w(()=>[_(da,{size:16})]),default:w(()=>[_(ga,{size:16})]),_:1},8,["label","showTrailingButton","modelValue"]),d(l).length>1&&!t.disabledNavigation?(s(),c(M,{key:0},[t.isCollapsed?(s(),C(d(yt),{key:1,"aria-label":d(h)("Current view selector"),clearable:!1,searchable:!1,options:d(l),modelValue:r.value,"onUpdate:modelValue":p[1]||(p[1]=o=>a("update:currentView",o.id))},null,8,["aria-label","options","modelValue"])):(s(),c("ul",ba,[(s(!0),c(M,null,K(d(l),o=>(s(),c("li",{key:o.id},[_(d(O),{variant:t.currentView===o.id?"primary":"tertiary",wide:!0,onClick:g=>u.$emit("update:currentView",o.id)},{icon:w(()=>[_(d(Ie),{path:o.icon,size:20},null,8,["path"])]),default:w(()=>[q(" "+$(o.label),1)]),_:2},1032,["variant","onClick"])]))),128))]))],64)):z("",!0)],64))}}),ka=x(wa,[["__scopeId","data-v-e1c54e23"]]);async function _a({client:t,signal:i}){const e=Math.round(Date.now()/1e3)-1209600,{data:a}=await t.search("/",{signal:i,details:!0,data:kt(e)});return a.results.map(l=>ye(l))}async function Ca({client:t,path:i,signal:e}){const a=(await t.getDirectoryContents(Q(ge,i),{signal:e,details:!0,includeSelf:!0,data:Me()})).data.map(l=>ye(l));return{contents:a.filter(({path:l})=>l!==i),folder:a.find(({path:l})=>i===l)}}async function La(t,i){const{data:e}=await t.stat(Q(ge,i),{details:!0,data:Me()});return ye(e)}function $a(t,i){const e=bt(),a=de([]),l=de(null),r=L(!0);let n;async function u(o){const g=Q(i.value,o);await e.createDirectory(Q(ge,g));const y=await La(e,g);return a.value=[...a.value,y],y}async function p(){n&&(n.abort(),n=void 0),n=new AbortController,r.value=!0;try{if(t.value==="favorites")a.value=await wt({client:e,path:i.value,signal:n.signal}),l.value=null;else if(t.value==="recent")a.value=await _a({client:e,signal:n.signal}),l.value=null;else{const o=await Ca({client:e,path:i.value,signal:n.signal});l.value=o.folder,a.value=o.contents}}catch(o){if(o instanceof Error&&o.name==="AbortError")return;throw o}finally{n=void 0,r.value=!1}}return Pe([t,i],()=>p()),G(()=>p()),{isLoading:r,files:a,folder:l,loadFiles:p,createDirectory:u}}function za(t){const i=b(()=>t.value.map(e=>e.split("/")));return{isSupportedMimeType:e=>{const a=e.split("/");return i.value.some(([l,r])=>(a[0]===l||l==="*")&&(a[1]===r||r==="*"))}}}const Ba={class:"file-picker__main"},Fa={key:1,class:"file-picker__view"},Pa=H({__name:"FilePicker",props:{buttons:{},name:{},allowPickDirectory:{type:Boolean,default:!1},noMenu:{type:Boolean,default:!1},disabledNavigation:{type:Boolean,default:!1},filterFn:{type:Function,default:void 0},canPickFn:{type:Function,default:void 0},mimetypeFilter:{default:()=>[]},multiselect:{type:Boolean,default:!1},path:{default:void 0}},emits:["close"],setup(t,{emit:i}){const e=t,a=i,l=L(!0),r=L("files"),n=L(window?.sessionStorage.getItem("NC.FilePicker.LastPath")||"/"),u=L(""),p=b({get:()=>r.value==="files"?u.value||e.path||n.value:"/",set:k=>{u.value=k}}),o=de([]),g=L(""),{files:y,folder:v,isLoading:B,loadFiles:V,createDirectory:te}=$a(r,p);Pe([u],()=>{e.path===void 0&&u.value&&window.sessionStorage.setItem("NC.FilePicker.LastPath",u.value),o.value=[],g.value=""});let W=!1;const ie=b(()=>{const k=o.value.length===0&&e.allowPickDirectory&&v.value&&(!e.canPickFn||e.canPickFn(v.value))?[v.value]:o.value;return(typeof e.buttons=="function"?e.buttons(k,p.value,r.value):e.buttons).map(m=>({...m,disabled:m.disabled||B.value,callback:()=>{W=!0,ae(m.callback,k)}}))});async function ae(k,m){await k(m),a("close",m),W=!1}const T=b(()=>r.value==="favorites"?h("Favorites"):r.value==="recent"?h("Recent"):""),{isSupportedMimeType:U}=za(Se(e,"mimetypeFilter"));G(()=>V());const{showHiddenFiles:F}=He(),P=b(()=>{let k=y.value;return F.value||(k=k.filter(m=>!m.basename.startsWith("."))),e.mimetypeFilter.length>0&&(k=k.filter(m=>m.type==="folder"||m.mime&&U(m.mime))),g.value&&(k=k.filter(m=>m.basename.toLowerCase().includes(g.value.toLowerCase()))),e.filterFn&&(k=k.filter(m=>e.filterFn(m))),k}),S=b(()=>r.value==="files"?h("Upload some content or sync with your devices!"):r.value==="recent"?h("Files and folders you recently modified will show up here."):h("Files and folders you mark as favorite will show up here."));async function R(k){try{const m=await te(k);u.value=m.path,Je("files:node:created",y.value.filter(I=>I.basename===k)[0])}catch(m){Y.warn("Could not create new folder",{name:k,error:m}),ve(h("Could not create the new folder"))}}function Ue(k){!k&&!W&&a("close")}return(k,m)=>(s(),C(d(Xe),{open:l.value,"onUpdate:open":[m[6]||(m[6]=I=>l.value=I),Ue],buttons:ie.value,name:t.name,size:"large",contentClasses:"file-picker__content",dialogClasses:"file-picker",navigationClasses:"file-picker__navigation"},{navigation:w(({isCollapsed:I})=>[_(ka,{currentView:r.value,"onUpdate:currentView":m[0]||(m[0]=le=>r.value=le),filterString:g.value,"onUpdate:filterString":m[1]||(m[1]=le=>g.value=le),isCollapsed:I,disabledNavigation:t.disabledNavigation},null,8,["currentView","filterString","isCollapsed","disabledNavigation"])]),default:w(()=>[f("div",Ba,[r.value==="files"?(s(),C(aa,{key:0,path:p.value,"onUpdate:path":m[2]||(m[2]=I=>p.value=I),showMenu:!t.noMenu,onCreateNode:R},null,8,["path","showMenu"])):(s(),c("div",Fa,[f("h3",null,$(T.value),1)])),d(B)||P.value.length>0?(s(),C(Ei,{key:2,path:p.value,"onUpdate:path":[m[3]||(m[3]=I=>p.value=I),m[5]||(m[5]=I=>r.value="files")],selectedFiles:o.value,"onUpdate:selectedFiles":m[4]||(m[4]=I=>o.value=I),allowPickDirectory:t.allowPickDirectory,currentView:r.value,files:P.value,multiselect:t.multiselect,loading:d(B),name:T.value,canPick:t.canPickFn},null,8,["path","selectedFiles","allowPickDirectory","currentView","files","multiselect","loading","name","canPick"])):g.value?(s(),C(d(we),{key:3,name:d(h)("No matching files"),description:d(h)("No files matching your filter were found.")},{icon:w(()=>[_(fe)]),_:1},8,["name","description"])):(s(),C(d(we),{key:4,name:d(h)("No files in here"),description:S.value},{icon:w(()=>[_(fe)]),_:1},8,["name","description"]))])]),_:1},8,["open","buttons","name"]))}}),il=x(Pa,[["__scopeId","data-v-39182aaf"]]);export{il as default}; -//# sourceMappingURL=FilePicker-BRLNOlwO.chunk.mjs.map +import{f as re,o as s,j as c,c as C,x as Fe,w,l as ne,k as f,n as E,g as q,t as $,y as D,m as z,e as _,C as J,F as M,a5 as be,a6 as A,a3 as Ee,a0 as Z,r as L,b as H,v as Pe,U as G,u as d,p as b,a7 as de,q as ue,s as We,A as K,z as pe,a8 as Te,H as qe,Y as Ze,B as Oe,S as Se}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{u as je,d as Ye,s as Ge,b as me,f as Je,a as Ke}from"./index-DgEyzq8A.chunk.mjs";import{a as he,k as Qe,N as Xe}from"./index-CO7ZwNPX.chunk.mjs";import{N as we}from"./Plus-gXjhFOHV.chunk.mjs";import{v as et,I as tt,d as se,f as it,s as at}from"./index-CPriPmaq.chunk.mjs";import{N as O}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{N as Ne}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import{l as xe,i as Ve,j as Q,b as lt}from"./index-C3KLQ_oe.chunk.mjs";import{_ as rt,a as nt}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{s as st,t as ot,u as ct,v as dt,w as ut,x as pt,y as ke,p as ft,c as mt}from"./mdi-CYMOyMtM.chunk.mjs";import{S as _e}from"./ShareType-suoNfd7y.chunk.mjs";import{_ as ee,c as ht,N as Ie}from"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import{F as j,P as Ce}from"./externalStorageUtils-BzJyVKar.chunk.mjs";import"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{P as vt,a as gt}from"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import{t as h,l as Y,a as ve}from"./index-WQvok30H.chunk.mjs";import{c as De}from"./index-9ZBo3L67.chunk.mjs";import{N as Le}from"./PencilOutline-Byyi13ia.chunk.mjs";import{N as $e,a as ze}from"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{N as yt}from"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import{g as bt,h as wt,i as ge,j as kt,r as ye,k as Me}from"./dav-CSaJxXR-.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./index-C5O29_27.chunk.mjs";const _t={name:"ChevronRightIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ct=["aria-hidden","aria-label"],Lt=["fill","width","height"],$t={d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"},zt={key:0};function Bt(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon chevron-right-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",$t,[e.title?(s(),c("title",zt,$(e.title),1)):z("",!0)])],8,Lt))],16,Ct)}const Ft=ee(_t,[["render",Bt]]),Pt={name:"NcBreadcrumb",components:{NcActions:he,ChevronRight:Ft,NcButton:O},inheritAttrs:!1,props:{name:{type:String,required:!0},title:{type:String,default:null},to:{type:[String,Object],default:void 0},href:{type:String,default:void 0},icon:{type:String,default:""},forceIconText:{type:Boolean,default:!1},disableDrop:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},open:{type:Boolean,default:!1},class:{type:[String,Array,Object],default:""}},emits:["dragenter","dragleave","dropped","update:open"],setup(){const t=ht();return{actionsContainer:`.vue-crumb[data-crumb-id="${t}"]`,crumbId:t}},data(){return{hovering:!1}},computed:{linkAttributes(){return this.to?{to:this.to,...this.$attrs}:this.href?{href:this.href,...this.$attrs}:this.$attrs}},methods:{onOpenChange(t){this.$emit("update:open",t)},dropped(t){return this.disableDrop||(this.$emit("dropped",t,this.to||this.href),this.$parent.$emit("dropped",t,this.to||this.href),this.hovering=!1),!1},dragEnter(t){this.$emit("dragenter",t),!this.disableDrop&&(this.hovering=!0)},dragLeave(t){this.$emit("dragleave",t),!this.disableDrop&&(t.target.contains(t.relatedTarget)||this.$refs.crumb.contains(t.relatedTarget)||(this.hovering=!1))}}},St=["data-crumb-id"];function Nt(t,i,e,a,l,r){const n=re("NcButton"),u=re("NcActions"),p=re("ChevronRight");return s(),c("li",{ref:"crumb",class:E(["vue-crumb",[{"vue-crumb--hovered":l.hovering},t.$props.class]]),"data-crumb-id":a.crumbId,draggable:"false",onDragstart:J(()=>{},["prevent"]),onDrop:i[0]||(i[0]=J((...o)=>r.dropped&&r.dropped(...o),["prevent"])),onDragover:J(()=>{},["prevent"]),onDragenter:i[1]||(i[1]=(...o)=>r.dragEnter&&r.dragEnter(...o)),onDragleave:i[2]||(i[2]=(...o)=>r.dragLeave&&r.dragLeave(...o))},[(e.name||e.icon||t.$slots.icon)&&!t.$slots.default?(s(),C(n,D({key:0,"aria-label":e.icon?e.name:void 0,variant:"tertiary"},r.linkAttributes),Fe({_:2},[t.$slots.icon||e.icon?{name:"icon",fn:w(()=>[ne(t.$slots,"icon",{},()=>[f("span",{class:E([e.icon,"icon"])},null,2)],!0)]),key:"0"}:void 0,!(t.$slots.icon||e.icon)||e.forceIconText?{name:"default",fn:w(()=>[q($(e.name),1)]),key:"1"}:void 0]),1040,["aria-label"])):z("",!0),t.$slots.default?(s(),C(u,{key:1,ref:"actions",container:a.actionsContainer,forceMenu:e.forceMenu,forceName:"",menuName:e.name,open:e.open,title:e.title,variant:"tertiary","onUpdate:open":r.onOpenChange},{icon:w(()=>[ne(t.$slots,"menu-icon",{},void 0,!0)]),default:w(()=>[ne(t.$slots,"default",{},void 0,!0)]),_:3},8,["container","forceMenu","menuName","open","title","onUpdate:open"])):z("",!0),_(p,{class:"vue-crumb__separator",size:20})],42,St)}const X=ee(Pt,[["render",Nt],["__scopeId","data-v-7cec4a3e"]]),xt={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Vt=["aria-hidden","aria-label"],It=["fill","width","height"],Dt={d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"},Mt={key:0};function Rt(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon folder-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",Dt,[e.title?(s(),c("title",Mt,$(e.title),1)):z("",!0)])],8,It))],16,Vt)}const Be=ee(xt,[["render",Rt]]),N="vue-crumb",At={name:"NcBreadcrumbs",components:{NcActions:he,NcActionButton:Le,NcActionRouter:ze,NcActionLink:$e,NcBreadcrumb:X,IconFolder:Be},props:{rootIcon:{type:String,default:"icon-home"},ariaLabel:{type:String,default:null}},emits:["dropped"],data(){return{hiddenIndices:[],menuBreadcrumbProps:{name:"",forceMenu:!0,disableDrop:!0,open:!1},breadcrumbsRefs:[]}},created(){window.addEventListener("resize",Ye(()=>{this.handleWindowResize()},100)),Ge("navigation-toggled",this.delayedResize)},mounted(){this.handleWindowResize()},updated(){this.delayedResize(),this.$nextTick(()=>{this.hideCrumbs()})},beforeUnmount(){window.removeEventListener("resize",this.handleWindowResize),je("navigation-toggled",this.delayedResize)},methods:{closeActions(t){this.$refs.actionsBreadcrumb.$el.contains(t.relatedTarget)||(this.menuBreadcrumbProps.open=!1)},async delayedResize(){await this.$nextTick(),this.handleWindowResize()},handleWindowResize(){if(!this.$refs.container)return;const t=this.breadcrumbsRefs.length,i=[],e=this.$refs.container.offsetWidth;let a=this.getTotalWidth();this.$refs.breadcrumb__actions&&(a+=this.$refs.breadcrumb__actions.offsetWidth);let l=a-e;l+=l>0?64:0;let r=0;const n=Math.floor(t/2);for(;l>0&&ru-p))||(this.hiddenIndices=i)},arraysEqual(t,i){if(t.length!==i.length)return!1;if(t===i)return!0;if(t===null||i===null)return!1;for(let e=0;et+this.getWidth(i.$el,e===this.breadcrumbsRefs.length-1),0)},getWidth(t,i){if(!t?.classList)return 0;const e=t.classList.contains(`${N}--hidden`);t.style.minWidth="auto",i&&(t.style.maxWidth="210px"),t.classList.remove(`${N}--hidden`);const a=t.offsetWidth;return e&&t.classList.add(`${N}--hidden`),t.style.minWidth="",t.style.maxWidth="",a},preventDefault(t){return t.preventDefault&&t.preventDefault(),!1},dragStart(t){return this.preventDefault(t)},dropped(t,i,e){e||this.$emit("dropped",t,i),this.menuBreadcrumbProps.open=!1;const a=document.querySelectorAll(`.${N}`);for(const l of a)l.classList.remove(`${N}--hovered`);return this.preventDefault(t)},dragOver(t){return this.preventDefault(t)},dragEnter(t,i){if(!i&&t.target.closest){const e=t.target.closest(`.${N}`);if(e.classList&&e.classList.contains(N)){const a=document.querySelectorAll(`.${N}`);for(const l of a)l.classList.remove(`${N}--hovered`);e.classList.add(`${N}--hovered`)}}},dragLeave(t,i){if(!i&&!t.target.contains(t.relatedTarget)&&t.target.closest){const e=t.target.closest(`.${N}`);if(e.contains(t.relatedTarget))return;e.classList&&e.classList.contains(N)&&e.classList.remove(`${N}--hovered`)}},hideCrumbs(){this.breadcrumbsRefs.forEach((t,i)=>{t?.$el?.classList&&(this.hiddenIndices.includes(i)?t.$el.classList.add(`${N}--hidden`):t.$el.classList.remove(`${N}--hidden`))})},isBreadcrumb(t){return t?.type?.name==="NcBreadcrumb"}},render(){let t=[];if(this.$slots.default?.().forEach(l=>{if(this.isBreadcrumb(l)){t.push(l);return}l?.type===M&&l?.children?.forEach?.(r=>{this.isBreadcrumb(r)&&t.push(r)})}),t.length===0)return;t[0]=be(t[0],{icon:this.rootIcon,ref:"breadcrumbs"});const i=[];t=t.map((l,r)=>be(l,{ref:n=>{i[r]=n}}));const e=[...t];this.hiddenIndices.length&&e.splice(Math.round(t.length/2),0,A(X,{class:"dropdown",...this.menuBreadcrumbProps,"aria-hidden":!0,ref:"actionsBreadcrumb",key:"actions-breadcrumb-1",onDragenter:()=>{this.menuBreadcrumbProps.open=!0},onDragleave:this.closeActions,"onUpdate:open":l=>{this.menuBreadcrumbProps.open=l}},{default:()=>this.hiddenIndices.filter(l=>l<=t.length-1).map(l=>{const r=t[l],{to:n,href:u,disableDrop:p,name:o,...g}=r.props;delete g.ref;let y=Le,v="";u&&(y=$e,v=u),n&&(y=ze,v=n);const B=A(Be,{size:20});return A(y,{...g,class:N,href:u||null,to:n||null,draggable:!1,onDragstart:this.dragStart,onDrop:V=>this.dropped(V,v,p),onDragover:this.dragOver,onDragenter:V=>this.dragEnter(V,p),onDragleave:V=>this.dragLeave(V,p)},{default:()=>o,icon:()=>B})})}));const a=[A("nav",{"aria-label":this.ariaLabel},[A("ul",{class:"breadcrumb__crumbs"},[e])])];return Qe(this.$slots.actions?.())&&a.push(A("div",{class:"breadcrumb__actions",ref:"breadcrumb__actions"},this.$slots.actions?.())),this.breadcrumbsRefs=i,A("div",{class:["breadcrumb",{"breadcrumb--collapsed":this.hiddenIndices.length===t.length-2}],ref:"container"},a)}},Ht=ee(At,[["__scopeId","data-v-5a4d73af"]]),Ut=new vt({concurrency:5});function Et(t){const{resolve:i,promise:e}=Promise.withResolvers();return Ut.add(()=>{const a=new Image;return a.onerror=()=>i(!1),a.onload=()=>i(!0),a.src=t,e}),e}function Wt(t,i={}){i={size:32,cropPreview:!1,mimeFallback:!0,...i};try{const e=t.attributes?.previewUrl||me("/core/preview?fileId={fileid}",{fileid:t.fileid});let a;try{a=new URL(e)}catch{a=new URL(e,window.location.origin)}return a.searchParams.set("x",`${i.size}`),a.searchParams.set("y",`${i.size}`),a.searchParams.set("mimeFallback",`${i.mimeFallback}`),a.searchParams.set("a",i.cropPreview===!0?"0":"1"),a.searchParams.set("c",`${t.attributes.etag}`),a}catch{return null}}function Tt(t,i){const e=L(null),a=L(!1);return Ee(()=>{a.value=!1,e.value=Wt(Z(t),Z(i||{})),e.value&&Z(t).type===j.File&&Et(e.value.href).then(l=>{a.value=l})}),{previewURL:e,previewLoaded:a}}const x=(t,i)=>{const e=t.__vccOpts||t;for(const[a,l]of i)e[a]=l;return e},qt={name:"FileIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Zt=["aria-hidden","aria-label"],Ot=["fill","width","height"],jt={d:"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z"},Yt={key:0};function Gt(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon file-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",jt,[e.title?(s(),c("title",Yt,$(e.title),1)):z("",!0)])],8,Ot))],16,Zt)}const fe=x(qt,[["render",Gt]]),Jt={name:"MenuDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Kt=["aria-hidden","aria-label"],Qt=["fill","width","height"],Xt={d:"M7,10L12,15L17,10H7Z"},ei={key:0};function ti(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon menu-down-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",Xt,[e.title?(s(),c("title",ei,$(e.title),1)):z("",!0)])],8,Qt))],16,Kt)}const oe=x(Jt,[["render",ti]]),ii={name:"MenuUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ai=["aria-hidden","aria-label"],li=["fill","width","height"],ri={d:"M7,15L12,10L17,15H7Z"},ni={key:0};function si(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon menu-up-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",ri,[e.title?(s(),c("title",ni,$(e.title),1)):z("",!0)])],8,li))],16,ai)}const ce=x(ii,[["render",si]]),oi={name:"FolderIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ci=["aria-hidden","aria-label"],di=["fill","width","height"],ui={d:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"},pi={key:0};function fi(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon folder-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",ui,[e.title?(s(),c("title",pi,$(e.title),1)):z("",!0)])],8,di))],16,ci)}const Re=x(oi,[["render",fi]]),Ae={"file-picker__file-icon":"_file-picker__file-icon_1aykw_9","file-picker__file-icon--primary":"_file-picker__file-icon--primary_1aykw_22","file-picker__file-icon-overlay":"_file-picker__file-icon-overlay_1aykw_26"},mi=H({__name:"FilePreview",props:{node:{},cropImagePreviews:{type:Boolean}},setup(t){const i=t,e=L(Ae),{previewURL:a,previewLoaded:l}=Tt(Se(i,"node"),b(()=>({cropPreview:i.cropImagePreviews}))),r=b(()=>i.node.type===j.File),n=b(()=>{if(i.node.type!==j.Folder)return null;if(i.node.attributes?.["is-encrypted"]===1)return dt;if(i.node.attributes?.["is-tag"])return ut;const u=Object.values(i.node.attributes?.["share-types"]||{}).flat();if(u.some(p=>p===_e.Link||p===_e.Email))return pt;if(u.length>0)return ke;switch(i.node.attributes?.["mount-type"]){case"external":case"external-session":return mt;case"group":return ft;case"shared":return ke}return null});return(u,p)=>(s(),c("div",{style:Oe(d(l)?{backgroundImage:`url(${d(a)})`}:void 0),class:E(e.value["file-picker__file-icon"])},[d(l)?z("",!0):(s(),c(M,{key:0},[r.value?(s(),C(fe,{key:0,size:32})):(s(),c(M,{key:1},[n.value?(s(),C(d(Ie),{key:0,class:E(e.value["file-picker__file-icon-overlay"]),inline:"",path:n.value,size:16},null,8,["class","path"])):z("",!0),_(Re,{class:E(e.value["file-picker__file-icon--primary"]),size:32},null,8,["class"])],64))],64))],6))}}),hi=["tabindex","aria-selected","data-filename"],vi={class:"row-name"},gi={class:"file-picker__name-container","data-testid":"row-name"},yi=["title","textContent"],bi=["textContent"],wi={class:"row-size"},ki={class:"row-modified"},_i=H({__name:"FileListRow",props:{allowPickDirectory:{type:Boolean},selected:{type:Boolean},showCheckbox:{type:Boolean},canPick:{type:Boolean},node:{},cropImagePreviews:{type:Boolean}},emits:["update:selected","enterDirectory"],setup(t,{emit:i}){const e=t,a=i,l=b(()=>e.node.mtime??0),r=b(()=>lt(e.node.displayname)),n=b(()=>e.node.displayname.slice(0,r.value?-r.value.length:void 0)),u=b(()=>e.node.type===j.Folder),p=b(()=>e.canPick&&(e.allowPickDirectory||!u.value)),o=b(()=>(e.node.permissions&Ce.READ)===Ce.READ);function g(){p.value&&a("update:selected",!e.selected)}function y(){u.value?o.value&&a("enterDirectory",e.node):g()}function v(B){B.key==="Enter"&&y()}return(B,V)=>(s(),c("tr",D({tabindex:t.showCheckbox&&!u.value?void 0:0,"aria-selected":p.value?t.selected:void 0,class:["file-picker__row",[{"file-picker__row--selected":t.selected&&!t.showCheckbox,"file-picker__row--not-navigatable":u.value&&!o.value,"file-picker__row--not-pickable":!p.value}]],"data-filename":t.node.basename,"data-testid":"file-list-row"},Ze({click:y,...!t.showCheckbox||u.value?{keydown:v}:{}},!0)),[t.showCheckbox?(s(),c("td",{key:0,class:"row-checkbox",onClick:J(()=>{},["stop"])},[_(d(Ne),{"aria-label":d(h)("Select the row for {nodename}",{nodename:n.value}),disabled:!p.value,"data-testid":"row-checkbox",modelValue:t.selected,"onUpdate:modelValue":g},null,8,["aria-label","disabled","modelValue"])])):z("",!0),f("td",vi,[f("div",gi,[_(mi,{node:t.node,cropImagePreviews:t.cropImagePreviews},null,8,["node","cropImagePreviews"]),f("div",{class:"file-picker__file-name",title:n.value,textContent:$(n.value)},null,8,yi),f("div",{class:"file-picker__file-extension",textContent:$(r.value)},null,8,bi)])]),f("td",wi,$(d(it)(t.node.size||0)),1),f("td",ki,[_(d(nt),{timestamp:l.value,ignoreSeconds:""},null,8,["timestamp"])])],16,hi))}}),Ci=x(_i,[["__scopeId","data-v-7857e8bd"]]),Li={"aria-hidden":"true",class:"file-picker__row loading-row"},$i={key:0,class:"row-checkbox"},zi={class:"row-name"},Bi={class:"row-wrapper"},Fi=H({__name:"LoadingTableRow",props:{showCheckbox:{type:Boolean}},setup(t){return(i,e)=>(s(),c("tr",Li,[t.showCheckbox?(s(),c("td",$i,[...e[0]||(e[0]=[f("span",null,null,-1)])])):z("",!0),f("td",zi,[f("div",Bi,[f("span",{class:E(d(Ae)["file-picker__file-icon"])},null,2),e[1]||(e[1]=f("span",null,null,-1))])]),e[2]||(e[2]=f("td",{class:"row-size"},[f("span")],-1)),e[3]||(e[3]=f("td",{class:"row-modified"},[f("span")],-1))]))}}),Pi=x(Fi,[["__scopeId","data-v-1f96131b"]]);function He(){const t=xe("files","config",null),i=L(t?.show_hidden??!0),e=L(t?.sort_favorites_first??!0),a=L(t?.crop_image_previews??!0);return G(async()=>{if(Ve())Y.debug("Skip loading files settings - currently on public share");else try{const{data:l}=await De.get(me("/apps/files/api/v1/configs"));i.value=l?.data?.show_hidden??!1,e.value=l?.data?.sort_favorites_first??!0,a.value=l?.data?.crop_image_previews??!0}catch(l){Y.error("Could not load files settings",{error:l}),ve(h("Could not load files settings"))}}),{showHiddenFiles:i,sortFavoritesFirst:e,cropImagePreviews:a}}function Si(t){const i=o=>o==="asc"?"ascending":o==="desc"?"descending":"none",e=xe("files","viewConfigs",null),a=L({sortBy:e?.files?.sorting_mode??"basename",order:i(e?.files?.sorting_direction??"asc")}),l=L({sortBy:e?.recent?.sorting_mode??"basename",order:i(e?.recent?.sorting_direction??"asc")}),r=L({sortBy:e?.favorites?.sorting_mode??"basename",order:i(e?.favorites?.sorting_direction??"asc")});G(async()=>{if(Ve())Y.debug("Skip loading files views - currently on public share");else try{const{data:o}=await De.get(me("/apps/files/api/v1/views"));a.value={sortBy:o?.data?.files?.sorting_mode??"basename",order:i(o?.data?.files?.sorting_direction)},r.value={sortBy:o?.data?.favorites?.sorting_mode??"basename",order:i(o?.data?.favorites?.sorting_direction)},l.value={sortBy:o?.data?.recent?.sorting_mode??"basename",order:i(o?.data?.recent?.sorting_direction)}}catch(o){Y.error("Could not load files views",{error:o}),ve(h("Could not load files views"))}});const n=b(()=>Z(t||"files")==="files"?a.value:Z(t)==="recent"?l.value:r.value),u=b(()=>n.value.sortBy),p=b(()=>n.value.order);return{filesViewConfig:a,favoritesViewConfig:r,recentViewConfig:l,currentConfig:n,sortBy:u,order:p}}const Ni={key:0,class:"row-checkbox"},xi={class:"hidden-visually"},Vi=["aria-sort"],Ii={class:"header-wrapper"},Di={key:2,style:{width:"44px"}},Mi=["aria-sort"],Ri={key:2,style:{width:"44px"}},Ai=["aria-sort"],Hi={key:2,style:{width:"44px"}},Ui=H({__name:"FileList",props:pe({currentView:{},multiselect:{type:Boolean},allowPickDirectory:{type:Boolean},loading:{type:Boolean},files:{},canPick:{type:Function}},{path:{required:!0},pathModifiers:{},selectedFiles:{required:!0},selectedFilesModifiers:{}}),emits:["update:path","update:selectedFiles"],setup(t){const i=ue(t,"path"),e=ue(t,"selectedFiles"),a=t,l=L(),{currentConfig:r}=Si(a.currentView),n=b(()=>l.value??r.value),u=b(()=>n.value.sortBy==="basename"?n.value.order==="none"?void 0:n.value.order:void 0),p=b(()=>n.value.sortBy==="size"?n.value.order==="none"?void 0:n.value.order:void 0),o=b(()=>n.value.sortBy==="mtime"?n.value.order==="none"?void 0:n.value.order:void 0);function g(F){n.value.sortBy===F?n.value.order==="ascending"?l.value={sortBy:n.value.sortBy,order:"descending"}:l.value={sortBy:n.value.sortBy,order:"ascending"}:l.value={sortBy:F,order:"ascending"}}const{sortFavoritesFirst:y,cropImagePreviews:v}=He(),B=b(()=>at(a.files,{sortFoldersFirst:!0,sortFavoritesFirst:y.value,sortingOrder:n.value.order==="descending"?"desc":"asc",sortingMode:n.value.sortBy})),V=b(()=>a.files.filter(F=>a.allowPickDirectory||F.type!==j.Folder)),te=b(()=>!a.loading&&e.value.length>0&&e.value.length>=V.value.length);function W(){e.value.lengthP.path!==F.path):a.multiselect?e.value=[...e.value,F]:e.value=[F]}function ae(F){i.value=F.path}const T=L(4),U=L();{const F=()=>qe(()=>{const P=U.value?.parentElement?.children||[];let S=U.value?.parentElement?.clientHeight||450;for(let R=0;R{window.addEventListener("resize",F),F()}),Te(()=>{window.removeEventListener("resize",F)})}return(F,P)=>(s(),c("div",{ref_key:"fileContainer",ref:U,class:"file-picker__files"},[f("table",null,[f("thead",null,[f("tr",null,[t.multiselect?(s(),c("th",Ni,[f("span",xi,$(d(h)("Select entry")),1),t.multiselect?(s(),C(d(Ne),{key:0,"aria-label":d(h)("Select all entries"),"data-testid":"select-all-checkbox",modelValue:te.value,"onUpdate:modelValue":W},null,8,["aria-label","modelValue"])):z("",!0)])):z("",!0),f("th",{"aria-sort":u.value,class:"row-name"},[f("div",Ii,[P[3]||(P[3]=f("span",{class:"file-picker__header-preview"},null,-1)),_(d(O),{"data-test":"file-picker_sort-name",variant:"tertiary",wide:"",onClick:P[0]||(P[0]=S=>g("basename"))},{icon:w(()=>[u.value==="ascending"?(s(),C(ce,{key:0,size:20})):u.value==="descending"?(s(),C(oe,{key:1,size:20})):(s(),c("span",Di))]),default:w(()=>[q(" "+$(d(h)("Name")),1)]),_:1})])],8,Vi),f("th",{"aria-sort":p.value,class:"row-size"},[_(d(O),{variant:"tertiary",wide:"",onClick:P[1]||(P[1]=S=>g("size"))},{icon:w(()=>[p.value==="ascending"?(s(),C(ce,{key:0,size:20})):p.value==="descending"?(s(),C(oe,{key:1,size:20})):(s(),c("span",Ri))]),default:w(()=>[q(" "+$(d(h)("Size")),1)]),_:1})],8,Mi),f("th",{"aria-sort":o.value,class:"row-modified"},[_(d(O),{variant:"tertiary",wide:"",onClick:P[2]||(P[2]=S=>g("mtime"))},{icon:w(()=>[o.value==="ascending"?(s(),C(ce,{key:0,size:20})):o.value==="descending"?(s(),C(oe,{key:1,size:20})):(s(),c("span",Hi))]),default:w(()=>[q(" "+$(d(h)("Modified")),1)]),_:1})],8,Ai)])]),f("tbody",null,[t.loading?(s(!0),c(M,{key:0},K(T.value,S=>(s(),C(Pi,{key:S,showCheckbox:t.multiselect},null,8,["showCheckbox"]))),128)):(s(!0),c(M,{key:1},K(B.value,S=>(s(),C(Ci,{key:S.fileid||S.path,allowPickDirectory:t.allowPickDirectory,showCheckbox:t.multiselect,canPick:(t.multiselect||e.value.length===0||e.value.includes(S))&&(t.canPick===void 0||t.canPick(S)),selected:e.value.includes(S),node:S,cropImagePreviews:d(v),"onUpdate:selected":R=>ie(S),onEnterDirectory:ae},null,8,["allowPickDirectory","showCheckbox","canPick","selected","node","cropImagePreviews","onUpdate:selected"]))),128))])])],512))}}),Ei=x(Ui,[["__scopeId","data-v-412efd5c"]]),Wi={name:"HomeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ti=["aria-hidden","aria-label"],qi=["fill","width","height"],Zi={d:"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z"},Oi={key:0};function ji(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon home-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",Zi,[e.title?(s(),c("title",Oi,$(e.title),1)):z("",!0)])],8,qi))],16,Ti)}const Yi=x(Wi,[["render",ji]]),Gi={name:"PlusIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ji=["aria-hidden","aria-label"],Ki=["fill","width","height"],Qi={d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"},Xi={key:0};function ea(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon plus-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",Qi,[e.title?(s(),c("title",Xi,$(e.title),1)):z("",!0)])],8,Ki))],16,Ji)}const ta=x(Gi,[["render",ea]]),ia=H({__name:"FilePickerBreadcrumbs",props:pe({showMenu:{type:Boolean}},{path:{required:!0},pathModifiers:{}}),emits:pe(["createNode"],["update:path"]),setup(t,{emit:i}){const e=ue(t,"path"),a=i,l=L(!1),r=L(""),n=We("nameInput");function u(){const g=r.value.trim(),y=n.value?.$el?.querySelector("input");let v="";try{et(g)}catch(B){if(!(B instanceof tt))throw B;switch(B.reason){case se.Character:v=h('"{char}" is not allowed inside a folder name.',{char:B.segment});break;case se.ReservedName:v=h('"{segment}" is a reserved name and not allowed for folder names.',{segment:B.segment});break;case se.Extension:v=h('Folder names must not end with "{extension}".',{extension:B.segment});break;default:v=h("Invalid folder name.")}}return y&&y.setCustomValidity(v),v===""}function p(){const g=r.value.trim();u()&&(l.value=!1,a("createNode",g),r.value="")}const o=b(()=>e.value.split("/").filter(g=>g!=="").map((g,y,v)=>({name:g,path:"/"+v.slice(0,y+1).join("/")})));return(g,y)=>(s(),C(d(Ht),{class:"file-picker__breadcrumbs"},Fe({default:w(()=>[_(d(X),{name:d(h)("All files"),title:d(h)("Home"),onClick:y[0]||(y[0]=v=>e.value="/")},{icon:w(()=>[_(Yi,{size:20})]),_:1},8,["name","title"]),(s(!0),c(M,null,K(o.value,v=>(s(),C(d(X),{key:v.path,name:v.name,title:v.path,onClick:B=>e.value=v.path},null,8,["name","title","onClick"]))),128))]),_:2},[t.showMenu?{name:"actions",fn:w(()=>[_(d(he),{open:l.value,"onUpdate:open":y[2]||(y[2]=v=>l.value=v),"aria-label":d(h)("Create directory"),forceMenu:!0,forceName:!0,menuName:d(h)("New"),variant:"secondary",onClose:y[3]||(y[3]=v=>r.value="")},{icon:w(()=>[_(ta,{size:20})]),default:w(()=>[_(d(gt),{ref_key:"nameInput",ref:n,modelValue:r.value,"onUpdate:modelValue":[y[1]||(y[1]=v=>r.value=v),u],label:d(h)("New folder"),placeholder:d(h)("New folder name"),onSubmit:p},{icon:w(()=>[_(Re,{size:20})]),_:1},8,["modelValue","label","placeholder"])]),_:1},8,["open","aria-label","menuName"])]),key:"0"}:void 0]),1024))}}),aa=x(ia,[["__scopeId","data-v-b448b141"]]),la={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ra=["aria-hidden","aria-label"],na=["fill","width","height"],sa={d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},oa={key:0};function ca(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon close-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",sa,[e.title?(s(),c("title",oa,$(e.title),1)):z("",!0)])],8,na))],16,ra)}const da=x(la,[["render",ca]]),ua={name:"MagnifyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},pa=["aria-hidden","aria-label"],fa=["fill","width","height"],ma={d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"},ha={key:0};function va(t,i,e,a,l,r){return s(),c("span",D(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon magnify-icon",role:"img",onClick:i[0]||(i[0]=n=>t.$emit("click",n))}),[(s(),c("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[f("path",ma,[e.title?(s(),c("title",ha,$(e.title),1)):z("",!0)])],8,fa))],16,pa)}const ga=x(ua,[["render",va]]);function ya(t){const i=[{id:"files",label:h("All files"),icon:st},{id:"recent",label:h("Recent"),icon:ot},{id:"favorites",label:h("Favorites"),icon:ct}],e=t.value?i.filter(({id:a})=>a==="files"):i;return{allViews:i,availableViews:e}}const ba={key:0,class:"file-picker__side"},wa=H({__name:"FilePickerNavigation",props:{currentView:{},filterString:{},isCollapsed:{type:Boolean},disabledNavigation:{type:Boolean}},emits:["update:currentView","update:filterString"],setup(t,{emit:i}){const e=t,a=i,{availableViews:l}=ya(L(Ke()===null)),r=b(()=>l.filter(u=>u.id===e.currentView)[0]??l[0]),n=u=>a("update:filterString",u.toString());return(u,p)=>(s(),c(M,null,[_(d(rt),{class:"file-picker__filter-input",label:d(h)("Filter file list"),showTrailingButton:!!t.filterString,modelValue:t.filterString,"onUpdate:modelValue":n,onTrailingButtonClick:p[0]||(p[0]=o=>n(""))},{"trailing-button-icon":w(()=>[_(da,{size:16})]),default:w(()=>[_(ga,{size:16})]),_:1},8,["label","showTrailingButton","modelValue"]),d(l).length>1&&!t.disabledNavigation?(s(),c(M,{key:0},[t.isCollapsed?(s(),C(d(yt),{key:1,"aria-label":d(h)("Current view selector"),clearable:!1,searchable:!1,options:d(l),modelValue:r.value,"onUpdate:modelValue":p[1]||(p[1]=o=>a("update:currentView",o.id))},null,8,["aria-label","options","modelValue"])):(s(),c("ul",ba,[(s(!0),c(M,null,K(d(l),o=>(s(),c("li",{key:o.id},[_(d(O),{variant:t.currentView===o.id?"primary":"tertiary",wide:!0,onClick:g=>u.$emit("update:currentView",o.id)},{icon:w(()=>[_(d(Ie),{path:o.icon,size:20},null,8,["path"])]),default:w(()=>[q(" "+$(o.label),1)]),_:2},1032,["variant","onClick"])]))),128))]))],64)):z("",!0)],64))}}),ka=x(wa,[["__scopeId","data-v-e1c54e23"]]);async function _a({client:t,signal:i}){const e=Math.round(Date.now()/1e3)-1209600,{data:a}=await t.search("/",{signal:i,details:!0,data:kt(e)});return a.results.map(l=>ye(l))}async function Ca({client:t,path:i,signal:e}){const a=(await t.getDirectoryContents(Q(ge,i),{signal:e,details:!0,includeSelf:!0,data:Me()})).data.map(l=>ye(l));return{contents:a.filter(({path:l})=>l!==i),folder:a.find(({path:l})=>i===l)}}async function La(t,i){const{data:e}=await t.stat(Q(ge,i),{details:!0,data:Me()});return ye(e)}function $a(t,i){const e=bt(),a=de([]),l=de(null),r=L(!0);let n;async function u(o){const g=Q(i.value,o);await e.createDirectory(Q(ge,g));const y=await La(e,g);return a.value=[...a.value,y],y}async function p(){n&&(n.abort(),n=void 0),n=new AbortController,r.value=!0;try{if(t.value==="favorites")a.value=await wt({client:e,path:i.value,signal:n.signal}),l.value=null;else if(t.value==="recent")a.value=await _a({client:e,signal:n.signal}),l.value=null;else{const o=await Ca({client:e,path:i.value,signal:n.signal});l.value=o.folder,a.value=o.contents}}catch(o){if(o instanceof Error&&o.name==="AbortError")return;throw o}finally{n=void 0,r.value=!1}}return Pe([t,i],()=>p()),G(()=>p()),{isLoading:r,files:a,folder:l,loadFiles:p,createDirectory:u}}function za(t){const i=b(()=>t.value.map(e=>e.split("/")));return{isSupportedMimeType:e=>{const a=e.split("/");return i.value.some(([l,r])=>(a[0]===l||l==="*")&&(a[1]===r||r==="*"))}}}const Ba={class:"file-picker__main"},Fa={key:1,class:"file-picker__view"},Pa=H({__name:"FilePicker",props:{buttons:{},name:{},allowPickDirectory:{type:Boolean,default:!1},noMenu:{type:Boolean,default:!1},disabledNavigation:{type:Boolean,default:!1},filterFn:{type:Function,default:void 0},canPickFn:{type:Function,default:void 0},mimetypeFilter:{default:()=>[]},multiselect:{type:Boolean,default:!1},path:{default:void 0}},emits:["close"],setup(t,{emit:i}){const e=t,a=i,l=L(!0),r=L("files"),n=L(window?.sessionStorage.getItem("NC.FilePicker.LastPath")||"/"),u=L(""),p=b({get:()=>r.value==="files"?u.value||e.path||n.value:"/",set:k=>{u.value=k}}),o=de([]),g=L(""),{files:y,folder:v,isLoading:B,loadFiles:V,createDirectory:te}=$a(r,p);Pe([u],()=>{e.path===void 0&&u.value&&window.sessionStorage.setItem("NC.FilePicker.LastPath",u.value),o.value=[],g.value=""});let W=!1;const ie=b(()=>{const k=o.value.length===0&&e.allowPickDirectory&&v.value&&(!e.canPickFn||e.canPickFn(v.value))?[v.value]:o.value;return(typeof e.buttons=="function"?e.buttons(k,p.value,r.value):e.buttons).map(m=>({...m,disabled:m.disabled||B.value,callback:()=>{W=!0,ae(m.callback,k)}}))});async function ae(k,m){await k(m),a("close",m),W=!1}const T=b(()=>r.value==="favorites"?h("Favorites"):r.value==="recent"?h("Recent"):""),{isSupportedMimeType:U}=za(Se(e,"mimetypeFilter"));G(()=>V());const{showHiddenFiles:F}=He(),P=b(()=>{let k=y.value;return F.value||(k=k.filter(m=>!m.basename.startsWith("."))),e.mimetypeFilter.length>0&&(k=k.filter(m=>m.type==="folder"||m.mime&&U(m.mime))),g.value&&(k=k.filter(m=>m.basename.toLowerCase().includes(g.value.toLowerCase()))),e.filterFn&&(k=k.filter(m=>e.filterFn(m))),k}),S=b(()=>r.value==="files"?h("Upload some content or sync with your devices!"):r.value==="recent"?h("Files and folders you recently modified will show up here."):h("Files and folders you mark as favorite will show up here."));async function R(k){try{const m=await te(k);u.value=m.path,Je("files:node:created",y.value.filter(I=>I.basename===k)[0])}catch(m){Y.warn("Could not create new folder",{name:k,error:m}),ve(h("Could not create the new folder"))}}function Ue(k){!k&&!W&&a("close")}return(k,m)=>(s(),C(d(Xe),{open:l.value,"onUpdate:open":[m[6]||(m[6]=I=>l.value=I),Ue],buttons:ie.value,name:t.name,size:"large",contentClasses:"file-picker__content",dialogClasses:"file-picker",navigationClasses:"file-picker__navigation"},{navigation:w(({isCollapsed:I})=>[_(ka,{currentView:r.value,"onUpdate:currentView":m[0]||(m[0]=le=>r.value=le),filterString:g.value,"onUpdate:filterString":m[1]||(m[1]=le=>g.value=le),isCollapsed:I,disabledNavigation:t.disabledNavigation},null,8,["currentView","filterString","isCollapsed","disabledNavigation"])]),default:w(()=>[f("div",Ba,[r.value==="files"?(s(),C(aa,{key:0,path:p.value,"onUpdate:path":m[2]||(m[2]=I=>p.value=I),showMenu:!t.noMenu,onCreateNode:R},null,8,["path","showMenu"])):(s(),c("div",Fa,[f("h3",null,$(T.value),1)])),d(B)||P.value.length>0?(s(),C(Ei,{key:2,path:p.value,"onUpdate:path":[m[3]||(m[3]=I=>p.value=I),m[5]||(m[5]=I=>r.value="files")],selectedFiles:o.value,"onUpdate:selectedFiles":m[4]||(m[4]=I=>o.value=I),allowPickDirectory:t.allowPickDirectory,currentView:r.value,files:P.value,multiselect:t.multiselect,loading:d(B),name:T.value,canPick:t.canPickFn},null,8,["path","selectedFiles","allowPickDirectory","currentView","files","multiselect","loading","name","canPick"])):g.value?(s(),C(d(we),{key:3,name:d(h)("No matching files"),description:d(h)("No files matching your filter were found.")},{icon:w(()=>[_(fe)]),_:1},8,["name","description"])):(s(),C(d(we),{key:4,name:d(h)("No files in here"),description:S.value},{icon:w(()=>[_(fe)]),_:1},8,["name","description"]))])]),_:1},8,["open","buttons","name"]))}}),il=x(Pa,[["__scopeId","data-v-39182aaf"]]);export{il as default}; +//# sourceMappingURL=FilePicker-Cghq-bGr.chunk.mjs.map diff --git a/dist/FilePicker-BRLNOlwO.chunk.mjs.license b/dist/FilePicker-Cghq-bGr.chunk.mjs.license similarity index 100% rename from dist/FilePicker-BRLNOlwO.chunk.mjs.license rename to dist/FilePicker-Cghq-bGr.chunk.mjs.license diff --git a/dist/FilePicker-BRLNOlwO.chunk.mjs.map b/dist/FilePicker-Cghq-bGr.chunk.mjs.map similarity index 99% rename from dist/FilePicker-BRLNOlwO.chunk.mjs.map rename to dist/FilePicker-Cghq-bGr.chunk.mjs.map index 2d5973f96c371..a0074ac71178d 100644 --- a/dist/FilePicker-BRLNOlwO.chunk.mjs.map +++ b/dist/FilePicker-Cghq-bGr.chunk.mjs.map @@ -1 +1 @@ -{"version":3,"file":"FilePicker-BRLNOlwO.chunk.mjs","sources":["../node_modules/@nextcloud/vue/dist/chunks/NcBreadcrumb-3Y5NWXnV.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcBreadcrumbs-BaTp3Sya.mjs","../node_modules/@nextcloud/dialogs/dist/chunks/preview.mjs","../node_modules/@nextcloud/dialogs/dist/chunks/_plugin-vue_export-helper.mjs","../node_modules/@nextcloud/dialogs/dist/chunks/FilePicker.mjs"],"sourcesContent":["import '../assets/NcBreadcrumb-BxhZKQlW.css';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode, toDisplayString, createCommentVNode, resolveComponent, withModifiers, normalizeClass, createBlock, createSlots, withCtx, renderSlot, createTextVNode, createVNode } from \"vue\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nimport { N as NcButton } from \"./NcButton-jvoYS2my.mjs\";\nimport { c as createElementId } from \"./createElementId-DhjFt1I9.mjs\";\nimport { N as NcActions } from \"./NcActions-C-wDqSrv.mjs\";\nconst _sfc_main$1 = {\n name: \"ChevronRightIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$1 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3 = { d: \"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z\" };\nconst _hoisted_4 = { key: 0 };\nfunction _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon chevron-right-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2))\n ], 16, _hoisted_1$1);\n}\nconst ChevronRight = /* @__PURE__ */ _export_sfc(_sfc_main$1, [[\"render\", _sfc_render$1]]);\nconst _sfc_main = {\n name: \"NcBreadcrumb\",\n components: {\n NcActions,\n ChevronRight,\n NcButton\n },\n inheritAttrs: false,\n props: {\n /**\n * The main text content of the entry.\n */\n name: {\n type: String,\n required: true\n },\n /**\n * The title attribute of the element.\n */\n title: {\n type: String,\n default: null\n },\n /**\n * Route Location the link should navigate to when clicked on.\n *\n * @see https://v3.router.vuejs.org/api/#to\n */\n to: {\n type: [String, Object],\n default: void 0\n },\n /**\n * Set this prop if your app doesn't use vue-router, breadcrumbs will show as normal links.\n */\n href: {\n type: String,\n default: void 0\n },\n /**\n * Set a css icon-class to show an icon along name text (if forceIconText is provided, otherwise just icon).\n */\n icon: {\n type: String,\n default: \"\"\n },\n /**\n * Enables text to accompany the icon, if the icon was provided. The text that will be displayed is the name prop.\n */\n forceIconText: {\n type: Boolean,\n default: false\n },\n /**\n * Disable dropping on this breadcrumb.\n */\n disableDrop: {\n type: Boolean,\n default: false\n },\n /**\n * Force the actions to display in a three dot menu\n */\n forceMenu: {\n type: Boolean,\n default: false\n },\n /**\n * Open state of the Actions menu\n */\n open: {\n type: Boolean,\n default: false\n },\n /**\n * CSS class to apply to the root element.\n */\n class: {\n type: [String, Array, Object],\n default: \"\"\n }\n },\n emits: [\n \"dragenter\",\n \"dragleave\",\n \"dropped\",\n \"update:open\"\n ],\n setup() {\n const crumbId = createElementId();\n return {\n actionsContainer: `.vue-crumb[data-crumb-id=\"${crumbId}\"]`,\n crumbId\n };\n },\n data() {\n return {\n /**\n * Variable to track if we hover over the breadcrumb\n */\n hovering: false\n };\n },\n computed: {\n /**\n * The attributes to pass to `router-link` or `a`\n */\n linkAttributes() {\n if (this.to) {\n return { to: this.to, ...this.$attrs };\n } else if (this.href) {\n return { href: this.href, ...this.$attrs };\n }\n return this.$attrs;\n }\n },\n methods: {\n /**\n * Function to handle changing the open state of the Actions menu\n * $emit the open state.\n *\n * @param {boolean} open The open state of the Actions menu\n */\n onOpenChange(open) {\n this.$emit(\"update:open\", open);\n },\n /**\n * Function to handle a drop on the breadcrumb.\n * $emit the event and the path, remove the hovering state.\n *\n * @param {object} e The drop event\n * @return {boolean}\n */\n dropped(e) {\n if (this.disableDrop) {\n return false;\n }\n this.$emit(\"dropped\", e, this.to || this.href);\n this.$parent.$emit(\"dropped\", e, this.to || this.href);\n this.hovering = false;\n return false;\n },\n /**\n * Add the hovering state on drag enter\n *\n * @param {DragEvent} e The drag-enter event\n */\n dragEnter(e) {\n this.$emit(\"dragenter\", e);\n if (this.disableDrop) {\n return;\n }\n this.hovering = true;\n },\n /**\n * Remove the hovering state on drag leave\n *\n * @param {DragEvent} e The drag leave event\n */\n dragLeave(e) {\n this.$emit(\"dragleave\", e);\n if (this.disableDrop) {\n return;\n }\n if (e.target.contains(e.relatedTarget) || this.$refs.crumb.contains(e.relatedTarget)) {\n return;\n }\n this.hovering = false;\n }\n }\n};\nconst _hoisted_1 = [\"data-crumb-id\"];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_NcButton = resolveComponent(\"NcButton\");\n const _component_NcActions = resolveComponent(\"NcActions\");\n const _component_ChevronRight = resolveComponent(\"ChevronRight\");\n return openBlock(), createElementBlock(\"li\", {\n ref: \"crumb\",\n class: normalizeClass([\"vue-crumb\", [{ \"vue-crumb--hovered\": $data.hovering }, _ctx.$props.class]]),\n \"data-crumb-id\": $setup.crumbId,\n draggable: \"false\",\n onDragstart: withModifiers(() => {\n }, [\"prevent\"]),\n onDrop: _cache[0] || (_cache[0] = withModifiers((...args) => $options.dropped && $options.dropped(...args), [\"prevent\"])),\n onDragover: withModifiers(() => {\n }, [\"prevent\"]),\n onDragenter: _cache[1] || (_cache[1] = (...args) => $options.dragEnter && $options.dragEnter(...args)),\n onDragleave: _cache[2] || (_cache[2] = (...args) => $options.dragLeave && $options.dragLeave(...args))\n }, [\n ($props.name || $props.icon || _ctx.$slots.icon) && !_ctx.$slots.default ? (openBlock(), createBlock(_component_NcButton, mergeProps({\n key: 0,\n \"aria-label\": $props.icon ? $props.name : void 0,\n variant: \"tertiary\"\n }, $options.linkAttributes), createSlots({ _: 2 }, [\n _ctx.$slots.icon || $props.icon ? {\n name: \"icon\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"icon\", {}, () => [\n createElementVNode(\"span\", {\n class: normalizeClass([$props.icon, \"icon\"])\n }, null, 2)\n ], true)\n ]),\n key: \"0\"\n } : void 0,\n !(_ctx.$slots.icon || $props.icon) || $props.forceIconText ? {\n name: \"default\",\n fn: withCtx(() => [\n createTextVNode(toDisplayString($props.name), 1)\n ]),\n key: \"1\"\n } : void 0\n ]), 1040, [\"aria-label\"])) : createCommentVNode(\"\", true),\n _ctx.$slots.default ? (openBlock(), createBlock(_component_NcActions, {\n key: 1,\n ref: \"actions\",\n container: $setup.actionsContainer,\n forceMenu: $props.forceMenu,\n forceName: \"\",\n menuName: $props.name,\n open: $props.open,\n title: $props.title,\n variant: \"tertiary\",\n \"onUpdate:open\": $options.onOpenChange\n }, {\n icon: withCtx(() => [\n renderSlot(_ctx.$slots, \"menu-icon\", {}, void 0, true)\n ]),\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, void 0, true)\n ]),\n _: 3\n }, 8, [\"container\", \"forceMenu\", \"menuName\", \"open\", \"title\", \"onUpdate:open\"])) : createCommentVNode(\"\", true),\n createVNode(_component_ChevronRight, {\n class: \"vue-crumb__separator\",\n size: 20\n })\n ], 42, _hoisted_1);\n}\nconst NcBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__scopeId\", \"data-v-7cec4a3e\"]]);\nexport {\n NcBreadcrumb as N\n};\n//# sourceMappingURL=NcBreadcrumb-3Y5NWXnV.mjs.map\n","import '../assets/NcBreadcrumbs-B4eyDS9i.css';\nimport { unsubscribe, subscribe } from \"@nextcloud/event-bus\";\nimport debounce from \"debounce\";\nimport { openBlock, createElementBlock, mergeProps, createElementVNode, toDisplayString, createCommentVNode, Fragment, cloneVNode, h } from \"vue\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nimport { N as NcActions, i as isSlotPopulated } from \"./NcActions-C-wDqSrv.mjs\";\nimport { N as NcActionButton } from \"./NcActionButton-BO5T5ePT.mjs\";\nimport { N as NcActionLink } from \"./NcActionLink-BFiaYt9A.mjs\";\nimport { N as NcActionRouter } from \"./NcActionRouter-vYFtIOzD.mjs\";\nimport { N as NcBreadcrumb } from \"./NcBreadcrumb-3Y5NWXnV.mjs\";\nconst _sfc_main$1 = {\n name: \"FolderIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3 = { d: \"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z\" };\nconst _hoisted_4 = { key: 0 };\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon folder-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2))\n ], 16, _hoisted_1);\n}\nconst IconFolder = /* @__PURE__ */ _export_sfc(_sfc_main$1, [[\"render\", _sfc_render]]);\nconst crumbClass = \"vue-crumb\";\nconst _sfc_main = {\n name: \"NcBreadcrumbs\",\n components: {\n NcActions,\n NcActionButton,\n NcActionRouter,\n NcActionLink,\n NcBreadcrumb,\n IconFolder\n },\n props: {\n /**\n * Set a css icon-class for the icon of the root breadcrumb to be used.\n */\n rootIcon: {\n type: String,\n default: \"icon-home\"\n },\n /**\n * Set the aria-label of the nav element.\n */\n ariaLabel: {\n type: String,\n default: null\n }\n },\n emits: [\"dropped\"],\n data() {\n return {\n /**\n * Array to track the hidden breadcrumbs by their index.\n * Comparing two crumbs somehow does not work, so we use the indices.\n */\n hiddenIndices: [],\n /**\n * This is the props of the middle Action menu\n * that show the ellipsised breadcrumbs\n */\n menuBreadcrumbProps: {\n // Don't show a name for this breadcrumb, only the Actions menu\n name: \"\",\n forceMenu: true,\n // Don't allow dropping directly on the actions breadcrumb\n disableDrop: true,\n // Is the menu open or not\n open: false\n },\n breadcrumbsRefs: []\n };\n },\n created() {\n window.addEventListener(\"resize\", debounce(() => {\n this.handleWindowResize();\n }, 100));\n subscribe(\"navigation-toggled\", this.delayedResize);\n },\n mounted() {\n this.handleWindowResize();\n },\n updated() {\n this.delayedResize();\n this.$nextTick(() => {\n this.hideCrumbs();\n });\n },\n beforeUnmount() {\n window.removeEventListener(\"resize\", this.handleWindowResize);\n unsubscribe(\"navigation-toggled\", this.delayedResize);\n },\n methods: {\n /**\n * Close the actions menu\n *\n * @param {object} e The event\n */\n closeActions(e) {\n if (this.$refs.actionsBreadcrumb.$el.contains(e.relatedTarget)) {\n return;\n }\n this.menuBreadcrumbProps.open = false;\n },\n /**\n * Call the resize function after a delay\n */\n async delayedResize() {\n await this.$nextTick();\n this.handleWindowResize();\n },\n /**\n * Check the width of the breadcrumb and hide breadcrumbs\n * if we overflow otherwise.\n */\n handleWindowResize() {\n if (!this.$refs.container) {\n return;\n }\n const nrCrumbs = this.breadcrumbsRefs.length;\n const hiddenIndices = [];\n const availableWidth = this.$refs.container.offsetWidth;\n let totalWidth = this.getTotalWidth();\n if (this.$refs.breadcrumb__actions) {\n totalWidth += this.$refs.breadcrumb__actions.offsetWidth;\n }\n let overflow = totalWidth - availableWidth;\n overflow += overflow > 0 ? 64 : 0;\n let i = 0;\n const startIndex = Math.floor(nrCrumbs / 2);\n while (overflow > 0 && i < nrCrumbs - 2) {\n const currentIndex = startIndex + (i % 2 ? i + 1 : i) / 2 * Math.pow(-1, i + nrCrumbs % 2);\n overflow -= this.getWidth(this.breadcrumbsRefs[currentIndex]?.$el, currentIndex === this.breadcrumbsRefs.length - 1);\n hiddenIndices.push(currentIndex);\n i++;\n }\n if (!this.arraysEqual(this.hiddenIndices, hiddenIndices.sort((a, b) => a - b))) {\n this.hiddenIndices = hiddenIndices;\n }\n },\n /**\n * Checks if two arrays are equal.\n * Only works for primitive arrays, but that's enough here.\n *\n * @param {Array} a The first array\n * @param {Array} b The second array\n * @return {boolean} Wether the arrays are equal\n */\n arraysEqual(a, b) {\n if (a.length !== b.length) {\n return false;\n } else if (a === b) {\n return true;\n } else if (a === null || b === null) {\n return false;\n }\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n },\n /**\n * Calculates the total width of all breadcrumbs\n *\n * @return {number} The total width\n */\n getTotalWidth() {\n return this.breadcrumbsRefs.reduce((width, crumb, index) => width + this.getWidth(crumb.$el, index === this.breadcrumbsRefs.length - 1), 0);\n },\n /**\n * Calculates the width of the provided element\n *\n * @param {object} el The element\n * @param {boolean} isLast Is this the last crumb\n * @return {number} The width\n */\n getWidth(el, isLast) {\n if (!el?.classList) {\n return 0;\n }\n const hide = el.classList.contains(`${crumbClass}--hidden`);\n el.style.minWidth = \"auto\";\n if (isLast) {\n el.style.maxWidth = \"210px\";\n }\n el.classList.remove(`${crumbClass}--hidden`);\n const w = el.offsetWidth;\n if (hide) {\n el.classList.add(`${crumbClass}--hidden`);\n }\n el.style.minWidth = \"\";\n el.style.maxWidth = \"\";\n return w;\n },\n /**\n * Prevents the default of a provided event\n *\n * @param {object} e The event\n * @return {boolean}\n */\n preventDefault(e) {\n if (e.preventDefault) {\n e.preventDefault();\n }\n return false;\n },\n /**\n * Handles the drag start.\n * Prevents a breadcrumb from being draggable.\n *\n * @param {object} e The event\n * @return {boolean}\n */\n dragStart(e) {\n return this.preventDefault(e);\n },\n /**\n * Handles when something is dropped on the breadcrumb.\n *\n * @param {object} e The drop event\n * @param {string} path The path of the breadcrumb\n * @param {boolean} disabled Whether dropping is disabled for this breadcrumb\n * @return {boolean}\n */\n dropped(e, path, disabled) {\n if (!disabled) {\n this.$emit(\"dropped\", e, path);\n }\n this.menuBreadcrumbProps.open = false;\n const crumbs = document.querySelectorAll(`.${crumbClass}`);\n for (const crumb of crumbs) {\n crumb.classList.remove(`${crumbClass}--hovered`);\n }\n return this.preventDefault(e);\n },\n /**\n * Handles the drag over event\n *\n * @param {object} e The drag over event\n * @return {boolean}\n */\n dragOver(e) {\n return this.preventDefault(e);\n },\n /**\n * Handles the drag enter event\n *\n * @param {object} e The drag over event\n * @param {boolean} disabled Whether dropping is disabled for this breadcrumb\n */\n dragEnter(e, disabled) {\n if (disabled) {\n return;\n }\n if (e.target.closest) {\n const target = e.target.closest(`.${crumbClass}`);\n if (target.classList && target.classList.contains(crumbClass)) {\n const crumbs = document.querySelectorAll(`.${crumbClass}`);\n for (const crumb of crumbs) {\n crumb.classList.remove(`${crumbClass}--hovered`);\n }\n target.classList.add(`${crumbClass}--hovered`);\n }\n }\n },\n /**\n * Handles the drag leave event\n *\n * @param {object} e The drag leave event\n * @param {boolean} disabled Whether dropping is disabled for this breadcrumb\n */\n dragLeave(e, disabled) {\n if (disabled) {\n return;\n }\n if (e.target.contains(e.relatedTarget)) {\n return;\n }\n if (e.target.closest) {\n const target = e.target.closest(`.${crumbClass}`);\n if (target.contains(e.relatedTarget)) {\n return;\n }\n if (target.classList && target.classList.contains(crumbClass)) {\n target.classList.remove(`${crumbClass}--hovered`);\n }\n }\n },\n /**\n * Check for each crumb if we have to hide it and\n * add it to the array of all crumbs.\n */\n hideCrumbs() {\n this.breadcrumbsRefs.forEach((crumb, i) => {\n if (crumb?.$el?.classList) {\n if (this.hiddenIndices.includes(i)) {\n crumb.$el.classList.add(`${crumbClass}--hidden`);\n } else {\n crumb.$el.classList.remove(`${crumbClass}--hidden`);\n }\n }\n });\n },\n isBreadcrumb(vnode) {\n return vnode?.type?.name === \"NcBreadcrumb\";\n }\n },\n /**\n * The render function to display the component\n *\n * @return {object|undefined} The created VNode\n */\n render() {\n let breadcrumbs = [];\n this.$slots.default?.().forEach((vnode) => {\n if (this.isBreadcrumb(vnode)) {\n breadcrumbs.push(vnode);\n return;\n }\n if (vnode?.type === Fragment) {\n vnode?.children?.forEach?.((child) => {\n if (this.isBreadcrumb(child)) {\n breadcrumbs.push(child);\n }\n });\n }\n });\n if (breadcrumbs.length === 0) {\n return;\n }\n breadcrumbs[0] = cloneVNode(breadcrumbs[0], {\n icon: this.rootIcon,\n ref: \"breadcrumbs\"\n });\n const breadcrumbsRefs = [];\n breadcrumbs = breadcrumbs.map((crumb, index) => cloneVNode(crumb, {\n ref: (crumb2) => {\n breadcrumbsRefs[index] = crumb2;\n }\n }));\n const crumbs = [...breadcrumbs];\n if (this.hiddenIndices.length) {\n crumbs.splice(\n Math.round(breadcrumbs.length / 2),\n 0,\n // The Actions menu\n // Use a breadcrumb component for the hidden breadcrumbs\n h(NcBreadcrumb, {\n class: \"dropdown\",\n ...this.menuBreadcrumbProps,\n // Hide the dropdown menu from screen-readers,\n // since the crumbs in the menu are still in the list.\n \"aria-hidden\": true,\n // Add a ref to the Actions menu\n ref: \"actionsBreadcrumb\",\n key: \"actions-breadcrumb-1\",\n // Add handlers so the Actions menu opens on hover\n onDragenter: () => {\n this.menuBreadcrumbProps.open = true;\n },\n onDragleave: this.closeActions,\n // Make sure we keep the same open state\n // as the Actions component\n \"onUpdate:open\": (open) => {\n this.menuBreadcrumbProps.open = open;\n }\n // Add all hidden breadcrumbs as ActionRouter or ActionLink\n }, {\n default: () => this.hiddenIndices.filter((index) => index <= breadcrumbs.length - 1).map((index) => {\n const crumb = breadcrumbs[index];\n const {\n // Get the parameters from the breadcrumb component props\n to,\n href,\n disableDrop,\n name,\n // Props to forward\n ...propsToForward\n } = crumb.props;\n delete propsToForward.ref;\n let element = NcActionButton;\n let path = \"\";\n if (href) {\n element = NcActionLink;\n path = href;\n }\n if (to) {\n element = NcActionRouter;\n path = to;\n }\n const folderIcon = h(IconFolder, {\n size: 20\n });\n return h(element, {\n ...propsToForward,\n class: crumbClass,\n href: href || null,\n to: to || null,\n // Prevent the breadcrumbs from being draggable\n draggable: false,\n // Add the drag and drop handlers\n onDragstart: this.dragStart,\n onDrop: ($event) => this.dropped($event, path, disableDrop),\n onDragover: this.dragOver,\n onDragenter: ($event) => this.dragEnter($event, disableDrop),\n onDragleave: ($event) => this.dragLeave($event, disableDrop)\n }, {\n default: () => name,\n icon: () => folderIcon\n });\n })\n })\n );\n }\n const wrapper = [h(\"nav\", { \"aria-label\": this.ariaLabel }, [h(\"ul\", { class: \"breadcrumb__crumbs\" }, [crumbs])])];\n if (isSlotPopulated(this.$slots.actions?.())) {\n wrapper.push(h(\"div\", { class: \"breadcrumb__actions\", ref: \"breadcrumb__actions\" }, this.$slots.actions?.()));\n }\n this.breadcrumbsRefs = breadcrumbsRefs;\n return h(\"div\", { class: [\"breadcrumb\", { \"breadcrumb--collapsed\": this.hiddenIndices.length === breadcrumbs.length - 2 }], ref: \"container\" }, wrapper);\n }\n};\nconst NcBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__scopeId\", \"data-v-5a4d73af\"]]);\nexport {\n NcBreadcrumbs as N\n};\n//# sourceMappingURL=NcBreadcrumbs-BaTp3Sya.mjs.map\n","import { FileType } from \"@nextcloud/files\";\nimport { generateUrl } from \"@nextcloud/router\";\nimport { ref, watchEffect, toValue } from \"vue\";\nimport PQueue from \"p-queue\";\nconst queue = new PQueue({ concurrency: 5 });\nfunction preloadImage(url) {\n const { resolve, promise } = Promise.withResolvers();\n queue.add(() => {\n const image = new Image();\n image.onerror = () => resolve(false);\n image.onload = () => resolve(true);\n image.src = url;\n return promise;\n });\n return promise;\n}\nfunction getPreviewURL(node, options = {}) {\n options = { size: 32, cropPreview: false, mimeFallback: true, ...options };\n try {\n const previewUrl = node.attributes?.previewUrl || generateUrl(\"/core/preview?fileId={fileid}\", {\n fileid: node.fileid\n });\n let url;\n try {\n url = new URL(previewUrl);\n } catch {\n url = new URL(previewUrl, window.location.origin);\n }\n url.searchParams.set(\"x\", `${options.size}`);\n url.searchParams.set(\"y\", `${options.size}`);\n url.searchParams.set(\"mimeFallback\", `${options.mimeFallback}`);\n url.searchParams.set(\"a\", options.cropPreview === true ? \"0\" : \"1\");\n url.searchParams.set(\"c\", `${node.attributes.etag}`);\n return url;\n } catch {\n return null;\n }\n}\nfunction usePreviewURL(node, options) {\n const previewURL = ref(null);\n const previewLoaded = ref(false);\n watchEffect(() => {\n previewLoaded.value = false;\n previewURL.value = getPreviewURL(toValue(node), toValue(options || {}));\n if (previewURL.value && toValue(node).type === FileType.File) {\n preloadImage(previewURL.value.href).then((success) => {\n previewLoaded.value = success;\n });\n }\n });\n return {\n previewURL,\n previewLoaded\n };\n}\nexport {\n getPreviewURL as g,\n usePreviewURL as u\n};\n//# sourceMappingURL=preview.mjs.map\n","const _export_sfc = (sfc, props) => {\n const target = sfc.__vccOpts || sfc;\n for (const [key, val] of props) {\n target[key] = val;\n }\n return target;\n};\nexport {\n _export_sfc as _\n};\n//# sourceMappingURL=_plugin-vue_export-helper.mjs.map\n","import { openBlock, createElementBlock, mergeProps, createElementVNode, toDisplayString, createCommentVNode, defineComponent, ref, computed, toRef, normalizeClass, normalizeStyle, unref, Fragment, createBlock, createVNode, toHandlers, withModifiers, onMounted, toValue, useModel, onUnmounted, withCtx, createTextVNode, renderList, mergeModels, nextTick, useTemplateRef, createSlots, shallowRef, watch } from \"vue\";\nimport { emit } from \"@nextcloud/event-bus\";\nimport NcDialog from \"@nextcloud/vue/components/NcDialog\";\nimport NcEmptyContent from \"@nextcloud/vue/components/NcEmptyContent\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper.mjs\";\nimport { FileType, Permission, formatFileSize, sortNodes, validateFilename, InvalidFilenameError, InvalidFilenameErrorReason } from \"@nextcloud/files\";\nimport NcButton from \"@nextcloud/vue/components/NcButton\";\nimport NcCheckboxRadioSwitch from \"@nextcloud/vue/components/NcCheckboxRadioSwitch\";\nimport { extname, join } from \"@nextcloud/paths\";\nimport NcDateTime from \"@nextcloud/vue/components/NcDateTime\";\nimport { mdiKey, mdiTagOutline, mdiLink, mdiAccountPlus, mdiAccountGroupOutline, mdiNetworkOutline, mdiFolder, mdiClock, mdiStar } from \"@mdi/js\";\nimport { ShareType } from \"@nextcloud/sharing\";\nimport NcIconSvgWrapper from \"@nextcloud/vue/components/NcIconSvgWrapper\";\nimport { u as usePreviewURL } from \"./preview.mjs\";\nimport { t, l as logger, s as showError } from \"./index.mjs\";\nimport axios from \"@nextcloud/axios\";\nimport { loadState } from \"@nextcloud/initial-state\";\nimport { generateUrl } from \"@nextcloud/router\";\nimport { isPublicShare } from \"@nextcloud/sharing/public\";\nimport NcActionInput from \"@nextcloud/vue/components/NcActionInput\";\nimport NcActions from \"@nextcloud/vue/components/NcActions\";\nimport NcBreadcrumb from \"@nextcloud/vue/components/NcBreadcrumb\";\nimport NcBreadcrumbs from \"@nextcloud/vue/components/NcBreadcrumbs\";\nimport { getCurrentUser } from \"@nextcloud/auth\";\nimport NcSelect from \"@nextcloud/vue/components/NcSelect\";\nimport NcTextField from \"@nextcloud/vue/components/NcTextField\";\nimport { getRecentSearch, resultToNode, defaultRootPath, getDefaultPropfind, getClient, getFavoriteNodes } from \"@nextcloud/files/dav\";\nconst _sfc_main$e = {\n name: \"FileIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$c = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$b = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$a = { d: \"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z\" };\nconst _hoisted_4$a = { key: 0 };\nfunction _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon file-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$a, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$a, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$b))\n ], 16, _hoisted_1$c);\n}\nconst IconFile = /* @__PURE__ */ _export_sfc(_sfc_main$e, [[\"render\", _sfc_render$7]]);\nconst _sfc_main$d = {\n name: \"MenuDownIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$b = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$a = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$9 = { d: \"M7,10L12,15L17,10H7Z\" };\nconst _hoisted_4$9 = { key: 0 };\nfunction _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon menu-down-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$9, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$9, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$a))\n ], 16, _hoisted_1$b);\n}\nconst IconSortDescending = /* @__PURE__ */ _export_sfc(_sfc_main$d, [[\"render\", _sfc_render$6]]);\nconst _sfc_main$c = {\n name: \"MenuUpIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$a = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$9 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$8 = { d: \"M7,15L12,10L17,15H7Z\" };\nconst _hoisted_4$8 = { key: 0 };\nfunction _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon menu-up-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$8, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$8, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$9))\n ], 16, _hoisted_1$a);\n}\nconst IconSortAscending = /* @__PURE__ */ _export_sfc(_sfc_main$c, [[\"render\", _sfc_render$5]]);\nconst _sfc_main$b = {\n name: \"FolderIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$9 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$8 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$7 = { d: \"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z\" };\nconst _hoisted_4$7 = { key: 0 };\nfunction _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon folder-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$7, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$7, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$8))\n ], 16, _hoisted_1$9);\n}\nconst IconFolder = /* @__PURE__ */ _export_sfc(_sfc_main$b, [[\"render\", _sfc_render$4]]);\nconst fileListIconStyles = {\n \"file-picker__file-icon\": \"_file-picker__file-icon_1aykw_9\",\n \"file-picker__file-icon--primary\": \"_file-picker__file-icon--primary_1aykw_22\",\n \"file-picker__file-icon-overlay\": \"_file-picker__file-icon-overlay_1aykw_26\"\n};\nconst _sfc_main$a = /* @__PURE__ */ defineComponent({\n __name: \"FilePreview\",\n props: {\n node: {},\n cropImagePreviews: { type: Boolean }\n },\n setup(__props) {\n const props = __props;\n const fileListIconStyles$1 = ref(fileListIconStyles);\n const {\n previewURL,\n previewLoaded\n } = usePreviewURL(toRef(props, \"node\"), computed(() => ({ cropPreview: props.cropImagePreviews })));\n const isFile = computed(() => props.node.type === FileType.File);\n const folderDecorationIcon = computed(() => {\n if (props.node.type !== FileType.Folder) {\n return null;\n }\n if (props.node.attributes?.[\"is-encrypted\"] === 1) {\n return mdiKey;\n }\n if (props.node.attributes?.[\"is-tag\"]) {\n return mdiTagOutline;\n }\n const shareTypes = Object.values(props.node.attributes?.[\"share-types\"] || {}).flat();\n if (shareTypes.some((type) => type === ShareType.Link || type === ShareType.Email)) {\n return mdiLink;\n }\n if (shareTypes.length > 0) {\n return mdiAccountPlus;\n }\n switch (props.node.attributes?.[\"mount-type\"]) {\n case \"external\":\n case \"external-session\":\n return mdiNetworkOutline;\n case \"group\":\n return mdiAccountGroupOutline;\n case \"shared\":\n return mdiAccountPlus;\n }\n return null;\n });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n style: normalizeStyle(unref(previewLoaded) ? { backgroundImage: `url(${unref(previewURL)})` } : void 0),\n class: normalizeClass(fileListIconStyles$1.value[\"file-picker__file-icon\"])\n }, [\n !unref(previewLoaded) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n isFile.value ? (openBlock(), createBlock(IconFile, {\n key: 0,\n size: 32\n })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [\n folderDecorationIcon.value ? (openBlock(), createBlock(unref(NcIconSvgWrapper), {\n key: 0,\n class: normalizeClass(fileListIconStyles$1.value[\"file-picker__file-icon-overlay\"]),\n inline: \"\",\n path: folderDecorationIcon.value,\n size: 16\n }, null, 8, [\"class\", \"path\"])) : createCommentVNode(\"\", true),\n createVNode(IconFolder, {\n class: normalizeClass(fileListIconStyles$1.value[\"file-picker__file-icon--primary\"]),\n size: 32\n }, null, 8, [\"class\"])\n ], 64))\n ], 64)) : createCommentVNode(\"\", true)\n ], 6);\n };\n }\n});\nconst _hoisted_1$8 = [\"tabindex\", \"aria-selected\", \"data-filename\"];\nconst _hoisted_2$7 = { class: \"row-name\" };\nconst _hoisted_3$6 = {\n class: \"file-picker__name-container\",\n \"data-testid\": \"row-name\"\n};\nconst _hoisted_4$6 = [\"title\", \"textContent\"];\nconst _hoisted_5$1 = [\"textContent\"];\nconst _hoisted_6$1 = { class: \"row-size\" };\nconst _hoisted_7$1 = { class: \"row-modified\" };\nconst _sfc_main$9 = /* @__PURE__ */ defineComponent({\n __name: \"FileListRow\",\n props: {\n allowPickDirectory: { type: Boolean },\n selected: { type: Boolean },\n showCheckbox: { type: Boolean },\n canPick: { type: Boolean },\n node: {},\n cropImagePreviews: { type: Boolean }\n },\n emits: [\"update:selected\", \"enterDirectory\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit2 = __emit;\n const timestamp = computed(() => props.node.mtime ?? 0);\n const fileExtension = computed(() => extname(props.node.displayname));\n const displayName = computed(() => props.node.displayname.slice(0, fileExtension.value ? -fileExtension.value.length : void 0));\n const isDirectory = computed(() => props.node.type === FileType.Folder);\n const isPickable = computed(() => props.canPick && (props.allowPickDirectory || !isDirectory.value));\n const isNavigatable = computed(() => (props.node.permissions & Permission.READ) === Permission.READ);\n function toggleSelected() {\n if (!isPickable.value) {\n return;\n }\n emit2(\"update:selected\", !props.selected);\n }\n function handleClick() {\n if (isDirectory.value) {\n if (isNavigatable.value) {\n emit2(\"enterDirectory\", props.node);\n }\n } else {\n toggleSelected();\n }\n }\n function handleKeyDown(event) {\n if (event.key === \"Enter\") {\n handleClick();\n }\n }\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"tr\", mergeProps({\n tabindex: __props.showCheckbox && !isDirectory.value ? void 0 : 0,\n \"aria-selected\": !isPickable.value ? void 0 : __props.selected,\n class: [\"file-picker__row\", [\n {\n \"file-picker__row--selected\": __props.selected && !__props.showCheckbox,\n \"file-picker__row--not-navigatable\": isDirectory.value && !isNavigatable.value,\n \"file-picker__row--not-pickable\": !isPickable.value\n }\n ]],\n \"data-filename\": __props.node.basename,\n \"data-testid\": \"file-list-row\"\n }, toHandlers({\n click: handleClick,\n /* same as tabindex -> if we hide the checkbox or this is a directory we need keyboard access to enter the directory or select the node */\n ...!__props.showCheckbox || isDirectory.value ? { keydown: handleKeyDown } : {}\n }, true)), [\n __props.showCheckbox ? (openBlock(), createElementBlock(\"td\", {\n key: 0,\n class: \"row-checkbox\",\n onClick: withModifiers(() => {\n }, [\"stop\"])\n }, [\n createVNode(unref(NcCheckboxRadioSwitch), {\n \"aria-label\": unref(t)(\"Select the row for {nodename}\", { nodename: displayName.value }),\n disabled: !isPickable.value,\n \"data-testid\": \"row-checkbox\",\n modelValue: __props.selected,\n \"onUpdate:modelValue\": toggleSelected\n }, null, 8, [\"aria-label\", \"disabled\", \"modelValue\"])\n ])) : createCommentVNode(\"\", true),\n createElementVNode(\"td\", _hoisted_2$7, [\n createElementVNode(\"div\", _hoisted_3$6, [\n createVNode(_sfc_main$a, {\n node: __props.node,\n cropImagePreviews: __props.cropImagePreviews\n }, null, 8, [\"node\", \"cropImagePreviews\"]),\n createElementVNode(\"div\", {\n class: \"file-picker__file-name\",\n title: displayName.value,\n textContent: toDisplayString(displayName.value)\n }, null, 8, _hoisted_4$6),\n createElementVNode(\"div\", {\n class: \"file-picker__file-extension\",\n textContent: toDisplayString(fileExtension.value)\n }, null, 8, _hoisted_5$1)\n ])\n ]),\n createElementVNode(\"td\", _hoisted_6$1, toDisplayString(unref(formatFileSize)(__props.node.size || 0)), 1),\n createElementVNode(\"td\", _hoisted_7$1, [\n createVNode(unref(NcDateTime), {\n timestamp: timestamp.value,\n ignoreSeconds: \"\"\n }, null, 8, [\"timestamp\"])\n ])\n ], 16, _hoisted_1$8);\n };\n }\n});\nconst FileListRow = /* @__PURE__ */ _export_sfc(_sfc_main$9, [[\"__scopeId\", \"data-v-7857e8bd\"]]);\nconst _hoisted_1$7 = {\n \"aria-hidden\": \"true\",\n class: \"file-picker__row loading-row\"\n};\nconst _hoisted_2$6 = {\n key: 0,\n class: \"row-checkbox\"\n};\nconst _hoisted_3$5 = { class: \"row-name\" };\nconst _hoisted_4$5 = { class: \"row-wrapper\" };\nconst _sfc_main$8 = /* @__PURE__ */ defineComponent({\n __name: \"LoadingTableRow\",\n props: {\n showCheckbox: { type: Boolean }\n },\n setup(__props) {\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"tr\", _hoisted_1$7, [\n __props.showCheckbox ? (openBlock(), createElementBlock(\"td\", _hoisted_2$6, [..._cache[0] || (_cache[0] = [\n createElementVNode(\"span\", null, null, -1)\n ])])) : createCommentVNode(\"\", true),\n createElementVNode(\"td\", _hoisted_3$5, [\n createElementVNode(\"div\", _hoisted_4$5, [\n createElementVNode(\"span\", {\n class: normalizeClass(unref(fileListIconStyles)[\"file-picker__file-icon\"])\n }, null, 2),\n _cache[1] || (_cache[1] = createElementVNode(\"span\", null, null, -1))\n ])\n ]),\n _cache[2] || (_cache[2] = createElementVNode(\"td\", { class: \"row-size\" }, [\n createElementVNode(\"span\")\n ], -1)),\n _cache[3] || (_cache[3] = createElementVNode(\"td\", { class: \"row-modified\" }, [\n createElementVNode(\"span\")\n ], -1))\n ]);\n };\n }\n});\nconst LoadingTableRow = /* @__PURE__ */ _export_sfc(_sfc_main$8, [[\"__scopeId\", \"data-v-1f96131b\"]]);\nfunction useFilesSettings() {\n const filesUserState = loadState(\"files\", \"config\", null);\n const showHiddenFiles = ref(filesUserState?.show_hidden ?? true);\n const sortFavoritesFirst = ref(filesUserState?.sort_favorites_first ?? true);\n const cropImagePreviews = ref(filesUserState?.crop_image_previews ?? true);\n onMounted(async () => {\n if (!isPublicShare()) {\n try {\n const { data } = await axios.get(generateUrl(\"/apps/files/api/v1/configs\"));\n showHiddenFiles.value = data?.data?.show_hidden ?? false;\n sortFavoritesFirst.value = data?.data?.sort_favorites_first ?? true;\n cropImagePreviews.value = data?.data?.crop_image_previews ?? true;\n } catch (error) {\n logger.error(\"Could not load files settings\", { error });\n showError(t(\"Could not load files settings\"));\n }\n } else {\n logger.debug(\"Skip loading files settings - currently on public share\");\n }\n });\n return {\n showHiddenFiles,\n sortFavoritesFirst,\n cropImagePreviews\n };\n}\nfunction useFilesViews(currentView) {\n const convertOrder = (order2) => order2 === \"asc\" ? \"ascending\" : order2 === \"desc\" ? \"descending\" : \"none\";\n const filesViewsState = loadState(\"files\", \"viewConfigs\", null);\n const filesViewConfig = ref({\n sortBy: filesViewsState?.files?.sorting_mode ?? \"basename\",\n order: convertOrder(filesViewsState?.files?.sorting_direction ?? \"asc\")\n });\n const recentViewConfig = ref({\n sortBy: filesViewsState?.recent?.sorting_mode ?? \"basename\",\n order: convertOrder(filesViewsState?.recent?.sorting_direction ?? \"asc\")\n });\n const favoritesViewConfig = ref({\n sortBy: filesViewsState?.favorites?.sorting_mode ?? \"basename\",\n order: convertOrder(filesViewsState?.favorites?.sorting_direction ?? \"asc\")\n });\n onMounted(async () => {\n if (!isPublicShare()) {\n try {\n const { data } = await axios.get(generateUrl(\"/apps/files/api/v1/views\"));\n filesViewConfig.value = {\n sortBy: data?.data?.files?.sorting_mode ?? \"basename\",\n order: convertOrder(data?.data?.files?.sorting_direction)\n };\n favoritesViewConfig.value = {\n sortBy: data?.data?.favorites?.sorting_mode ?? \"basename\",\n order: convertOrder(data?.data?.favorites?.sorting_direction)\n };\n recentViewConfig.value = {\n sortBy: data?.data?.recent?.sorting_mode ?? \"basename\",\n order: convertOrder(data?.data?.recent?.sorting_direction)\n };\n } catch (error) {\n logger.error(\"Could not load files views\", { error });\n showError(t(\"Could not load files views\"));\n }\n } else {\n logger.debug(\"Skip loading files views - currently on public share\");\n }\n });\n const currentConfig = computed(() => toValue(currentView || \"files\") === \"files\" ? filesViewConfig.value : toValue(currentView) === \"recent\" ? recentViewConfig.value : favoritesViewConfig.value);\n const sortBy = computed(() => currentConfig.value.sortBy);\n const order = computed(() => currentConfig.value.order);\n return {\n filesViewConfig,\n favoritesViewConfig,\n recentViewConfig,\n currentConfig,\n sortBy,\n order\n };\n}\nconst _hoisted_1$6 = {\n key: 0,\n class: \"row-checkbox\"\n};\nconst _hoisted_2$5 = { class: \"hidden-visually\" };\nconst _hoisted_3$4 = [\"aria-sort\"];\nconst _hoisted_4$4 = { class: \"header-wrapper\" };\nconst _hoisted_5 = {\n key: 2,\n style: { \"width\": \"44px\" }\n};\nconst _hoisted_6 = [\"aria-sort\"];\nconst _hoisted_7 = {\n key: 2,\n style: { \"width\": \"44px\" }\n};\nconst _hoisted_8 = [\"aria-sort\"];\nconst _hoisted_9 = {\n key: 2,\n style: { \"width\": \"44px\" }\n};\nconst _sfc_main$7 = /* @__PURE__ */ defineComponent({\n __name: \"FileList\",\n props: /* @__PURE__ */ mergeModels({\n currentView: {},\n multiselect: { type: Boolean },\n allowPickDirectory: { type: Boolean },\n loading: { type: Boolean },\n files: {},\n canPick: { type: Function }\n }, {\n \"path\": { required: true },\n \"pathModifiers\": {},\n \"selectedFiles\": { required: true },\n \"selectedFilesModifiers\": {}\n }),\n emits: [\"update:path\", \"update:selectedFiles\"],\n setup(__props) {\n const path = useModel(__props, \"path\");\n const selectedFiles = useModel(__props, \"selectedFiles\");\n const props = __props;\n const customSortingConfig = ref();\n const { currentConfig: filesAppSorting } = useFilesViews(props.currentView);\n const sortingConfig = computed(() => customSortingConfig.value ?? filesAppSorting.value);\n const sortByName = computed(() => sortingConfig.value.sortBy === \"basename\" ? sortingConfig.value.order === \"none\" ? void 0 : sortingConfig.value.order : void 0);\n const sortBySize = computed(() => sortingConfig.value.sortBy === \"size\" ? sortingConfig.value.order === \"none\" ? void 0 : sortingConfig.value.order : void 0);\n const sortByModified = computed(() => sortingConfig.value.sortBy === \"mtime\" ? sortingConfig.value.order === \"none\" ? void 0 : sortingConfig.value.order : void 0);\n function toggleSorting(sortBy) {\n if (sortingConfig.value.sortBy === sortBy) {\n if (sortingConfig.value.order === \"ascending\") {\n customSortingConfig.value = { sortBy: sortingConfig.value.sortBy, order: \"descending\" };\n } else {\n customSortingConfig.value = { sortBy: sortingConfig.value.sortBy, order: \"ascending\" };\n }\n } else {\n customSortingConfig.value = { sortBy, order: \"ascending\" };\n }\n }\n const { sortFavoritesFirst, cropImagePreviews } = useFilesSettings();\n const sortedFiles = computed(() => {\n return sortNodes(props.files, {\n sortFoldersFirst: true,\n sortFavoritesFirst: sortFavoritesFirst.value,\n sortingOrder: sortingConfig.value.order === \"descending\" ? \"desc\" : \"asc\",\n sortingMode: sortingConfig.value.sortBy\n });\n });\n const selectableFiles = computed(() => props.files.filter((file) => props.allowPickDirectory || file.type !== FileType.Folder));\n const allSelected = computed(() => !props.loading && selectedFiles.value.length > 0 && selectedFiles.value.length >= selectableFiles.value.length);\n function onSelectAll() {\n if (selectedFiles.value.length < selectableFiles.value.length) {\n selectedFiles.value = [...selectableFiles.value];\n } else {\n selectedFiles.value = [];\n }\n }\n function onNodeSelected(file) {\n if (selectedFiles.value.includes(file)) {\n selectedFiles.value = selectedFiles.value.filter((f) => f.path !== file.path);\n } else {\n if (props.multiselect) {\n selectedFiles.value = [...selectedFiles.value, file];\n } else {\n selectedFiles.value = [file];\n }\n }\n }\n function onChangeDirectory(dir) {\n path.value = dir.path;\n }\n const skeletonNumber = ref(4);\n const fileContainer = ref();\n {\n const resize = () => nextTick(() => {\n const nodes = fileContainer.value?.parentElement?.children || [];\n let height = fileContainer.value?.parentElement?.clientHeight || 450;\n for (let index = 0; index < nodes.length; index++) {\n if (!fileContainer.value?.isSameNode(nodes[index])) {\n height -= nodes[index].clientHeight;\n }\n }\n skeletonNumber.value = Math.max(1, Math.floor((height - 50) / 50));\n });\n onMounted(() => {\n window.addEventListener(\"resize\", resize);\n resize();\n });\n onUnmounted(() => {\n window.removeEventListener(\"resize\", resize);\n });\n }\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n ref_key: \"fileContainer\",\n ref: fileContainer,\n class: \"file-picker__files\"\n }, [\n createElementVNode(\"table\", null, [\n createElementVNode(\"thead\", null, [\n createElementVNode(\"tr\", null, [\n __props.multiselect ? (openBlock(), createElementBlock(\"th\", _hoisted_1$6, [\n createElementVNode(\"span\", _hoisted_2$5, toDisplayString(unref(t)(\"Select entry\")), 1),\n __props.multiselect ? (openBlock(), createBlock(unref(NcCheckboxRadioSwitch), {\n key: 0,\n \"aria-label\": unref(t)(\"Select all entries\"),\n \"data-testid\": \"select-all-checkbox\",\n modelValue: allSelected.value,\n \"onUpdate:modelValue\": onSelectAll\n }, null, 8, [\"aria-label\", \"modelValue\"])) : createCommentVNode(\"\", true)\n ])) : createCommentVNode(\"\", true),\n createElementVNode(\"th\", {\n \"aria-sort\": sortByName.value,\n class: \"row-name\"\n }, [\n createElementVNode(\"div\", _hoisted_4$4, [\n _cache[3] || (_cache[3] = createElementVNode(\"span\", { class: \"file-picker__header-preview\" }, null, -1)),\n createVNode(unref(NcButton), {\n \"data-test\": \"file-picker_sort-name\",\n variant: \"tertiary\",\n wide: \"\",\n onClick: _cache[0] || (_cache[0] = ($event) => toggleSorting(\"basename\"))\n }, {\n icon: withCtx(() => [\n sortByName.value === \"ascending\" ? (openBlock(), createBlock(IconSortAscending, {\n key: 0,\n size: 20\n })) : sortByName.value === \"descending\" ? (openBlock(), createBlock(IconSortDescending, {\n key: 1,\n size: 20\n })) : (openBlock(), createElementBlock(\"span\", _hoisted_5))\n ]),\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(unref(t)(\"Name\")), 1)\n ]),\n _: 1\n })\n ])\n ], 8, _hoisted_3$4),\n createElementVNode(\"th\", {\n \"aria-sort\": sortBySize.value,\n class: \"row-size\"\n }, [\n createVNode(unref(NcButton), {\n variant: \"tertiary\",\n wide: \"\",\n onClick: _cache[1] || (_cache[1] = ($event) => toggleSorting(\"size\"))\n }, {\n icon: withCtx(() => [\n sortBySize.value === \"ascending\" ? (openBlock(), createBlock(IconSortAscending, {\n key: 0,\n size: 20\n })) : sortBySize.value === \"descending\" ? (openBlock(), createBlock(IconSortDescending, {\n key: 1,\n size: 20\n })) : (openBlock(), createElementBlock(\"span\", _hoisted_7))\n ]),\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(unref(t)(\"Size\")), 1)\n ]),\n _: 1\n })\n ], 8, _hoisted_6),\n createElementVNode(\"th\", {\n \"aria-sort\": sortByModified.value,\n class: \"row-modified\"\n }, [\n createVNode(unref(NcButton), {\n variant: \"tertiary\",\n wide: \"\",\n onClick: _cache[2] || (_cache[2] = ($event) => toggleSorting(\"mtime\"))\n }, {\n icon: withCtx(() => [\n sortByModified.value === \"ascending\" ? (openBlock(), createBlock(IconSortAscending, {\n key: 0,\n size: 20\n })) : sortByModified.value === \"descending\" ? (openBlock(), createBlock(IconSortDescending, {\n key: 1,\n size: 20\n })) : (openBlock(), createElementBlock(\"span\", _hoisted_9))\n ]),\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(unref(t)(\"Modified\")), 1)\n ]),\n _: 1\n })\n ], 8, _hoisted_8)\n ])\n ]),\n createElementVNode(\"tbody\", null, [\n __props.loading ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(skeletonNumber.value, (index) => {\n return openBlock(), createBlock(LoadingTableRow, {\n key: index,\n showCheckbox: __props.multiselect\n }, null, 8, [\"showCheckbox\"]);\n }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(sortedFiles.value, (file) => {\n return openBlock(), createBlock(FileListRow, {\n key: file.fileid || file.path,\n allowPickDirectory: __props.allowPickDirectory,\n showCheckbox: __props.multiselect,\n canPick: (__props.multiselect || selectedFiles.value.length === 0 || selectedFiles.value.includes(file)) && (__props.canPick === void 0 || __props.canPick(file)),\n selected: selectedFiles.value.includes(file),\n node: file,\n cropImagePreviews: unref(cropImagePreviews),\n \"onUpdate:selected\": ($event) => onNodeSelected(file),\n onEnterDirectory: onChangeDirectory\n }, null, 8, [\"allowPickDirectory\", \"showCheckbox\", \"canPick\", \"selected\", \"node\", \"cropImagePreviews\", \"onUpdate:selected\"]);\n }), 128))\n ])\n ])\n ], 512);\n };\n }\n});\nconst FileList = /* @__PURE__ */ _export_sfc(_sfc_main$7, [[\"__scopeId\", \"data-v-412efd5c\"]]);\nconst _sfc_main$6 = {\n name: \"HomeIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$5 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$4 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$3 = { d: \"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z\" };\nconst _hoisted_4$3 = { key: 0 };\nfunction _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon home-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$3, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$3, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$4))\n ], 16, _hoisted_1$5);\n}\nconst IconHome = /* @__PURE__ */ _export_sfc(_sfc_main$6, [[\"render\", _sfc_render$3]]);\nconst _sfc_main$5 = {\n name: \"PlusIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$4 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$3 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$2 = { d: \"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z\" };\nconst _hoisted_4$2 = { key: 0 };\nfunction _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon plus-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$2, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$2, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$3))\n ], 16, _hoisted_1$4);\n}\nconst IconPlus = /* @__PURE__ */ _export_sfc(_sfc_main$5, [[\"render\", _sfc_render$2]]);\nconst _sfc_main$4 = /* @__PURE__ */ defineComponent({\n __name: \"FilePickerBreadcrumbs\",\n props: /* @__PURE__ */ mergeModels({\n showMenu: { type: Boolean }\n }, {\n \"path\": { required: true },\n \"pathModifiers\": {}\n }),\n emits: /* @__PURE__ */ mergeModels([\"createNode\"], [\"update:path\"]),\n setup(__props, { emit: __emit }) {\n const path = useModel(__props, \"path\");\n const emit2 = __emit;\n const actionsOpen = ref(false);\n const newNodeName = ref(\"\");\n const nameInput = useTemplateRef(\"nameInput\");\n function validateInput() {\n const name = newNodeName.value.trim();\n const input = nameInput.value?.$el?.querySelector(\"input\");\n let validity = \"\";\n try {\n validateFilename(name);\n } catch (error) {\n if (!(error instanceof InvalidFilenameError)) {\n throw error;\n }\n switch (error.reason) {\n case InvalidFilenameErrorReason.Character:\n validity = t('\"{char}\" is not allowed inside a folder name.', { char: error.segment });\n break;\n case InvalidFilenameErrorReason.ReservedName:\n validity = t('\"{segment}\" is a reserved name and not allowed for folder names.', { segment: error.segment });\n break;\n case InvalidFilenameErrorReason.Extension:\n validity = t('Folder names must not end with \"{extension}\".', { extension: error.segment });\n break;\n default:\n validity = t(\"Invalid folder name.\");\n }\n }\n if (input) {\n input.setCustomValidity(validity);\n }\n return validity === \"\";\n }\n function onSubmit() {\n const name = newNodeName.value.trim();\n if (validateInput()) {\n actionsOpen.value = false;\n emit2(\"createNode\", name);\n newNodeName.value = \"\";\n }\n }\n const pathElements = computed(() => path.value.split(\"/\").filter((v) => v !== \"\").map((v, i, elements) => ({\n name: v,\n path: \"/\" + elements.slice(0, i + 1).join(\"/\")\n })));\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(NcBreadcrumbs), { class: \"file-picker__breadcrumbs\" }, createSlots({\n default: withCtx(() => [\n createVNode(unref(NcBreadcrumb), {\n name: unref(t)(\"All files\"),\n title: unref(t)(\"Home\"),\n onClick: _cache[0] || (_cache[0] = ($event) => path.value = \"/\")\n }, {\n icon: withCtx(() => [\n createVNode(IconHome, { size: 20 })\n ]),\n _: 1\n }, 8, [\"name\", \"title\"]),\n (openBlock(true), createElementBlock(Fragment, null, renderList(pathElements.value, (dir) => {\n return openBlock(), createBlock(unref(NcBreadcrumb), {\n key: dir.path,\n name: dir.name,\n title: dir.path,\n onClick: ($event) => path.value = dir.path\n }, null, 8, [\"name\", \"title\", \"onClick\"]);\n }), 128))\n ]),\n _: 2\n }, [\n __props.showMenu ? {\n name: \"actions\",\n fn: withCtx(() => [\n createVNode(unref(NcActions), {\n open: actionsOpen.value,\n \"onUpdate:open\": _cache[2] || (_cache[2] = ($event) => actionsOpen.value = $event),\n \"aria-label\": unref(t)(\"Create directory\"),\n forceMenu: true,\n forceName: true,\n menuName: unref(t)(\"New\"),\n variant: \"secondary\",\n onClose: _cache[3] || (_cache[3] = ($event) => newNodeName.value = \"\")\n }, {\n icon: withCtx(() => [\n createVNode(IconPlus, { size: 20 })\n ]),\n default: withCtx(() => [\n createVNode(unref(NcActionInput), {\n ref_key: \"nameInput\",\n ref: nameInput,\n modelValue: newNodeName.value,\n \"onUpdate:modelValue\": [\n _cache[1] || (_cache[1] = ($event) => newNodeName.value = $event),\n validateInput\n ],\n label: unref(t)(\"New folder\"),\n placeholder: unref(t)(\"New folder name\"),\n onSubmit\n }, {\n icon: withCtx(() => [\n createVNode(IconFolder, { size: 20 })\n ]),\n _: 1\n }, 8, [\"modelValue\", \"label\", \"placeholder\"])\n ]),\n _: 1\n }, 8, [\"open\", \"aria-label\", \"menuName\"])\n ]),\n key: \"0\"\n } : void 0\n ]), 1024);\n };\n }\n});\nconst FilePickerBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$4, [[\"__scopeId\", \"data-v-b448b141\"]]);\nconst _sfc_main$3 = {\n name: \"CloseIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$3 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$2 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$1 = { d: \"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z\" };\nconst _hoisted_4$1 = { key: 0 };\nfunction _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon close-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$1, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$1, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$2))\n ], 16, _hoisted_1$3);\n}\nconst IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$3, [[\"render\", _sfc_render$1]]);\nconst _sfc_main$2 = {\n name: \"MagnifyIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$2 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$1 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3 = { d: \"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z\" };\nconst _hoisted_4 = { key: 0 };\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon magnify-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$1))\n ], 16, _hoisted_1$2);\n}\nconst IconMagnify = /* @__PURE__ */ _export_sfc(_sfc_main$2, [[\"render\", _sfc_render]]);\nfunction useViews(isAnonymous) {\n const allViews = [\n {\n id: \"files\",\n label: t(\"All files\"),\n icon: mdiFolder\n },\n {\n id: \"recent\",\n label: t(\"Recent\"),\n icon: mdiClock\n },\n {\n id: \"favorites\",\n label: t(\"Favorites\"),\n icon: mdiStar\n }\n ];\n const availableViews = isAnonymous.value ? allViews.filter(({ id }) => id === \"files\") : allViews;\n return {\n allViews,\n availableViews\n };\n}\nconst _hoisted_1$1 = {\n key: 0,\n class: \"file-picker__side\"\n};\nconst _sfc_main$1 = /* @__PURE__ */ defineComponent({\n __name: \"FilePickerNavigation\",\n props: {\n currentView: {},\n filterString: {},\n isCollapsed: { type: Boolean },\n disabledNavigation: { type: Boolean }\n },\n emits: [\"update:currentView\", \"update:filterString\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit2 = __emit;\n const { availableViews } = useViews(ref(getCurrentUser() === null));\n const currentViewObject = computed(() => availableViews.filter((v) => v.id === props.currentView)[0] ?? availableViews[0]);\n const updateFilterValue = (value) => emit2(\"update:filterString\", value.toString());\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(Fragment, null, [\n createVNode(unref(NcTextField), {\n class: \"file-picker__filter-input\",\n label: unref(t)(\"Filter file list\"),\n showTrailingButton: !!__props.filterString,\n modelValue: __props.filterString,\n \"onUpdate:modelValue\": updateFilterValue,\n onTrailingButtonClick: _cache[0] || (_cache[0] = ($event) => updateFilterValue(\"\"))\n }, {\n \"trailing-button-icon\": withCtx(() => [\n createVNode(IconClose, { size: 16 })\n ]),\n default: withCtx(() => [\n createVNode(IconMagnify, { size: 16 })\n ]),\n _: 1\n }, 8, [\"label\", \"showTrailingButton\", \"modelValue\"]),\n unref(availableViews).length > 1 && !__props.disabledNavigation ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n !__props.isCollapsed ? (openBlock(), createElementBlock(\"ul\", _hoisted_1$1, [\n (openBlock(true), createElementBlock(Fragment, null, renderList(unref(availableViews), (view) => {\n return openBlock(), createElementBlock(\"li\", {\n key: view.id\n }, [\n createVNode(unref(NcButton), {\n variant: __props.currentView === view.id ? \"primary\" : \"tertiary\",\n wide: true,\n onClick: ($event) => _ctx.$emit(\"update:currentView\", view.id)\n }, {\n icon: withCtx(() => [\n createVNode(unref(NcIconSvgWrapper), {\n path: view.icon,\n size: 20\n }, null, 8, [\"path\"])\n ]),\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(view.label), 1)\n ]),\n _: 2\n }, 1032, [\"variant\", \"onClick\"])\n ]);\n }), 128))\n ])) : (openBlock(), createBlock(unref(NcSelect), {\n key: 1,\n \"aria-label\": unref(t)(\"Current view selector\"),\n clearable: false,\n searchable: false,\n options: unref(availableViews),\n modelValue: currentViewObject.value,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => emit2(\"update:currentView\", $event.id))\n }, null, 8, [\"aria-label\", \"options\", \"modelValue\"]))\n ], 64)) : createCommentVNode(\"\", true)\n ], 64);\n };\n }\n});\nconst FilePickerNavigation = /* @__PURE__ */ _export_sfc(_sfc_main$1, [[\"__scopeId\", \"data-v-e1c54e23\"]]);\nasync function getRecentNodes({ client, signal }) {\n const lastTwoWeek = Math.round(Date.now() / 1e3) - 60 * 60 * 24 * 14;\n const { data } = await client.search(\"/\", {\n signal,\n details: true,\n data: getRecentSearch(lastTwoWeek)\n });\n return data.results.map((result) => resultToNode(result));\n}\nasync function getNodes({ client, path, signal }) {\n const results = await client.getDirectoryContents(join(defaultRootPath, path), {\n signal,\n details: true,\n includeSelf: true,\n data: getDefaultPropfind()\n });\n const nodes = results.data.map((result) => resultToNode(result));\n return {\n contents: nodes.filter(({ path: nodePath }) => nodePath !== path),\n folder: nodes.find(({ path: nodePath }) => path === nodePath)\n };\n}\nasync function getFile(client, path) {\n const { data } = await client.stat(join(defaultRootPath, path), {\n details: true,\n data: getDefaultPropfind()\n });\n return resultToNode(data);\n}\nfunction useDAVFiles(currentView, currentPath) {\n const client = getClient();\n const files = shallowRef([]);\n const folder = shallowRef(null);\n const isLoading = ref(true);\n let abortController;\n async function createDirectory(name) {\n const path = join(currentPath.value, name);\n await client.createDirectory(join(defaultRootPath, path));\n const directory = await getFile(client, path);\n files.value = [...files.value, directory];\n return directory;\n }\n async function loadDAVFiles() {\n if (abortController) {\n abortController.abort();\n abortController = void 0;\n }\n abortController = new AbortController();\n isLoading.value = true;\n try {\n if (currentView.value === \"favorites\") {\n files.value = await getFavoriteNodes({ client, path: currentPath.value, signal: abortController.signal });\n folder.value = null;\n } else if (currentView.value === \"recent\") {\n files.value = await getRecentNodes({ client, signal: abortController.signal });\n folder.value = null;\n } else {\n const content = await getNodes({ client, path: currentPath.value, signal: abortController.signal });\n folder.value = content.folder;\n files.value = content.contents;\n }\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n return;\n }\n throw error;\n } finally {\n abortController = void 0;\n isLoading.value = false;\n }\n }\n watch([currentView, currentPath], () => loadDAVFiles());\n onMounted(() => loadDAVFiles());\n return {\n isLoading,\n files,\n folder,\n loadFiles: loadDAVFiles,\n createDirectory\n };\n}\nfunction useMimeFilter(allowedMIMETypes) {\n const splittedTypes = computed(() => allowedMIMETypes.value.map((filter) => filter.split(\"/\")));\n const isSupportedMimeType = (mime) => {\n const mimeTypeArray = mime.split(\"/\");\n return splittedTypes.value.some(([type, subtype]) => (\n // check mime type matches or is wildcard\n (mimeTypeArray[0] === type || type === \"*\") && (mimeTypeArray[1] === subtype || subtype === \"*\")\n ));\n };\n return {\n isSupportedMimeType\n };\n}\nconst _hoisted_1 = { class: \"file-picker__main\" };\nconst _hoisted_2 = {\n key: 1,\n class: \"file-picker__view\"\n};\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"FilePicker\",\n props: {\n buttons: {},\n name: {},\n allowPickDirectory: { type: Boolean, default: false },\n noMenu: { type: Boolean, default: false },\n disabledNavigation: { type: Boolean, default: false },\n filterFn: { type: Function, default: void 0 },\n canPickFn: { type: Function, default: void 0 },\n mimetypeFilter: { default: () => [] },\n multiselect: { type: Boolean, default: false },\n path: { default: void 0 }\n },\n emits: [\"close\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit$1 = __emit;\n const isOpen = ref(true);\n const currentView = ref(\"files\");\n const savedPath = ref(window?.sessionStorage.getItem(\"NC.FilePicker.LastPath\") || \"/\");\n const navigatedPath = ref(\"\");\n const currentPath = computed({\n get: () => {\n return currentView.value === \"files\" ? navigatedPath.value || props.path || savedPath.value : \"/\";\n },\n set: (path) => {\n navigatedPath.value = path;\n }\n });\n const selectedFiles = shallowRef([]);\n const filterString = ref(\"\");\n const {\n files,\n folder: currentFolder,\n isLoading,\n loadFiles,\n createDirectory\n } = useDAVFiles(currentView, currentPath);\n watch([navigatedPath], () => {\n if (props.path === void 0 && navigatedPath.value) {\n window.sessionStorage.setItem(\"NC.FilePicker.LastPath\", navigatedPath.value);\n }\n selectedFiles.value = [];\n filterString.value = \"\";\n });\n let isHandlingCallback = false;\n const dialogButtons = computed(() => {\n const nodes = selectedFiles.value.length === 0 && props.allowPickDirectory && currentFolder.value && (!props.canPickFn || props.canPickFn(currentFolder.value)) ? [currentFolder.value] : selectedFiles.value;\n const buttons = typeof props.buttons === \"function\" ? props.buttons(nodes, currentPath.value, currentView.value) : props.buttons;\n return buttons.map((button) => ({\n ...button,\n disabled: button.disabled || isLoading.value,\n callback: () => {\n isHandlingCallback = true;\n handleButtonClick(button.callback, nodes);\n }\n }));\n });\n async function handleButtonClick(callback, nodes) {\n await callback(nodes);\n emit$1(\"close\", nodes);\n isHandlingCallback = false;\n }\n const viewHeadline = computed(() => currentView.value === \"favorites\" ? t(\"Favorites\") : currentView.value === \"recent\" ? t(\"Recent\") : \"\");\n const { isSupportedMimeType } = useMimeFilter(toRef(props, \"mimetypeFilter\"));\n onMounted(() => loadFiles());\n const { showHiddenFiles } = useFilesSettings();\n const filteredFiles = computed(() => {\n let filtered = files.value;\n if (!showHiddenFiles.value) {\n filtered = filtered.filter((file) => !file.basename.startsWith(\".\"));\n }\n if (props.mimetypeFilter.length > 0) {\n filtered = filtered.filter((file) => file.type === \"folder\" || file.mime && isSupportedMimeType(file.mime));\n }\n if (filterString.value) {\n filtered = filtered.filter((file) => file.basename.toLowerCase().includes(filterString.value.toLowerCase()));\n }\n if (props.filterFn) {\n filtered = filtered.filter((f) => props.filterFn(f));\n }\n return filtered;\n });\n const noFilesDescription = computed(() => {\n if (currentView.value === \"files\") {\n return t(\"Upload some content or sync with your devices!\");\n } else if (currentView.value === \"recent\") {\n return t(\"Files and folders you recently modified will show up here.\");\n } else {\n return t(\"Files and folders you mark as favorite will show up here.\");\n }\n });\n async function onCreateFolder(name) {\n try {\n const folder = await createDirectory(name);\n navigatedPath.value = folder.path;\n emit(\"files:node:created\", files.value.filter((file) => file.basename === name)[0]);\n } catch (error) {\n logger.warn(\"Could not create new folder\", { name, error });\n showError(t(\"Could not create the new folder\"));\n }\n }\n function handleClose(open) {\n if (!open && !isHandlingCallback) {\n emit$1(\"close\");\n }\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(NcDialog), {\n open: isOpen.value,\n \"onUpdate:open\": [\n _cache[6] || (_cache[6] = ($event) => isOpen.value = $event),\n handleClose\n ],\n buttons: dialogButtons.value,\n name: __props.name,\n size: \"large\",\n contentClasses: \"file-picker__content\",\n dialogClasses: \"file-picker\",\n navigationClasses: \"file-picker__navigation\"\n }, {\n navigation: withCtx(({ isCollapsed }) => [\n createVNode(FilePickerNavigation, {\n currentView: currentView.value,\n \"onUpdate:currentView\": _cache[0] || (_cache[0] = ($event) => currentView.value = $event),\n filterString: filterString.value,\n \"onUpdate:filterString\": _cache[1] || (_cache[1] = ($event) => filterString.value = $event),\n isCollapsed,\n disabledNavigation: __props.disabledNavigation\n }, null, 8, [\"currentView\", \"filterString\", \"isCollapsed\", \"disabledNavigation\"])\n ]),\n default: withCtx(() => [\n createElementVNode(\"div\", _hoisted_1, [\n currentView.value === \"files\" ? (openBlock(), createBlock(FilePickerBreadcrumbs, {\n key: 0,\n path: currentPath.value,\n \"onUpdate:path\": _cache[2] || (_cache[2] = ($event) => currentPath.value = $event),\n showMenu: !__props.noMenu,\n onCreateNode: onCreateFolder\n }, null, 8, [\"path\", \"showMenu\"])) : (openBlock(), createElementBlock(\"div\", _hoisted_2, [\n createElementVNode(\"h3\", null, toDisplayString(viewHeadline.value), 1)\n ])),\n unref(isLoading) || filteredFiles.value.length > 0 ? (openBlock(), createBlock(FileList, {\n key: 2,\n path: currentPath.value,\n \"onUpdate:path\": [\n _cache[3] || (_cache[3] = ($event) => currentPath.value = $event),\n _cache[5] || (_cache[5] = ($event) => currentView.value = \"files\")\n ],\n selectedFiles: selectedFiles.value,\n \"onUpdate:selectedFiles\": _cache[4] || (_cache[4] = ($event) => selectedFiles.value = $event),\n allowPickDirectory: __props.allowPickDirectory,\n currentView: currentView.value,\n files: filteredFiles.value,\n multiselect: __props.multiselect,\n loading: unref(isLoading),\n name: viewHeadline.value,\n canPick: __props.canPickFn\n }, null, 8, [\"path\", \"selectedFiles\", \"allowPickDirectory\", \"currentView\", \"files\", \"multiselect\", \"loading\", \"name\", \"canPick\"])) : filterString.value ? (openBlock(), createBlock(unref(NcEmptyContent), {\n key: 3,\n name: unref(t)(\"No matching files\"),\n description: unref(t)(\"No files matching your filter were found.\")\n }, {\n icon: withCtx(() => [\n createVNode(IconFile)\n ]),\n _: 1\n }, 8, [\"name\", \"description\"])) : (openBlock(), createBlock(unref(NcEmptyContent), {\n key: 4,\n name: unref(t)(\"No files in here\"),\n description: noFilesDescription.value\n }, {\n icon: withCtx(() => [\n createVNode(IconFile)\n ]),\n _: 1\n }, 8, [\"name\", \"description\"]))\n ])\n ]),\n _: 1\n }, 8, [\"open\", \"buttons\", \"name\"]);\n };\n }\n});\nconst FilePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__scopeId\", \"data-v-39182aaf\"]]);\nexport {\n FilePicker as default\n};\n//# sourceMappingURL=FilePicker.mjs.map\n"],"names":["_sfc_main$1","_hoisted_1$1","_hoisted_2","_hoisted_3","_hoisted_4","_sfc_render$1","_ctx","_cache","$props","$setup","$data","$options","openBlock","createElementBlock","mergeProps","$event","createElementVNode","toDisplayString","createCommentVNode","ChevronRight","_export_sfc","_sfc_main","NcActions","NcButton","crumbId","createElementId","open","e","_hoisted_1","_sfc_render","_component_NcButton","resolveComponent","_component_NcActions","_component_ChevronRight","normalizeClass","withModifiers","args","createBlock","createSlots","withCtx","renderSlot","createTextVNode","createVNode","NcBreadcrumb","IconFolder","crumbClass","NcActionButton","NcActionRouter","NcActionLink","debounce","subscribe","unsubscribe","nrCrumbs","hiddenIndices","availableWidth","totalWidth","overflow","i","startIndex","currentIndex","a","b","width","crumb","index","el","isLast","hide","w","path","disabled","crumbs","target","vnode","breadcrumbs","Fragment","child","cloneVNode","breadcrumbsRefs","crumb2","h","to","href","disableDrop","name","propsToForward","element","folderIcon","wrapper","isSlotPopulated","NcBreadcrumbs","queue","PQueue","preloadImage","url","resolve","promise","image","getPreviewURL","node","options","previewUrl","generateUrl","usePreviewURL","previewURL","ref","previewLoaded","watchEffect","toValue","FileType","success","sfc","props","key","val","_sfc_main$e","_hoisted_1$c","_hoisted_2$b","_hoisted_3$a","_hoisted_4$a","_sfc_render$7","IconFile","_sfc_main$d","_hoisted_1$b","_hoisted_2$a","_hoisted_3$9","_hoisted_4$9","_sfc_render$6","IconSortDescending","_sfc_main$c","_hoisted_1$a","_hoisted_2$9","_hoisted_3$8","_hoisted_4$8","_sfc_render$5","IconSortAscending","_sfc_main$b","_hoisted_1$9","_hoisted_2$8","_hoisted_3$7","_hoisted_4$7","_sfc_render$4","fileListIconStyles","_sfc_main$a","defineComponent","__props","fileListIconStyles$1","toRef","computed","isFile","folderDecorationIcon","mdiKey","mdiTagOutline","shareTypes","type","ShareType","mdiLink","mdiAccountPlus","mdiNetworkOutline","mdiAccountGroupOutline","normalizeStyle","unref","NcIconSvgWrapper","_hoisted_1$8","_hoisted_2$7","_hoisted_3$6","_hoisted_4$6","_hoisted_5$1","_hoisted_6$1","_hoisted_7$1","_sfc_main$9","__emit","emit2","timestamp","fileExtension","extname","displayName","isDirectory","isPickable","isNavigatable","Permission","toggleSelected","handleClick","handleKeyDown","event","toHandlers","NcCheckboxRadioSwitch","t","formatFileSize","NcDateTime","FileListRow","_hoisted_1$7","_hoisted_2$6","_hoisted_3$5","_hoisted_4$5","_sfc_main$8","LoadingTableRow","useFilesSettings","filesUserState","loadState","showHiddenFiles","sortFavoritesFirst","cropImagePreviews","onMounted","isPublicShare","logger","data","axios","error","showError","useFilesViews","currentView","convertOrder","order2","filesViewsState","filesViewConfig","recentViewConfig","favoritesViewConfig","currentConfig","sortBy","order","_hoisted_1$6","_hoisted_2$5","_hoisted_3$4","_hoisted_4$4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_sfc_main$7","mergeModels","useModel","selectedFiles","customSortingConfig","filesAppSorting","sortingConfig","sortByName","sortBySize","sortByModified","toggleSorting","sortedFiles","sortNodes","selectableFiles","file","allSelected","onSelectAll","onNodeSelected","f","onChangeDirectory","dir","skeletonNumber","fileContainer","resize","nextTick","nodes","height","onUnmounted","renderList","FileList","_sfc_main$6","_hoisted_1$5","_hoisted_2$4","_hoisted_3$3","_hoisted_4$3","_sfc_render$3","IconHome","_sfc_main$5","_hoisted_1$4","_hoisted_2$3","_hoisted_3$2","_hoisted_4$2","_sfc_render$2","IconPlus","_sfc_main$4","actionsOpen","newNodeName","nameInput","useTemplateRef","validateInput","input","validity","validateFilename","InvalidFilenameError","InvalidFilenameErrorReason","onSubmit","pathElements","v","elements","NcActionInput","FilePickerBreadcrumbs","_sfc_main$3","_hoisted_1$3","_hoisted_2$2","_hoisted_3$1","_hoisted_4$1","IconClose","_sfc_main$2","_hoisted_1$2","_hoisted_2$1","IconMagnify","useViews","isAnonymous","allViews","mdiFolder","mdiClock","mdiStar","availableViews","id","getCurrentUser","currentViewObject","updateFilterValue","value","NcTextField","NcSelect","view","FilePickerNavigation","getRecentNodes","client","signal","lastTwoWeek","getRecentSearch","result","resultToNode","getNodes","join","defaultRootPath","getDefaultPropfind","nodePath","getFile","useDAVFiles","currentPath","getClient","files","shallowRef","folder","isLoading","abortController","createDirectory","directory","loadDAVFiles","getFavoriteNodes","content","watch","useMimeFilter","allowedMIMETypes","splittedTypes","filter","mime","mimeTypeArray","subtype","emit$1","isOpen","savedPath","navigatedPath","filterString","currentFolder","loadFiles","isHandlingCallback","dialogButtons","button","handleButtonClick","callback","viewHeadline","isSupportedMimeType","filteredFiles","filtered","noFilesDescription","onCreateFolder","emit","handleClose","NcDialog","isCollapsed","NcEmptyContent","FilePicker"],"mappings":"k6DAMA,MAAMA,GAAc,CAClB,KAAM,mBACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,MACZ,EACI,UAAW,CACT,KAAM,OACN,QAAS,cACf,EACI,KAAM,CACJ,KAAM,OACN,QAAS,EACf,CACA,CACA,EACMC,GAAe,CAAC,cAAe,YAAY,EAC3CC,GAAa,CAAC,OAAQ,QAAS,QAAQ,EACvCC,GAAa,CAAE,EAAG,6DAA6D,EAC/EC,GAAa,CAAE,IAAK,CAAC,EAC3B,SAASC,GAAcC,EAAMC,EAAQC,EAAQC,EAAQC,EAAOC,EAAU,CACpE,OAAOC,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,EAAY+E,EAAQ,CACpC,CAAe,EACD,EAAG,CACjB,EAAe,EAAG,CAAC,OAAQ,aAAa,CAAC,EACzC,CAAW,CACX,CAAS,EACD,EAAG,CACX,EAAS,EAAG,CAAC,OAAQ,UAAW,MAAM,CAAC,EAErC,CACF,CAAC,EACK6P,GAA6BlW,EAAYC,GAAW,CAAC,CAAC,YAAa,iBAAiB,CAAC,CAAC","x_google_ignoreList":[0,1,2,3,4]} \ No newline at end of file +{"version":3,"file":"FilePicker-Cghq-bGr.chunk.mjs","sources":["../node_modules/@nextcloud/vue/dist/chunks/NcBreadcrumb-3Y5NWXnV.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcBreadcrumbs-BaTp3Sya.mjs","../node_modules/@nextcloud/dialogs/dist/chunks/preview.mjs","../node_modules/@nextcloud/dialogs/dist/chunks/_plugin-vue_export-helper.mjs","../node_modules/@nextcloud/dialogs/dist/chunks/FilePicker.mjs"],"sourcesContent":["import '../assets/NcBreadcrumb-BxhZKQlW.css';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode, toDisplayString, createCommentVNode, resolveComponent, withModifiers, normalizeClass, createBlock, createSlots, withCtx, renderSlot, createTextVNode, createVNode } from \"vue\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nimport { N as NcButton } from \"./NcButton-jvoYS2my.mjs\";\nimport { c as createElementId } from \"./createElementId-DhjFt1I9.mjs\";\nimport { N as NcActions } from \"./NcActions-C-wDqSrv.mjs\";\nconst _sfc_main$1 = {\n name: \"ChevronRightIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$1 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3 = { d: \"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z\" };\nconst _hoisted_4 = { key: 0 };\nfunction _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon chevron-right-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2))\n ], 16, _hoisted_1$1);\n}\nconst ChevronRight = /* @__PURE__ */ _export_sfc(_sfc_main$1, [[\"render\", _sfc_render$1]]);\nconst _sfc_main = {\n name: \"NcBreadcrumb\",\n components: {\n NcActions,\n ChevronRight,\n NcButton\n },\n inheritAttrs: false,\n props: {\n /**\n * The main text content of the entry.\n */\n name: {\n type: String,\n required: true\n },\n /**\n * The title attribute of the element.\n */\n title: {\n type: String,\n default: null\n },\n /**\n * Route Location the link should navigate to when clicked on.\n *\n * @see https://v3.router.vuejs.org/api/#to\n */\n to: {\n type: [String, Object],\n default: void 0\n },\n /**\n * Set this prop if your app doesn't use vue-router, breadcrumbs will show as normal links.\n */\n href: {\n type: String,\n default: void 0\n },\n /**\n * Set a css icon-class to show an icon along name text (if forceIconText is provided, otherwise just icon).\n */\n icon: {\n type: String,\n default: \"\"\n },\n /**\n * Enables text to accompany the icon, if the icon was provided. The text that will be displayed is the name prop.\n */\n forceIconText: {\n type: Boolean,\n default: false\n },\n /**\n * Disable dropping on this breadcrumb.\n */\n disableDrop: {\n type: Boolean,\n default: false\n },\n /**\n * Force the actions to display in a three dot menu\n */\n forceMenu: {\n type: Boolean,\n default: false\n },\n /**\n * Open state of the Actions menu\n */\n open: {\n type: Boolean,\n default: false\n },\n /**\n * CSS class to apply to the root element.\n */\n class: {\n type: [String, Array, Object],\n default: \"\"\n }\n },\n emits: [\n \"dragenter\",\n \"dragleave\",\n \"dropped\",\n \"update:open\"\n ],\n setup() {\n const crumbId = createElementId();\n return {\n actionsContainer: `.vue-crumb[data-crumb-id=\"${crumbId}\"]`,\n crumbId\n };\n },\n data() {\n return {\n /**\n * Variable to track if we hover over the breadcrumb\n */\n hovering: false\n };\n },\n computed: {\n /**\n * The attributes to pass to `router-link` or `a`\n */\n linkAttributes() {\n if (this.to) {\n return { to: this.to, ...this.$attrs };\n } else if (this.href) {\n return { href: this.href, ...this.$attrs };\n }\n return this.$attrs;\n }\n },\n methods: {\n /**\n * Function to handle changing the open state of the Actions menu\n * $emit the open state.\n *\n * @param {boolean} open The open state of the Actions menu\n */\n onOpenChange(open) {\n this.$emit(\"update:open\", open);\n },\n /**\n * Function to handle a drop on the breadcrumb.\n * $emit the event and the path, remove the hovering state.\n *\n * @param {object} e The drop event\n * @return {boolean}\n */\n dropped(e) {\n if (this.disableDrop) {\n return false;\n }\n this.$emit(\"dropped\", e, this.to || this.href);\n this.$parent.$emit(\"dropped\", e, this.to || this.href);\n this.hovering = false;\n return false;\n },\n /**\n * Add the hovering state on drag enter\n *\n * @param {DragEvent} e The drag-enter event\n */\n dragEnter(e) {\n this.$emit(\"dragenter\", e);\n if (this.disableDrop) {\n return;\n }\n this.hovering = true;\n },\n /**\n * Remove the hovering state on drag leave\n *\n * @param {DragEvent} e The drag leave event\n */\n dragLeave(e) {\n this.$emit(\"dragleave\", e);\n if (this.disableDrop) {\n return;\n }\n if (e.target.contains(e.relatedTarget) || this.$refs.crumb.contains(e.relatedTarget)) {\n return;\n }\n this.hovering = false;\n }\n }\n};\nconst _hoisted_1 = [\"data-crumb-id\"];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_NcButton = resolveComponent(\"NcButton\");\n const _component_NcActions = resolveComponent(\"NcActions\");\n const _component_ChevronRight = resolveComponent(\"ChevronRight\");\n return openBlock(), createElementBlock(\"li\", {\n ref: \"crumb\",\n class: normalizeClass([\"vue-crumb\", [{ \"vue-crumb--hovered\": $data.hovering }, _ctx.$props.class]]),\n \"data-crumb-id\": $setup.crumbId,\n draggable: \"false\",\n onDragstart: withModifiers(() => {\n }, [\"prevent\"]),\n onDrop: _cache[0] || (_cache[0] = withModifiers((...args) => $options.dropped && $options.dropped(...args), [\"prevent\"])),\n onDragover: withModifiers(() => {\n }, [\"prevent\"]),\n onDragenter: _cache[1] || (_cache[1] = (...args) => $options.dragEnter && $options.dragEnter(...args)),\n onDragleave: _cache[2] || (_cache[2] = (...args) => $options.dragLeave && $options.dragLeave(...args))\n }, [\n ($props.name || $props.icon || _ctx.$slots.icon) && !_ctx.$slots.default ? (openBlock(), createBlock(_component_NcButton, mergeProps({\n key: 0,\n \"aria-label\": $props.icon ? $props.name : void 0,\n variant: \"tertiary\"\n }, $options.linkAttributes), createSlots({ _: 2 }, [\n _ctx.$slots.icon || $props.icon ? {\n name: \"icon\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"icon\", {}, () => [\n createElementVNode(\"span\", {\n class: normalizeClass([$props.icon, \"icon\"])\n }, null, 2)\n ], true)\n ]),\n key: \"0\"\n } : void 0,\n !(_ctx.$slots.icon || $props.icon) || $props.forceIconText ? {\n name: \"default\",\n fn: withCtx(() => [\n createTextVNode(toDisplayString($props.name), 1)\n ]),\n key: \"1\"\n } : void 0\n ]), 1040, [\"aria-label\"])) : createCommentVNode(\"\", true),\n _ctx.$slots.default ? (openBlock(), createBlock(_component_NcActions, {\n key: 1,\n ref: \"actions\",\n container: $setup.actionsContainer,\n forceMenu: $props.forceMenu,\n forceName: \"\",\n menuName: $props.name,\n open: $props.open,\n title: $props.title,\n variant: \"tertiary\",\n \"onUpdate:open\": $options.onOpenChange\n }, {\n icon: withCtx(() => [\n renderSlot(_ctx.$slots, \"menu-icon\", {}, void 0, true)\n ]),\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, void 0, true)\n ]),\n _: 3\n }, 8, [\"container\", \"forceMenu\", \"menuName\", \"open\", \"title\", \"onUpdate:open\"])) : createCommentVNode(\"\", true),\n createVNode(_component_ChevronRight, {\n class: \"vue-crumb__separator\",\n size: 20\n })\n ], 42, _hoisted_1);\n}\nconst NcBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__scopeId\", \"data-v-7cec4a3e\"]]);\nexport {\n NcBreadcrumb as N\n};\n//# sourceMappingURL=NcBreadcrumb-3Y5NWXnV.mjs.map\n","import '../assets/NcBreadcrumbs-B4eyDS9i.css';\nimport { unsubscribe, subscribe } from \"@nextcloud/event-bus\";\nimport debounce from \"debounce\";\nimport { openBlock, createElementBlock, mergeProps, createElementVNode, toDisplayString, createCommentVNode, Fragment, cloneVNode, h } from \"vue\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nimport { N as NcActions, i as isSlotPopulated } from \"./NcActions-C-wDqSrv.mjs\";\nimport { N as NcActionButton } from \"./NcActionButton-BO5T5ePT.mjs\";\nimport { N as NcActionLink } from \"./NcActionLink-BFiaYt9A.mjs\";\nimport { N as NcActionRouter } from \"./NcActionRouter-vYFtIOzD.mjs\";\nimport { N as NcBreadcrumb } from \"./NcBreadcrumb-3Y5NWXnV.mjs\";\nconst _sfc_main$1 = {\n name: \"FolderIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3 = { d: \"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z\" };\nconst _hoisted_4 = { key: 0 };\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon folder-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2))\n ], 16, _hoisted_1);\n}\nconst IconFolder = /* @__PURE__ */ _export_sfc(_sfc_main$1, [[\"render\", _sfc_render]]);\nconst crumbClass = \"vue-crumb\";\nconst _sfc_main = {\n name: \"NcBreadcrumbs\",\n components: {\n NcActions,\n NcActionButton,\n NcActionRouter,\n NcActionLink,\n NcBreadcrumb,\n IconFolder\n },\n props: {\n /**\n * Set a css icon-class for the icon of the root breadcrumb to be used.\n */\n rootIcon: {\n type: String,\n default: \"icon-home\"\n },\n /**\n * Set the aria-label of the nav element.\n */\n ariaLabel: {\n type: String,\n default: null\n }\n },\n emits: [\"dropped\"],\n data() {\n return {\n /**\n * Array to track the hidden breadcrumbs by their index.\n * Comparing two crumbs somehow does not work, so we use the indices.\n */\n hiddenIndices: [],\n /**\n * This is the props of the middle Action menu\n * that show the ellipsised breadcrumbs\n */\n menuBreadcrumbProps: {\n // Don't show a name for this breadcrumb, only the Actions menu\n name: \"\",\n forceMenu: true,\n // Don't allow dropping directly on the actions breadcrumb\n disableDrop: true,\n // Is the menu open or not\n open: false\n },\n breadcrumbsRefs: []\n };\n },\n created() {\n window.addEventListener(\"resize\", debounce(() => {\n this.handleWindowResize();\n }, 100));\n subscribe(\"navigation-toggled\", this.delayedResize);\n },\n mounted() {\n this.handleWindowResize();\n },\n updated() {\n this.delayedResize();\n this.$nextTick(() => {\n this.hideCrumbs();\n });\n },\n beforeUnmount() {\n window.removeEventListener(\"resize\", this.handleWindowResize);\n unsubscribe(\"navigation-toggled\", this.delayedResize);\n },\n methods: {\n /**\n * Close the actions menu\n *\n * @param {object} e The event\n */\n closeActions(e) {\n if (this.$refs.actionsBreadcrumb.$el.contains(e.relatedTarget)) {\n return;\n }\n this.menuBreadcrumbProps.open = false;\n },\n /**\n * Call the resize function after a delay\n */\n async delayedResize() {\n await this.$nextTick();\n this.handleWindowResize();\n },\n /**\n * Check the width of the breadcrumb and hide breadcrumbs\n * if we overflow otherwise.\n */\n handleWindowResize() {\n if (!this.$refs.container) {\n return;\n }\n const nrCrumbs = this.breadcrumbsRefs.length;\n const hiddenIndices = [];\n const availableWidth = this.$refs.container.offsetWidth;\n let totalWidth = this.getTotalWidth();\n if (this.$refs.breadcrumb__actions) {\n totalWidth += this.$refs.breadcrumb__actions.offsetWidth;\n }\n let overflow = totalWidth - availableWidth;\n overflow += overflow > 0 ? 64 : 0;\n let i = 0;\n const startIndex = Math.floor(nrCrumbs / 2);\n while (overflow > 0 && i < nrCrumbs - 2) {\n const currentIndex = startIndex + (i % 2 ? i + 1 : i) / 2 * Math.pow(-1, i + nrCrumbs % 2);\n overflow -= this.getWidth(this.breadcrumbsRefs[currentIndex]?.$el, currentIndex === this.breadcrumbsRefs.length - 1);\n hiddenIndices.push(currentIndex);\n i++;\n }\n if (!this.arraysEqual(this.hiddenIndices, hiddenIndices.sort((a, b) => a - b))) {\n this.hiddenIndices = hiddenIndices;\n }\n },\n /**\n * Checks if two arrays are equal.\n * Only works for primitive arrays, but that's enough here.\n *\n * @param {Array} a The first array\n * @param {Array} b The second array\n * @return {boolean} Wether the arrays are equal\n */\n arraysEqual(a, b) {\n if (a.length !== b.length) {\n return false;\n } else if (a === b) {\n return true;\n } else if (a === null || b === null) {\n return false;\n }\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n },\n /**\n * Calculates the total width of all breadcrumbs\n *\n * @return {number} The total width\n */\n getTotalWidth() {\n return this.breadcrumbsRefs.reduce((width, crumb, index) => width + this.getWidth(crumb.$el, index === this.breadcrumbsRefs.length - 1), 0);\n },\n /**\n * Calculates the width of the provided element\n *\n * @param {object} el The element\n * @param {boolean} isLast Is this the last crumb\n * @return {number} The width\n */\n getWidth(el, isLast) {\n if (!el?.classList) {\n return 0;\n }\n const hide = el.classList.contains(`${crumbClass}--hidden`);\n el.style.minWidth = \"auto\";\n if (isLast) {\n el.style.maxWidth = \"210px\";\n }\n el.classList.remove(`${crumbClass}--hidden`);\n const w = el.offsetWidth;\n if (hide) {\n el.classList.add(`${crumbClass}--hidden`);\n }\n el.style.minWidth = \"\";\n el.style.maxWidth = \"\";\n return w;\n },\n /**\n * Prevents the default of a provided event\n *\n * @param {object} e The event\n * @return {boolean}\n */\n preventDefault(e) {\n if (e.preventDefault) {\n e.preventDefault();\n }\n return false;\n },\n /**\n * Handles the drag start.\n * Prevents a breadcrumb from being draggable.\n *\n * @param {object} e The event\n * @return {boolean}\n */\n dragStart(e) {\n return this.preventDefault(e);\n },\n /**\n * Handles when something is dropped on the breadcrumb.\n *\n * @param {object} e The drop event\n * @param {string} path The path of the breadcrumb\n * @param {boolean} disabled Whether dropping is disabled for this breadcrumb\n * @return {boolean}\n */\n dropped(e, path, disabled) {\n if (!disabled) {\n this.$emit(\"dropped\", e, path);\n }\n this.menuBreadcrumbProps.open = false;\n const crumbs = document.querySelectorAll(`.${crumbClass}`);\n for (const crumb of crumbs) {\n crumb.classList.remove(`${crumbClass}--hovered`);\n }\n return this.preventDefault(e);\n },\n /**\n * Handles the drag over event\n *\n * @param {object} e The drag over event\n * @return {boolean}\n */\n dragOver(e) {\n return this.preventDefault(e);\n },\n /**\n * Handles the drag enter event\n *\n * @param {object} e The drag over event\n * @param {boolean} disabled Whether dropping is disabled for this breadcrumb\n */\n dragEnter(e, disabled) {\n if (disabled) {\n return;\n }\n if (e.target.closest) {\n const target = e.target.closest(`.${crumbClass}`);\n if (target.classList && target.classList.contains(crumbClass)) {\n const crumbs = document.querySelectorAll(`.${crumbClass}`);\n for (const crumb of crumbs) {\n crumb.classList.remove(`${crumbClass}--hovered`);\n }\n target.classList.add(`${crumbClass}--hovered`);\n }\n }\n },\n /**\n * Handles the drag leave event\n *\n * @param {object} e The drag leave event\n * @param {boolean} disabled Whether dropping is disabled for this breadcrumb\n */\n dragLeave(e, disabled) {\n if (disabled) {\n return;\n }\n if (e.target.contains(e.relatedTarget)) {\n return;\n }\n if (e.target.closest) {\n const target = e.target.closest(`.${crumbClass}`);\n if (target.contains(e.relatedTarget)) {\n return;\n }\n if (target.classList && target.classList.contains(crumbClass)) {\n target.classList.remove(`${crumbClass}--hovered`);\n }\n }\n },\n /**\n * Check for each crumb if we have to hide it and\n * add it to the array of all crumbs.\n */\n hideCrumbs() {\n this.breadcrumbsRefs.forEach((crumb, i) => {\n if (crumb?.$el?.classList) {\n if (this.hiddenIndices.includes(i)) {\n crumb.$el.classList.add(`${crumbClass}--hidden`);\n } else {\n crumb.$el.classList.remove(`${crumbClass}--hidden`);\n }\n }\n });\n },\n isBreadcrumb(vnode) {\n return vnode?.type?.name === \"NcBreadcrumb\";\n }\n },\n /**\n * The render function to display the component\n *\n * @return {object|undefined} The created VNode\n */\n render() {\n let breadcrumbs = [];\n this.$slots.default?.().forEach((vnode) => {\n if (this.isBreadcrumb(vnode)) {\n breadcrumbs.push(vnode);\n return;\n }\n if (vnode?.type === Fragment) {\n vnode?.children?.forEach?.((child) => {\n if (this.isBreadcrumb(child)) {\n breadcrumbs.push(child);\n }\n });\n }\n });\n if (breadcrumbs.length === 0) {\n return;\n }\n breadcrumbs[0] = cloneVNode(breadcrumbs[0], {\n icon: this.rootIcon,\n ref: \"breadcrumbs\"\n });\n const breadcrumbsRefs = [];\n breadcrumbs = breadcrumbs.map((crumb, index) => cloneVNode(crumb, {\n ref: (crumb2) => {\n breadcrumbsRefs[index] = crumb2;\n }\n }));\n const crumbs = [...breadcrumbs];\n if (this.hiddenIndices.length) {\n crumbs.splice(\n Math.round(breadcrumbs.length / 2),\n 0,\n // The Actions menu\n // Use a breadcrumb component for the hidden breadcrumbs\n h(NcBreadcrumb, {\n class: \"dropdown\",\n ...this.menuBreadcrumbProps,\n // Hide the dropdown menu from screen-readers,\n // since the crumbs in the menu are still in the list.\n \"aria-hidden\": true,\n // Add a ref to the Actions menu\n ref: \"actionsBreadcrumb\",\n key: \"actions-breadcrumb-1\",\n // Add handlers so the Actions menu opens on hover\n onDragenter: () => {\n this.menuBreadcrumbProps.open = true;\n },\n onDragleave: this.closeActions,\n // Make sure we keep the same open state\n // as the Actions component\n \"onUpdate:open\": (open) => {\n this.menuBreadcrumbProps.open = open;\n }\n // Add all hidden breadcrumbs as ActionRouter or ActionLink\n }, {\n default: () => this.hiddenIndices.filter((index) => index <= breadcrumbs.length - 1).map((index) => {\n const crumb = breadcrumbs[index];\n const {\n // Get the parameters from the breadcrumb component props\n to,\n href,\n disableDrop,\n name,\n // Props to forward\n ...propsToForward\n } = crumb.props;\n delete propsToForward.ref;\n let element = NcActionButton;\n let path = \"\";\n if (href) {\n element = NcActionLink;\n path = href;\n }\n if (to) {\n element = NcActionRouter;\n path = to;\n }\n const folderIcon = h(IconFolder, {\n size: 20\n });\n return h(element, {\n ...propsToForward,\n class: crumbClass,\n href: href || null,\n to: to || null,\n // Prevent the breadcrumbs from being draggable\n draggable: false,\n // Add the drag and drop handlers\n onDragstart: this.dragStart,\n onDrop: ($event) => this.dropped($event, path, disableDrop),\n onDragover: this.dragOver,\n onDragenter: ($event) => this.dragEnter($event, disableDrop),\n onDragleave: ($event) => this.dragLeave($event, disableDrop)\n }, {\n default: () => name,\n icon: () => folderIcon\n });\n })\n })\n );\n }\n const wrapper = [h(\"nav\", { \"aria-label\": this.ariaLabel }, [h(\"ul\", { class: \"breadcrumb__crumbs\" }, [crumbs])])];\n if (isSlotPopulated(this.$slots.actions?.())) {\n wrapper.push(h(\"div\", { class: \"breadcrumb__actions\", ref: \"breadcrumb__actions\" }, this.$slots.actions?.()));\n }\n this.breadcrumbsRefs = breadcrumbsRefs;\n return h(\"div\", { class: [\"breadcrumb\", { \"breadcrumb--collapsed\": this.hiddenIndices.length === breadcrumbs.length - 2 }], ref: \"container\" }, wrapper);\n }\n};\nconst NcBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__scopeId\", \"data-v-5a4d73af\"]]);\nexport {\n NcBreadcrumbs as N\n};\n//# sourceMappingURL=NcBreadcrumbs-BaTp3Sya.mjs.map\n","import { FileType } from \"@nextcloud/files\";\nimport { generateUrl } from \"@nextcloud/router\";\nimport { ref, watchEffect, toValue } from \"vue\";\nimport PQueue from \"p-queue\";\nconst queue = new PQueue({ concurrency: 5 });\nfunction preloadImage(url) {\n const { resolve, promise } = Promise.withResolvers();\n queue.add(() => {\n const image = new Image();\n image.onerror = () => resolve(false);\n image.onload = () => resolve(true);\n image.src = url;\n return promise;\n });\n return promise;\n}\nfunction getPreviewURL(node, options = {}) {\n options = { size: 32, cropPreview: false, mimeFallback: true, ...options };\n try {\n const previewUrl = node.attributes?.previewUrl || generateUrl(\"/core/preview?fileId={fileid}\", {\n fileid: node.fileid\n });\n let url;\n try {\n url = new URL(previewUrl);\n } catch {\n url = new URL(previewUrl, window.location.origin);\n }\n url.searchParams.set(\"x\", `${options.size}`);\n url.searchParams.set(\"y\", `${options.size}`);\n url.searchParams.set(\"mimeFallback\", `${options.mimeFallback}`);\n url.searchParams.set(\"a\", options.cropPreview === true ? \"0\" : \"1\");\n url.searchParams.set(\"c\", `${node.attributes.etag}`);\n return url;\n } catch {\n return null;\n }\n}\nfunction usePreviewURL(node, options) {\n const previewURL = ref(null);\n const previewLoaded = ref(false);\n watchEffect(() => {\n previewLoaded.value = false;\n previewURL.value = getPreviewURL(toValue(node), toValue(options || {}));\n if (previewURL.value && toValue(node).type === FileType.File) {\n preloadImage(previewURL.value.href).then((success) => {\n previewLoaded.value = success;\n });\n }\n });\n return {\n previewURL,\n previewLoaded\n };\n}\nexport {\n getPreviewURL as g,\n usePreviewURL as u\n};\n//# sourceMappingURL=preview.mjs.map\n","const _export_sfc = (sfc, props) => {\n const target = sfc.__vccOpts || sfc;\n for (const [key, val] of props) {\n target[key] = val;\n }\n return target;\n};\nexport {\n _export_sfc as _\n};\n//# sourceMappingURL=_plugin-vue_export-helper.mjs.map\n","import { openBlock, createElementBlock, mergeProps, createElementVNode, toDisplayString, createCommentVNode, defineComponent, ref, computed, toRef, normalizeClass, normalizeStyle, unref, Fragment, createBlock, createVNode, toHandlers, withModifiers, onMounted, toValue, useModel, onUnmounted, withCtx, createTextVNode, renderList, mergeModels, nextTick, useTemplateRef, createSlots, shallowRef, watch } from \"vue\";\nimport { emit } from \"@nextcloud/event-bus\";\nimport NcDialog from \"@nextcloud/vue/components/NcDialog\";\nimport NcEmptyContent from \"@nextcloud/vue/components/NcEmptyContent\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper.mjs\";\nimport { FileType, Permission, formatFileSize, sortNodes, validateFilename, InvalidFilenameError, InvalidFilenameErrorReason } from \"@nextcloud/files\";\nimport NcButton from \"@nextcloud/vue/components/NcButton\";\nimport NcCheckboxRadioSwitch from \"@nextcloud/vue/components/NcCheckboxRadioSwitch\";\nimport { extname, join } from \"@nextcloud/paths\";\nimport NcDateTime from \"@nextcloud/vue/components/NcDateTime\";\nimport { mdiKey, mdiTagOutline, mdiLink, mdiAccountPlus, mdiAccountGroupOutline, mdiNetworkOutline, mdiFolder, mdiClock, mdiStar } from \"@mdi/js\";\nimport { ShareType } from \"@nextcloud/sharing\";\nimport NcIconSvgWrapper from \"@nextcloud/vue/components/NcIconSvgWrapper\";\nimport { u as usePreviewURL } from \"./preview.mjs\";\nimport { t, l as logger, s as showError } from \"./index.mjs\";\nimport axios from \"@nextcloud/axios\";\nimport { loadState } from \"@nextcloud/initial-state\";\nimport { generateUrl } from \"@nextcloud/router\";\nimport { isPublicShare } from \"@nextcloud/sharing/public\";\nimport NcActionInput from \"@nextcloud/vue/components/NcActionInput\";\nimport NcActions from \"@nextcloud/vue/components/NcActions\";\nimport NcBreadcrumb from \"@nextcloud/vue/components/NcBreadcrumb\";\nimport NcBreadcrumbs from \"@nextcloud/vue/components/NcBreadcrumbs\";\nimport { getCurrentUser } from \"@nextcloud/auth\";\nimport NcSelect from \"@nextcloud/vue/components/NcSelect\";\nimport NcTextField from \"@nextcloud/vue/components/NcTextField\";\nimport { getRecentSearch, resultToNode, defaultRootPath, getDefaultPropfind, getClient, getFavoriteNodes } from \"@nextcloud/files/dav\";\nconst _sfc_main$e = {\n name: \"FileIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$c = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$b = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$a = { d: \"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z\" };\nconst _hoisted_4$a = { key: 0 };\nfunction _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon file-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$a, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$a, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$b))\n ], 16, _hoisted_1$c);\n}\nconst IconFile = /* @__PURE__ */ _export_sfc(_sfc_main$e, [[\"render\", _sfc_render$7]]);\nconst _sfc_main$d = {\n name: \"MenuDownIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$b = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$a = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$9 = { d: \"M7,10L12,15L17,10H7Z\" };\nconst _hoisted_4$9 = { key: 0 };\nfunction _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon menu-down-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$9, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$9, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$a))\n ], 16, _hoisted_1$b);\n}\nconst IconSortDescending = /* @__PURE__ */ _export_sfc(_sfc_main$d, [[\"render\", _sfc_render$6]]);\nconst _sfc_main$c = {\n name: \"MenuUpIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$a = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$9 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$8 = { d: \"M7,15L12,10L17,15H7Z\" };\nconst _hoisted_4$8 = { key: 0 };\nfunction _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon menu-up-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$8, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$8, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$9))\n ], 16, _hoisted_1$a);\n}\nconst IconSortAscending = /* @__PURE__ */ _export_sfc(_sfc_main$c, [[\"render\", _sfc_render$5]]);\nconst _sfc_main$b = {\n name: \"FolderIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$9 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$8 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$7 = { d: \"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z\" };\nconst _hoisted_4$7 = { key: 0 };\nfunction _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon folder-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$7, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$7, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$8))\n ], 16, _hoisted_1$9);\n}\nconst IconFolder = /* @__PURE__ */ _export_sfc(_sfc_main$b, [[\"render\", _sfc_render$4]]);\nconst fileListIconStyles = {\n \"file-picker__file-icon\": \"_file-picker__file-icon_1aykw_9\",\n \"file-picker__file-icon--primary\": \"_file-picker__file-icon--primary_1aykw_22\",\n \"file-picker__file-icon-overlay\": \"_file-picker__file-icon-overlay_1aykw_26\"\n};\nconst _sfc_main$a = /* @__PURE__ */ defineComponent({\n __name: \"FilePreview\",\n props: {\n node: {},\n cropImagePreviews: { type: Boolean }\n },\n setup(__props) {\n const props = __props;\n const fileListIconStyles$1 = ref(fileListIconStyles);\n const {\n previewURL,\n previewLoaded\n } = usePreviewURL(toRef(props, \"node\"), computed(() => ({ cropPreview: props.cropImagePreviews })));\n const isFile = computed(() => props.node.type === FileType.File);\n const folderDecorationIcon = computed(() => {\n if (props.node.type !== FileType.Folder) {\n return null;\n }\n if (props.node.attributes?.[\"is-encrypted\"] === 1) {\n return mdiKey;\n }\n if (props.node.attributes?.[\"is-tag\"]) {\n return mdiTagOutline;\n }\n const shareTypes = Object.values(props.node.attributes?.[\"share-types\"] || {}).flat();\n if (shareTypes.some((type) => type === ShareType.Link || type === ShareType.Email)) {\n return mdiLink;\n }\n if (shareTypes.length > 0) {\n return mdiAccountPlus;\n }\n switch (props.node.attributes?.[\"mount-type\"]) {\n case \"external\":\n case \"external-session\":\n return mdiNetworkOutline;\n case \"group\":\n return mdiAccountGroupOutline;\n case \"shared\":\n return mdiAccountPlus;\n }\n return null;\n });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n style: normalizeStyle(unref(previewLoaded) ? { backgroundImage: `url(${unref(previewURL)})` } : void 0),\n class: normalizeClass(fileListIconStyles$1.value[\"file-picker__file-icon\"])\n }, [\n !unref(previewLoaded) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n isFile.value ? (openBlock(), createBlock(IconFile, {\n key: 0,\n size: 32\n })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [\n folderDecorationIcon.value ? (openBlock(), createBlock(unref(NcIconSvgWrapper), {\n key: 0,\n class: normalizeClass(fileListIconStyles$1.value[\"file-picker__file-icon-overlay\"]),\n inline: \"\",\n path: folderDecorationIcon.value,\n size: 16\n }, null, 8, [\"class\", \"path\"])) : createCommentVNode(\"\", true),\n createVNode(IconFolder, {\n class: normalizeClass(fileListIconStyles$1.value[\"file-picker__file-icon--primary\"]),\n size: 32\n }, null, 8, [\"class\"])\n ], 64))\n ], 64)) : createCommentVNode(\"\", true)\n ], 6);\n };\n }\n});\nconst _hoisted_1$8 = [\"tabindex\", \"aria-selected\", \"data-filename\"];\nconst _hoisted_2$7 = { class: \"row-name\" };\nconst _hoisted_3$6 = {\n class: \"file-picker__name-container\",\n \"data-testid\": \"row-name\"\n};\nconst _hoisted_4$6 = [\"title\", \"textContent\"];\nconst _hoisted_5$1 = [\"textContent\"];\nconst _hoisted_6$1 = { class: \"row-size\" };\nconst _hoisted_7$1 = { class: \"row-modified\" };\nconst _sfc_main$9 = /* @__PURE__ */ defineComponent({\n __name: \"FileListRow\",\n props: {\n allowPickDirectory: { type: Boolean },\n selected: { type: Boolean },\n showCheckbox: { type: Boolean },\n canPick: { type: Boolean },\n node: {},\n cropImagePreviews: { type: Boolean }\n },\n emits: [\"update:selected\", \"enterDirectory\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit2 = __emit;\n const timestamp = computed(() => props.node.mtime ?? 0);\n const fileExtension = computed(() => extname(props.node.displayname));\n const displayName = computed(() => props.node.displayname.slice(0, fileExtension.value ? -fileExtension.value.length : void 0));\n const isDirectory = computed(() => props.node.type === FileType.Folder);\n const isPickable = computed(() => props.canPick && (props.allowPickDirectory || !isDirectory.value));\n const isNavigatable = computed(() => (props.node.permissions & Permission.READ) === Permission.READ);\n function toggleSelected() {\n if (!isPickable.value) {\n return;\n }\n emit2(\"update:selected\", !props.selected);\n }\n function handleClick() {\n if (isDirectory.value) {\n if (isNavigatable.value) {\n emit2(\"enterDirectory\", props.node);\n }\n } else {\n toggleSelected();\n }\n }\n function handleKeyDown(event) {\n if (event.key === \"Enter\") {\n handleClick();\n }\n }\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"tr\", mergeProps({\n tabindex: __props.showCheckbox && !isDirectory.value ? void 0 : 0,\n \"aria-selected\": !isPickable.value ? void 0 : __props.selected,\n class: [\"file-picker__row\", [\n {\n \"file-picker__row--selected\": __props.selected && !__props.showCheckbox,\n \"file-picker__row--not-navigatable\": isDirectory.value && !isNavigatable.value,\n \"file-picker__row--not-pickable\": !isPickable.value\n }\n ]],\n \"data-filename\": __props.node.basename,\n \"data-testid\": \"file-list-row\"\n }, toHandlers({\n click: handleClick,\n /* same as tabindex -> if we hide the checkbox or this is a directory we need keyboard access to enter the directory or select the node */\n ...!__props.showCheckbox || isDirectory.value ? { keydown: handleKeyDown } : {}\n }, true)), [\n __props.showCheckbox ? (openBlock(), createElementBlock(\"td\", {\n key: 0,\n class: \"row-checkbox\",\n onClick: withModifiers(() => {\n }, [\"stop\"])\n }, [\n createVNode(unref(NcCheckboxRadioSwitch), {\n \"aria-label\": unref(t)(\"Select the row for {nodename}\", { nodename: displayName.value }),\n disabled: !isPickable.value,\n \"data-testid\": \"row-checkbox\",\n modelValue: __props.selected,\n \"onUpdate:modelValue\": toggleSelected\n }, null, 8, [\"aria-label\", \"disabled\", \"modelValue\"])\n ])) : createCommentVNode(\"\", true),\n createElementVNode(\"td\", _hoisted_2$7, [\n createElementVNode(\"div\", _hoisted_3$6, [\n createVNode(_sfc_main$a, {\n node: __props.node,\n cropImagePreviews: __props.cropImagePreviews\n }, null, 8, [\"node\", \"cropImagePreviews\"]),\n createElementVNode(\"div\", {\n class: \"file-picker__file-name\",\n title: displayName.value,\n textContent: toDisplayString(displayName.value)\n }, null, 8, _hoisted_4$6),\n createElementVNode(\"div\", {\n class: \"file-picker__file-extension\",\n textContent: toDisplayString(fileExtension.value)\n }, null, 8, _hoisted_5$1)\n ])\n ]),\n createElementVNode(\"td\", _hoisted_6$1, toDisplayString(unref(formatFileSize)(__props.node.size || 0)), 1),\n createElementVNode(\"td\", _hoisted_7$1, [\n createVNode(unref(NcDateTime), {\n timestamp: timestamp.value,\n ignoreSeconds: \"\"\n }, null, 8, [\"timestamp\"])\n ])\n ], 16, _hoisted_1$8);\n };\n }\n});\nconst FileListRow = /* @__PURE__ */ _export_sfc(_sfc_main$9, [[\"__scopeId\", \"data-v-7857e8bd\"]]);\nconst _hoisted_1$7 = {\n \"aria-hidden\": \"true\",\n class: \"file-picker__row loading-row\"\n};\nconst _hoisted_2$6 = {\n key: 0,\n class: \"row-checkbox\"\n};\nconst _hoisted_3$5 = { class: \"row-name\" };\nconst _hoisted_4$5 = { class: \"row-wrapper\" };\nconst _sfc_main$8 = /* @__PURE__ */ defineComponent({\n __name: \"LoadingTableRow\",\n props: {\n showCheckbox: { type: Boolean }\n },\n setup(__props) {\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"tr\", _hoisted_1$7, [\n __props.showCheckbox ? (openBlock(), createElementBlock(\"td\", _hoisted_2$6, [..._cache[0] || (_cache[0] = [\n createElementVNode(\"span\", null, null, -1)\n ])])) : createCommentVNode(\"\", true),\n createElementVNode(\"td\", _hoisted_3$5, [\n createElementVNode(\"div\", _hoisted_4$5, [\n createElementVNode(\"span\", {\n class: normalizeClass(unref(fileListIconStyles)[\"file-picker__file-icon\"])\n }, null, 2),\n _cache[1] || (_cache[1] = createElementVNode(\"span\", null, null, -1))\n ])\n ]),\n _cache[2] || (_cache[2] = createElementVNode(\"td\", { class: \"row-size\" }, [\n createElementVNode(\"span\")\n ], -1)),\n _cache[3] || (_cache[3] = createElementVNode(\"td\", { class: \"row-modified\" }, [\n createElementVNode(\"span\")\n ], -1))\n ]);\n };\n }\n});\nconst LoadingTableRow = /* @__PURE__ */ _export_sfc(_sfc_main$8, [[\"__scopeId\", \"data-v-1f96131b\"]]);\nfunction useFilesSettings() {\n const filesUserState = loadState(\"files\", \"config\", null);\n const showHiddenFiles = ref(filesUserState?.show_hidden ?? true);\n const sortFavoritesFirst = ref(filesUserState?.sort_favorites_first ?? true);\n const cropImagePreviews = ref(filesUserState?.crop_image_previews ?? true);\n onMounted(async () => {\n if (!isPublicShare()) {\n try {\n const { data } = await axios.get(generateUrl(\"/apps/files/api/v1/configs\"));\n showHiddenFiles.value = data?.data?.show_hidden ?? false;\n sortFavoritesFirst.value = data?.data?.sort_favorites_first ?? true;\n cropImagePreviews.value = data?.data?.crop_image_previews ?? true;\n } catch (error) {\n logger.error(\"Could not load files settings\", { error });\n showError(t(\"Could not load files settings\"));\n }\n } else {\n logger.debug(\"Skip loading files settings - currently on public share\");\n }\n });\n return {\n showHiddenFiles,\n sortFavoritesFirst,\n cropImagePreviews\n };\n}\nfunction useFilesViews(currentView) {\n const convertOrder = (order2) => order2 === \"asc\" ? \"ascending\" : order2 === \"desc\" ? \"descending\" : \"none\";\n const filesViewsState = loadState(\"files\", \"viewConfigs\", null);\n const filesViewConfig = ref({\n sortBy: filesViewsState?.files?.sorting_mode ?? \"basename\",\n order: convertOrder(filesViewsState?.files?.sorting_direction ?? \"asc\")\n });\n const recentViewConfig = ref({\n sortBy: filesViewsState?.recent?.sorting_mode ?? \"basename\",\n order: convertOrder(filesViewsState?.recent?.sorting_direction ?? \"asc\")\n });\n const favoritesViewConfig = ref({\n sortBy: filesViewsState?.favorites?.sorting_mode ?? \"basename\",\n order: convertOrder(filesViewsState?.favorites?.sorting_direction ?? \"asc\")\n });\n onMounted(async () => {\n if (!isPublicShare()) {\n try {\n const { data } = await axios.get(generateUrl(\"/apps/files/api/v1/views\"));\n filesViewConfig.value = {\n sortBy: data?.data?.files?.sorting_mode ?? \"basename\",\n order: convertOrder(data?.data?.files?.sorting_direction)\n };\n favoritesViewConfig.value = {\n sortBy: data?.data?.favorites?.sorting_mode ?? \"basename\",\n order: convertOrder(data?.data?.favorites?.sorting_direction)\n };\n recentViewConfig.value = {\n sortBy: data?.data?.recent?.sorting_mode ?? \"basename\",\n order: convertOrder(data?.data?.recent?.sorting_direction)\n };\n } catch (error) {\n logger.error(\"Could not load files views\", { error });\n showError(t(\"Could not load files views\"));\n }\n } else {\n logger.debug(\"Skip loading files views - currently on public share\");\n }\n });\n const currentConfig = computed(() => toValue(currentView || \"files\") === \"files\" ? filesViewConfig.value : toValue(currentView) === \"recent\" ? recentViewConfig.value : favoritesViewConfig.value);\n const sortBy = computed(() => currentConfig.value.sortBy);\n const order = computed(() => currentConfig.value.order);\n return {\n filesViewConfig,\n favoritesViewConfig,\n recentViewConfig,\n currentConfig,\n sortBy,\n order\n };\n}\nconst _hoisted_1$6 = {\n key: 0,\n class: \"row-checkbox\"\n};\nconst _hoisted_2$5 = { class: \"hidden-visually\" };\nconst _hoisted_3$4 = [\"aria-sort\"];\nconst _hoisted_4$4 = { class: \"header-wrapper\" };\nconst _hoisted_5 = {\n key: 2,\n style: { \"width\": \"44px\" }\n};\nconst _hoisted_6 = [\"aria-sort\"];\nconst _hoisted_7 = {\n key: 2,\n style: { \"width\": \"44px\" }\n};\nconst _hoisted_8 = [\"aria-sort\"];\nconst _hoisted_9 = {\n key: 2,\n style: { \"width\": \"44px\" }\n};\nconst _sfc_main$7 = /* @__PURE__ */ defineComponent({\n __name: \"FileList\",\n props: /* @__PURE__ */ mergeModels({\n currentView: {},\n multiselect: { type: Boolean },\n allowPickDirectory: { type: Boolean },\n loading: { type: Boolean },\n files: {},\n canPick: { type: Function }\n }, {\n \"path\": { required: true },\n \"pathModifiers\": {},\n \"selectedFiles\": { required: true },\n \"selectedFilesModifiers\": {}\n }),\n emits: [\"update:path\", \"update:selectedFiles\"],\n setup(__props) {\n const path = useModel(__props, \"path\");\n const selectedFiles = useModel(__props, \"selectedFiles\");\n const props = __props;\n const customSortingConfig = ref();\n const { currentConfig: filesAppSorting } = useFilesViews(props.currentView);\n const sortingConfig = computed(() => customSortingConfig.value ?? filesAppSorting.value);\n const sortByName = computed(() => sortingConfig.value.sortBy === \"basename\" ? sortingConfig.value.order === \"none\" ? void 0 : sortingConfig.value.order : void 0);\n const sortBySize = computed(() => sortingConfig.value.sortBy === \"size\" ? sortingConfig.value.order === \"none\" ? void 0 : sortingConfig.value.order : void 0);\n const sortByModified = computed(() => sortingConfig.value.sortBy === \"mtime\" ? sortingConfig.value.order === \"none\" ? void 0 : sortingConfig.value.order : void 0);\n function toggleSorting(sortBy) {\n if (sortingConfig.value.sortBy === sortBy) {\n if (sortingConfig.value.order === \"ascending\") {\n customSortingConfig.value = { sortBy: sortingConfig.value.sortBy, order: \"descending\" };\n } else {\n customSortingConfig.value = { sortBy: sortingConfig.value.sortBy, order: \"ascending\" };\n }\n } else {\n customSortingConfig.value = { sortBy, order: \"ascending\" };\n }\n }\n const { sortFavoritesFirst, cropImagePreviews } = useFilesSettings();\n const sortedFiles = computed(() => {\n return sortNodes(props.files, {\n sortFoldersFirst: true,\n sortFavoritesFirst: sortFavoritesFirst.value,\n sortingOrder: sortingConfig.value.order === \"descending\" ? \"desc\" : \"asc\",\n sortingMode: sortingConfig.value.sortBy\n });\n });\n const selectableFiles = computed(() => props.files.filter((file) => props.allowPickDirectory || file.type !== FileType.Folder));\n const allSelected = computed(() => !props.loading && selectedFiles.value.length > 0 && selectedFiles.value.length >= selectableFiles.value.length);\n function onSelectAll() {\n if (selectedFiles.value.length < selectableFiles.value.length) {\n selectedFiles.value = [...selectableFiles.value];\n } else {\n selectedFiles.value = [];\n }\n }\n function onNodeSelected(file) {\n if (selectedFiles.value.includes(file)) {\n selectedFiles.value = selectedFiles.value.filter((f) => f.path !== file.path);\n } else {\n if (props.multiselect) {\n selectedFiles.value = [...selectedFiles.value, file];\n } else {\n selectedFiles.value = [file];\n }\n }\n }\n function onChangeDirectory(dir) {\n path.value = dir.path;\n }\n const skeletonNumber = ref(4);\n const fileContainer = ref();\n {\n const resize = () => nextTick(() => {\n const nodes = fileContainer.value?.parentElement?.children || [];\n let height = fileContainer.value?.parentElement?.clientHeight || 450;\n for (let index = 0; index < nodes.length; index++) {\n if (!fileContainer.value?.isSameNode(nodes[index])) {\n height -= nodes[index].clientHeight;\n }\n }\n skeletonNumber.value = Math.max(1, Math.floor((height - 50) / 50));\n });\n onMounted(() => {\n window.addEventListener(\"resize\", resize);\n resize();\n });\n onUnmounted(() => {\n window.removeEventListener(\"resize\", resize);\n });\n }\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n ref_key: \"fileContainer\",\n ref: fileContainer,\n class: \"file-picker__files\"\n }, [\n createElementVNode(\"table\", null, [\n createElementVNode(\"thead\", null, [\n createElementVNode(\"tr\", null, [\n __props.multiselect ? (openBlock(), createElementBlock(\"th\", _hoisted_1$6, [\n createElementVNode(\"span\", _hoisted_2$5, toDisplayString(unref(t)(\"Select entry\")), 1),\n __props.multiselect ? (openBlock(), createBlock(unref(NcCheckboxRadioSwitch), {\n key: 0,\n \"aria-label\": unref(t)(\"Select all entries\"),\n \"data-testid\": \"select-all-checkbox\",\n modelValue: allSelected.value,\n \"onUpdate:modelValue\": onSelectAll\n }, null, 8, [\"aria-label\", \"modelValue\"])) : createCommentVNode(\"\", true)\n ])) : createCommentVNode(\"\", true),\n createElementVNode(\"th\", {\n \"aria-sort\": sortByName.value,\n class: \"row-name\"\n }, [\n createElementVNode(\"div\", _hoisted_4$4, [\n _cache[3] || (_cache[3] = createElementVNode(\"span\", { class: \"file-picker__header-preview\" }, null, -1)),\n createVNode(unref(NcButton), {\n \"data-test\": \"file-picker_sort-name\",\n variant: \"tertiary\",\n wide: \"\",\n onClick: _cache[0] || (_cache[0] = ($event) => toggleSorting(\"basename\"))\n }, {\n icon: withCtx(() => [\n sortByName.value === \"ascending\" ? (openBlock(), createBlock(IconSortAscending, {\n key: 0,\n size: 20\n })) : sortByName.value === \"descending\" ? (openBlock(), createBlock(IconSortDescending, {\n key: 1,\n size: 20\n })) : (openBlock(), createElementBlock(\"span\", _hoisted_5))\n ]),\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(unref(t)(\"Name\")), 1)\n ]),\n _: 1\n })\n ])\n ], 8, _hoisted_3$4),\n createElementVNode(\"th\", {\n \"aria-sort\": sortBySize.value,\n class: \"row-size\"\n }, [\n createVNode(unref(NcButton), {\n variant: \"tertiary\",\n wide: \"\",\n onClick: _cache[1] || (_cache[1] = ($event) => toggleSorting(\"size\"))\n }, {\n icon: withCtx(() => [\n sortBySize.value === \"ascending\" ? (openBlock(), createBlock(IconSortAscending, {\n key: 0,\n size: 20\n })) : sortBySize.value === \"descending\" ? (openBlock(), createBlock(IconSortDescending, {\n key: 1,\n size: 20\n })) : (openBlock(), createElementBlock(\"span\", _hoisted_7))\n ]),\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(unref(t)(\"Size\")), 1)\n ]),\n _: 1\n })\n ], 8, _hoisted_6),\n createElementVNode(\"th\", {\n \"aria-sort\": sortByModified.value,\n class: \"row-modified\"\n }, [\n createVNode(unref(NcButton), {\n variant: \"tertiary\",\n wide: \"\",\n onClick: _cache[2] || (_cache[2] = ($event) => toggleSorting(\"mtime\"))\n }, {\n icon: withCtx(() => [\n sortByModified.value === \"ascending\" ? (openBlock(), createBlock(IconSortAscending, {\n key: 0,\n size: 20\n })) : sortByModified.value === \"descending\" ? (openBlock(), createBlock(IconSortDescending, {\n key: 1,\n size: 20\n })) : (openBlock(), createElementBlock(\"span\", _hoisted_9))\n ]),\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(unref(t)(\"Modified\")), 1)\n ]),\n _: 1\n })\n ], 8, _hoisted_8)\n ])\n ]),\n createElementVNode(\"tbody\", null, [\n __props.loading ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(skeletonNumber.value, (index) => {\n return openBlock(), createBlock(LoadingTableRow, {\n key: index,\n showCheckbox: __props.multiselect\n }, null, 8, [\"showCheckbox\"]);\n }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(sortedFiles.value, (file) => {\n return openBlock(), createBlock(FileListRow, {\n key: file.fileid || file.path,\n allowPickDirectory: __props.allowPickDirectory,\n showCheckbox: __props.multiselect,\n canPick: (__props.multiselect || selectedFiles.value.length === 0 || selectedFiles.value.includes(file)) && (__props.canPick === void 0 || __props.canPick(file)),\n selected: selectedFiles.value.includes(file),\n node: file,\n cropImagePreviews: unref(cropImagePreviews),\n \"onUpdate:selected\": ($event) => onNodeSelected(file),\n onEnterDirectory: onChangeDirectory\n }, null, 8, [\"allowPickDirectory\", \"showCheckbox\", \"canPick\", \"selected\", \"node\", \"cropImagePreviews\", \"onUpdate:selected\"]);\n }), 128))\n ])\n ])\n ], 512);\n };\n }\n});\nconst FileList = /* @__PURE__ */ _export_sfc(_sfc_main$7, [[\"__scopeId\", \"data-v-412efd5c\"]]);\nconst _sfc_main$6 = {\n name: \"HomeIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$5 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$4 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$3 = { d: \"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z\" };\nconst _hoisted_4$3 = { key: 0 };\nfunction _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon home-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$3, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$3, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$4))\n ], 16, _hoisted_1$5);\n}\nconst IconHome = /* @__PURE__ */ _export_sfc(_sfc_main$6, [[\"render\", _sfc_render$3]]);\nconst _sfc_main$5 = {\n name: \"PlusIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$4 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$3 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$2 = { d: \"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z\" };\nconst _hoisted_4$2 = { key: 0 };\nfunction _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon plus-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$2, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$2, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$3))\n ], 16, _hoisted_1$4);\n}\nconst IconPlus = /* @__PURE__ */ _export_sfc(_sfc_main$5, [[\"render\", _sfc_render$2]]);\nconst _sfc_main$4 = /* @__PURE__ */ defineComponent({\n __name: \"FilePickerBreadcrumbs\",\n props: /* @__PURE__ */ mergeModels({\n showMenu: { type: Boolean }\n }, {\n \"path\": { required: true },\n \"pathModifiers\": {}\n }),\n emits: /* @__PURE__ */ mergeModels([\"createNode\"], [\"update:path\"]),\n setup(__props, { emit: __emit }) {\n const path = useModel(__props, \"path\");\n const emit2 = __emit;\n const actionsOpen = ref(false);\n const newNodeName = ref(\"\");\n const nameInput = useTemplateRef(\"nameInput\");\n function validateInput() {\n const name = newNodeName.value.trim();\n const input = nameInput.value?.$el?.querySelector(\"input\");\n let validity = \"\";\n try {\n validateFilename(name);\n } catch (error) {\n if (!(error instanceof InvalidFilenameError)) {\n throw error;\n }\n switch (error.reason) {\n case InvalidFilenameErrorReason.Character:\n validity = t('\"{char}\" is not allowed inside a folder name.', { char: error.segment });\n break;\n case InvalidFilenameErrorReason.ReservedName:\n validity = t('\"{segment}\" is a reserved name and not allowed for folder names.', { segment: error.segment });\n break;\n case InvalidFilenameErrorReason.Extension:\n validity = t('Folder names must not end with \"{extension}\".', { extension: error.segment });\n break;\n default:\n validity = t(\"Invalid folder name.\");\n }\n }\n if (input) {\n input.setCustomValidity(validity);\n }\n return validity === \"\";\n }\n function onSubmit() {\n const name = newNodeName.value.trim();\n if (validateInput()) {\n actionsOpen.value = false;\n emit2(\"createNode\", name);\n newNodeName.value = \"\";\n }\n }\n const pathElements = computed(() => path.value.split(\"/\").filter((v) => v !== \"\").map((v, i, elements) => ({\n name: v,\n path: \"/\" + elements.slice(0, i + 1).join(\"/\")\n })));\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(NcBreadcrumbs), { class: \"file-picker__breadcrumbs\" }, createSlots({\n default: withCtx(() => [\n createVNode(unref(NcBreadcrumb), {\n name: unref(t)(\"All files\"),\n title: unref(t)(\"Home\"),\n onClick: _cache[0] || (_cache[0] = ($event) => path.value = \"/\")\n }, {\n icon: withCtx(() => [\n createVNode(IconHome, { size: 20 })\n ]),\n _: 1\n }, 8, [\"name\", \"title\"]),\n (openBlock(true), createElementBlock(Fragment, null, renderList(pathElements.value, (dir) => {\n return openBlock(), createBlock(unref(NcBreadcrumb), {\n key: dir.path,\n name: dir.name,\n title: dir.path,\n onClick: ($event) => path.value = dir.path\n }, null, 8, [\"name\", \"title\", \"onClick\"]);\n }), 128))\n ]),\n _: 2\n }, [\n __props.showMenu ? {\n name: \"actions\",\n fn: withCtx(() => [\n createVNode(unref(NcActions), {\n open: actionsOpen.value,\n \"onUpdate:open\": _cache[2] || (_cache[2] = ($event) => actionsOpen.value = $event),\n \"aria-label\": unref(t)(\"Create directory\"),\n forceMenu: true,\n forceName: true,\n menuName: unref(t)(\"New\"),\n variant: \"secondary\",\n onClose: _cache[3] || (_cache[3] = ($event) => newNodeName.value = \"\")\n }, {\n icon: withCtx(() => [\n createVNode(IconPlus, { size: 20 })\n ]),\n default: withCtx(() => [\n createVNode(unref(NcActionInput), {\n ref_key: \"nameInput\",\n ref: nameInput,\n modelValue: newNodeName.value,\n \"onUpdate:modelValue\": [\n _cache[1] || (_cache[1] = ($event) => newNodeName.value = $event),\n validateInput\n ],\n label: unref(t)(\"New folder\"),\n placeholder: unref(t)(\"New folder name\"),\n onSubmit\n }, {\n icon: withCtx(() => [\n createVNode(IconFolder, { size: 20 })\n ]),\n _: 1\n }, 8, [\"modelValue\", \"label\", \"placeholder\"])\n ]),\n _: 1\n }, 8, [\"open\", \"aria-label\", \"menuName\"])\n ]),\n key: \"0\"\n } : void 0\n ]), 1024);\n };\n }\n});\nconst FilePickerBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$4, [[\"__scopeId\", \"data-v-b448b141\"]]);\nconst _sfc_main$3 = {\n name: \"CloseIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$3 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$2 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$1 = { d: \"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z\" };\nconst _hoisted_4$1 = { key: 0 };\nfunction _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon close-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3$1, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$1, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$2))\n ], 16, _hoisted_1$3);\n}\nconst IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$3, [[\"render\", _sfc_render$1]]);\nconst _sfc_main$2 = {\n name: \"MagnifyIcon\",\n emits: [\"click\"],\n props: {\n title: {\n type: String\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n};\nconst _hoisted_1$2 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$1 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3 = { d: \"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z\" };\nconst _hoisted_4 = { key: 0 };\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n \"aria-hidden\": $props.title ? null : \"true\",\n \"aria-label\": $props.title,\n class: \"material-design-icon magnify-icon\",\n role: \"img\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), [\n (openBlock(), createElementBlock(\"svg\", {\n fill: $props.fillColor,\n class: \"material-design-icon__svg\",\n width: $props.size,\n height: $props.size,\n viewBox: \"0 0 24 24\"\n }, [\n createElementVNode(\"path\", _hoisted_3, [\n $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n ])\n ], 8, _hoisted_2$1))\n ], 16, _hoisted_1$2);\n}\nconst IconMagnify = /* @__PURE__ */ _export_sfc(_sfc_main$2, [[\"render\", _sfc_render]]);\nfunction useViews(isAnonymous) {\n const allViews = [\n {\n id: \"files\",\n label: t(\"All files\"),\n icon: mdiFolder\n },\n {\n id: \"recent\",\n label: t(\"Recent\"),\n icon: mdiClock\n },\n {\n id: \"favorites\",\n label: t(\"Favorites\"),\n icon: mdiStar\n }\n ];\n const availableViews = isAnonymous.value ? allViews.filter(({ id }) => id === \"files\") : allViews;\n return {\n allViews,\n availableViews\n };\n}\nconst _hoisted_1$1 = {\n key: 0,\n class: \"file-picker__side\"\n};\nconst _sfc_main$1 = /* @__PURE__ */ defineComponent({\n __name: \"FilePickerNavigation\",\n props: {\n currentView: {},\n filterString: {},\n isCollapsed: { type: Boolean },\n disabledNavigation: { type: Boolean }\n },\n emits: [\"update:currentView\", \"update:filterString\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit2 = __emit;\n const { availableViews } = useViews(ref(getCurrentUser() === null));\n const currentViewObject = computed(() => availableViews.filter((v) => v.id === props.currentView)[0] ?? availableViews[0]);\n const updateFilterValue = (value) => emit2(\"update:filterString\", value.toString());\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(Fragment, null, [\n createVNode(unref(NcTextField), {\n class: \"file-picker__filter-input\",\n label: unref(t)(\"Filter file list\"),\n showTrailingButton: !!__props.filterString,\n modelValue: __props.filterString,\n \"onUpdate:modelValue\": updateFilterValue,\n onTrailingButtonClick: _cache[0] || (_cache[0] = ($event) => updateFilterValue(\"\"))\n }, {\n \"trailing-button-icon\": withCtx(() => [\n createVNode(IconClose, { size: 16 })\n ]),\n default: withCtx(() => [\n createVNode(IconMagnify, { size: 16 })\n ]),\n _: 1\n }, 8, [\"label\", \"showTrailingButton\", \"modelValue\"]),\n unref(availableViews).length > 1 && !__props.disabledNavigation ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n !__props.isCollapsed ? (openBlock(), createElementBlock(\"ul\", _hoisted_1$1, [\n (openBlock(true), createElementBlock(Fragment, null, renderList(unref(availableViews), (view) => {\n return openBlock(), createElementBlock(\"li\", {\n key: view.id\n }, [\n createVNode(unref(NcButton), {\n variant: __props.currentView === view.id ? \"primary\" : \"tertiary\",\n wide: true,\n onClick: ($event) => _ctx.$emit(\"update:currentView\", view.id)\n }, {\n icon: withCtx(() => [\n createVNode(unref(NcIconSvgWrapper), {\n path: view.icon,\n size: 20\n }, null, 8, [\"path\"])\n ]),\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(view.label), 1)\n ]),\n _: 2\n }, 1032, [\"variant\", \"onClick\"])\n ]);\n }), 128))\n ])) : (openBlock(), createBlock(unref(NcSelect), {\n key: 1,\n \"aria-label\": unref(t)(\"Current view selector\"),\n clearable: false,\n searchable: false,\n options: unref(availableViews),\n modelValue: currentViewObject.value,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => emit2(\"update:currentView\", $event.id))\n }, null, 8, [\"aria-label\", \"options\", \"modelValue\"]))\n ], 64)) : createCommentVNode(\"\", true)\n ], 64);\n };\n }\n});\nconst FilePickerNavigation = /* @__PURE__ */ _export_sfc(_sfc_main$1, [[\"__scopeId\", \"data-v-e1c54e23\"]]);\nasync function getRecentNodes({ client, signal }) {\n const lastTwoWeek = Math.round(Date.now() / 1e3) - 60 * 60 * 24 * 14;\n const { data } = await client.search(\"/\", {\n signal,\n details: true,\n data: getRecentSearch(lastTwoWeek)\n });\n return data.results.map((result) => resultToNode(result));\n}\nasync function getNodes({ client, path, signal }) {\n const results = await client.getDirectoryContents(join(defaultRootPath, path), {\n signal,\n details: true,\n includeSelf: true,\n data: getDefaultPropfind()\n });\n const nodes = results.data.map((result) => resultToNode(result));\n return {\n contents: nodes.filter(({ path: nodePath }) => nodePath !== path),\n folder: nodes.find(({ path: nodePath }) => path === nodePath)\n };\n}\nasync function getFile(client, path) {\n const { data } = await client.stat(join(defaultRootPath, path), {\n details: true,\n data: getDefaultPropfind()\n });\n return resultToNode(data);\n}\nfunction useDAVFiles(currentView, currentPath) {\n const client = getClient();\n const files = shallowRef([]);\n const folder = shallowRef(null);\n const isLoading = ref(true);\n let abortController;\n async function createDirectory(name) {\n const path = join(currentPath.value, name);\n await client.createDirectory(join(defaultRootPath, path));\n const directory = await getFile(client, path);\n files.value = [...files.value, directory];\n return directory;\n }\n async function loadDAVFiles() {\n if (abortController) {\n abortController.abort();\n abortController = void 0;\n }\n abortController = new AbortController();\n isLoading.value = true;\n try {\n if (currentView.value === \"favorites\") {\n files.value = await getFavoriteNodes({ client, path: currentPath.value, signal: abortController.signal });\n folder.value = null;\n } else if (currentView.value === \"recent\") {\n files.value = await getRecentNodes({ client, signal: abortController.signal });\n folder.value = null;\n } else {\n const content = await getNodes({ client, path: currentPath.value, signal: abortController.signal });\n folder.value = content.folder;\n files.value = content.contents;\n }\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n return;\n }\n throw error;\n } finally {\n abortController = void 0;\n isLoading.value = false;\n }\n }\n watch([currentView, currentPath], () => loadDAVFiles());\n onMounted(() => loadDAVFiles());\n return {\n isLoading,\n files,\n folder,\n loadFiles: loadDAVFiles,\n createDirectory\n };\n}\nfunction useMimeFilter(allowedMIMETypes) {\n const splittedTypes = computed(() => allowedMIMETypes.value.map((filter) => filter.split(\"/\")));\n const isSupportedMimeType = (mime) => {\n const mimeTypeArray = mime.split(\"/\");\n return splittedTypes.value.some(([type, subtype]) => (\n // check mime type matches or is wildcard\n (mimeTypeArray[0] === type || type === \"*\") && (mimeTypeArray[1] === subtype || subtype === \"*\")\n ));\n };\n return {\n isSupportedMimeType\n };\n}\nconst _hoisted_1 = { class: \"file-picker__main\" };\nconst _hoisted_2 = {\n key: 1,\n class: \"file-picker__view\"\n};\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"FilePicker\",\n props: {\n buttons: {},\n name: {},\n allowPickDirectory: { type: Boolean, default: false },\n noMenu: { type: Boolean, default: false },\n disabledNavigation: { type: Boolean, default: false },\n filterFn: { type: Function, default: void 0 },\n canPickFn: { type: Function, default: void 0 },\n mimetypeFilter: { default: () => [] },\n multiselect: { type: Boolean, default: false },\n path: { default: void 0 }\n },\n emits: [\"close\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit$1 = __emit;\n const isOpen = ref(true);\n const currentView = ref(\"files\");\n const savedPath = ref(window?.sessionStorage.getItem(\"NC.FilePicker.LastPath\") || \"/\");\n const navigatedPath = ref(\"\");\n const currentPath = computed({\n get: () => {\n return currentView.value === \"files\" ? navigatedPath.value || props.path || savedPath.value : \"/\";\n },\n set: (path) => {\n navigatedPath.value = path;\n }\n });\n const selectedFiles = shallowRef([]);\n const filterString = ref(\"\");\n const {\n files,\n folder: currentFolder,\n isLoading,\n loadFiles,\n createDirectory\n } = useDAVFiles(currentView, currentPath);\n watch([navigatedPath], () => {\n if (props.path === void 0 && navigatedPath.value) {\n window.sessionStorage.setItem(\"NC.FilePicker.LastPath\", navigatedPath.value);\n }\n selectedFiles.value = [];\n filterString.value = \"\";\n });\n let isHandlingCallback = false;\n const dialogButtons = computed(() => {\n const nodes = selectedFiles.value.length === 0 && props.allowPickDirectory && currentFolder.value && (!props.canPickFn || props.canPickFn(currentFolder.value)) ? [currentFolder.value] : selectedFiles.value;\n const buttons = typeof props.buttons === \"function\" ? props.buttons(nodes, currentPath.value, currentView.value) : props.buttons;\n return buttons.map((button) => ({\n ...button,\n disabled: button.disabled || isLoading.value,\n callback: () => {\n isHandlingCallback = true;\n handleButtonClick(button.callback, nodes);\n }\n }));\n });\n async function handleButtonClick(callback, nodes) {\n await callback(nodes);\n emit$1(\"close\", nodes);\n isHandlingCallback = false;\n }\n const viewHeadline = computed(() => currentView.value === \"favorites\" ? t(\"Favorites\") : currentView.value === \"recent\" ? t(\"Recent\") : \"\");\n const { isSupportedMimeType } = useMimeFilter(toRef(props, \"mimetypeFilter\"));\n onMounted(() => loadFiles());\n const { showHiddenFiles } = useFilesSettings();\n const filteredFiles = computed(() => {\n let filtered = files.value;\n if (!showHiddenFiles.value) {\n filtered = filtered.filter((file) => !file.basename.startsWith(\".\"));\n }\n if (props.mimetypeFilter.length > 0) {\n filtered = filtered.filter((file) => file.type === \"folder\" || file.mime && isSupportedMimeType(file.mime));\n }\n if (filterString.value) {\n filtered = filtered.filter((file) => file.basename.toLowerCase().includes(filterString.value.toLowerCase()));\n }\n if (props.filterFn) {\n filtered = filtered.filter((f) => props.filterFn(f));\n }\n return filtered;\n });\n const noFilesDescription = computed(() => {\n if (currentView.value === \"files\") {\n return t(\"Upload some content or sync with your devices!\");\n } else if (currentView.value === \"recent\") {\n return t(\"Files and folders you recently modified will show up here.\");\n } else {\n return t(\"Files and folders you mark as favorite will show up here.\");\n }\n });\n async function onCreateFolder(name) {\n try {\n const folder = await createDirectory(name);\n navigatedPath.value = folder.path;\n emit(\"files:node:created\", files.value.filter((file) => file.basename === name)[0]);\n } catch (error) {\n logger.warn(\"Could not create new folder\", { name, error });\n showError(t(\"Could not create the new folder\"));\n }\n }\n function handleClose(open) {\n if (!open && !isHandlingCallback) {\n emit$1(\"close\");\n }\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(NcDialog), {\n open: isOpen.value,\n \"onUpdate:open\": [\n _cache[6] || (_cache[6] = ($event) => isOpen.value = $event),\n handleClose\n ],\n buttons: dialogButtons.value,\n name: __props.name,\n size: \"large\",\n contentClasses: \"file-picker__content\",\n dialogClasses: \"file-picker\",\n navigationClasses: \"file-picker__navigation\"\n }, {\n navigation: withCtx(({ isCollapsed }) => [\n createVNode(FilePickerNavigation, {\n currentView: currentView.value,\n \"onUpdate:currentView\": _cache[0] || (_cache[0] = ($event) => currentView.value = $event),\n filterString: filterString.value,\n \"onUpdate:filterString\": _cache[1] || (_cache[1] = ($event) => filterString.value = $event),\n isCollapsed,\n disabledNavigation: __props.disabledNavigation\n }, null, 8, [\"currentView\", \"filterString\", \"isCollapsed\", \"disabledNavigation\"])\n ]),\n default: withCtx(() => [\n createElementVNode(\"div\", _hoisted_1, [\n currentView.value === \"files\" ? (openBlock(), createBlock(FilePickerBreadcrumbs, {\n key: 0,\n path: currentPath.value,\n \"onUpdate:path\": _cache[2] || (_cache[2] = ($event) => currentPath.value = $event),\n showMenu: !__props.noMenu,\n onCreateNode: onCreateFolder\n }, null, 8, [\"path\", \"showMenu\"])) : (openBlock(), createElementBlock(\"div\", _hoisted_2, [\n createElementVNode(\"h3\", null, toDisplayString(viewHeadline.value), 1)\n ])),\n unref(isLoading) || filteredFiles.value.length > 0 ? (openBlock(), createBlock(FileList, {\n key: 2,\n path: currentPath.value,\n \"onUpdate:path\": [\n _cache[3] || (_cache[3] = ($event) => currentPath.value = $event),\n _cache[5] || (_cache[5] = ($event) => currentView.value = \"files\")\n ],\n selectedFiles: selectedFiles.value,\n \"onUpdate:selectedFiles\": _cache[4] || (_cache[4] = ($event) => selectedFiles.value = $event),\n allowPickDirectory: __props.allowPickDirectory,\n currentView: currentView.value,\n files: filteredFiles.value,\n multiselect: __props.multiselect,\n loading: unref(isLoading),\n name: viewHeadline.value,\n canPick: __props.canPickFn\n }, null, 8, [\"path\", \"selectedFiles\", \"allowPickDirectory\", \"currentView\", \"files\", \"multiselect\", \"loading\", \"name\", \"canPick\"])) : filterString.value ? (openBlock(), createBlock(unref(NcEmptyContent), {\n key: 3,\n name: unref(t)(\"No matching files\"),\n description: unref(t)(\"No files matching your filter were found.\")\n }, {\n icon: withCtx(() => [\n createVNode(IconFile)\n ]),\n _: 1\n }, 8, [\"name\", \"description\"])) : (openBlock(), createBlock(unref(NcEmptyContent), {\n key: 4,\n name: unref(t)(\"No files in here\"),\n description: noFilesDescription.value\n }, {\n icon: withCtx(() => [\n createVNode(IconFile)\n ]),\n _: 1\n }, 8, [\"name\", \"description\"]))\n ])\n ]),\n _: 1\n }, 8, [\"open\", \"buttons\", \"name\"]);\n };\n }\n});\nconst FilePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__scopeId\", \"data-v-39182aaf\"]]);\nexport {\n FilePicker as default\n};\n//# sourceMappingURL=FilePicker.mjs.map\n"],"names":["_sfc_main$1","_hoisted_1$1","_hoisted_2","_hoisted_3","_hoisted_4","_sfc_render$1","_ctx","_cache","$props","$setup","$data","$options","openBlock","createElementBlock","mergeProps","$event","createElementVNode","toDisplayString","createCommentVNode","ChevronRight","_export_sfc","_sfc_main","NcActions","NcButton","crumbId","createElementId","open","e","_hoisted_1","_sfc_render","_component_NcButton","resolveComponent","_component_NcActions","_component_ChevronRight","normalizeClass","withModifiers","args","createBlock","createSlots","withCtx","renderSlot","createTextVNode","createVNode","NcBreadcrumb","IconFolder","crumbClass","NcActionButton","NcActionRouter","NcActionLink","debounce","subscribe","unsubscribe","nrCrumbs","hiddenIndices","availableWidth","totalWidth","overflow","i","startIndex","currentIndex","a","b","width","crumb","index","el","isLast","hide","w","path","disabled","crumbs","target","vnode","breadcrumbs","Fragment","child","cloneVNode","breadcrumbsRefs","crumb2","h","to","href","disableDrop","name","propsToForward","element","folderIcon","wrapper","isSlotPopulated","NcBreadcrumbs","queue","PQueue","preloadImage","url","resolve","promise","image","getPreviewURL","node","options","previewUrl","generateUrl","usePreviewURL","previewURL","ref","previewLoaded","watchEffect","toValue","FileType","success","sfc","props","key","val","_sfc_main$e","_hoisted_1$c","_hoisted_2$b","_hoisted_3$a","_hoisted_4$a","_sfc_render$7","IconFile","_sfc_main$d","_hoisted_1$b","_hoisted_2$a","_hoisted_3$9","_hoisted_4$9","_sfc_render$6","IconSortDescending","_sfc_main$c","_hoisted_1$a","_hoisted_2$9","_hoisted_3$8","_hoisted_4$8","_sfc_render$5","IconSortAscending","_sfc_main$b","_hoisted_1$9","_hoisted_2$8","_hoisted_3$7","_hoisted_4$7","_sfc_render$4","fileListIconStyles","_sfc_main$a","defineComponent","__props","fileListIconStyles$1","toRef","computed","isFile","folderDecorationIcon","mdiKey","mdiTagOutline","shareTypes","type","ShareType","mdiLink","mdiAccountPlus","mdiNetworkOutline","mdiAccountGroupOutline","normalizeStyle","unref","NcIconSvgWrapper","_hoisted_1$8","_hoisted_2$7","_hoisted_3$6","_hoisted_4$6","_hoisted_5$1","_hoisted_6$1","_hoisted_7$1","_sfc_main$9","__emit","emit2","timestamp","fileExtension","extname","displayName","isDirectory","isPickable","isNavigatable","Permission","toggleSelected","handleClick","handleKeyDown","event","toHandlers","NcCheckboxRadioSwitch","t","formatFileSize","NcDateTime","FileListRow","_hoisted_1$7","_hoisted_2$6","_hoisted_3$5","_hoisted_4$5","_sfc_main$8","LoadingTableRow","useFilesSettings","filesUserState","loadState","showHiddenFiles","sortFavoritesFirst","cropImagePreviews","onMounted","isPublicShare","logger","data","axios","error","showError","useFilesViews","currentView","convertOrder","order2","filesViewsState","filesViewConfig","recentViewConfig","favoritesViewConfig","currentConfig","sortBy","order","_hoisted_1$6","_hoisted_2$5","_hoisted_3$4","_hoisted_4$4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_sfc_main$7","mergeModels","useModel","selectedFiles","customSortingConfig","filesAppSorting","sortingConfig","sortByName","sortBySize","sortByModified","toggleSorting","sortedFiles","sortNodes","selectableFiles","file","allSelected","onSelectAll","onNodeSelected","f","onChangeDirectory","dir","skeletonNumber","fileContainer","resize","nextTick","nodes","height","onUnmounted","renderList","FileList","_sfc_main$6","_hoisted_1$5","_hoisted_2$4","_hoisted_3$3","_hoisted_4$3","_sfc_render$3","IconHome","_sfc_main$5","_hoisted_1$4","_hoisted_2$3","_hoisted_3$2","_hoisted_4$2","_sfc_render$2","IconPlus","_sfc_main$4","actionsOpen","newNodeName","nameInput","useTemplateRef","validateInput","input","validity","validateFilename","InvalidFilenameError","InvalidFilenameErrorReason","onSubmit","pathElements","v","elements","NcActionInput","FilePickerBreadcrumbs","_sfc_main$3","_hoisted_1$3","_hoisted_2$2","_hoisted_3$1","_hoisted_4$1","IconClose","_sfc_main$2","_hoisted_1$2","_hoisted_2$1","IconMagnify","useViews","isAnonymous","allViews","mdiFolder","mdiClock","mdiStar","availableViews","id","getCurrentUser","currentViewObject","updateFilterValue","value","NcTextField","NcSelect","view","FilePickerNavigation","getRecentNodes","client","signal","lastTwoWeek","getRecentSearch","result","resultToNode","getNodes","join","defaultRootPath","getDefaultPropfind","nodePath","getFile","useDAVFiles","currentPath","getClient","files","shallowRef","folder","isLoading","abortController","createDirectory","directory","loadDAVFiles","getFavoriteNodes","content","watch","useMimeFilter","allowedMIMETypes","splittedTypes","filter","mime","mimeTypeArray","subtype","emit$1","isOpen","savedPath","navigatedPath","filterString","currentFolder","loadFiles","isHandlingCallback","dialogButtons","button","handleButtonClick","callback","viewHeadline","isSupportedMimeType","filteredFiles","filtered","noFilesDescription","onCreateFolder","emit","handleClose","NcDialog","isCollapsed","NcEmptyContent","FilePicker"],"mappings":"k6DAMA,MAAMA,GAAc,CAClB,KAAM,mBACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,MACZ,EACI,UAAW,CACT,KAAM,OACN,QAAS,cACf,EACI,KAAM,CACJ,KAAM,OACN,QAAS,EACf,CACA,CACA,EACMC,GAAe,CAAC,cAAe,YAAY,EAC3CC,GAAa,CA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,EAAS,EAAIyB,EAAY4H,EAAMoN,EAAc,EAAG,CACjF,IAAK,EACL,KAAMpN,EAAM0B,CAAC,EAAE,kBAAkB,EACjC,YAAaoL,EAAmB,KAC9C,EAAe,CACD,KAAMxU,EAAQ,IAAM,CAClBG,EAAY+E,EAAQ,CACpC,CAAe,EACD,EAAG,CACjB,EAAe,EAAG,CAAC,OAAQ,aAAa,CAAC,EACzC,CAAW,CACX,CAAS,EACD,EAAG,CACX,EAAS,EAAG,CAAC,OAAQ,UAAW,MAAM,CAAC,EAErC,CACF,CAAC,EACK6P,GAA6BlW,EAAYC,GAAW,CAAC,CAAC,YAAa,iBAAiB,CAAC,CAAC","x_google_ignoreList":[0,1,2,3,4]} \ No newline at end of file diff --git a/dist/FilePicker-BRLNOlwO.chunk.mjs.map.license b/dist/FilePicker-Cghq-bGr.chunk.mjs.map.license similarity index 100% rename from dist/FilePicker-BRLNOlwO.chunk.mjs.map.license rename to dist/FilePicker-Cghq-bGr.chunk.mjs.map.license diff --git a/dist/FilesVersionsSidebarTab-Bdeocctt.chunk.mjs b/dist/FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs similarity index 98% rename from dist/FilesVersionsSidebarTab-Bdeocctt.chunk.mjs rename to dist/FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs index c0818133bfd9c..0166e375118d8 100644 --- a/dist/FilesVersionsSidebarTab-Bdeocctt.chunk.mjs +++ b/dist/FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs @@ -1,4 +1,4 @@ -import{d as j,a as Y}from"./index-DCJOwzzz.chunk.mjs";import{a as B,j as te,g as se,b as J,h as oe,f as N}from"./index-DgEyzq8A.chunk.mjs";import{t as d,a as P}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{N as ne,w as re,u as ae}from"./index-CO7ZwNPX.chunk.mjs";import{N as le}from"./mdi-CYMOyMtM.chunk.mjs";import{f as ce}from"./index-CPriPmaq.chunk.mjs";import{a as D,l as de,e as ue,j as ve}from"./index-C3KLQ_oe.chunk.mjs";import{N as I,P as me}from"./PencilOutline-Byyi13ia.chunk.mjs";import{N as pe}from"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{N as fe}from"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import{a as he,_ as ge}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{D as be,N as ye,s as we}from"./TrayArrowDown-DQikeHMO.chunk.mjs";import{o as r,j as m,k as C,t as _,m as y,y as Q,b as O,r as $,c as H,w as h,u,g as E,e as S,p as g,H as G,s as _e,a3 as X,l as M,B as ee,v as Ce,F as ke,A as Ve}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{D as Se}from"./TrashCanOutline-BZ98FFoG.chunk.mjs";import{P as Z}from"./externalStorageUtils-BzJyVKar.chunk.mjs";import{c as He}from"./index-9ZBo3L67.chunk.mjs";import{g as ze}from"./dav-q7lxn7Ev.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./index-Ds0AsAbv.chunk.mjs";const Ae={name:"BackupRestoreIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Le=["aria-hidden","aria-label"],$e=["fill","width","height"],xe={d:"M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z"},De={key:0};function Ee(e,t,i,l,c,n){return r(),m("span",Q(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon backup-restore-icon",role:"img",onClick:t[0]||(t[0]=a=>e.$emit("click",a))}),[(r(),m("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[C("path",xe,[i.title?(r(),m("title",De,_(i.title),1)):y("",!0)])],8,$e))],16,Le)}const Te=D(Ae,[["render",Ee]]),Ne={name:"FileCompareIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ie=["aria-hidden","aria-label"],Me=["fill","width","height"],Be={d:"M10,18H6V16H10V18M10,14H6V12H10V14M10,1V2H6C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H10V23H12V1H10M20,8V20C20,21.11 19.11,22 18,22H14V20H18V11H14V9H18.5L14,4.5V2L20,8M16,14H14V12H16V14M16,18H14V16H16V18Z"},Pe={key:0};function Oe(e,t,i,l,c,n){return r(),m("span",Q(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon file-compare-icon",role:"img",onClick:t[0]||(t[0]=a=>e.$emit("click",a))}),[(r(),m("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[C("path",Be,[i.title?(r(),m("title",Pe,_(i.title),1)):y("",!0)])],8,Me))],16,Ie)}const Re=D(Ne,[["render",Oe]]),Fe={name:"ImageOffOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ue=["aria-hidden","aria-label"],qe=["fill","width","height"],Ke={d:"M22 20.7L3.3 2L2 3.3L3 4.3V19C3 20.1 3.9 21 5 21H19.7L20.7 22L22 20.7M5 19V6.3L12.6 13.9L11.1 15.8L9 13.1L6 17H15.7L17.7 19H5M8.8 5L6.8 3H19C20.1 3 21 3.9 21 5V17.2L19 15.2V5H8.8"},We={key:0};function je(e,t,i,l,c,n){return r(),m("span",Q(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon image-off-outline-icon",role:"img",onClick:t[0]||(t[0]=a=>e.$emit("click",a))}),[(r(),m("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[C("path",Ke,[i.title?(r(),m("title",We,_(i.title),1)):y("",!0)])],8,qe))],16,Ue)}const Ye=D(Fe,[["render",je]]),Ze={key:0,class:"version__image"},Je=["src"],Ge={key:2,class:"version__image"},Qe={class:"version__info"},Xe=["title"],ei={key:1,class:"version__info","data-cy-files-version-author-name":""},ii={key:0},ti=["title"],si={class:"version__info version__info__subline"},oi=O({__name:"VersionEntry",props:{version:{},node:{},isCurrent:{type:Boolean},isFirstVersion:{type:Boolean},loadPreview:{type:Boolean},canView:{type:Boolean},canCompare:{type:Boolean}},emits:["click","compare","restore","delete","labelUpdateRequest"],setup(e,{emit:t}){const i=e,l=t,c=$(!1),n=$(!1),a=$(de("core","capabilities",{files:{version_labeling:!1,version_deletion:!1}})),k=g(()=>ce(i.version.size)),f=g(()=>{const p=i.version.label??"";return i.isCurrent?p===""?d("files_versions","Current version"):`${p} (${d("files_versions","Current version")})`:i.isFirstVersion&&p===""?d("files_versions","Initial version"):p}),w=g(()=>!i.version.author||!i.version.authorName?"":i.version.author===B()?.uid?d("files_versions","You"):i.version.authorName??i.version.author),o=g(()=>new Date(i.version.mtime).toLocaleString([P(),P().split("-")[0]],{timeStyle:"long",dateStyle:"long"})),V=g(()=>i.isCurrent?i.node.source:te()+i.version.url),L=g(()=>a.value.files.version_labeling===!0),z=g(()=>a.value.files.version_deletion===!0),F=g(()=>b(i.node,Z.DELETE)),T=g(()=>b(i.node,Z.UPDATE)),U=g(()=>!((i.node.permissions&Z.READ)===0||i.node.attributes["mount-type"]==="shared"&&i.node.attributes["share-attributes"]&&(JSON.parse(i.node.attributes["share-attributes"]).find(p=>p.scope==="permissions"&&p.key==="download")||{})?.value===!1));function q(){l("labelUpdateRequest")}function K(){l("restore",i.version)}async function W(){await G(),await G(),l("delete",i.version)}function s(p){i.canView&&p.preventDefault(),l("click",i.version)}function v(){if(!i.canView)throw new Error("Cannot compare version of this file");l("compare",i.version)}function b(p,A){return(p.permissions&A)!==0}return(p,A)=>(r(),H(u(ye),{class:"version",forceDisplayActions:!0,"actions-aria-label":u(d)("files_versions","Actions for version from {versionHumanExplicitDate}",{versionHumanExplicitDate:o.value}),"data-files-versions-version":e.version.fileVersion,href:V.value,onClick:s},{icon:h(()=>[e.loadPreview||c.value?e.version.previewUrl&&!n.value?(r(),m("img",{key:1,src:e.version.previewUrl,alt:"",decoding:"async",fetchpriority:"low",loading:"lazy",class:"version__image",onLoad:A[0]||(A[0]=ie=>c.value=!0),onError:A[1]||(A[1]=ie=>n.value=!0)},null,40,Je)):(r(),m("div",Ge,[S(Ye,{size:20})])):(r(),m("div",Ze))]),name:h(()=>[C("div",Qe,[f.value?(r(),m("div",{key:0,class:"version__info__label","data-cy-files-version-label":"",title:f.value},_(f.value),9,Xe)):y("",!0),w.value?(r(),m("div",ei,[f.value?(r(),m("span",ii,"•")):y("",!0),S(u(fe),{class:"avatar",user:e.version.author??void 0,size:20,disableMenu:"",disableTooltip:"",hideStatus:""},null,8,["user"]),C("div",{class:"version__info__author_name",title:w.value},_(w.value),9,ti)])):y("",!0)])]),subname:h(()=>[C("div",si,[S(u(he),{class:"version__info__date",relativeTime:"short",timestamp:e.version.mtime},null,8,["timestamp"]),A[2]||(A[2]=C("span",null,"•",-1)),C("span",null,_(k.value),1)])]),actions:h(()=>[L.value&&T.value?(r(),H(u(I),{key:0,"data-cy-files-versions-version-action":"label",closeAfterClick:!0,onClick:q},{icon:h(()=>[S(me,{size:22})]),default:h(()=>[E(" "+_(e.version.label===""?u(d)("files_versions","Name this version"):u(d)("files_versions","Edit version name")),1)]),_:1})):y("",!0),!e.isCurrent&&e.canView&&e.canCompare?(r(),H(u(I),{key:1,"data-cy-files-versions-version-action":"compare",closeAfterClick:!0,onClick:v},{icon:h(()=>[S(Re,{size:22})]),default:h(()=>[E(" "+_(u(d)("files_versions","Compare to current version")),1)]),_:1})):y("",!0),!e.isCurrent&&T.value?(r(),H(u(I),{key:2,"data-cy-files-versions-version-action":"restore",closeAfterClick:!0,onClick:K},{icon:h(()=>[S(Te,{size:22})]),default:h(()=>[E(" "+_(u(d)("files_versions","Restore version")),1)]),_:1})):y("",!0),U.value?(r(),H(u(pe),{key:3,"data-cy-files-versions-version-action":"download",href:V.value,closeAfterClick:!0,download:V.value},{icon:h(()=>[S(be,{size:22})]),default:h(()=>[E(" "+_(u(d)("files_versions","Download version")),1)]),_:1},8,["href","download"])):y("",!0),!e.isCurrent&&z.value&&F.value?(r(),H(u(I),{key:4,"data-cy-files-versions-version-action":"delete",closeAfterClick:!0,onClick:W},{icon:h(()=>[S(Se,{size:22})]),default:h(()=>[E(" "+_(u(d)("files_versions","Delete version")),1)]),_:1})):y("",!0)]),_:1},8,["actions-aria-label","data-files-versions-version","href"]))}}),ni=D(oi,[["__scopeId","data-v-037e7d96"]]),ri={class:"version-label-modal__info"},ai=O({__name:"VersionLabelDialog",props:{open:{type:Boolean,default:!1},label:{type:String,default:""}},emits:["update:open","update:label"],setup(e,{emit:t}){const i=e,l=t,c=_e("labelInput"),n=$(""),a=g(()=>{const f=[];return i.label.trim()===""?f.push({label:d("files_versions","Cancel")}):f.push({label:d("files_versions","Remove version name"),type:"reset",variant:"error",callback:()=>{k("")}}),[...f,{label:d("files_versions","Save version name"),icon:we,type:"submit",variant:"primary"}]});X(()=>{n.value=i.label??""}),X(()=>{i.open&&G(()=>c.value?.focus()),n.value=i.label});function k(f){l("update:label",f)}return(f,w)=>(r(),H(u(ne),{buttons:a.value,contentClasses:"version-label-modal",isForm:"",open:e.open,size:"normal",name:u(d)("files_versions","Name this version"),"onUpdate:open":w[1]||(w[1]=o=>f.$emit("update:open",o)),onSubmit:w[2]||(w[2]=o=>k(n.value))},{default:h(()=>[S(u(ge),{ref_key:"labelInput",ref:c,modelValue:n.value,"onUpdate:modelValue":w[0]||(w[0]=o=>n.value=o),class:"version-label-modal__input",label:u(d)("files_versions","Version name"),placeholder:u(d)("files_versions","Version name")},null,8,["modelValue","label","placeholder"]),C("p",ri,_(u(d)("files_versions","Named versions are persisted, and excluded from automatic cleanups when your storage quota is full.")),1)]),_:1},8,["buttons","open","name"]))}}),li=D(ai,[["__scopeId","data-v-0955585b"]]),x=se().setApp("files_version").detectUser().build(),ci=O({name:"VirtualScrolling",props:{sections:{type:Array,required:!0},containerElement:{type:HTMLElement,default:null},useWindow:{type:Boolean,default:!1},headerHeight:{type:Number,default:75},renderDistance:{type:Number,default:.5},bottomBufferRatio:{type:Number,default:2},scrollToKey:{type:String,default:""}},emits:["needContent"],data(){return{scrollPosition:0,containerHeight:0,rowsContainerHeight:0,resizeObserver:null}},computed:{visibleSections(){x.debug("[VirtualScrolling] Computing visible section",{sections:this.sections});const e=this.containerHeight,t=this.scrollPosition,i=t+e;let l=0,c=0;const n=this.sections.map(o=>(c+=this.headerHeight,{...o,rows:o.rows.reduce((V,L)=>{l=c,c+=L.height;let z=0;return ci&&(z=(l-i)/e),z>this.renderDistance?V:[...V,{...L,distance:z}]},[])})).filter(o=>o.rows.length>0),a=n.flatMap(({rows:o})=>o).flatMap(({items:o})=>o),k=this._rowIdToKeyMap;a.forEach(o=>o.key=k[o.id]);const f=a.map(({key:o})=>o).filter(o=>o!==void 0),w=Object.values(k).filter(o=>!f.includes(o));return a.filter(({key:o})=>o===void 0).forEach(o=>o.key=w.pop()??Math.random().toString(36).substr(2)),this._rowIdToKeyMap=a.reduce((o,{id:V,key:L})=>({...o,[`${V}`]:L}),{}),n},totalHeight(){return this.sections.map(e=>this.headerHeight+e.height).reduce((e,t)=>e+t,0)+0},paddingTop(){if(this.visibleSections.length===0)return 0;let e=0;for(const t of this.sections){if(t.key!==this.visibleSections[0].rows[0].sectionKey){e+=this.headerHeight+t.height;continue}for(const i of t.rows){if(i.key===this.visibleSections[0].rows[0].key)return e;e+=i.height}e+=this.headerHeight}return e},rowsContainerStyle(){return{height:`${this.totalHeight}px`,paddingTop:`${this.paddingTop}px`}},isNearBottom(){const e=this.containerHeight*this.bottomBufferRatio;return this.scrollPosition+this.containerHeight>=this.totalHeight-e},container(){return x.debug("[VirtualScrolling] Computing container"),this.containerElement!==null?this.containerElement:this.useWindow?window:this.$refs.container}},watch:{isNearBottom(e){x.debug("[VirtualScrolling] isNearBottom changed",{value:e}),e&&this.$emit("needContent")},visibleSections(){this.isNearBottom&&this.$emit("needContent")},scrollToKey(e){let t=0;for(const i of this.sections){if(i.key!==e){t+=this.headerHeight+i.height;continue}break}x.debug("[VirtualScrolling] Scrolling to",{currentRowTopDistanceFromTop:t}),this.container.scrollTo({top:t,behavior:"smooth"})}},beforeCreate(){this._rowIdToKeyMap={}},mounted(){this.resizeObserver=new ResizeObserver(e=>{for(const t of e){const i=t.contentRect;t.target===this.container&&(this.containerHeight=i.height),t.target.classList.contains("vs-rows-container")&&(this.rowsContainerHeight=i.height)}}),this.useWindow?(window.addEventListener("resize",this.updateContainerSize,{passive:!0}),this.containerHeight=window.innerHeight):this.resizeObserver.observe(this.container),this.resizeObserver.observe(this.$refs.rowsContainer),this.container.addEventListener("scroll",this.updateScrollPosition,{passive:!0})},beforeUnmount(){this.useWindow&&window.removeEventListener("resize",this.updateContainerSize),this.resizeObserver?.disconnect(),this.container.removeEventListener("scroll",this.updateScrollPosition)},methods:{updateScrollPosition(){this._onScrollHandle??=requestAnimationFrame(()=>{this._onScrollHandle=null,this.useWindow?this.scrollPosition=this.container.scrollY:this.scrollPosition=this.container.scrollTop})},updateContainerSize(){this.containerHeight=window.innerHeight}}}),di={key:0,ref:"container",class:"vs-container"};function ui(e,t,i,l,c,n){return!e.useWindow&&e.containerElement===null?(r(),m("div",di,[C("div",{ref:"rowsContainer",class:"vs-rows-container",style:ee(e.rowsContainerStyle)},[M(e.$slots,"default",{visibleSections:e.visibleSections},void 0,!0),M(e.$slots,"loader",{},void 0,!0)],4)],512)):(r(),m("div",{key:1,ref:"rowsContainer",class:"vs-rows-container",style:ee(e.rowsContainerStyle)},[M(e.$slots,"default",{visibleSections:e.visibleSections},void 0,!0),M(e.$slots,"loader",{},void 0,!0)],4))}const vi=D(ci,[["render",ui],["__scopeId","data-v-0a27da21"]]),mi=` +import{d as j,a as Y}from"./index-WQvok30H.chunk.mjs";import{a as B,j as te,g as se,b as J,h as oe,f as N}from"./index-DgEyzq8A.chunk.mjs";import{t as d,a as P}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{N as ne,w as re,u as ae}from"./index-CO7ZwNPX.chunk.mjs";import{N as le}from"./mdi-CYMOyMtM.chunk.mjs";import{f as ce}from"./index-CPriPmaq.chunk.mjs";import{a as D,l as de,e as ue,j as ve}from"./index-C3KLQ_oe.chunk.mjs";import{N as I,P as me}from"./PencilOutline-Byyi13ia.chunk.mjs";import{N as pe}from"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{N as fe}from"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import{a as he,_ as ge}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{D as be,N as ye,s as we}from"./TrayArrowDown-DQikeHMO.chunk.mjs";import{o as r,j as m,k as C,t as _,m as y,y as Q,b as O,r as $,c as H,w as h,u,g as E,e as S,p as g,H as G,s as _e,a3 as X,l as M,B as ee,v as Ce,F as ke,A as Ve}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{D as Se}from"./TrashCanOutline-BZ98FFoG.chunk.mjs";import{P as Z}from"./externalStorageUtils-BzJyVKar.chunk.mjs";import{c as He}from"./index-9ZBo3L67.chunk.mjs";import{g as ze}from"./dav-CSaJxXR-.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./index-C5O29_27.chunk.mjs";const Ae={name:"BackupRestoreIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Le=["aria-hidden","aria-label"],$e=["fill","width","height"],xe={d:"M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z"},De={key:0};function Ee(e,t,i,l,c,n){return r(),m("span",Q(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon backup-restore-icon",role:"img",onClick:t[0]||(t[0]=a=>e.$emit("click",a))}),[(r(),m("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[C("path",xe,[i.title?(r(),m("title",De,_(i.title),1)):y("",!0)])],8,$e))],16,Le)}const Te=D(Ae,[["render",Ee]]),Ne={name:"FileCompareIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ie=["aria-hidden","aria-label"],Me=["fill","width","height"],Be={d:"M10,18H6V16H10V18M10,14H6V12H10V14M10,1V2H6C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H10V23H12V1H10M20,8V20C20,21.11 19.11,22 18,22H14V20H18V11H14V9H18.5L14,4.5V2L20,8M16,14H14V12H16V14M16,18H14V16H16V18Z"},Pe={key:0};function Oe(e,t,i,l,c,n){return r(),m("span",Q(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon file-compare-icon",role:"img",onClick:t[0]||(t[0]=a=>e.$emit("click",a))}),[(r(),m("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[C("path",Be,[i.title?(r(),m("title",Pe,_(i.title),1)):y("",!0)])],8,Me))],16,Ie)}const Re=D(Ne,[["render",Oe]]),Fe={name:"ImageOffOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ue=["aria-hidden","aria-label"],qe=["fill","width","height"],Ke={d:"M22 20.7L3.3 2L2 3.3L3 4.3V19C3 20.1 3.9 21 5 21H19.7L20.7 22L22 20.7M5 19V6.3L12.6 13.9L11.1 15.8L9 13.1L6 17H15.7L17.7 19H5M8.8 5L6.8 3H19C20.1 3 21 3.9 21 5V17.2L19 15.2V5H8.8"},We={key:0};function je(e,t,i,l,c,n){return r(),m("span",Q(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon image-off-outline-icon",role:"img",onClick:t[0]||(t[0]=a=>e.$emit("click",a))}),[(r(),m("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[C("path",Ke,[i.title?(r(),m("title",We,_(i.title),1)):y("",!0)])],8,qe))],16,Ue)}const Ye=D(Fe,[["render",je]]),Ze={key:0,class:"version__image"},Je=["src"],Ge={key:2,class:"version__image"},Qe={class:"version__info"},Xe=["title"],ei={key:1,class:"version__info","data-cy-files-version-author-name":""},ii={key:0},ti=["title"],si={class:"version__info version__info__subline"},oi=O({__name:"VersionEntry",props:{version:{},node:{},isCurrent:{type:Boolean},isFirstVersion:{type:Boolean},loadPreview:{type:Boolean},canView:{type:Boolean},canCompare:{type:Boolean}},emits:["click","compare","restore","delete","labelUpdateRequest"],setup(e,{emit:t}){const i=e,l=t,c=$(!1),n=$(!1),a=$(de("core","capabilities",{files:{version_labeling:!1,version_deletion:!1}})),k=g(()=>ce(i.version.size)),f=g(()=>{const p=i.version.label??"";return i.isCurrent?p===""?d("files_versions","Current version"):`${p} (${d("files_versions","Current version")})`:i.isFirstVersion&&p===""?d("files_versions","Initial version"):p}),w=g(()=>!i.version.author||!i.version.authorName?"":i.version.author===B()?.uid?d("files_versions","You"):i.version.authorName??i.version.author),o=g(()=>new Date(i.version.mtime).toLocaleString([P(),P().split("-")[0]],{timeStyle:"long",dateStyle:"long"})),V=g(()=>i.isCurrent?i.node.source:te()+i.version.url),L=g(()=>a.value.files.version_labeling===!0),z=g(()=>a.value.files.version_deletion===!0),F=g(()=>b(i.node,Z.DELETE)),T=g(()=>b(i.node,Z.UPDATE)),U=g(()=>!((i.node.permissions&Z.READ)===0||i.node.attributes["mount-type"]==="shared"&&i.node.attributes["share-attributes"]&&(JSON.parse(i.node.attributes["share-attributes"]).find(p=>p.scope==="permissions"&&p.key==="download")||{})?.value===!1));function q(){l("labelUpdateRequest")}function K(){l("restore",i.version)}async function W(){await G(),await G(),l("delete",i.version)}function s(p){i.canView&&p.preventDefault(),l("click",i.version)}function v(){if(!i.canView)throw new Error("Cannot compare version of this file");l("compare",i.version)}function b(p,A){return(p.permissions&A)!==0}return(p,A)=>(r(),H(u(ye),{class:"version",forceDisplayActions:!0,"actions-aria-label":u(d)("files_versions","Actions for version from {versionHumanExplicitDate}",{versionHumanExplicitDate:o.value}),"data-files-versions-version":e.version.fileVersion,href:V.value,onClick:s},{icon:h(()=>[e.loadPreview||c.value?e.version.previewUrl&&!n.value?(r(),m("img",{key:1,src:e.version.previewUrl,alt:"",decoding:"async",fetchpriority:"low",loading:"lazy",class:"version__image",onLoad:A[0]||(A[0]=ie=>c.value=!0),onError:A[1]||(A[1]=ie=>n.value=!0)},null,40,Je)):(r(),m("div",Ge,[S(Ye,{size:20})])):(r(),m("div",Ze))]),name:h(()=>[C("div",Qe,[f.value?(r(),m("div",{key:0,class:"version__info__label","data-cy-files-version-label":"",title:f.value},_(f.value),9,Xe)):y("",!0),w.value?(r(),m("div",ei,[f.value?(r(),m("span",ii,"•")):y("",!0),S(u(fe),{class:"avatar",user:e.version.author??void 0,size:20,disableMenu:"",disableTooltip:"",hideStatus:""},null,8,["user"]),C("div",{class:"version__info__author_name",title:w.value},_(w.value),9,ti)])):y("",!0)])]),subname:h(()=>[C("div",si,[S(u(he),{class:"version__info__date",relativeTime:"short",timestamp:e.version.mtime},null,8,["timestamp"]),A[2]||(A[2]=C("span",null,"•",-1)),C("span",null,_(k.value),1)])]),actions:h(()=>[L.value&&T.value?(r(),H(u(I),{key:0,"data-cy-files-versions-version-action":"label",closeAfterClick:!0,onClick:q},{icon:h(()=>[S(me,{size:22})]),default:h(()=>[E(" "+_(e.version.label===""?u(d)("files_versions","Name this version"):u(d)("files_versions","Edit version name")),1)]),_:1})):y("",!0),!e.isCurrent&&e.canView&&e.canCompare?(r(),H(u(I),{key:1,"data-cy-files-versions-version-action":"compare",closeAfterClick:!0,onClick:v},{icon:h(()=>[S(Re,{size:22})]),default:h(()=>[E(" "+_(u(d)("files_versions","Compare to current version")),1)]),_:1})):y("",!0),!e.isCurrent&&T.value?(r(),H(u(I),{key:2,"data-cy-files-versions-version-action":"restore",closeAfterClick:!0,onClick:K},{icon:h(()=>[S(Te,{size:22})]),default:h(()=>[E(" "+_(u(d)("files_versions","Restore version")),1)]),_:1})):y("",!0),U.value?(r(),H(u(pe),{key:3,"data-cy-files-versions-version-action":"download",href:V.value,closeAfterClick:!0,download:V.value},{icon:h(()=>[S(be,{size:22})]),default:h(()=>[E(" "+_(u(d)("files_versions","Download version")),1)]),_:1},8,["href","download"])):y("",!0),!e.isCurrent&&z.value&&F.value?(r(),H(u(I),{key:4,"data-cy-files-versions-version-action":"delete",closeAfterClick:!0,onClick:W},{icon:h(()=>[S(Se,{size:22})]),default:h(()=>[E(" "+_(u(d)("files_versions","Delete version")),1)]),_:1})):y("",!0)]),_:1},8,["actions-aria-label","data-files-versions-version","href"]))}}),ni=D(oi,[["__scopeId","data-v-037e7d96"]]),ri={class:"version-label-modal__info"},ai=O({__name:"VersionLabelDialog",props:{open:{type:Boolean,default:!1},label:{type:String,default:""}},emits:["update:open","update:label"],setup(e,{emit:t}){const i=e,l=t,c=_e("labelInput"),n=$(""),a=g(()=>{const f=[];return i.label.trim()===""?f.push({label:d("files_versions","Cancel")}):f.push({label:d("files_versions","Remove version name"),type:"reset",variant:"error",callback:()=>{k("")}}),[...f,{label:d("files_versions","Save version name"),icon:we,type:"submit",variant:"primary"}]});X(()=>{n.value=i.label??""}),X(()=>{i.open&&G(()=>c.value?.focus()),n.value=i.label});function k(f){l("update:label",f)}return(f,w)=>(r(),H(u(ne),{buttons:a.value,contentClasses:"version-label-modal",isForm:"",open:e.open,size:"normal",name:u(d)("files_versions","Name this version"),"onUpdate:open":w[1]||(w[1]=o=>f.$emit("update:open",o)),onSubmit:w[2]||(w[2]=o=>k(n.value))},{default:h(()=>[S(u(ge),{ref_key:"labelInput",ref:c,modelValue:n.value,"onUpdate:modelValue":w[0]||(w[0]=o=>n.value=o),class:"version-label-modal__input",label:u(d)("files_versions","Version name"),placeholder:u(d)("files_versions","Version name")},null,8,["modelValue","label","placeholder"]),C("p",ri,_(u(d)("files_versions","Named versions are persisted, and excluded from automatic cleanups when your storage quota is full.")),1)]),_:1},8,["buttons","open","name"]))}}),li=D(ai,[["__scopeId","data-v-0955585b"]]),x=se().setApp("files_version").detectUser().build(),ci=O({name:"VirtualScrolling",props:{sections:{type:Array,required:!0},containerElement:{type:HTMLElement,default:null},useWindow:{type:Boolean,default:!1},headerHeight:{type:Number,default:75},renderDistance:{type:Number,default:.5},bottomBufferRatio:{type:Number,default:2},scrollToKey:{type:String,default:""}},emits:["needContent"],data(){return{scrollPosition:0,containerHeight:0,rowsContainerHeight:0,resizeObserver:null}},computed:{visibleSections(){x.debug("[VirtualScrolling] Computing visible section",{sections:this.sections});const e=this.containerHeight,t=this.scrollPosition,i=t+e;let l=0,c=0;const n=this.sections.map(o=>(c+=this.headerHeight,{...o,rows:o.rows.reduce((V,L)=>{l=c,c+=L.height;let z=0;return ci&&(z=(l-i)/e),z>this.renderDistance?V:[...V,{...L,distance:z}]},[])})).filter(o=>o.rows.length>0),a=n.flatMap(({rows:o})=>o).flatMap(({items:o})=>o),k=this._rowIdToKeyMap;a.forEach(o=>o.key=k[o.id]);const f=a.map(({key:o})=>o).filter(o=>o!==void 0),w=Object.values(k).filter(o=>!f.includes(o));return a.filter(({key:o})=>o===void 0).forEach(o=>o.key=w.pop()??Math.random().toString(36).substr(2)),this._rowIdToKeyMap=a.reduce((o,{id:V,key:L})=>({...o,[`${V}`]:L}),{}),n},totalHeight(){return this.sections.map(e=>this.headerHeight+e.height).reduce((e,t)=>e+t,0)+0},paddingTop(){if(this.visibleSections.length===0)return 0;let e=0;for(const t of this.sections){if(t.key!==this.visibleSections[0].rows[0].sectionKey){e+=this.headerHeight+t.height;continue}for(const i of t.rows){if(i.key===this.visibleSections[0].rows[0].key)return e;e+=i.height}e+=this.headerHeight}return e},rowsContainerStyle(){return{height:`${this.totalHeight}px`,paddingTop:`${this.paddingTop}px`}},isNearBottom(){const e=this.containerHeight*this.bottomBufferRatio;return this.scrollPosition+this.containerHeight>=this.totalHeight-e},container(){return x.debug("[VirtualScrolling] Computing container"),this.containerElement!==null?this.containerElement:this.useWindow?window:this.$refs.container}},watch:{isNearBottom(e){x.debug("[VirtualScrolling] isNearBottom changed",{value:e}),e&&this.$emit("needContent")},visibleSections(){this.isNearBottom&&this.$emit("needContent")},scrollToKey(e){let t=0;for(const i of this.sections){if(i.key!==e){t+=this.headerHeight+i.height;continue}break}x.debug("[VirtualScrolling] Scrolling to",{currentRowTopDistanceFromTop:t}),this.container.scrollTo({top:t,behavior:"smooth"})}},beforeCreate(){this._rowIdToKeyMap={}},mounted(){this.resizeObserver=new ResizeObserver(e=>{for(const t of e){const i=t.contentRect;t.target===this.container&&(this.containerHeight=i.height),t.target.classList.contains("vs-rows-container")&&(this.rowsContainerHeight=i.height)}}),this.useWindow?(window.addEventListener("resize",this.updateContainerSize,{passive:!0}),this.containerHeight=window.innerHeight):this.resizeObserver.observe(this.container),this.resizeObserver.observe(this.$refs.rowsContainer),this.container.addEventListener("scroll",this.updateScrollPosition,{passive:!0})},beforeUnmount(){this.useWindow&&window.removeEventListener("resize",this.updateContainerSize),this.resizeObserver?.disconnect(),this.container.removeEventListener("scroll",this.updateScrollPosition)},methods:{updateScrollPosition(){this._onScrollHandle??=requestAnimationFrame(()=>{this._onScrollHandle=null,this.useWindow?this.scrollPosition=this.container.scrollY:this.scrollPosition=this.container.scrollTop})},updateContainerSize(){this.containerHeight=window.innerHeight}}}),di={key:0,ref:"container",class:"vs-container"};function ui(e,t,i,l,c,n){return!e.useWindow&&e.containerElement===null?(r(),m("div",di,[C("div",{ref:"rowsContainer",class:"vs-rows-container",style:ee(e.rowsContainerStyle)},[M(e.$slots,"default",{visibleSections:e.visibleSections},void 0,!0),M(e.$slots,"loader",{},void 0,!0)],4)],512)):(r(),m("div",{key:1,ref:"rowsContainer",class:"vs-rows-container",style:ee(e.rowsContainerStyle)},[M(e.$slots,"default",{visibleSections:e.visibleSections},void 0,!0),M(e.$slots,"loader",{},void 0,!0)],4))}const vi=D(ci,[["render",ui],["__scopeId","data-v-0a27da21"]]),mi=` `})}async function bi(e){await R.deleteFile(e.filename)}const yi={key:0,class:"versions-tab__container"},wi=["aria-label"],Ki=O({__name:"FilesVersionsSidebarTab",props:{active:{type:Boolean},node:{},folder:{},view:{}},setup(e){const t=e,i=ae(),l=$([]),c=$(!1),n=$(!1),a=$(null),k=g(()=>Math.floor(new Date(t.node?.mtime?.getTime()??0).getTime()/1e3)*1e3),f=g(()=>[...l.value].sort((s,v)=>t.node?s.mtime===t.node.mtime?.getTime()?-1:v.mtime===t.node.mtime?.getTime()?1:v.mtime-s.mtime:0)),w=g(()=>[{key:"versions",rows:f.value.map(s=>({key:s.mtime.toString(),height:68,sectionKey:"versions",items:[{id:s.mtime.toString(),version:s}]})),height:68*f.value.length}]),o=g(()=>l.value.map(s=>s.mtime).reduce((s,v)=>Math.min(s,v))),V=g(()=>t.node?window.OCA.Viewer?.mimetypes?.includes(t.node?.mime):!1),L=g(()=>!i.value&&window.OCA.Viewer?.mimetypesCompare?.includes(t.node?.mime));Ce(()=>t.node.id,z,{immediate:!0}),re(k,z,{debounce:600});async function z(){try{c.value=!0,l.value=await pi(t.node)}finally{c.value=!1}}async function F(s){if(!t.node)return;const v=t.node.clone();v.attributes.etag=s.etag,v.size=s.size,v.mtime=new Date(s.mtime);const b={preventDefault:!1,node:v,version:s};if(N("files_versions:restore:requested",b),!b.preventDefault)try{await fi(s),s.label?j(d("files_versions",`${s.label} restored`)):s.mtime===o.value?j(d("files_versions","Initial version restored")):j(d("files_versions","Version restored")),N("files:node:updated",v),N("files_versions:restore:restored",{node:v,version:s})}catch{Y(d("files_versions","Could not restore version")),N("files_versions:restore:failed",s)}}function T(s){n.value=!0,a.value=s}async function U(s){if(a.value===null)throw new Error("editedVersion should be set at that point");const v=a.value.label;a.value.label=s,n.value=!1;try{await gi(a.value,s),a.value=null}catch(b){a.value.label=v,Y(d("files_versions","Could not set version label")),x.error("Could not set version label",{exception:b})}}async function q(s){const v=l.value.indexOf(s);l.value.splice(v,1);try{await bi(s)}catch{l.value.push(s),Y(d("files_versions","Could not delete version"))}}function K(s){if(t.node!==null){if(s.mtime===t.node?.mtime?.getTime()){window.OCA.Viewer.open({path:t.node.path});return}window.OCA.Viewer.open({fileInfo:{...s,filename:s.filename,previewUrl:void 0},enableSidebar:!1})}}function W(s){const v=l.value.map(b=>({...b,previewUrl:void 0}));window.OCA.Viewer.compare({fileid:t.node.fileid,filename:t.node.path,basename:t.node.basename,source:t.node.source,mime:t.node.mime,hasPreview:t.node.attributes?.["has-preview"]??!1},v.find(b=>b.source===s.source))}return(s,v)=>e.node?(r(),m("div",yi,[S(vi,{sections:w.value,headerHeight:0},{default:h(({visibleSections:b})=>[C("ul",{"aria-label":u(d)("files_versions","File versions"),"data-files-versions-versions-list":""},[b.length===1?(r(!0),m(ke,{key:0},Ve(b[0].rows,p=>(r(),H(ni,{key:p.items[0].version.mtime,canView:V.value,canCompare:L.value,loadPreview:e.active,version:p.items[0].version,node:e.node,isCurrent:p.items[0].version.mtime===k.value,isFirstVersion:p.items[0].version.mtime===o.value,onClick:K,onCompare:W,onRestore:F,onLabelUpdateRequest:A=>T(p.items[0].version),onDelete:q},null,8,["canView","canCompare","loadPreview","version","node","isCurrent","isFirstVersion","onLabelUpdateRequest"]))),128)):y("",!0)],8,wi)]),loader:h(()=>[c.value?(r(),H(u(le),{key:0,class:"files-list-viewer__loader"})):y("",!0)]),_:1},8,["sections"]),a.value?(r(),H(li,{key:0,open:n.value,"onUpdate:open":v[0]||(v[0]=b=>n.value=b),label:a.value.label,"onUpdate:label":U},null,8,["open","label"])):y("",!0)])):y("",!0)}});export{Ki as default}; -//# sourceMappingURL=FilesVersionsSidebarTab-Bdeocctt.chunk.mjs.map +//# sourceMappingURL=FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs.map diff --git a/dist/FilesVersionsSidebarTab-Bdeocctt.chunk.mjs.license b/dist/FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs.license similarity index 100% rename from dist/FilesVersionsSidebarTab-Bdeocctt.chunk.mjs.license rename to dist/FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs.license diff --git a/dist/FilesVersionsSidebarTab-Bdeocctt.chunk.mjs.map b/dist/FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs.map similarity index 99% rename from dist/FilesVersionsSidebarTab-Bdeocctt.chunk.mjs.map rename to dist/FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs.map index 11f3f5206740e..1b65234302938 100644 --- a/dist/FilesVersionsSidebarTab-Bdeocctt.chunk.mjs.map +++ b/dist/FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs.map @@ -1 +1 @@ -{"version":3,"file":"FilesVersionsSidebarTab-Bdeocctt.chunk.mjs","sources":["../node_modules/vue-material-design-icons/BackupRestore.vue","../node_modules/vue-material-design-icons/FileCompare.vue","../node_modules/vue-material-design-icons/ImageOffOutline.vue","../build/frontend/apps/files_versions/src/components/VersionEntry.vue","../build/frontend/apps/files_versions/src/components/VersionLabelDialog.vue","../build/frontend/apps/files_versions/src/utils/logger.ts","../build/frontend/apps/files_versions/src/components/VirtualScrolling.vue","../build/frontend/apps/files_versions/src/utils/davRequest.ts","../build/frontend/apps/files_versions/src/utils/versions.ts","../build/frontend/apps/files_versions/src/views/FilesVersionsSidebarTab.vue"],"sourcesContent":["\n\n","\n\n","\n\n","\n\n\n\n\n\n","\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files_version')\n\t.detectUser()\n\t.build()\n","\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nexport default `\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n`\n","/*!\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { INode } from '@nextcloud/files'\nimport type { FileStat, ResponseDataDetailed } from 'webdav'\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { getClient } from '@nextcloud/files/dav'\nimport { getCanonicalLocale } from '@nextcloud/l10n'\nimport { encodePath, join } from '@nextcloud/paths'\nimport { generateRemoteUrl, generateUrl } from '@nextcloud/router'\nimport davRequest from '../utils/davRequest.ts'\nimport logger from '../utils/logger.ts'\n\nexport interface Version {\n\tfileId: string // The id of the file associated to the version.\n\tlabel: string // 'Current version' or ''\n\tauthor: string | null // UID for the author of the version\n\tauthorName: string | null // Display name of the author\n\tfilename: string // File name relative to the version DAV endpoint\n\tbasename: string // A base name generated from the mtime\n\tmime: string // Empty for the current version, else the actual mime type of the version\n\tetag: string // Empty for the current version, else the actual mime type of the version\n\tsize: number // File size in bytes\n\ttype: string // 'file'\n\tmtime: number // Version creation date as a timestamp\n\tpermissions: string // Only readable: 'R'\n\tpreviewUrl: string // Preview URL of the version\n\turl: string // Download URL of the version\n\tsource: string // The WebDAV endpoint of the resource\n\tfileVersion: string | null // The version id, null for the current version\n}\n\nconst client = getClient()\n\n/**\n * Get file versions for a given node\n *\n * @param node - The node to fetch versions for\n */\nexport async function fetchVersions(node: INode): Promise {\n\tconst path = `/versions/${getCurrentUser()?.uid}/versions/${node.fileid}`\n\n\ttry {\n\t\tconst response = await client.getDirectoryContents(path, {\n\t\t\tdata: davRequest,\n\t\t\tdetails: true,\n\t\t}) as ResponseDataDetailed\n\n\t\tconst versions = response.data\n\t\t\t// Filter out root\n\t\t\t.filter(({ mime }) => mime !== '')\n\t\t\t.map((version) => formatVersion(version as Required, node))\n\n\t\tconst authorIds = new Set(versions.map((version) => String(version.author)))\n\t\tconst authors = await axios.post(generateUrl('/displaynames'), { users: [...authorIds] })\n\n\t\tfor (const version of versions) {\n\t\t\tconst author = authors.data.users[version.author ?? '']\n\t\t\tif (author) {\n\t\t\t\tversion.authorName = author\n\t\t\t}\n\t\t}\n\n\t\treturn versions\n\t} catch (exception) {\n\t\tlogger.error('Could not fetch version', { exception })\n\t\tthrow exception\n\t}\n}\n\n/**\n * Restore the given version\n *\n * @param version - The version to restore\n */\nexport async function restoreVersion(version: Version) {\n\ttry {\n\t\tlogger.debug('Restoring version', { url: version.url })\n\t\tawait client.moveFile(\n\t\t\t`/versions/${getCurrentUser()?.uid}/versions/${version.fileId}/${version.fileVersion}`,\n\t\t\t`/versions/${getCurrentUser()?.uid}/restore/target`,\n\t\t)\n\t} catch (exception) {\n\t\tlogger.error('Could not restore version', { exception })\n\t\tthrow exception\n\t}\n}\n\n/**\n * Format version\n *\n * @param version - The version data from WebDAV\n * @param node - The original node\n */\nfunction formatVersion(version: Required, node: INode): Version {\n\tconst mtime = Date.parse(version.lastmod)\n\t// server timestamps are seconds-based, we have to nullify the milliseconds\n\tconst nodeNormalizedMtime = Math.floor((node.mtime?.getTime() ?? 0) / 1000) * 1000\n\n\tlet previewUrl: string\n\tif (mtime === nodeNormalizedMtime) { // Version is the current one\n\t\tpreviewUrl = generateUrl('/core/preview?fileId={fileId}&c={fileEtag}&x=250&y=250&forceIcon=0&a=0&forceIcon=1&mimeFallback=1', {\n\t\t\tfileId: node.id,\n\t\t\tfileEtag: node.attributes.etag,\n\t\t})\n\t} else {\n\t\tpreviewUrl = generateUrl('/apps/files_versions/preview?file={file}&version={fileVersion}&mimeFallback=1', {\n\t\t\tfile: node.path,\n\t\t\tfileVersion: version.basename,\n\t\t})\n\t}\n\n\treturn {\n\t\tfileId: node.id!,\n\t\t// If version-label is defined make sure it is a string (prevent issue if the label is a number an PHP returns a number then)\n\t\tlabel: version.props['version-label'] ? String(version.props['version-label']) : '',\n\t\tauthor: version.props['version-author'] ? String(version.props['version-author']) : null,\n\t\tauthorName: null,\n\t\tfilename: version.filename,\n\t\tbasename: new Date(mtime).toLocaleString(\n\t\t\t[getCanonicalLocale(), getCanonicalLocale().split('-')[0]!],\n\t\t\t{\n\t\t\t\ttimeStyle: 'long',\n\t\t\t\tdateStyle: 'medium',\n\t\t\t},\n\t\t),\n\t\tmime: version.mime,\n\t\tetag: `${version.props.getetag}`,\n\t\tsize: version.size,\n\t\ttype: version.type,\n\t\tmtime,\n\t\tpermissions: 'R',\n\t\tpreviewUrl,\n\t\turl: join('/remote.php/dav', version.filename),\n\t\tsource: generateRemoteUrl('dav') + encodePath(version.filename),\n\t\tfileVersion: version.basename,\n\t}\n}\n\n/**\n * Set version label\n *\n * @param version - The version to set the label for\n * @param newLabel - The new label\n */\nexport async function setVersionLabel(version: Version, newLabel: string) {\n\treturn await client.customRequest(\n\t\tversion.filename,\n\t\t{\n\t\t\tmethod: 'PROPPATCH',\n\t\t\tdata: `\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${newLabel}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t`,\n\t\t},\n\t)\n}\n\n/**\n * Delete version\n *\n * @param version - The version to delete\n */\nexport async function deleteVersion(version: Version) {\n\tawait client.deleteFile(version.filename)\n}\n","\n\n\n\n\n\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_ctx","$props","_cache","$event","_createElementVNode","_openBlock","props","__props","emit","__emit","previewLoaded","ref","previewErrored","capabilities","loadState","humanReadableSize","computed","formatFileSize","versionLabel","label","t","versionAuthor","getCurrentUser","versionHumanExplicitDate","getCanonicalLocale","downloadURL","getRootUrl","enableLabeling","enableDeletion","hasDeletePermissions","hasPermission","Permission","hasUpdatePermissions","isDownloadable","attribute","labelUpdate","restoreVersion","deleteVersion","nextTick","click","event","compareVersion","node","permission","_createBlock","_unref","NcListItem","_createVNode","ImageOffOutline","_hoisted_1","_hoisted_4","_hoisted_5","_hoisted_6","NcAvatar","_hoisted_8","_hoisted_9","NcDateTime","NcActionButton","Pencil","_createTextVNode","FileCompare","BackupRestore","NcActionLink","Download","Delete","labelInput","useTemplateRef","internalLabel","dialogButtons","buttons","setVersionLabel","svgCheck","watchEffect","NcDialog","$emit","NcTextField","_toDisplayString","logger","getLoggerBuilder","_sfc_main$1","defineComponent","containerHeight","containerTop","containerBottom","currentRowTop","currentRowBottom","visibleSections","section","visibleRows","row","distance","visibleItems","rows","items","rowIdToKeyMap","item","usedTokens","key","unusedTokens","finalMapping","id","totalHeight","sectionHeight","paddingTop","buffer","value","currentRowTopDistanceFromTop","entries","entry","cr","_normalizeStyle","_renderSlot","davRequest","client","getClient","fetchVersions","path","versions","mime","version","formatVersion","authorIds","authors","axios","generateUrl","author","exception","mtime","nodeNormalizedMtime","previewUrl","join","generateRemoteUrl","encodePath","newLabel","isMobile","useIsMobile","loading","showVersionLabelForm","editedVersion","currentVersionMtime","orderedVersions","a","b","sections","initialVersionMtime","canView","canCompare","watch","loadVersions","watchDebounced","handleRestore","restoredNode","restoreStartedEventState","showSuccess","showError","handleLabelUpdateRequest","handleLabelUpdate","oldLabel","handleDelete","index","openVersion","_versions","v","VirtualScrolling","_withCtx","_Fragment","_renderList","VersionEntry","NcLoadingIcon","VersionLabelDialog"],"mappings":"6gDAoBA,MAAKA,GAAU,CACb,KAAM,oBACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,QAER,UAAW,CACT,KAAM,OACN,QAAS,gBAEX,KAAM,CACJ,KAAM,OACN,QAAS,EACX,CACF,CACF,+DAxBYC,GAAA,CAAA,EAAE,uPAAuP,iDAXnQC,EAeO,OAfPC,EAAcC,EAAA,OAAM,CACb,cAAaC,EAAA,MAAK,KAAA,OAClB,aAAYA,EAAA,MACb,MAAM,2CACN,KAAK,MACJ,QAAKC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEH,EAAA,MAAK,QAAUG,CAAM,WACjCL,EAQM,MAAA,CARA,KAAMG,EAAA,UACP,MAAM,4BACL,MAAOA,EAAA,KACP,OAAQA,EAAA,KACT,QAAQ,cACXG,EAEO,OAFPP,GAEO,CADQI,EAAA,OAAbI,EAAA,EAAAP,EAAuC,aAAhBG,EAAA,KAAK,EAAA,CAAA,6DCO/BL,GAAU,CACb,KAAM,kBACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,QAER,UAAW,CACT,KAAM,OACN,QAAS,gBAEX,KAAM,CACJ,KAAM,OACN,QAAS,EACX,CACF,CACF,+DAxBYC,GAAA,CAAA,EAAE,wMAAwM,iDAXpNC,EAeO,OAfPC,EAAcC,EAAA,OAAM,CACb,cAAaC,EAAA,MAAK,KAAA,OAClB,aAAYA,EAAA,MACb,MAAM,yCACN,KAAK,MACJ,QAAKC,E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CAZxB,IAAK9E,EAAI,MAAK,CAAA,EAAI,QAAQ,MAC1B,QAASwD,EAAA,MACT,WAAYC,EAAA,MACZ,YAAa3I,EAAA,OACb,QAASkF,EAAI,SAAS,QACtB,KAAMlF,EAAA,KACN,UAAWkF,EAAI,SAAS,QAAQ,QAAUkD,EAAA,MAC1C,eAAgBlD,EAAI,SAAS,QAAQ,QAAUuD,EAAA,MAC/C,QAAOgB,EACP,UAASvH,EACT,UAAS6G,EACT,wBAAoBK,EAAyBlE,EAAI,SAAS,OAAO,EACjE,SAAQqE,CAAA,gJAIF,SACV,IAAkE,CAA7CtB,EAAA,WAArB5F,EAAkEC,EAAA2H,EAAA,EAAA,OAApC,MAAM,2BAAA,oCAI/B9B,EAAA,WADP9F,EAIqC6H,GAAA,OAF5B,KAAMhC,EAAA,qCAAAA,EAAoB,MAAAtI,GACjC,MAAOuI,EAAA,MAAc,MACrB,iBAAckB,CAAA","x_google_ignoreList":[0,1,2]} \ No newline at end of file +{"version":3,"file":"FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs","sources":["../node_modules/vue-material-design-icons/BackupRestore.vue","../node_modules/vue-material-design-icons/FileCompare.vue","../node_modules/vue-material-design-icons/ImageOffOutline.vue","../build/frontend/apps/files_versions/src/components/VersionEntry.vue","../build/frontend/apps/files_versions/src/components/VersionLabelDialog.vue","../build/frontend/apps/files_versions/src/utils/logger.ts","../build/frontend/apps/files_versions/src/components/VirtualScrolling.vue","../build/frontend/apps/files_versions/src/utils/davRequest.ts","../build/frontend/apps/files_versions/src/utils/versions.ts","../build/frontend/apps/files_versions/src/views/FilesVersionsSidebarTab.vue"],"sourcesContent":["\n\n","\n\n","\n\n","\n\n\n\n\n\n","\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files_version')\n\t.detectUser()\n\t.build()\n","\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nexport default `\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n`\n","/*!\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { INode } from '@nextcloud/files'\nimport type { FileStat, ResponseDataDetailed } from 'webdav'\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { getClient } from '@nextcloud/files/dav'\nimport { getCanonicalLocale } from '@nextcloud/l10n'\nimport { encodePath, join } from '@nextcloud/paths'\nimport { generateRemoteUrl, generateUrl } from '@nextcloud/router'\nimport davRequest from '../utils/davRequest.ts'\nimport logger from '../utils/logger.ts'\n\nexport interface Version {\n\tfileId: string // The id of the file associated to the version.\n\tlabel: string // 'Current version' or ''\n\tauthor: string | null // UID for the author of the version\n\tauthorName: string | null // Display name of the author\n\tfilename: string // File name relative to the version DAV endpoint\n\tbasename: string // A base name generated from the mtime\n\tmime: string // Empty for the current version, else the actual mime type of the version\n\tetag: string // Empty for the current version, else the actual mime type of the version\n\tsize: number // File size in bytes\n\ttype: string // 'file'\n\tmtime: number // Version creation date as a timestamp\n\tpermissions: string // Only readable: 'R'\n\tpreviewUrl: string // Preview URL of the version\n\turl: string // Download URL of the version\n\tsource: string // The WebDAV endpoint of the resource\n\tfileVersion: string | null // The version id, null for the current version\n}\n\nconst client = getClient()\n\n/**\n * Get file versions for a given node\n *\n * @param node - The node to fetch versions for\n */\nexport async function fetchVersions(node: INode): Promise {\n\tconst path = `/versions/${getCurrentUser()?.uid}/versions/${node.fileid}`\n\n\ttry {\n\t\tconst response = await client.getDirectoryContents(path, {\n\t\t\tdata: davRequest,\n\t\t\tdetails: true,\n\t\t}) as ResponseDataDetailed\n\n\t\tconst versions = response.data\n\t\t\t// Filter out root\n\t\t\t.filter(({ mime }) => mime !== '')\n\t\t\t.map((version) => formatVersion(version as Required, node))\n\n\t\tconst authorIds = new Set(versions.map((version) => String(version.author)))\n\t\tconst authors = await axios.post(generateUrl('/displaynames'), { users: [...authorIds] })\n\n\t\tfor (const version of versions) {\n\t\t\tconst author = authors.data.users[version.author ?? '']\n\t\t\tif (author) {\n\t\t\t\tversion.authorName = author\n\t\t\t}\n\t\t}\n\n\t\treturn versions\n\t} catch (exception) {\n\t\tlogger.error('Could not fetch version', { exception })\n\t\tthrow exception\n\t}\n}\n\n/**\n * Restore the given version\n *\n * @param version - The version to restore\n */\nexport async function restoreVersion(version: Version) {\n\ttry {\n\t\tlogger.debug('Restoring version', { url: version.url })\n\t\tawait client.moveFile(\n\t\t\t`/versions/${getCurrentUser()?.uid}/versions/${version.fileId}/${version.fileVersion}`,\n\t\t\t`/versions/${getCurrentUser()?.uid}/restore/target`,\n\t\t)\n\t} catch (exception) {\n\t\tlogger.error('Could not restore version', { exception })\n\t\tthrow exception\n\t}\n}\n\n/**\n * Format version\n *\n * @param version - The version data from WebDAV\n * @param node - The original node\n */\nfunction formatVersion(version: Required, node: INode): Version {\n\tconst mtime = Date.parse(version.lastmod)\n\t// server timestamps are seconds-based, we have to nullify the milliseconds\n\tconst nodeNormalizedMtime = Math.floor((node.mtime?.getTime() ?? 0) / 1000) * 1000\n\n\tlet previewUrl: string\n\tif (mtime === nodeNormalizedMtime) { // Version is the current one\n\t\tpreviewUrl = generateUrl('/core/preview?fileId={fileId}&c={fileEtag}&x=250&y=250&forceIcon=0&a=0&forceIcon=1&mimeFallback=1', {\n\t\t\tfileId: node.id,\n\t\t\tfileEtag: node.attributes.etag,\n\t\t})\n\t} else {\n\t\tpreviewUrl = generateUrl('/apps/files_versions/preview?file={file}&version={fileVersion}&mimeFallback=1', {\n\t\t\tfile: node.path,\n\t\t\tfileVersion: version.basename,\n\t\t})\n\t}\n\n\treturn {\n\t\tfileId: node.id!,\n\t\t// If version-label is defined make sure it is a string (prevent issue if the label is a number an PHP returns a number then)\n\t\tlabel: version.props['version-label'] ? String(version.props['version-label']) : '',\n\t\tauthor: version.props['version-author'] ? String(version.props['version-author']) : null,\n\t\tauthorName: null,\n\t\tfilename: version.filename,\n\t\tbasename: new Date(mtime).toLocaleString(\n\t\t\t[getCanonicalLocale(), getCanonicalLocale().split('-')[0]!],\n\t\t\t{\n\t\t\t\ttimeStyle: 'long',\n\t\t\t\tdateStyle: 'medium',\n\t\t\t},\n\t\t),\n\t\tmime: version.mime,\n\t\tetag: `${version.props.getetag}`,\n\t\tsize: version.size,\n\t\ttype: version.type,\n\t\tmtime,\n\t\tpermissions: 'R',\n\t\tpreviewUrl,\n\t\turl: join('/remote.php/dav', version.filename),\n\t\tsource: generateRemoteUrl('dav') + encodePath(version.filename),\n\t\tfileVersion: version.basename,\n\t}\n}\n\n/**\n * Set version label\n *\n * @param version - The version to set the label for\n * @param newLabel - The new label\n */\nexport async function setVersionLabel(version: Version, newLabel: string) {\n\treturn await client.customRequest(\n\t\tversion.filename,\n\t\t{\n\t\t\tmethod: 'PROPPATCH',\n\t\t\tdata: `\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${newLabel}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t`,\n\t\t},\n\t)\n}\n\n/**\n * Delete version\n *\n * @param version - The version to delete\n */\nexport async function deleteVersion(version: Version) {\n\tawait client.deleteFile(version.filename)\n}\n","\n\n\n\n\n\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_ctx","$props","_cache","$event","_createElementVNode","_openBlock","props","__props","emit","__emit","previewLoaded","ref","previewErrored","capabilities","loadState","humanReadableSize","computed","formatFileSize","versionLabel","label","t","versionAuthor","getCurrentUser","versionHumanExplicitDate","getCanonicalLocale","downloadURL","getRootUrl","enableLabeling","enableDeletion","hasDeletePermissions","hasPermission","Permission","hasUpdatePermissions","isDownloadable","attribute","labelUpdate","restoreVersion","deleteVersion","nextTick","click","event","compareVersion","node","permission","_createBlock","_unref","NcListItem","_createVNode","ImageOffOutline","_hoisted_1","_hoisted_4","_hoisted_5","_hoisted_6","NcAvatar","_hoisted_8","_hoisted_9","NcDateTime","NcActionButton","Pencil","_createTextVNode","FileCompare","BackupRestore","NcActionLink","Download","Delete","labelInput","useTemplateRef","internalLabel","dialogButtons","buttons","setVersionLabel","svgCheck","watchEffect","NcDialog","$emit","NcTextField","_toDisplayString","logger","getLoggerBuilder","_sfc_main$1","defineComponent","containerHeight","containerTop","containerBottom","currentRowTop","currentRowBottom","visibleSections","section","visibleRows","row","distance","visibleItems","rows","items","rowIdToKeyMap","item","usedTokens","key","unusedTokens","finalMapping","id","totalHeight","sectionHeight","paddingTop","buffer","value","currentRowTopDistanceFromTop","entries","entry","cr","_normalizeStyle","_renderSlot","davRequest","client","getClient","fetchVersions","path","versions","mime","version","formatVersion","authorIds","authors","axios","generateUrl","author","exception","mtime","nodeNormalizedMtime","previewUrl","join","generateRemoteUrl","encodePath","newLabel","isMobile","useIsMobile","loading","showVersionLabelForm","editedVersion","currentVersionMtime","orderedVersions","a","b","sections","initialVersionMtime","canView","canCompare","watch","loadVersions","watchDebounced","handleRestore","restoredNode","restoreStartedEventState","showSuccess","showError","handleLabelUpdateRequest","handleLabelUpdate","oldLabel","handleDelete","index","openVersion","_versions","v","VirtualScrolling","_withCtx","_Fragment","_renderList","VersionEntry","NcLoadingIcon","VersionLabelDialog"],"mappings":"6gDAoBA,MAAKA,GAAU,CACb,KAAM,oBACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,QAER,UAAW,CACT,KAAM,OACN,QAAS,gBAEX,KAAM,CACJ,KAAM,OACN,QAAS,EACX,CACF,CACF,+DAxBYC,GAAA,CAAA,EAAE,uPAAuP,iDAXnQC,EAeO,OAfPC,EAAcC,EAAA,OAAM,CACb,cAAaC,EAAA,MAAK,K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x_google_ignoreList":[0,1,2]} \ No newline at end of file diff --git a/dist/FilesVersionsSidebarTab-Bdeocctt.chunk.mjs.map.license b/dist/FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs.map.license similarity index 100% rename from dist/FilesVersionsSidebarTab-Bdeocctt.chunk.mjs.map.license rename to dist/FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs.map.license diff --git a/dist/SetStatusModal-63728HX3.chunk.mjs b/dist/SetStatusModal-BCek_Hdw.chunk.mjs similarity index 99% rename from dist/SetStatusModal-63728HX3.chunk.mjs rename to dist/SetStatusModal-BCek_Hdw.chunk.mjs index 5ca39804227ba..500c1d184c6fd 100644 --- a/dist/SetStatusModal-63728HX3.chunk.mjs +++ b/dist/SetStatusModal-BCek_Hdw.chunk.mjs @@ -1,2 +1,2 @@ -import{a as v}from"./index-DCJOwzzz.chunk.mjs";import{t as s}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{b as O}from"./index-DgEyzq8A.chunk.mjs";import{N as A}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{c as q}from"./index-CO7ZwNPX.chunk.mjs";import{N as x}from"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import{c as C,m as R,a as T,O as j,l as I}from"./user_status-menu.mjs";import{a as S}from"./index-C3KLQ_oe.chunk.mjs";import{f as c,o as n,j as m,k as a,t as l,e as p,w as g,g as b,F as $,A as B,c as y,W as M,y as U,C as V,m as k}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{N as L}from"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";import{_ as E}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{N as W}from"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./index-9ZBo3L67.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";function D(){return[{label:s("user_status","Don't clear"),clearAt:null},{label:s("user_status","30 minutes"),clearAt:{type:"period",time:1800}},{label:s("user_status","1 hour"),clearAt:{type:"period",time:3600}},{label:s("user_status","4 hours"),clearAt:{type:"period",time:14400}},{label:s("user_status","Today"),clearAt:{type:"end-of",time:"day"}},{label:s("user_status","This week"),clearAt:{type:"end-of",time:"week"}}]}const H={name:"ClearAtSelect",components:{NcSelect:x},props:{clearAt:{type:Object,default:null}},emits:["selectClearAt"],data(){return{options:D()}},computed:{option(){return{clearAt:this.clearAt,label:C(this.clearAt)}}},methods:{t:s,select(t){t&&this.$emit("selectClearAt",t.clearAt)}}},z={class:"clear-at-select"},K={class:"clear-at-select__label",for:"clearStatus"};function Y(t,i,u,f,o,e){const d=c("NcSelect");return n(),m("div",z,[a("label",K,l(e.t("user_status","Clear status after")),1),p(d,{inputId:"clearStatus",class:"clear-at-select__select",options:o.options,modelValue:e.option,clearable:!1,placement:"top",labelOutside:"","onOption:selected":e.select},null,8,["options","modelValue","onOption:selected"])])}const G=S(H,[["render",Y],["__scopeId","data-v-83a07433"]]),J={name:"CustomMessageInput",components:{NcTextField:E,NcButton:A,NcEmojiPicker:L},props:{icon:{type:String,default:"😀"},message:{type:String,default:""},disabled:{type:Boolean,default:!1}},emits:["change","selectIcon"],computed:{visibleIcon(){return this.icon||"😀"}},methods:{t:s,focus(){this.$refs.input.focus()},onChange(t){this.$emit("change",t)},setIcon(t){this.$emit("selectIcon",t)}}},Q={class:"custom-input",role:"group"},X={class:"custom-input__container"};function Z(t,i,u,f,o,e){const d=c("NcButton"),r=c("NcEmojiPicker"),_=c("NcTextField");return n(),m("div",Q,[p(r,{container:"#user_status-dialog",onSelect:e.setIcon},{default:g(()=>[p(d,{variant:"tertiary","aria-label":e.t("user_status","Emoji for your status message")},{icon:g(()=>[b(l(e.visibleIcon),1)]),_:1},8,["aria-label"])]),_:1},8,["onSelect"]),a("div",X,[p(_,{ref:"input",maxlength:"80",disabled:u.disabled,placeholder:e.t("user_status","What is your status?"),modelValue:u.message,type:"text",label:e.t("user_status","What is your status?"),"onUpdate:modelValue":e.onChange},null,8,["disabled","placeholder","modelValue","label","onUpdate:modelValue"])])])}const ee=S(J,[["render",Z],["__scopeId","data-v-90dc6f12"]]),te={name:"OnlineStatusSelect",components:{NcUserStatusIcon:W},props:{checked:{type:Boolean,default:!1},type:{type:String,required:!0},label:{type:String,required:!0},subline:{type:String,default:null}},emits:["select"],computed:{id(){return`user-status-online-status-${this.type}`}},methods:{onChange(){this.$emit("select",this.type)}}},se={class:"user-status-online-select"},ae=["id","checked"],ie=["for"],re={class:"user-status-online-select__icon-wrapper"},ue={class:"user-status-online-select__subline"};function le(t,i,u,f,o,e){const d=c("NcUserStatusIcon");return n(),m("div",se,[a("input",{id:e.id,checked:u.checked,class:"hidden-visually user-status-online-select__input",type:"radio",name:"user-status-online",onChange:i[0]||(i[0]=(...r)=>e.onChange&&e.onChange(...r))},null,40,ae),a("label",{for:e.id,class:"user-status-online-select__label"},[a("span",re,[p(d,{status:u.type,class:"user-status-online-select__icon","aria-hidden":"true"},null,8,["status"])]),b(" "+l(u.label)+" ",1),a("em",ue,l(u.subline),1)],8,ie)])}const ne=S(te,[["render",le],["__scopeId","data-v-16876893"]]),ce={name:"PredefinedStatus",props:{messageId:{type:String,required:!0},icon:{type:String,required:!0},message:{type:String,required:!0},clearAt:{type:Object,required:!1,default:null},selected:{type:Boolean,required:!1,default:!1}},emits:["select"],computed:{id(){return`user-status-predefined-status-${this.messageId}`},formattedClearAt(){return C(this.clearAt)}},methods:{select(){this.$emit("select")}}},oe={class:"predefined-status"},de=["id","checked"],pe=["for"],me={"aria-hidden":"true",class:"predefined-status__label--icon"},he={class:"predefined-status__label--message"},ge={class:"predefined-status__label--clear-at"};function Se(t,i,u,f,o,e){return n(),m("li",oe,[a("input",{id:e.id,class:"hidden-visually predefined-status__input",type:"radio",name:"predefined-status",checked:u.selected,onChange:i[0]||(i[0]=(...d)=>e.select&&e.select(...d))},null,40,de),a("label",{class:"predefined-status__label",for:e.id},[a("span",me,l(u.icon),1),a("span",he,l(u.message),1),a("span",ge,l(e.formattedClearAt),1)],8,pe)])}const fe=S(ce,[["render",Se],["__scopeId","data-v-200bf95b"]]),_e={name:"PredefinedStatusesList",components:{PredefinedStatus:fe},emits:["selectStatus"],data(){return{lastSelected:null}},computed:{...T({predefinedStatuses:t=>t.predefinedStatuses.predefinedStatuses,messageId:t=>t.userStatus.messageId}),...R(["statusesHaveLoaded"])},watch:{messageId:{immediate:!0,handler(){this.lastSelected=this.messageId}}},created(){this.$store.dispatch("loadAllPredefinedStatuses")},methods:{t:s,selectStatus(t){this.lastSelected=t.id,this.$emit("selectStatus",t)}}},be=["aria-label"],ye={key:1,class:"predefined-statuses-list"};function ve(t,i,u,f,o,e){const d=c("PredefinedStatus");return t.statusesHaveLoaded?(n(),m("ul",{key:0,class:"predefined-statuses-list","aria-label":e.t("user_status","Predefined statuses")},[(n(!0),m($,null,B(t.predefinedStatuses,r=>(n(),y(d,{key:r.id,messageId:r.id,icon:r.icon,message:r.message,clearAt:r.clearAt,selected:o.lastSelected===r.id,onSelect:_=>e.selectStatus(r)},null,8,["messageId","icon","message","clearAt","selected","onSelect"]))),128))],8,be)):(n(),m("div",ye,[...i[0]||(i[0]=[a("div",{class:"icon icon-loading-small"},null,-1)])]))}const Ie=S(_e,[["render",ve],["__scopeId","data-v-b7009355"]]),ke={name:"PreviousStatus",components:{NcButton:A},props:{icon:{type:[String,null],required:!0},message:{type:String,required:!0}},emits:["select"],methods:{t:s,select(){this.$emit("select")}}},Ae={class:"predefined-status__icon"},Me={class:"predefined-status__message"},Ce={class:"predefined-status__clear-at"},$e={class:"backup-status__reset-button"};function Be(t,i,u,f,o,e){const d=c("NcButton");return n(),m("div",{class:"predefined-status backup-status",tabindex:"0",onKeyup:[i[0]||(i[0]=M((...r)=>e.select&&e.select(...r),["enter"])),i[1]||(i[1]=M((...r)=>e.select&&e.select(...r),["space"]))],onClick:i[2]||(i[2]=(...r)=>e.select&&e.select(...r))},[a("span",Ae,l(u.icon),1),a("span",Me,l(u.message),1),a("span",Ce,l(e.t("user_status","Previously set")),1),a("div",$e,[p(d,{onClick:e.select},{default:g(()=>[b(l(e.t("user_status","Reset status")),1)]),_:1},8,["onClick"])])],32)}const Ne=S(ke,[["render",Be],["__scopeId","data-v-5fa747a0"]]);function Pe(){return[{type:"online",label:s("user_status","Online")},{type:"away",label:s("user_status","Away")},{type:"busy",label:s("user_status","Busy")},{type:"dnd",label:s("user_status","Do not disturb"),subline:s("user_status","Mute all notifications")},{type:"invisible",label:s("user_status","Invisible"),subline:s("user_status","Appear offline")}]}const we={name:"SetStatusModal",components:{ClearAtSelect:G,CustomMessageInput:ee,NcModal:q,OnlineStatusSelect:ne,PredefinedStatusesList:Ie,PreviousStatus:Ne,NcButton:A},mixins:[j],props:{inline:{type:Boolean,default:!1}},emits:["close"],data(){return{clearAt:null,editedMessage:"",predefinedMessageId:null,isSavingStatus:!1,statuses:Pe()}},computed:{messageId(){return this.$store.state.userStatus.messageId},icon(){return this.$store.state.userStatus.icon},message(){return this.$store.state.userStatus.message||""},hasBackupStatus(){return this.messageId&&(this.backupIcon||this.backupMessage)},backupIcon(){return this.$store.state.userBackupStatus.icon||""},backupMessage(){return this.$store.state.userBackupStatus.message||""},absencePageUrl(){return O("settings/user/availability#absence")},resetButtonText(){return this.backupIcon&&this.backupMessage?s("user_status",'Reset status to "{icon} {message}"',{icon:this.backupIcon,message:this.backupMessage}):this.backupMessage?s("user_status",'Reset status to "{message}"',{message:this.backupMessage}):this.backupIcon?s("user_status",'Reset status to "{icon}"',{icon:this.backupIcon}):s("user_status","Reset status")},setReturnFocus(){if(!this.inline)return document.querySelector('[aria-controls="header-menu-user-menu"]')??void 0}},watch:{message:{immediate:!0,handler(t){this.editedMessage=t}}},mounted(){this.$store.dispatch("fetchBackupFromServer"),this.predefinedMessageId=this.$store.state.userStatus.messageId,this.$store.state.userStatus.clearAt!==null&&(this.clearAt={type:"_time",time:this.$store.state.userStatus.clearAt})},methods:{t:s,closeModal(){this.$emit("close")},setIcon(t){this.predefinedMessageId=null,this.$store.dispatch("setCustomMessage",{message:this.message,icon:t,clearAt:this.clearAt}),this.$nextTick(()=>{this.$refs.customMessageInput.focus()})},setMessage(t){this.predefinedMessageId=null,this.editedMessage=t},setClearAt(t){this.clearAt=t},selectPredefinedMessage(t){this.predefinedMessageId=t.id,this.clearAt=t.clearAt,this.$store.dispatch("setPredefinedMessage",{messageId:t.id,clearAt:t.clearAt})},async saveStatus(){if(!this.isSavingStatus){try{this.isSavingStatus=!0,this.predefinedMessageId===null?await this.$store.dispatch("setCustomMessage",{message:this.editedMessage,icon:this.icon,clearAt:this.clearAt}):this.$store.dispatch("setPredefinedMessage",{messageId:this.predefinedMessageId,clearAt:this.clearAt})}catch(t){v(s("user_status","There was an error saving the status")),I.debug(t),this.isSavingStatus=!1;return}this.isSavingStatus=!1,this.closeModal()}},async clearStatus(){try{this.isSavingStatus=!0,await this.$store.dispatch("clearMessage")}catch(t){v(s("user_status","There was an error clearing the status")),I.debug(t),this.isSavingStatus=!1;return}this.isSavingStatus=!1,this.predefinedMessageId=null,this.closeModal()},async revertBackupFromServer(){try{this.isSavingStatus=!0,await this.$store.dispatch("revertBackupFromServer",{messageId:this.messageId})}catch(t){v(s("user_status","There was an error reverting the status")),I.debug(t),this.isSavingStatus=!1;return}this.isSavingStatus=!1,this.predefinedMessageId=this.$store.state.userStatus?.messageId}}},Fe={class:"set-status-modal"},Oe={id:"user_status-set-dialog",class:"set-status-modal__header"},qe=["aria-label"],xe={class:"set-status-modal__header"},Re={class:"set-status-modal__custom-input"},Te={key:0,class:"set-status-modal__automation-hint"},je={class:"status-buttons"};function Ue(t,i,u,f,o,e){const d=c("OnlineStatusSelect"),r=c("CustomMessageInput"),_=c("NcButton"),N=c("PreviousStatus"),P=c("PredefinedStatusesList"),w=c("ClearAtSelect"),F=c("NcModal");return n(),y(F,{id:"user_status-dialog",size:"normal",labelId:"user_status-set-dialog",dark:"",setReturnFocus:e.setReturnFocus,onClose:e.closeModal},{default:g(()=>[a("div",Fe,[a("h2",Oe,l(e.t("user_status","Online status")),1),a("div",{class:"set-status-modal__online-status",role:"radiogroup","aria-label":e.t("user_status","Online status")},[(n(!0),m($,null,B(o.statuses,h=>(n(),y(d,U({key:h.type},{ref_for:!0},h,{checked:h.type===t.statusType,onSelect:t.changeStatus}),null,16,["checked","onSelect"]))),128))],8,qe),a("form",{onSubmit:i[0]||(i[0]=V((...h)=>e.saveStatus&&e.saveStatus(...h),["prevent"])),onReset:i[1]||(i[1]=(...h)=>e.clearStatus&&e.clearStatus(...h))},[a("h3",xe,l(e.t("user_status","Status message")),1),a("div",Re,[p(r,{ref:"customMessageInput",icon:e.icon,message:o.editedMessage,onChange:e.setMessage,onSelectIcon:e.setIcon},null,8,["icon","message","onChange","onSelectIcon"]),e.messageId==="vacationing"?(n(),y(_,{key:0,href:e.absencePageUrl,target:"_blank",variant:"secondary","aria-label":e.t("user_status","Set absence period")},{default:g(()=>[b(l(e.t("user_status","Set absence period and replacement")+" ↗"),1)]),_:1},8,["href","aria-label"])):k("",!0)]),e.hasBackupStatus?(n(),m("div",Te,l(e.t("user_status","Your status was set automatically")),1)):k("",!0),e.hasBackupStatus?(n(),y(N,{key:1,icon:e.backupIcon,message:e.backupMessage,onSelect:e.revertBackupFromServer},null,8,["icon","message","onSelect"])):k("",!0),p(P,{onSelectStatus:e.selectPredefinedMessage},null,8,["onSelectStatus"]),p(w,{clearAt:o.clearAt,onSelectClearAt:e.setClearAt},null,8,["clearAt","onSelectClearAt"]),a("div",je,[p(_,{wide:!0,variant:"tertiary",type:"reset","aria-label":e.t("user_status","Clear status message"),disabled:o.isSavingStatus},{default:g(()=>[b(l(e.t("user_status","Clear status message")),1)]),_:1},8,["aria-label","disabled"]),p(_,{wide:!0,variant:"primary",type:"submit","aria-label":e.t("user_status","Set status message"),disabled:o.isSavingStatus},{default:g(()=>[b(l(e.t("user_status","Set status message")),1)]),_:1},8,["aria-label","disabled"])])],32)])]),_:1},8,["setReturnFocus","onClose"])}const lt=S(we,[["render",Ue],["__scopeId","data-v-e87f4d59"]]);export{lt as default}; -//# sourceMappingURL=SetStatusModal-63728HX3.chunk.mjs.map +import{a as v}from"./index-WQvok30H.chunk.mjs";import{t as s}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{b as O}from"./index-DgEyzq8A.chunk.mjs";import{N as A}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{c as q}from"./index-CO7ZwNPX.chunk.mjs";import{N as x}from"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import{c as C,m as R,a as T,O as j,l as I}from"./user_status-menu.mjs";import{a as S}from"./index-C3KLQ_oe.chunk.mjs";import{f as c,o as n,j as m,k as a,t as l,e as p,w as g,g as b,F as $,A as B,c as y,W as M,y as U,C as V,m as k}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{N as L}from"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";import{_ as E}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{N as W}from"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./index-9ZBo3L67.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";function D(){return[{label:s("user_status","Don't clear"),clearAt:null},{label:s("user_status","30 minutes"),clearAt:{type:"period",time:1800}},{label:s("user_status","1 hour"),clearAt:{type:"period",time:3600}},{label:s("user_status","4 hours"),clearAt:{type:"period",time:14400}},{label:s("user_status","Today"),clearAt:{type:"end-of",time:"day"}},{label:s("user_status","This week"),clearAt:{type:"end-of",time:"week"}}]}const H={name:"ClearAtSelect",components:{NcSelect:x},props:{clearAt:{type:Object,default:null}},emits:["selectClearAt"],data(){return{options:D()}},computed:{option(){return{clearAt:this.clearAt,label:C(this.clearAt)}}},methods:{t:s,select(t){t&&this.$emit("selectClearAt",t.clearAt)}}},z={class:"clear-at-select"},K={class:"clear-at-select__label",for:"clearStatus"};function Y(t,i,u,f,o,e){const d=c("NcSelect");return n(),m("div",z,[a("label",K,l(e.t("user_status","Clear status after")),1),p(d,{inputId:"clearStatus",class:"clear-at-select__select",options:o.options,modelValue:e.option,clearable:!1,placement:"top",labelOutside:"","onOption:selected":e.select},null,8,["options","modelValue","onOption:selected"])])}const G=S(H,[["render",Y],["__scopeId","data-v-83a07433"]]),J={name:"CustomMessageInput",components:{NcTextField:E,NcButton:A,NcEmojiPicker:L},props:{icon:{type:String,default:"😀"},message:{type:String,default:""},disabled:{type:Boolean,default:!1}},emits:["change","selectIcon"],computed:{visibleIcon(){return this.icon||"😀"}},methods:{t:s,focus(){this.$refs.input.focus()},onChange(t){this.$emit("change",t)},setIcon(t){this.$emit("selectIcon",t)}}},Q={class:"custom-input",role:"group"},X={class:"custom-input__container"};function Z(t,i,u,f,o,e){const d=c("NcButton"),r=c("NcEmojiPicker"),_=c("NcTextField");return n(),m("div",Q,[p(r,{container:"#user_status-dialog",onSelect:e.setIcon},{default:g(()=>[p(d,{variant:"tertiary","aria-label":e.t("user_status","Emoji for your status message")},{icon:g(()=>[b(l(e.visibleIcon),1)]),_:1},8,["aria-label"])]),_:1},8,["onSelect"]),a("div",X,[p(_,{ref:"input",maxlength:"80",disabled:u.disabled,placeholder:e.t("user_status","What is your status?"),modelValue:u.message,type:"text",label:e.t("user_status","What is your status?"),"onUpdate:modelValue":e.onChange},null,8,["disabled","placeholder","modelValue","label","onUpdate:modelValue"])])])}const ee=S(J,[["render",Z],["__scopeId","data-v-90dc6f12"]]),te={name:"OnlineStatusSelect",components:{NcUserStatusIcon:W},props:{checked:{type:Boolean,default:!1},type:{type:String,required:!0},label:{type:String,required:!0},subline:{type:String,default:null}},emits:["select"],computed:{id(){return`user-status-online-status-${this.type}`}},methods:{onChange(){this.$emit("select",this.type)}}},se={class:"user-status-online-select"},ae=["id","checked"],ie=["for"],re={class:"user-status-online-select__icon-wrapper"},ue={class:"user-status-online-select__subline"};function le(t,i,u,f,o,e){const d=c("NcUserStatusIcon");return n(),m("div",se,[a("input",{id:e.id,checked:u.checked,class:"hidden-visually user-status-online-select__input",type:"radio",name:"user-status-online",onChange:i[0]||(i[0]=(...r)=>e.onChange&&e.onChange(...r))},null,40,ae),a("label",{for:e.id,class:"user-status-online-select__label"},[a("span",re,[p(d,{status:u.type,class:"user-status-online-select__icon","aria-hidden":"true"},null,8,["status"])]),b(" "+l(u.label)+" ",1),a("em",ue,l(u.subline),1)],8,ie)])}const ne=S(te,[["render",le],["__scopeId","data-v-16876893"]]),ce={name:"PredefinedStatus",props:{messageId:{type:String,required:!0},icon:{type:String,required:!0},message:{type:String,required:!0},clearAt:{type:Object,required:!1,default:null},selected:{type:Boolean,required:!1,default:!1}},emits:["select"],computed:{id(){return`user-status-predefined-status-${this.messageId}`},formattedClearAt(){return C(this.clearAt)}},methods:{select(){this.$emit("select")}}},oe={class:"predefined-status"},de=["id","checked"],pe=["for"],me={"aria-hidden":"true",class:"predefined-status__label--icon"},he={class:"predefined-status__label--message"},ge={class:"predefined-status__label--clear-at"};function Se(t,i,u,f,o,e){return n(),m("li",oe,[a("input",{id:e.id,class:"hidden-visually predefined-status__input",type:"radio",name:"predefined-status",checked:u.selected,onChange:i[0]||(i[0]=(...d)=>e.select&&e.select(...d))},null,40,de),a("label",{class:"predefined-status__label",for:e.id},[a("span",me,l(u.icon),1),a("span",he,l(u.message),1),a("span",ge,l(e.formattedClearAt),1)],8,pe)])}const fe=S(ce,[["render",Se],["__scopeId","data-v-200bf95b"]]),_e={name:"PredefinedStatusesList",components:{PredefinedStatus:fe},emits:["selectStatus"],data(){return{lastSelected:null}},computed:{...T({predefinedStatuses:t=>t.predefinedStatuses.predefinedStatuses,messageId:t=>t.userStatus.messageId}),...R(["statusesHaveLoaded"])},watch:{messageId:{immediate:!0,handler(){this.lastSelected=this.messageId}}},created(){this.$store.dispatch("loadAllPredefinedStatuses")},methods:{t:s,selectStatus(t){this.lastSelected=t.id,this.$emit("selectStatus",t)}}},be=["aria-label"],ye={key:1,class:"predefined-statuses-list"};function ve(t,i,u,f,o,e){const d=c("PredefinedStatus");return t.statusesHaveLoaded?(n(),m("ul",{key:0,class:"predefined-statuses-list","aria-label":e.t("user_status","Predefined statuses")},[(n(!0),m($,null,B(t.predefinedStatuses,r=>(n(),y(d,{key:r.id,messageId:r.id,icon:r.icon,message:r.message,clearAt:r.clearAt,selected:o.lastSelected===r.id,onSelect:_=>e.selectStatus(r)},null,8,["messageId","icon","message","clearAt","selected","onSelect"]))),128))],8,be)):(n(),m("div",ye,[...i[0]||(i[0]=[a("div",{class:"icon icon-loading-small"},null,-1)])]))}const Ie=S(_e,[["render",ve],["__scopeId","data-v-b7009355"]]),ke={name:"PreviousStatus",components:{NcButton:A},props:{icon:{type:[String,null],required:!0},message:{type:String,required:!0}},emits:["select"],methods:{t:s,select(){this.$emit("select")}}},Ae={class:"predefined-status__icon"},Me={class:"predefined-status__message"},Ce={class:"predefined-status__clear-at"},$e={class:"backup-status__reset-button"};function Be(t,i,u,f,o,e){const d=c("NcButton");return n(),m("div",{class:"predefined-status backup-status",tabindex:"0",onKeyup:[i[0]||(i[0]=M((...r)=>e.select&&e.select(...r),["enter"])),i[1]||(i[1]=M((...r)=>e.select&&e.select(...r),["space"]))],onClick:i[2]||(i[2]=(...r)=>e.select&&e.select(...r))},[a("span",Ae,l(u.icon),1),a("span",Me,l(u.message),1),a("span",Ce,l(e.t("user_status","Previously set")),1),a("div",$e,[p(d,{onClick:e.select},{default:g(()=>[b(l(e.t("user_status","Reset status")),1)]),_:1},8,["onClick"])])],32)}const Ne=S(ke,[["render",Be],["__scopeId","data-v-5fa747a0"]]);function Pe(){return[{type:"online",label:s("user_status","Online")},{type:"away",label:s("user_status","Away")},{type:"busy",label:s("user_status","Busy")},{type:"dnd",label:s("user_status","Do not disturb"),subline:s("user_status","Mute all notifications")},{type:"invisible",label:s("user_status","Invisible"),subline:s("user_status","Appear offline")}]}const we={name:"SetStatusModal",components:{ClearAtSelect:G,CustomMessageInput:ee,NcModal:q,OnlineStatusSelect:ne,PredefinedStatusesList:Ie,PreviousStatus:Ne,NcButton:A},mixins:[j],props:{inline:{type:Boolean,default:!1}},emits:["close"],data(){return{clearAt:null,editedMessage:"",predefinedMessageId:null,isSavingStatus:!1,statuses:Pe()}},computed:{messageId(){return this.$store.state.userStatus.messageId},icon(){return this.$store.state.userStatus.icon},message(){return this.$store.state.userStatus.message||""},hasBackupStatus(){return this.messageId&&(this.backupIcon||this.backupMessage)},backupIcon(){return this.$store.state.userBackupStatus.icon||""},backupMessage(){return this.$store.state.userBackupStatus.message||""},absencePageUrl(){return O("settings/user/availability#absence")},resetButtonText(){return this.backupIcon&&this.backupMessage?s("user_status",'Reset status to "{icon} {message}"',{icon:this.backupIcon,message:this.backupMessage}):this.backupMessage?s("user_status",'Reset status to "{message}"',{message:this.backupMessage}):this.backupIcon?s("user_status",'Reset status to "{icon}"',{icon:this.backupIcon}):s("user_status","Reset status")},setReturnFocus(){if(!this.inline)return document.querySelector('[aria-controls="header-menu-user-menu"]')??void 0}},watch:{message:{immediate:!0,handler(t){this.editedMessage=t}}},mounted(){this.$store.dispatch("fetchBackupFromServer"),this.predefinedMessageId=this.$store.state.userStatus.messageId,this.$store.state.userStatus.clearAt!==null&&(this.clearAt={type:"_time",time:this.$store.state.userStatus.clearAt})},methods:{t:s,closeModal(){this.$emit("close")},setIcon(t){this.predefinedMessageId=null,this.$store.dispatch("setCustomMessage",{message:this.message,icon:t,clearAt:this.clearAt}),this.$nextTick(()=>{this.$refs.customMessageInput.focus()})},setMessage(t){this.predefinedMessageId=null,this.editedMessage=t},setClearAt(t){this.clearAt=t},selectPredefinedMessage(t){this.predefinedMessageId=t.id,this.clearAt=t.clearAt,this.$store.dispatch("setPredefinedMessage",{messageId:t.id,clearAt:t.clearAt})},async saveStatus(){if(!this.isSavingStatus){try{this.isSavingStatus=!0,this.predefinedMessageId===null?await this.$store.dispatch("setCustomMessage",{message:this.editedMessage,icon:this.icon,clearAt:this.clearAt}):this.$store.dispatch("setPredefinedMessage",{messageId:this.predefinedMessageId,clearAt:this.clearAt})}catch(t){v(s("user_status","There was an error saving the status")),I.debug(t),this.isSavingStatus=!1;return}this.isSavingStatus=!1,this.closeModal()}},async clearStatus(){try{this.isSavingStatus=!0,await this.$store.dispatch("clearMessage")}catch(t){v(s("user_status","There was an error clearing the status")),I.debug(t),this.isSavingStatus=!1;return}this.isSavingStatus=!1,this.predefinedMessageId=null,this.closeModal()},async revertBackupFromServer(){try{this.isSavingStatus=!0,await this.$store.dispatch("revertBackupFromServer",{messageId:this.messageId})}catch(t){v(s("user_status","There was an error reverting the status")),I.debug(t),this.isSavingStatus=!1;return}this.isSavingStatus=!1,this.predefinedMessageId=this.$store.state.userStatus?.messageId}}},Fe={class:"set-status-modal"},Oe={id:"user_status-set-dialog",class:"set-status-modal__header"},qe=["aria-label"],xe={class:"set-status-modal__header"},Re={class:"set-status-modal__custom-input"},Te={key:0,class:"set-status-modal__automation-hint"},je={class:"status-buttons"};function Ue(t,i,u,f,o,e){const d=c("OnlineStatusSelect"),r=c("CustomMessageInput"),_=c("NcButton"),N=c("PreviousStatus"),P=c("PredefinedStatusesList"),w=c("ClearAtSelect"),F=c("NcModal");return n(),y(F,{id:"user_status-dialog",size:"normal",labelId:"user_status-set-dialog",dark:"",setReturnFocus:e.setReturnFocus,onClose:e.closeModal},{default:g(()=>[a("div",Fe,[a("h2",Oe,l(e.t("user_status","Online status")),1),a("div",{class:"set-status-modal__online-status",role:"radiogroup","aria-label":e.t("user_status","Online status")},[(n(!0),m($,null,B(o.statuses,h=>(n(),y(d,U({key:h.type},{ref_for:!0},h,{checked:h.type===t.statusType,onSelect:t.changeStatus}),null,16,["checked","onSelect"]))),128))],8,qe),a("form",{onSubmit:i[0]||(i[0]=V((...h)=>e.saveStatus&&e.saveStatus(...h),["prevent"])),onReset:i[1]||(i[1]=(...h)=>e.clearStatus&&e.clearStatus(...h))},[a("h3",xe,l(e.t("user_status","Status message")),1),a("div",Re,[p(r,{ref:"customMessageInput",icon:e.icon,message:o.editedMessage,onChange:e.setMessage,onSelectIcon:e.setIcon},null,8,["icon","message","onChange","onSelectIcon"]),e.messageId==="vacationing"?(n(),y(_,{key:0,href:e.absencePageUrl,target:"_blank",variant:"secondary","aria-label":e.t("user_status","Set absence period")},{default:g(()=>[b(l(e.t("user_status","Set absence period and replacement")+" ↗"),1)]),_:1},8,["href","aria-label"])):k("",!0)]),e.hasBackupStatus?(n(),m("div",Te,l(e.t("user_status","Your status was set automatically")),1)):k("",!0),e.hasBackupStatus?(n(),y(N,{key:1,icon:e.backupIcon,message:e.backupMessage,onSelect:e.revertBackupFromServer},null,8,["icon","message","onSelect"])):k("",!0),p(P,{onSelectStatus:e.selectPredefinedMessage},null,8,["onSelectStatus"]),p(w,{clearAt:o.clearAt,onSelectClearAt:e.setClearAt},null,8,["clearAt","onSelectClearAt"]),a("div",je,[p(_,{wide:!0,variant:"tertiary",type:"reset","aria-label":e.t("user_status","Clear status message"),disabled:o.isSavingStatus},{default:g(()=>[b(l(e.t("user_status","Clear status message")),1)]),_:1},8,["aria-label","disabled"]),p(_,{wide:!0,variant:"primary",type:"submit","aria-label":e.t("user_status","Set status message"),disabled:o.isSavingStatus},{default:g(()=>[b(l(e.t("user_status","Set status message")),1)]),_:1},8,["aria-label","disabled"])])],32)])]),_:1},8,["setReturnFocus","onClose"])}const lt=S(we,[["render",Ue],["__scopeId","data-v-e87f4d59"]]);export{lt as default}; +//# sourceMappingURL=SetStatusModal-BCek_Hdw.chunk.mjs.map diff --git a/dist/SetStatusModal-63728HX3.chunk.mjs.license b/dist/SetStatusModal-BCek_Hdw.chunk.mjs.license similarity index 100% rename from dist/SetStatusModal-63728HX3.chunk.mjs.license rename to dist/SetStatusModal-BCek_Hdw.chunk.mjs.license diff --git a/dist/SetStatusModal-63728HX3.chunk.mjs.map b/dist/SetStatusModal-BCek_Hdw.chunk.mjs.map similarity index 99% rename from dist/SetStatusModal-63728HX3.chunk.mjs.map rename to dist/SetStatusModal-BCek_Hdw.chunk.mjs.map index 8fdc018315b8f..e5e1ff7a97ec1 100644 --- a/dist/SetStatusModal-63728HX3.chunk.mjs.map +++ b/dist/SetStatusModal-BCek_Hdw.chunk.mjs.map @@ -1 +1 @@ -{"version":3,"file":"SetStatusModal-63728HX3.chunk.mjs","sources":["../build/frontend/apps/user_status/src/services/clearAtOptionsService.js","../build/frontend/apps/user_status/src/components/ClearAtSelect.vue","../build/frontend/apps/user_status/src/components/CustomMessageInput.vue","../build/frontend/apps/user_status/src/components/OnlineStatusSelect.vue","../build/frontend/apps/user_status/src/components/PredefinedStatus.vue","../build/frontend/apps/user_status/src/components/PredefinedStatusesList.vue","../build/frontend/apps/user_status/src/components/PreviousStatus.vue","../build/frontend/apps/user_status/src/services/statusOptionsService.js","../build/frontend/apps/user_status/src/components/SetStatusModal.vue"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { t } from '@nextcloud/l10n'\n\n/**\n * Returns an array\n *\n * @return {object[]}\n */\nfunction getAllClearAtOptions() {\n\treturn [{\n\t\tlabel: t('user_status', 'Don\\'t clear'),\n\t\tclearAt: null,\n\t}, {\n\t\tlabel: t('user_status', '30 minutes'),\n\t\tclearAt: {\n\t\t\ttype: 'period',\n\t\t\ttime: 1800,\n\t\t},\n\t}, {\n\t\tlabel: t('user_status', '1 hour'),\n\t\tclearAt: {\n\t\t\ttype: 'period',\n\t\t\ttime: 3600,\n\t\t},\n\t}, {\n\t\tlabel: t('user_status', '4 hours'),\n\t\tclearAt: {\n\t\t\ttype: 'period',\n\t\t\ttime: 14400,\n\t\t},\n\t}, {\n\t\tlabel: t('user_status', 'Today'),\n\t\tclearAt: {\n\t\t\ttype: 'end-of',\n\t\t\ttime: 'day',\n\t\t},\n\t}, {\n\t\tlabel: t('user_status', 'This week'),\n\t\tclearAt: {\n\t\t\ttype: 'end-of',\n\t\t\ttime: 'week',\n\t\t},\n\t}]\n}\n\nexport {\n\tgetAllClearAtOptions,\n}\n","\n\n\n\n\n\n\n","\n\n\n\n\n\n","\n\n\n\n\n\n","\n\n\n\n\n\n","\n\n\n\n\n\n\n","\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { t } from '@nextcloud/l10n'\n\n/**\n * Returns a list of all user-definable statuses\n *\n * @return {object[]}\n */\nfunction getAllStatusOptions() {\n\treturn [{\n\t\ttype: 'online',\n\t\tlabel: t('user_status', 'Online'),\n\t}, {\n\t\ttype: 'away',\n\t\tlabel: t('user_status', 'Away'),\n\t}, {\n\t\ttype: 'busy',\n\t\tlabel: t('user_status', 'Busy'),\n\t}, {\n\t\ttype: 'dnd',\n\t\tlabel: t('user_status', 'Do not disturb'),\n\t\tsubline: t('user_status', 'Mute all notifications'),\n\t}, {\n\t\ttype: 'invisible',\n\t\tlabel: t('user_status', 'Invisible'),\n\t\tsubline: t('user_status', 'Appear offline'),\n\t}]\n}\n\nexport {\n\tgetAllStatusOptions,\n}\n","\n\n\n\n\n\n\n"],"names":["getAllClearAtOptions","t","_sfc_main","NcSelect","clearAtFormat","option","_hoisted_1","_openBlock","_createElementBlock","_createElementVNode","_hoisted_2","_toDisplayString","$options","_createVNode","_component_NcSelect","$data","NcTextField","NcButton","NcEmojiPicker","value","icon","_component_NcEmojiPicker","_component_NcButton","_component_NcTextField","$props","NcUserStatusIcon","_hoisted_4","_hoisted_5","args","_component_NcUserStatusIcon","_hoisted_6","PredefinedStatus","mapState","state","mapGetters","status","_ctx","_Fragment","_renderList","_createBlock","_component_PredefinedStatus","$event","_cache","_hoisted_3","getAllStatusOptions","ClearAtSelect","CustomMessageInput","NcModal","OnlineStatusSelect","PredefinedStatusesList","PreviousStatus","OnlineStatusMixin","generateUrl","newValue","message","clearAt","err","showError","logger","_hoisted_7","_component_NcModal","_component_OnlineStatusSelect","_mergeProps","_component_CustomMessageInput","_component_PreviousStatus","_component_PredefinedStatusesList","_component_ClearAtSelect"],"mappings":"msCAYA,SAASA,GAAuB,CAC/B,MAAO,CAAC,CACP,MAAOC,EAAE,cAAe,aAAc,EACtC,QAAS,IACX,EAAI,CACF,MAAOA,EAAE,cAAe,YAAY,EACpC,QAAS,CACR,KAAM,SACN,KAAM,IACT,CACA,EAAI,CACF,MAAOA,EAAE,cAAe,QAAQ,EAChC,QAAS,CACR,KAAM,SACN,KAAM,IACT,CACA,EAAI,CACF,MAAOA,EAAE,cAAe,SAAS,EACjC,QAAS,CACR,KAAM,SACN,KAAM,KACT,CACA,EAAI,CACF,MAAOA,EAAE,cAAe,OAAO,EAC/B,QAAS,CACR,KAAM,SACN,KAAM,KACT,CACA,EAAI,CACF,MAAOA,EAAE,cAAe,WAAW,EACnC,QAAS,CACR,KAAM,SACN,KAAM,MACT,CACA,CAAE,CACF,CCnBA,MAAKC,EAAU,CACd,KAAM,gBACN,WAAY,CACX,SAAAC,GAGD,MAAO,CACN,QAAS,CACR,KAAM,OACN,QAAS,OAIX,MAAO,CAAC,eAAe,EAEvB,MAAO,CACN,MAAO,CACN,QAAS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,YACP,aAAYA,EAAA,EAAC,cAAA,oBAAA,cACd,IAAmE,KAAhEA,EAAA,EAAC,cAAA,oCAAA,EAAA,IAAA,EAAA,CAAA,8CAICA,EAAA,qBADPJ,EAIM,MAJNsB,GAIMnB,EADFC,EAAA,EAAC,cAAA,mCAAA,CAAA,EAAA,CAAA,YAGEA,EAAA,qBADP2B,EAIoCyB,EAAA,OAFlC,KAAMpD,EAAA,WACN,QAASA,EAAA,cACT,SAAQA,EAAA,wEACVC,EAAkEoD,EAAA,CAAzC,eAAcrD,EAAA,uBAAuB,EAAA,KAAA,EAAA,CAAA,gBAAA,CAAA,EAC9DC,EAE+BqD,EAAA,CAD7B,QAASnD,EAAA,QACT,gBAAeH,EAAA,kDACjBH,EAiBM,MAjBNkD,GAiBM,CAhBL9C,EAOWS,EAAA,CANT,KAAM,GACP,QAAQ,WACR,KAAK,QACJ,aAAYV,EAAA,EAAC,cAAA,sBAAA,EACb,SAAUG,EAAA,2BACX,IAA8C,KAA3CH,EAAA,EAAC,cAAA,sBAAA,CAAA,EAAA,CAAA,sCAELC,EAOWS,EAAA,CANT,KAAM,GACP,QAAQ,UACR,KAAK,SACJ,aAAYV,EAAA,EAAC,cAAA,oBAAA,EACb,SAAUG,EAAA,2BACX,IAA4C,KAAzCH,EAAA,EAAC,cAAA,oBAAA,CAAA,EAAA,CAAA"} \ No newline at end of file +{"version":3,"file":"SetStatusModal-BCek_Hdw.chunk.mjs","sources":["../build/frontend/apps/user_status/src/services/clearAtOptionsService.js","../build/frontend/apps/user_status/src/components/ClearAtSelect.vue","../build/frontend/apps/user_status/src/components/CustomMessageInput.vue","../build/frontend/apps/user_status/src/components/OnlineStatusSelect.vue","../build/frontend/apps/user_status/src/components/PredefinedStatus.vue","../build/frontend/apps/user_status/src/components/PredefinedStatusesList.vue","../build/frontend/apps/user_status/src/components/PreviousStatus.vue","../build/frontend/apps/user_status/src/services/statusOptionsService.js","../build/frontend/apps/user_status/src/components/SetStatusModal.vue"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { t } from '@nextcloud/l10n'\n\n/**\n * Returns an array\n *\n * @return {object[]}\n */\nfunction getAllClearAtOptions() {\n\treturn [{\n\t\tlabel: t('user_status', 'Don\\'t clear'),\n\t\tclearAt: null,\n\t}, {\n\t\tlabel: t('user_status', '30 minutes'),\n\t\tclearAt: {\n\t\t\ttype: 'period',\n\t\t\ttime: 1800,\n\t\t},\n\t}, {\n\t\tlabel: t('user_status', '1 hour'),\n\t\tclearAt: {\n\t\t\ttype: 'period',\n\t\t\ttime: 3600,\n\t\t},\n\t}, {\n\t\tlabel: t('user_status', '4 hours'),\n\t\tclearAt: {\n\t\t\ttype: 'period',\n\t\t\ttime: 14400,\n\t\t},\n\t}, {\n\t\tlabel: t('user_status', 'Today'),\n\t\tclearAt: {\n\t\t\ttype: 'end-of',\n\t\t\ttime: 'day',\n\t\t},\n\t}, {\n\t\tlabel: t('user_status', 'This week'),\n\t\tclearAt: {\n\t\t\ttype: 'end-of',\n\t\t\ttime: 'week',\n\t\t},\n\t}]\n}\n\nexport {\n\tgetAllClearAtOptions,\n}\n","\n\n\n\n\n\n\n","\n\n\n\n\n\n","\n\n\n\n\n\n","\n\n\n\n\n\n","\n\n\n\n\n\n\n","\n\n\n\n\n\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { t } from '@nextcloud/l10n'\n\n/**\n * Returns a list of all user-definable statuses\n *\n * @return {object[]}\n */\nfunction getAllStatusOptions() {\n\treturn [{\n\t\ttype: 'online',\n\t\tlabel: t('user_status', 'Online'),\n\t}, {\n\t\ttype: 'away',\n\t\tlabel: t('user_status', 'Away'),\n\t}, {\n\t\ttype: 'busy',\n\t\tlabel: t('user_status', 'Busy'),\n\t}, {\n\t\ttype: 'dnd',\n\t\tlabel: t('user_status', 'Do not disturb'),\n\t\tsubline: t('user_status', 'Mute all notifications'),\n\t}, {\n\t\ttype: 'invisible',\n\t\tlabel: t('user_status', 'Invisible'),\n\t\tsubline: t('user_status', 'Appear offline'),\n\t}]\n}\n\nexport {\n\tgetAllStatusOptions,\n}\n","\n\n\n\n\n\n\n"],"names":["getAllClearAtOptions","t","_sfc_main","NcSelect","clearAtFormat","option","_hoisted_1","_openBlock","_createElementBlock","_createElementVNode","_hoisted_2","_toDisplayString","$options","_createVNode","_component_NcSelect","$data","NcTextField","NcButton","NcEmojiPicker","value","icon","_component_NcEmojiPicker","_component_NcButton","_component_NcTextField","$props","NcUserStatusIcon","_hoisted_4","_hoisted_5","args","_component_NcUserStatusIcon","_hoisted_6","PredefinedStatus","mapState","state","mapGetters","status","_ctx","_Fragment","_renderList","_createBlock","_component_PredefinedStatus","$event","_cache","_hoisted_3","getAllStatusOptions","ClearAtSelect","CustomMessageInput","NcModal","OnlineStatusSelect","PredefinedStatusesList","PreviousStatus","OnlineStatusMixin","generateUrl","newValue","message","clearAt","err","showError","logger","_hoisted_7","_component_NcModal","_component_OnlineStatusSelect","_mergeProps","_component_CustomMessageInput","_component_PreviousStatus","_component_PredefinedStatusesList","_component_ClearAtSelect"],"mappings":"msCAYA,SAASA,GAAuB,CAC/B,MAAO,CAAC,CACP,MAAOC,EAAE,cAAe,aAAc,EACtC,QAAS,IACX,EAAI,CACF,MAAOA,EAAE,cAAe,YAAY,EACpC,QAAS,CACR,KAAM,SACN,KAAM,IACT,CACA,EAAI,CACF,MAAOA,EAAE,cAAe,QAAQ,EAChC,QAAS,CACR,KAAM,SACN,KAAM,IACT,CACA,EAAI,CACF,MAAOA,EAAE,cAAe,SAAS,EACjC,QAAS,CACR,KAAM,SACN,KAAM,KACT,CACA,EAAI,CACF,MAAOA,EAAE,cAAe,OAAO,EAC/B,QAAS,CACR,KAAM,SACN,KAAM,KACT,CACA,EAAI,CACF,MAAOA,EAAE,cAAe,WAAW,EACnC,QAAS,C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eM,CAdLd,EAKyBkD,EAAA,CAJxB,IAAI,qBACH,KAAMnD,EAAA,KACN,QAASG,EAAA,cACT,SAAQH,EAAA,WACR,aAAYA,EAAA,8DAEPA,EAAA,YAAS,mBADhB2B,EAOWjB,EAAA,OALT,KAAMV,EAAA,eACP,OAAO,SACP,QAAQ,YACP,aAAYA,EAAA,EAAC,cAAA,oBAAA,cACd,IAAmE,KAAhEA,EAAA,EAAC,cAAA,oCAAA,EAAA,IAAA,EAAA,CAAA,8CAICA,EAAA,qBADPJ,EAIM,MAJNsB,GAIMnB,EADFC,EAAA,EAAC,cAAA,mCAAA,CAAA,EAAA,CAAA,YAGEA,EAAA,qBADP2B,EAIoCyB,EAAA,OAFlC,KAAMpD,EAAA,WACN,QAASA,EAAA,cACT,SAAQA,EAAA,wEACVC,EAAkEoD,EAAA,CAAzC,eAAcrD,EAAA,uBAAuB,EAAA,KAAA,EAAA,CAAA,gBAAA,CAAA,EAC9DC,EAE+BqD,EAAA,CAD7B,QAASnD,EAAA,QACT,gBAAeH,EAAA,kDACjBH,EAiBM,MAjBNkD,GAiBM,CAhBL9C,EAOWS,EAAA,CANT,KAAM,GACP,QAAQ,WACR,KAAK,QACJ,aAAYV,EAAA,EAAC,cAAA,sBAAA,EACb,SAAUG,EAAA,2BACX,IAA8C,KAA3CH,EAAA,EAAC,cAAA,sBAAA,CAAA,EAAA,CAAA,sCAELC,EAOWS,EAAA,CANT,KAAM,GACP,QAAQ,UACR,KAAK,SACJ,aAAYV,EAAA,EAAC,cAAA,oBAAA,EACb,SAAUG,EAAA,2BACX,IAA4C,KAAzCH,EAAA,EAAC,cAAA,oBAAA,CAAA,EAAA,CAAA"} \ No newline at end of file diff --git a/dist/SetStatusModal-63728HX3.chunk.mjs.map.license b/dist/SetStatusModal-BCek_Hdw.chunk.mjs.map.license similarity index 100% rename from dist/SetStatusModal-63728HX3.chunk.mjs.map.license rename to dist/SetStatusModal-BCek_Hdw.chunk.mjs.map.license diff --git a/dist/SystemTagPicker-te7EmT5I.chunk.mjs b/dist/SystemTagPicker-ZPzUvrd5.chunk.mjs similarity index 98% rename from dist/SystemTagPicker-te7EmT5I.chunk.mjs rename to dist/SystemTagPicker-ZPzUvrd5.chunk.mjs index 4173a4cda9600..83f4b06a87546 100644 --- a/dist/SystemTagPicker-te7EmT5I.chunk.mjs +++ b/dist/SystemTagPicker-ZPzUvrd5.chunk.mjs @@ -1,2 +1,2 @@ -import{f as R,a as q,d as J}from"./index-DgEyzq8A.chunk.mjs";import{a as _}from"./index-DCJOwzzz.chunk.mjs";import{a as A,l as K}from"./index-C3KLQ_oe.chunk.mjs";import{t as y,g as S,e as Q,p as W,b as k}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{N as X}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{N as Y}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import{N as tt}from"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import{N as et}from"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import{N as st}from"./index-CO7ZwNPX.chunk.mjs";import{P as at,N as it}from"./Plus-gXjhFOHV.chunk.mjs";import{N as ot}from"./mdi-CYMOyMtM.chunk.mjs";import{N as lt}from"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import{_ as nt}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{o as a,j as d,k as g,t as p,m as C,y as w,b as rt,f as c,c as h,w as m,F as E,e as u,A as ct,B as dt,g as N,Z as mt,_ as gt,n as ht}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{P as pt}from"./PencilOutline-Byyi13ia.chunk.mjs";import{l as L,g as O,s as x,e as I,h as z,c as ut,i as ft,f as yt,u as Ct}from"./api-DS5xEpYc.chunk.mjs";import{e as bt,i as kt,a as Nt}from"./systemtags-init.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import"./index-9ZBo3L67.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-CaHqqZcX.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./dav-q7lxn7Ev.chunk.mjs";import"./index-Ds0AsAbv.chunk.mjs";import"./externalStorageUtils-BzJyVKar.chunk.mjs";import"./index-CPriPmaq.chunk.mjs";const At={name:"CheckCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},vt=["aria-hidden","aria-label"],wt=["fill","width","height"],Tt={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={key:0};function St(t,s,e,o,l,n){return a(),d("span",w(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon check-circle-icon",role:"img",onClick:s[0]||(s[0]=i=>t.$emit("click",i))}),[(a(),d("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[g("path",Tt,[e.title?(a(),d("title",_t,p(e.title),1)):C("",!0)])],8,wt))],16,vt)}const Lt=A(At,[["render",St]]),It={name:"CircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},$t=["aria-hidden","aria-label"],Rt=["fill","width","height"],Et={d:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},Ot={key:0};function xt(t,s,e,o,l,n){return a(),d("span",w(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon circle-icon",role:"img",onClick:s[0]||(s[0]=i=>t.$emit("click",i))}),[(a(),d("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[g("path",Et,[e.title?(a(),d("title",Ot,p(e.title),1)):C("",!0)])],8,Rt))],16,$t)}const zt=A(It,[["render",xt]]),Pt={name:"CircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Mt=["aria-hidden","aria-label"],Vt=["fill","width","height"],Bt={d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},Ut={key:0};function Dt(t,s,e,o,l,n){return a(),d("span",w(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon circle-outline-icon",role:"img",onClick:s[0]||(s[0]=i=>t.$emit("click",i))}),[(a(),d("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[g("path",Bt,[e.title?(a(),d("title",Ut,p(e.title),1)):C("",!0)])],8,Vt))],16,Mt)}const Gt=A(Pt,[["render",Dt]]),jt={name:"TagOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ft=["aria-hidden","aria-label"],Ht=["fill","width","height"],Zt={d:"M21.41 11.58L12.41 2.58A2 2 0 0 0 11 2H4A2 2 0 0 0 2 4V11A2 2 0 0 0 2.59 12.42L11.59 21.42A2 2 0 0 0 13 22A2 2 0 0 0 14.41 21.41L21.41 14.41A2 2 0 0 0 22 13A2 2 0 0 0 21.41 11.58M13 20L4 11V4H11L20 13M6.5 5A1.5 1.5 0 1 1 5 6.5A1.5 1.5 0 0 1 6.5 5Z"},qt={key:0};function Jt(t,s,e,o,l,n){return a(),d("span",w(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon tag-outline-icon",role:"img",onClick:s[0]||(s[0]=i=>t.$emit("click",i))}),[(a(),d("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[g("path",Zt,[e.title?(a(),d("title",qt,p(e.title),1)):C("",!0)])],8,Ht))],16,Ft)}const Kt=A(jt,[["render",Jt]]),Qt=J(Ct,500),Wt=getComputedStyle(document.body).getPropertyValue("--color-main-background").replace("#","")||(Nt()?"000000":"ffffff");var P=(t=>(t.BASE="base",t.LOADING="loading",t.CREATING_TAG="creating-tag",t.DONE="done",t))(P||{});const Xt=K("systemtags","restrictSystemTagsCreationToAdmin",!1),Yt=rt({name:"SystemTagPicker",components:{CheckIcon:Lt,CircleIcon:zt,CircleOutlineIcon:Gt,NcButton:X,NcCheckboxRadioSwitch:Y,NcChip:tt,NcColorPicker:et,NcDialog:st,NcEmptyContent:it,NcLoadingIcon:ot,NcNoteCard:lt,NcTextField:nt,PencilIcon:pt,PlusIcon:at,TagIcon:Kt},props:{nodes:{type:Array,required:!0}},emits:{close(t){return t===null||typeof t=="boolean"}},setup(){return{emit:R,Status:P,t:y,canEditOrCreateTag:!Xt||q()?.isAdmin}},data(){return{status:"base",opened:!0,openedPicker:!1,input:"",tags:[],tagList:{},toAdd:[],toRemove:[]}},computed:{sortedTags(){return[...this.tags].sort((t,s)=>t.displayName.localeCompare(s.displayName,S(),{ignorePunctuation:!0}))},filteredTags(){return this.input.trim()===""?this.sortedTags:this.sortedTags.filter(t=>t.displayName.normalize().toLowerCase().includes(this.input.normalize().toLowerCase()))},hasChanges(){return this.toAdd.length>0||this.toRemove.length>0},canCreateTag(){return this.input.trim()!==""&&!this.tags.some(t=>t.displayName.trim().toLocaleLowerCase()===this.input.trim().toLocaleLowerCase())},statusMessage(){if(this.toAdd.length===0&&this.toRemove.length===0)return"";if(this.toAdd.length===1&&this.toRemove.length===1)return k("systemtags","{tag1} will be set and {tag2} will be removed from 1 file.","{tag1} will be set and {tag2} will be 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),s=t.pop(),e=this.toRemove.map(this.formatTagChip),o=e.pop(),l=k("systemtags","{tag} will be set to 1 file.","{tag} will be set to {count} files.",this.nodes.length,{tag:s,count:this.nodes.length},{escape:!1}),n=k("systemtags","{tag} will be removed from 1 file.","{tag} will be removed from {count} files.",this.nodes.length,{tag:o,count:this.nodes.length},{escape:!1}),i=k("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:s,count:this.nodes.length},{escape:!1}),f=k("systemtags","{tags} and {lastTag} will be removed from 1 file.","{tags} and {lastTag} will be removed from {count} files.",this.nodes.length,{tags:e.join(", "),lastTag:o,count:this.nodes.length},{escape:!1});return this.toAdd.length===1&&this.toRemove.length===0?l:this.toAdd.length===0&&this.toRemove.length===1?n:this.toAdd.length>1&&this.toRemove.length===0?i:this.toAdd.length===0&&this.toRemove.length>1?f:this.toAdd.length>1&&this.toRemove.length===1?`${i} ${n}`:this.toAdd.length===1&&this.toRemove.length>1?`${l} ${f}`:`${i} ${f}`}},beforeMount(){yt().then(t=>{this.tags=t}),this.tagList=this.nodes.reduce((t,s)=>((I(s)||[]).forEach(e=>{t[e]=(t[e]||0)+1}),t),{}),this.canEditOrCreateTag||L.debug("System tag creation is restricted to admins and the current user is not an admin")},methods:{formatTagChip(t){const s=this.$refs.chip.$el.cloneNode(!0);if(t.color){const e=this.tagListStyle(t);Object.entries(e).forEach(([o,l])=>{s.style.setProperty(o,l)})}return s.outerHTML.replace("%s",Q(W.sanitize(t.displayName)))},formatTagName(t){return t.userVisible?t.userAssignable?t.displayName:y("systemtags","{displayName} (restricted)",{displayName:t.displayName}):y("systemtags","{displayName} (hidden)",{displayName:t.displayName})},onColorChange(t,s){t.color=s.replace("#",""),Qt(t)},isChecked(t){return t.displayName in this.tagList&&this.tagList[t.displayName]===this.nodes.length},isIndeterminate(t){return t.displayName in this.tagList&&this.tagList[t.displayName]!==0&&this.tagList[t.displayName]!==this.nodes.length},onCheckUpdate(t,s){s?(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(){if(!this.canEditOrCreateTag){_(y("systemtags","Only admins can create new tags"));return}this.status="creating-tag";try{const t={displayName:this.input.trim(),userAssignable:!0,userVisible:!0,canAssign:!0},s=await ut(t),e=await ft(s);this.tags.push(e),this.input="",this.onCheckUpdate(e,!0),await this.$nextTick(),Array.isArray(this.$refs.tags)&&this.$refs.tags.find(o=>o.dataset.cySystemtagsPickerTag===s.toString())?.scrollIntoView({behavior:"instant",block:"center",inline:"center"})}catch(t){_(t?.message||y("systemtags","Failed to create tag"))}finally{this.status="base"}},async onSubmit(){this.status="loading",L.debug("Applying tags",{toAdd:this.toAdd,toRemove:this.toRemove});try{for(const s of this.toAdd){const{etag:e,objects:o}=await O(s,"files"),l=[...new Set([...o.map(n=>n.id).filter(Boolean),...this.nodes.map(n=>n.fileid).filter(Boolean)])];await x(s,"files",l.map(n=>({id:n,type:"files"})),e)}for(const s of this.toRemove){const{etag:e,objects:o}=await O(s,"files"),l=new Set(this.nodes.map(i=>i.fileid)),n=o.map(i=>i.id).filter((i,f,T)=>!l.has(i)&&T.indexOf(i)===f);await x(s,"files",n.map(i=>({id:i,type:"files"})),e)}}catch(s){L.error("Failed to apply tags",{error:s}),_(y("systemtags","Failed to apply tags changes")),this.status="base";return}const t=[];this.toAdd.forEach(s=>{this.nodes.forEach(e=>{const o=[...I(e)||[],s.displayName].sort((l,n)=>l.localeCompare(n,S(),{ignorePunctuation:!0}));z(e,o),t.push(e)})}),this.toRemove.forEach(s=>{this.nodes.forEach(e=>{const o=[...I(e)||[]].filter(l=>l!==s.displayName).sort((l,n)=>l.localeCompare(n,S(),{ignorePunctuation:!0}));z(e,o),t.push(e)})}),t.forEach(s=>R("systemtags:node:updated",s)),this.status="done",setTimeout(()=>{this.opened=!1,this.$emit("close",!0)},2e3)},onCancel(){this.opened=!1,this.$emit("close",null)},tagListStyle(t){if(!t.color)return{"--color-circle-icon":"var(--color-text-maxcontrast)"};const s=bt(`#${t.color}`,`#${Wt}`),e=kt(s)?"#000000":"#ffffff";return{"--color-circle-icon":"var(--color-primary-element)","--color-primary":s,"--color-primary-text":e,"--color-primary-element":s,"--color-primary-element-text":e}}}}),te={class:"systemtags-picker__input"},ee={class:"systemtags-picker__tags","data-cy-systemtags-picker-tags":""},se=["data-cy-systemtags-picker-tag"],ae={class:"systemtags-picker__tag-create-subline"},ie={class:"systemtags-picker__note"},oe=["innerHTML"];function le(t,s,e,o,l,n){const i=c("NcLoadingIcon"),f=c("CheckIcon"),T=c("NcEmptyContent"),M=c("TagIcon"),V=c("NcTextField"),B=c("NcCheckboxRadioSwitch"),U=c("CircleIcon"),D=c("CircleOutlineIcon"),G=c("PencilIcon"),v=c("NcButton"),j=c("NcColorPicker"),F=c("PlusIcon"),$=c("NcNoteCard"),H=c("NcChip"),Z=c("NcDialog");return a(),h(Z,{"data-cy-systemtags-picker":"",noClose:t.status===t.Status.LOADING,name:t.t("systemtags","Manage tags"),open:t.opened,class:ht(["systemtags-picker--"+t.status,"systemtags-picker"]),closeOnClickOutside:"",outTransition:"","onUpdate:open":t.onCancel},{actions:m(()=>[u(v,{disabled:t.status!==t.Status.BASE,variant:"tertiary","data-cy-systemtags-picker-button-cancel":"",onClick:t.onCancel},{default:m(()=>[N(p(t.t("systemtags","Cancel")),1)]),_:1},8,["disabled","onClick"]),u(v,{disabled:!t.hasChanges||t.status!==t.Status.BASE,"data-cy-systemtags-picker-button-submit":"",onClick:t.onSubmit},{default:m(()=>[N(p(t.t("systemtags","Apply")),1)]),_:1},8,["disabled","onClick"])]),default:m(()=>[t.status===t.Status.LOADING||t.status===t.Status.DONE?(a(),h(T,{key:0,name:t.t("systemtags","Applying tags changes…")},{icon:m(()=>[t.status===t.Status.LOADING?(a(),h(i,{key:0})):(a(),h(f,{key:1,fillColor:"var(--color-border-success)"}))]),_:1},8,["name"])):(a(),d(E,{key:1},[g("div",te,[u(V,{modelValue:t.input,"onUpdate:modelValue":s[0]||(s[0]=r=>t.input=r),label:t.canEditOrCreateTag?t.t("systemtags","Search or create tag"):t.t("systemtags","Search tag"),"data-cy-systemtags-picker-input":""},{default:m(()=>[u(M,{size:20})]),_:1},8,["modelValue","label"])]),g("ul",ee,[(a(!0),d(E,null,ct(t.filteredTags,r=>(a(),d("li",{key:r.id,ref_for:!0,ref:"tags","data-cy-systemtags-picker-tag":r.id,style:dt(t.tagListStyle(r)),class:"systemtags-picker__tag"},[u(B,{modelValue:t.isChecked(r),disabled:!r.canAssign,indeterminate:t.isIndeterminate(r),label:r.displayName,class:"systemtags-picker__tag-checkbox","onUpdate:modelValue":b=>t.onCheckUpdate(r,b)},{default:m(()=>[N(p(t.formatTagName(r)),1)]),_:2},1032,["modelValue","disabled","indeterminate","label","onUpdate:modelValue"]),t.canEditOrCreateTag?(a(),h(j,{key:0,"data-cy-systemtags-picker-tag-color":r.id,modelValue:`#${r.color||"000000"}`,shown:t.openedPicker===r.id,class:"systemtags-picker__tag-color","onUpdate:shown":b=>t.openedPicker=b?r.id:!1,onSubmit:b=>t.onColorChange(r,b)},{default:m(()=>[u(v,{"aria-label":t.t("systemtags","Change tag color"),variant:"tertiary"},{icon:m(()=>[r.color?(a(),h(U,{key:0,size:24,fillColor:"var(--color-circle-icon)",class:"button-color-circle"})):(a(),h(D,{key:1,size:24,fillColor:"var(--color-circle-icon)",class:"button-color-empty"})),u(G,{class:"button-color-pencil"})]),_:2},1032,["aria-label"])]),_:2},1032,["data-cy-systemtags-picker-tag-color","modelValue","shown","onUpdate:shown","onSubmit"])):C("",!0)],12,se))),128)),g("li",null,[t.canEditOrCreateTag&&t.canCreateTag?(a(),h(v,{key:0,disabled:t.status===t.Status.CREATING_TAG,alignment:"start",class:"systemtags-picker__tag-create",type:"submit",variant:"tertiary","data-cy-systemtags-picker-button-create":"",onClick:t.onNewTag},{icon:m(()=>[u(F)]),default:m(()=>[N(p(t.input.trim()),1),s[1]||(s[1]=g("br",null,null,-1)),g("span",ae,p(t.t("systemtags","Create new tag")),1)]),_:1},8,["disabled","onClick"])):C("",!0)])]),g("div",ie,[t.hasChanges?(a(),h($,{key:1,type:"info"},{default:m(()=>[g("span",{innerHTML:t.statusMessage},null,8,oe)]),_:1})):(a(),h($,{key:0,type:"info"},{default:m(()=>[N(p(t.t("systemtags","Choose tags for the selected files")),1)]),_:1}))])],64)),mt(g("div",null,[u(H,{ref:"chip",text:"%s",noClose:"",variant:"primary"},null,512)],512),[[gt,!1]])]),_:1},8,["noClose","name","open","class","onUpdate:open"])}const ze=A(Yt,[["render",le],["__scopeId","data-v-fbaf4147"]]);export{ze as default}; -//# sourceMappingURL=SystemTagPicker-te7EmT5I.chunk.mjs.map +import{f as R,a as q,d as J}from"./index-DgEyzq8A.chunk.mjs";import{a as _}from"./index-WQvok30H.chunk.mjs";import{a as A,l as K}from"./index-C3KLQ_oe.chunk.mjs";import{t as y,g as S,e as Q,p as W,b as k}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{N as X}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{N as Y}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import{N as tt}from"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import{N as et}from"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import{N as st}from"./index-CO7ZwNPX.chunk.mjs";import{P as at,N as it}from"./Plus-gXjhFOHV.chunk.mjs";import{N as ot}from"./mdi-CYMOyMtM.chunk.mjs";import{N as lt}from"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import{_ as nt}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{o as a,j as d,k as g,t as p,m as C,y as w,b as rt,f as c,c as h,w as m,F as E,e as u,A as ct,B as dt,g as N,Z as mt,_ as gt,n as ht}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{P as pt}from"./PencilOutline-Byyi13ia.chunk.mjs";import{l as L,g as O,s as x,e as I,h as z,c as ut,i as ft,f as yt,u as Ct}from"./api-j5ll7UqT.chunk.mjs";import{e as bt,i as kt,a as Nt}from"./systemtags-init.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import"./index-9ZBo3L67.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-CaHqqZcX.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./dav-CSaJxXR-.chunk.mjs";import"./index-C5O29_27.chunk.mjs";import"./externalStorageUtils-BzJyVKar.chunk.mjs";import"./index-CPriPmaq.chunk.mjs";const At={name:"CheckCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},vt=["aria-hidden","aria-label"],wt=["fill","width","height"],Tt={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={key:0};function St(t,s,e,o,l,n){return a(),d("span",w(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon check-circle-icon",role:"img",onClick:s[0]||(s[0]=i=>t.$emit("click",i))}),[(a(),d("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[g("path",Tt,[e.title?(a(),d("title",_t,p(e.title),1)):C("",!0)])],8,wt))],16,vt)}const Lt=A(At,[["render",St]]),It={name:"CircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},$t=["aria-hidden","aria-label"],Rt=["fill","width","height"],Et={d:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},Ot={key:0};function xt(t,s,e,o,l,n){return a(),d("span",w(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon circle-icon",role:"img",onClick:s[0]||(s[0]=i=>t.$emit("click",i))}),[(a(),d("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[g("path",Et,[e.title?(a(),d("title",Ot,p(e.title),1)):C("",!0)])],8,Rt))],16,$t)}const zt=A(It,[["render",xt]]),Pt={name:"CircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Mt=["aria-hidden","aria-label"],Vt=["fill","width","height"],Bt={d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},Ut={key:0};function Dt(t,s,e,o,l,n){return a(),d("span",w(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon circle-outline-icon",role:"img",onClick:s[0]||(s[0]=i=>t.$emit("click",i))}),[(a(),d("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[g("path",Bt,[e.title?(a(),d("title",Ut,p(e.title),1)):C("",!0)])],8,Vt))],16,Mt)}const Gt=A(Pt,[["render",Dt]]),jt={name:"TagOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ft=["aria-hidden","aria-label"],Ht=["fill","width","height"],Zt={d:"M21.41 11.58L12.41 2.58A2 2 0 0 0 11 2H4A2 2 0 0 0 2 4V11A2 2 0 0 0 2.59 12.42L11.59 21.42A2 2 0 0 0 13 22A2 2 0 0 0 14.41 21.41L21.41 14.41A2 2 0 0 0 22 13A2 2 0 0 0 21.41 11.58M13 20L4 11V4H11L20 13M6.5 5A1.5 1.5 0 1 1 5 6.5A1.5 1.5 0 0 1 6.5 5Z"},qt={key:0};function Jt(t,s,e,o,l,n){return a(),d("span",w(t.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon tag-outline-icon",role:"img",onClick:s[0]||(s[0]=i=>t.$emit("click",i))}),[(a(),d("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[g("path",Zt,[e.title?(a(),d("title",qt,p(e.title),1)):C("",!0)])],8,Ht))],16,Ft)}const Kt=A(jt,[["render",Jt]]),Qt=J(Ct,500),Wt=getComputedStyle(document.body).getPropertyValue("--color-main-background").replace("#","")||(Nt()?"000000":"ffffff");var P=(t=>(t.BASE="base",t.LOADING="loading",t.CREATING_TAG="creating-tag",t.DONE="done",t))(P||{});const Xt=K("systemtags","restrictSystemTagsCreationToAdmin",!1),Yt=rt({name:"SystemTagPicker",components:{CheckIcon:Lt,CircleIcon:zt,CircleOutlineIcon:Gt,NcButton:X,NcCheckboxRadioSwitch:Y,NcChip:tt,NcColorPicker:et,NcDialog:st,NcEmptyContent:it,NcLoadingIcon:ot,NcNoteCard:lt,NcTextField:nt,PencilIcon:pt,PlusIcon:at,TagIcon:Kt},props:{nodes:{type:Array,required:!0}},emits:{close(t){return t===null||typeof t=="boolean"}},setup(){return{emit:R,Status:P,t:y,canEditOrCreateTag:!Xt||q()?.isAdmin}},data(){return{status:"base",opened:!0,openedPicker:!1,input:"",tags:[],tagList:{},toAdd:[],toRemove:[]}},computed:{sortedTags(){return[...this.tags].sort((t,s)=>t.displayName.localeCompare(s.displayName,S(),{ignorePunctuation:!0}))},filteredTags(){return this.input.trim()===""?this.sortedTags:this.sortedTags.filter(t=>t.displayName.normalize().toLowerCase().includes(this.input.normalize().toLowerCase()))},hasChanges(){return this.toAdd.length>0||this.toRemove.length>0},canCreateTag(){return this.input.trim()!==""&&!this.tags.some(t=>t.displayName.trim().toLocaleLowerCase()===this.input.trim().toLocaleLowerCase())},statusMessage(){if(this.toAdd.length===0&&this.toRemove.length===0)return"";if(this.toAdd.length===1&&this.toRemove.length===1)return k("systemtags","{tag1} will be set and {tag2} will be removed from 1 file.","{tag1} will be set and {tag2} will be 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),s=t.pop(),e=this.toRemove.map(this.formatTagChip),o=e.pop(),l=k("systemtags","{tag} will be set to 1 file.","{tag} will be set to {count} files.",this.nodes.length,{tag:s,count:this.nodes.length},{escape:!1}),n=k("systemtags","{tag} will be removed from 1 file.","{tag} will be removed from {count} files.",this.nodes.length,{tag:o,count:this.nodes.length},{escape:!1}),i=k("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:s,count:this.nodes.length},{escape:!1}),f=k("systemtags","{tags} and {lastTag} will be removed from 1 file.","{tags} and {lastTag} will be removed from {count} files.",this.nodes.length,{tags:e.join(", "),lastTag:o,count:this.nodes.length},{escape:!1});return this.toAdd.length===1&&this.toRemove.length===0?l:this.toAdd.length===0&&this.toRemove.length===1?n:this.toAdd.length>1&&this.toRemove.length===0?i:this.toAdd.length===0&&this.toRemove.length>1?f:this.toAdd.length>1&&this.toRemove.length===1?`${i} ${n}`:this.toAdd.length===1&&this.toRemove.length>1?`${l} ${f}`:`${i} ${f}`}},beforeMount(){yt().then(t=>{this.tags=t}),this.tagList=this.nodes.reduce((t,s)=>((I(s)||[]).forEach(e=>{t[e]=(t[e]||0)+1}),t),{}),this.canEditOrCreateTag||L.debug("System tag creation is restricted to admins and the current user is not an admin")},methods:{formatTagChip(t){const s=this.$refs.chip.$el.cloneNode(!0);if(t.color){const e=this.tagListStyle(t);Object.entries(e).forEach(([o,l])=>{s.style.setProperty(o,l)})}return s.outerHTML.replace("%s",Q(W.sanitize(t.displayName)))},formatTagName(t){return t.userVisible?t.userAssignable?t.displayName:y("systemtags","{displayName} (restricted)",{displayName:t.displayName}):y("systemtags","{displayName} (hidden)",{displayName:t.displayName})},onColorChange(t,s){t.color=s.replace("#",""),Qt(t)},isChecked(t){return t.displayName in this.tagList&&this.tagList[t.displayName]===this.nodes.length},isIndeterminate(t){return t.displayName in this.tagList&&this.tagList[t.displayName]!==0&&this.tagList[t.displayName]!==this.nodes.length},onCheckUpdate(t,s){s?(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(){if(!this.canEditOrCreateTag){_(y("systemtags","Only admins can create new tags"));return}this.status="creating-tag";try{const t={displayName:this.input.trim(),userAssignable:!0,userVisible:!0,canAssign:!0},s=await ut(t),e=await ft(s);this.tags.push(e),this.input="",this.onCheckUpdate(e,!0),await this.$nextTick(),Array.isArray(this.$refs.tags)&&this.$refs.tags.find(o=>o.dataset.cySystemtagsPickerTag===s.toString())?.scrollIntoView({behavior:"instant",block:"center",inline:"center"})}catch(t){_(t?.message||y("systemtags","Failed to create tag"))}finally{this.status="base"}},async onSubmit(){this.status="loading",L.debug("Applying tags",{toAdd:this.toAdd,toRemove:this.toRemove});try{for(const s of this.toAdd){const{etag:e,objects:o}=await O(s,"files"),l=[...new Set([...o.map(n=>n.id).filter(Boolean),...this.nodes.map(n=>n.fileid).filter(Boolean)])];await x(s,"files",l.map(n=>({id:n,type:"files"})),e)}for(const s of this.toRemove){const{etag:e,objects:o}=await O(s,"files"),l=new Set(this.nodes.map(i=>i.fileid)),n=o.map(i=>i.id).filter((i,f,T)=>!l.has(i)&&T.indexOf(i)===f);await x(s,"files",n.map(i=>({id:i,type:"files"})),e)}}catch(s){L.error("Failed to apply tags",{error:s}),_(y("systemtags","Failed to apply tags changes")),this.status="base";return}const t=[];this.toAdd.forEach(s=>{this.nodes.forEach(e=>{const o=[...I(e)||[],s.displayName].sort((l,n)=>l.localeCompare(n,S(),{ignorePunctuation:!0}));z(e,o),t.push(e)})}),this.toRemove.forEach(s=>{this.nodes.forEach(e=>{const o=[...I(e)||[]].filter(l=>l!==s.displayName).sort((l,n)=>l.localeCompare(n,S(),{ignorePunctuation:!0}));z(e,o),t.push(e)})}),t.forEach(s=>R("systemtags:node:updated",s)),this.status="done",setTimeout(()=>{this.opened=!1,this.$emit("close",!0)},2e3)},onCancel(){this.opened=!1,this.$emit("close",null)},tagListStyle(t){if(!t.color)return{"--color-circle-icon":"var(--color-text-maxcontrast)"};const s=bt(`#${t.color}`,`#${Wt}`),e=kt(s)?"#000000":"#ffffff";return{"--color-circle-icon":"var(--color-primary-element)","--color-primary":s,"--color-primary-text":e,"--color-primary-element":s,"--color-primary-element-text":e}}}}),te={class:"systemtags-picker__input"},ee={class:"systemtags-picker__tags","data-cy-systemtags-picker-tags":""},se=["data-cy-systemtags-picker-tag"],ae={class:"systemtags-picker__tag-create-subline"},ie={class:"systemtags-picker__note"},oe=["innerHTML"];function le(t,s,e,o,l,n){const i=c("NcLoadingIcon"),f=c("CheckIcon"),T=c("NcEmptyContent"),M=c("TagIcon"),V=c("NcTextField"),B=c("NcCheckboxRadioSwitch"),U=c("CircleIcon"),D=c("CircleOutlineIcon"),G=c("PencilIcon"),v=c("NcButton"),j=c("NcColorPicker"),F=c("PlusIcon"),$=c("NcNoteCard"),H=c("NcChip"),Z=c("NcDialog");return a(),h(Z,{"data-cy-systemtags-picker":"",noClose:t.status===t.Status.LOADING,name:t.t("systemtags","Manage tags"),open:t.opened,class:ht(["systemtags-picker--"+t.status,"systemtags-picker"]),closeOnClickOutside:"",outTransition:"","onUpdate:open":t.onCancel},{actions:m(()=>[u(v,{disabled:t.status!==t.Status.BASE,variant:"tertiary","data-cy-systemtags-picker-button-cancel":"",onClick:t.onCancel},{default:m(()=>[N(p(t.t("systemtags","Cancel")),1)]),_:1},8,["disabled","onClick"]),u(v,{disabled:!t.hasChanges||t.status!==t.Status.BASE,"data-cy-systemtags-picker-button-submit":"",onClick:t.onSubmit},{default:m(()=>[N(p(t.t("systemtags","Apply")),1)]),_:1},8,["disabled","onClick"])]),default:m(()=>[t.status===t.Status.LOADING||t.status===t.Status.DONE?(a(),h(T,{key:0,name:t.t("systemtags","Applying tags changes…")},{icon:m(()=>[t.status===t.Status.LOADING?(a(),h(i,{key:0})):(a(),h(f,{key:1,fillColor:"var(--color-border-success)"}))]),_:1},8,["name"])):(a(),d(E,{key:1},[g("div",te,[u(V,{modelValue:t.input,"onUpdate:modelValue":s[0]||(s[0]=r=>t.input=r),label:t.canEditOrCreateTag?t.t("systemtags","Search or create tag"):t.t("systemtags","Search tag"),"data-cy-systemtags-picker-input":""},{default:m(()=>[u(M,{size:20})]),_:1},8,["modelValue","label"])]),g("ul",ee,[(a(!0),d(E,null,ct(t.filteredTags,r=>(a(),d("li",{key:r.id,ref_for:!0,ref:"tags","data-cy-systemtags-picker-tag":r.id,style:dt(t.tagListStyle(r)),class:"systemtags-picker__tag"},[u(B,{modelValue:t.isChecked(r),disabled:!r.canAssign,indeterminate:t.isIndeterminate(r),label:r.displayName,class:"systemtags-picker__tag-checkbox","onUpdate:modelValue":b=>t.onCheckUpdate(r,b)},{default:m(()=>[N(p(t.formatTagName(r)),1)]),_:2},1032,["modelValue","disabled","indeterminate","label","onUpdate:modelValue"]),t.canEditOrCreateTag?(a(),h(j,{key:0,"data-cy-systemtags-picker-tag-color":r.id,modelValue:`#${r.color||"000000"}`,shown:t.openedPicker===r.id,class:"systemtags-picker__tag-color","onUpdate:shown":b=>t.openedPicker=b?r.id:!1,onSubmit:b=>t.onColorChange(r,b)},{default:m(()=>[u(v,{"aria-label":t.t("systemtags","Change tag color"),variant:"tertiary"},{icon:m(()=>[r.color?(a(),h(U,{key:0,size:24,fillColor:"var(--color-circle-icon)",class:"button-color-circle"})):(a(),h(D,{key:1,size:24,fillColor:"var(--color-circle-icon)",class:"button-color-empty"})),u(G,{class:"button-color-pencil"})]),_:2},1032,["aria-label"])]),_:2},1032,["data-cy-systemtags-picker-tag-color","modelValue","shown","onUpdate:shown","onSubmit"])):C("",!0)],12,se))),128)),g("li",null,[t.canEditOrCreateTag&&t.canCreateTag?(a(),h(v,{key:0,disabled:t.status===t.Status.CREATING_TAG,alignment:"start",class:"systemtags-picker__tag-create",type:"submit",variant:"tertiary","data-cy-systemtags-picker-button-create":"",onClick:t.onNewTag},{icon:m(()=>[u(F)]),default:m(()=>[N(p(t.input.trim()),1),s[1]||(s[1]=g("br",null,null,-1)),g("span",ae,p(t.t("systemtags","Create new tag")),1)]),_:1},8,["disabled","onClick"])):C("",!0)])]),g("div",ie,[t.hasChanges?(a(),h($,{key:1,type:"info"},{default:m(()=>[g("span",{innerHTML:t.statusMessage},null,8,oe)]),_:1})):(a(),h($,{key:0,type:"info"},{default:m(()=>[N(p(t.t("systemtags","Choose tags for the selected files")),1)]),_:1}))])],64)),mt(g("div",null,[u(H,{ref:"chip",text:"%s",noClose:"",variant:"primary"},null,512)],512),[[gt,!1]])]),_:1},8,["noClose","name","open","class","onUpdate:open"])}const ze=A(Yt,[["render",le],["__scopeId","data-v-fbaf4147"]]);export{ze as default}; +//# sourceMappingURL=SystemTagPicker-ZPzUvrd5.chunk.mjs.map diff --git a/dist/SystemTagPicker-te7EmT5I.chunk.mjs.license b/dist/SystemTagPicker-ZPzUvrd5.chunk.mjs.license similarity index 100% rename from dist/SystemTagPicker-te7EmT5I.chunk.mjs.license rename to dist/SystemTagPicker-ZPzUvrd5.chunk.mjs.license diff --git a/dist/SystemTagPicker-te7EmT5I.chunk.mjs.map b/dist/SystemTagPicker-ZPzUvrd5.chunk.mjs.map similarity index 99% rename from dist/SystemTagPicker-te7EmT5I.chunk.mjs.map rename to dist/SystemTagPicker-ZPzUvrd5.chunk.mjs.map index 964228f9d5305..1537c2c81ec22 100644 --- a/dist/SystemTagPicker-te7EmT5I.chunk.mjs.map +++ b/dist/SystemTagPicker-ZPzUvrd5.chunk.mjs.map @@ -1 +1 @@ -{"version":3,"file":"SystemTagPicker-te7EmT5I.chunk.mjs","sources":["../node_modules/vue-material-design-icons/CheckCircle.vue","../node_modules/vue-material-design-icons/Circle.vue","../node_modules/vue-material-design-icons/CircleOutline.vue","../node_modules/vue-material-design-icons/TagOutline.vue","../build/frontend/apps/systemtags/src/components/SystemTagPicker.vue"],"sourcesContent":["\n\n","\n\n","\n\n","\n\n","\n\n\n\n\n\n\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_ctx","$props","_cache","$event","_createElementVNode","_openBlock","debounceUpdateTag","debounce","updateTag","mainBackgroundColor","isDarkModeEnabled","Status","restrictSystemTagsCreationToAdmin","loadState","defineComponent","CheckIcon","CircleIcon","CircleOutlineIcon","NcButton","NcCheckboxRadioSwitch","NcChip","NcColorPicker","NcDialog","NcEmptyContent","NcLoadingIcon","NcNoteCard","NcTextField","PencilIcon","PlusIcon","TagIcon","status","emit","t","getCurrentUser","a","b","getLanguage","tag","n","tagsAdd","lastTagAdd","tagsRemove","lastTagRemove","addStringSingular","removeStringSingular","addStringPlural","removeStringPlural","fetchTags","tags","acc","node","getNodeSystemTags","logger","chipCloneEl","style","key","value","escapeHTML","domPurify","color","checked","search","showError","payload","id","createTag","fetchTag","el","error","etag","objects","getTagObjects","ids","obj","setTagObjects","nodeFileIds","index","self","nodes","setNodeSystemTags","primaryElement","elementColor","textColor","invertTextColor","_hoisted_1","_hoisted_4","_hoisted_5","_createBlock","_component_NcDialog","_normalizeClass","_withCtx","_createVNode","_component_NcButton","_createTextVNode","_toDisplayString","_component_NcEmptyContent","_component_NcLoadingIcon","_component_CheckIcon","_Fragment","_component_NcTextField","_component_TagIcon","_hoisted_2","_renderList","_normalizeStyle","_component_NcCheckboxRadioSwitch","_component_NcColorPicker","_component_CircleIcon","_component_CircleOutlineIcon","_component_PencilIcon","_component_PlusIcon","_component_NcNoteCard","_hoisted_6","_component_NcChip"],"mappings":"+oDAoBA,MAAKA,GAAU,CACb,KAAM,kBACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,QAER,UAAW,CACT,KAAM,OACN,QAAS,gBAEX,KAAM,CACJ,KAAM,OACN,QAAS,EACX,CACF,CACF,+DAxBYC,GAAA,CAAA,EAAE,qHAAqH,iDAXjIC,EAeO,OAfPC,EAAcC,EAAA,OAAM,CACb,cAAaC,EAAA,MAAK,KAAA,OAClB,aAAYA,EAAA,MACb,MAAM,yCACN,KAAK,MACJ,QAAKC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEH,EAAA,MAAK,QAAUG,CAAM,WACjCL,EAQM,MAAA,CARA,KAAMG,EAAA,UACP,MAAM,4BACL,MAAOA,EAAA,KACP,OAAQA,EAAA,KACT,QAAQ,cACXG,EAEO,OAFPP,GAEO,CADQI,EAAA,OAAbI,EAAA,EAAAP,EAAuC,aAAhBG,EAAA,KAAK,EAAA,CAAA,6DCO/BL,GAAU,CACb,KAAM,aACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,QAER,UAAW,CACT,KAAM,OACN,QAAS,gBAEX,KAAM,CACJ,KAAM,OACN,QAAS,EACX,CACF,CACF,+DAxBYC,GAAA,CAAA,EAAE,8EAA8E,iDAX1FC,EAeO,OAfPC,EAAcC,EAAA,OAAM,CACb,cAAaC,EAAA,MAAK,KAAA,OAClB,aAAYA,EAAA,MACb,MAAM,mCACN,KAAK,MACJ,QAAKC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEH,EAAA,MAAK,QAAUG,CAAM,WACjCL,EAQM,MAAA,CARA,KAAMG,EAAA,UACP,MAAM,4BACL,MAAOA,EAAA,KACP,OAAQA,EAAA,KACT,QAAQ,cACXG,EAEO,OAFPP,GAEO,CADQI,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B,CAA/B1G,EAA+B,OAAA,CAAzB,UAAQJ,EAAA,eAAa,KAAA,EAAA+G,EAAA,CAAA,CAAA,cAL5BxB,EAEauB,EAAA,CAAA,IAAA,EAFkB,KAAK,MAAA,EAAA,WACnC,IAA2D,CAAAjB,EAAAC,EAAxD9F,EAAA,EAAC,aAAA,oCAAA,CAAA,EAAA,CAAA,CAAA,CAAA,oBA0BPI,EAMM,MAAA,KAAA,CALLuF,EAIqBqB,EAAA,CAHpB,IAAI,OACJ,KAAK,KACL,QAAA,GACA,QAAQ,SAAA,EAAA,KAAA,GAAA,aALG,EAAK,CAAA,CAAA","x_google_ignoreList":[0,1,2,3]} \ No newline at end of file +{"version":3,"file":"SystemTagPicker-ZPzUvrd5.chunk.mjs","sources":["../node_modules/vue-material-design-icons/CheckCircle.vue","../node_modules/vue-material-design-icons/Circle.vue","../node_modules/vue-material-design-icons/CircleOutline.vue","../node_modules/vue-material-design-icons/TagOutline.vue","../build/frontend/apps/systemtags/src/components/SystemTagPicker.vue"],"sourcesContent":["\n\n","\n\n","\n\n","\n\n","\n\n\n\n\n\n\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_ctx","$props","_cache","$event","_createElementVNode","_openBlock","debounceUpdateTag","debounce","updateTag","mainBackgroundColor","isDarkModeEnabled","Status","restrictSystemTagsCreationToAdmin","loadState","defineComponent","CheckIcon","CircleIcon","CircleOutlineIcon","NcButton","NcCheckboxRadioSwitch","NcChip","NcColorPicker","NcDialog","NcEmptyContent","NcLoadingIcon","NcNoteCard","NcTextField","PencilIcon","PlusIcon","TagIcon","status","emit","t","getCurrentUser","a","b","getLanguage","tag","n","tagsAdd","lastTagAdd","tagsRemove","lastTagRemove","addStringSingular","removeStringSingular","addStringPlural","removeStringPlural","fetchTags","tags","acc","node","getNodeSystemTags","logger","chipCloneEl","style","key","value","escapeHTML","domPurify","color","checked","search","showError","payload","id","createTag","fetchTag","el","error","etag","objects","getTagObjects","ids","obj","setTagObjects","nodeFileIds","index","self","nodes","setNodeSystemTags","primaryElement","elementColor","textColor","invertTextColor","_hoisted_1","_hoisted_4","_hoisted_5","_createBlock","_component_NcDialog","_normalizeClass","_withCtx","_createVNode","_component_NcButton","_createTextVNode","_toDisplayString","_component_NcEmptyContent","_component_NcLoadingIcon","_component_CheckIcon","_Fragment","_component_NcTextField","_component_TagIcon","_hoisted_2","_renderList","_normalizeStyle","_component_NcCheckboxRadioSwitch","_component_NcColorPicker","_component_CircleIcon","_component_CircleOutlineIcon","_component_PencilIcon","_component_PlusIcon","_component_NcNoteCard","_hoisted_6","_component_NcChip"],"mappings":"+oDAoBA,MAAKA,GAAU,CACb,KAAM,kBACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,QAER,UAAW,CACT,KAAM,OACN,QAAS,gBAEX,KAAM,CACJ,KAAM,OACN,QAAS,EACX,CACF,CACF,+DAxBYC,GAAA,CAAA,EAAE,qHAAqH,iDAXjIC,EAeO,OAfPC,EAAcC,EAAA,OAAM,CACb,cAAaC,EAAA,MAAK,KAAA,OAClB,aAAYA,EAAA,MACb,MAAM,yCACN,KAAK,MACJ,QAAKC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEH,EAAA,MAAK,QAAUG,CAAM,WACjCL,EAQM,MAAA,CARA,KAAMG,EAAA,UACP,MAAM,4BACL,MAAOA,EAAA,KACP,OAAQA,EAAA,KACT,QAAQ,cACXG,EAEO,OAFPP,GAEO,CADQI,EAAA,OAAbI,EAAA,EAAAP,EAAuC,aAAhBG,EAAA,KAAK,EAAA,CAAA,6DCO/BL,GAAU,CACb,KAAM,aACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,QAER,UAAW,CACT,KAAM,OACN,QAAS,gBAEX,KAAM,CACJ,KAAM,OACN,QAAS,EACX,CACF,CACF,+DAxBYC,GAAA,CAAA,EAAE,8EAA8E,iDAX1FC,EAeO,OAfPC,EAAcC,EAAA,OAAM,CACb,cAAaC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EAAA,CAAA,IAAAA,EAAA,CAAA,EAAKE,EAAI,KAAA,KAAA,KAAA,EAAA,GACtBA,EAAkG,OAAlGiF,GAAkGS,EAA3C9F,EAAA,EAAC,aAAA,gBAAA,CAAA,EAAA,CAAA,CAAA,CAAA,+CAS3DI,EAQM,MARNkF,GAQM,CAPctF,kBAGnBuF,EAGauB,EAAA,CAAA,IAAA,EAHM,KAAK,MAAA,EAAA,WAEvB,IAA+B,CAA/B1G,EAA+B,OAAA,CAAzB,UAAQJ,EAAA,eAAa,KAAA,EAAA+G,EAAA,CAAA,CAAA,cAL5BxB,EAEauB,EAAA,CAAA,IAAA,EAFkB,KAAK,MAAA,EAAA,WACnC,IAA2D,CAAAjB,EAAAC,EAAxD9F,EAAA,EAAC,aAAA,oCAAA,CAAA,EAAA,CAAA,CAAA,CAAA,oBA0BPI,EAMM,MAAA,KAAA,CALLuF,EAIqBqB,EAAA,CAHpB,IAAI,OACJ,KAAK,KACL,QAAA,GACA,QAAQ,SAAA,EAAA,KAAA,GAAA,aALG,EAAK,CAAA,CAAA","x_google_ignoreList":[0,1,2,3]} \ No newline at end of file diff --git a/dist/SystemTagPicker-te7EmT5I.chunk.mjs.map.license b/dist/SystemTagPicker-ZPzUvrd5.chunk.mjs.map.license similarity index 100% rename from dist/SystemTagPicker-te7EmT5I.chunk.mjs.map.license rename to dist/SystemTagPicker-ZPzUvrd5.chunk.mjs.map.license diff --git a/dist/api-DS5xEpYc.chunk.mjs b/dist/api-j5ll7UqT.chunk.mjs similarity index 97% rename from dist/api-DS5xEpYc.chunk.mjs rename to dist/api-j5ll7UqT.chunk.mjs index 32810fbc90101..2025fb122242e 100644 --- a/dist/api-DS5xEpYc.chunk.mjs +++ b/dist/api-j5ll7UqT.chunk.mjs @@ -1,4 +1,4 @@ -import{c as u}from"./index-9ZBo3L67.chunk.mjs";import{g as y,f as c,c as f}from"./index-DgEyzq8A.chunk.mjs";import{t as o}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{c as h}from"./index-CaHqqZcX.chunk.mjs";import{g as b}from"./dav-q7lxn7Ev.chunk.mjs";const r=y().setApp("systemtags").detectUser().build(),O={userVisible:!0,userAssignable:!0,canAssign:!0},x=Object.freeze({"display-name":"displayName","user-visible":"userVisible","user-assignable":"userAssignable","can-assign":"canAssign"});function p(t){return t.map(({props:s})=>Object.fromEntries(Object.entries(s).map(([e,a])=>(e=x[e]??e,a=e==="displayName"?String(a):a,[e,a]))))}function w(t){const s=t.indexOf("?");s>0&&(t=t.substring(0,s));const e=t.split("/");let a;do a=e[e.length-1],e.pop();while(!a&&e.length>0);return Number(a)}function v(t){if("name"in t&&!("displayName"in t))return{...t};const s={...t};return s.name=s.displayName,delete s.displayName,s}function V(t){const s=t.attributes?.["system-tags"]?.["system-tag"];return s===void 0?[]:[s].flat().map(e=>typeof e=="string"?e:e.text)}function N(t,s){t.attributes["system-tags"]={"system-tag":s},c("files:node:updated",t)}const n=b(),l=` +import{c as u}from"./index-9ZBo3L67.chunk.mjs";import{g as y,f as c,c as f}from"./index-DgEyzq8A.chunk.mjs";import{t as o}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{c as h}from"./index-CaHqqZcX.chunk.mjs";import{g as b}from"./dav-CSaJxXR-.chunk.mjs";const r=y().setApp("systemtags").detectUser().build(),O={userVisible:!0,userAssignable:!0,canAssign:!0},x=Object.freeze({"display-name":"displayName","user-visible":"userVisible","user-assignable":"userAssignable","can-assign":"canAssign"});function p(t){return t.map(({props:s})=>Object.fromEntries(Object.entries(s).map(([e,a])=>(e=x[e]??e,a=e==="displayName"?String(a):a,[e,a]))))}function w(t){const s=t.indexOf("?");s>0&&(t=t.substring(0,s));const e=t.split("/");let a;do a=e[e.length-1],e.pop();while(!a&&e.length>0);return Number(a)}function v(t){if("name"in t&&!("displayName"in t))return{...t};const s={...t};return s.name=s.displayName,delete s.displayName,s}function V(t){const s=t.attributes?.["system-tags"]?.["system-tag"];return s===void 0?[]:[s].flat().map(e=>typeof e=="string"?e:e.text)}function N(t,s){t.attributes["system-tags"]={"system-tag":s},c("files:node:updated",t)}const n=b(),l=` @@ -40,4 +40,4 @@ import{c as u}from"./index-9ZBo3L67.chunk.mjs";import{g as y,f as c,c as f}from" `),await n.customRequest(i,{method:"PROPPATCH",data:d,headers:{"if-match":a}})}async function k(t){const s=t?"1":"0",e=f("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"systemtags",key:"restrict_creation_to_admin"});await h();const{data:a}=await u.post(e,{value:s});return a}export{T as a,k as b,C as c,O as d,V as e,P as f,_ as g,N as h,D as i,r as l,q as s,R as u}; -//# sourceMappingURL=api-DS5xEpYc.chunk.mjs.map +//# sourceMappingURL=api-j5ll7UqT.chunk.mjs.map diff --git a/dist/api-DS5xEpYc.chunk.mjs.license b/dist/api-j5ll7UqT.chunk.mjs.license similarity index 100% rename from dist/api-DS5xEpYc.chunk.mjs.license rename to dist/api-j5ll7UqT.chunk.mjs.license diff --git a/dist/api-DS5xEpYc.chunk.mjs.map b/dist/api-j5ll7UqT.chunk.mjs.map similarity index 99% rename from dist/api-DS5xEpYc.chunk.mjs.map rename to dist/api-j5ll7UqT.chunk.mjs.map index 4d5f18ecc11ea..3b42563acede5 100644 --- a/dist/api-DS5xEpYc.chunk.mjs.map +++ b/dist/api-j5ll7UqT.chunk.mjs.map @@ -1 +1 @@ -{"version":3,"file":"api-DS5xEpYc.chunk.mjs","sources":["../build/frontend/apps/systemtags/src/logger.ts","../build/frontend/apps/systemtags/src/utils.ts","../build/frontend/apps/systemtags/src/services/davClient.ts","../build/frontend/apps/systemtags/src/services/api.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('systemtags')\n\t.detectUser()\n\t.build()\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { INode } from '@nextcloud/files'\nimport type { DAVResultResponseProps } from 'webdav'\nimport type { BaseTag, ServerTag, Tag, TagWithId } from './types.ts'\n\nimport { emit } from '@nextcloud/event-bus'\n\nexport const defaultBaseTag: BaseTag = {\n\tuserVisible: true,\n\tuserAssignable: true,\n\tcanAssign: true,\n}\n\nconst propertyMappings = Object.freeze({\n\t'display-name': 'displayName',\n\t'user-visible': 'userVisible',\n\t'user-assignable': 'userAssignable',\n\t'can-assign': 'canAssign',\n})\n\n/**\n * Parse tags from WebDAV response\n *\n * @param tags - Array of tags from WebDAV response\n */\nexport function parseTags(tags: { props: DAVResultResponseProps }[]): TagWithId[] {\n\treturn tags.map(({ props }) => Object.fromEntries(Object.entries(props)\n\t\t.map(([key, value]) => {\n\t\t\tkey = propertyMappings[key] ?? key\n\t\t\tvalue = key === 'displayName' ? String(value) : value\n\t\t\treturn [key, value]\n\t\t})) as unknown as TagWithId)\n}\n\n/**\n * Parse id from `Content-Location` header\n *\n * @param url URL to parse\n */\nexport function parseIdFromLocation(url: string): number {\n\tconst queryPos = url.indexOf('?')\n\tif (queryPos > 0) {\n\t\turl = url.substring(0, queryPos)\n\t}\n\n\tconst parts = url.split('/')\n\tlet result\n\tdo {\n\t\tresult = parts[parts.length - 1]\n\t\tparts.pop()\n\t\t// note: first result can be empty when there is a trailing slash,\n\t\t// so we take the part before that\n\t} while (!result && parts.length > 0)\n\n\treturn Number(result)\n}\n\n/**\n * Format a tag for WebDAV operations\n *\n * @param initialTag - Tag to format\n */\nexport function formatTag(initialTag: Tag | ServerTag): ServerTag {\n\tif ('name' in initialTag && !('displayName' in initialTag)) {\n\t\treturn { ...initialTag }\n\t}\n\n\tconst tag: Record = { ...initialTag }\n\ttag.name = tag.displayName\n\tdelete tag.displayName\n\n\treturn tag as unknown as ServerTag\n}\n\n/**\n * Get system tags from a node\n *\n * @param node - The node to get tags from\n */\nexport function getNodeSystemTags(node: INode): string[] {\n\tconst attribute = node.attributes?.['system-tags']?.['system-tag']\n\tif (attribute === undefined) {\n\t\treturn []\n\t}\n\n\t// if there is only one tag it is a single string or prop object\n\t// if there are multiple then its an array - so we flatten it to be always an array of string or prop objects\n\treturn [attribute]\n\t\t.flat()\n\t\t.map((tag: string | { text: string }) => (\n\t\t\ttypeof tag === 'string'\n\t\t\t\t// its a plain text prop (the tag name) without prop attributes\n\t\t\t\t? tag\n\t\t\t\t// its a prop object with attributes, the tag name is in the 'text' attribute\n\t\t\t\t: tag.text\n\t\t))\n}\n\n/**\n * Set system tags on a node\n *\n * @param node - The node to set tags on\n * @param tags - The tags to set\n */\nexport function setNodeSystemTags(node: INode, tags: string[]): void {\n\tnode.attributes['system-tags'] = {\n\t\t'system-tag': tags,\n\t}\n\temit('files:node:updated', node)\n}\n","/*!\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Node } from '@nextcloud/files'\nimport type { FileStat, ResponseDataDetailed } from 'webdav'\n\nimport { getClient, getDefaultPropfind, getRootPath, resultToNode } from '@nextcloud/files/dav'\n\nexport const davClient = getClient()\n\n/**\n * Fetches a node from the given path\n *\n * @param path - The path to fetch the node from\n */\nexport async function fetchNode(path: string): Promise {\n\tconst propfindPayload = getDefaultPropfind()\n\tconst result = await davClient.stat(`${getRootPath()}${path}`, {\n\t\tdetails: true,\n\t\tdata: propfindPayload,\n\t}) as ResponseDataDetailed\n\treturn resultToNode(result.data)\n}\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { OCSResponse } from '@nextcloud/typings/ocs'\nimport type { FileStat, ResponseDataDetailed, WebDAVClientError } from 'webdav'\nimport type { ServerTag, Tag, TagWithId } from '../types.ts'\n\nimport axios from '@nextcloud/axios'\nimport { emit } from '@nextcloud/event-bus'\nimport { t } from '@nextcloud/l10n'\nimport { confirmPassword } from '@nextcloud/password-confirmation'\nimport { generateOcsUrl, generateUrl } from '@nextcloud/router'\nimport logger from '../logger.ts'\nimport { formatTag, parseIdFromLocation, parseTags } from '../utils.ts'\nimport { davClient } from './davClient.ts'\n\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\t\n\t\n`\n\n/**\n * Fetch all tags.\n */\nexport async function fetchTags(): Promise {\n\tconst path = '/systemtags'\n\ttry {\n\t\tconst { data: tags } = await davClient.getDirectoryContents(path, {\n\t\t\tdata: fetchTagsPayload,\n\t\t\tdetails: true,\n\t\t\tglob: '/systemtags/*', // Filter out first empty tag\n\t\t}) as ResponseDataDetailed[]>\n\t\treturn parseTags(tags)\n\t} catch (error) {\n\t\tlogger.error(t('systemtags', 'Failed to load tags'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to load tags'), { cause: error })\n\t}\n}\n\n/**\n * Fetch a single tag by its ID.\n *\n * @param tagId - The ID of the tag to fetch\n */\nexport async function fetchTag(tagId: number): Promise {\n\tconst path = '/systemtags/' + tagId\n\ttry {\n\t\tconst { data: tag } = await davClient.stat(path, {\n\t\t\tdata: fetchTagsPayload,\n\t\t\tdetails: true,\n\t\t}) as ResponseDataDetailed>\n\t\treturn parseTags([tag])[0]!\n\t} catch (error) {\n\t\tlogger.error(t('systemtags', 'Failed to load tag'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to load tag'), { cause: error })\n\t}\n}\n\n/**\n * Get the last used tag IDs.\n */\nexport async function fetchLastUsedTagIds(): Promise {\n\tconst url = generateUrl('/apps/systemtags/lastused')\n\ttry {\n\t\tconst { data: lastUsedTagIds } = await axios.get(url)\n\t\treturn lastUsedTagIds.map(Number)\n\t} catch (error) {\n\t\tlogger.error(t('systemtags', 'Failed to load last used tags'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to load last used tags'), { cause: error })\n\t}\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 async function createTag(tag: Tag | ServerTag): Promise {\n\tconst path = '/systemtags'\n\tconst tagToPost = formatTag(tag)\n\ttry {\n\t\tconst { headers } = await davClient.customRequest(path, {\n\t\t\tmethod: 'POST',\n\t\t\tdata: tagToPost,\n\t\t})\n\t\tconst contentLocation = headers.get('content-location')\n\t\tif (contentLocation) {\n\t\t\temit('systemtags:tag:created', tag)\n\t\t\treturn parseIdFromLocation(contentLocation)\n\t\t}\n\t\tlogger.error(t('systemtags', 'Missing \"Content-Location\" header'))\n\t\tthrow new Error(t('systemtags', 'Missing \"Content-Location\" header'))\n\t} catch (error) {\n\t\tif ((error as WebDAVClientError)?.response?.status === 409) {\n\t\t\tlogger.error(t('systemtags', 'A tag with the same name already exists'), { error })\n\t\t\tthrow new Error(t('systemtags', 'A tag with the same name already exists'), { cause: error })\n\t\t}\n\t\tlogger.error(t('systemtags', 'Failed to create tag'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to create tag'), { cause: error })\n\t}\n}\n\n/**\n * Update a tag on the server.\n *\n * @param tag - The tag to update\n */\nexport async function updateTag(tag: TagWithId): Promise {\n\tconst path = '/systemtags/' + tag.id\n\tconst 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\t${tag?.color || null}\n\t\t\t\n\t\t\n\t`\n\n\ttry {\n\t\tawait davClient.customRequest(path, {\n\t\t\tmethod: 'PROPPATCH',\n\t\t\tdata,\n\t\t})\n\t\temit('systemtags:tag:updated', tag)\n\t} catch (error) {\n\t\tlogger.error(t('systemtags', 'Failed to update tag'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to update tag'), { cause: error })\n\t}\n}\n\n/**\n * Delete a tag.\n *\n * @param tag - The tag to delete\n */\nexport async function deleteTag(tag: TagWithId): Promise {\n\tconst path = '/systemtags/' + tag.id\n\ttry {\n\t\tawait davClient.deleteFile(path)\n\t\temit('systemtags:tag:deleted', tag)\n\t} catch (error) {\n\t\tlogger.error(t('systemtags', 'Failed to delete tag'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to delete tag'), { cause: error })\n\t}\n}\n\ntype TagObject = {\n\tid: number\n\ttype: string\n}\n\ntype TagObjectResponse = {\n\tetag: string\n\tobjects: TagObject[]\n}\n\n/**\n * Get the objects for a tag.\n *\n * @param tag - The tag to get the objects for\n * @param type - The type of the objects\n */\nexport async function getTagObjects(tag: TagWithId, type: string): Promise {\n\tconst path = `/systemtags/${tag.id}/${type}`\n\tconst data = `\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t`\n\n\tconst response = await davClient.stat(path, { data, details: true }) as ResponseDataDetailed\n\tconst etag = response?.data?.props?.getetag || '\"\"'\n\tconst objects = Object.values(response?.data?.props?.['object-ids'] || []).flat() as TagObject[]\n\n\treturn {\n\t\tetag,\n\t\tobjects,\n\t}\n}\n\n/**\n * Set the objects for a tag.\n * Warning: This will overwrite the existing objects.\n *\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 async function setTagObjects(tag: TagWithId, type: string, objectIds: TagObject[], etag: string = ''): Promise {\n\tconst path = `/systemtags/${tag.id}/${type}`\n\tlet 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\n\tif (objectIds.length === 0) {\n\t\tdata = `\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\t}\n\n\tawait davClient.customRequest(path, {\n\t\tmethod: 'PROPPATCH',\n\t\tdata,\n\t\theaders: {\n\t\t\t'if-match': etag,\n\t\t},\n\t})\n}\n\n/**\n * Update the system tags admin restriction setting.\n *\n * @param isAllowed - True if system tags creation is allowed for non-admins\n */\nexport async function updateSystemTagsAdminRestriction(isAllowed: boolean): Promise {\n\t// Convert to string for compatibility\n\tconst isAllowedString = isAllowed ? '1' : '0'\n\n\tconst url = generateOcsUrl('/apps/provisioning_api/api/v1/config/apps/{appId}/{key}', {\n\t\tappId: 'systemtags',\n\t\tkey: 'restrict_creation_to_admin',\n\t})\n\n\tawait confirmPassword()\n\n\tconst { data } = await axios.post(url, {\n\t\tvalue: isAllowedString,\n\t})\n\n\treturn data\n}\n"],"names":["logger","getLoggerBuilder","defaultBaseTag","propertyMappings","parseTags","tags","props","key","value","parseIdFromLocation","url","queryPos","parts","result","formatTag","initialTag","tag","getNodeSystemTags","node","attribute","setNodeSystemTags","emit","davClient","getClient","fetchTagsPayload","fetchTags","path","error","t","fetchTag","tagId","createTag","tagToPost","headers","contentLocation","updateTag","data","deleteTag","getTagObjects","type","response","etag","objects","setTagObjects","objectIds","id","updateSystemTagsAdminRestriction","isAllowed","isAllowedString","generateOcsUrl","confirmPassword","axios"],"mappings":"sQAOA,MAAAA,EAAeC,IACb,OAAO,YAAY,EACnB,WAAA,EACA,MAAA,ECCWC,EAA0B,CACtC,YAAa,GACb,eAAgB,GAChB,UAAW,EACZ,EAEMC,EAAmB,OAAO,OAAO,CACtC,eAAgB,cAChB,eAAgB,cAChB,kBAAmB,iBACnB,aAAc,WACf,CAAC,EAOM,SAASC,EAAUC,EAAwD,CACjF,OAAOA,EAAK,IAAI,CAAC,CAAE,MAAAC,CAAA,IAAY,OAAO,YAAY,OAAO,QAAQA,CAAK,EACpE,IAAI,CAAC,CAACC,EAAKC,CAAK,KAChBD,EAAMJ,EAAiBI,CAAG,GAAKA,EAC/BC,EAAQD,IAAQ,cAAgB,OAAOC,CAAK,EAAIA,EACzC,CAACD,EAAKC,CAAK,EAClB,CAAC,CAAyB,CAC7B,CAOO,SAASC,EAAoBC,EAAqB,CACxD,MAAMC,EAAWD,EAAI,QAAQ,GAAG,EAC5BC,EAAW,IACdD,EAAMA,EAAI,UAAU,EAAGC,CAAQ,GAGhC,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,oBAAoBN,CAAI,2BAA2B,EAAE,KAAK,EAAE,CAAC;AAAA;AAAA;AAAA,sBAKvIK,EAAU,SAAW,IACxBR,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAUR,MAAMd,EAAU,cAAcI,EAAM,CACnC,OAAQ,YACR,KAAAU,EACA,QAAS,CACR,WAAYK,CAAA,CACb,CACA,CACF,CAOA,eAAsBK,EAAiCC,EAA0C,CAEhG,MAAMC,EAAkBD,EAAY,IAAM,IAEpCrC,EAAMuC,EAAe,0DAA2D,CACrF,MAAO,aACP,IAAK,4BAAA,CACL,EAED,MAAMC,EAAA,EAEN,KAAM,CAAE,KAAAd,CAAA,EAAS,MAAMe,EAAM,KAAKzC,EAAK,CACtC,MAAOsC,CAAA,CACP,EAED,OAAOZ,CACR"} \ No newline at end of file +{"version":3,"file":"api-j5ll7UqT.chunk.mjs","sources":["../build/frontend/apps/systemtags/src/logger.ts","../build/frontend/apps/systemtags/src/utils.ts","../build/frontend/apps/systemtags/src/services/davClient.ts","../build/frontend/apps/systemtags/src/services/api.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('systemtags')\n\t.detectUser()\n\t.build()\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { INode } from '@nextcloud/files'\nimport type { DAVResultResponseProps } from 'webdav'\nimport type { BaseTag, ServerTag, Tag, TagWithId } from './types.ts'\n\nimport { emit } from '@nextcloud/event-bus'\n\nexport const defaultBaseTag: BaseTag = {\n\tuserVisible: true,\n\tuserAssignable: true,\n\tcanAssign: true,\n}\n\nconst propertyMappings = Object.freeze({\n\t'display-name': 'displayName',\n\t'user-visible': 'userVisible',\n\t'user-assignable': 'userAssignable',\n\t'can-assign': 'canAssign',\n})\n\n/**\n * Parse tags from WebDAV response\n *\n * @param tags - Array of tags from WebDAV response\n */\nexport function parseTags(tags: { props: DAVResultResponseProps }[]): TagWithId[] {\n\treturn tags.map(({ props }) => Object.fromEntries(Object.entries(props)\n\t\t.map(([key, value]) => {\n\t\t\tkey = propertyMappings[key] ?? key\n\t\t\tvalue = key === 'displayName' ? String(value) : value\n\t\t\treturn [key, value]\n\t\t})) as unknown as TagWithId)\n}\n\n/**\n * Parse id from `Content-Location` header\n *\n * @param url URL to parse\n */\nexport function parseIdFromLocation(url: string): number {\n\tconst queryPos = url.indexOf('?')\n\tif (queryPos > 0) {\n\t\turl = url.substring(0, queryPos)\n\t}\n\n\tconst parts = url.split('/')\n\tlet result\n\tdo {\n\t\tresult = parts[parts.length - 1]\n\t\tparts.pop()\n\t\t// note: first result can be empty when there is a trailing slash,\n\t\t// so we take the part before that\n\t} while (!result && parts.length > 0)\n\n\treturn Number(result)\n}\n\n/**\n * Format a tag for WebDAV operations\n *\n * @param initialTag - Tag to format\n */\nexport function formatTag(initialTag: Tag | ServerTag): ServerTag {\n\tif ('name' in initialTag && !('displayName' in initialTag)) {\n\t\treturn { ...initialTag }\n\t}\n\n\tconst tag: Record = { ...initialTag }\n\ttag.name = tag.displayName\n\tdelete tag.displayName\n\n\treturn tag as unknown as ServerTag\n}\n\n/**\n * Get system tags from a node\n *\n * @param node - The node to get tags from\n */\nexport function getNodeSystemTags(node: INode): string[] {\n\tconst attribute = node.attributes?.['system-tags']?.['system-tag']\n\tif (attribute === undefined) {\n\t\treturn []\n\t}\n\n\t// if there is only one tag it is a single string or prop object\n\t// if there are multiple then its an array - so we flatten it to be always an array of string or prop objects\n\treturn [attribute]\n\t\t.flat()\n\t\t.map((tag: string | { text: string }) => (\n\t\t\ttypeof tag === 'string'\n\t\t\t\t// its a plain text prop (the tag name) without prop attributes\n\t\t\t\t? tag\n\t\t\t\t// its a prop object with attributes, the tag name is in the 'text' attribute\n\t\t\t\t: tag.text\n\t\t))\n}\n\n/**\n * Set system tags on a node\n *\n * @param node - The node to set tags on\n * @param tags - The tags to set\n */\nexport function setNodeSystemTags(node: INode, tags: string[]): void {\n\tnode.attributes['system-tags'] = {\n\t\t'system-tag': tags,\n\t}\n\temit('files:node:updated', node)\n}\n","/*!\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Node } from '@nextcloud/files'\nimport type { FileStat, ResponseDataDetailed } from 'webdav'\n\nimport { getClient, getDefaultPropfind, getRootPath, resultToNode } from '@nextcloud/files/dav'\n\nexport const davClient = getClient()\n\n/**\n * Fetches a node from the given path\n *\n * @param path - The path to fetch the node from\n */\nexport async function fetchNode(path: string): Promise {\n\tconst propfindPayload = getDefaultPropfind()\n\tconst result = await davClient.stat(`${getRootPath()}${path}`, {\n\t\tdetails: true,\n\t\tdata: propfindPayload,\n\t}) as ResponseDataDetailed\n\treturn resultToNode(result.data)\n}\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { OCSResponse } from '@nextcloud/typings/ocs'\nimport type { FileStat, ResponseDataDetailed, WebDAVClientError } from 'webdav'\nimport type { ServerTag, Tag, TagWithId } from '../types.ts'\n\nimport axios from '@nextcloud/axios'\nimport { emit } from '@nextcloud/event-bus'\nimport { t } from '@nextcloud/l10n'\nimport { confirmPassword } from '@nextcloud/password-confirmation'\nimport { generateOcsUrl, generateUrl } from '@nextcloud/router'\nimport logger from '../logger.ts'\nimport { formatTag, parseIdFromLocation, parseTags } from '../utils.ts'\nimport { davClient } from './davClient.ts'\n\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\t\n\t\n`\n\n/**\n * Fetch all tags.\n */\nexport async function fetchTags(): Promise {\n\tconst path = '/systemtags'\n\ttry {\n\t\tconst { data: tags } = await davClient.getDirectoryContents(path, {\n\t\t\tdata: fetchTagsPayload,\n\t\t\tdetails: true,\n\t\t\tglob: '/systemtags/*', // Filter out first empty tag\n\t\t}) as ResponseDataDetailed[]>\n\t\treturn parseTags(tags)\n\t} catch (error) {\n\t\tlogger.error(t('systemtags', 'Failed to load tags'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to load tags'), { cause: error })\n\t}\n}\n\n/**\n * Fetch a single tag by its ID.\n *\n * @param tagId - The ID of the tag to fetch\n */\nexport async function fetchTag(tagId: number): Promise {\n\tconst path = '/systemtags/' + tagId\n\ttry {\n\t\tconst { data: tag } = await davClient.stat(path, {\n\t\t\tdata: fetchTagsPayload,\n\t\t\tdetails: true,\n\t\t}) as ResponseDataDetailed>\n\t\treturn parseTags([tag])[0]!\n\t} catch (error) {\n\t\tlogger.error(t('systemtags', 'Failed to load tag'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to load tag'), { cause: error })\n\t}\n}\n\n/**\n * Get the last used tag IDs.\n */\nexport async function fetchLastUsedTagIds(): Promise {\n\tconst url = generateUrl('/apps/systemtags/lastused')\n\ttry {\n\t\tconst { data: lastUsedTagIds } = await axios.get(url)\n\t\treturn lastUsedTagIds.map(Number)\n\t} catch (error) {\n\t\tlogger.error(t('systemtags', 'Failed to load last used tags'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to load last used tags'), { cause: error })\n\t}\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 async function createTag(tag: Tag | ServerTag): Promise {\n\tconst path = '/systemtags'\n\tconst tagToPost = formatTag(tag)\n\ttry {\n\t\tconst { headers } = await davClient.customRequest(path, {\n\t\t\tmethod: 'POST',\n\t\t\tdata: tagToPost,\n\t\t})\n\t\tconst contentLocation = headers.get('content-location')\n\t\tif (contentLocation) {\n\t\t\temit('systemtags:tag:created', tag)\n\t\t\treturn parseIdFromLocation(contentLocation)\n\t\t}\n\t\tlogger.error(t('systemtags', 'Missing \"Content-Location\" header'))\n\t\tthrow new Error(t('systemtags', 'Missing \"Content-Location\" header'))\n\t} catch (error) {\n\t\tif ((error as WebDAVClientError)?.response?.status === 409) {\n\t\t\tlogger.error(t('systemtags', 'A tag with the same name already exists'), { error })\n\t\t\tthrow new Error(t('systemtags', 'A tag with the same name already exists'), { cause: error })\n\t\t}\n\t\tlogger.error(t('systemtags', 'Failed to create tag'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to create tag'), { cause: error })\n\t}\n}\n\n/**\n * Update a tag on the server.\n *\n * @param tag - The tag to update\n */\nexport async function updateTag(tag: TagWithId): Promise {\n\tconst path = '/systemtags/' + tag.id\n\tconst 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\t${tag?.color || null}\n\t\t\t\n\t\t\n\t`\n\n\ttry {\n\t\tawait davClient.customRequest(path, {\n\t\t\tmethod: 'PROPPATCH',\n\t\t\tdata,\n\t\t})\n\t\temit('systemtags:tag:updated', tag)\n\t} catch (error) {\n\t\tlogger.error(t('systemtags', 'Failed to update tag'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to update tag'), { cause: error })\n\t}\n}\n\n/**\n * Delete a tag.\n *\n * @param tag - The tag to delete\n */\nexport async function deleteTag(tag: TagWithId): Promise {\n\tconst path = '/systemtags/' + tag.id\n\ttry {\n\t\tawait davClient.deleteFile(path)\n\t\temit('systemtags:tag:deleted', tag)\n\t} catch (error) {\n\t\tlogger.error(t('systemtags', 'Failed to delete tag'), { error })\n\t\tthrow new Error(t('systemtags', 'Failed to delete tag'), { cause: error })\n\t}\n}\n\ntype TagObject = {\n\tid: number\n\ttype: string\n}\n\ntype TagObjectResponse = {\n\tetag: string\n\tobjects: TagObject[]\n}\n\n/**\n * Get the objects for a tag.\n *\n * @param tag - The tag to get the objects for\n * @param type - The type of the objects\n */\nexport async function getTagObjects(tag: TagWithId, type: string): Promise {\n\tconst path = `/systemtags/${tag.id}/${type}`\n\tconst data = `\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t`\n\n\tconst response = await davClient.stat(path, { data, details: true }) as ResponseDataDetailed\n\tconst etag = response?.data?.props?.getetag || '\"\"'\n\tconst objects = Object.values(response?.data?.props?.['object-ids'] || []).flat() as TagObject[]\n\n\treturn {\n\t\tetag,\n\t\tobjects,\n\t}\n}\n\n/**\n * Set the objects for a tag.\n * Warning: This will overwrite the existing objects.\n *\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 async function setTagObjects(tag: TagWithId, type: string, objectIds: TagObject[], etag: string = ''): Promise {\n\tconst path = `/systemtags/${tag.id}/${type}`\n\tlet 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\n\tif (objectIds.length === 0) {\n\t\tdata = `\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\t}\n\n\tawait davClient.customRequest(path, {\n\t\tmethod: 'PROPPATCH',\n\t\tdata,\n\t\theaders: {\n\t\t\t'if-match': etag,\n\t\t},\n\t})\n}\n\n/**\n * Update the system tags admin restriction setting.\n *\n * @param isAllowed - True if system tags creation is allowed for non-admins\n */\nexport async function updateSystemTagsAdminRestriction(isAllowed: boolean): Promise {\n\t// Convert to string for compatibility\n\tconst isAllowedString = isAllowed ? '1' : '0'\n\n\tconst url = generateOcsUrl('/apps/provisioning_api/api/v1/config/apps/{appId}/{key}', {\n\t\tappId: 'systemtags',\n\t\tkey: 'restrict_creation_to_admin',\n\t})\n\n\tawait confirmPassword()\n\n\tconst { data } = await axios.post(url, {\n\t\tvalue: isAllowedString,\n\t})\n\n\treturn data\n}\n"],"names":["logger","getLoggerBuilder","defaultBaseTag","propertyMappings","parseTags","tags","props","key","value","parseIdFromLocation","url","queryPos","parts","result","formatTag","initialTag","tag","getNodeSystemTags","node","attribute","setNodeSystemTags","emit","davClient","getClient","fetchTagsPayload","fetchTags","path","error","t","fetchTag","tagId","createTag","tagToPost","headers","contentLocation","updateTag","data","deleteTag","getTagObjects","type","response","etag","objects","setTagObjects","objectIds","id","updateSystemTagsAdminRestriction","isAllowed","isAllowedString","generateOcsUrl","confirmPassword","axios"],"mappings":"sQAOA,MAAAA,EAAeC,IACb,OAAO,YAAY,EACnB,WAAA,EACA,MAAA,ECCWC,EAA0B,CACtC,YAAa,GACb,eAAgB,GAChB,UAAW,EACZ,EAEMC,EAAmB,OAAO,OAAO,CACtC,eAAgB,cAChB,eAAgB,cAChB,kBAAmB,iBACnB,aAAc,WACf,CAAC,EAOM,SAASC,EAAUC,EAAwD,CACjF,OAAOA,EAAK,IAAI,CAAC,CAAE,MAAAC,CAAA,IAAY,OAAO,YAAY,OAAO,QAAQA,CAAK,EACpE,IAAI,CAAC,CAACC,EAAKC,CAAK,KAChBD,EAAMJ,EAAiBI,CAAG,GAAKA,EAC/BC,EAAQD,IAAQ,cAAgB,OAAOC,CAAK,EAAIA,EACzC,CAACD,EAAKC,CAAK,EAClB,CAAC,CAAyB,CAC7B,CAOO,SAASC,EAAoBC,EAAqB,CACxD,MAAMC,EAAWD,EAAI,QAAQ,GAAG,EAC5BC,EAAW,IACdD,EAAMA,EAAI,UAAU,EAAGC,CAAQ,GAGhC,MAAMC,EAAQF,EAAI,MAAM,GAAG,EAC3B,IAAIG,EACJ,GACCA,EAASD,EAAMA,EAAM,OAAS,CAAC,EAC/BA,EAAM,IAAA,QAGE,CAACC,GAAUD,EAAM,OAAS,GAEnC,OAAO,OAAOC,CAAM,CACrB,CAOO,SAASC,EAAUC,EAAwC,CACjE,GAAI,SAAUA,GAAc,EAAE,gBAAiBA,GAC9C,MAAO,CAAE,GAAGA,CAAA,EAGb,MAAMC,EAA+B,CAAE,GAAGD,CAAA,EAC1C,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EAAMuC,EAAe,0DAA2D,CACrF,MAAO,aACP,IAAK,4BAAA,CACL,EAED,MAAMC,EAAA,EAEN,KAAM,CAAE,KAAAd,CAAA,EAAS,MAAMe,EAAM,KAAKzC,EAAK,CACtC,MAAOsC,CAAA,CACP,EAED,OAAOZ,CACR"} \ No newline at end of file diff --git a/dist/api-DS5xEpYc.chunk.mjs.map.license b/dist/api-j5ll7UqT.chunk.mjs.map.license similarity index 100% rename from dist/api-DS5xEpYc.chunk.mjs.map.license rename to dist/api-j5ll7UqT.chunk.mjs.map.license diff --git a/dist/dav-q7lxn7Ev.chunk.mjs b/dist/dav-CSaJxXR-.chunk.mjs similarity index 76% rename from dist/dav-q7lxn7Ev.chunk.mjs rename to dist/dav-CSaJxXR-.chunk.mjs index 46db271a36960..fe899a0f2e958 100644 --- a/dist/dav-q7lxn7Ev.chunk.mjs +++ b/dist/dav-CSaJxXR-.chunk.mjs @@ -1,9 +1,9 @@ -import{a as m,h as E,o as q,e as D}from"./index-DgEyzq8A.chunk.mjs";import{l as y}from"./index-C3KLQ_oe.chunk.mjs";import{z as P,L as T}from"./index-Ds0AsAbv.chunk.mjs";import{s as i,l as u,N as x,a as R,b as S,P as o}from"./externalStorageUtils-BzJyVKar.chunk.mjs";function f(){return y("files_sharing","isPublic",null)??document.querySelector('input#isPublic[type="hidden"][name="isPublic"][value="1"]')!==null}function A(){return y("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]')?.value??null}function k(e=""){let r=o.NONE;return e&&(e.includes("G")&&(r|=o.READ),e.includes("W")&&(r|=o.WRITE),e.includes("CK")&&(r|=o.CREATE),e.includes("NV")&&(r|=o.UPDATE),e.includes("D")&&(r|=o.DELETE),e.includes("R")&&(r|=o.SHARE)),r}const w=["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"],$={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"};function F(e,r={nc:"http://nextcloud.org/ns"}){i.davNamespaces??={...$},i.davProperties??=[...w];const s={...i.davNamespaces,...r};if(i.davProperties.find(t=>t===e))return u.warn(`${e} already registered`,{prop:e}),!1;if(e.startsWith("<")||e.split(":").length!==2)return u.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}),!1;const n=e.split(":")[0];return s[n]?(i.davProperties.push(e),i.davNamespaces=s,!0):(u.error(`${e} namespace unknown`,{prop:e,namespaces:s}),!1)}function h(){return i.davProperties??=[...w],i.davProperties.map(e=>`<${e} />`).join(" ")}function g(){return i.davNamespaces??={...$},Object.keys(i.davNamespaces).map(e=>`xmlns:${e}="${i.davNamespaces?.[e]}"`).join(" ")}function U(){return` +import{a as m,h as E,o as q,e as D}from"./index-DgEyzq8A.chunk.mjs";import{l as y}from"./index-C3KLQ_oe.chunk.mjs";import{$ as P,R as T}from"./index-C5O29_27.chunk.mjs";import{s as i,l as u,N as x,a as R,b as S,P as o}from"./externalStorageUtils-BzJyVKar.chunk.mjs";function f(){return y("files_sharing","isPublic",null)??document.querySelector('input#isPublic[type="hidden"][name="isPublic"][value="1"]')!==null}function A(){return y("files_sharing","sharingToken",null)??document.querySelector('input#sharingToken[type="hidden"]')?.value??null}function k(e=""){let r=o.NONE;return e&&(e.includes("G")&&(r|=o.READ),e.includes("W")&&(r|=o.WRITE),e.includes("CK")&&(r|=o.CREATE),e.includes("NV")&&(r|=o.UPDATE),e.includes("D")&&(r|=o.DELETE),e.includes("R")&&(r|=o.SHARE)),r}const $=["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"],w={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"};function F(e,r={nc:"http://nextcloud.org/ns"}){i.davNamespaces??={...w},i.davProperties??=[...$];const s={...i.davNamespaces,...r};if(i.davProperties.find(t=>t===e))return u.warn(`${e} already registered`,{prop:e}),!1;if(e.startsWith("<")||e.split(":").length!==2)return u.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}),!1;const n=e.split(":")[0];return s[n]?(i.davProperties.push(e),i.davNamespaces=s,!0):(u.error(`${e} namespace unknown`,{prop:e,namespaces:s}),!1)}function h(){return i.davProperties??=[...$],i.davProperties.map(e=>`<${e} />`).join(" ")}function g(){return i.davNamespaces??={...w},Object.keys(i.davNamespaces).map(e=>`xmlns:${e}="${i.davNamespaces?.[e]}"`).join(" ")}function U(){return` ${h()} - `}function z(){return` + `}function j(){return` ${h()} @@ -65,5 +65,5 @@ import{a as m,h as E,o as q,e as D}from"./index-DgEyzq8A.chunk.mjs";import{l as 0 -`}function j(){return f()?`/files/${A()}`:`/files/${m()?.uid}`}const b=j();function L(){const e=E("dav");return f()?e.replace("remote.php","public.php"):e}const N=L();function W(e=N,r={}){const s=P(e,{headers:r});function n(t){s.setHeaders({...r,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return q(n),n(D()),T().patch("fetch",(t,d)=>{const a=d.headers;return a?.method&&(d.method=a.method,delete a.method),fetch(t,d)}),s}async function _(e={}){const r=e.client??W(),s=e.path??"/",n=e.davRoot??b;return(await r.getDirectoryContents(`${n}${s}`,{signal:e.signal,details:!0,data:z(),headers:{method:"REPORT"},includeSelf:!0})).data.filter(t=>t.filename!==s).map(t=>C(t,n))}function C(e,r=b,s=N){let n=m()?.uid;if(f())n=n??"anonymous";else if(!n)throw new Error("No user id found");const t=e.props,d=k(t?.permissions),a=String(t?.["owner-id"]||n),v=t.fileid||0,c=new Date(Date.parse(e.lastmod)),p=new Date(Date.parse(t.creationdate)),l={id:v,source:`${s}${e.filename}`,mtime:!isNaN(c.getTime())&&c.getTime()!==0?c:void 0,crtime:!isNaN(p.getTime())&&p.getTime()!==0?p:void 0,mime:e.mime||"application/octet-stream",displayname:t.displayname!==void 0?String(t.displayname):void 0,size:t?.size||Number.parseInt(t.getcontentlength||"0"),status:v<0?x.FAILED:void 0,permissions:d,owner:a,root:r,attributes:{...e,...t,hasPreview:t?.["has-preview"]}};return delete l.attributes?.props,e.type==="file"?new R(l):new S(l)}export{g as a,h as b,F as c,N as d,L as e,j as f,W as g,_ as h,b as i,X as j,U as k,C as r}; -//# sourceMappingURL=dav-q7lxn7Ev.chunk.mjs.map +`}function z(){return f()?`/files/${A()}`:`/files/${m()?.uid}`}const b=z();function W(){const e=E("dav");return f()?e.replace("remote.php","public.php"):e}const N=W();function C(e=N,r={}){const s=P(e,{headers:r});function n(t){s.setHeaders({...r,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return q(n),n(D()),T().patch("fetch",(t,d)=>{const a=d.headers;return a?.method&&(d.method=a.method,delete a.method),fetch(t,d)}),s}async function _(e={}){const r=e.client??C(),s=e.path??"/",n=e.davRoot??b;return(await r.getDirectoryContents(`${n}${s}`,{signal:e.signal,details:!0,data:j(),headers:{method:"REPORT"},includeSelf:!0})).data.filter(t=>t.filename!==s).map(t=>H(t,n))}function H(e,r=b,s=N){let n=m()?.uid;if(f())n=n??"anonymous";else if(!n)throw new Error("No user id found");const t=e.props,d=k(t?.permissions),a=String(t?.["owner-id"]||n),v=t.fileid||0,c=new Date(Date.parse(e.lastmod)),p=new Date(Date.parse(t.creationdate)),l={id:v,source:`${s}${e.filename}`,mtime:!isNaN(c.getTime())&&c.getTime()!==0?c:void 0,crtime:!isNaN(p.getTime())&&p.getTime()!==0?p:void 0,mime:e.mime||"application/octet-stream",displayname:t.displayname!==void 0?String(t.displayname):void 0,size:t?.size||Number.parseInt(t.getcontentlength||"0"),status:v<0?x.FAILED:void 0,permissions:d,owner:a,root:r,attributes:{...e,...t,hasPreview:t?.["has-preview"]}};return delete l.attributes?.props,e.type==="file"?new R(l):new S(l)}export{g as a,h as b,F as c,N as d,W as e,z as f,C as g,_ as h,b as i,X as j,U as k,H as r}; +//# sourceMappingURL=dav-CSaJxXR-.chunk.mjs.map diff --git a/dist/dav-q7lxn7Ev.chunk.mjs.license b/dist/dav-CSaJxXR-.chunk.mjs.license similarity index 100% rename from dist/dav-q7lxn7Ev.chunk.mjs.license rename to dist/dav-CSaJxXR-.chunk.mjs.license diff --git a/dist/dav-q7lxn7Ev.chunk.mjs.map b/dist/dav-CSaJxXR-.chunk.mjs.map similarity index 99% rename from dist/dav-q7lxn7Ev.chunk.mjs.map rename to dist/dav-CSaJxXR-.chunk.mjs.map index fcdb549eefacc..15c4fc18e35ef 100644 --- a/dist/dav-q7lxn7Ev.chunk.mjs.map +++ b/dist/dav-CSaJxXR-.chunk.mjs.map @@ -1 +1 @@ -{"version":3,"file":"dav-q7lxn7Ev.chunk.mjs","sources":["../node_modules/@nextcloud/files/node_modules/@nextcloud/sharing/dist/public.js","../node_modules/@nextcloud/files/dist/dav.mjs"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n/**\n * @module public\n */\nimport { loadState } from '@nextcloud/initial-state';\n/**\n * Check if the current page is on a public share\n */\nexport function isPublicShare() {\n // check both the new initial state version and fallback to legacy input\n return (loadState('files_sharing', 'isPublic', null)\n ?? document.querySelector('input#isPublic[type=\"hidden\"][name=\"isPublic\"][value=\"1\"]') !== null);\n}\n/**\n * Get the sharing token for the current public share\n */\nexport function getSharingToken() {\n return (loadState('files_sharing', 'sharingToken', null)\n ?? document.querySelector('input#sharingToken[type=\"hidden\"]')?.value\n ?? null);\n}\n","import { getCurrentUser, onRequestTokenUpdate, getRequestToken } from \"@nextcloud/auth\";\nimport { generateRemoteUrl } from \"@nextcloud/router\";\nimport { isPublicShare, getSharingToken } from \"@nextcloud/sharing/public\";\nimport { createClient, getPatcher } from \"webdav\";\nimport { P as Permission, s as scopedGlobals, l as logger, c as NodeStatus, a as File, b as Folder } from \"./chunks/folder-29HuacU_.mjs\";\nimport \"@nextcloud/paths\";\n/*!\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nfunction parsePermissions(permString = \"\") {\n let permissions = Permission.NONE;\n if (!permString) {\n return permissions;\n }\n if (permString.includes(\"G\")) {\n permissions |= Permission.READ;\n }\n if (permString.includes(\"W\")) {\n permissions |= Permission.WRITE;\n }\n if (permString.includes(\"CK\")) {\n permissions |= Permission.CREATE;\n }\n if (permString.includes(\"NV\")) {\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}\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};\nfunction registerDavProperty(prop, namespace = { nc: \"http://nextcloud.org/ns\" }) {\n scopedGlobals.davNamespaces ??= { ...defaultDavNamespaces };\n scopedGlobals.davProperties ??= [...defaultDavProperties];\n const namespaces = { ...scopedGlobals.davNamespaces, ...namespace };\n if (scopedGlobals.davProperties.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 scopedGlobals.davProperties.push(prop);\n scopedGlobals.davNamespaces = namespaces;\n return true;\n}\nfunction getDavProperties() {\n scopedGlobals.davProperties ??= [...defaultDavProperties];\n return scopedGlobals.davProperties.map((prop) => `<${prop} />`).join(\" \");\n}\nfunction getDavNameSpaces() {\n scopedGlobals.davNamespaces ??= { ...defaultDavNamespaces };\n return Object.keys(scopedGlobals.davNamespaces).map((ns) => `xmlns:${ns}=\"${scopedGlobals.davNamespaces?.[ns]}\"`).join(\" \");\n}\nfunction getDefaultPropfind() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t`;\n}\nfunction getFavoritesReport() {\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}\nfunction getRecentSearch(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}\nfunction getRootPath() {\n if (isPublicShare()) {\n return `/files/${getSharingToken()}`;\n }\n return `/files/${getCurrentUser()?.uid}`;\n}\nconst defaultRootPath = getRootPath();\nfunction getRemoteURL() {\n const url = generateRemoteUrl(\"dav\");\n if (isPublicShare()) {\n return url.replace(\"remote.php\", \"public.php\");\n }\n return url;\n}\nconst defaultRemoteURL = getRemoteURL();\nfunction getClient(remoteURL = defaultRemoteURL, 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}\nasync function getFavoriteNodes(options = {}) {\n const client = options.client ?? getClient();\n const path = options.path ?? \"/\";\n const davRoot = options.davRoot ?? defaultRootPath;\n const contentsResponse = await client.getDirectoryContents(`${davRoot}${path}`, {\n signal: options.signal,\n details: true,\n data: getFavoritesReport(),\n headers: {\n // see getClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: true\n });\n return contentsResponse.data.filter((node) => node.filename !== path).map((result) => resultToNode(result, davRoot));\n}\nfunction resultToNode(node, filesRoot = defaultRootPath, remoteURL = defaultRemoteURL) {\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 = parsePermissions(props?.permissions);\n const owner = String(props?.[\"owner-id\"] || userId);\n const id = props.fileid || 0;\n const mtime = new Date(Date.parse(node.lastmod));\n const crtime = new Date(Date.parse(props.creationdate));\n const nodeData = {\n id,\n source: `${remoteURL}${node.filename}`,\n mtime: !isNaN(mtime.getTime()) && mtime.getTime() !== 0 ? mtime : void 0,\n crtime: !isNaN(crtime.getTime()) && crtime.getTime() !== 0 ? crtime : void 0,\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}\nexport {\n defaultDavNamespaces,\n defaultDavProperties,\n defaultRemoteURL,\n defaultRootPath,\n getClient,\n getDavNameSpaces,\n getDavProperties,\n getDefaultPropfind,\n getFavoriteNodes,\n getFavoritesReport,\n getRecentSearch,\n getRemoteURL,\n getRootPath,\n parsePermissions,\n registerDavProperty,\n resultToNode\n};\n//# sourceMappingURL=dav.mjs.map\n"],"names":["isPublicShare","loadState","getSharingToken","parsePermissions","permString","permissions","Permission","defaultDavProperties","defaultDavNamespaces","registerDavProperty","prop","namespace","scopedGlobals","namespaces","search","logger","ns","getDavProperties","getDavNameSpaces","getDefaultPropfind","getFavoritesReport","getRecentSearch","lastModified","getCurrentUser","getRootPath","defaultRootPath","getRemoteURL","url","generateRemoteUrl","defaultRemoteURL","getClient","remoteURL","headers","client","createClient","setHeaders","token","onRequestTokenUpdate","getRequestToken","getPatcher","options","headers2","getFavoriteNodes","path","davRoot","node","result","resultToNode","filesRoot","userId","props","owner","id","mtime","crtime","nodeData","NodeStatus","File","Folder"],"mappings":"0QAWO,SAASA,GAAgB,C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IoB,EAAS1B,EAAc,GAAI,IAC/B,GAAIvB,EAAa,EACfiD,EAASA,GAAU,oBACV,CAACA,EACV,MAAM,IAAI,MAAM,kBAAkB,EAEpC,MAAMC,EAAQL,EAAK,MACbxC,EAAcF,EAAiB+C,GAAO,WAAW,EACjDC,EAAQ,OAAOD,IAAQ,UAAU,GAAKD,CAAM,EAC5CG,EAAKF,EAAM,QAAU,EACrBG,EAAQ,IAAI,KAAK,KAAK,MAAMR,EAAK,OAAO,CAAC,EACzCS,EAAS,IAAI,KAAK,KAAK,MAAMJ,EAAM,YAAY,CAAC,EAChDK,EAAW,CACf,GAAAH,EACA,OAAQ,GAAGrB,CAAS,GAAGc,EAAK,QAAQ,GACpC,MAAO,CAAC,MAAMQ,EAAM,QAAO,CAAE,GAAKA,EAAM,QAAO,IAAO,EAAIA,EAAQ,OAClE,OAAQ,CAAC,MAAMC,EAAO,QAAO,CAAE,GAAKA,EAAO,QAAO,IAAO,EAAIA,EAAS,OACtE,KAAMT,EAAK,MAAQ,2BAEnB,YAAaK,EAAM,cAAgB,OAAS,OAAOA,EAAM,WAAW,EAAI,OACxE,KAAMA,GAAO,MAAQ,OAAO,SAASA,EAAM,kBAAoB,GAAG,EAElE,OAAQE,EAAK,EAAII,EAAW,OAAS,OACrC,YAAAnD,EACA,MAAA8C,EACA,KAAMH,EACN,WAAY,CACV,GAAGH,EACH,GAAGK,EACH,WAAYA,IAAQ,aAAa,CACvC,CACA,EACE,cAAOK,EAAS,YAAY,MACrBV,EAAK,OAAS,OAAS,IAAIY,EAAKF,CAAQ,EAAI,IAAIG,EAAOH,CAAQ,CACxE","x_google_ignoreList":[0,1]} \ No newline at end of file +{"version":3,"file":"dav-CSaJxXR-.chunk.mjs","sources":["../node_modules/@nextcloud/files/node_modules/@nextcloud/sharing/dist/public.js","../node_modules/@nextcloud/files/dist/dav.mjs"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n/**\n * @module public\n */\nimport { loadState } from '@nextcloud/initial-state';\n/**\n * Check if the current page is on a public share\n */\nexport function isPublicShare() {\n // check both the new initial state version and fallback to legacy input\n return (loadState('files_sharing', 'isPublic', null)\n ?? document.querySelector('input#isPublic[type=\"hidden\"][name=\"isPublic\"][value=\"1\"]') !== null);\n}\n/**\n * Get the sharing token for the current public share\n */\nexport function getSharingToken() {\n return (loadState('files_sharing', 'sharingToken', null)\n ?? document.querySelector('input#sharingToken[type=\"hidden\"]')?.value\n ?? null);\n}\n","import { getCurrentUser, onRequestTokenUpdate, getRequestToken } from \"@nextcloud/auth\";\nimport { generateRemoteUrl } from \"@nextcloud/router\";\nimport { isPublicShare, getSharingToken } from \"@nextcloud/sharing/public\";\nimport { createClient, getPatcher } from \"webdav\";\nimport { P as Permission, s as scopedGlobals, l as logger, c as NodeStatus, a as File, b as Folder } from \"./chunks/folder-29HuacU_.mjs\";\nimport \"@nextcloud/paths\";\n/*!\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nfunction parsePermissions(permString = \"\") {\n let permissions = Permission.NONE;\n if (!permString) {\n return permissions;\n }\n if (permString.includes(\"G\")) {\n permissions |= Permission.READ;\n }\n if (permString.includes(\"W\")) {\n permissions |= Permission.WRITE;\n }\n if (permString.includes(\"CK\")) {\n permissions |= Permission.CREATE;\n }\n if (permString.includes(\"NV\")) {\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}\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};\nfunction registerDavProperty(prop, namespace = { nc: \"http://nextcloud.org/ns\" }) {\n scopedGlobals.davNamespaces ??= { ...defaultDavNamespaces };\n scopedGlobals.davProperties ??= [...defaultDavProperties];\n const namespaces = { ...scopedGlobals.davNamespaces, ...namespace };\n if (scopedGlobals.davProperties.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 scopedGlobals.davProperties.push(prop);\n scopedGlobals.davNamespaces = namespaces;\n return true;\n}\nfunction getDavProperties() {\n scopedGlobals.davProperties ??= [...defaultDavProperties];\n return scopedGlobals.davProperties.map((prop) => `<${prop} />`).join(\" \");\n}\nfunction getDavNameSpaces() {\n scopedGlobals.davNamespaces ??= { ...defaultDavNamespaces };\n return Object.keys(scopedGlobals.davNamespaces).map((ns) => `xmlns:${ns}=\"${scopedGlobals.davNamespaces?.[ns]}\"`).join(\" \");\n}\nfunction getDefaultPropfind() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t`;\n}\nfunction getFavoritesReport() {\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}\nfunction getRecentSearch(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}\nfunction getRootPath() {\n if (isPublicShare()) {\n return `/files/${getSharingToken()}`;\n }\n return `/files/${getCurrentUser()?.uid}`;\n}\nconst defaultRootPath = getRootPath();\nfunction getRemoteURL() {\n const url = generateRemoteUrl(\"dav\");\n if (isPublicShare()) {\n return url.replace(\"remote.php\", \"public.php\");\n }\n return url;\n}\nconst defaultRemoteURL = getRemoteURL();\nfunction getClient(remoteURL = defaultRemoteURL, 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}\nasync function getFavoriteNodes(options = {}) {\n const client = options.client ?? getClient();\n const path = options.path ?? \"/\";\n const davRoot = options.davRoot ?? defaultRootPath;\n const contentsResponse = await client.getDirectoryContents(`${davRoot}${path}`, {\n signal: options.signal,\n details: true,\n data: getFavoritesReport(),\n headers: {\n // see getClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: true\n });\n return contentsResponse.data.filter((node) => node.filename !== path).map((result) => resultToNode(result, davRoot));\n}\nfunction resultToNode(node, filesRoot = defaultRootPath, remoteURL = defaultRemoteURL) {\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 = parsePermissions(props?.permissions);\n const owner = String(props?.[\"owner-id\"] || userId);\n const id = props.fileid || 0;\n const mtime = new Date(Date.parse(node.lastmod));\n const crtime = new Date(Date.parse(props.creationdate));\n const nodeData = {\n id,\n source: `${remoteURL}${node.filename}`,\n mtime: !isNaN(mtime.getTime()) && mtime.getTime() !== 0 ? mtime : void 0,\n crtime: !isNaN(crtime.getTime()) && crtime.getTime() !== 0 ? crtime : void 0,\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}\nexport {\n defaultDavNamespaces,\n defaultDavProperties,\n defaultRemoteURL,\n defaultRootPath,\n getClient,\n getDavNameSpaces,\n getDavProperties,\n getDefaultPropfind,\n getFavoriteNodes,\n getFavoritesReport,\n getRecentSearch,\n getRemoteURL,\n getRootPath,\n parsePermissions,\n registerDavProperty,\n resultToNode\n};\n//# sourceMappingURL=dav.mjs.map\n"],"names":["isPublicShare","loadState","getSharingToken","parsePermissions","permString","permissions","Permission","defaultDavProperties","defaultDavNamespaces","registerDavProperty","prop","namespace","scopedGlobals","namespaces","search","logger","ns","getDavProperties","getDavNameSpaces","getDefaultPropfind","getFavoritesReport","getRecentSearch","lastModified","getCurrentUser","getRootPath","defaultRootPath","getRemoteURL","url","generateRemoteUrl","defaultRemoteURL","getClient","remoteURL","headers","client","createClient","setHeaders","token","onRequestTokenUpdate","getRequestToken","getPatcher","options","headers2","getFavoriteNodes","path","davRoot","node","result","resultToNode","filesRoot","userId","props","owner","id","mtime","crtime","nodeData","NodeStatus","File","Folder"],"mappings":"0QAWO,SAASA,GAAgB,CAE5B,OAAQC,EAAU,gBAAiB,WAAY,IAAI,GAC5C,SAAS,cAAc,2DAA2D,IAAM,IACnG,CAIO,SAASC,GAAkB,CAC9B,OAAQD,EAAU,gBAAiB,eAAgB,IAAI,GAChD,SAAS,cAAc,mCAAmC,GAAG,OAC7D,IACX,CCbA,SAASE,EAAiBC,EAAa,GAAI,CACzC,IAAIC,EAAcC,EAAW,KAC7B,OAAKF,IAGDA,EAAW,SAAS,GAAG,IACzBC,GAAeC,EAAW,MAExBF,EAAW,SAAS,GAAG,IACzBC,GAAeC,EAAW,OAExBF,EAAW,SAAS,IAAI,IAC1BC,GAAeC,EAAW,QAExBF,EAAW,SAAS,IAAI,IAC1BC,GAAeC,EAAW,QAExBF,EAAW,SAAS,GAAG,IACzBC,GAAeC,EAAW,QAExBF,EAAW,SAAS,GAAG,IACzBC,GAAeC,EAAW,QAErBD,CACT,CACA,MAAME,EAAuB,CAC3B,qBACA,mBACA,YACA,oBACA,iBACA,gBACA,0BACA,iBACA,iBACA,kBACA,gBACA,qBACA,cACA,YACA,wBACA,cACA,iBACA,SACF,EACMC,EAAuB,CAC3B,EAAG,OACH,GAAI,0BACJ,GAAI,yBACJ,IAAK,2CACP,EACA,SAASC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,OAAQE,EAAK,EAAII,EAAW,OAAS,OACrC,YAAAnD,EACA,MAAA8C,EACA,KAAMH,EACN,WAAY,CACV,GAAGH,EACH,GAAGK,EACH,WAAYA,IAAQ,aAAa,CACvC,CACA,EACE,cAAOK,EAAS,YAAY,MACrBV,EAAK,OAAS,OAAS,IAAIY,EAAKF,CAAQ,EAAI,IAAIG,EAAOH,CAAQ,CACxE","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/dist/dav-q7lxn7Ev.chunk.mjs.map.license b/dist/dav-CSaJxXR-.chunk.mjs.map.license similarity index 100% rename from dist/dav-q7lxn7Ev.chunk.mjs.map.license rename to dist/dav-CSaJxXR-.chunk.mjs.map.license diff --git a/dist/dav-settings-admin-example-content.mjs b/dist/dav-settings-admin-example-content.mjs index 79815caacaa8f..ab3df864615c9 100644 --- a/dist/dav-settings-admin-example-content.mjs +++ b/dist/dav-settings-admin-example-content.mjs @@ -1,2 +1,2 @@ -import{o as i,j as d,k as u,t as m,m as C,y as M,b as U,c as V,u as k,w as l,l as B,e as n,f as p,g as f,h as Z}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{t as c}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./index-COiwHfFG.chunk.mjs";import"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{N as H}from"./index-CO7ZwNPX.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./NcRichText-BO_4KtBA-DXDa2H1Y.chunk.mjs";import{N as S}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import{b as g}from"./index-DgEyzq8A.chunk.mjs";import{N as L}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import{D as T,s as j}from"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";import"./Plus-gXjhFOHV.chunk.mjs";/* empty css */import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import{c as x}from"./index-9ZBo3L67.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import"./index-CuPuSdF1.chunk.mjs";import{N as q}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import{d as I,a as y}from"./index-DCJOwzzz.chunk.mjs";import{a as w,l as D}from"./index-C3KLQ_oe.chunk.mjs";import{l as _}from"./logger-B8T3lDer.chunk.mjs";import"./index-sH3U_332.chunk.mjs";const G='',J={name:"AccountIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},K=["aria-hidden","aria-label"],P=["fill","width","height"],Q={d:"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z"},W={key:0};function X(a,e,t,s,o,r){return i(),d("span",M(a.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon account-icon",role:"img",onClick:e[0]||(e[0]=v=>a.$emit("click",v))}),[(i(),d("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[u("path",Q,[t.title?(i(),d("title",W,m(t.title),1)):C("",!0)])],8,P))],16,K)}const Y=w(J,[["render",X]]),ee={name:"RestoreIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},te=["aria-hidden","aria-label"],ae=["fill","width","height"],oe={d:"M13,3A9,9 0 0,0 4,12H1L4.89,15.89L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3Z"},le={key:0};function ie(a,e,t,s,o,r){return i(),d("span",M(a.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon restore-icon",role:"img",onClick:e[0]||(e[0]=v=>a.$emit("click",v))}),[(i(),d("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[u("path",oe,[t.title?(i(),d("title",le,m(t.title),1)):C("",!0)])],8,ae))],16,te)}const R=w(ee,[["render",ie]]),ne={name:"TrayArrowUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},se=["aria-hidden","aria-label"],re=["fill","width","height"],ce={d:"M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 2L6.46 7.46L7.88 8.88L11 5.75V15H13V5.75L16.13 8.88L17.55 7.45L12 2Z"},de={key:0};function pe(a,e,t,s,o,r){return i(),d("span",M(a.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon tray-arrow-up-icon",role:"img",onClick:e[0]||(e[0]=v=>a.$emit("click",v))}),[(i(),d("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[u("path",ce,[t.title?(i(),d("title",de,m(t.title),1)):C("",!0)])],8,re))],16,se)}const $=w(ne,[["render",pe]]),me={class:"download-button"},ue={class:"download-button__label"},ve=U({__name:"ExampleContentDownloadButton",props:{href:{}},setup(a){return(e,t)=>(i(),V(k(S),{variant:"tertiary",href:a.href},{icon:l(()=>[B(e.$slots,"icon",{},void 0,!0)]),default:l(()=>[u("div",me,[u("span",ue,[B(e.$slots,"default",{},void 0,!0)]),n(T,{class:"download-button__icon",size:20})])]),_:3},8,["href"]))}}),O=w(ve,[["__scopeId","data-v-be40807a"]]),he=D("dav","enableDefaultContact",!1),fe=D("dav","hasCustomDefaultContact",!1),ge={name:"ExampleContactSettings",components:{NcDialog:H,NcButton:S,NcCheckboxRadioSwitch:L,IconUpload:$,IconRestore:R,IconAccount:Y,ExampleContentDownloadButton:O},setup(){return{t:c}},data(){return{enableDefaultContact:he,hasCustomDefaultContact:fe,isModalOpen:!1,loading:!1,buttons:[{label:c("dav","Cancel"),icon:G,callback:()=>{this.isModalOpen=!1}},{label:c("dav","Import"),icon:j,variant:"primary",callback:()=>{this.clickImportInput()}}]}},computed:{downloadUrl(){return g("/apps/dav/api/defaultcontact/contact")}},methods:{updateEnableDefaultContact(){x.put(g("apps/dav/api/defaultcontact/config"),{allow:!this.enableDefaultContact}).then(()=>{this.enableDefaultContact=!this.enableDefaultContact}).catch(()=>{y(c("dav","Error while saving settings"))})},toggleModal(){this.isModalOpen=!this.isModalOpen},clickImportInput(){this.$refs.exampleContactImportInput.click()},resetContact(){this.loading=!0,x.put(g("/apps/dav/api/defaultcontact/contact")).then(()=>{this.hasCustomDefaultContact=!1,I(c("dav","Contact reset successfully"))}).catch(a=>{_.error("Error importing contact:",{error:a}),y(c("dav","Error while resetting contact"))}).finally(()=>{this.loading=!1})},processFile(a){this.loading=!0;const e=a.target.files[0],t=new FileReader;t.onload=async()=>{this.isModalOpen=!1;try{await x.put(g("/apps/dav/api/defaultcontact/contact"),{contactData:t.result}),this.hasCustomDefaultContact=!0,I(c("dav","Contact imported successfully"))}catch(s){_.error("Error importing contact:",{error:s}),y(c("dav","Error while importing contact"))}finally{this.loading=!1,a.target.value=""}},t.readAsText(e)}}},Ce={class:"example-contact-settings"},we={key:0,class:"example-contact-settings__buttons"},be=["disabled"];function xe(a,e,t,s,o,r){const v=p("NcCheckboxRadioSwitch"),N=p("IconAccount"),A=p("ExampleContentDownloadButton"),E=p("IconUpload"),b=p("NcButton"),z=p("IconRestore"),F=p("NcDialog");return i(),d("div",Ce,[n(v,{modelValue:o.enableDefaultContact,type:"switch","onUpdate:modelValue":r.updateEnableDefaultContact},{default:l(()=>[f(m(s.t("dav","Add example contact to user's address book when they first log in")),1)]),_:1},8,["modelValue","onUpdate:modelValue"]),o.enableDefaultContact?(i(),d("div",we,[n(A,{href:r.downloadUrl},{icon:l(()=>[n(N,{size:20})]),default:l(()=>[e[2]||(e[2]=f(" example_contact.vcf ",-1))]),_:1},8,["href"]),n(b,{variant:"secondary",onClick:r.toggleModal},{icon:l(()=>[n(E,{size:20})]),default:l(()=>[f(" "+m(s.t("dav","Import contact")),1)]),_:1},8,["onClick"]),o.hasCustomDefaultContact?(i(),V(b,{key:0,variant:"tertiary",onClick:r.resetContact},{icon:l(()=>[n(z,{size:20})]),default:l(()=>[f(" "+m(s.t("dav","Reset to default")),1)]),_:1},8,["onClick"])):C("",!0)])):C("",!0),n(F,{open:o.isModalOpen,"onUpdate:open":e[0]||(e[0]=h=>o.isModalOpen=h),name:s.t("dav","Import contacts"),buttons:o.buttons},{default:l(()=>[u("div",null,[u("p",null,m(s.t("dav","Importing a new .vcf file will delete the existing default contact and replace it with the new one. Do you want to continue?")),1)])]),_:1},8,["open","name","buttons"]),u("input",{id:"example-contact-import",ref:"exampleContactImportInput",disabled:o.loading,type:"file",accept:".vcf",class:"hidden-visually",onChange:e[1]||(e[1]=(...h)=>r.processFile&&r.processFile(...h))},null,40,be)])}const ye=w(ge,[["render",xe],["__scopeId","data-v-db8b0002"]]),_e={name:"CalendarBlankIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ee=["aria-hidden","aria-label"],ke=["fill","width","height"],Ie={d:"M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1"},De={key:0};function Me(a,e,t,s,o,r){return i(),d("span",M(a.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon calendar-blank-icon",role:"img",onClick:e[0]||(e[0]=v=>a.$emit("click",v))}),[(i(),d("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[u("path",Ie,[t.title?(i(),d("title",De,m(t.title),1)):C("",!0)])],8,ke))],16,Ee)}const Ve=w(_e,[["render",Me]]);async function Ne(a){const e=g("/apps/dav/api/exampleEvent/enable");await x.post(e,{enable:a})}async function Ae(a){const e=g("/apps/dav/api/exampleEvent/event");await x.post(e,{ics:a})}async function ze(){const a=g("/apps/dav/api/exampleEvent/event");await x.delete(a)}const Fe={name:"ExampleEventSettings",components:{NcButton:S,NcCheckboxRadioSwitch:L,NcDialog:H,IconCalendarBlank:Ve,IconUpload:$,IconRestore:R,ExampleContentDownloadButton:O},setup(){return{t:c}},data(){return{createExampleEvent:D("dav","create_example_event",!1),hasCustomEvent:D("dav","has_custom_example_event",!1),showImportModal:!1,uploading:!1,deleting:!1,savingConfig:!1,selectedFile:void 0}},computed:{downloadUrl(){return g("/apps/dav/api/exampleEvent/event")}},methods:{selectFile(){this.selectedFile=this.$refs["event-file"]?.files[0]},async updateCreateExampleEvent(){this.savingConfig=!0;const a=!this.createExampleEvent;try{await Ne(a)}catch(e){y(c("dav","Failed to save example event creation setting")),_.error("Failed to save example event creation setting",{error:e,enable:a})}finally{this.savingConfig=!1}this.createExampleEvent=a},uploadCustomEvent(){if(!this.selectedFile)return;this.uploading=!0;const a=new FileReader;a.addEventListener("load",async()=>{const e=a.result;try{await Ae(e)}catch(t){y(c("dav","Failed to upload the example event")),_.error("Failed to upload example ICS",{error:t,ics:e});return}finally{this.uploading=!1}I(c("dav","Custom example event was saved successfully")),this.showImportModal=!1,this.hasCustomEvent=!0}),a.readAsText(this.selectedFile)},async deleteCustomEvent(){this.deleting=!0;try{await ze()}catch(a){y(c("dav","Failed to delete the custom example event")),_.error("Failed to delete the custom example event",{error:a});return}finally{this.deleting=!1}I(c("dav","Custom example event was deleted successfully")),this.hasCustomEvent=!1}}},Se={class:"example-event-settings"},Be={key:0,class:"example-event-settings__buttons"},Ue={class:"import-event-modal"},He=["disabled"],Le={class:"import-event-modal__buttons"};function Re(a,e,t,s,o,r){const v=p("NcCheckboxRadioSwitch"),N=p("IconCalendarBlank"),A=p("ExampleContentDownloadButton"),E=p("IconUpload"),b=p("NcButton"),z=p("IconRestore"),F=p("NcDialog");return i(),d("div",Se,[n(v,{modelValue:o.createExampleEvent,disabled:o.savingConfig,type:"switch","onUpdate:modelValue":r.updateCreateExampleEvent},{default:l(()=>[f(m(s.t("dav","Add example event to user's calendar when they first log in")),1)]),_:1},8,["modelValue","disabled","onUpdate:modelValue"]),o.createExampleEvent?(i(),d("div",Be,[n(A,{href:r.downloadUrl},{icon:l(()=>[n(N,{size:20})]),default:l(()=>[e[4]||(e[4]=f(" example_event.ics ",-1))]),_:1},8,["href"]),n(b,{variant:"secondary",onClick:e[0]||(e[0]=h=>o.showImportModal=!0)},{icon:l(()=>[n(E,{size:20})]),default:l(()=>[f(" "+m(s.t("dav","Import calendar event")),1)]),_:1}),o.hasCustomEvent?(i(),V(b,{key:0,variant:"tertiary",disabled:o.deleting,onClick:r.deleteCustomEvent},{icon:l(()=>[n(z,{size:20})]),default:l(()=>[f(" "+m(s.t("dav","Reset to default")),1)]),_:1},8,["disabled","onClick"])):C("",!0)])):C("",!0),n(F,{open:o.showImportModal,"onUpdate:open":e[3]||(e[3]=h=>o.showImportModal=h),name:s.t("dav","Import calendar event")},{default:l(()=>[u("div",Ue,[u("p",null,m(s.t("dav","Uploading a new event will overwrite the existing one.")),1),u("input",{ref:"event-file",disabled:o.uploading,type:"file",accept:".ics,text/calendar",class:"import-event-modal__file-picker",onChange:e[1]||(e[1]=(...h)=>r.selectFile&&r.selectFile(...h))},null,40,He),u("div",Le,[n(b,{disabled:o.uploading||!o.selectedFile,variant:"primary",onClick:e[2]||(e[2]=h=>r.uploadCustomEvent())},{icon:l(()=>[n(E,{size:20})]),default:l(()=>[f(" "+m(s.t("dav","Upload event")),1)]),_:1},8,["disabled"])])])]),_:1},8,["open","name"])])}const $e=w(Fe,[["render",Re],["__scopeId","data-v-88fee128"]]),Oe=U({__name:"ExampleContentSettingsSection",setup(a){return(e,t)=>(i(),V(k(q),{id:"example-content",name:k(c)("dav","Example content"),description:k(c)("dav","Example content serves to showcase the features of Nextcloud. Default content is shipped with Nextcloud, and can be replaced by custom content.")},{default:l(()=>[n(ye),n($e)]),_:1},8,["name","description"]))}}),Ze=Z(Oe);Ze.mount("#settings-example-content"); +import{o as i,j as d,k as u,t as m,m as C,y as M,b as U,c as V,u as k,w as l,l as B,e as n,f as p,g as f,h as Z}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{t as c}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./index-COiwHfFG.chunk.mjs";import"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{N as H}from"./index-CO7ZwNPX.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./NcRichText-BO_4KtBA-DXDa2H1Y.chunk.mjs";import{N as S}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import{b as g}from"./index-DgEyzq8A.chunk.mjs";import{N as L}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import{D as T,s as j}from"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";import"./Plus-gXjhFOHV.chunk.mjs";/* empty css */import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import{c as x}from"./index-9ZBo3L67.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import"./index-CuPuSdF1.chunk.mjs";import{N as q}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import{d as I,a as y}from"./index-WQvok30H.chunk.mjs";import{a as w,l as D}from"./index-C3KLQ_oe.chunk.mjs";import{l as _}from"./logger-B8T3lDer.chunk.mjs";import"./index-sH3U_332.chunk.mjs";const G='',J={name:"AccountIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},K=["aria-hidden","aria-label"],P=["fill","width","height"],Q={d:"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z"},W={key:0};function X(a,e,t,s,o,r){return i(),d("span",M(a.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon account-icon",role:"img",onClick:e[0]||(e[0]=v=>a.$emit("click",v))}),[(i(),d("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[u("path",Q,[t.title?(i(),d("title",W,m(t.title),1)):C("",!0)])],8,P))],16,K)}const Y=w(J,[["render",X]]),ee={name:"RestoreIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},te=["aria-hidden","aria-label"],ae=["fill","width","height"],oe={d:"M13,3A9,9 0 0,0 4,12H1L4.89,15.89L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3Z"},le={key:0};function ie(a,e,t,s,o,r){return i(),d("span",M(a.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon restore-icon",role:"img",onClick:e[0]||(e[0]=v=>a.$emit("click",v))}),[(i(),d("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[u("path",oe,[t.title?(i(),d("title",le,m(t.title),1)):C("",!0)])],8,ae))],16,te)}const R=w(ee,[["render",ie]]),ne={name:"TrayArrowUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},se=["aria-hidden","aria-label"],re=["fill","width","height"],ce={d:"M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 2L6.46 7.46L7.88 8.88L11 5.75V15H13V5.75L16.13 8.88L17.55 7.45L12 2Z"},de={key:0};function pe(a,e,t,s,o,r){return i(),d("span",M(a.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon tray-arrow-up-icon",role:"img",onClick:e[0]||(e[0]=v=>a.$emit("click",v))}),[(i(),d("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[u("path",ce,[t.title?(i(),d("title",de,m(t.title),1)):C("",!0)])],8,re))],16,se)}const $=w(ne,[["render",pe]]),me={class:"download-button"},ue={class:"download-button__label"},ve=U({__name:"ExampleContentDownloadButton",props:{href:{}},setup(a){return(e,t)=>(i(),V(k(S),{variant:"tertiary",href:a.href},{icon:l(()=>[B(e.$slots,"icon",{},void 0,!0)]),default:l(()=>[u("div",me,[u("span",ue,[B(e.$slots,"default",{},void 0,!0)]),n(T,{class:"download-button__icon",size:20})])]),_:3},8,["href"]))}}),O=w(ve,[["__scopeId","data-v-be40807a"]]),he=D("dav","enableDefaultContact",!1),fe=D("dav","hasCustomDefaultContact",!1),ge={name:"ExampleContactSettings",components:{NcDialog:H,NcButton:S,NcCheckboxRadioSwitch:L,IconUpload:$,IconRestore:R,IconAccount:Y,ExampleContentDownloadButton:O},setup(){return{t:c}},data(){return{enableDefaultContact:he,hasCustomDefaultContact:fe,isModalOpen:!1,loading:!1,buttons:[{label:c("dav","Cancel"),icon:G,callback:()=>{this.isModalOpen=!1}},{label:c("dav","Import"),icon:j,variant:"primary",callback:()=>{this.clickImportInput()}}]}},computed:{downloadUrl(){return g("/apps/dav/api/defaultcontact/contact")}},methods:{updateEnableDefaultContact(){x.put(g("apps/dav/api/defaultcontact/config"),{allow:!this.enableDefaultContact}).then(()=>{this.enableDefaultContact=!this.enableDefaultContact}).catch(()=>{y(c("dav","Error while saving settings"))})},toggleModal(){this.isModalOpen=!this.isModalOpen},clickImportInput(){this.$refs.exampleContactImportInput.click()},resetContact(){this.loading=!0,x.put(g("/apps/dav/api/defaultcontact/contact")).then(()=>{this.hasCustomDefaultContact=!1,I(c("dav","Contact reset successfully"))}).catch(a=>{_.error("Error importing contact:",{error:a}),y(c("dav","Error while resetting contact"))}).finally(()=>{this.loading=!1})},processFile(a){this.loading=!0;const e=a.target.files[0],t=new FileReader;t.onload=async()=>{this.isModalOpen=!1;try{await x.put(g("/apps/dav/api/defaultcontact/contact"),{contactData:t.result}),this.hasCustomDefaultContact=!0,I(c("dav","Contact imported successfully"))}catch(s){_.error("Error importing contact:",{error:s}),y(c("dav","Error while importing contact"))}finally{this.loading=!1,a.target.value=""}},t.readAsText(e)}}},Ce={class:"example-contact-settings"},we={key:0,class:"example-contact-settings__buttons"},be=["disabled"];function xe(a,e,t,s,o,r){const v=p("NcCheckboxRadioSwitch"),N=p("IconAccount"),A=p("ExampleContentDownloadButton"),E=p("IconUpload"),b=p("NcButton"),z=p("IconRestore"),F=p("NcDialog");return i(),d("div",Ce,[n(v,{modelValue:o.enableDefaultContact,type:"switch","onUpdate:modelValue":r.updateEnableDefaultContact},{default:l(()=>[f(m(s.t("dav","Add example contact to user's address book when they first log in")),1)]),_:1},8,["modelValue","onUpdate:modelValue"]),o.enableDefaultContact?(i(),d("div",we,[n(A,{href:r.downloadUrl},{icon:l(()=>[n(N,{size:20})]),default:l(()=>[e[2]||(e[2]=f(" example_contact.vcf ",-1))]),_:1},8,["href"]),n(b,{variant:"secondary",onClick:r.toggleModal},{icon:l(()=>[n(E,{size:20})]),default:l(()=>[f(" "+m(s.t("dav","Import contact")),1)]),_:1},8,["onClick"]),o.hasCustomDefaultContact?(i(),V(b,{key:0,variant:"tertiary",onClick:r.resetContact},{icon:l(()=>[n(z,{size:20})]),default:l(()=>[f(" "+m(s.t("dav","Reset to default")),1)]),_:1},8,["onClick"])):C("",!0)])):C("",!0),n(F,{open:o.isModalOpen,"onUpdate:open":e[0]||(e[0]=h=>o.isModalOpen=h),name:s.t("dav","Import contacts"),buttons:o.buttons},{default:l(()=>[u("div",null,[u("p",null,m(s.t("dav","Importing a new .vcf file will delete the existing default contact and replace it with the new one. Do you want to continue?")),1)])]),_:1},8,["open","name","buttons"]),u("input",{id:"example-contact-import",ref:"exampleContactImportInput",disabled:o.loading,type:"file",accept:".vcf",class:"hidden-visually",onChange:e[1]||(e[1]=(...h)=>r.processFile&&r.processFile(...h))},null,40,be)])}const ye=w(ge,[["render",xe],["__scopeId","data-v-db8b0002"]]),_e={name:"CalendarBlankIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ee=["aria-hidden","aria-label"],ke=["fill","width","height"],Ie={d:"M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1"},De={key:0};function Me(a,e,t,s,o,r){return i(),d("span",M(a.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon calendar-blank-icon",role:"img",onClick:e[0]||(e[0]=v=>a.$emit("click",v))}),[(i(),d("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[u("path",Ie,[t.title?(i(),d("title",De,m(t.title),1)):C("",!0)])],8,ke))],16,Ee)}const Ve=w(_e,[["render",Me]]);async function Ne(a){const e=g("/apps/dav/api/exampleEvent/enable");await x.post(e,{enable:a})}async function Ae(a){const e=g("/apps/dav/api/exampleEvent/event");await x.post(e,{ics:a})}async function ze(){const a=g("/apps/dav/api/exampleEvent/event");await x.delete(a)}const Fe={name:"ExampleEventSettings",components:{NcButton:S,NcCheckboxRadioSwitch:L,NcDialog:H,IconCalendarBlank:Ve,IconUpload:$,IconRestore:R,ExampleContentDownloadButton:O},setup(){return{t:c}},data(){return{createExampleEvent:D("dav","create_example_event",!1),hasCustomEvent:D("dav","has_custom_example_event",!1),showImportModal:!1,uploading:!1,deleting:!1,savingConfig:!1,selectedFile:void 0}},computed:{downloadUrl(){return g("/apps/dav/api/exampleEvent/event")}},methods:{selectFile(){this.selectedFile=this.$refs["event-file"]?.files[0]},async updateCreateExampleEvent(){this.savingConfig=!0;const a=!this.createExampleEvent;try{await Ne(a)}catch(e){y(c("dav","Failed to save example event creation setting")),_.error("Failed to save example event creation setting",{error:e,enable:a})}finally{this.savingConfig=!1}this.createExampleEvent=a},uploadCustomEvent(){if(!this.selectedFile)return;this.uploading=!0;const a=new FileReader;a.addEventListener("load",async()=>{const e=a.result;try{await Ae(e)}catch(t){y(c("dav","Failed to upload the example event")),_.error("Failed to upload example ICS",{error:t,ics:e});return}finally{this.uploading=!1}I(c("dav","Custom example event was saved successfully")),this.showImportModal=!1,this.hasCustomEvent=!0}),a.readAsText(this.selectedFile)},async deleteCustomEvent(){this.deleting=!0;try{await ze()}catch(a){y(c("dav","Failed to delete the custom example event")),_.error("Failed to delete the custom example event",{error:a});return}finally{this.deleting=!1}I(c("dav","Custom example event was deleted successfully")),this.hasCustomEvent=!1}}},Se={class:"example-event-settings"},Be={key:0,class:"example-event-settings__buttons"},Ue={class:"import-event-modal"},He=["disabled"],Le={class:"import-event-modal__buttons"};function Re(a,e,t,s,o,r){const v=p("NcCheckboxRadioSwitch"),N=p("IconCalendarBlank"),A=p("ExampleContentDownloadButton"),E=p("IconUpload"),b=p("NcButton"),z=p("IconRestore"),F=p("NcDialog");return i(),d("div",Se,[n(v,{modelValue:o.createExampleEvent,disabled:o.savingConfig,type:"switch","onUpdate:modelValue":r.updateCreateExampleEvent},{default:l(()=>[f(m(s.t("dav","Add example event to user's calendar when they first log in")),1)]),_:1},8,["modelValue","disabled","onUpdate:modelValue"]),o.createExampleEvent?(i(),d("div",Be,[n(A,{href:r.downloadUrl},{icon:l(()=>[n(N,{size:20})]),default:l(()=>[e[4]||(e[4]=f(" example_event.ics ",-1))]),_:1},8,["href"]),n(b,{variant:"secondary",onClick:e[0]||(e[0]=h=>o.showImportModal=!0)},{icon:l(()=>[n(E,{size:20})]),default:l(()=>[f(" "+m(s.t("dav","Import calendar event")),1)]),_:1}),o.hasCustomEvent?(i(),V(b,{key:0,variant:"tertiary",disabled:o.deleting,onClick:r.deleteCustomEvent},{icon:l(()=>[n(z,{size:20})]),default:l(()=>[f(" "+m(s.t("dav","Reset to default")),1)]),_:1},8,["disabled","onClick"])):C("",!0)])):C("",!0),n(F,{open:o.showImportModal,"onUpdate:open":e[3]||(e[3]=h=>o.showImportModal=h),name:s.t("dav","Import calendar event")},{default:l(()=>[u("div",Ue,[u("p",null,m(s.t("dav","Uploading a new event will overwrite the existing one.")),1),u("input",{ref:"event-file",disabled:o.uploading,type:"file",accept:".ics,text/calendar",class:"import-event-modal__file-picker",onChange:e[1]||(e[1]=(...h)=>r.selectFile&&r.selectFile(...h))},null,40,He),u("div",Le,[n(b,{disabled:o.uploading||!o.selectedFile,variant:"primary",onClick:e[2]||(e[2]=h=>r.uploadCustomEvent())},{icon:l(()=>[n(E,{size:20})]),default:l(()=>[f(" "+m(s.t("dav","Upload event")),1)]),_:1},8,["disabled"])])])]),_:1},8,["open","name"])])}const $e=w(Fe,[["render",Re],["__scopeId","data-v-88fee128"]]),Oe=U({__name:"ExampleContentSettingsSection",setup(a){return(e,t)=>(i(),V(k(q),{id:"example-content",name:k(c)("dav","Example content"),description:k(c)("dav","Example content serves to showcase the features of Nextcloud. Default content is shipped with Nextcloud, and can be replaced by custom content.")},{default:l(()=>[n(ye),n($e)]),_:1},8,["name","description"]))}}),Ze=Z(Oe);Ze.mount("#settings-example-content"); //# sourceMappingURL=dav-settings-admin-example-content.mjs.map diff --git a/dist/dav-settings-personal-availability.mjs b/dist/dav-settings-personal-availability.mjs index 9737f5f4b2616..eea550fa504fa 100644 --- a/dist/dav-settings-personal-availability.mjs +++ b/dist/dav-settings-personal-availability.mjs @@ -1,12 +1,12 @@ -import{f as G,o as B,j as H,k as Q,e as v,n as dt,t as et,w as st,g as vt,C as Ae,F as Ft,A as Gt,c as Pt,m as de,b as ce,r as St,U as ge,u as _,h as De}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{a as he,l as jt,g as _e}from"./index-C3KLQ_oe.chunk.mjs";import{t as D}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{N as Kt}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import{d as Ee,c as mt,a as Lt,g as be,h as Ue,o as Ce,e as Ye}from"./index-DgEyzq8A.chunk.mjs";import{c as ft}from"./index-9ZBo3L67.chunk.mjs";import{d as zt,a as Ot}from"./index-DCJOwzzz.chunk.mjs";import{S as ve}from"./ShareType-suoNfd7y.chunk.mjs";import{N as Ht}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{N as me}from"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import{N as Oe,a as we}from"./index-COiwHfFG.chunk.mjs";import{_ as Me}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{l as W}from"./logger-B8T3lDer.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{g as Ne}from"./index-CO7ZwNPX.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./NcRichText-BO_4KtBA-DXDa2H1Y.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import{N as xe}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";import{P as Ie}from"./Plus-gXjhFOHV.chunk.mjs";/* empty css */import{D as ke}from"./TrashCanOutline-BZ98FFoG.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./index-CuPuSdF1.chunk.mjs";import"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import{z as Be,_ as Pe}from"./index-Ds0AsAbv.chunk.mjs";import"./index-sH3U_332.chunk.mjs";function qt(a){const t=a.getFullYear(),e=(a.getMonth()+1).toString().padStart(2,"0"),s=a.getDate().toString().padStart(2,"0");return`${t}-${e}-${s}`}const Le="_absenceForm_1i2bj_2",ze="_absenceForm__pickerContainer_1i2bj_8",Ve="_absenceForm__picker_1i2bj_8",je="_absenceForm__longMessage_1i2bj_22",He="_absenceForm__longMessageContainer_1i2bj_26",Re="_absenceForm__actions_1i2bj_33",We={absenceForm:Le,absenceForm__pickerContainer:ze,absenceForm__picker:Ve,absenceForm__longMessage:je,absenceForm__longMessageContainer:He,absenceForm__actions:Re};function Zt(a){const t=a.getTimezoneOffset()*60*1e3;return new Date(a.getTime()+t)}const Fe={name:"AbsenceForm",components:{NcButton:Ht,NcTextField:Me,NcTextArea:we,NcDateTimePickerNative:me,NcSelectUsers:Oe},setup(){return{t:D}},data(){const{firstDay:a,lastDay:t,status:e,message:s,replacementUserId:r,replacementUserDisplayName:i}=jt("dav","absence",{}),o=a?new Date(a):new Date,n=Zt(o),l=t?Zt(new Date(t)):null;return{loading:!1,status:e??"",message:s??"",firstDay:n,lastDay:l,replacementUserId:r,replacementUser:r?{user:r,displayName:i}:null,searchLoading:!1,options:[]}},computed:{valid(){const a=new Date(this.firstDay?.getTime()),t=new Date(this.lastDay?.getTime());return a?.setHours(0,0,0,0),t?.setHours(0,0,0,0),!!this.firstDay&&!!this.lastDay&&!!this.status&&!!this.message&&t>=a}},methods:{resetForm(){this.status="",this.message="",this.firstDay=new Date,this.lastDay=null},formatForMultiselect(a){return{user:a.uuid||a.value.shareWith,displayName:a.name||a.label,subtitle:a.dsc|""}},async asyncFind(a){this.searchLoading=!0,await this.debounceGetSuggestions(a.trim())},async getSuggestions(a){const t=[ve.User];let e;try{e=await ft.get(mt("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"file",search:a,shareType:t}})}catch(d){W.error("Error fetching suggestions",{error:d});return}const s=e.data.ocs.data,r=e.data.ocs.data.exact;s.exact=[];const i=r.users,o=s.users;W.info("AbsenceForm raw suggestions",{rawExactSuggestions:i,rawSuggestions:o});const n=i.map(d=>this.formatForMultiselect(d)),l=o.map(d=>this.formatForMultiselect(d)),u=n.concat(l),c=u.reduce((d,m)=>(m.displayName&&(d[m.displayName]||(d[m.displayName]=0),d[m.displayName]++),d),{});this.options=u.map(d=>c[d.displayName]>1&&!d.desc?{...d,desc:d.shareWithDisplayNameUnique}:d),this.searchLoading=!1,W.info("AbsenseForm suggestions",{options:this.options})},debounceGetSuggestions:Ee(function(...a){this.getSuggestions(...a)},300),async saveForm(){if(this.valid){this.loading=!0;try{await ft.post(mt("/apps/dav/api/v1/outOfOffice/{userId}",{userId:Lt().uid}),{firstDay:qt(this.firstDay),lastDay:qt(this.lastDay),status:this.status,message:this.message,replacementUserId:this.replacementUser?.user??null}),zt(D("dav","Absence saved"))}catch(a){Ot(D("dav","Failed to save your absence settings")),W.error("Could not save absence",{error:a})}finally{this.loading=!1}}},async clearAbsence(){this.loading=!0;try{await ft.delete(mt("/apps/dav/api/v1/outOfOffice/{userId}",{userId:Lt().uid})),this.resetForm(),zt(D("dav","Absence cleared"))}catch(a){Ot(D("dav","Failed to clear your absence settings")),W.error("Could not clear absence",{error:a})}finally{this.loading=!1}}}},Ge={for:"replacement-search-input"};function Ke(a,t,e,s,r,i){const o=G("NcDateTimePickerNative"),n=G("NcSelectUsers"),l=G("NcTextField"),u=G("NcTextArea"),c=G("NcButton");return B(),H("form",{class:dt(a.$style.absenceForm),onSubmit:t[5]||(t[5]=Ae((...d)=>i.saveForm&&i.saveForm(...d),["prevent"]))},[Q("div",{class:dt(a.$style.absenceForm__pickerContainer)},[v(o,{id:"absence-first-day",modelValue:r.firstDay,"onUpdate:modelValue":t[0]||(t[0]=d=>r.firstDay=d),class:dt(a.$style.absenceForm__picker),label:s.t("dav","First day"),required:""},null,8,["modelValue","class","label"]),v(o,{id:"absence-last-day",modelValue:r.lastDay,"onUpdate:modelValue":t[1]||(t[1]=d=>r.lastDay=d),class:dt(a.$style.absenceForm__picker),label:s.t("dav","Last day (inclusive)"),required:""},null,8,["modelValue","class","label"])],2),Q("label",Ge,et(s.t("dav","Out of office replacement (optional)")),1),v(n,{modelValue:r.replacementUser,"onUpdate:modelValue":t[2]||(t[2]=d=>r.replacementUser=d),inputId:"replacement-search-input",loading:r.searchLoading,placeholder:s.t("dav","Name of the replacement"),options:r.options,onSearch:i.asyncFind},null,8,["modelValue","loading","placeholder","options","onSearch"]),v(l,{modelValue:r.status,"onUpdate:modelValue":t[3]||(t[3]=d=>r.status=d),label:s.t("dav","Short absence status"),required:!0},null,8,["modelValue","label"]),Q("div",{class:dt(a.$style.absenceForm__longMessageContainer)},[v(u,{modelValue:r.message,"onUpdate:modelValue":t[4]||(t[4]=d=>r.message=d),inputClass:a.$style.absenceForm__longMessage,label:s.t("dav","Long absence Message"),required:"",resize:"none",rows:"6"},null,8,["modelValue","inputClass","label"])],2),Q("div",{class:dt(a.$style.absenceForm__actions)},[v(c,{disabled:r.loading||!i.valid,variant:"primary",type:"submit"},{default:st(()=>[vt(et(s.t("dav","Save")),1)]),_:1},8,["disabled"]),v(c,{disabled:r.loading||!i.valid,variant:"error",onClick:i.clearAbsence},{default:st(()=>[vt(et(s.t("dav","Disable absence")),1)]),_:1},8,["disabled","onClick"])],2)],34)}const qe={$style:We},Ze=he(Fe,[["render",Ke],["__cssModules",qe]]);var rt={},ct={},Jt;function Je(){return Jt||(Jt=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.zonesMap=ct.defaultStart=void 0,ct.defaultStart="19700101T000000",ct.zonesMap=new Map([["Africa/Abidjan",{s:{f:"+0000",n:"GMT"}}],["Africa/Accra",{s:{f:"+0000",n:"GMT"}}],["Africa/Addis_Ababa",{s:{f:"+0300",n:"EAT"}}],["Africa/Algiers",{s:{f:"+0100",n:"CET"}}],["Africa/Asmara",{s:{f:"+0300",n:"EAT"}}],["Africa/Bamako",{s:{f:"+0000",n:"GMT"}}],["Africa/Bangui",{s:{f:"+0100",n:"WAT"}}],["Africa/Banjul",{s:{f:"+0000",n:"GMT"}}],["Africa/Bissau",{s:{f:"+0000",n:"GMT"}}],["Africa/Blantyre",{s:{f:"+0200",n:"CAT"}}],["Africa/Brazzaville",{s:{f:"+0100",n:"WAT"}}],["Africa/Bujumbura",{s:{f:"+0200",n:"CAT"}}],["Africa/Cairo",{s:{f:"+0200",n:"EET"}}],["Africa/Casablanca",{s:{f:"+0100",n:"+01"}}],["Africa/Ceuta",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Africa/Conakry",{s:{f:"+0000",n:"GMT"}}],["Africa/Dakar",{s:{f:"+0000",n:"GMT"}}],["Africa/Dar_es_Salaam",{s:{f:"+0300",n:"EAT"}}],["Africa/Djibouti",{s:{f:"+0300",n:"EAT"}}],["Africa/Douala",{s:{f:"+0100",n:"WAT"}}],["Africa/El_Aaiun",{s:{f:"+0100",n:"+01"}}],["Africa/Freetown",{s:{f:"+0000",n:"GMT"}}],["Africa/Gaborone",{s:{f:"+0200",n:"CAT"}}],["Africa/Harare",{s:{f:"+0200",n:"CAT"}}],["Africa/Johannesburg",{s:{f:"+0200",n:"SAST"}}],["Africa/Juba",{s:{f:"+0300",n:"EAT"}}],["Africa/Kampala",{s:{f:"+0300",n:"EAT"}}],["Africa/Khartoum",{s:{f:"+0200",n:"CAT"}}],["Africa/Kigali",{s:{f:"+0200",n:"CAT"}}],["Africa/Kinshasa",{s:{f:"+0100",n:"WAT"}}],["Africa/Lagos",{s:{f:"+0100",n:"WAT"}}],["Africa/Libreville",{s:{f:"+0100",n:"WAT"}}],["Africa/Lome",{s:{f:"+0000",n:"GMT"}}],["Africa/Luanda",{s:{f:"+0100",n:"WAT"}}],["Africa/Lubumbashi",{s:{f:"+0200",n:"CAT"}}],["Africa/Lusaka",{s:{f:"+0200",n:"CAT"}}],["Africa/Malabo",{s:{f:"+0100",n:"WAT"}}],["Africa/Maputo",{s:{f:"+0200",n:"CAT"}}],["Africa/Maseru",{s:{f:"+0200",n:"SAST"}}],["Africa/Mbabane",{s:{f:"+0200",n:"SAST"}}],["Africa/Mogadishu",{s:{f:"+0300",n:"EAT"}}],["Africa/Monrovia",{s:{f:"+0000",n:"GMT"}}],["Africa/Nairobi",{s:{f:"+0300",n:"EAT"}}],["Africa/Ndjamena",{s:{f:"+0100",n:"WAT"}}],["Africa/Niamey",{s:{f:"+0100",n:"WAT"}}],["Africa/Nouakchott",{s:{f:"+0000",n:"GMT"}}],["Africa/Ouagadougou",{s:{f:"+0000",n:"GMT"}}],["Africa/Porto-Novo",{s:{f:"+0100",n:"WAT"}}],["Africa/Sao_Tome",{s:{f:"+0100",n:"WAT"}}],["Africa/Tripoli",{s:{f:"+0200",n:"EET"}}],["Africa/Tunis",{s:{f:"+0100",n:"CET"}}],["Africa/Windhoek",{s:{f:"+0200",n:"CAT"}}],["America/Adak",{s:{f:"-0900",t:"-1000",n:"HST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-1000",t:"-0900",n:"HDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Anchorage",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Anguilla",{s:{f:"-0400",n:"AST"}}],["America/Antigua",{s:{f:"-0400",n:"AST"}}],["America/Araguaina",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Buenos_Aires",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Catamarca",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Cordoba",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Jujuy",{s:{f:"-0300",n:"-03"}}],["America/Argentina/La_Rioja",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Mendoza",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Rio_Gallegos",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Salta",{s:{f:"-0300",n:"-03"}}],["America/Argentina/San_Juan",{s:{f:"-0300",n:"-03"}}],["America/Argentina/San_Luis",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Tucuman",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Ushuaia",{s:{f:"-0300",n:"-03"}}],["America/Aruba",{s:{f:"-0400",n:"AST"}}],["America/Asuncion",{s:{f:"-0300",t:"-0400",n:"-04",s:"19700322T000000",r:{m:3,d:"4SU"}},d:{f:"-0400",t:"-0300",n:"-03",s:"19701004T000000",r:{m:10,d:"1SU"}}}],["America/Atikokan",{s:{f:"-0500",n:"EST"}}],["America/Bahia_Banderas",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Bahia",{s:{f:"-0300",n:"-03"}}],["America/Barbados",{s:{f:"-0400",n:"AST"}}],["America/Belem",{s:{f:"-0300",n:"-03"}}],["America/Belize",{s:{f:"-0600",n:"CST"}}],["America/Blanc-Sablon",{s:{f:"-0400",n:"AST"}}],["America/Boa_Vista",{s:{f:"-0400",n:"-04"}}],["America/Bogota",{s:{f:"-0500",n:"-05"}}],["America/Boise",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Cambridge_Bay",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Campo_Grande",{s:{f:"-0400",n:"-04",s:"19700215T000000",r:{m:2,d:"3SU"}},d:{f:"-0400",t:"-0300",n:"-03",s:"19701101T000000",r:{m:11,d:"1SU"}}}],["America/Cancun",{s:{f:"-0500",n:"EST"}}],["America/Caracas",{s:{f:"-0400",n:"-04"}}],["America/Cayenne",{s:{f:"-0300",n:"-03"}}],["America/Cayman",{s:{f:"-0500",n:"EST"}}],["America/Chicago",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Chihuahua",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Costa_Rica",{s:{f:"-0600",n:"CST"}}],["America/Creston",{s:{f:"-0700",n:"MST"}}],["America/Cuiaba",{s:{f:"-0400",n:"-04",s:"19700215T000000",r:{m:2,d:"3SU"}},d:{f:"-0400",t:"-0300",n:"-03",s:"19701101T000000",r:{m:11,d:"1SU"}}}],["America/Curacao",{s:{f:"-0400",n:"AST"}}],["America/Danmarkshavn",{s:{f:"+0000",n:"GMT"}}],["America/Dawson_Creek",{s:{f:"-0700",n:"MST"}}],["America/Dawson",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Denver",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Detroit",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Dominica",{s:{f:"-0400",n:"AST"}}],["America/Edmonton",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Eirunepe",{s:{f:"-0500",n:"-05"}}],["America/El_Salvador",{s:{f:"-0600",n:"CST"}}],["America/Fort_Nelson",{s:{f:"-0700",n:"MST"}}],["America/Fortaleza",{s:{f:"-0300",n:"-03"}}],["America/Glace_Bay",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Godthab",{s:{f:"-0200",t:"-0300",n:"-03",s:"19701024T230000",r:{m:10,d:"-1SA"}},d:{f:"-0300",t:"-0200",n:"-02",s:"19700328T220000",r:{m:3,d:"-1SA"}}}],["America/Goose_Bay",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Grand_Turk",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Grenada",{s:{f:"-0400",n:"AST"}}],["America/Guadeloupe",{s:{f:"-0400",n:"AST"}}],["America/Guatemala",{s:{f:"-0600",n:"CST"}}],["America/Guayaquil",{s:{f:"-0500",n:"-05"}}],["America/Guyana",{s:{f:"-0400",n:"-04"}}],["America/Halifax",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Havana",{s:{f:"-0400",t:"-0500",n:"CST",s:"19701101T010000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"CDT",s:"19700308T000000",r:{m:3,d:"2SU"}}}],["America/Hermosillo",{s:{f:"-0700",n:"MST"}}],["America/Indiana/Indianapolis",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Knox",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Marengo",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Petersburg",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Tell_City",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Vevay",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Vincennes",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Winamac",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Inuvik",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Iqaluit",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Jamaica",{s:{f:"-0500",n:"EST"}}],["America/Juneau",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Kentucky/Louisville",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Kentucky/Monticello",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Kralendijk",{s:{f:"-0400",n:"AST"}}],["America/La_Paz",{s:{f:"-0400",n:"-04"}}],["America/Lima",{s:{f:"-0500",n:"-05"}}],["America/Los_Angeles",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Lower_Princes",{s:{f:"-0400",n:"AST"}}],["America/Maceio",{s:{f:"-0300",n:"-03"}}],["America/Managua",{s:{f:"-0600",n:"CST"}}],["America/Manaus",{s:{f:"-0400",n:"-04"}}],["America/Marigot",{s:{f:"-0400",n:"AST"}}],["America/Martinique",{s:{f:"-0400",n:"AST"}}],["America/Matamoros",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Mazatlan",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Menominee",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Merida",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Metlakatla",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Mexico_City",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Miquelon",{s:{f:"-0200",t:"-0300",n:"-03",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0300",t:"-0200",n:"-02",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Moncton",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Monterrey",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Montevideo",{s:{f:"-0300",n:"-03"}}],["America/Montserrat",{s:{f:"-0400",n:"AST"}}],["America/Nassau",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/New_York",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Nipigon",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Nome",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Noronha",{s:{f:"-0200",n:"-02"}}],["America/North_Dakota/Beulah",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/North_Dakota/Center",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/North_Dakota/New_Salem",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Ojinaga",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Panama",{s:{f:"-0500",n:"EST"}}],["America/Pangnirtung",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Paramaribo",{s:{f:"-0300",n:"-03"}}],["America/Phoenix",{s:{f:"-0700",n:"MST"}}],["America/Port_of_Spain",{s:{f:"-0400",n:"AST"}}],["America/Port-au-Prince",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Porto_Velho",{s:{f:"-0400",n:"-04"}}],["America/Puerto_Rico",{s:{f:"-0400",n:"AST"}}],["America/Punta_Arenas",{s:{f:"-0300",n:"-03"}}],["America/Rainy_River",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Rankin_Inlet",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Recife",{s:{f:"-0300",n:"-03"}}],["America/Regina",{s:{f:"-0600",n:"CST"}}],["America/Resolute",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Rio_Branco",{s:{f:"-0500",n:"-05"}}],["America/Santarem",{s:{f:"-0300",n:"-03"}}],["America/Santiago",{s:{f:"-0300",t:"-0400",n:"-04",s:"19700405T000000",r:{m:4,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"-03",s:"19700906T000000",r:{m:9,d:"1SU"}}}],["America/Santo_Domingo",{s:{f:"-0400",n:"AST"}}],["America/Sao_Paulo",{s:{f:"-0300",n:"-03",s:"19700215T000000",r:{m:2,d:"3SU"}},d:{f:"-0300",t:"-0200",n:"-02",s:"19701101T000000",r:{m:11,d:"1SU"}}}],["America/Scoresbysund",{s:{f:"+0000",t:"-0100",n:"-01",s:"19701025T010000",r:{m:10,d:"-1SU"}},d:{f:"-0100",t:"+0000",n:"+00",s:"19700329T000000",r:{m:3,d:"-1SU"}}}],["America/Sitka",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/St_Barthelemy",{s:{f:"-0400",n:"AST"}}],["America/St_Johns",{s:{f:"-0230",t:"-0330",n:"NST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0330",t:"-0230",n:"NDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/St_Kitts",{s:{f:"-0400",n:"AST"}}],["America/St_Lucia",{s:{f:"-0400",n:"AST"}}],["America/St_Thomas",{s:{f:"-0400",n:"AST"}}],["America/St_Vincent",{s:{f:"-0400",n:"AST"}}],["America/Swift_Current",{s:{f:"-0600",n:"CST"}}],["America/Tegucigalpa",{s:{f:"-0600",n:"CST"}}],["America/Thule",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Thunder_Bay",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Tijuana",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Toronto",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Tortola",{s:{f:"-0400",n:"AST"}}],["America/Vancouver",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Whitehorse",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Winnipeg",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Yakutat",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Yellowknife",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["Antarctica/Casey",{s:{f:"+0800",n:"+08"}}],["Antarctica/Davis",{s:{f:"+0700",n:"+07"}}],["Antarctica/DumontDUrville",{s:{f:"+1000",n:"+10"}}],["Antarctica/Macquarie",{s:{f:"+1100",n:"+11"}}],["Antarctica/Mawson",{s:{f:"+0500",n:"+05"}}],["Antarctica/McMurdo",{s:{f:"+1300",t:"+1200",n:"NZST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1200",t:"+1300",n:"NZDT",s:"19700927T020000",r:{m:9,d:"-1SU"}}}],["Antarctica/Palmer",{s:{f:"-0300",n:"-03"}}],["Antarctica/Rothera",{s:{f:"-0300",n:"-03"}}],["Antarctica/Syowa",{s:{f:"+0300",n:"+03"}}],["Antarctica/Troll",{s:{f:"+0200",t:"+0000",n:"+00",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0200",n:"+02",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Antarctica/Vostok",{s:{f:"+0600",n:"+06"}}],["Arctic/Longyearbyen",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Asia/Aden",{s:{f:"+0300",n:"+03"}}],["Asia/Almaty",{s:{f:"+0600",n:"+06"}}],["Asia/Amman",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701030T010000",r:{m:10,d:"-1FR"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700326T235959",r:{m:3,d:"-1TH"}}}],["Asia/Anadyr",{s:{f:"+1200",n:"+12"}}],["Asia/Aqtau",{s:{f:"+0500",n:"+05"}}],["Asia/Aqtobe",{s:{f:"+0500",n:"+05"}}],["Asia/Ashgabat",{s:{f:"+0500",n:"+05"}}],["Asia/Atyrau",{s:{f:"+0500",n:"+05"}}],["Asia/Baghdad",{s:{f:"+0300",n:"+03"}}],["Asia/Bahrain",{s:{f:"+0300",n:"+03"}}],["Asia/Baku",{s:{f:"+0400",n:"+04"}}],["Asia/Bangkok",{s:{f:"+0700",n:"+07"}}],["Asia/Barnaul",{s:{f:"+0700",n:"+07"}}],["Asia/Beirut",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T000000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T000000",r:{m:3,d:"-1SU"}}}],["Asia/Bishkek",{s:{f:"+0600",n:"+06"}}],["Asia/Brunei",{s:{f:"+0800",n:"+08"}}],["Asia/Chita",{s:{f:"+0900",n:"+09"}}],["Asia/Choibalsan",{s:{f:"+0800",n:"+08"}}],["Asia/Colombo",{s:{f:"+0530",n:"+0530"}}],["Asia/Damascus",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701030T000000",r:{m:10,d:"-1FR"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700327T000000",r:{m:3,d:"-1FR"}}}],["Asia/Dhaka",{s:{f:"+0600",n:"+06"}}],["Asia/Dili",{s:{f:"+0900",n:"+09"}}],["Asia/Dubai",{s:{f:"+0400",n:"+04"}}],["Asia/Dushanbe",{s:{f:"+0500",n:"+05"}}],["Asia/Famagusta",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Asia/Gaza",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701031T010000",r:{m:10,d:"-1SA"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700328T010000",r:{m:3,d:"4SA"}}}],["Asia/Hebron",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701031T010000",r:{m:10,d:"-1SA"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700328T010000",r:{m:3,d:"4SA"}}}],["Asia/Ho_Chi_Minh",{s:{f:"+0700",n:"+07"}}],["Asia/Hong_Kong",{s:{f:"+0800",n:"HKT"}}],["Asia/Hovd",{s:{f:"+0700",n:"+07"}}],["Asia/Irkutsk",{s:{f:"+0800",n:"+08"}}],["Asia/Istanbul",{s:{f:"+0300",n:"+03"}}],["Asia/Jakarta",{s:{f:"+0700",n:"WIB"}}],["Asia/Jayapura",{s:{f:"+0900",n:"WIT"}}],["Asia/Jerusalem",{s:{f:"+0300",t:"+0200",n:"IST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"IDT",s:"19700327T020000",r:{m:3,d:"-1FR"}}}],["Asia/Kabul",{s:{f:"+0430",n:"+0430"}}],["Asia/Kamchatka",{s:{f:"+1200",n:"+12"}}],["Asia/Karachi",{s:{f:"+0500",n:"PKT"}}],["Asia/Kathmandu",{s:{f:"+0545",n:"+0545"}}],["Asia/Khandyga",{s:{f:"+0900",n:"+09"}}],["Asia/Kolkata",{s:{f:"+0530",n:"IST"}}],["Asia/Krasnoyarsk",{s:{f:"+0700",n:"+07"}}],["Asia/Kuala_Lumpur",{s:{f:"+0800",n:"+08"}}],["Asia/Kuching",{s:{f:"+0800",n:"+08"}}],["Asia/Kuwait",{s:{f:"+0300",n:"+03"}}],["Asia/Macau",{s:{f:"+0800",n:"CST"}}],["Asia/Magadan",{s:{f:"+1100",n:"+11"}}],["Asia/Makassar",{s:{f:"+0800",n:"WITA"}}],["Asia/Manila",{s:{f:"+0800",n:"PST"}}],["Asia/Muscat",{s:{f:"+0400",n:"+04"}}],["Asia/Nicosia",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Asia/Novokuznetsk",{s:{f:"+0700",n:"+07"}}],["Asia/Novosibirsk",{s:{f:"+0700",n:"+07"}}],["Asia/Omsk",{s:{f:"+0600",n:"+06"}}],["Asia/Oral",{s:{f:"+0500",n:"+05"}}],["Asia/Phnom_Penh",{s:{f:"+0700",n:"+07"}}],["Asia/Pontianak",{s:{f:"+0700",n:"WIB"}}],["Asia/Pyongyang",{s:{f:"+0900",n:"KST"}}],["Asia/Qatar",{s:{f:"+0300",n:"+03"}}],["Asia/Qyzylorda",{s:{f:"+0600",n:"+06"}}],["Asia/Riyadh",{s:{f:"+0300",n:"+03"}}],["Asia/Sakhalin",{s:{f:"+1100",n:"+11"}}],["Asia/Samarkand",{s:{f:"+0500",n:"+05"}}],["Asia/Seoul",{s:{f:"+0900",n:"KST"}}],["Asia/Shanghai",{s:{f:"+0800",n:"CST"}}],["Asia/Singapore",{s:{f:"+0800",n:"+08"}}],["Asia/Srednekolymsk",{s:{f:"+1100",n:"+11"}}],["Asia/Taipei",{s:{f:"+0800",n:"CST"}}],["Asia/Tashkent",{s:{f:"+0500",n:"+05"}}],["Asia/Tbilisi",{s:{f:"+0400",n:"+04"}}],["Asia/Tehran",{s:{f:"+0430",t:"+0330",n:"+0330",s:"19700921T000000",r:{m:9,d:"3SU"}},d:{f:"+0330",t:"+0430",n:"+0430",s:"19700321T000000",r:{m:3,d:"3SU"}}}],["Asia/Thimphu",{s:{f:"+0600",n:"+06"}}],["Asia/Tokyo",{s:{f:"+0900",n:"JST"}}],["Asia/Tomsk",{s:{f:"+0700",n:"+07"}}],["Asia/Ulaanbaatar",{s:{f:"+0800",n:"+08"}}],["Asia/Urumqi",{s:{f:"+0600",n:"+06"}}],["Asia/Ust-Nera",{s:{f:"+1000",n:"+10"}}],["Asia/Vientiane",{s:{f:"+0700",n:"+07"}}],["Asia/Vladivostok",{s:{f:"+1000",n:"+10"}}],["Asia/Yakutsk",{s:{f:"+0900",n:"+09"}}],["Asia/Yangon",{s:{f:"+0630",n:"+0630"}}],["Asia/Yekaterinburg",{s:{f:"+0500",n:"+05"}}],["Asia/Yerevan",{s:{f:"+0400",n:"+04"}}],["Atlantic/Azores",{s:{f:"+0000",t:"-0100",n:"-01",s:"19701025T010000",r:{m:10,d:"-1SU"}},d:{f:"-0100",t:"+0000",n:"+00",s:"19700329T000000",r:{m:3,d:"-1SU"}}}],["Atlantic/Bermuda",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["Atlantic/Canary",{s:{f:"+0100",t:"+0000",n:"WET",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"WEST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Atlantic/Cape_Verde",{s:{f:"-0100",n:"-01"}}],["Atlantic/Faroe",{s:{f:"+0100",t:"+0000",n:"WET",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"WEST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Atlantic/Madeira",{s:{f:"+0100",t:"+0000",n:"WET",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"WEST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Atlantic/Reykjavik",{s:{f:"+0000",n:"GMT"}}],["Atlantic/South_Georgia",{s:{f:"-0200",n:"-02"}}],["Atlantic/St_Helena",{s:{f:"+0000",n:"GMT"}}],["Atlantic/Stanley",{s:{f:"-0300",n:"-03"}}],["Australia/Adelaide",{s:{f:"+1030",t:"+0930",n:"ACST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+0930",t:"+1030",n:"ACDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Brisbane",{s:{f:"+1000",n:"AEST"}}],["Australia/Broken_Hill",{s:{f:"+1030",t:"+0930",n:"ACST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+0930",t:"+1030",n:"ACDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Currie",{s:{f:"+1100",t:"+1000",n:"AEST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1000",t:"+1100",n:"AEDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Darwin",{s:{f:"+0930",n:"ACST"}}],["Australia/Eucla",{s:{f:"+0845",n:"+0845"}}],["Australia/Hobart",{s:{f:"+1100",t:"+1000",n:"AEST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1000",t:"+1100",n:"AEDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Lindeman",{s:{f:"+1000",n:"AEST"}}],["Australia/Lord_Howe",{s:{f:"+1100",t:"+1030",n:"+1030",s:"19700405T020000",r:{m:4,d:"1SU"}},d:{f:"+1030",t:"+1100",n:"+11",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Melbourne",{s:{f:"+1100",t:"+1000",n:"AEST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1000",t:"+1100",n:"AEDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Perth",{s:{f:"+0800",n:"AWST"}}],["Australia/Sydney",{s:{f:"+1100",t:"+1000",n:"AEST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1000",t:"+1100",n:"AEDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Etc/GMT-0",{s:{f:"+0000",n:"GMT"}}],["Etc/GMT-1",{s:{f:"-0100",n:"-01"}}],["Etc/GMT-10",{s:{f:"-1000",n:"-10"}}],["Etc/GMT-11",{s:{f:"-1100",n:"-11"}}],["Etc/GMT-12",{s:{f:"-1200",n:"-12"}}],["Etc/GMT-2",{s:{f:"-0200",n:"-02"}}],["Etc/GMT-3",{s:{f:"-0300",n:"-03"}}],["Etc/GMT-4",{s:{f:"-0400",n:"-04"}}],["Etc/GMT-5",{s:{f:"-0500",n:"-05"}}],["Etc/GMT-6",{s:{f:"-0600",n:"-06"}}],["Etc/GMT-7",{s:{f:"-0700",n:"-07"}}],["Etc/GMT-8",{s:{f:"-0800",n:"-08"}}],["Etc/GMT-9",{s:{f:"-0900",n:"-09"}}],["Etc/GMT",{s:{f:"+0000",n:"GMT"}}],["Etc/GMT+0",{s:{f:"+0000",n:"GMT"}}],["Etc/GMT+1",{s:{f:"+0100",n:"+01"}}],["Etc/GMT+10",{s:{f:"+1000",n:"+10"}}],["Etc/GMT+11",{s:{f:"+1100",n:"+11"}}],["Etc/GMT+12",{s:{f:"+1200",n:"+12"}}],["Etc/GMT+13",{s:{f:"+1300",n:"+13"}}],["Etc/GMT+14",{s:{f:"+1400",n:"+14"}}],["Etc/GMT+2",{s:{f:"+0200",n:"+02"}}],["Etc/GMT+3",{s:{f:"+0300",n:"+03"}}],["Etc/GMT+4",{s:{f:"+0400",n:"+04"}}],["Etc/GMT+5",{s:{f:"+0500",n:"+05"}}],["Etc/GMT+6",{s:{f:"+0600",n:"+06"}}],["Etc/GMT+7",{s:{f:"+0700",n:"+07"}}],["Etc/GMT+8",{s:{f:"+0800",n:"+08"}}],["Etc/GMT+9",{s:{f:"+0900",n:"+09"}}],["Etc/GMT0",{s:{f:"+0000",n:"GMT"}}],["Etc/Greenwich",{s:{f:"+0000",n:"GMT"}}],["Etc/UCT",{s:{f:"+0000",n:"UCT"}}],["Etc/Universal",{s:{f:"+0000",n:"UTC"}}],["Etc/UTC",{s:{f:"+0000",n:"UTC"}}],["Etc/Zulu",{s:{f:"+0000",n:"UTC"}}],["Europe/Amsterdam",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Andorra",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Astrakhan",{s:{f:"+0400",n:"+04"}}],["Europe/Athens",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Belgrade",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Berlin",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Bratislava",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Brussels",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Bucharest",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Budapest",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Busingen",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Chisinau",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Copenhagen",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Dublin",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"IST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Gibraltar",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Guernsey",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"BST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Helsinki",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Isle_of_Man",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"BST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Istanbul",{s:{f:"+0300",n:"+03"}}],["Europe/Jersey",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"BST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Kaliningrad",{s:{f:"+0200",n:"EET"}}],["Europe/Kiev",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Kirov",{s:{f:"+0300",n:"+03"}}],["Europe/Lisbon",{s:{f:"+0100",t:"+0000",n:"WET",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"WEST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Ljubljana",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/London",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"BST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Luxembourg",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Madrid",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Malta",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Mariehamn",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Minsk",{s:{f:"+0300",n:"+03"}}],["Europe/Monaco",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Moscow",{s:{f:"+0300",n:"MSK"}}],["Europe/Nicosia",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Oslo",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Paris",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Podgorica",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Prague",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Riga",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Rome",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Samara",{s:{f:"+0400",n:"+04"}}],["Europe/San_Marino",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Sarajevo",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Saratov",{s:{f:"+0400",n:"+04"}}],["Europe/Simferopol",{s:{f:"+0300",n:"MSK"}}],["Europe/Skopje",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Sofia",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Stockholm",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Tallinn",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Tirane",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Ulyanovsk",{s:{f:"+0400",n:"+04"}}],["Europe/Uzhgorod",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Vaduz",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Vatican",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Vienna",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Vilnius",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Volgograd",{s:{f:"+0400",n:"+04"}}],["Europe/Warsaw",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Zagreb",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Zaporozhye",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Zurich",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Indian/Antananarivo",{s:{f:"+0300",n:"EAT"}}],["Indian/Chagos",{s:{f:"+0600",n:"+06"}}],["Indian/Christmas",{s:{f:"+0700",n:"+07"}}],["Indian/Cocos",{s:{f:"+0630",n:"+0630"}}],["Indian/Comoro",{s:{f:"+0300",n:"EAT"}}],["Indian/Kerguelen",{s:{f:"+0500",n:"+05"}}],["Indian/Mahe",{s:{f:"+0400",n:"+04"}}],["Indian/Maldives",{s:{f:"+0500",n:"+05"}}],["Indian/Mauritius",{s:{f:"+0400",n:"+04"}}],["Indian/Mayotte",{s:{f:"+0300",n:"EAT"}}],["Indian/Reunion",{s:{f:"+0400",n:"+04"}}],["Pacific/Apia",{s:{f:"+1400",t:"+1300",n:"+13",s:"19700405T040000",r:{m:4,d:"1SU"}},d:{f:"+1300",t:"+1400",n:"+14",s:"19700927T030000",r:{m:9,d:"-1SU"}}}],["Pacific/Auckland",{s:{f:"+1300",t:"+1200",n:"NZST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1200",t:"+1300",n:"NZDT",s:"19700927T020000",r:{m:9,d:"-1SU"}}}],["Pacific/Bougainville",{s:{f:"+1100",n:"+11"}}],["Pacific/Chatham",{s:{f:"+1345",t:"+1245",n:"+1245",s:"19700405T034500",r:{m:4,d:"1SU"}},d:{f:"+1245",t:"+1345",n:"+1345",s:"19700927T024500",r:{m:9,d:"-1SU"}}}],["Pacific/Chuuk",{s:{f:"+1000",n:"+10"}}],["Pacific/Easter",{s:{f:"-0500",t:"-0600",n:"-06",s:"19700404T220000",r:{m:4,d:"1SA"}},d:{f:"-0600",t:"-0500",n:"-05",s:"19700905T220000",r:{m:9,d:"1SA"}}}],["Pacific/Efate",{s:{f:"+1100",n:"+11"}}],["Pacific/Enderbury",{s:{f:"+1300",n:"+13"}}],["Pacific/Fakaofo",{s:{f:"+1300",n:"+13"}}],["Pacific/Fiji",{s:{f:"+1300",t:"+1200",n:"+12",s:"19700118T030000",r:{m:1,d:"-2SU"}},d:{f:"+1200",t:"+1300",n:"+13",s:"19701101T020000",r:{m:11,d:"1SU"}}}],["Pacific/Funafuti",{s:{f:"+1200",n:"+12"}}],["Pacific/Galapagos",{s:{f:"-0600",n:"-06"}}],["Pacific/Gambier",{s:{f:"-0900",n:"-09"}}],["Pacific/Guadalcanal",{s:{f:"+1100",n:"+11"}}],["Pacific/Guam",{s:{f:"+1000",n:"ChST"}}],["Pacific/Honolulu",{s:{f:"-1000",n:"HST"}}],["Pacific/Kiritimati",{s:{f:"+1400",n:"+14"}}],["Pacific/Kosrae",{s:{f:"+1100",n:"+11"}}],["Pacific/Kwajalein",{s:{f:"+1200",n:"+12"}}],["Pacific/Majuro",{s:{f:"+1200",n:"+12"}}],["Pacific/Marquesas",{s:{f:"-0930",n:"-0930"}}],["Pacific/Midway",{s:{f:"-1100",n:"SST"}}],["Pacific/Nauru",{s:{f:"+1200",n:"+12"}}],["Pacific/Niue",{s:{f:"-1100",n:"-11"}}],["Pacific/Norfolk",{s:{f:"+1100",n:"+11"}}],["Pacific/Noumea",{s:{f:"+1100",n:"+11"}}],["Pacific/Pago_Pago",{s:{f:"-1100",n:"SST"}}],["Pacific/Palau",{s:{f:"+0900",n:"+09"}}],["Pacific/Pitcairn",{s:{f:"-0800",n:"-08"}}],["Pacific/Pohnpei",{s:{f:"+1100",n:"+11"}}],["Pacific/Port_Moresby",{s:{f:"+1000",n:"+10"}}],["Pacific/Rarotonga",{s:{f:"-1000",n:"-10"}}],["Pacific/Saipan",{s:{f:"+1000",n:"ChST"}}],["Pacific/Tahiti",{s:{f:"-1000",n:"-10"}}],["Pacific/Tarawa",{s:{f:"+1200",n:"+12"}}],["Pacific/Tongatapu",{s:{f:"+1300",n:"+13"}}],["Pacific/Wake",{s:{f:"+1200",n:"+12"}}],["Pacific/Wallis",{s:{f:"+1200",n:"+12"}}]])),ct}var $t;function $e(){if($t)return rt;$t=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.getZoneString=rt.getZoneLines=void 0;const a=Je();function t(r){const{n:i,f:o,t:n,r:l,s:u}=r;return[`TZNAME:${i}`,`TZOFFSETFROM:${o}`,`TZOFFSETTO:${n||o}`,`DTSTART:${u||a.defaultStart}`,...l?[`RRULE:FREQ=${l.f||"YEARLY"};BYMONTH=${l.m};BYDAY=${l.d}`]:[]]}function e(r,i=!0){const o=a.zonesMap.get(r);if(o){const{s:n,d:l}=o;return[...i?["BEGIN:VTIMEZONE"]:[],`TZID:${r}`,"BEGIN:STANDARD",...t(n),"END:STANDARD",...l?["BEGIN:DAYLIGHT",...t(l),"END:DAYLIGHT"]:[],...i?["END:VTIMEZONE"]:[]]}}rt.getZoneLines=e;function s(r,i=!0){return e(r,i)?.join(`\r +import{f as G,o as B,j as H,k as Q,e as v,n as dt,t as et,w as st,g as vt,C as Ae,F as Ft,A as Gt,c as Pt,m as de,b as ce,r as St,U as ge,u as E,h as De}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{a as he,l as jt,g as Ee}from"./index-C3KLQ_oe.chunk.mjs";import{t as D}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{N as Kt}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import{d as _e,c as mt,a as Lt,g as be,h as Ue,o as Ce,e as Ye}from"./index-DgEyzq8A.chunk.mjs";import{c as ft}from"./index-9ZBo3L67.chunk.mjs";import{d as zt,a as Ot}from"./index-WQvok30H.chunk.mjs";import{S as ve}from"./ShareType-suoNfd7y.chunk.mjs";import{N as Ht}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{N as me}from"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import{N as Oe,a as we}from"./index-COiwHfFG.chunk.mjs";import{_ as Me}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{l as W}from"./logger-B8T3lDer.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{g as Ne}from"./index-CO7ZwNPX.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./NcRichText-BO_4KtBA-DXDa2H1Y.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import{N as xe}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";import{P as Ie}from"./Plus-gXjhFOHV.chunk.mjs";/* empty css */import{D as ke}from"./TrashCanOutline-BZ98FFoG.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./index-CuPuSdF1.chunk.mjs";import"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import{$ as Be,l as Pe}from"./index-C5O29_27.chunk.mjs";import"./index-sH3U_332.chunk.mjs";function qt(a){const t=a.getFullYear(),e=(a.getMonth()+1).toString().padStart(2,"0"),s=a.getDate().toString().padStart(2,"0");return`${t}-${e}-${s}`}const Le="_absenceForm_1i2bj_2",ze="_absenceForm__pickerContainer_1i2bj_8",Ve="_absenceForm__picker_1i2bj_8",je="_absenceForm__longMessage_1i2bj_22",He="_absenceForm__longMessageContainer_1i2bj_26",Re="_absenceForm__actions_1i2bj_33",We={absenceForm:Le,absenceForm__pickerContainer:ze,absenceForm__picker:Ve,absenceForm__longMessage:je,absenceForm__longMessageContainer:He,absenceForm__actions:Re};function Zt(a){const t=a.getTimezoneOffset()*60*1e3;return new Date(a.getTime()+t)}const Fe={name:"AbsenceForm",components:{NcButton:Ht,NcTextField:Me,NcTextArea:we,NcDateTimePickerNative:me,NcSelectUsers:Oe},setup(){return{t:D}},data(){const{firstDay:a,lastDay:t,status:e,message:s,replacementUserId:r,replacementUserDisplayName:i}=jt("dav","absence",{}),o=a?new Date(a):new Date,n=Zt(o),l=t?Zt(new Date(t)):null;return{loading:!1,status:e??"",message:s??"",firstDay:n,lastDay:l,replacementUserId:r,replacementUser:r?{user:r,displayName:i}:null,searchLoading:!1,options:[]}},computed:{valid(){const a=new Date(this.firstDay?.getTime()),t=new Date(this.lastDay?.getTime());return a?.setHours(0,0,0,0),t?.setHours(0,0,0,0),!!this.firstDay&&!!this.lastDay&&!!this.status&&!!this.message&&t>=a}},methods:{resetForm(){this.status="",this.message="",this.firstDay=new Date,this.lastDay=null},formatForMultiselect(a){return{user:a.uuid||a.value.shareWith,displayName:a.name||a.label,subtitle:a.dsc|""}},async asyncFind(a){this.searchLoading=!0,await this.debounceGetSuggestions(a.trim())},async getSuggestions(a){const t=[ve.User];let e;try{e=await ft.get(mt("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"file",search:a,shareType:t}})}catch(d){W.error("Error fetching suggestions",{error:d});return}const s=e.data.ocs.data,r=e.data.ocs.data.exact;s.exact=[];const i=r.users,o=s.users;W.info("AbsenceForm raw suggestions",{rawExactSuggestions:i,rawSuggestions:o});const n=i.map(d=>this.formatForMultiselect(d)),l=o.map(d=>this.formatForMultiselect(d)),u=n.concat(l),c=u.reduce((d,m)=>(m.displayName&&(d[m.displayName]||(d[m.displayName]=0),d[m.displayName]++),d),{});this.options=u.map(d=>c[d.displayName]>1&&!d.desc?{...d,desc:d.shareWithDisplayNameUnique}:d),this.searchLoading=!1,W.info("AbsenseForm suggestions",{options:this.options})},debounceGetSuggestions:_e(function(...a){this.getSuggestions(...a)},300),async saveForm(){if(this.valid){this.loading=!0;try{await ft.post(mt("/apps/dav/api/v1/outOfOffice/{userId}",{userId:Lt().uid}),{firstDay:qt(this.firstDay),lastDay:qt(this.lastDay),status:this.status,message:this.message,replacementUserId:this.replacementUser?.user??null}),zt(D("dav","Absence saved"))}catch(a){Ot(D("dav","Failed to save your absence settings")),W.error("Could not save absence",{error:a})}finally{this.loading=!1}}},async clearAbsence(){this.loading=!0;try{await ft.delete(mt("/apps/dav/api/v1/outOfOffice/{userId}",{userId:Lt().uid})),this.resetForm(),zt(D("dav","Absence cleared"))}catch(a){Ot(D("dav","Failed to clear your absence settings")),W.error("Could not clear absence",{error:a})}finally{this.loading=!1}}}},Ge={for:"replacement-search-input"};function Ke(a,t,e,s,r,i){const o=G("NcDateTimePickerNative"),n=G("NcSelectUsers"),l=G("NcTextField"),u=G("NcTextArea"),c=G("NcButton");return B(),H("form",{class:dt(a.$style.absenceForm),onSubmit:t[5]||(t[5]=Ae((...d)=>i.saveForm&&i.saveForm(...d),["prevent"]))},[Q("div",{class:dt(a.$style.absenceForm__pickerContainer)},[v(o,{id:"absence-first-day",modelValue:r.firstDay,"onUpdate:modelValue":t[0]||(t[0]=d=>r.firstDay=d),class:dt(a.$style.absenceForm__picker),label:s.t("dav","First day"),required:""},null,8,["modelValue","class","label"]),v(o,{id:"absence-last-day",modelValue:r.lastDay,"onUpdate:modelValue":t[1]||(t[1]=d=>r.lastDay=d),class:dt(a.$style.absenceForm__picker),label:s.t("dav","Last day (inclusive)"),required:""},null,8,["modelValue","class","label"])],2),Q("label",Ge,et(s.t("dav","Out of office replacement (optional)")),1),v(n,{modelValue:r.replacementUser,"onUpdate:modelValue":t[2]||(t[2]=d=>r.replacementUser=d),inputId:"replacement-search-input",loading:r.searchLoading,placeholder:s.t("dav","Name of the replacement"),options:r.options,onSearch:i.asyncFind},null,8,["modelValue","loading","placeholder","options","onSearch"]),v(l,{modelValue:r.status,"onUpdate:modelValue":t[3]||(t[3]=d=>r.status=d),label:s.t("dav","Short absence status"),required:!0},null,8,["modelValue","label"]),Q("div",{class:dt(a.$style.absenceForm__longMessageContainer)},[v(u,{modelValue:r.message,"onUpdate:modelValue":t[4]||(t[4]=d=>r.message=d),inputClass:a.$style.absenceForm__longMessage,label:s.t("dav","Long absence Message"),required:"",resize:"none",rows:"6"},null,8,["modelValue","inputClass","label"])],2),Q("div",{class:dt(a.$style.absenceForm__actions)},[v(c,{disabled:r.loading||!i.valid,variant:"primary",type:"submit"},{default:st(()=>[vt(et(s.t("dav","Save")),1)]),_:1},8,["disabled"]),v(c,{disabled:r.loading||!i.valid,variant:"error",onClick:i.clearAbsence},{default:st(()=>[vt(et(s.t("dav","Disable absence")),1)]),_:1},8,["disabled","onClick"])],2)],34)}const qe={$style:We},Ze=he(Fe,[["render",Ke],["__cssModules",qe]]);var rt={},ct={},Jt;function Je(){return Jt||(Jt=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.zonesMap=ct.defaultStart=void 0,ct.defaultStart="19700101T000000",ct.zonesMap=new Map([["Africa/Abidjan",{s:{f:"+0000",n:"GMT"}}],["Africa/Accra",{s:{f:"+0000",n:"GMT"}}],["Africa/Addis_Ababa",{s:{f:"+0300",n:"EAT"}}],["Africa/Algiers",{s:{f:"+0100",n:"CET"}}],["Africa/Asmara",{s:{f:"+0300",n:"EAT"}}],["Africa/Bamako",{s:{f:"+0000",n:"GMT"}}],["Africa/Bangui",{s:{f:"+0100",n:"WAT"}}],["Africa/Banjul",{s:{f:"+0000",n:"GMT"}}],["Africa/Bissau",{s:{f:"+0000",n:"GMT"}}],["Africa/Blantyre",{s:{f:"+0200",n:"CAT"}}],["Africa/Brazzaville",{s:{f:"+0100",n:"WAT"}}],["Africa/Bujumbura",{s:{f:"+0200",n:"CAT"}}],["Africa/Cairo",{s:{f:"+0200",n:"EET"}}],["Africa/Casablanca",{s:{f:"+0100",n:"+01"}}],["Africa/Ceuta",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Africa/Conakry",{s:{f:"+0000",n:"GMT"}}],["Africa/Dakar",{s:{f:"+0000",n:"GMT"}}],["Africa/Dar_es_Salaam",{s:{f:"+0300",n:"EAT"}}],["Africa/Djibouti",{s:{f:"+0300",n:"EAT"}}],["Africa/Douala",{s:{f:"+0100",n:"WAT"}}],["Africa/El_Aaiun",{s:{f:"+0100",n:"+01"}}],["Africa/Freetown",{s:{f:"+0000",n:"GMT"}}],["Africa/Gaborone",{s:{f:"+0200",n:"CAT"}}],["Africa/Harare",{s:{f:"+0200",n:"CAT"}}],["Africa/Johannesburg",{s:{f:"+0200",n:"SAST"}}],["Africa/Juba",{s:{f:"+0300",n:"EAT"}}],["Africa/Kampala",{s:{f:"+0300",n:"EAT"}}],["Africa/Khartoum",{s:{f:"+0200",n:"CAT"}}],["Africa/Kigali",{s:{f:"+0200",n:"CAT"}}],["Africa/Kinshasa",{s:{f:"+0100",n:"WAT"}}],["Africa/Lagos",{s:{f:"+0100",n:"WAT"}}],["Africa/Libreville",{s:{f:"+0100",n:"WAT"}}],["Africa/Lome",{s:{f:"+0000",n:"GMT"}}],["Africa/Luanda",{s:{f:"+0100",n:"WAT"}}],["Africa/Lubumbashi",{s:{f:"+0200",n:"CAT"}}],["Africa/Lusaka",{s:{f:"+0200",n:"CAT"}}],["Africa/Malabo",{s:{f:"+0100",n:"WAT"}}],["Africa/Maputo",{s:{f:"+0200",n:"CAT"}}],["Africa/Maseru",{s:{f:"+0200",n:"SAST"}}],["Africa/Mbabane",{s:{f:"+0200",n:"SAST"}}],["Africa/Mogadishu",{s:{f:"+0300",n:"EAT"}}],["Africa/Monrovia",{s:{f:"+0000",n:"GMT"}}],["Africa/Nairobi",{s:{f:"+0300",n:"EAT"}}],["Africa/Ndjamena",{s:{f:"+0100",n:"WAT"}}],["Africa/Niamey",{s:{f:"+0100",n:"WAT"}}],["Africa/Nouakchott",{s:{f:"+0000",n:"GMT"}}],["Africa/Ouagadougou",{s:{f:"+0000",n:"GMT"}}],["Africa/Porto-Novo",{s:{f:"+0100",n:"WAT"}}],["Africa/Sao_Tome",{s:{f:"+0100",n:"WAT"}}],["Africa/Tripoli",{s:{f:"+0200",n:"EET"}}],["Africa/Tunis",{s:{f:"+0100",n:"CET"}}],["Africa/Windhoek",{s:{f:"+0200",n:"CAT"}}],["America/Adak",{s:{f:"-0900",t:"-1000",n:"HST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-1000",t:"-0900",n:"HDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Anchorage",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Anguilla",{s:{f:"-0400",n:"AST"}}],["America/Antigua",{s:{f:"-0400",n:"AST"}}],["America/Araguaina",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Buenos_Aires",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Catamarca",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Cordoba",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Jujuy",{s:{f:"-0300",n:"-03"}}],["America/Argentina/La_Rioja",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Mendoza",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Rio_Gallegos",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Salta",{s:{f:"-0300",n:"-03"}}],["America/Argentina/San_Juan",{s:{f:"-0300",n:"-03"}}],["America/Argentina/San_Luis",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Tucuman",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Ushuaia",{s:{f:"-0300",n:"-03"}}],["America/Aruba",{s:{f:"-0400",n:"AST"}}],["America/Asuncion",{s:{f:"-0300",t:"-0400",n:"-04",s:"19700322T000000",r:{m:3,d:"4SU"}},d:{f:"-0400",t:"-0300",n:"-03",s:"19701004T000000",r:{m:10,d:"1SU"}}}],["America/Atikokan",{s:{f:"-0500",n:"EST"}}],["America/Bahia_Banderas",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Bahia",{s:{f:"-0300",n:"-03"}}],["America/Barbados",{s:{f:"-0400",n:"AST"}}],["America/Belem",{s:{f:"-0300",n:"-03"}}],["America/Belize",{s:{f:"-0600",n:"CST"}}],["America/Blanc-Sablon",{s:{f:"-0400",n:"AST"}}],["America/Boa_Vista",{s:{f:"-0400",n:"-04"}}],["America/Bogota",{s:{f:"-0500",n:"-05"}}],["America/Boise",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Cambridge_Bay",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Campo_Grande",{s:{f:"-0400",n:"-04",s:"19700215T000000",r:{m:2,d:"3SU"}},d:{f:"-0400",t:"-0300",n:"-03",s:"19701101T000000",r:{m:11,d:"1SU"}}}],["America/Cancun",{s:{f:"-0500",n:"EST"}}],["America/Caracas",{s:{f:"-0400",n:"-04"}}],["America/Cayenne",{s:{f:"-0300",n:"-03"}}],["America/Cayman",{s:{f:"-0500",n:"EST"}}],["America/Chicago",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Chihuahua",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Costa_Rica",{s:{f:"-0600",n:"CST"}}],["America/Creston",{s:{f:"-0700",n:"MST"}}],["America/Cuiaba",{s:{f:"-0400",n:"-04",s:"19700215T000000",r:{m:2,d:"3SU"}},d:{f:"-0400",t:"-0300",n:"-03",s:"19701101T000000",r:{m:11,d:"1SU"}}}],["America/Curacao",{s:{f:"-0400",n:"AST"}}],["America/Danmarkshavn",{s:{f:"+0000",n:"GMT"}}],["America/Dawson_Creek",{s:{f:"-0700",n:"MST"}}],["America/Dawson",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Denver",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Detroit",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Dominica",{s:{f:"-0400",n:"AST"}}],["America/Edmonton",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Eirunepe",{s:{f:"-0500",n:"-05"}}],["America/El_Salvador",{s:{f:"-0600",n:"CST"}}],["America/Fort_Nelson",{s:{f:"-0700",n:"MST"}}],["America/Fortaleza",{s:{f:"-0300",n:"-03"}}],["America/Glace_Bay",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Godthab",{s:{f:"-0200",t:"-0300",n:"-03",s:"19701024T230000",r:{m:10,d:"-1SA"}},d:{f:"-0300",t:"-0200",n:"-02",s:"19700328T220000",r:{m:3,d:"-1SA"}}}],["America/Goose_Bay",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Grand_Turk",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Grenada",{s:{f:"-0400",n:"AST"}}],["America/Guadeloupe",{s:{f:"-0400",n:"AST"}}],["America/Guatemala",{s:{f:"-0600",n:"CST"}}],["America/Guayaquil",{s:{f:"-0500",n:"-05"}}],["America/Guyana",{s:{f:"-0400",n:"-04"}}],["America/Halifax",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Havana",{s:{f:"-0400",t:"-0500",n:"CST",s:"19701101T010000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"CDT",s:"19700308T000000",r:{m:3,d:"2SU"}}}],["America/Hermosillo",{s:{f:"-0700",n:"MST"}}],["America/Indiana/Indianapolis",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Knox",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Marengo",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Petersburg",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Tell_City",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Vevay",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Vincennes",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Winamac",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Inuvik",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Iqaluit",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Jamaica",{s:{f:"-0500",n:"EST"}}],["America/Juneau",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Kentucky/Louisville",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Kentucky/Monticello",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Kralendijk",{s:{f:"-0400",n:"AST"}}],["America/La_Paz",{s:{f:"-0400",n:"-04"}}],["America/Lima",{s:{f:"-0500",n:"-05"}}],["America/Los_Angeles",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Lower_Princes",{s:{f:"-0400",n:"AST"}}],["America/Maceio",{s:{f:"-0300",n:"-03"}}],["America/Managua",{s:{f:"-0600",n:"CST"}}],["America/Manaus",{s:{f:"-0400",n:"-04"}}],["America/Marigot",{s:{f:"-0400",n:"AST"}}],["America/Martinique",{s:{f:"-0400",n:"AST"}}],["America/Matamoros",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Mazatlan",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Menominee",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Merida",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Metlakatla",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Mexico_City",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Miquelon",{s:{f:"-0200",t:"-0300",n:"-03",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0300",t:"-0200",n:"-02",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Moncton",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Monterrey",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Montevideo",{s:{f:"-0300",n:"-03"}}],["America/Montserrat",{s:{f:"-0400",n:"AST"}}],["America/Nassau",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/New_York",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Nipigon",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Nome",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Noronha",{s:{f:"-0200",n:"-02"}}],["America/North_Dakota/Beulah",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/North_Dakota/Center",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/North_Dakota/New_Salem",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Ojinaga",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Panama",{s:{f:"-0500",n:"EST"}}],["America/Pangnirtung",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Paramaribo",{s:{f:"-0300",n:"-03"}}],["America/Phoenix",{s:{f:"-0700",n:"MST"}}],["America/Port_of_Spain",{s:{f:"-0400",n:"AST"}}],["America/Port-au-Prince",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Porto_Velho",{s:{f:"-0400",n:"-04"}}],["America/Puerto_Rico",{s:{f:"-0400",n:"AST"}}],["America/Punta_Arenas",{s:{f:"-0300",n:"-03"}}],["America/Rainy_River",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Rankin_Inlet",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Recife",{s:{f:"-0300",n:"-03"}}],["America/Regina",{s:{f:"-0600",n:"CST"}}],["America/Resolute",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Rio_Branco",{s:{f:"-0500",n:"-05"}}],["America/Santarem",{s:{f:"-0300",n:"-03"}}],["America/Santiago",{s:{f:"-0300",t:"-0400",n:"-04",s:"19700405T000000",r:{m:4,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"-03",s:"19700906T000000",r:{m:9,d:"1SU"}}}],["America/Santo_Domingo",{s:{f:"-0400",n:"AST"}}],["America/Sao_Paulo",{s:{f:"-0300",n:"-03",s:"19700215T000000",r:{m:2,d:"3SU"}},d:{f:"-0300",t:"-0200",n:"-02",s:"19701101T000000",r:{m:11,d:"1SU"}}}],["America/Scoresbysund",{s:{f:"+0000",t:"-0100",n:"-01",s:"19701025T010000",r:{m:10,d:"-1SU"}},d:{f:"-0100",t:"+0000",n:"+00",s:"19700329T000000",r:{m:3,d:"-1SU"}}}],["America/Sitka",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/St_Barthelemy",{s:{f:"-0400",n:"AST"}}],["America/St_Johns",{s:{f:"-0230",t:"-0330",n:"NST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0330",t:"-0230",n:"NDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/St_Kitts",{s:{f:"-0400",n:"AST"}}],["America/St_Lucia",{s:{f:"-0400",n:"AST"}}],["America/St_Thomas",{s:{f:"-0400",n:"AST"}}],["America/St_Vincent",{s:{f:"-0400",n:"AST"}}],["America/Swift_Current",{s:{f:"-0600",n:"CST"}}],["America/Tegucigalpa",{s:{f:"-0600",n:"CST"}}],["America/Thule",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Thunder_Bay",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Tijuana",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Toronto",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Tortola",{s:{f:"-0400",n:"AST"}}],["America/Vancouver",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Whitehorse",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Winnipeg",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Yakutat",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Yellowknife",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["Antarctica/Casey",{s:{f:"+0800",n:"+08"}}],["Antarctica/Davis",{s:{f:"+0700",n:"+07"}}],["Antarctica/DumontDUrville",{s:{f:"+1000",n:"+10"}}],["Antarctica/Macquarie",{s:{f:"+1100",n:"+11"}}],["Antarctica/Mawson",{s:{f:"+0500",n:"+05"}}],["Antarctica/McMurdo",{s:{f:"+1300",t:"+1200",n:"NZST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1200",t:"+1300",n:"NZDT",s:"19700927T020000",r:{m:9,d:"-1SU"}}}],["Antarctica/Palmer",{s:{f:"-0300",n:"-03"}}],["Antarctica/Rothera",{s:{f:"-0300",n:"-03"}}],["Antarctica/Syowa",{s:{f:"+0300",n:"+03"}}],["Antarctica/Troll",{s:{f:"+0200",t:"+0000",n:"+00",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0200",n:"+02",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Antarctica/Vostok",{s:{f:"+0600",n:"+06"}}],["Arctic/Longyearbyen",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Asia/Aden",{s:{f:"+0300",n:"+03"}}],["Asia/Almaty",{s:{f:"+0600",n:"+06"}}],["Asia/Amman",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701030T010000",r:{m:10,d:"-1FR"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700326T235959",r:{m:3,d:"-1TH"}}}],["Asia/Anadyr",{s:{f:"+1200",n:"+12"}}],["Asia/Aqtau",{s:{f:"+0500",n:"+05"}}],["Asia/Aqtobe",{s:{f:"+0500",n:"+05"}}],["Asia/Ashgabat",{s:{f:"+0500",n:"+05"}}],["Asia/Atyrau",{s:{f:"+0500",n:"+05"}}],["Asia/Baghdad",{s:{f:"+0300",n:"+03"}}],["Asia/Bahrain",{s:{f:"+0300",n:"+03"}}],["Asia/Baku",{s:{f:"+0400",n:"+04"}}],["Asia/Bangkok",{s:{f:"+0700",n:"+07"}}],["Asia/Barnaul",{s:{f:"+0700",n:"+07"}}],["Asia/Beirut",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T000000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T000000",r:{m:3,d:"-1SU"}}}],["Asia/Bishkek",{s:{f:"+0600",n:"+06"}}],["Asia/Brunei",{s:{f:"+0800",n:"+08"}}],["Asia/Chita",{s:{f:"+0900",n:"+09"}}],["Asia/Choibalsan",{s:{f:"+0800",n:"+08"}}],["Asia/Colombo",{s:{f:"+0530",n:"+0530"}}],["Asia/Damascus",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701030T000000",r:{m:10,d:"-1FR"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700327T000000",r:{m:3,d:"-1FR"}}}],["Asia/Dhaka",{s:{f:"+0600",n:"+06"}}],["Asia/Dili",{s:{f:"+0900",n:"+09"}}],["Asia/Dubai",{s:{f:"+0400",n:"+04"}}],["Asia/Dushanbe",{s:{f:"+0500",n:"+05"}}],["Asia/Famagusta",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Asia/Gaza",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701031T010000",r:{m:10,d:"-1SA"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700328T010000",r:{m:3,d:"4SA"}}}],["Asia/Hebron",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701031T010000",r:{m:10,d:"-1SA"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700328T010000",r:{m:3,d:"4SA"}}}],["Asia/Ho_Chi_Minh",{s:{f:"+0700",n:"+07"}}],["Asia/Hong_Kong",{s:{f:"+0800",n:"HKT"}}],["Asia/Hovd",{s:{f:"+0700",n:"+07"}}],["Asia/Irkutsk",{s:{f:"+0800",n:"+08"}}],["Asia/Istanbul",{s:{f:"+0300",n:"+03"}}],["Asia/Jakarta",{s:{f:"+0700",n:"WIB"}}],["Asia/Jayapura",{s:{f:"+0900",n:"WIT"}}],["Asia/Jerusalem",{s:{f:"+0300",t:"+0200",n:"IST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"IDT",s:"19700327T020000",r:{m:3,d:"-1FR"}}}],["Asia/Kabul",{s:{f:"+0430",n:"+0430"}}],["Asia/Kamchatka",{s:{f:"+1200",n:"+12"}}],["Asia/Karachi",{s:{f:"+0500",n:"PKT"}}],["Asia/Kathmandu",{s:{f:"+0545",n:"+0545"}}],["Asia/Khandyga",{s:{f:"+0900",n:"+09"}}],["Asia/Kolkata",{s:{f:"+0530",n:"IST"}}],["Asia/Krasnoyarsk",{s:{f:"+0700",n:"+07"}}],["Asia/Kuala_Lumpur",{s:{f:"+0800",n:"+08"}}],["Asia/Kuching",{s:{f:"+0800",n:"+08"}}],["Asia/Kuwait",{s:{f:"+0300",n:"+03"}}],["Asia/Macau",{s:{f:"+0800",n:"CST"}}],["Asia/Magadan",{s:{f:"+1100",n:"+11"}}],["Asia/Makassar",{s:{f:"+0800",n:"WITA"}}],["Asia/Manila",{s:{f:"+0800",n:"PST"}}],["Asia/Muscat",{s:{f:"+0400",n:"+04"}}],["Asia/Nicosia",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Asia/Novokuznetsk",{s:{f:"+0700",n:"+07"}}],["Asia/Novosibirsk",{s:{f:"+0700",n:"+07"}}],["Asia/Omsk",{s:{f:"+0600",n:"+06"}}],["Asia/Oral",{s:{f:"+0500",n:"+05"}}],["Asia/Phnom_Penh",{s:{f:"+0700",n:"+07"}}],["Asia/Pontianak",{s:{f:"+0700",n:"WIB"}}],["Asia/Pyongyang",{s:{f:"+0900",n:"KST"}}],["Asia/Qatar",{s:{f:"+0300",n:"+03"}}],["Asia/Qyzylorda",{s:{f:"+0600",n:"+06"}}],["Asia/Riyadh",{s:{f:"+0300",n:"+03"}}],["Asia/Sakhalin",{s:{f:"+1100",n:"+11"}}],["Asia/Samarkand",{s:{f:"+0500",n:"+05"}}],["Asia/Seoul",{s:{f:"+0900",n:"KST"}}],["Asia/Shanghai",{s:{f:"+0800",n:"CST"}}],["Asia/Singapore",{s:{f:"+0800",n:"+08"}}],["Asia/Srednekolymsk",{s:{f:"+1100",n:"+11"}}],["Asia/Taipei",{s:{f:"+0800",n:"CST"}}],["Asia/Tashkent",{s:{f:"+0500",n:"+05"}}],["Asia/Tbilisi",{s:{f:"+0400",n:"+04"}}],["Asia/Tehran",{s:{f:"+0430",t:"+0330",n:"+0330",s:"19700921T000000",r:{m:9,d:"3SU"}},d:{f:"+0330",t:"+0430",n:"+0430",s:"19700321T000000",r:{m:3,d:"3SU"}}}],["Asia/Thimphu",{s:{f:"+0600",n:"+06"}}],["Asia/Tokyo",{s:{f:"+0900",n:"JST"}}],["Asia/Tomsk",{s:{f:"+0700",n:"+07"}}],["Asia/Ulaanbaatar",{s:{f:"+0800",n:"+08"}}],["Asia/Urumqi",{s:{f:"+0600",n:"+06"}}],["Asia/Ust-Nera",{s:{f:"+1000",n:"+10"}}],["Asia/Vientiane",{s:{f:"+0700",n:"+07"}}],["Asia/Vladivostok",{s:{f:"+1000",n:"+10"}}],["Asia/Yakutsk",{s:{f:"+0900",n:"+09"}}],["Asia/Yangon",{s:{f:"+0630",n:"+0630"}}],["Asia/Yekaterinburg",{s:{f:"+0500",n:"+05"}}],["Asia/Yerevan",{s:{f:"+0400",n:"+04"}}],["Atlantic/Azores",{s:{f:"+0000",t:"-0100",n:"-01",s:"19701025T010000",r:{m:10,d:"-1SU"}},d:{f:"-0100",t:"+0000",n:"+00",s:"19700329T000000",r:{m:3,d:"-1SU"}}}],["Atlantic/Bermuda",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["Atlantic/Canary",{s:{f:"+0100",t:"+0000",n:"WET",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"WEST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Atlantic/Cape_Verde",{s:{f:"-0100",n:"-01"}}],["Atlantic/Faroe",{s:{f:"+0100",t:"+0000",n:"WET",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"WEST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Atlantic/Madeira",{s:{f:"+0100",t:"+0000",n:"WET",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"WEST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Atlantic/Reykjavik",{s:{f:"+0000",n:"GMT"}}],["Atlantic/South_Georgia",{s:{f:"-0200",n:"-02"}}],["Atlantic/St_Helena",{s:{f:"+0000",n:"GMT"}}],["Atlantic/Stanley",{s:{f:"-0300",n:"-03"}}],["Australia/Adelaide",{s:{f:"+1030",t:"+0930",n:"ACST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+0930",t:"+1030",n:"ACDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Brisbane",{s:{f:"+1000",n:"AEST"}}],["Australia/Broken_Hill",{s:{f:"+1030",t:"+0930",n:"ACST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+0930",t:"+1030",n:"ACDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Currie",{s:{f:"+1100",t:"+1000",n:"AEST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1000",t:"+1100",n:"AEDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Darwin",{s:{f:"+0930",n:"ACST"}}],["Australia/Eucla",{s:{f:"+0845",n:"+0845"}}],["Australia/Hobart",{s:{f:"+1100",t:"+1000",n:"AEST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1000",t:"+1100",n:"AEDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Lindeman",{s:{f:"+1000",n:"AEST"}}],["Australia/Lord_Howe",{s:{f:"+1100",t:"+1030",n:"+1030",s:"19700405T020000",r:{m:4,d:"1SU"}},d:{f:"+1030",t:"+1100",n:"+11",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Melbourne",{s:{f:"+1100",t:"+1000",n:"AEST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1000",t:"+1100",n:"AEDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Perth",{s:{f:"+0800",n:"AWST"}}],["Australia/Sydney",{s:{f:"+1100",t:"+1000",n:"AEST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1000",t:"+1100",n:"AEDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Etc/GMT-0",{s:{f:"+0000",n:"GMT"}}],["Etc/GMT-1",{s:{f:"-0100",n:"-01"}}],["Etc/GMT-10",{s:{f:"-1000",n:"-10"}}],["Etc/GMT-11",{s:{f:"-1100",n:"-11"}}],["Etc/GMT-12",{s:{f:"-1200",n:"-12"}}],["Etc/GMT-2",{s:{f:"-0200",n:"-02"}}],["Etc/GMT-3",{s:{f:"-0300",n:"-03"}}],["Etc/GMT-4",{s:{f:"-0400",n:"-04"}}],["Etc/GMT-5",{s:{f:"-0500",n:"-05"}}],["Etc/GMT-6",{s:{f:"-0600",n:"-06"}}],["Etc/GMT-7",{s:{f:"-0700",n:"-07"}}],["Etc/GMT-8",{s:{f:"-0800",n:"-08"}}],["Etc/GMT-9",{s:{f:"-0900",n:"-09"}}],["Etc/GMT",{s:{f:"+0000",n:"GMT"}}],["Etc/GMT+0",{s:{f:"+0000",n:"GMT"}}],["Etc/GMT+1",{s:{f:"+0100",n:"+01"}}],["Etc/GMT+10",{s:{f:"+1000",n:"+10"}}],["Etc/GMT+11",{s:{f:"+1100",n:"+11"}}],["Etc/GMT+12",{s:{f:"+1200",n:"+12"}}],["Etc/GMT+13",{s:{f:"+1300",n:"+13"}}],["Etc/GMT+14",{s:{f:"+1400",n:"+14"}}],["Etc/GMT+2",{s:{f:"+0200",n:"+02"}}],["Etc/GMT+3",{s:{f:"+0300",n:"+03"}}],["Etc/GMT+4",{s:{f:"+0400",n:"+04"}}],["Etc/GMT+5",{s:{f:"+0500",n:"+05"}}],["Etc/GMT+6",{s:{f:"+0600",n:"+06"}}],["Etc/GMT+7",{s:{f:"+0700",n:"+07"}}],["Etc/GMT+8",{s:{f:"+0800",n:"+08"}}],["Etc/GMT+9",{s:{f:"+0900",n:"+09"}}],["Etc/GMT0",{s:{f:"+0000",n:"GMT"}}],["Etc/Greenwich",{s:{f:"+0000",n:"GMT"}}],["Etc/UCT",{s:{f:"+0000",n:"UCT"}}],["Etc/Universal",{s:{f:"+0000",n:"UTC"}}],["Etc/UTC",{s:{f:"+0000",n:"UTC"}}],["Etc/Zulu",{s:{f:"+0000",n:"UTC"}}],["Europe/Amsterdam",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Andorra",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Astrakhan",{s:{f:"+0400",n:"+04"}}],["Europe/Athens",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Belgrade",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Berlin",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Bratislava",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Brussels",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Bucharest",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Budapest",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Busingen",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Chisinau",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Copenhagen",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Dublin",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"IST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Gibraltar",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Guernsey",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"BST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Helsinki",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Isle_of_Man",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"BST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Istanbul",{s:{f:"+0300",n:"+03"}}],["Europe/Jersey",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"BST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Kaliningrad",{s:{f:"+0200",n:"EET"}}],["Europe/Kiev",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Kirov",{s:{f:"+0300",n:"+03"}}],["Europe/Lisbon",{s:{f:"+0100",t:"+0000",n:"WET",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"WEST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Ljubljana",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/London",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"BST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Luxembourg",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Madrid",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Malta",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Mariehamn",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Minsk",{s:{f:"+0300",n:"+03"}}],["Europe/Monaco",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Moscow",{s:{f:"+0300",n:"MSK"}}],["Europe/Nicosia",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Oslo",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Paris",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Podgorica",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Prague",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Riga",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Rome",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Samara",{s:{f:"+0400",n:"+04"}}],["Europe/San_Marino",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Sarajevo",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Saratov",{s:{f:"+0400",n:"+04"}}],["Europe/Simferopol",{s:{f:"+0300",n:"MSK"}}],["Europe/Skopje",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Sofia",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Stockholm",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Tallinn",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Tirane",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Ulyanovsk",{s:{f:"+0400",n:"+04"}}],["Europe/Uzhgorod",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Vaduz",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Vatican",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Vienna",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Vilnius",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Volgograd",{s:{f:"+0400",n:"+04"}}],["Europe/Warsaw",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Zagreb",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Zaporozhye",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Zurich",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Indian/Antananarivo",{s:{f:"+0300",n:"EAT"}}],["Indian/Chagos",{s:{f:"+0600",n:"+06"}}],["Indian/Christmas",{s:{f:"+0700",n:"+07"}}],["Indian/Cocos",{s:{f:"+0630",n:"+0630"}}],["Indian/Comoro",{s:{f:"+0300",n:"EAT"}}],["Indian/Kerguelen",{s:{f:"+0500",n:"+05"}}],["Indian/Mahe",{s:{f:"+0400",n:"+04"}}],["Indian/Maldives",{s:{f:"+0500",n:"+05"}}],["Indian/Mauritius",{s:{f:"+0400",n:"+04"}}],["Indian/Mayotte",{s:{f:"+0300",n:"EAT"}}],["Indian/Reunion",{s:{f:"+0400",n:"+04"}}],["Pacific/Apia",{s:{f:"+1400",t:"+1300",n:"+13",s:"19700405T040000",r:{m:4,d:"1SU"}},d:{f:"+1300",t:"+1400",n:"+14",s:"19700927T030000",r:{m:9,d:"-1SU"}}}],["Pacific/Auckland",{s:{f:"+1300",t:"+1200",n:"NZST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1200",t:"+1300",n:"NZDT",s:"19700927T020000",r:{m:9,d:"-1SU"}}}],["Pacific/Bougainville",{s:{f:"+1100",n:"+11"}}],["Pacific/Chatham",{s:{f:"+1345",t:"+1245",n:"+1245",s:"19700405T034500",r:{m:4,d:"1SU"}},d:{f:"+1245",t:"+1345",n:"+1345",s:"19700927T024500",r:{m:9,d:"-1SU"}}}],["Pacific/Chuuk",{s:{f:"+1000",n:"+10"}}],["Pacific/Easter",{s:{f:"-0500",t:"-0600",n:"-06",s:"19700404T220000",r:{m:4,d:"1SA"}},d:{f:"-0600",t:"-0500",n:"-05",s:"19700905T220000",r:{m:9,d:"1SA"}}}],["Pacific/Efate",{s:{f:"+1100",n:"+11"}}],["Pacific/Enderbury",{s:{f:"+1300",n:"+13"}}],["Pacific/Fakaofo",{s:{f:"+1300",n:"+13"}}],["Pacific/Fiji",{s:{f:"+1300",t:"+1200",n:"+12",s:"19700118T030000",r:{m:1,d:"-2SU"}},d:{f:"+1200",t:"+1300",n:"+13",s:"19701101T020000",r:{m:11,d:"1SU"}}}],["Pacific/Funafuti",{s:{f:"+1200",n:"+12"}}],["Pacific/Galapagos",{s:{f:"-0600",n:"-06"}}],["Pacific/Gambier",{s:{f:"-0900",n:"-09"}}],["Pacific/Guadalcanal",{s:{f:"+1100",n:"+11"}}],["Pacific/Guam",{s:{f:"+1000",n:"ChST"}}],["Pacific/Honolulu",{s:{f:"-1000",n:"HST"}}],["Pacific/Kiritimati",{s:{f:"+1400",n:"+14"}}],["Pacific/Kosrae",{s:{f:"+1100",n:"+11"}}],["Pacific/Kwajalein",{s:{f:"+1200",n:"+12"}}],["Pacific/Majuro",{s:{f:"+1200",n:"+12"}}],["Pacific/Marquesas",{s:{f:"-0930",n:"-0930"}}],["Pacific/Midway",{s:{f:"-1100",n:"SST"}}],["Pacific/Nauru",{s:{f:"+1200",n:"+12"}}],["Pacific/Niue",{s:{f:"-1100",n:"-11"}}],["Pacific/Norfolk",{s:{f:"+1100",n:"+11"}}],["Pacific/Noumea",{s:{f:"+1100",n:"+11"}}],["Pacific/Pago_Pago",{s:{f:"-1100",n:"SST"}}],["Pacific/Palau",{s:{f:"+0900",n:"+09"}}],["Pacific/Pitcairn",{s:{f:"-0800",n:"-08"}}],["Pacific/Pohnpei",{s:{f:"+1100",n:"+11"}}],["Pacific/Port_Moresby",{s:{f:"+1000",n:"+10"}}],["Pacific/Rarotonga",{s:{f:"-1000",n:"-10"}}],["Pacific/Saipan",{s:{f:"+1000",n:"ChST"}}],["Pacific/Tahiti",{s:{f:"-1000",n:"-10"}}],["Pacific/Tarawa",{s:{f:"+1200",n:"+12"}}],["Pacific/Tongatapu",{s:{f:"+1300",n:"+13"}}],["Pacific/Wake",{s:{f:"+1200",n:"+12"}}],["Pacific/Wallis",{s:{f:"+1200",n:"+12"}}]])),ct}var $t;function $e(){if($t)return rt;$t=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.getZoneString=rt.getZoneLines=void 0;const a=Je();function t(r){const{n:i,f:o,t:n,r:l,s:u}=r;return[`TZNAME:${i}`,`TZOFFSETFROM:${o}`,`TZOFFSETTO:${n||o}`,`DTSTART:${u||a.defaultStart}`,...l?[`RRULE:FREQ=${l.f||"YEARLY"};BYMONTH=${l.m};BYDAY=${l.d}`]:[]]}function e(r,i=!0){const o=a.zonesMap.get(r);if(o){const{s:n,d:l}=o;return[...i?["BEGIN:VTIMEZONE"]:[],`TZID:${r}`,"BEGIN:STANDARD",...t(n),"END:STANDARD",...l?["BEGIN:DAYLIGHT",...t(l),"END:DAYLIGHT"]:[],...i?["END:VTIMEZONE"]:[]]}}rt.getZoneLines=e;function s(r,i=!0){return e(r,i)?.join(`\r `)}return rt.getZoneString=s,rt}var Xe=$e();class Nt{static fromString(t){return new Nt(t)}constructor(t){this.value=t}icaltype="binary";decodeValue(){return this._b64_decode(this.value)}setEncodedValue(t){this.value=this._b64_encode(t)}_b64_encode(t){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s,r,i,o,n,l,u,c,d=0,m=0,p="",y=[];if(!t)return t;do s=t.charCodeAt(d++),r=t.charCodeAt(d++),i=t.charCodeAt(d++),c=s<<16|r<<8|i,o=c>>18&63,n=c>>12&63,l=c>>6&63,u=c&63,y[m++]=e.charAt(o)+e.charAt(n)+e.charAt(l)+e.charAt(u);while(d>16&255,r=c>>8&255,i=c&255,l==64?y[m++]=String.fromCharCode(s):u==64?y[m++]=String.fromCharCode(s,r):y[m++]=String.fromCharCode(s,r,i);while(ds)-(e0?-1:0}toString(){return this.start+"/"+(this.end||this.duration)}toJSON(){return[this.start.toString(),(this.end||this.duration).toString()]}toICALString(){return this.start.toICALString()+"/"+(this.end||this.duration).toICALString()}}class h{static _dowCache={};static _wnCache={};static daysInMonth(t,e){let s=[0,31,28,31,30,31,30,31,31,30,31,30,31],r=30;return t<1||t>12||(r=s[t],t==2&&(r+=h.isLeapYear(e))),r}static isLeapYear(t){return t<=1752?t%4==0:t%4==0&&t%100!=0||t%400==0}static fromDayOfYear(t,e){let s=e,r=t,i=new h;i.auto_normalize=!1;let o=h.isLeapYear(s)?1:0;if(r<1)return s--,o=h.isLeapYear(s)?1:0,r+=h.daysInYearPassedMonth[o][12],h.fromDayOfYear(r,s);if(r>h.daysInYearPassedMonth[o][12])return o=h.isLeapYear(s)?1:0,r-=h.daysInYearPassedMonth[o][12],s++,h.fromDayOfYear(r,s);i.year=s,i.isDate=!0;for(let n=11;n>=0;n--)if(r>h.daysInYearPassedMonth[o][n]){i.month=n+1,i.day=r-h.daysInYearPassedMonth[o][n];break}return i.auto_normalize=!0,i}static fromStringv2(t){return new h({year:parseInt(t.slice(0,4),10),month:parseInt(t.slice(5,7),10),day:parseInt(t.slice(8,10),10),isDate:!0})}static fromDateString(t){return new h({year:O(t.slice(0,4)),month:O(t.slice(5,7)),day:O(t.slice(8,10)),isDate:!0})}static fromDateTimeString(t,e){if(t.length<19)throw new Error('invalid date-time value: "'+t+'"');let s,r;t.slice(-1)==="Z"?s=T.utcTimezone:e&&(r=e.getParameter("tzid"),e.parent&&(e.parent.name==="standard"||e.parent.name==="daylight"?s=T.localTimezone:r&&(s=e.parent.getTimeZoneByID(r))));const i={year:O(t.slice(0,4)),month:O(t.slice(5,7)),day:O(t.slice(8,10)),hour:O(t.slice(11,13)),minute:O(t.slice(14,16)),second:O(t.slice(17,19))};return r&&!s&&(i.timezone=r),new h(i,s)}static fromString(t,e){return t.length>10?h.fromDateTimeString(t,e):h.fromDateString(t)}static fromJSDate(t,e){return new h().fromJSDate(t,e)}static fromData=function(t,e){return new h().fromData(t,e)};static now(){return h.fromJSDate(new Date,!1)}static weekOneStarts(t,e){let s=h.fromData({year:t,month:1,day:1,isDate:!0}),r=s.dayOfWeek(),i=e||h.DEFAULT_WEEK_START;return r>h.THURSDAY&&(s.day+=7),i>h.THURSDAY&&(s.day-=7),s.day-=r-i,s}static getDominicalLetter(t){let e="GFEDCBA",s=(t+(t/4|0)+(t/400|0)-(t/100|0)-1)%7;return h.isLeapYear(t)?e[(s+6)%7]+e[s]:e[s]}static#t=null;static get epochTime(){return this.#t||(this.#t=h.fromData({year:1970,month:1,day:1,hour:0,minute:0,second:0,isDate:!1,timezone:"Z"})),this.#t}static _cmp_attr(t,e,s){return t[s]>e[s]?1:t[s]=0){n.day=1,i!=0&&i--,o=n.day;let l=n.dayOfWeek(),u=t-l;u<0&&(u+=7),o+=u,o-=t,r=t}else{n.day=s;let l=n.dayOfWeek();i++,r=l-t,r<0&&(r+=7),r=s-r}return r+=i*7,o+r}isNthWeekDay(t,e){let s=this.dayOfWeek();return e===0&&s===t||this.nthWeekDay(t,e)===this.day}weekNumber(t){let e=(this.year<<12)+(this.month<<8)+(this.day<<3)+t;if(e in h._wnCache)return h._wnCache[e];let s,r=this.clone();r.isDate=!0;let i=this.year;r.month==12&&r.day>25?(s=h.weekOneStarts(i+1,t),r.compare(s)<0?s=h.weekOneStarts(i,t):i++):(s=h.weekOneStarts(i,t),r.compare(s)<0&&(s=h.weekOneStarts(--i,t)));let o=r.subtractDate(s).toSeconds()/86400,n=C(o/7)+1;return h._wnCache[e]=n,n}addDuration(t){let e=t.isNegative?-1:1,s=this.second,r=this.minute,i=this.hour,o=this.day;s+=e*t.seconds,r+=e*t.minutes,i+=e*t.hours,o+=e*t.days,o+=e*7*t.weeks,this.second=s,this.minute=r,this.hour=i,this.day=o,this._cachedUnixTime=null}subtractDate(t){let e=this.toUnixTime()+this.utcOffset(),s=t.toUnixTime()+t.utcOffset();return M.fromSeconds(e-s)}subtractDateTz(t){let e=this.toUnixTime(),s=t.toUnixTime();return M.fromSeconds(e-s)}compare(t){if(t instanceof K)return-1*t.compare(this);{let e=this.toUnixTime(),s=t.toUnixTime();return e>s?1:s>e?-1:0}}compareDateOnlyTz(t,e){let s=this.convertToZone(e),r=t.convertToZone(e),i=0;return(i=h._cmp_attr(s,r,"year"))!=0||(i=h._cmp_attr(s,r,"month"))!=0||(i=h._cmp_attr(s,r,"day"))!=0,i}convertToZone(t){let e=this.clone(),s=this.zone.tzid==t.tzid;return!this.isDate&&!s&&T.convert_time(e,this.zone,t),e.zone=t,e}utcOffset(){return this.zone==T.localTimezone||this.zone==T.utcTimezone?0:this.zone.utcOffset(this)}toICALString(){let t=this.toString();return t.length>10?b.icalendar.value["date-time"].toICAL(t):b.icalendar.value.date.toICAL(t)}toString(){let t=this.year+"-"+k(this.month)+"-"+k(this.day);return this.isDate||(t+="T"+k(this.hour)+":"+k(this.minute)+":"+k(this.second),this.zone===T.utcTimezone&&(t+="Z")),t}toJSDate(){return this.zone==T.localTimezone?this.isDate?new Date(this.year,this.month-1,this.day):new Date(this.year,this.month-1,this.day,this.hour,this.minute,this.second,0):new Date(this.toUnixTime()*1e3)}_normalize(){return this._time.isDate&&(this._time.hour=0,this._time.minute=0,this._time.second=0),this.adjust(0,0,0,0),this}adjust(t,e,s,r,i){let o,n,l=0,u=0,c,d,m,p,y,f=i||this._time;if(f.isDate||(c=f.second+r,f.second=c%60,o=C(c/60),f.second<0&&(f.second+=60,o--),d=f.minute+s+o,f.minute=d%60,n=C(d/60),f.minute<0&&(f.minute+=60,n--),m=f.hour+e+n,f.hour=m%24,l=C(m/24),f.hour<0&&(f.hour+=24,l--)),f.month>12?u=C((f.month-1)/12):f.month<1&&(u=C(f.month/12)-1),f.year+=u,f.month-=12*u,p=f.day+t+l,p>0)for(;y=h.daysInMonth(f.month,f.year),!(p<=y);)f.month++,f.month>12&&(f.year++,f.month=1),p-=y;else for(;p<=0;)f.month==1?(f.year--,f.month=12):f.month--,p+=h.daysInMonth(f.month,f.year);return f.day=p,this._cachedUnixTime=null,this}fromUnixTime(t){this.zone=T.utcTimezone;let e=new Date(t*1e3);this.year=e.getUTCFullYear(),this.month=e.getUTCMonth()+1,this.day=e.getUTCDate(),this._time.isDate?(this.hour=0,this.minute=0,this.second=0):(this.hour=e.getUTCHours(),this.minute=e.getUTCMinutes(),this.second=e.getUTCSeconds()),this._cachedUnixTime=null}toUnixTime(){if(this._cachedUnixTime!==null)return this._cachedUnixTime;let t=this.utcOffset(),e=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second-t);return this._cachedUnixTime=e/1e3,this._cachedUnixTime}toJSON(){let t=["year","month","day","hour","minute","second","isDate"],e=Object.create(null),s=0,r=t.length,i;for(;s1)throw new it("invalid ical body. component began but did not end");return t=null,e.length==1?e[0]:e}g.property=function(a,t){let e={component:[[],[]],designSet:t||b.defaultSet};return g._handleContentLine(a,e),e.component[1][0]},g.component=function(a){return g(a)};class it extends Error{name=this.constructor.name}g.ParserError=it,g._handleContentLine=function(a,t){let e=a.indexOf(At),s=a.indexOf(xt),r,i,o,n,l={};s!==-1&&e!==-1&&s>e&&(s=-1);let u;if(s!==-1){if(o=a.slice(0,Math.max(0,s)).toLowerCase(),u=g._parseParameters(a.slice(Math.max(0,s)),0,t.designSet),u[2]==-1)throw new it("Invalid parameters in '"+a+"'");l=u[0];let U;if(typeof u[1]=="string"?U=u[1].length:U=u[1].reduce((ht,at)=>ht+at.length,0),r=U+u[2]+s,(i=a.slice(Math.max(0,r)).indexOf(At))!==-1)n=a.slice(Math.max(0,r+i+1));else throw new it("Missing parameter value in '"+a+"'")}else if(e!==-1){if(o=a.slice(0,Math.max(0,e)).toLowerCase(),n=a.slice(Math.max(0,e+1)),o==="begin"){let U=[n.toLowerCase(),[],[]];t.stack.length===1?t.component.push(U):t.component[2].push(U),t.stack.push(t.component),t.component=U,t.designSet||(t.designSet=b.getDesignSet(t.component[0]));return}else if(o==="end"){t.component=t.stack.pop();return}}else throw new it('invalid line (no token ";" or ":") "'+a+'"');let c,d=!1,m=!1,p,y,f;t.designSet.propertyGroups&&o.indexOf(".")!==-1?(y=o.split("."),l.group=y[0],f=y[1]):f=o,f in t.designSet.property&&(p=t.designSet.property[f],"multiValue"in p&&(d=p.multiValue),"structuredValue"in p&&(m=p.structuredValue),n&&"detectType"in p&&(c=p.detectType(n))),c||("value"in l?c=l.value.toLowerCase():p?c=p.defaultType:c=r0),delete l.value;let A;d&&m?(n=g._parseMultiValue(n,m,c,[],d,t.designSet,m),A=[f,l,c,n]):d?(A=[f,l,c],g._parseMultiValue(n,d,c,A,null,t.designSet,!1)):m?(n=g._parseMultiValue(n,m,c,[],null,t.designSet,m),A=[f,l,c,n]):(n=g._parseValue(n,c,t.designSet,!1),A=[f,l,c,n]),t.component[0]==="vcard"&&t.component[1].length===0&&!(o==="version"&&n==="4.0")&&(t.designSet=b.getDesignSet("vcard3")),t.component[1].push(A)},g._parseValue=function(a,t,e,s){return t in e.value&&"fromICAL"in e.value[t]?e.value[t].fromICAL(a,s):a},g._parseParameters=function(a,t,e){let s=t,r=0,i=a0,o={},n,l,u,c=-1,d,m,p;for(;r!==!1&&(r=a.indexOf(i,r+1))!==-1;){if(n=a.slice(s+1,r),n.length==0)throw new it("Empty parameter name in '"+a+"'");if(l=n.toLowerCase(),p=!1,m=!1,l in e.param&&e.param[l].valueType?d=e.param[l].valueType:d=i0,l in e.param&&(m=e.param[l].multiValue,e.param[l].multiValueSeparateDQuote&&(p=g._rfc6868Escape('"'+m+'"'))),a[r+1]==='"'){if(c=r+2,r=a.indexOf('"',c),m&&r!=-1){let A=!0;for(;A;)a[r+1]==m&&a[r+2]=='"'?r=a.indexOf('"',r+3):A=!1}if(r===-1)throw new it('invalid line (no matching double quote) "'+a+'"');u=a.slice(c,r),s=a.indexOf(xt,r);let f=a.indexOf(At,r);(s===-1||f!==-1&&s>f)&&(r=!1)}else{c=r+1;let f=a.indexOf(xt,c),A=a.indexOf(At,c);A!==-1&&f>A?(f=A,r=!1):f===-1?(A===-1?f=a.length:f=A,r=!1):(s=f,r=f),u=a.slice(c,f)}const y=u.length;if(u=g._rfc6868Escape(u),c+=y-u.length,m){let f=p||m;u=g._parseMultiValue(u,f,d,[],null,e)}else u=g._parseValue(u,d,e);m&&l in o?Array.isArray(o[l])?o[l].push(u):o[l]=[o[l],u]:o[l]=u}return[o,u,c]},g._rfc6868Escape=function(a){return a.replace(/\^['n^]/g,function(t){return n0[t]})},g._parseMultiValue=function(a,t,e,s,r,i,o){let n=0,l=0,u;if(t.length===0)return a;for(;(n=fe(a,t,l))!==-1;)u=a.slice(l,n),r?u=g._parseMultiValue(u,r,e,[],null,i,o):u=g._parseValue(u,e,i,o),s.push(u),l=n+t.length;return u=a.slice(l),r?u=g._parseMultiValue(u,r,e,[],null,i,o):u=g._parseValue(u,e,i,o),s.push(u),s.length==1?s[0]:s},g._eachLine=function(a,t){let e=a.length,s=a.search(s0),r=s,i,o,n;do r=a.indexOf(` `,s)+1,r>1&&a[r-2]==="\r"?n=2:n=1,r===0&&(r=e,n=0),o=a[s],o===" "||o===" "?i+=a.slice(s+1,r-n):(i&&t(null,i),i=a.slice(s,r-n)),s=r;while(r!==e);i=i.trim(),i.length&&t(null,i)};const o0=["tzid","location","tznames","latitude","longitude"];class T{static _compare_change_fn(t,e){return t.yeare.year?1:t.monthe.month?1:t.daye.day?1:t.houre.hour?1:t.minutee.minute?1:t.seconde.second?1:0}static convert_time(t,e,s){if(t.isDate||e.tzid==s.tzid||e==T.localTimezone||s==T.localTimezone)return t.zone=s,t;let r=e.utcOffset(t);return t.adjust(0,0,0,-r),r=s.utcOffset(t),t.adjust(0,0,0,r),null}static fromData(t){return new T().fromData(t)}static#t=null;static get utcTimezone(){return this.#t||(this.#t=T.fromData({tzid:"UTC"})),this.#t}static#e=null;static get localTimezone(){return this.#e||(this.#e=T.fromData({tzid:"floating"})),this.#e}static adjust_change(t,e,s,r,i){return h.prototype.adjust.call(t,e,s,r,i,t)}static _minimumExpansionYear=-1;static EXTRA_COVERAGE=5;constructor(t){this.wrappedJSObject=this,this.fromData(t)}tzid="";location="";tznames="";latitude=0;longitude=0;component=null;expandedUntilYear=0;icalclass="icaltimezone";fromData(t){if(this.expandedUntilYear=0,this.changes=[],t instanceof z)this.component=t;else{if(t&&"component"in t)if(typeof t.component=="string"){let e=g(t.component);this.component=new z(e)}else t.component instanceof z?this.component=t.component:this.component=null;for(let e of o0)t&&e in t&&(this[e]=t[e])}return this.component instanceof z&&!this.tzid&&(this.tzid=this.component.getFirstPropertyValue("tzid")),this}utcOffset(t){if(this==T.utcTimezone||this==T.localTimezone||(this._ensureCoverage(t.year),!this.changes.length))return 0;let e={year:t.year,month:t.month,day:t.day,hour:t.hour,minute:t.minute,second:t.second},s=this._findNearbyChange(e),r=-1,i=1;for(;;){let n=lt(this.changes[s],!0);if(n.utcOffset=0?r=s:i=-1,i==-1&&r!=-1)break;if(s+=i,s<0)return 0;if(s>=this.changes.length)break}let o=this.changes[r];if(o.utcOffset-o.prevUtcOffset<0&&r>0){let n=lt(o,!0);if(T.adjust_change(n,0,0,0,n.prevUtcOffset),T._compare_change_fn(e,n)<0){let l=this.changes[r-1],u=!1;o.is_daylight!=u&&l.is_daylight==u&&(o=l)}}return o.utcOffset}_findNearbyChange(t){let e=nt(this.changes,t,T._compare_change_fn);return e>=this.changes.length?this.changes.length-1:e}_ensureCoverage(t){if(T._minimumExpansionYear==-1){let s=h.now();T._minimumExpansionYear=s.year}let e=t;if(ee||!d));)i.year=d.year,i.month=d.month,i.day=d.day,i.hour=d.hour,i.minute=d.minute,i.second=d.second,i.isDate=d.isDate,T.adjust_change(i,0,0,0,-i.prevUtcOffset),s.push(i)}}return s}toString(){return this.tznames?this.tznames:this.tzid}}let N=null;const wt={get count(){return N===null?0:Object.keys(N).length},reset:function(){N=Object.create(null);let a=T.utcTimezone;N.Z=a,N.UTC=a,N.GMT=a},_hard_reset:function(){N=null},has:function(a){return N===null?!1:!!N[a]},get:function(a){return N===null&&this.reset(),N[a]},register:function(a,t){if(N===null&&this.reset(),typeof a=="string"&&t instanceof T&&([a,t]=[t,a]),t||(a instanceof T?t=a.tzid:a.name==="vtimezone"&&(a=new T(a),t=a.tzid)),!t)throw new TypeError("Neither a timezone nor a name was passed");if(a instanceof T)N[t]=a;else throw new TypeError("timezone must be ICAL.Timezone or ICAL.Component")},remove:function(a){return N===null?null:delete N[a]}};function l0(a){let t,e,s,r,i;if(!a||a.name!=="vcalendar")return a;for(t=a.getAllSubcomponents(),e=[],s={},i=0;i"u"))return a instanceof t?a:new t(a)}function fe(a,t,e){for(;(e=a.indexOf(t,e))!==-1;)if(e>0&&a[e-1]==="\\")e+=1;else return e;return-1}function nt(a,t,e){if(!a.length)return 0;let s=0,r=a.length-1,i,o;for(;s<=r;)if(i=s+Math.floor((r-s)/2),o=e(t,a[i]),o<0)r=i-1;else if(o>0)s=i+1;else break;return o<0?i:o>0?i+1:i}function lt(a,t){if(!a||typeof a!="object")return a;if(a instanceof Date)return new Date(a.getTime());if("clone"in a)return a.clone();if(Array.isArray(a)){let e=[];for(let s=0;s65535?2:1:(t+=L.newLineChar+" "+e.slice(0,Math.max(0,s)),e=e.slice(Math.max(0,s)),s=r=0)}return t.slice(L.newLineChar.length+1)}function k(a){switch(typeof a!="string"&&(typeof a=="number"&&(a=parseInt(a)),a=String(a)),a.length){case 0:return"00";case 1:return"0"+a;default:return a}}function C(a){return a<0?Math.ceil(a):Math.floor(a)}function ut(a,t){for(let e in a){let s=Object.getOwnPropertyDescriptor(a,e);s&&!Object.getOwnPropertyDescriptor(t,e)&&Object.defineProperty(t,e,s)}return t}var u0=Object.freeze({__proto__:null,binsearchInsert:nt,clone:lt,extend:ut,foldline:pe,formatClassType:q,isStrictlyNaN:pt,pad2:k,strictParseInt:O,trunc:C,unescapedIndexOf:fe,updateTimezones:l0});class V{static fromString(t){let e={};return e.factor=t[0]==="+"?1:-1,e.hours=O(t.slice(1,3)),e.minutes=O(t.slice(4,6)),new V(e)}static fromSeconds(t){let e=new V;return e.fromSeconds(t),e}constructor(t){this.fromData(t)}hours=0;minutes=0;factor=1;icaltype="utc-offset";clone(){return V.fromSeconds(this.toSeconds())}fromData(t){if(t)for(let[e,s]of Object.entries(t))this[e]=s;this._normalize()}fromSeconds(t){let e=Math.abs(t);return this.factor=t<0?-1:1,this.hours=C(e/3600),e-=this.hours*3600,this.minutes=C(e/60),this}toSeconds(){return this.factor*(60*this.minutes+3600*this.hours)}compare(t){let e=this.toSeconds(),s=t.toSeconds();return(e>s)-(s>e)}_normalize(){let t=this.toSeconds(),e=this.factor;for(;t<-43200;)t+=97200;for(;t>50400;)t-=97200;this.fromSeconds(t),t==0&&(this.factor=e)}toICALString(){return b.icalendar.value["utc-offset"].toICAL(this.toString())}toString(){return(this.factor==1?"+":"-")+k(this.hours)+":"+k(this.minutes)}}class tt extends h{static fromDateAndOrTimeString(t,e){function s(f,A,U){return f?O(f.slice(A,A+U)):null}let r=t.split("T"),i=r[0],o=r[1],n=o?b.vcard.value.time._splitZone(o):[],l=n[0],u=n[1],c=i?i.length:0,d=u?u.length:0,m=i&&i[0]=="-"&&i[1]=="-",p=u&&u[0]=="-",y={year:m?null:s(i,0,4),month:m&&(c==4||c==7)?s(i,2,2):c==7||c==10?s(i,5,2):null,day:c==5?s(i,3,2):c==7&&m?s(i,5,2):c==10?s(i,8,2):null,hour:p?null:s(u,0,2),minute:p&&d==3?s(u,1,2):d>4?p?s(u,1,2):s(u,3,2):null,second:d==4?s(u,2,2):d==6?s(u,4,2):d==8?s(u,6,2):null};return l=="Z"?l=T.utcTimezone:l&&l[3]==":"?l=V.fromString(l):l=null,new tt(y,l,e)}constructor(t,e,s){super(t,e),this.icaltype=s||"date-and-or-time"}icalclass="vcardtime";icaltype="date-and-or-time";clone(){return new tt(this._time,this.zone,this.icaltype)}_normalize(){return this}utcOffset(){return this.zone instanceof V?this.zone.toSeconds():h.prototype.utcOffset.apply(this,arguments)}toICALString(){return b.vcard.value[this.icaltype].toICAL(this.toString())}toString(){let t=this.year,e=this.month,s=this.day,r=this.hour,i=this.minute,o=this.second,n=t!==null,l=e!==null,u=s!==null,c=r!==null,d=i!==null,m=o!==null,p=(n?k(t)+(l||u?"-":""):l||u?"--":"")+(l?k(e):"")+(u?"-"+k(s):""),y=(c?k(r):"-")+(c&&d?":":"")+(d?k(i):"")+(!c&&!d?"-":"")+(d&&m?":":"")+(m?k(o):""),f;switch(this.zone===T.utcTimezone?f="Z":this.zone instanceof V?f=this.zone.toString():this.zone===T.localTimezone?f="":this.zone instanceof T?f=V.fromSeconds(this.zone.utcOffset(this)).toString():f="",this.icaltype){case"time":return y+f;case"date-and-or-time":case"date-time":return p+(y=="--"?"":"T"+y+f);case"date":return p}return null}}class R{static _indexMap={BYSECOND:0,BYMINUTE:1,BYHOUR:2,BYDAY:3,BYMONTHDAY:4,BYYEARDAY:5,BYWEEKNO:6,BYMONTH:7,BYSETPOS:8};static _expandMap={SECONDLY:[1,1,1,1,1,1,1,1],MINUTELY:[2,1,1,1,1,1,1,1],HOURLY:[2,2,1,1,1,1,1,1],DAILY:[2,2,2,1,1,1,1,1],WEEKLY:[2,2,2,2,3,3,1,1],MONTHLY:[2,2,2,2,2,3,3,1],YEARLY:[2,2,2,2,2,2,2,2]};static UNKNOWN=0;static CONTRACT=1;static EXPAND=2;static ILLEGAL=3;constructor(t){this.fromData(t)}completed=!1;rule=null;dtstart=null;last=null;occurrence_number=0;by_indices=null;initialized=!1;by_data=null;days=null;days_index=0;fromData(t){if(this.rule=q(t.rule,w),!this.rule)throw new Error("iterator requires a (ICAL.Recur) rule");if(this.dtstart=q(t.dtstart,h),!this.dtstart)throw new Error("iterator requires a (ICAL.Time) dtstart");if(t.by_data?this.by_data=t.by_data:this.by_data=lt(this.rule.parts,!0),t.occurrence_number&&(this.occurrence_number=t.occurrence_number),this.days=t.days||[],t.last&&(this.last=q(t.last,h)),this.by_indices=t.by_indices,this.by_indices||(this.by_indices={BYSECOND:0,BYMINUTE:0,BYHOUR:0,BYDAY:0,BYMONTH:0,BYWEEKNO:0,BYMONTHDAY:0}),this.initialized=t.initialized||!1,!this.initialized)try{this.init()}catch(e){if(e instanceof gt)this.completed=!0;else throw e}}init(){this.initialized=!0,this.last=this.dtstart.clone();let t=this.by_data;if("BYDAY"in t&&this.sort_byday_rules(t.BYDAY),"BYYEARDAY"in t&&("BYMONTH"in t||"BYWEEKNO"in t||"BYMONTHDAY"in t))throw new Error("Invalid BYYEARDAY rule");if("BYWEEKNO"in t&&"BYMONTHDAY"in t)throw new Error("BYWEEKNO does not fit to BYMONTHDAY");if(this.rule.freq=="MONTHLY"&&("BYYEARDAY"in t||"BYWEEKNO"in t))throw new Error("For MONTHLY recurrences neither BYYEARDAY nor BYWEEKNO may appear");if(this.rule.freq=="WEEKLY"&&("BYYEARDAY"in t||"BYMONTHDAY"in t))throw new Error("For WEEKLY recurrences neither BYMONTHDAY nor BYYEARDAY may appear");if(this.rule.freq!="YEARLY"&&"BYYEARDAY"in t)throw new Error("BYYEARDAY may only appear in YEARLY rules");if(this.last.second=this.setup_defaults("BYSECOND","SECONDLY",this.dtstart.second),this.last.minute=this.setup_defaults("BYMINUTE","MINUTELY",this.dtstart.minute),this.last.hour=this.setup_defaults("BYHOUR","HOURLY",this.dtstart.hour),this.last.day=this.setup_defaults("BYMONTHDAY","DAILY",this.dtstart.day),this.last.month=this.setup_defaults("BYMONTH","MONTHLY",this.dtstart.month),this.rule.freq=="WEEKLY")if("BYDAY"in t){let[,e]=this.ruleDayOfWeek(t.BYDAY[0],this.rule.wkst),s=e-this.last.dayOfWeek(this.rule.wkst);(this.last.dayOfWeek(this.rule.wkst)=0||s<0)&&(this.last.day+=s)}else{let e=w.numericDayToIcalDay(this.dtstart.dayOfWeek());t.BYDAY=[e]}if(this.rule.freq=="YEARLY"){const e=this.rule.until?this.rule.until.year:2e4;for(;this.last.year<=e&&(this.expand_year_days(this.last.year),!(this.days.length>0));)this.increment_year(this.rule.interval);if(this.days.length==0)throw new gt;if(!this._nextByYearDay()&&!this.next_year()&&!this.next_year()&&!this.next_year())throw new gt}if(this.rule.freq=="MONTHLY"){if(this.has_by_data("BYDAY")){let e=null,s=this.last.clone(),r=h.daysInMonth(this.last.month,this.last.year);for(let i of this.by_data.BYDAY){this.last=s.clone();let[o,n]=this.ruleDayOfWeek(i),l=this.last.nthWeekDay(n,o);if(o>=6||o<=-6)throw new Error("Malformed values in BYDAY part");if(l>r||l<=0){if(e&&e.month==s.month)continue;for(;l>r||l<=0;)this.increment_month(),r=h.daysInMonth(this.last.month,this.last.year),l=this.last.nthWeekDay(n,o)}this.last.day=l,(!e||this.last.compare(e)<0)&&(e=this.last.clone())}if(this.last=e.clone(),this.has_by_data("BYMONTHDAY")&&this._byDayAndMonthDay(!0),this.last.day>r||this.last.day==0)throw new Error("Malformed values in BYDAY part")}else if(this.has_by_data("BYMONTHDAY")){this.last.day=1;let e=this.normalizeByMonthDayRules(this.last.year,this.last.month,this.rule.parts.BYMONTHDAY).filter(s=>s>=this.last.day);if(e.length)this.last.day=e[0],this.by_data.BYMONTHDAY=e;else if(!this.next_month()&&!this.next_month()&&!this.next_month())throw new gt}}}next(t=!1){let e=this.last?this.last.clone():null;if((this.rule.count&&this.occurrence_number>=this.rule.count||this.rule.until&&this.last.compare(this.rule.until)>0)&&(this.completed=!0),this.completed)return null;if(this.occurrence_number==0&&this.last.compare(this.dtstart)>=0)return this.occurrence_number++,this.last;let s,r=0;do switch(s=1,this.rule.freq){case"SECONDLY":this.next_second();break;case"MINUTELY":this.next_minute();break;case"HOURLY":this.next_hour();break;case"DAILY":this.next_day();break;case"WEEKLY":this.next_week();break;case"MONTHLY":if(s=this.next_month(),s)r=0;else if(++r==336)return this.completed=!0,null;break;case"YEARLY":if(s=this.next_year(),s)r=0;else if(++r==28)return this.completed=!0,null;break;default:return null}while(!this.check_contracting_rules()||this.last.compare(this.dtstart)<0||!s);if(this.last.compare(e)==0){if(t)throw new Error("Same occurrence found twice, protecting you from death by recursion");this.next(!0)}return this.rule.until&&this.last.compare(this.rule.until)>0?(this.completed=!0,null):(this.occurrence_number++,this.last)}next_second(){return this.next_generic("BYSECOND","SECONDLY","second","minute")}increment_second(t){return this.increment_generic(t,"second",60,"minute")}next_minute(){return this.next_generic("BYMINUTE","MINUTELY","minute","hour","next_second")}increment_minute(t){return this.increment_generic(t,"minute",60,"hour")}next_hour(){return this.next_generic("BYHOUR","HOURLY","hour","monthday","next_minute")}increment_hour(t){this.increment_generic(t,"hour",24,"monthday")}next_day(){let t=this.rule.freq=="DAILY";return this.next_hour()==0||(t?this.increment_monthday(this.rule.interval):this.increment_monthday(1)),0}next_week(){let t=0;if(this.next_weekday_by_week()==0)return t;if(this.has_by_data("BYWEEKNO")){this.by_indices.BYWEEKNO++,this.by_indices.BYWEEKNO==this.by_data.BYWEEKNO.length&&(this.by_indices.BYWEEKNO=0,t=1),this.last.month=1,this.last.day=1;let e=this.by_data.BYWEEKNO[this.by_indices.BYWEEKNO];this.last.day+=7*e,t&&this.increment_year(1)}else this.increment_monthday(7*this.rule.interval);return t}normalizeByMonthDayRules(t,e,s){let r=h.daysInMonth(e,t),i=[],o=0,n=s.length,l;for(;or)){if(l<0)l=r+(l+1);else if(l===0)continue;i.indexOf(l)===-1&&i.push(l)}}return i.sort(function(u,c){return u-c})}_byDayAndMonthDay(t){let e,s=this.by_data.BYDAY,r,i=0,o,n=s.length,l=0,u,c=this,d=this.last.day;function m(){for(u=h.daysInMonth(c.last.month,c.last.year),e=c.normalizeByMonthDayRules(c.last.year,c.last.month,c.by_data.BYMONTHDAY),o=e.length;e[i]<=d&&!(t&&e[i]==d)&&iu){p();continue}let f=e[i++];if(f>=r)d=f;else{p();continue}for(let A=0;Ae&&(this.last.day=1,this.increment_month(),this.is_day_in_byday(this.last)?(!this.has_by_data("BYSETPOS")||this.check_set_position(1))&&(t=1):t=0)}else if(this.has_by_data("BYMONTHDAY")){if(this.by_indices.BYMONTHDAY++,this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length&&(this.by_indices.BYMONTHDAY=0,this.increment_month(),this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length))return 0;let e=h.daysInMonth(this.last.month,this.last.year),s=this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY];s<0&&(s=e+s+1),s>e?(this.last.day=1,t=this.is_day_in_byday(this.last)):this.last.day=s}else{this.increment_month();let e=h.daysInMonth(this.last.month,this.last.year);this.by_data.BYMONTHDAY[0]>e?t=0:this.last.day=this.by_data.BYMONTHDAY[0]}return t}next_weekday_by_week(){let t=0;if(this.next_hour()==0)return t;if(!this.has_by_data("BYDAY"))return 1;for(;;){let e=new h;this.by_indices.BYDAY++,this.by_indices.BYDAY==Object.keys(this.by_data.BYDAY).length&&(this.by_indices.BYDAY=0,t=1);let s=this.by_data.BYDAY[this.by_indices.BYDAY],r=this.ruleDayOfWeek(s)[1];r-=this.rule.wkst,r<0&&(r+=7),e.year=this.last.year,e.month=this.last.month,e.day=this.last.day;let i=e.startDoyWeek(this.rule.wkst);if(r+i<1&&!t)continue;let o=h.fromDayOfYear(i+r,this.last.year);return this.last.year=o.year,this.last.month=o.month,this.last.day=o.day,t}}next_year(){return this.next_hour()==0||(this.days.length==0||++this.days_index==this.days.length)&&(this.days_index=0,this.increment_year(this.rule.interval),this.has_by_data("BYMONTHDAY")&&(this.by_data.BYMONTHDAY=this.normalizeByMonthDayRules(this.last.year,this.last.month,this.rule.parts.BYMONTHDAY)),this.expand_year_days(this.last.year),this.days.length==0)?0:this._nextByYearDay()}_nextByYearDay(){let t=this.days[this.days_index],e=this.last.year;if(Math.abs(t)==366&&!h.isLeapYear(this.last.year))return 0;t<1&&(t+=1,e+=1);let s=h.fromDayOfYear(t,e);return this.last.day=s.day,this.last.month=s.month,1}ruleDayOfWeek(t,e){let s=t.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/);if(s){let r=parseInt(s[1]||0,10);return t=w.icalDayToNumericDay(s[2],e),[r,t]}else return[0,0]}next_generic(t,e,s,r,i){let o=t in this.by_data,n=this.rule.freq==e,l=0;if(i&&this[i]()==0)return l;if(o){this.by_indices[t]++;let u=this.by_data[t];this.by_indices[t]==u.length&&(this.by_indices[t]=0,l=1),this.last[s]=u[this.by_indices[t]]}else n&&this["increment_"+s](this.rule.interval);return o&&l&&n&&this["increment_"+r](1),l}increment_monthday(t){for(let e=0;es&&(this.last.day-=s,this.increment_month())}}increment_month(){if(this.last.day=1,this.has_by_data("BYMONTH"))this.by_indices.BYMONTH++,this.by_indices.BYMONTH==this.by_data.BYMONTH.length&&(this.by_indices.BYMONTH=0,this.increment_year(1)),this.last.month=this.by_data.BYMONTH[this.by_indices.BYMONTH];else{this.rule.freq=="MONTHLY"?this.last.month+=this.rule.interval:this.last.month++,this.last.month--;let t=C(this.last.month/12);this.last.month%=12,this.last.month++,t!=0&&this.increment_year(t)}this.has_by_data("BYMONTHDAY")&&(this.by_data.BYMONTHDAY=this.normalizeByMonthDayRules(this.last.year,this.last.month,this.rule.parts.BYMONTHDAY))}increment_year(t){this.last.day=1,this.last.year+=t}increment_generic(t,e,s,r){this.last[e]+=t;let i=C(this.last[e]/s);this.last[e]%=s,i!=0&&this["increment_"+r](i)}has_by_data(t){return t in this.rule.parts}expand_year_days(t){let e=new h;this.days=[];let s={},r=["BYDAY","BYWEEKNO","BYMONTHDAY","BYMONTH","BYYEARDAY"];for(let n of r)n in this.rule.parts&&(s[n]=this.rule.parts[n]);if("BYMONTH"in s&&"BYWEEKNO"in s){let n=1,l={};e.year=t,e.isDate=!0;for(let u=0;u0?(A=U+(y-1)*7,A<=l&&this.days.push(c+A)):(A=ht+(y+1)*7,A>0&&this.days.push(c+A))}}this.days.sort(function(n,l){return n-l})}else if(i==2&&"BYDAY"in s&&"BYMONTHDAY"in s){let n=this.expand_by_day(t);for(let l of n){let u=h.fromDayOfYear(l,t);this.by_data.BYMONTHDAY.indexOf(u.day)>=0&&this.days.push(l)}}else if(i==3&&"BYDAY"in s&&"BYMONTHDAY"in s&&"BYMONTH"in s){let n=this.expand_by_day(t);for(let l of n){let u=h.fromDayOfYear(l,t);this.by_data.BYMONTH.indexOf(u.month)>=0&&this.by_data.BYMONTHDAY.indexOf(u.day)>=0&&this.days.push(l)}}else if(i==2&&"BYDAY"in s&&"BYWEEKNO"in s){let n=this.expand_by_day(t);for(let l of n){let u=h.fromDayOfYear(l,t).weekNumber(this.rule.wkst);this.by_data.BYWEEKNO.indexOf(u)&&this.days.push(l)}}else if(!(i==3&&"BYDAY"in s&&"BYWEEKNO"in s&&"BYMONTHDAY"in s))if(i==1&&"BYYEARDAY"in s)this.days=this.days.concat(this.by_data.BYYEARDAY);else if(i==2&&"BYYEARDAY"in s&&"BYDAY"in s){let n=h.isLeapYear(t)?366:365,l=new Set(this.expand_by_day(t));for(let u of this.by_data.BYYEARDAY)u<0&&(u+=n+1),l.has(u)&&this.days.push(u)}else this.days=[]}let o=h.isLeapYear(t)?366:365;return this.days.sort((n,l)=>(n<0&&(n+=o+1),l<0&&(l+=o+1),n-l)),0}expand_by_day(t){let e=[],s=this.last.clone();s.year=t,s.month=1,s.day=1,s.isDate=!0;let r=s.dayOfWeek();s.month=12,s.day=31,s.isDate=!0;let i=s.dayOfWeek(),o=s.dayOfYear();for(let n of this.by_data.BYDAY){let l=this.ruleDayOfWeek(n),u=l[0],c=l[1];if(u==0){let d=(c+7-r)%7+1;for(let m=d;m<=o;m+=7)e.push(m)}else if(u>0){let d;c>=r?d=c-r+1:d=c-r+8,e.push(d+(u-1)*7)}else{let d;u=-u,c<=i?d=o-i+c:d=o-i+c-7,e.push(d-(u-1)*7)}}return e}is_day_in_byday(t){if(this.by_data.BYDAY)for(let e of this.by_data.BYDAY){let s=this.ruleDayOfWeek(e),r=s[0],i=s[1],o=t.dayOfWeek();if(r==0&&i==o||t.nthWeekDay(i,r)==t.day)return 1}return 0}check_set_position(t){return this.has_by_data("BYSETPOS")?this.by_data.BYSETPOS.indexOf(t)!==-1:!1}sort_byday_rules(t){for(let e=0;ei){let o=t[e];t[e]=t[s],t[s]=o}}}check_contract_restriction(t,e){let s=R._indexMap[t],r=R._expandMap[this.rule.freq][s],i=!1;if(t in this.by_data&&r==R.CONTRACT){let o=this.by_data[t];for(let n of o)if(n==e){i=!0;break}}else i=!0;return i}check_contracting_rules(){let t=this.last.dayOfWeek(),e=this.last.weekNumber(this.rule.wkst),s=this.last.dayOfYear();return this.check_contract_restriction("BYSECOND",this.last.second)&&this.check_contract_restriction("BYMINUTE",this.last.minute)&&this.check_contract_restriction("BYHOUR",this.last.hour)&&this.check_contract_restriction("BYDAY",w.numericDayToIcalDay(t))&&this.check_contract_restriction("BYWEEKNO",e)&&this.check_contract_restriction("BYMONTHDAY",this.last.day)&&this.check_contract_restriction("BYMONTH",this.last.month)&&this.check_contract_restriction("BYYEARDAY",s)}setup_defaults(t,e,s){let r=R._indexMap[t];return R._expandMap[this.rule.freq][r]!=R.CONTRACT&&(t in this.by_data||(this.by_data[t]=[s]),this.rule.freq!=e)?this.by_data[t][0]:s}toJSON(){let t=Object.create(null);return t.initialized=this.initialized,t.rule=this.rule.toJSON(),t.dtstart=this.dtstart.toJSON(),t.by_data=this.by_data,t.days=this.days,t.last=this.last.toJSON(),t.by_indices=this.by_indices,t.occurrence_number=this.occurrence_number,t}}class gt extends Error{constructor(){super("Recurrence rule has no valid occurrences")}}const d0=/^(SU|MO|TU|WE|TH|FR|SA)$/,c0=/^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/,Te={SU:h.SUNDAY,MO:h.MONDAY,TU:h.TUESDAY,WE:h.WEDNESDAY,TH:h.THURSDAY,FR:h.FRIDAY,SA:h.SATURDAY},h0=Object.fromEntries(Object.entries(Te).map(a=>a.reverse())),Xt=["SECONDLY","MINUTELY","HOURLY","DAILY","WEEKLY","MONTHLY","YEARLY"];class w{static fromString(t){let e=this._stringToData(t,!1);return new w(e)}static fromData(t){return new w(t)}static _stringToData(t,e){let s=Object.create(null),r=t.split(";"),i=r.length;for(let o=0;o7&&(r-=7),h0[r]}constructor(t){this.wrappedJSObject=this,this.parts={},t&&typeof t=="object"&&this.fromData(t)}parts=null;interval=1;wkst=h.MONDAY;until=null;count=null;freq=null;icalclass="icalrecur";icaltype="recur";iterator(t){return new R({rule:this,dtstart:t})}clone(){return new w(this.toJSON())}isFinite(){return!!(this.count||this.until)}isByCount(){return!!(this.count&&!this.until)}addComponent(t,e){let s=t.toUpperCase();s in this.parts?this.parts[s].push(e):this.parts[s]=[e]}setComponent(t,e){this.parts[t.toUpperCase()]=e.slice()}getComponent(t){let e=t.toUpperCase();return e in this.parts?this.parts[e].slice():[]}getNextOccurrence(t,e){let s=this.iterator(t),r;do r=s.next();while(r&&r.compare(e)<=0);return r&&e.zone&&(r.zone=e.zone),r}fromData(t){for(let e in t){let s=e.toUpperCase();s in kt?Array.isArray(t[e])?this.parts[s]=t[e]:this.parts[s]=[t[e]]:this[e]=t[e]}this.interval&&typeof this.interval!="number"&&It.INTERVAL(this.interval,this),this.wkst&&typeof this.wkst!="number"&&(this.wkst=w.icalDayToNumericDay(this.wkst)),this.until&&!(this.until instanceof h)&&(this.until=h.fromString(this.until))}toJSON(){let t=Object.create(null);t.freq=this.freq,this.count&&(t.count=this.count),this.interval>1&&(t.interval=this.interval);for(let[e,s]of Object.entries(this.parts))Array.isArray(s)&&s.length==1?t[e.toLowerCase()]=s[0]:t[e.toLowerCase()]=lt(s);return this.until&&(t.until=this.until.toString()),"wkst"in this&&this.wkst!==h.DEFAULT_WEEK_START&&(t.wkst=w.numericDayToIcalDay(this.wkst)),t}toString(){let t="FREQ="+this.freq;this.count&&(t+=";COUNT="+this.count),this.interval>1&&(t+=";INTERVAL="+this.interval);for(let[e,s]of Object.entries(this.parts))t+=";"+e+"="+s;return this.until&&(t+=";UNTIL="+this.until.toICALString()),"wkst"in this&&this.wkst!==h.DEFAULT_WEEK_START&&(t+=";WKST="+w.numericDayToIcalDay(this.wkst)),t}}function Z(a,t,e,s){let r=s;if(s[0]==="+"&&(r=s.slice(1)),r=O(r),t!==void 0&&s '+t);if(e!==void 0&&s>e)throw new Error(a+': invalid value "'+s+'" must be < '+t);return r}const It={FREQ:function(a,t,e){if(Xt.indexOf(a)!==-1)t.freq=a;else throw new Error('invalid frequency "'+a+'" expected: "'+Xt.join(", ")+'"')},COUNT:function(a,t,e){t.count=O(a)},INTERVAL:function(a,t,e){t.interval=O(a),t.interval<1&&(t.interval=1)},UNTIL:function(a,t,e){a.length>10?t.until=b.icalendar.value["date-time"].fromICAL(a):t.until=b.icalendar.value.date.fromICAL(a),e||(t.until=h.fromString(t.until))},WKST:function(a,t,e){if(d0.test(a))t.wkst=w.icalDayToNumericDay(a);else throw new Error('invalid WKST value "'+a+'"')}},kt={BYSECOND:Z.bind(void 0,"BYSECOND",0,60),BYMINUTE:Z.bind(void 0,"BYMINUTE",0,59),BYHOUR:Z.bind(void 0,"BYHOUR",0,23),BYDAY:function(a){if(c0.test(a))return a;throw new Error('invalid BYDAY value "'+a+'"')},BYMONTHDAY:Z.bind(void 0,"BYMONTHDAY",-31,31),BYYEARDAY:Z.bind(void 0,"BYYEARDAY",-366,366),BYWEEKNO:Z.bind(void 0,"BYWEEKNO",-53,53),BYMONTH:Z.bind(void 0,"BYMONTH",1,12),BYSETPOS:Z.bind(void 0,"BYSETPOS",-366,366)},m0=/\\\\|\\;|\\,|\\[Nn]/g,f0=/\\|;|,|\n/g,Qt=/\\\\|\\,|\\[Nn]/g,te=/\\|,|\n/g;function Vt(a,t){return{matches:/.*/,fromICAL:function(e,s){return T0(e,a,s)},toICAL:function(e,s){let r=t;return s&&(r=new RegExp(r.source+"|"+s,r.flags)),e.replace(r,function(i){switch(i){case"\\":return"\\\\";case";":return"\\;";case",":return"\\,";case` -`:return"\\n";default:return i}})}}}const S={defaultType:"text"},Tt={defaultType:"text",multiValue:","},Mt={defaultType:"text",structuredValue:";"},Dt={defaultType:"integer"},_t={defaultType:"date-time",allowedTypes:["date-time","date"]},Et={defaultType:"date-time"},I={defaultType:"uri"},ee={defaultType:"utc-offset"},se={defaultType:"recur"},ae={defaultType:"date-and-or-time",allowedTypes:["date-time","date","text"]};function p0(a){switch(a){case"\\\\":return"\\";case"\\;":return";";case"\\,":return",";case"\\n":case"\\N":return` -`;default:return a}}function T0(a,t,e){return a.indexOf("\\")===-1?a:(e&&(t=new RegExp(t.source+"|\\\\"+e,t.flags)),a.replace(t,p0))}let Rt={categories:Tt,url:I,version:S,uid:S},Wt={boolean:{values:["TRUE","FALSE"],fromICAL:function(a){switch(a){case"TRUE":return!0;case"FALSE":return!1;default:return!1}},toICAL:function(a){return a?"TRUE":"FALSE"}},float:{matches:/^[+-]?\d+\.\d+$/,fromICAL:function(a){let t=parseFloat(a);return pt(t)?0:t},toICAL:function(a){return String(a)}},integer:{fromICAL:function(a){let t=parseInt(a);return pt(t)?0:t},toICAL:function(a){return String(a)}},"utc-offset":{toICAL:function(a){return a.length<7?a.slice(0,3)+a.slice(4,6):a.slice(0,3)+a.slice(4,6)+a.slice(7,9)},fromICAL:function(a){return a.length<6?a.slice(0,3)+":"+a.slice(3,5):a.slice(0,3)+":"+a.slice(3,5)+":"+a.slice(5,7)},decorate:function(a){return V.fromString(a)},undecorate:function(a){return a.toString()}}},y0={cutype:{values:["INDIVIDUAL","GROUP","RESOURCE","ROOM","UNKNOWN"],allowXName:!0,allowIanaToken:!0},"delegated-from":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},"delegated-to":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},encoding:{values:["8BIT","BASE64"]},fbtype:{values:["FREE","BUSY","BUSY-UNAVAILABLE","BUSY-TENTATIVE"],allowXName:!0,allowIanaToken:!0},member:{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},partstat:{values:["NEEDS-ACTION","ACCEPTED","DECLINED","TENTATIVE","DELEGATED","COMPLETED","IN-PROCESS"],allowXName:!0,allowIanaToken:!0},range:{values:["THISANDFUTURE"]},related:{values:["START","END"]},reltype:{values:["PARENT","CHILD","SIBLING"],allowXName:!0,allowIanaToken:!0},role:{values:["REQ-PARTICIPANT","CHAIR","OPT-PARTICIPANT","NON-PARTICIPANT"],allowXName:!0,allowIanaToken:!0},rsvp:{values:["TRUE","FALSE"]},"sent-by":{valueType:"cal-address"},tzid:{matches:/^\//},value:{values:["binary","boolean","cal-address","date","date-time","duration","float","integer","period","recur","text","time","uri","utc-offset"],allowXName:!0,allowIanaToken:!0}};const x=ut(Wt,{text:Vt(m0,f0),uri:{},binary:{decorate:function(a){return Nt.fromString(a)},undecorate:function(a){return a.toString()}},"cal-address":{},date:{decorate:function(a,t){return h.fromDateString(a,t)},undecorate:function(a){return a.toString()},fromICAL:function(a){return a.slice(0,4)+"-"+a.slice(4,6)+"-"+a.slice(6,8)},toICAL:function(a){let t=a.length;return t==10?a.slice(0,4)+a.slice(5,7)+a.slice(8,10):t>=19?x["date-time"].toICAL(a):a}},"date-time":{fromICAL:function(a){{let t=a.slice(0,4)+"-"+a.slice(4,6)+"-"+a.slice(6,8)+"T"+a.slice(9,11)+":"+a.slice(11,13)+":"+a.slice(13,15);return a[15]&&a[15]==="Z"&&(t+="Z"),t}},toICAL:function(a){if(a.length>=19){let t=a.slice(0,4)+a.slice(5,7)+a.slice(8,13)+a.slice(14,16)+a.slice(17,19);return a[19]&&a[19]==="Z"&&(t+="Z"),t}else return a},decorate:function(a,t){return h.fromDateTimeString(a,t)},undecorate:function(a){return a.toString()}},duration:{decorate:function(a){return M.fromString(a)},undecorate:function(a){return a.toString()}},period:{fromICAL:function(a){let t=a.split("/");return t[0]=x["date-time"].fromICAL(t[0]),M.isValueString(t[1])||(t[1]=x["date-time"].fromICAL(t[1])),t},toICAL:function(a){return a=a.slice(),a[0]=x["date-time"].toICAL(a[0]),M.isValueString(a[1])||(a[1]=x["date-time"].toICAL(a[1])),a.join("/")},decorate:function(a,t){return K.fromJSON(a,t,!1)},undecorate:function(a){return a.toJSON()}},recur:{fromICAL:function(a){return w._stringToData(a,!0)},toICAL:function(a){let t="";for(let[e,s]of Object.entries(a))e=="until"?s.length>10?s=x["date-time"].toICAL(s):s=x.date.toICAL(s):e=="wkst"?typeof s=="number"&&(s=w.numericDayToIcalDay(s)):Array.isArray(s)&&(s=s.join(",")),t+=e.toUpperCase()+"="+s+";";return t.slice(0,Math.max(0,t.length-1))},decorate:function(a){return w.fromData(a)},undecorate:function(a){return a.toJSON()}},time:{fromICAL:function(a){if(a.length<6)return a;let t=a.slice(0,2)+":"+a.slice(2,4)+":"+a.slice(4,6);return a[6]==="Z"&&(t+="Z"),t},toICAL:function(a){if(a.length<8)return a;let t=a.slice(0,2)+a.slice(3,5)+a.slice(6,8);return a[8]==="Z"&&(t+="Z"),t}}});let S0=ut(Rt,{action:S,attach:{defaultType:"uri"},attendee:{defaultType:"cal-address"},calscale:S,class:S,comment:S,completed:Et,contact:S,created:Et,description:S,dtend:_t,dtstamp:Et,dtstart:_t,due:_t,duration:{defaultType:"duration"},exdate:{defaultType:"date-time",allowedTypes:["date-time","date"],multiValue:","},exrule:se,freebusy:{defaultType:"period",multiValue:","},geo:{defaultType:"float",structuredValue:";"},"last-modified":Et,location:S,method:S,organizer:{defaultType:"cal-address"},"percent-complete":Dt,priority:Dt,prodid:S,"related-to":S,repeat:Dt,rdate:{defaultType:"date-time",allowedTypes:["date-time","date","period"],multiValue:",",detectType:function(a){return a.indexOf("/")!==-1?"period":a.indexOf("T")===-1?"date":"date-time"}},"recurrence-id":_t,resources:Tt,"request-status":Mt,rrule:se,sequence:Dt,status:S,summary:S,transp:S,trigger:{defaultType:"duration",allowedTypes:["duration","date-time"]},tzoffsetfrom:ee,tzoffsetto:ee,tzurl:I,tzid:S,tzname:S});const P=ut(Wt,{text:Vt(Qt,te),uri:Vt(Qt,te),date:{decorate:function(a){return tt.fromDateAndOrTimeString(a,"date")},undecorate:function(a){return a.toString()},fromICAL:function(a){return a.length==8?x.date.fromICAL(a):a[0]=="-"&&a.length==6?a.slice(0,4)+"-"+a.slice(4):a},toICAL:function(a){return a.length==10?x.date.toICAL(a):a[0]=="-"&&a.length==7?a.slice(0,4)+a.slice(5):a}},time:{decorate:function(a){return tt.fromDateAndOrTimeString("T"+a,"time")},undecorate:function(a){return a.toString()},fromICAL:function(a){let t=P.time._splitZone(a,!0),e=t[0],s=t[1];return s.length==6?s=s.slice(0,2)+":"+s.slice(2,4)+":"+s.slice(4,6):s.length==4&&s[0]!="-"?s=s.slice(0,2)+":"+s.slice(2,4):s.length==5&&(s=s.slice(0,3)+":"+s.slice(3,5)),e.length==5&&(e[0]=="-"||e[0]=="+")&&(e=e.slice(0,3)+":"+e.slice(3)),s+e},toICAL:function(a){let t=P.time._splitZone(a),e=t[0],s=t[1];return s.length==8?s=s.slice(0,2)+s.slice(3,5)+s.slice(6,8):s.length==5&&s[0]!="-"?s=s.slice(0,2)+s.slice(3,5):s.length==6&&(s=s.slice(0,3)+s.slice(4,6)),e.length==6&&(e[0]=="-"||e[0]=="+")&&(e=e.slice(0,3)+e.slice(4)),s+e},_splitZone:function(a,t){let e=a.length-1,s=a.length-(t?5:6),r=a[s],i,o;return a[e]=="Z"?(i=a[e],o=a.slice(0,Math.max(0,e))):a.length>6&&(r=="-"||r=="+")?(i=a.slice(s),o=a.slice(0,Math.max(0,s))):(i="",o=a),[i,o]}},"date-time":{decorate:function(a){return tt.fromDateAndOrTimeString(a,"date-time")},undecorate:function(a){return a.toString()},fromICAL:function(a){return P["date-and-or-time"].fromICAL(a)},toICAL:function(a){return P["date-and-or-time"].toICAL(a)}},"date-and-or-time":{decorate:function(a){return tt.fromDateAndOrTimeString(a,"date-and-or-time")},undecorate:function(a){return a.toString()},fromICAL:function(a){let t=a.split("T");return(t[0]?P.date.fromICAL(t[0]):"")+(t[1]?"T"+P.time.fromICAL(t[1]):"")},toICAL:function(a){let t=a.split("T");return P.date.toICAL(t[0])+(t[1]?"T"+P.time.toICAL(t[1]):"")}},timestamp:x["date-time"],"language-tag":{matches:/^[a-zA-Z0-9-]+$/},"phone-number":{fromICAL:function(a){return Array.from(a).filter(function(t){return t==="\\"?void 0:t}).join("")},toICAL:function(a){return Array.from(a).map(function(t){return t===","||t===";"?"\\"+t:t}).join("")}}});let A0={type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","time","date-time","date-and-or-time","timestamp","boolean","integer","float","utc-offset","language-tag"],allowXName:!0,allowIanaToken:!0}},g0=ut(Rt,{adr:{defaultType:"text",structuredValue:";",multiValue:","},anniversary:ae,bday:ae,caladruri:I,caluri:I,clientpidmap:Mt,email:S,fburl:I,fn:S,gender:Mt,geo:I,impp:I,key:I,kind:S,lang:{defaultType:"language-tag"},logo:I,member:I,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:Tt,note:S,org:{defaultType:"text",structuredValue:";"},photo:I,related:I,rev:{defaultType:"timestamp"},role:S,sound:I,source:I,tel:{defaultType:"uri",allowedTypes:["uri","text"]},title:S,tz:{defaultType:"text",allowedTypes:["text","utc-offset","uri"]},xml:S}),D0=ut(Wt,{binary:x.binary,date:P.date,"date-time":P["date-time"],"phone-number":P["phone-number"],uri:x.uri,text:P.text,time:x.time,vcard:x.text,"utc-offset":{toICAL:function(a){return a.slice(0,7)},fromICAL:function(a){return a.slice(0,7)},decorate:function(a){return V.fromString(a)},undecorate:function(a){return a.toString()}}}),_0={type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","date-time","phone-number","time","boolean","integer","float","utc-offset","vcard","binary"],allowXName:!0,allowIanaToken:!0}},E0=ut(Rt,{fn:S,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:Tt,photo:{defaultType:"binary",allowedTypes:["binary","uri"]},bday:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(a){return a.indexOf("T")===-1?"date":"date-time"}},adr:{defaultType:"text",structuredValue:";",multiValue:","},label:S,tel:{defaultType:"phone-number"},email:S,mailer:S,tz:{defaultType:"utc-offset",allowedTypes:["utc-offset","text"]},geo:{defaultType:"float",structuredValue:";"},title:S,role:S,logo:{defaultType:"binary",allowedTypes:["binary","uri"]},agent:{defaultType:"vcard",allowedTypes:["vcard","text","uri"]},org:Mt,note:Tt,prodid:S,rev:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(a){return a.indexOf("T")===-1?"date":"date-time"}},"sort-string":S,sound:{defaultType:"binary",allowedTypes:["binary","uri"]},class:S,key:{defaultType:"binary",allowedTypes:["binary","text"]}}),F={name:"ical",value:x,param:y0,property:S0,propertyGroups:!1},re={name:"vcard4",value:P,param:A0,property:g0,propertyGroups:!0},ie={name:"vcard3",value:D0,param:_0,property:E0,propertyGroups:!0};const b={strict:!0,defaultSet:F,defaultType:"unknown",components:{vcard:re,vcard3:ie,vevent:F,vtodo:F,vjournal:F,valarm:F,vtimezone:F,daylight:F,standard:F},icalendar:F,vcard:re,vcard3:ie,getDesignSet:function(a){return a&&a in b.components?b.components[a]:b.defaultSet}},Yt=`\r -`,ne="unknown",b0={'"':"^'","\n":"^n","^":"^^"};function E(a){typeof a[0]=="string"&&(a=[a]);let t=0,e=a.length,s="";for(;t0&&!(a[1][0][0]==="version"&&a[1][0][3]==="4.0")&&(n="vcard3"),t=t||b.getDesignSet(n);i0&&typeof t[0]=="object"&&"icaltype"in t[0]&&this.resetType(t[0].icaltype),this.isDecorated)for(;s=0;o--)(!s||i[o][$]===s)&&this._removeObjectByIndex(t,r,o)}addSubcomponent(t){this._components||(this._components=[],this._hydratedComponentCount=0),t.parent&&t.parent.removeSubcomponent(t);let e=this.jCal[X].push(t.jCal);return this._components[e-1]=t,this._hydratedComponentCount++,t.parent=this,t}removeSubcomponent(t){let e=this._removeObject(X,"_components",t);return e&&this._hydratedComponentCount--,e}removeAllSubcomponents(t){let e=this._removeAllObjects(X,"_components",t);return this._hydratedComponentCount=0,e}addProperty(t){if(!(t instanceof ot))throw new TypeError("must be instance of ICAL.Property");this._properties||(this._properties=[],this._hydratedPropertyCount=0),t.parent&&t.parent.removeProperty(t);let e=this.jCal[j].push(t.jCal);return this._properties[e-1]=t,this._hydratedPropertyCount++,t.parent=this,t}addPropertyWithValue(t,e){let s=new ot(t);return s.setValue(e),this.addProperty(s),s}updatePropertyWithValue(t,e){let s=this.getFirstProperty(t);return s?s.setValue(e):s=this.addPropertyWithValue(t,e),s}removeProperty(t){let e=this._removeObject(j,"_properties",t);return e&&this._hydratedPropertyCount--,e}removeAllProperties(t){let e=this._removeAllObjects(j,"_properties",t);return this._hydratedPropertyCount=0,e}toJSON(){return this.jCal}toString(){return E.component(this.jCal,this._designSet)}getTimeZoneByID(t){if(this.parent)return this.parent.getTimeZoneByID(t);if(!this._timezoneCache)return null;if(this._timezoneCache.has(t))return this._timezoneCache.get(t);const e=this.getAllSubcomponents("vtimezone");for(const s of e)if(s.getFirstProperty("tzid").getFirstValue()===t){const r=new T({component:s,tzid:t});return this._timezoneCache.set(t,r),r}return null}}class ye{constructor(t){this.ruleDates=[],this.exDates=[],this.fromData(t)}complete=!1;ruleIterators=null;ruleDates=null;exDates=null;ruleDateInc=0;exDateInc=0;exDate=null;ruleDate=null;dtstart=null;last=null;fromData(t){let e=q(t.dtstart,h);if(e)this.dtstart=e;else throw new Error(".dtstart (ICAL.Time) must be given");if(t.component)this._init(t.component);else{if(this.last=q(t.last,h)||e.clone(),!t.ruleIterators)throw new Error(".ruleIterators or .component must be given");this.ruleIterators=t.ruleIterators.map(function(s){return q(s,R)}),this.ruleDateInc=t.ruleDateInc,this.exDateInc=t.exDateInc,t.ruleDates&&(this.ruleDates=t.ruleDates.map(s=>q(s,h)),this.ruleDate=this.ruleDates[this.ruleDateInc]),t.exDates&&(this.exDates=t.exDates.map(s=>q(s,h)),this.exDate=this.exDates[this.exDateInc]),typeof t.complete<"u"&&(this.complete=t.complete)}}_compare_special(t,e){return!t.isDate&&e.isDate?new h({year:t.year,month:t.month,day:t.day}).compare(e):t.compare(e)}next(){let t,e,s,r=500,i=0;for(;;){if(i++>r)throw new Error("max tries have occurred, rule may be impossible to fulfill.");if(e=this.ruleDate,t=this._nextRecurrenceIter(this.last),!e&&!t){this.complete=!0;break}if((!e||t&&e.compare(t.last)>0)&&(e=t.last.clone(),t.next()),this.ruleDate===e&&this._nextRuleDay(),this.last=e,this.exDate&&(s=this._compare_special(this.last,this.exDate),s>0&&this._nextExDay(),s===0)){this._nextExDay();continue}return this.last}}toJSON(){function t(s){return s.toJSON()}let e=Object.create(null);return e.ruleIterators=this.ruleIterators.map(t),this.ruleDates&&(e.ruleDates=this.ruleDates.map(t)),this.exDates&&(e.exDates=this.exDates.map(t)),e.ruleDateInc=this.ruleDateInc,e.exDateInc=this.exDateInc,e.last=this.last.toJSON(),e.dtstart=this.dtstart.toJSON(),e.complete=this.complete,e}_extractDates(t,e){let s=[],r=t.getAllProperties(e);for(let i=0,o=r.length;iu.compare(c));s.splice(l,0,n)}return s}_init(t){if(this.ruleIterators=[],this.last=this.dtstart.clone(),!t.hasProperty("rdate")&&!t.hasProperty("rrule")&&!t.hasProperty("recurrence-id")){this.ruleDate=this.last.clone(),this.complete=!0;return}if(t.hasProperty("rdate")&&(this.ruleDates=this._extractDates(t,"rdate"),this.ruleDates[0]&&this.ruleDates[0].compare(this.dtstart)<0?(this.ruleDateInc=0,this.last=this.ruleDates[0].clone()):this.ruleDateInc=nt(this.ruleDates,this.last,(e,s)=>e.compare(s)),this.ruleDate=this.ruleDates[this.ruleDateInc]),t.hasProperty("rrule")){let e=t.getAllProperties("rrule"),s=0,r=e.length,i,o;for(;s0)&&(o=s)}return o}}class yt{constructor(t,e){t instanceof z||(e=t,t=null),t?this.component=t:this.component=new z("vevent"),this._rangeExceptionCache=Object.create(null),this.exceptions=Object.create(null),this.rangeExceptions=[],e&&e.strictExceptions&&(this.strictExceptions=e.strictExceptions),e&&e.exceptions?e.exceptions.forEach(this.relateException,this):this.component.parent&&!this.isRecurrenceException()&&this.component.parent.getAllSubcomponents("vevent").forEach(function(s){s.hasProperty("recurrence-id")&&this.relateException(s)},this)}static THISANDFUTURE="THISANDFUTURE";exceptions=null;strictExceptions=!1;relateException(t){if(this.isRecurrenceException())throw new Error("cannot relate exception to exceptions");if(t instanceof z&&(t=new yt(t)),this.strictExceptions&&t.uid!==this.uid)throw new Error("attempted to relate unrelated exception");let e=t.recurrenceId.toString();if(this.exceptions[e]=t,t.modifiesFuture()){let s=[t.recurrenceId.toUnixTime(),e],r=nt(this.rangeExceptions,s,le);this.rangeExceptions.splice(r,0,s)}}modifiesFuture(){return this.component.hasProperty("recurrence-id")?this.component.getFirstProperty("recurrence-id").getParameter("range")===yt.THISANDFUTURE:!1}findRangeException(t){if(!this.rangeExceptions.length)return null;let e=t.toUnixTime(),s=nt(this.rangeExceptions,[e],le);if(s-=1,s<0)return null;let r=this.rangeExceptions[s];return et[0]?1:t[0]>a[0]?-1:0}class Y0{constructor(t){typeof t>"u"&&(t={});for(let[e,s]of Object.entries(t))this[e]=s}parseEvent=!0;parseTimezone=!0;oncomplete=function(){};onerror=function(t){};ontimezone=function(t){};onevent=function(t){};process(t){typeof t=="string"&&(t=g(t)),t instanceof z||(t=new z(t));let e=t.getAllSubcomponents(),s=0,r=e.length,i;for(;s"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Bt=crypto.getRandomValues.bind(crypto)}return Bt(O0)}const M0=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ue={randomUUID:M0};function N0(a,t,e){a=a||{};const s=a.random??a.rng?.()??w0();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,v0(s)}function x0(a,t,e){return ue.randomUUID&&!a?ue.randomUUID():N0(a)}const I0=(a,t)=>{const e=a.__vccOpts||a;for(const[s,r]of t)e[s]=r;return e},k0={name:"CalendarAvailability",components:{NcDateTimePickerNative:me,NcButton:Ht,IconAdd:Ie,IconDelete:ke},props:{slots:{type:Object,required:!0},loading:{type:Boolean,default:!1},l10nTo:{type:String,required:!0},l10nDeleteSlot:{type:String,required:!0},l10nEmptyDay:{type:String,required:!0},l10nAddSlot:{type:String,required:!0},l10nWeekDayListLabel:{type:String,default:"Weekdays"},l10nMonday:{type:String,required:!0},l10nTuesday:{type:String,required:!0},l10nWednesday:{type:String,required:!0},l10nThursday:{type:String,required:!0},l10nFriday:{type:String,required:!0},l10nSaturday:{type:String,required:!0},l10nSunday:{type:String,required:!0},l10nStartPickerLabel:{type:Function,default:a=>`Pick a start time for ${a}`},l10nEndPickerLabel:{type:Function,default:a=>`Pick a end time for ${a}`}},data(){return{internalSlots:this.slotsToInternalData(this.slots)}},watch:{slots(){this.internalSlots=this.slotsToInternalData(this.slots)}},methods:{timeStampSlotsToDateObjectSlots(a){return a.map(t=>({start:new Date(t.start*1e3),end:new Date(t.end*1e3)}))},slotsToInternalData(){const a=[{id:"MO",displayName:this.l10nMonday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.MO)},{id:"TU",displayName:this.l10nTuesday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.TU)},{id:"WE",displayName:this.l10nWednesday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.WE)},{id:"TH",displayName:this.l10nThursday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.TH)},{id:"FR",displayName:this.l10nFriday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.FR)},{id:"SA",displayName:this.l10nSaturday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.SA)}],t={id:"SU",displayName:this.l10nSunday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.SU)};return Ne()===1?[...a,t]:[t,...a]},internalDataToSlots(){const a={};return this.internalSlots.forEach(({id:t,slots:e})=>{a[t]=e.map(s=>({start:Math.round(s.start.getTime()/1e3),end:Math.round(s.end.getTime()/1e3)}))}),a},addSlot(a){const t=new Date;t.setHours(9,0,0,0);const e=new Date;e.setHours(17,0,0,0),a.slots.push({start:t,end:e}),this.onChangeSlots()},removeSlot(a,t){a.slots.splice(t,1),this.onChangeSlots()},onChangeSlots(){this.$emit("update:slots",this.internalDataToSlots())}}},B0=["aria-label"],P0={class:"label-weekday"},L0=["id"],z0={class:"availability-slot-group"},V0={class:"to-text"},j0={key:0,class:"empty-content"};function H0(a,t,e,s,r,i){const o=G("NcDateTimePickerNative"),n=G("IconDelete"),l=G("NcButton"),u=G("IconAdd");return B(),H("ul",{class:"week-day-container","aria-label":e.l10nWeekDayListLabel},[(B(!0),H(Ft,null,Gt(r.internalSlots,c=>(B(),H("li",{key:`day-label-${c.id}`,class:"day-container"},[Q("div",P0,[Q("span",{id:c.displayName+"-label"},et(c.displayName),9,L0)]),(B(),H("div",{key:`day-slots-${c.id}`,class:"availability-slots"},[Q("div",z0,[(B(!0),H(Ft,null,Gt(c.slots,(d,m)=>(B(),H("div",{key:`slot-${c.id}-${m}`,class:"availability-slot"},[v(o,{id:`start-${c.id}-${m}`,modelValue:d.start,"onUpdate:modelValue":p=>d.start=p,type:"time",label:e.l10nStartPickerLabel?.(c.displayName),"hide-label":!0,class:"start-date",onChange:i.onChangeSlots},null,8,["id","modelValue","onUpdate:modelValue","label","onChange"]),Q("span",V0,et(e.l10nTo),1),v(o,{id:`end-${c.id}-${m}`,modelValue:d.end,"onUpdate:modelValue":p=>d.end=p,type:"time",label:e.l10nEndPickerLabel?.(c.displayName),"hide-label":!0,class:"end-date",onChange:i.onChangeSlots},null,8,["id","modelValue","onUpdate:modelValue","label","onChange"]),(B(),Pt(l,{key:`slot-${c.id}-${m}-btn`,type:"tertiary",class:"button","aria-label":e.l10nDeleteSlot,title:e.l10nDeleteSlot,onClick:p=>i.removeSlot(c,m)},{icon:st(()=>[v(n,{size:20})]),_:2},1032,["aria-label","title","onClick"]))]))),128))]),c.slots.length===0?(B(),H("span",j0,et(e.l10nEmptyDay),1)):de("",!0)])),(B(),Pt(l,{key:`add-slot-${c.id}`,disabled:e.loading,class:"add-another button",title:e.l10nAddSlot,"aria-label":e.l10nAddSlot,onClick:d=>i.addSlot(c)},{icon:st(()=>[v(u,{size:20})]),_:2},1032,["disabled","title","aria-label","onClick"]))]))),128))],8,B0)}const R0=I0(k0,[["render",H0],["__scopeId","data-v-3ef03e87"]]),W0=be().detectUser().setApp("@nextcloud/calendar-availability-vue").build();function F0(){return{MO:[],TU:[],WE:[],TH:[],FR:[],SA:[],SU:[]}}function G0(a){const t=L.parse(a),e=new L.Component(t),s=e.getFirstSubcomponent("vavailability");let r;const i=e.getFirstSubcomponent("vtimezone");i&&(r=i.getFirstProperty("tzid").getFirstValue());const o=s.getAllSubcomponents("available"),n=F0();return o.forEach(l=>{const u=l.getFirstProperty("dtstart").getFirstValue(),c=l.getFirstProperty("dtend").getFirstValue(),d=l.getFirstProperty("rrule"),m=new Date;m.setHours(u.hour,u.minute,0,0);const p=new Date;if(p.setHours(c.hour,c.minute,0,0),d.getFirstValue().freq!=="WEEKLY"){W0.warn("rrule not supported",{rrule:d.toICALString()});return}d.getFirstValue().getComponent("BYDAY").forEach(y=>{n[y].push({start:m.getTime()/1e3,end:p.getTime()/1e3})})}),{slots:n,timezoneId:r}}function K0(a,t){const e=new L.Component("vcalendar");e.addPropertyWithValue("prodid","Nextcloud DAV app");const s=Xe.getZoneString(t);if(s){const o=new L.Component(L.parse(s));e.addSubcomponent(o)}else{const o=new L.Component("vtimezone");o.addPropertyWithValue("tzid",t),e.addSubcomponent(o)}const r=new L.Component("vavailability"),i=a.reduce((o,n)=>{const l=new Date(n.start*1e3),u=new Date(n.end*1e3),c=[l.getHours(),l.getMinutes(),u.getHours(),u.getMinutes()].join("-");return{...o,[c]:[...o[c]??[],n]}},{});return Object.keys(i).map(o=>{const n=i[o],l=n[0].start,u=n[0].end,c=n.map(m=>m.day).filter((m,p,y)=>y.indexOf(m)===p),d=new L.Component("available");return d.addPropertyWithValue("dtstart",L.Time.fromJSDate(new Date(l*1e3),!1)).setParameter("tzid",t),d.addPropertyWithValue("dtend",L.Time.fromJSDate(new Date(u*1e3),!1)).setParameter("tzid",t),d.addPropertyWithValue("uid",x0()),d.addPropertyWithValue("rrule",{freq:"WEEKLY",byday:c}),d}).map(r.addSubcomponent.bind(r)),e.addSubcomponent(r),e.toString()}let Ct;function Se(){if(!Ct){const a=Ue(`dav/calendars/${Lt().uid}`);Ct=Be(a);const t=e=>{Ct.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})};Ce(t),t(Ye())}return Ct}function q0(){return{MO:[],TU:[],WE:[],TH:[],FR:[],SA:[],SU:[]}}async function Z0(){const a=await Se().customRequest("inbox",{method:"PROPFIND",data:` +`:return"\\n";default:return i}})}}}const S={defaultType:"text"},Tt={defaultType:"text",multiValue:","},Mt={defaultType:"text",structuredValue:";"},Dt={defaultType:"integer"},Et={defaultType:"date-time",allowedTypes:["date-time","date"]},_t={defaultType:"date-time"},I={defaultType:"uri"},ee={defaultType:"utc-offset"},se={defaultType:"recur"},ae={defaultType:"date-and-or-time",allowedTypes:["date-time","date","text"]};function p0(a){switch(a){case"\\\\":return"\\";case"\\;":return";";case"\\,":return",";case"\\n":case"\\N":return` +`;default:return a}}function T0(a,t,e){return a.indexOf("\\")===-1?a:(e&&(t=new RegExp(t.source+"|\\\\"+e,t.flags)),a.replace(t,p0))}let Rt={categories:Tt,url:I,version:S,uid:S},Wt={boolean:{values:["TRUE","FALSE"],fromICAL:function(a){switch(a){case"TRUE":return!0;case"FALSE":return!1;default:return!1}},toICAL:function(a){return a?"TRUE":"FALSE"}},float:{matches:/^[+-]?\d+\.\d+$/,fromICAL:function(a){let t=parseFloat(a);return pt(t)?0:t},toICAL:function(a){return String(a)}},integer:{fromICAL:function(a){let t=parseInt(a);return pt(t)?0:t},toICAL:function(a){return String(a)}},"utc-offset":{toICAL:function(a){return a.length<7?a.slice(0,3)+a.slice(4,6):a.slice(0,3)+a.slice(4,6)+a.slice(7,9)},fromICAL:function(a){return a.length<6?a.slice(0,3)+":"+a.slice(3,5):a.slice(0,3)+":"+a.slice(3,5)+":"+a.slice(5,7)},decorate:function(a){return V.fromString(a)},undecorate:function(a){return a.toString()}}},y0={cutype:{values:["INDIVIDUAL","GROUP","RESOURCE","ROOM","UNKNOWN"],allowXName:!0,allowIanaToken:!0},"delegated-from":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},"delegated-to":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},encoding:{values:["8BIT","BASE64"]},fbtype:{values:["FREE","BUSY","BUSY-UNAVAILABLE","BUSY-TENTATIVE"],allowXName:!0,allowIanaToken:!0},member:{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},partstat:{values:["NEEDS-ACTION","ACCEPTED","DECLINED","TENTATIVE","DELEGATED","COMPLETED","IN-PROCESS"],allowXName:!0,allowIanaToken:!0},range:{values:["THISANDFUTURE"]},related:{values:["START","END"]},reltype:{values:["PARENT","CHILD","SIBLING"],allowXName:!0,allowIanaToken:!0},role:{values:["REQ-PARTICIPANT","CHAIR","OPT-PARTICIPANT","NON-PARTICIPANT"],allowXName:!0,allowIanaToken:!0},rsvp:{values:["TRUE","FALSE"]},"sent-by":{valueType:"cal-address"},tzid:{matches:/^\//},value:{values:["binary","boolean","cal-address","date","date-time","duration","float","integer","period","recur","text","time","uri","utc-offset"],allowXName:!0,allowIanaToken:!0}};const x=ut(Wt,{text:Vt(m0,f0),uri:{},binary:{decorate:function(a){return Nt.fromString(a)},undecorate:function(a){return a.toString()}},"cal-address":{},date:{decorate:function(a,t){return h.fromDateString(a,t)},undecorate:function(a){return a.toString()},fromICAL:function(a){return a.slice(0,4)+"-"+a.slice(4,6)+"-"+a.slice(6,8)},toICAL:function(a){let t=a.length;return t==10?a.slice(0,4)+a.slice(5,7)+a.slice(8,10):t>=19?x["date-time"].toICAL(a):a}},"date-time":{fromICAL:function(a){{let t=a.slice(0,4)+"-"+a.slice(4,6)+"-"+a.slice(6,8)+"T"+a.slice(9,11)+":"+a.slice(11,13)+":"+a.slice(13,15);return a[15]&&a[15]==="Z"&&(t+="Z"),t}},toICAL:function(a){if(a.length>=19){let t=a.slice(0,4)+a.slice(5,7)+a.slice(8,13)+a.slice(14,16)+a.slice(17,19);return a[19]&&a[19]==="Z"&&(t+="Z"),t}else return a},decorate:function(a,t){return h.fromDateTimeString(a,t)},undecorate:function(a){return a.toString()}},duration:{decorate:function(a){return M.fromString(a)},undecorate:function(a){return a.toString()}},period:{fromICAL:function(a){let t=a.split("/");return t[0]=x["date-time"].fromICAL(t[0]),M.isValueString(t[1])||(t[1]=x["date-time"].fromICAL(t[1])),t},toICAL:function(a){return a=a.slice(),a[0]=x["date-time"].toICAL(a[0]),M.isValueString(a[1])||(a[1]=x["date-time"].toICAL(a[1])),a.join("/")},decorate:function(a,t){return K.fromJSON(a,t,!1)},undecorate:function(a){return a.toJSON()}},recur:{fromICAL:function(a){return w._stringToData(a,!0)},toICAL:function(a){let t="";for(let[e,s]of Object.entries(a))e=="until"?s.length>10?s=x["date-time"].toICAL(s):s=x.date.toICAL(s):e=="wkst"?typeof s=="number"&&(s=w.numericDayToIcalDay(s)):Array.isArray(s)&&(s=s.join(",")),t+=e.toUpperCase()+"="+s+";";return t.slice(0,Math.max(0,t.length-1))},decorate:function(a){return w.fromData(a)},undecorate:function(a){return a.toJSON()}},time:{fromICAL:function(a){if(a.length<6)return a;let t=a.slice(0,2)+":"+a.slice(2,4)+":"+a.slice(4,6);return a[6]==="Z"&&(t+="Z"),t},toICAL:function(a){if(a.length<8)return a;let t=a.slice(0,2)+a.slice(3,5)+a.slice(6,8);return a[8]==="Z"&&(t+="Z"),t}}});let S0=ut(Rt,{action:S,attach:{defaultType:"uri"},attendee:{defaultType:"cal-address"},calscale:S,class:S,comment:S,completed:_t,contact:S,created:_t,description:S,dtend:Et,dtstamp:_t,dtstart:Et,due:Et,duration:{defaultType:"duration"},exdate:{defaultType:"date-time",allowedTypes:["date-time","date"],multiValue:","},exrule:se,freebusy:{defaultType:"period",multiValue:","},geo:{defaultType:"float",structuredValue:";"},"last-modified":_t,location:S,method:S,organizer:{defaultType:"cal-address"},"percent-complete":Dt,priority:Dt,prodid:S,"related-to":S,repeat:Dt,rdate:{defaultType:"date-time",allowedTypes:["date-time","date","period"],multiValue:",",detectType:function(a){return a.indexOf("/")!==-1?"period":a.indexOf("T")===-1?"date":"date-time"}},"recurrence-id":Et,resources:Tt,"request-status":Mt,rrule:se,sequence:Dt,status:S,summary:S,transp:S,trigger:{defaultType:"duration",allowedTypes:["duration","date-time"]},tzoffsetfrom:ee,tzoffsetto:ee,tzurl:I,tzid:S,tzname:S});const P=ut(Wt,{text:Vt(Qt,te),uri:Vt(Qt,te),date:{decorate:function(a){return tt.fromDateAndOrTimeString(a,"date")},undecorate:function(a){return a.toString()},fromICAL:function(a){return a.length==8?x.date.fromICAL(a):a[0]=="-"&&a.length==6?a.slice(0,4)+"-"+a.slice(4):a},toICAL:function(a){return a.length==10?x.date.toICAL(a):a[0]=="-"&&a.length==7?a.slice(0,4)+a.slice(5):a}},time:{decorate:function(a){return tt.fromDateAndOrTimeString("T"+a,"time")},undecorate:function(a){return a.toString()},fromICAL:function(a){let t=P.time._splitZone(a,!0),e=t[0],s=t[1];return s.length==6?s=s.slice(0,2)+":"+s.slice(2,4)+":"+s.slice(4,6):s.length==4&&s[0]!="-"?s=s.slice(0,2)+":"+s.slice(2,4):s.length==5&&(s=s.slice(0,3)+":"+s.slice(3,5)),e.length==5&&(e[0]=="-"||e[0]=="+")&&(e=e.slice(0,3)+":"+e.slice(3)),s+e},toICAL:function(a){let t=P.time._splitZone(a),e=t[0],s=t[1];return s.length==8?s=s.slice(0,2)+s.slice(3,5)+s.slice(6,8):s.length==5&&s[0]!="-"?s=s.slice(0,2)+s.slice(3,5):s.length==6&&(s=s.slice(0,3)+s.slice(4,6)),e.length==6&&(e[0]=="-"||e[0]=="+")&&(e=e.slice(0,3)+e.slice(4)),s+e},_splitZone:function(a,t){let e=a.length-1,s=a.length-(t?5:6),r=a[s],i,o;return a[e]=="Z"?(i=a[e],o=a.slice(0,Math.max(0,e))):a.length>6&&(r=="-"||r=="+")?(i=a.slice(s),o=a.slice(0,Math.max(0,s))):(i="",o=a),[i,o]}},"date-time":{decorate:function(a){return tt.fromDateAndOrTimeString(a,"date-time")},undecorate:function(a){return a.toString()},fromICAL:function(a){return P["date-and-or-time"].fromICAL(a)},toICAL:function(a){return P["date-and-or-time"].toICAL(a)}},"date-and-or-time":{decorate:function(a){return tt.fromDateAndOrTimeString(a,"date-and-or-time")},undecorate:function(a){return a.toString()},fromICAL:function(a){let t=a.split("T");return(t[0]?P.date.fromICAL(t[0]):"")+(t[1]?"T"+P.time.fromICAL(t[1]):"")},toICAL:function(a){let t=a.split("T");return P.date.toICAL(t[0])+(t[1]?"T"+P.time.toICAL(t[1]):"")}},timestamp:x["date-time"],"language-tag":{matches:/^[a-zA-Z0-9-]+$/},"phone-number":{fromICAL:function(a){return Array.from(a).filter(function(t){return t==="\\"?void 0:t}).join("")},toICAL:function(a){return Array.from(a).map(function(t){return t===","||t===";"?"\\"+t:t}).join("")}}});let A0={type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","time","date-time","date-and-or-time","timestamp","boolean","integer","float","utc-offset","language-tag"],allowXName:!0,allowIanaToken:!0}},g0=ut(Rt,{adr:{defaultType:"text",structuredValue:";",multiValue:","},anniversary:ae,bday:ae,caladruri:I,caluri:I,clientpidmap:Mt,email:S,fburl:I,fn:S,gender:Mt,geo:I,impp:I,key:I,kind:S,lang:{defaultType:"language-tag"},logo:I,member:I,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:Tt,note:S,org:{defaultType:"text",structuredValue:";"},photo:I,related:I,rev:{defaultType:"timestamp"},role:S,sound:I,source:I,tel:{defaultType:"uri",allowedTypes:["uri","text"]},title:S,tz:{defaultType:"text",allowedTypes:["text","utc-offset","uri"]},xml:S}),D0=ut(Wt,{binary:x.binary,date:P.date,"date-time":P["date-time"],"phone-number":P["phone-number"],uri:x.uri,text:P.text,time:x.time,vcard:x.text,"utc-offset":{toICAL:function(a){return a.slice(0,7)},fromICAL:function(a){return a.slice(0,7)},decorate:function(a){return V.fromString(a)},undecorate:function(a){return a.toString()}}}),E0={type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","date-time","phone-number","time","boolean","integer","float","utc-offset","vcard","binary"],allowXName:!0,allowIanaToken:!0}},_0=ut(Rt,{fn:S,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:Tt,photo:{defaultType:"binary",allowedTypes:["binary","uri"]},bday:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(a){return a.indexOf("T")===-1?"date":"date-time"}},adr:{defaultType:"text",structuredValue:";",multiValue:","},label:S,tel:{defaultType:"phone-number"},email:S,mailer:S,tz:{defaultType:"utc-offset",allowedTypes:["utc-offset","text"]},geo:{defaultType:"float",structuredValue:";"},title:S,role:S,logo:{defaultType:"binary",allowedTypes:["binary","uri"]},agent:{defaultType:"vcard",allowedTypes:["vcard","text","uri"]},org:Mt,note:Tt,prodid:S,rev:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(a){return a.indexOf("T")===-1?"date":"date-time"}},"sort-string":S,sound:{defaultType:"binary",allowedTypes:["binary","uri"]},class:S,key:{defaultType:"binary",allowedTypes:["binary","text"]}}),F={name:"ical",value:x,param:y0,property:S0,propertyGroups:!1},re={name:"vcard4",value:P,param:A0,property:g0,propertyGroups:!0},ie={name:"vcard3",value:D0,param:E0,property:_0,propertyGroups:!0};const b={strict:!0,defaultSet:F,defaultType:"unknown",components:{vcard:re,vcard3:ie,vevent:F,vtodo:F,vjournal:F,valarm:F,vtimezone:F,daylight:F,standard:F},icalendar:F,vcard:re,vcard3:ie,getDesignSet:function(a){return a&&a in b.components?b.components[a]:b.defaultSet}},Yt=`\r +`,ne="unknown",b0={'"':"^'","\n":"^n","^":"^^"};function _(a){typeof a[0]=="string"&&(a=[a]);let t=0,e=a.length,s="";for(;t0&&!(a[1][0][0]==="version"&&a[1][0][3]==="4.0")&&(n="vcard3"),t=t||b.getDesignSet(n);i0&&typeof t[0]=="object"&&"icaltype"in t[0]&&this.resetType(t[0].icaltype),this.isDecorated)for(;s=0;o--)(!s||i[o][$]===s)&&this._removeObjectByIndex(t,r,o)}addSubcomponent(t){this._components||(this._components=[],this._hydratedComponentCount=0),t.parent&&t.parent.removeSubcomponent(t);let e=this.jCal[X].push(t.jCal);return this._components[e-1]=t,this._hydratedComponentCount++,t.parent=this,t}removeSubcomponent(t){let e=this._removeObject(X,"_components",t);return e&&this._hydratedComponentCount--,e}removeAllSubcomponents(t){let e=this._removeAllObjects(X,"_components",t);return this._hydratedComponentCount=0,e}addProperty(t){if(!(t instanceof ot))throw new TypeError("must be instance of ICAL.Property");this._properties||(this._properties=[],this._hydratedPropertyCount=0),t.parent&&t.parent.removeProperty(t);let e=this.jCal[j].push(t.jCal);return this._properties[e-1]=t,this._hydratedPropertyCount++,t.parent=this,t}addPropertyWithValue(t,e){let s=new ot(t);return s.setValue(e),this.addProperty(s),s}updatePropertyWithValue(t,e){let s=this.getFirstProperty(t);return s?s.setValue(e):s=this.addPropertyWithValue(t,e),s}removeProperty(t){let e=this._removeObject(j,"_properties",t);return e&&this._hydratedPropertyCount--,e}removeAllProperties(t){let e=this._removeAllObjects(j,"_properties",t);return this._hydratedPropertyCount=0,e}toJSON(){return this.jCal}toString(){return _.component(this.jCal,this._designSet)}getTimeZoneByID(t){if(this.parent)return this.parent.getTimeZoneByID(t);if(!this._timezoneCache)return null;if(this._timezoneCache.has(t))return this._timezoneCache.get(t);const e=this.getAllSubcomponents("vtimezone");for(const s of e)if(s.getFirstProperty("tzid").getFirstValue()===t){const r=new T({component:s,tzid:t});return this._timezoneCache.set(t,r),r}return null}}class ye{constructor(t){this.ruleDates=[],this.exDates=[],this.fromData(t)}complete=!1;ruleIterators=null;ruleDates=null;exDates=null;ruleDateInc=0;exDateInc=0;exDate=null;ruleDate=null;dtstart=null;last=null;fromData(t){let e=q(t.dtstart,h);if(e)this.dtstart=e;else throw new Error(".dtstart (ICAL.Time) must be given");if(t.component)this._init(t.component);else{if(this.last=q(t.last,h)||e.clone(),!t.ruleIterators)throw new Error(".ruleIterators or .component must be given");this.ruleIterators=t.ruleIterators.map(function(s){return q(s,R)}),this.ruleDateInc=t.ruleDateInc,this.exDateInc=t.exDateInc,t.ruleDates&&(this.ruleDates=t.ruleDates.map(s=>q(s,h)),this.ruleDate=this.ruleDates[this.ruleDateInc]),t.exDates&&(this.exDates=t.exDates.map(s=>q(s,h)),this.exDate=this.exDates[this.exDateInc]),typeof t.complete<"u"&&(this.complete=t.complete)}}_compare_special(t,e){return!t.isDate&&e.isDate?new h({year:t.year,month:t.month,day:t.day}).compare(e):t.compare(e)}next(){let t,e,s,r=500,i=0;for(;;){if(i++>r)throw new Error("max tries have occurred, rule may be impossible to fulfill.");if(e=this.ruleDate,t=this._nextRecurrenceIter(this.last),!e&&!t){this.complete=!0;break}if((!e||t&&e.compare(t.last)>0)&&(e=t.last.clone(),t.next()),this.ruleDate===e&&this._nextRuleDay(),this.last=e,this.exDate&&(s=this._compare_special(this.last,this.exDate),s>0&&this._nextExDay(),s===0)){this._nextExDay();continue}return this.last}}toJSON(){function t(s){return s.toJSON()}let e=Object.create(null);return e.ruleIterators=this.ruleIterators.map(t),this.ruleDates&&(e.ruleDates=this.ruleDates.map(t)),this.exDates&&(e.exDates=this.exDates.map(t)),e.ruleDateInc=this.ruleDateInc,e.exDateInc=this.exDateInc,e.last=this.last.toJSON(),e.dtstart=this.dtstart.toJSON(),e.complete=this.complete,e}_extractDates(t,e){let s=[],r=t.getAllProperties(e);for(let i=0,o=r.length;iu.compare(c));s.splice(l,0,n)}return s}_init(t){if(this.ruleIterators=[],this.last=this.dtstart.clone(),!t.hasProperty("rdate")&&!t.hasProperty("rrule")&&!t.hasProperty("recurrence-id")){this.ruleDate=this.last.clone(),this.complete=!0;return}if(t.hasProperty("rdate")&&(this.ruleDates=this._extractDates(t,"rdate"),this.ruleDates[0]&&this.ruleDates[0].compare(this.dtstart)<0?(this.ruleDateInc=0,this.last=this.ruleDates[0].clone()):this.ruleDateInc=nt(this.ruleDates,this.last,(e,s)=>e.compare(s)),this.ruleDate=this.ruleDates[this.ruleDateInc]),t.hasProperty("rrule")){let e=t.getAllProperties("rrule"),s=0,r=e.length,i,o;for(;s0)&&(o=s)}return o}}class yt{constructor(t,e){t instanceof z||(e=t,t=null),t?this.component=t:this.component=new z("vevent"),this._rangeExceptionCache=Object.create(null),this.exceptions=Object.create(null),this.rangeExceptions=[],e&&e.strictExceptions&&(this.strictExceptions=e.strictExceptions),e&&e.exceptions?e.exceptions.forEach(this.relateException,this):this.component.parent&&!this.isRecurrenceException()&&this.component.parent.getAllSubcomponents("vevent").forEach(function(s){s.hasProperty("recurrence-id")&&this.relateException(s)},this)}static THISANDFUTURE="THISANDFUTURE";exceptions=null;strictExceptions=!1;relateException(t){if(this.isRecurrenceException())throw new Error("cannot relate exception to exceptions");if(t instanceof z&&(t=new yt(t)),this.strictExceptions&&t.uid!==this.uid)throw new Error("attempted to relate unrelated exception");let e=t.recurrenceId.toString();if(this.exceptions[e]=t,t.modifiesFuture()){let s=[t.recurrenceId.toUnixTime(),e],r=nt(this.rangeExceptions,s,le);this.rangeExceptions.splice(r,0,s)}}modifiesFuture(){return this.component.hasProperty("recurrence-id")?this.component.getFirstProperty("recurrence-id").getParameter("range")===yt.THISANDFUTURE:!1}findRangeException(t){if(!this.rangeExceptions.length)return null;let e=t.toUnixTime(),s=nt(this.rangeExceptions,[e],le);if(s-=1,s<0)return null;let r=this.rangeExceptions[s];return et[0]?1:t[0]>a[0]?-1:0}class Y0{constructor(t){typeof t>"u"&&(t={});for(let[e,s]of Object.entries(t))this[e]=s}parseEvent=!0;parseTimezone=!0;oncomplete=function(){};onerror=function(t){};ontimezone=function(t){};onevent=function(t){};process(t){typeof t=="string"&&(t=g(t)),t instanceof z||(t=new z(t));let e=t.getAllSubcomponents(),s=0,r=e.length,i;for(;s"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Bt=crypto.getRandomValues.bind(crypto)}return Bt(O0)}const M0=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ue={randomUUID:M0};function N0(a,t,e){a=a||{};const s=a.random??a.rng?.()??w0();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,v0(s)}function x0(a,t,e){return ue.randomUUID&&!a?ue.randomUUID():N0(a)}const I0=(a,t)=>{const e=a.__vccOpts||a;for(const[s,r]of t)e[s]=r;return e},k0={name:"CalendarAvailability",components:{NcDateTimePickerNative:me,NcButton:Ht,IconAdd:Ie,IconDelete:ke},props:{slots:{type:Object,required:!0},loading:{type:Boolean,default:!1},l10nTo:{type:String,required:!0},l10nDeleteSlot:{type:String,required:!0},l10nEmptyDay:{type:String,required:!0},l10nAddSlot:{type:String,required:!0},l10nWeekDayListLabel:{type:String,default:"Weekdays"},l10nMonday:{type:String,required:!0},l10nTuesday:{type:String,required:!0},l10nWednesday:{type:String,required:!0},l10nThursday:{type:String,required:!0},l10nFriday:{type:String,required:!0},l10nSaturday:{type:String,required:!0},l10nSunday:{type:String,required:!0},l10nStartPickerLabel:{type:Function,default:a=>`Pick a start time for ${a}`},l10nEndPickerLabel:{type:Function,default:a=>`Pick a end time for ${a}`}},data(){return{internalSlots:this.slotsToInternalData(this.slots)}},watch:{slots(){this.internalSlots=this.slotsToInternalData(this.slots)}},methods:{timeStampSlotsToDateObjectSlots(a){return a.map(t=>({start:new Date(t.start*1e3),end:new Date(t.end*1e3)}))},slotsToInternalData(){const a=[{id:"MO",displayName:this.l10nMonday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.MO)},{id:"TU",displayName:this.l10nTuesday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.TU)},{id:"WE",displayName:this.l10nWednesday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.WE)},{id:"TH",displayName:this.l10nThursday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.TH)},{id:"FR",displayName:this.l10nFriday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.FR)},{id:"SA",displayName:this.l10nSaturday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.SA)}],t={id:"SU",displayName:this.l10nSunday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.SU)};return Ne()===1?[...a,t]:[t,...a]},internalDataToSlots(){const a={};return this.internalSlots.forEach(({id:t,slots:e})=>{a[t]=e.map(s=>({start:Math.round(s.start.getTime()/1e3),end:Math.round(s.end.getTime()/1e3)}))}),a},addSlot(a){const t=new Date;t.setHours(9,0,0,0);const e=new Date;e.setHours(17,0,0,0),a.slots.push({start:t,end:e}),this.onChangeSlots()},removeSlot(a,t){a.slots.splice(t,1),this.onChangeSlots()},onChangeSlots(){this.$emit("update:slots",this.internalDataToSlots())}}},B0=["aria-label"],P0={class:"label-weekday"},L0=["id"],z0={class:"availability-slot-group"},V0={class:"to-text"},j0={key:0,class:"empty-content"};function H0(a,t,e,s,r,i){const o=G("NcDateTimePickerNative"),n=G("IconDelete"),l=G("NcButton"),u=G("IconAdd");return B(),H("ul",{class:"week-day-container","aria-label":e.l10nWeekDayListLabel},[(B(!0),H(Ft,null,Gt(r.internalSlots,c=>(B(),H("li",{key:`day-label-${c.id}`,class:"day-container"},[Q("div",P0,[Q("span",{id:c.displayName+"-label"},et(c.displayName),9,L0)]),(B(),H("div",{key:`day-slots-${c.id}`,class:"availability-slots"},[Q("div",z0,[(B(!0),H(Ft,null,Gt(c.slots,(d,m)=>(B(),H("div",{key:`slot-${c.id}-${m}`,class:"availability-slot"},[v(o,{id:`start-${c.id}-${m}`,modelValue:d.start,"onUpdate:modelValue":p=>d.start=p,type:"time",label:e.l10nStartPickerLabel?.(c.displayName),"hide-label":!0,class:"start-date",onChange:i.onChangeSlots},null,8,["id","modelValue","onUpdate:modelValue","label","onChange"]),Q("span",V0,et(e.l10nTo),1),v(o,{id:`end-${c.id}-${m}`,modelValue:d.end,"onUpdate:modelValue":p=>d.end=p,type:"time",label:e.l10nEndPickerLabel?.(c.displayName),"hide-label":!0,class:"end-date",onChange:i.onChangeSlots},null,8,["id","modelValue","onUpdate:modelValue","label","onChange"]),(B(),Pt(l,{key:`slot-${c.id}-${m}-btn`,type:"tertiary",class:"button","aria-label":e.l10nDeleteSlot,title:e.l10nDeleteSlot,onClick:p=>i.removeSlot(c,m)},{icon:st(()=>[v(n,{size:20})]),_:2},1032,["aria-label","title","onClick"]))]))),128))]),c.slots.length===0?(B(),H("span",j0,et(e.l10nEmptyDay),1)):de("",!0)])),(B(),Pt(l,{key:`add-slot-${c.id}`,disabled:e.loading,class:"add-another button",title:e.l10nAddSlot,"aria-label":e.l10nAddSlot,onClick:d=>i.addSlot(c)},{icon:st(()=>[v(u,{size:20})]),_:2},1032,["disabled","title","aria-label","onClick"]))]))),128))],8,B0)}const R0=I0(k0,[["render",H0],["__scopeId","data-v-3ef03e87"]]),W0=be().detectUser().setApp("@nextcloud/calendar-availability-vue").build();function F0(){return{MO:[],TU:[],WE:[],TH:[],FR:[],SA:[],SU:[]}}function G0(a){const t=L.parse(a),e=new L.Component(t),s=e.getFirstSubcomponent("vavailability");let r;const i=e.getFirstSubcomponent("vtimezone");i&&(r=i.getFirstProperty("tzid").getFirstValue());const o=s.getAllSubcomponents("available"),n=F0();return o.forEach(l=>{const u=l.getFirstProperty("dtstart").getFirstValue(),c=l.getFirstProperty("dtend").getFirstValue(),d=l.getFirstProperty("rrule"),m=new Date;m.setHours(u.hour,u.minute,0,0);const p=new Date;if(p.setHours(c.hour,c.minute,0,0),d.getFirstValue().freq!=="WEEKLY"){W0.warn("rrule not supported",{rrule:d.toICALString()});return}d.getFirstValue().getComponent("BYDAY").forEach(y=>{n[y].push({start:m.getTime()/1e3,end:p.getTime()/1e3})})}),{slots:n,timezoneId:r}}function K0(a,t){const e=new L.Component("vcalendar");e.addPropertyWithValue("prodid","Nextcloud DAV app");const s=Xe.getZoneString(t);if(s){const o=new L.Component(L.parse(s));e.addSubcomponent(o)}else{const o=new L.Component("vtimezone");o.addPropertyWithValue("tzid",t),e.addSubcomponent(o)}const r=new L.Component("vavailability"),i=a.reduce((o,n)=>{const l=new Date(n.start*1e3),u=new Date(n.end*1e3),c=[l.getHours(),l.getMinutes(),u.getHours(),u.getMinutes()].join("-");return{...o,[c]:[...o[c]??[],n]}},{});return Object.keys(i).map(o=>{const n=i[o],l=n[0].start,u=n[0].end,c=n.map(m=>m.day).filter((m,p,y)=>y.indexOf(m)===p),d=new L.Component("available");return d.addPropertyWithValue("dtstart",L.Time.fromJSDate(new Date(l*1e3),!1)).setParameter("tzid",t),d.addPropertyWithValue("dtend",L.Time.fromJSDate(new Date(u*1e3),!1)).setParameter("tzid",t),d.addPropertyWithValue("uid",x0()),d.addPropertyWithValue("rrule",{freq:"WEEKLY",byday:c}),d}).map(r.addSubcomponent.bind(r)),e.addSubcomponent(r),e.toString()}let Ct;function Se(){if(!Ct){const a=Ue(`dav/calendars/${Lt().uid}`);Ct=Be(a);const t=e=>{Ct.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})};Ce(t),t(Ye())}return Ct}function q0(){return{MO:[],TU:[],WE:[],TH:[],FR:[],SA:[],SU:[]}}async function Z0(){const a=await Se().customRequest("inbox",{method:"PROPFIND",data:` @@ -18,5 +18,5 @@ override isMultiValue`);let e=t.length,s=0;if(this.removeAllValues(),e>0&&typeof ${s} - `})}async function $0(){await ft.post(mt("/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"dav",configKey:"user_status_automation"}),{configValue:"yes"})}async function X0(){await ft.delete(mt("/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"dav",configKey:"user_status_automation"}))}const Q0=ce({__name:"AvailabilityForm",setup(a){const t=_e().core.user?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone,e=St(!0),s=St(!1),r=St(q0()),i=St(jt("dav","user_status_automation")==="yes");ge(async()=>{try{const n=await Z0();n?(r.value=n.slots,W.debug("availability loaded",{slots:r.value})):W.debug("no availability is set")}catch(n){W.error("could not load existing availability",{error:n}),Ot(D("dav","Failed to load availability"))}finally{e.value=!1}});async function o(){s.value=!0;try{await J0(r.value,t),i.value?await $0():await X0(),zt(D("dav","Saved availability"))}catch(n){W.error("could not save availability",{error:n}),Ot(D("dav","Failed to save availability"))}finally{s.value=!1}}return(n,l)=>(B(),H("div",null,[v(_(R0),{slots:r.value,"onUpdate:slots":l[0]||(l[0]=u=>r.value=u),loading:e.value,l10nTo:_(D)("dav","to"),l10nDeleteSlot:_(D)("dav","Delete slot"),l10nEmptyDay:_(D)("dav","No working hours set"),l10nAddSlot:_(D)("dav","Add slot"),l10nWeekDayListLabel:_(D)("dav","Weekdays"),l10nMonday:_(D)("dav","Monday"),l10nTuesday:_(D)("dav","Tuesday"),l10nWednesday:_(D)("dav","Wednesday"),l10nThursday:_(D)("dav","Thursday"),l10nFriday:_(D)("dav","Friday"),l10nSaturday:_(D)("dav","Saturday"),l10nSunday:_(D)("dav","Sunday"),l10nStartPickerLabel:u=>_(D)("dav","Pick a start time for {dayName}",{dayName:u}),l10nEndPickerLabel:u=>_(D)("dav","Pick a end time for {dayName}",{dayName:u})},null,8,["slots","loading","l10nTo","l10nDeleteSlot","l10nEmptyDay","l10nAddSlot","l10nWeekDayListLabel","l10nMonday","l10nTuesday","l10nWednesday","l10nThursday","l10nFriday","l10nSaturday","l10nSunday","l10nStartPickerLabel","l10nEndPickerLabel"]),v(_(xe),{modelValue:i.value,"onUpdate:modelValue":l[1]||(l[1]=u=>i.value=u)},{default:st(()=>[vt(et(_(D)("dav",'Automatically set user status to "Do not disturb" outside of availability to mute all notifications.')),1)]),_:1},8,["modelValue"]),v(_(Ht),{disabled:e.value||s.value,variant:"primary",onClick:o},{default:st(()=>[vt(et(_(D)("dav","Save")),1)]),_:1},8,["disabled"])]))}}),ts=he(Q0,[["__scopeId","data-v-3ad7b763"]]),es=ce({__name:"UserAvailability",setup(a){const t=jt("dav","hide_absence_settings",!0);return(e,s)=>(B(),H("div",null,[v(_(Kt),{id:"availability",name:_(D)("dav","Availability"),description:_(D)("dav","If you configure your working hours, other people will see when you are out of office when they book a meeting.")},{default:st(()=>[v(ts)]),_:1},8,["name","description"]),_(t)?de("",!0):(B(),Pt(_(Kt),{key:0,id:"absence",name:_(D)("dav","Absence"),description:_(D)("dav","Configure your next absence period.")},{default:st(()=>[v(Ze)]),_:1},8,["name","description"]))]))}}),ss=De(es);ss.mount("#settings-personal-availability"); + `})}async function $0(){await ft.post(mt("/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"dav",configKey:"user_status_automation"}),{configValue:"yes"})}async function X0(){await ft.delete(mt("/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"dav",configKey:"user_status_automation"}))}const Q0=ce({__name:"AvailabilityForm",setup(a){const t=Ee().core.user?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone,e=St(!0),s=St(!1),r=St(q0()),i=St(jt("dav","user_status_automation")==="yes");ge(async()=>{try{const n=await Z0();n?(r.value=n.slots,W.debug("availability loaded",{slots:r.value})):W.debug("no availability is set")}catch(n){W.error("could not load existing availability",{error:n}),Ot(D("dav","Failed to load availability"))}finally{e.value=!1}});async function o(){s.value=!0;try{await J0(r.value,t),i.value?await $0():await X0(),zt(D("dav","Saved availability"))}catch(n){W.error("could not save availability",{error:n}),Ot(D("dav","Failed to save availability"))}finally{s.value=!1}}return(n,l)=>(B(),H("div",null,[v(E(R0),{slots:r.value,"onUpdate:slots":l[0]||(l[0]=u=>r.value=u),loading:e.value,l10nTo:E(D)("dav","to"),l10nDeleteSlot:E(D)("dav","Delete slot"),l10nEmptyDay:E(D)("dav","No working hours set"),l10nAddSlot:E(D)("dav","Add slot"),l10nWeekDayListLabel:E(D)("dav","Weekdays"),l10nMonday:E(D)("dav","Monday"),l10nTuesday:E(D)("dav","Tuesday"),l10nWednesday:E(D)("dav","Wednesday"),l10nThursday:E(D)("dav","Thursday"),l10nFriday:E(D)("dav","Friday"),l10nSaturday:E(D)("dav","Saturday"),l10nSunday:E(D)("dav","Sunday"),l10nStartPickerLabel:u=>E(D)("dav","Pick a start time for {dayName}",{dayName:u}),l10nEndPickerLabel:u=>E(D)("dav","Pick a end time for {dayName}",{dayName:u})},null,8,["slots","loading","l10nTo","l10nDeleteSlot","l10nEmptyDay","l10nAddSlot","l10nWeekDayListLabel","l10nMonday","l10nTuesday","l10nWednesday","l10nThursday","l10nFriday","l10nSaturday","l10nSunday","l10nStartPickerLabel","l10nEndPickerLabel"]),v(E(xe),{modelValue:i.value,"onUpdate:modelValue":l[1]||(l[1]=u=>i.value=u)},{default:st(()=>[vt(et(E(D)("dav",'Automatically set user status to "Do not disturb" outside of availability to mute all notifications.')),1)]),_:1},8,["modelValue"]),v(E(Ht),{disabled:e.value||s.value,variant:"primary",onClick:o},{default:st(()=>[vt(et(E(D)("dav","Save")),1)]),_:1},8,["disabled"])]))}}),ts=he(Q0,[["__scopeId","data-v-3ad7b763"]]),es=ce({__name:"UserAvailability",setup(a){const t=jt("dav","hide_absence_settings",!0);return(e,s)=>(B(),H("div",null,[v(E(Kt),{id:"availability",name:E(D)("dav","Availability"),description:E(D)("dav","If you configure your working hours, other people will see when you are out of office when they book a meeting.")},{default:st(()=>[v(ts)]),_:1},8,["name","description"]),E(t)?de("",!0):(B(),Pt(E(Kt),{key:0,id:"absence",name:E(D)("dav","Absence"),description:E(D)("dav","Configure your next absence period.")},{default:st(()=>[v(Ze)]),_:1},8,["name","description"]))]))}}),ss=De(es);ss.mount("#settings-personal-availability"); //# sourceMappingURL=dav-settings-personal-availability.mjs.map diff --git a/dist/encryption-encryption.mjs b/dist/encryption-encryption.mjs index 28d81fbea7e86..8216d33c841d2 100644 --- a/dist/encryption-encryption.mjs +++ b/dist/encryption-encryption.mjs @@ -1,2 +1,2 @@ -import{a as o,b as i}from"./index-DgEyzq8A.chunk.mjs";import{c as r}from"./index-9ZBo3L67.chunk.mjs";import{s as a}from"./index-DCJOwzzz.chunk.mjs";import"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-C3KLQ_oe.chunk.mjs";import"./index-CO7ZwNPX.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";window.addEventListener("DOMContentLoaded",async function(){if(o()===null)return;const{data:t}=await r.get(i("/apps/encryption/ajax/getStatus"));t.status==="interactionNeeded"&&a(t.data.message)}); +import{a as o,b as i}from"./index-DgEyzq8A.chunk.mjs";import{c as r}from"./index-9ZBo3L67.chunk.mjs";import{s as a}from"./index-WQvok30H.chunk.mjs";import"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-C3KLQ_oe.chunk.mjs";import"./index-CO7ZwNPX.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";window.addEventListener("DOMContentLoaded",async function(){if(o()===null)return;const{data:t}=await r.get(i("/apps/encryption/ajax/getStatus"));t.status==="interactionNeeded"&&a(t.data.message)}); //# sourceMappingURL=encryption-encryption.mjs.map diff --git a/dist/encryption-settings_admin.mjs b/dist/encryption-settings_admin.mjs index 43492d454f0ae..b74f5374c46c3 100644 --- a/dist/encryption-settings_admin.mjs +++ b/dist/encryption-settings_admin.mjs @@ -1,2 +1,2 @@ -import{b as k,q as x,v as T,o as p,c as f,u as e,w as c,g,t as w,r as i,s as A,j as P,e as m,m as h,C as q,p as K,n as j,F as H,k as D,h as F}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{a as I,l as M}from"./index-C3KLQ_oe.chunk.mjs";import{t as o}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./index-COiwHfFG.chunk.mjs";import"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{w as z}from"./index-CO7ZwNPX.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./NcRichText-BO_4KtBA-DXDa2H1Y.chunk.mjs";import{N}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import{b as S}from"./index-DgEyzq8A.chunk.mjs";import{N as B}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";import"./Plus-gXjhFOHV.chunk.mjs";/* empty css */import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import{N as E}from"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import{N as V}from"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import{c as R}from"./index-9ZBo3L67.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import"./index-CuPuSdF1.chunk.mjs";import{N as $}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import{d as O}from"./index-DCJOwzzz.chunk.mjs";import{N as U,l as C,I as G}from"./types-Bf2CusGK.chunk.mjs";import"./index-sH3U_332.chunk.mjs";const J=k({__name:"SettingsAdminHomeStorage",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(b){const a=x(b,"modelValue"),s=i(!1);return T(a,()=>{s.value=!0}),z(a,async(t,n)=>{if(t===n){s.value=!1;return}try{await R.post(S("/apps/encryption/ajax/setEncryptHomeStorage"),{encryptHomeStorage:t})}finally{s.value=!1}},{debounce:800}),(t,n)=>(p(),f(e(B),{modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=r=>a.value=r),loading:s.value,description:e(o)("encryption","Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted"),type:"switch"},{default:c(()=>[g(w(e(o)("encryption","Encrypt the home storage")),1)]),_:1},8,["modelValue","loading","description"]))}}),L=k({__name:"SettingsAdminRecoveryKey",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(b){const a=x(b,"modelValue"),s=A("form"),t=i(!1),n=i(!1),r=i(""),l=i(""),v=K(()=>r.value===l.value);async function _(){if(!t.value&&v.value){n.value=!1,t.value=!0;try{const{data:d}=await R.post(S("/apps/encryption/ajax/adminRecovery"),{adminEnableRecovery:!a.value,recoveryPassword:r.value,confirmPassword:l.value});a.value=!a.value,r.value=l.value="",s.value?.reset(),d.data.message&&O(d.data.message)}catch(d){n.value=!0,C.error("Failed to update recovery key settings",{error:d})}finally{t.value=!1}}}return(d,u)=>(p(),P("form",{ref:"form",onSubmit:q(_,["prevent"])},[m(e(U),{label:a.value?e(o)("encryption","Disable recovery key"):e(o)("encryption","Enable recovery key"),description:e(o)("encryption","The recovery key is an additional encryption key used to encrypt files. It is used to recover files from an account if the password is forgotten.")},{default:c(()=>[m(e(V),{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=y=>r.value=y),required:"",name:"password",label:e(o)("encryption","Recovery key password")},null,8,["modelValue","label"]),m(e(V),{modelValue:l.value,"onUpdate:modelValue":u[1]||(u[1]=y=>l.value=y),required:"",name:"confirmPassword",error:!!l.value&&!v.value,helperText:v.value||!l.value?"":e(o)("encryption","Passwords fields do not match"),label:e(o)("encryption","Repeat recovery key password")},null,8,["modelValue","error","helperText","label"]),m(e(N),{type:"submit",variant:a.value?"error":"primary"},{default:c(()=>[g(w(a.value?e(o)("encryption","Disable recovery key"):e(o)("encryption","Enable recovery key")),1)]),_:1},8,["variant"]),n.value?(p(),f(e(E),{key:0,type:"error"},{default:c(()=>[g(w(e(o)("encryption","An error occurred while updating the recovery key settings. Please try again.")),1)]),_:1})):h("",!0)]),_:1},8,["label","description"])],544))}}),Q=k({__name:"SettingsAdminRecoveryKeyChange",setup(b){const a=A("form"),s=i(!1),t=i(!1),n=i(""),r=i(""),l=i(""),v=K(()=>r.value===l.value);async function _(){if(!s.value&&v.value){t.value=!1,s.value=!0;try{await R.post(S("/apps/encryption/ajax/changeRecoveryPassword"),{oldPassword:n.value,newPassword:r.value,confirmPassword:l.value}),n.value=r.value=l.value="",a.value?.reset()}catch(d){t.value=!0,C.error("Failed to update recovery key settings",{error:d})}finally{s.value=!1}}}return(d,u)=>(p(),P("form",{ref:"form",class:j(d.$style.settingsAdminRecoveryKeyChange),onSubmit:q(_,["prevent"])},[m(e(U),{label:e(o)("encryption","Change recovery key password")},{default:c(()=>[m(e(V),{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=y=>n.value=y),required:"",name:"oldPassword",label:e(o)("encryption","Old recovery key password")},null,8,["modelValue","label"]),m(e(V),{modelValue:r.value,"onUpdate:modelValue":u[1]||(u[1]=y=>r.value=y),required:"",name:"password",label:e(o)("encryption","New recovery key password")},null,8,["modelValue","label"]),m(e(V),{modelValue:l.value,"onUpdate:modelValue":u[2]||(u[2]=y=>l.value=y),required:"",name:"confirmPassword",error:!v.value&&!!l.value,helperText:v.value||!l.value?"":e(o)("encryption","Passwords fields do not match"),label:e(o)("encryption","Repeat new recovery key password")},null,8,["modelValue","error","helperText","label"]),m(e(N),{type:"submit",variant:"primary"},{default:c(()=>[g(w(e(o)("encryption","Change recovery key password")),1)]),_:1}),t.value?(p(),f(e(E),{key:0,type:"error"},{default:c(()=>[g(w(e(o)("encryption","An error occurred while changing the recovery key password. Please try again.")),1)]),_:1})):h("",!0)]),_:1},8,["label"])],34))}}),W="_settingsAdminRecoveryKeyChange_12rwr_2",X={settingsAdminRecoveryKeyChange:W},Y={$style:X},Z=I(Q,[["__cssModules",Y]]),ee=k({__name:"SettingsAdmin",setup(b){const a=M("encryption","adminSettings"),s=i(a.encryptHomeStorage),t=i(a.recoveryEnabled);return(n,r)=>(p(),f(e($),{name:e(o)("encryption","Default encryption module")},{default:c(()=>[e(a).initStatus===e(G).NotInitialized&&!e(a).masterKeyEnabled?(p(),f(e(E),{key:0,type:"warning"},{default:c(()=>[g(w(e(o)("encryption","Encryption app is enabled but your keys are not initialized, please log-out and log-in again")),1)]),_:1})):(p(),P(H,{key:1},[m(J,{modelValue:s.value,"onUpdate:modelValue":r[0]||(r[0]=l=>s.value=l)},null,8,["modelValue"]),r[2]||(r[2]=D("br",null,null,-1)),e(a).masterKeyEnabled?h("",!0):(p(),f(L,{key:0,modelValue:t.value,"onUpdate:modelValue":r[1]||(r[1]=l=>t.value=l)},null,8,["modelValue"])),!e(a).masterKeyEnabled&&t.value?(p(),f(Z,{key:1})):h("",!0)],64))]),_:1},8,["name"]))}}),ae=F(ee);ae.mount("#encryption-settings-section"); +import{b as k,q as x,v as T,o as p,c as f,u as e,w as c,g,t as w,r as i,s as A,j as P,e as m,m as h,C as q,p as K,n as j,F as H,k as D,h as F}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{a as I,l as M}from"./index-C3KLQ_oe.chunk.mjs";import{t as o}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./index-COiwHfFG.chunk.mjs";import"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{w as z}from"./index-CO7ZwNPX.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./NcRichText-BO_4KtBA-DXDa2H1Y.chunk.mjs";import{N}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import{b as S}from"./index-DgEyzq8A.chunk.mjs";import{N as B}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";import"./Plus-gXjhFOHV.chunk.mjs";/* empty css */import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import{N as E}from"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import{N as V}from"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import{c as R}from"./index-9ZBo3L67.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import"./index-CuPuSdF1.chunk.mjs";import{N as $}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import{d as O}from"./index-WQvok30H.chunk.mjs";import{N as U,l as C,I as G}from"./types-Bf2CusGK.chunk.mjs";import"./index-sH3U_332.chunk.mjs";const J=k({__name:"SettingsAdminHomeStorage",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(b){const a=x(b,"modelValue"),s=i(!1);return T(a,()=>{s.value=!0}),z(a,async(t,n)=>{if(t===n){s.value=!1;return}try{await R.post(S("/apps/encryption/ajax/setEncryptHomeStorage"),{encryptHomeStorage:t})}finally{s.value=!1}},{debounce:800}),(t,n)=>(p(),f(e(B),{modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=r=>a.value=r),loading:s.value,description:e(o)("encryption","Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted"),type:"switch"},{default:c(()=>[g(w(e(o)("encryption","Encrypt the home storage")),1)]),_:1},8,["modelValue","loading","description"]))}}),L=k({__name:"SettingsAdminRecoveryKey",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(b){const a=x(b,"modelValue"),s=A("form"),t=i(!1),n=i(!1),r=i(""),l=i(""),v=K(()=>r.value===l.value);async function _(){if(!t.value&&v.value){n.value=!1,t.value=!0;try{const{data:d}=await R.post(S("/apps/encryption/ajax/adminRecovery"),{adminEnableRecovery:!a.value,recoveryPassword:r.value,confirmPassword:l.value});a.value=!a.value,r.value=l.value="",s.value?.reset(),d.data.message&&O(d.data.message)}catch(d){n.value=!0,C.error("Failed to update recovery key settings",{error:d})}finally{t.value=!1}}}return(d,u)=>(p(),P("form",{ref:"form",onSubmit:q(_,["prevent"])},[m(e(U),{label:a.value?e(o)("encryption","Disable recovery key"):e(o)("encryption","Enable recovery key"),description:e(o)("encryption","The recovery key is an additional encryption key used to encrypt files. It is used to recover files from an account if the password is forgotten.")},{default:c(()=>[m(e(V),{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=y=>r.value=y),required:"",name:"password",label:e(o)("encryption","Recovery key password")},null,8,["modelValue","label"]),m(e(V),{modelValue:l.value,"onUpdate:modelValue":u[1]||(u[1]=y=>l.value=y),required:"",name:"confirmPassword",error:!!l.value&&!v.value,helperText:v.value||!l.value?"":e(o)("encryption","Passwords fields do not match"),label:e(o)("encryption","Repeat recovery key password")},null,8,["modelValue","error","helperText","label"]),m(e(N),{type:"submit",variant:a.value?"error":"primary"},{default:c(()=>[g(w(a.value?e(o)("encryption","Disable recovery key"):e(o)("encryption","Enable recovery key")),1)]),_:1},8,["variant"]),n.value?(p(),f(e(E),{key:0,type:"error"},{default:c(()=>[g(w(e(o)("encryption","An error occurred while updating the recovery key settings. Please try again.")),1)]),_:1})):h("",!0)]),_:1},8,["label","description"])],544))}}),Q=k({__name:"SettingsAdminRecoveryKeyChange",setup(b){const a=A("form"),s=i(!1),t=i(!1),n=i(""),r=i(""),l=i(""),v=K(()=>r.value===l.value);async function _(){if(!s.value&&v.value){t.value=!1,s.value=!0;try{await R.post(S("/apps/encryption/ajax/changeRecoveryPassword"),{oldPassword:n.value,newPassword:r.value,confirmPassword:l.value}),n.value=r.value=l.value="",a.value?.reset()}catch(d){t.value=!0,C.error("Failed to update recovery key settings",{error:d})}finally{s.value=!1}}}return(d,u)=>(p(),P("form",{ref:"form",class:j(d.$style.settingsAdminRecoveryKeyChange),onSubmit:q(_,["prevent"])},[m(e(U),{label:e(o)("encryption","Change recovery key password")},{default:c(()=>[m(e(V),{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=y=>n.value=y),required:"",name:"oldPassword",label:e(o)("encryption","Old recovery key password")},null,8,["modelValue","label"]),m(e(V),{modelValue:r.value,"onUpdate:modelValue":u[1]||(u[1]=y=>r.value=y),required:"",name:"password",label:e(o)("encryption","New recovery key password")},null,8,["modelValue","label"]),m(e(V),{modelValue:l.value,"onUpdate:modelValue":u[2]||(u[2]=y=>l.value=y),required:"",name:"confirmPassword",error:!v.value&&!!l.value,helperText:v.value||!l.value?"":e(o)("encryption","Passwords fields do not match"),label:e(o)("encryption","Repeat new recovery key password")},null,8,["modelValue","error","helperText","label"]),m(e(N),{type:"submit",variant:"primary"},{default:c(()=>[g(w(e(o)("encryption","Change recovery key password")),1)]),_:1}),t.value?(p(),f(e(E),{key:0,type:"error"},{default:c(()=>[g(w(e(o)("encryption","An error occurred while changing the recovery key password. Please try again.")),1)]),_:1})):h("",!0)]),_:1},8,["label"])],34))}}),W="_settingsAdminRecoveryKeyChange_12rwr_2",X={settingsAdminRecoveryKeyChange:W},Y={$style:X},Z=I(Q,[["__cssModules",Y]]),ee=k({__name:"SettingsAdmin",setup(b){const a=M("encryption","adminSettings"),s=i(a.encryptHomeStorage),t=i(a.recoveryEnabled);return(n,r)=>(p(),f(e($),{name:e(o)("encryption","Default encryption module")},{default:c(()=>[e(a).initStatus===e(G).NotInitialized&&!e(a).masterKeyEnabled?(p(),f(e(E),{key:0,type:"warning"},{default:c(()=>[g(w(e(o)("encryption","Encryption app is enabled but your keys are not initialized, please log-out and log-in again")),1)]),_:1})):(p(),P(H,{key:1},[m(J,{modelValue:s.value,"onUpdate:modelValue":r[0]||(r[0]=l=>s.value=l)},null,8,["modelValue"]),r[2]||(r[2]=D("br",null,null,-1)),e(a).masterKeyEnabled?h("",!0):(p(),f(L,{key:0,modelValue:t.value,"onUpdate:modelValue":r[1]||(r[1]=l=>t.value=l)},null,8,["modelValue"])),!e(a).masterKeyEnabled&&t.value?(p(),f(Z,{key:1})):h("",!0)],64))]),_:1},8,["name"]))}}),ae=F(ee);ae.mount("#encryption-settings-section"); //# sourceMappingURL=encryption-settings_admin.mjs.map diff --git a/dist/encryption-settings_personal.mjs b/dist/encryption-settings_personal.mjs index a0ac920f030a9..3fc6a3dc35ade 100644 --- a/dist/encryption-settings_personal.mjs +++ b/dist/encryption-settings_personal.mjs @@ -1,2 +1,2 @@ -import{b,s as F,o as l,j as N,e as v,w as m,c as u,u as e,g as f,t as g,m as k,C as x,r as p,q as j,v as I,h as z}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{c as w,i as U}from"./index-9ZBo3L67.chunk.mjs";import{a as S,c as B,b as K}from"./index-DCJOwzzz.chunk.mjs";import{l as R}from"./index-C3KLQ_oe.chunk.mjs";import{t}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{b as E}from"./index-DgEyzq8A.chunk.mjs";import{N as V}from"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import{N as q}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./index-COiwHfFG.chunk.mjs";import"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{w as C}from"./index-CO7ZwNPX.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./NcRichText-BO_4KtBA-DXDa2H1Y.chunk.mjs";import{N as T}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import{N as M}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";import"./Plus-gXjhFOHV.chunk.mjs";import{N as O,I as _,l as Y}from"./types-Bf2CusGK.chunk.mjs";/* empty css */import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import{N as h}from"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import"./index-CuPuSdF1.chunk.mjs";import"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import"./index-sH3U_332.chunk.mjs";const A=b({__name:"SettingsPersonalChangePrivateKey",props:{recoveryEnabledForUser:{type:Boolean}},emits:["updated"],setup(c,{emit:a}){const s=a,i=F("form"),r=p(!1),o=p(!1),n=p(""),y=p("");async function P(){if(!r.value){r.value=!0,o.value=!1;try{await w.post(E("/apps/encryption/ajax/updatePrivateKeyPassword"),{oldPassword:n.value,newPassword:y.value}),n.value=y.value="",i.value?.reset(),s("updated")}catch(d){U(d)&&d.response&&d.response.data?.data?.message&&S(d.response.data.data.message),o.value=!0}finally{r.value=!1}}}return(d,J)=>(l(),N("form",{ref:"form",onSubmit:x(P,["prevent"])},[v(e(O),{label:e(t)("encryption","Update private key password"),description:e(t)("encryption","Your private key password no longer matches your log-in password. Set your old private key password to your current log-in password.")},{default:m(()=>[c.recoveryEnabledForUser?(l(),u(e(V),{key:0},{default:m(()=>[f(g(e(t)("encryption","If you do not remember your old password you can ask your administrator to recover your files.")),1)]),_:1})):k("",!0),v(e(h),{label:e(t)("encryption","Old log-in password")},null,8,["label"]),v(e(h),{label:e(t)("encryption","Current log-in password")},null,8,["label"]),v(e(T),{type:"submit",variant:"primary"},{default:m(()=>[f(g(e(t)("encryption","Update")),1)]),_:1})]),_:1},8,["label","description"])],544))}}),D=b({__name:"SettingsPersonalEnableRecovery",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(c){const a=j(c,"modelValue"),s=p(!1);return I(a,()=>{s.value=!0}),C([a],async([i],[r])=>{if(i===r){s.value=!1;return}const o=B(t("encryption","Updating recovery keys. This can take some time…"));try{await w.post(E("/apps/encryption/ajax/userSetRecovery"),{userEnableRecovery:a.value})}catch(n){a.value=r,U(n)&&n.response&&n.response.data?.data?.message&&S(n.response.data.data.message)}finally{o.hideToast(),s.value=!1}},{debounce:800}),(i,r)=>(l(),u(e(M),{modelValue:a.value,"onUpdate:modelValue":r[0]||(r[0]=o=>a.value=o),type:"switch",loading:s.value,description:e(t)("encryption","Enabling this option will allow you to reobtain access to your encrypted files in case of password loss")},{default:m(()=>[f(g(e(t)("encryption","Enable password recovery")),1)]),_:1},8,["modelValue","loading","description"]))}}),G=b({__name:"SettingsPersonal",setup(c){const a=R("encryption","personalSettings"),s=p(a.initialized),i=p(a.recoveryEnabledForUser);async function r(){try{const{data:o}=await w.get(E("/apps/encryption/ajax/getStatus"));s.value=o.initStatus,o.data.message&&K(o.data.message)}catch(o){Y.error("Failed to fetch current encryption status",{error:o})}}return(o,n)=>(l(),u(e(q),{name:e(t)("encryption","Basic encryption module")},{default:m(()=>[s.value===e(_).NotInitialized?(l(),u(e(V),{key:0,type:"warning"},{default:m(()=>[f(g(e(t)("encryption","Encryption app is enabled but your keys are not initialized, please log-out and log-in again")),1)]),_:1})):s.value===e(_).InitExecuted?(l(),u(A,{key:1,recoveryEnabledForUser:i.value,onUpdated:r},null,8,["recoveryEnabledForUser"])):e(a).recoveryEnabled&&e(a).privateKeySet?(l(),u(D,{key:2,modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=y=>i.value=y)},null,8,["modelValue"])):k("",!0)]),_:1},8,["name"]))}}),H=z(G);H.mount("#encryption-settings-section"); +import{b,s as F,o as l,j as N,e as v,w as m,c as u,u as e,g as f,t as g,m as k,C as x,r as p,q as j,v as I,h as z}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{c as w,i as U}from"./index-9ZBo3L67.chunk.mjs";import{a as S,c as B,b as K}from"./index-WQvok30H.chunk.mjs";import{l as R}from"./index-C3KLQ_oe.chunk.mjs";import{t}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{b as E}from"./index-DgEyzq8A.chunk.mjs";import{N as V}from"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import{N as q}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./index-COiwHfFG.chunk.mjs";import"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{w as C}from"./index-CO7ZwNPX.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./NcRichText-BO_4KtBA-DXDa2H1Y.chunk.mjs";import{N as T}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import{N as M}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";import"./Plus-gXjhFOHV.chunk.mjs";import{N as O,I as _,l as Y}from"./types-Bf2CusGK.chunk.mjs";/* empty css */import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import{N as h}from"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import"./index-CuPuSdF1.chunk.mjs";import"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import"./index-sH3U_332.chunk.mjs";const A=b({__name:"SettingsPersonalChangePrivateKey",props:{recoveryEnabledForUser:{type:Boolean}},emits:["updated"],setup(c,{emit:a}){const s=a,i=F("form"),r=p(!1),o=p(!1),n=p(""),y=p("");async function P(){if(!r.value){r.value=!0,o.value=!1;try{await w.post(E("/apps/encryption/ajax/updatePrivateKeyPassword"),{oldPassword:n.value,newPassword:y.value}),n.value=y.value="",i.value?.reset(),s("updated")}catch(d){U(d)&&d.response&&d.response.data?.data?.message&&S(d.response.data.data.message),o.value=!0}finally{r.value=!1}}}return(d,J)=>(l(),N("form",{ref:"form",onSubmit:x(P,["prevent"])},[v(e(O),{label:e(t)("encryption","Update private key password"),description:e(t)("encryption","Your private key password no longer matches your log-in password. Set your old private key password to your current log-in password.")},{default:m(()=>[c.recoveryEnabledForUser?(l(),u(e(V),{key:0},{default:m(()=>[f(g(e(t)("encryption","If you do not remember your old password you can ask your administrator to recover your files.")),1)]),_:1})):k("",!0),v(e(h),{label:e(t)("encryption","Old log-in password")},null,8,["label"]),v(e(h),{label:e(t)("encryption","Current log-in password")},null,8,["label"]),v(e(T),{type:"submit",variant:"primary"},{default:m(()=>[f(g(e(t)("encryption","Update")),1)]),_:1})]),_:1},8,["label","description"])],544))}}),D=b({__name:"SettingsPersonalEnableRecovery",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(c){const a=j(c,"modelValue"),s=p(!1);return I(a,()=>{s.value=!0}),C([a],async([i],[r])=>{if(i===r){s.value=!1;return}const o=B(t("encryption","Updating recovery keys. This can take some time…"));try{await w.post(E("/apps/encryption/ajax/userSetRecovery"),{userEnableRecovery:a.value})}catch(n){a.value=r,U(n)&&n.response&&n.response.data?.data?.message&&S(n.response.data.data.message)}finally{o.hideToast(),s.value=!1}},{debounce:800}),(i,r)=>(l(),u(e(M),{modelValue:a.value,"onUpdate:modelValue":r[0]||(r[0]=o=>a.value=o),type:"switch",loading:s.value,description:e(t)("encryption","Enabling this option will allow you to reobtain access to your encrypted files in case of password loss")},{default:m(()=>[f(g(e(t)("encryption","Enable password recovery")),1)]),_:1},8,["modelValue","loading","description"]))}}),G=b({__name:"SettingsPersonal",setup(c){const a=R("encryption","personalSettings"),s=p(a.initialized),i=p(a.recoveryEnabledForUser);async function r(){try{const{data:o}=await w.get(E("/apps/encryption/ajax/getStatus"));s.value=o.initStatus,o.data.message&&K(o.data.message)}catch(o){Y.error("Failed to fetch current encryption status",{error:o})}}return(o,n)=>(l(),u(e(q),{name:e(t)("encryption","Basic encryption module")},{default:m(()=>[s.value===e(_).NotInitialized?(l(),u(e(V),{key:0,type:"warning"},{default:m(()=>[f(g(e(t)("encryption","Encryption app is enabled but your keys are not initialized, please log-out and log-in again")),1)]),_:1})):s.value===e(_).InitExecuted?(l(),u(A,{key:1,recoveryEnabledForUser:i.value,onUpdated:r},null,8,["recoveryEnabledForUser"])):e(a).recoveryEnabled&&e(a).privateKeySet?(l(),u(D,{key:2,modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=y=>i.value=y)},null,8,["modelValue"])):k("",!0)]),_:1},8,["name"]))}}),H=z(G);H.mount("#encryption-settings-section"); //# sourceMappingURL=encryption-settings_personal.mjs.map diff --git a/dist/federatedfilesharing-init-files.mjs b/dist/federatedfilesharing-init-files.mjs index 137efc19383c0..7029692120883 100644 --- a/dist/federatedfilesharing-init-files.mjs +++ b/dist/federatedfilesharing-init-files.mjs @@ -1,2 +1,2 @@ -import{c as d,i as _}from"./index-9ZBo3L67.chunk.mjs";import{b as y,a as u}from"./index-DCJOwzzz.chunk.mjs";import{s as b,b as m}from"./index-DgEyzq8A.chunk.mjs";import{a as R,l as v}from"./index-C3KLQ_oe.chunk.mjs";import{t}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{N as D,s as S}from"./index-CO7ZwNPX.chunk.mjs";import{N as O}from"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import{b as k,o as f,c as h,w as F,k as C,t as P,u as i,n as q,m as x,r as N,p as E}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{l as M}from"./logger-CDeK8C8o.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";const T=k({__name:"RemoteShareDialog",props:{name:{},owner:{},remote:{},passwordRequired:{type:Boolean}},emits:["close"],setup(e,{emit:r}){const s=e,a=r,o=N(""),n=E(()=>[{label:t("federatedfilesharing","Cancel"),callback:()=>a("close",!1)},{label:t("federatedfilesharing","Add remote share"),type:s.passwordRequired?"submit":void 0,variant:"primary",callback:()=>a("close",!0,o.value)}]);return(p,l)=>(f(),h(i(D),{buttons:n.value,isForm:e.passwordRequired,name:i(t)("federatedfilesharing","Remote share"),onSubmit:l[1]||(l[1]=w=>a("close",!0,o.value))},{default:F(()=>[C("p",null,P(i(t)("federatedfilesharing","Do you want to add the remote share {name} from {owner}@{remote}?",{name:e.name,owner:e.owner,remote:e.remote})),1),e.passwordRequired?(f(),h(i(O),{key:0,modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=w=>o.value=w),class:q(p.$style.remoteShareDialog__password),label:i(t)("federatedfilesharing","Remote share password")},null,8,["modelValue","class","label"])):x("",!0)]),_:1},8,["buttons","isForm","name"]))}}),U="_remoteShareDialog__password_1ccpy_2",V={remoteShareDialog__password:U},$={$style:V},j=R(T,[["__cssModules",$]]);async function I(e,r,s,a=!1){const[o,n]=await S(j,{name:e,owner:r,remote:s,passwordRequired:a});if(a&&o)return n;if(!o)throw new Error("Dialog was cancelled")}window.addEventListener("DOMContentLoaded",()=>{L(),v("federatedfilesharing","notificationsEnabled",!0)!==!0&&A(),b("notifications:action:executed",({action:e,notification:r})=>{r.app==="files_sharing"&&r.object_type==="remote_share"&&e.type==="POST"&&c()})});function c(){if(!window?.OCP?.Files?.Router?.goToRoute){window.location.reload();return}window.OCP.Files.Router.goToRoute(null,{...window.OCP.Files.Router.params,fileid:void 0},{...window.OCP.Files.Router.query,dir:"/",openfile:void 0})}function L(){const e=window.OC.Util.History.parseUrlQuery();if(e.remote&&e.token&&e.name){const r=(s,a)=>{s!==!1&&d.post(m("apps/federatedfilesharing/askForFederatedShare"),{remote:a.remote,token:a.token,owner:a.owner,ownerDisplayName:a.ownerDisplayName||a.owner,name:a.name,password:a.password||""}).then(({data:o})=>{Object.hasOwn(o,"legacyMount")?c():y(o.message)}).catch(o=>{M.error("Error while processing incoming share",{error:o}),_(o)&&o.response.data.message?u(o.response.data.message):u(t("federatedfilesharing","Incoming share could not be processed"))})};location.hash="",e.passwordProtected=parseInt(e.protected,10)===1,g(e,e.passwordProtected,r)}}async function A(){const{data:e}=await d.get(m("/apps/files_sharing/api/externalShares"));for(let r=0;rc())})}function g(e,r,s){const a=e.ownerDisplayName||e.owner,o=e.name,n=e.remote.replace(/^https?:\/\//,"").replace(/\/$/,"");I(o,a,n,r).then(p=>s(!0,{...e,password:p})).catch(()=>s(!1,e))} +import{c as d,i as _}from"./index-9ZBo3L67.chunk.mjs";import{b as y,a as u}from"./index-WQvok30H.chunk.mjs";import{s as b,b as m}from"./index-DgEyzq8A.chunk.mjs";import{a as R,l as v}from"./index-C3KLQ_oe.chunk.mjs";import{t}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{N as D,s as S}from"./index-CO7ZwNPX.chunk.mjs";import{N as O}from"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import{b as k,o as f,c as h,w as F,k as C,t as P,u as i,n as q,m as x,r as N,p as E}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{l as M}from"./logger-CDeK8C8o.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";const T=k({__name:"RemoteShareDialog",props:{name:{},owner:{},remote:{},passwordRequired:{type:Boolean}},emits:["close"],setup(e,{emit:r}){const s=e,a=r,o=N(""),n=E(()=>[{label:t("federatedfilesharing","Cancel"),callback:()=>a("close",!1)},{label:t("federatedfilesharing","Add remote share"),type:s.passwordRequired?"submit":void 0,variant:"primary",callback:()=>a("close",!0,o.value)}]);return(p,l)=>(f(),h(i(D),{buttons:n.value,isForm:e.passwordRequired,name:i(t)("federatedfilesharing","Remote share"),onSubmit:l[1]||(l[1]=w=>a("close",!0,o.value))},{default:F(()=>[C("p",null,P(i(t)("federatedfilesharing","Do you want to add the remote share {name} from {owner}@{remote}?",{name:e.name,owner:e.owner,remote:e.remote})),1),e.passwordRequired?(f(),h(i(O),{key:0,modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=w=>o.value=w),class:q(p.$style.remoteShareDialog__password),label:i(t)("federatedfilesharing","Remote share password")},null,8,["modelValue","class","label"])):x("",!0)]),_:1},8,["buttons","isForm","name"]))}}),U="_remoteShareDialog__password_1ccpy_2",V={remoteShareDialog__password:U},$={$style:V},j=R(T,[["__cssModules",$]]);async function I(e,r,s,a=!1){const[o,n]=await S(j,{name:e,owner:r,remote:s,passwordRequired:a});if(a&&o)return n;if(!o)throw new Error("Dialog was cancelled")}window.addEventListener("DOMContentLoaded",()=>{L(),v("federatedfilesharing","notificationsEnabled",!0)!==!0&&A(),b("notifications:action:executed",({action:e,notification:r})=>{r.app==="files_sharing"&&r.object_type==="remote_share"&&e.type==="POST"&&c()})});function c(){if(!window?.OCP?.Files?.Router?.goToRoute){window.location.reload();return}window.OCP.Files.Router.goToRoute(null,{...window.OCP.Files.Router.params,fileid:void 0},{...window.OCP.Files.Router.query,dir:"/",openfile:void 0})}function L(){const e=window.OC.Util.History.parseUrlQuery();if(e.remote&&e.token&&e.name){const r=(s,a)=>{s!==!1&&d.post(m("apps/federatedfilesharing/askForFederatedShare"),{remote:a.remote,token:a.token,owner:a.owner,ownerDisplayName:a.ownerDisplayName||a.owner,name:a.name,password:a.password||""}).then(({data:o})=>{Object.hasOwn(o,"legacyMount")?c():y(o.message)}).catch(o=>{M.error("Error while processing incoming share",{error:o}),_(o)&&o.response.data.message?u(o.response.data.message):u(t("federatedfilesharing","Incoming share could not be processed"))})};location.hash="",e.passwordProtected=parseInt(e.protected,10)===1,g(e,e.passwordProtected,r)}}async function A(){const{data:e}=await d.get(m("/apps/files_sharing/api/externalShares"));for(let r=0;rc())})}function g(e,r,s){const a=e.ownerDisplayName||e.owner,o=e.name,n=e.remote.replace(/^https?:\/\//,"").replace(/\/$/,"");I(o,a,n,r).then(p=>s(!0,{...e,password:p})).catch(()=>s(!1,e))} //# sourceMappingURL=federatedfilesharing-init-files.mjs.map diff --git a/dist/federatedfilesharing-settings-admin.mjs b/dist/federatedfilesharing-settings-admin.mjs index aba7f45470a26..981b3f0704d5a 100644 --- a/dist/federatedfilesharing-settings-admin.mjs +++ b/dist/federatedfilesharing-settings-admin.mjs @@ -1,2 +1,2 @@ -import{l as s,a as A}from"./index-C3KLQ_oe.chunk.mjs";import{b as U,o as g,c,w as i,e as f,u as a,g as p,t as l,m,k as h,G,h as T}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{c as x}from"./index-9ZBo3L67.chunk.mjs";import{a as v,e as b}from"./index-DCJOwzzz.chunk.mjs";import{t as e}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{c as C}from"./index-CaHqqZcX.chunk.mjs";import{c as D}from"./index-DgEyzq8A.chunk.mjs";import{N as u}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import{N as I}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import{l as S}from"./logger-CDeK8C8o.chunk.mjs";import"./modulepreload-polyfill-BxzAKjcf.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-CO7ZwNPX.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";const j={class:"settings-subsection"},q={class:"settings-subsection__name"},F=U({__name:"AdminSettings",setup(R){const E=s("federatedfilesharing","sharingFederatedDocUrl"),y=new Proxy({outgoingServer2serverShareEnabled:[s("federatedfilesharing","outgoingServer2serverShareEnabled"),"outgoing_server2server_share_enabled"],incomingServer2serverShareEnabled:[s("federatedfilesharing","incomingServer2serverShareEnabled"),"incoming_server2server_share_enabled"],outgoingServer2serverGroupShareEnabled:[s("federatedfilesharing","outgoingServer2serverGroupShareEnabled"),"outgoing_server2server_group_share_enabled"],incomingServer2serverGroupShareEnabled:[s("federatedfilesharing","incomingServer2serverGroupShareEnabled"),"incoming_server2server_group_share_enabled"],federatedGroupSharingSupported:[s("federatedfilesharing","federatedGroupSharingSupported"),"federated_group_sharing_supported"],federatedTrustedShareAutoAccept:[s("federatedfilesharing","federatedTrustedShareAutoAccept"),"federatedTrustedShareAutoAccept"],lookupServerEnabled:[s("federatedfilesharing","lookupServerEnabled"),"lookupServerEnabled"],lookupServerUploadEnabled:[s("federatedfilesharing","lookupServerUploadEnabled"),"lookupServerUploadEnabled"]},{get(d,o){return d[o]?.[0]},set(d,o,t){return o in d?(d[o][0]=t,k(d[o][1],t),!0):!1}}),r=G(y);async function _(d){if(d===!1)return r.lookupServerUploadEnabled=!1;await b({name:e("federatedfilesharing","Confirm data upload to lookup server"),text:e("federatedfilesharing",'When enabled, all account properties (e.g. email address) with scope visibility set to "published", will be automatically synced and transmitted to an external system and made available in a public, global address book.'),labelConfirm:e("federatedfilesharing","Enable data upload"),labelReject:e("federatedfilesharing","Disable upload"),severity:"warning"}).then(()=>{r.lookupServerUploadEnabled=!0}).catch(()=>{r.lookupServerUploadEnabled=!1})}async function w(d){if(d===!1)return r.lookupServerEnabled=!1;await b({name:e("federatedfilesharing","Confirm querying lookup server"),text:e("federatedfilesharing","When enabled, the search input when creating shares will be sent to an external system that provides a public and global address book.")+e("federatedfilesharing","This is used to retrieve the federated cloud ID to make federated sharing easier.")+e("federatedfilesharing","Moreover, email addresses of users might be sent to that system in order to verify them."),labelConfirm:e("federatedfilesharing","Enable querying"),labelReject:e("federatedfilesharing","Disable querying"),severity:"warning"}).then(()=>{r.lookupServerEnabled=!0}).catch(()=>{r.lookupServerEnabled=!1})}async function k(d,o){await C();const t=D("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"files_sharing",key:d}),V=o?"yes":"no";try{const{data:n}=await x.post(t,{value:V});if(n.ocs.meta.status!=="ok")if(n.ocs.meta.message)v(n.ocs.meta.message),S.error("Error updating federated files sharing config",{error:n.ocs});else throw new Error(`Failed to update federatedfilesharing config, ${n.ocs.meta.statuscode}`)}catch(n){S.error("Error updating federated files sharing config",{error:n}),v(e("federatedfilesharing","Unable to update federated files sharing config"))}}return(d,o)=>(g(),c(a(I),{name:a(e)("federatedfilesharing","Federated Cloud Sharing"),description:a(e)("federatedfilesharing","Adjust how people can share between servers. This includes shares between people on this server as well if they are using federated sharing."),docUrl:a(E)},{default:i(()=>[f(a(u),{modelValue:r.outgoingServer2serverShareEnabled,"onUpdate:modelValue":o[0]||(o[0]=t=>r.outgoingServer2serverShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to send shares to other servers (this option also allows WebDAV access to public shares)")),1)]),_:1},8,["modelValue"]),f(a(u),{modelValue:r.incomingServer2serverShareEnabled,"onUpdate:modelValue":o[1]||(o[1]=t=>r.incomingServer2serverShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to receive shares from other servers")),1)]),_:1},8,["modelValue"]),r.federatedGroupSharingSupported?(g(),c(a(u),{key:0,modelValue:r.outgoingServer2serverGroupShareEnabled,"onUpdate:modelValue":o[2]||(o[2]=t=>r.outgoingServer2serverGroupShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to send shares to groups on other servers")),1)]),_:1},8,["modelValue"])):m("",!0),r.federatedGroupSharingSupported?(g(),c(a(u),{key:1,modelValue:r.incomingServer2serverGroupShareEnabled,"onUpdate:modelValue":o[3]||(o[3]=t=>r.incomingServer2serverGroupShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to receive group shares from other servers")),1)]),_:1},8,["modelValue"])):m("",!0),h("fieldset",null,[h("legend",null,l(a(e)("federatedfilesharing","The lookup server is only available for global scale.")),1),f(a(u),{type:"switch",modelValue:r.lookupServerEnabled,disabled:"","onUpdate:modelValue":w},{default:i(()=>[p(l(a(e)("federatedfilesharing","Search global and public address book for people")),1)]),_:1},8,["modelValue"]),f(a(u),{type:"switch",modelValue:r.lookupServerUploadEnabled,disabled:"","onUpdate:modelValue":_},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people to publish their data to a global and public address book")),1)]),_:1},8,["modelValue"])]),h("div",j,[h("h3",q,l(a(e)("federatedfilesharing","Trusted federation")),1),f(a(u),{modelValue:r.federatedTrustedShareAutoAccept,"onUpdate:modelValue":o[4]||(o[4]=t=>r.federatedTrustedShareAutoAccept=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Automatically accept shares from trusted federated accounts and groups by default")),1)]),_:1},8,["modelValue"])])]),_:1},8,["name","description","docUrl"]))}}),W=A(F,[["__scopeId","data-v-71370f43"]]),N=s("federatedfilesharing","internalOnly",!1);N||T(W).mount("#vue-admin-federated"); +import{l as s,a as A}from"./index-C3KLQ_oe.chunk.mjs";import{b as U,o as g,c,w as i,e as f,u as a,g as p,t as l,m,k as h,G,h as T}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{c as x}from"./index-9ZBo3L67.chunk.mjs";import{a as v,e as b}from"./index-WQvok30H.chunk.mjs";import{t as e}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{c as C}from"./index-CaHqqZcX.chunk.mjs";import{c as D}from"./index-DgEyzq8A.chunk.mjs";import{N as u}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import{N as I}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import{l as S}from"./logger-CDeK8C8o.chunk.mjs";import"./modulepreload-polyfill-BxzAKjcf.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-CO7ZwNPX.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";const j={class:"settings-subsection"},q={class:"settings-subsection__name"},F=U({__name:"AdminSettings",setup(R){const E=s("federatedfilesharing","sharingFederatedDocUrl"),y=new Proxy({outgoingServer2serverShareEnabled:[s("federatedfilesharing","outgoingServer2serverShareEnabled"),"outgoing_server2server_share_enabled"],incomingServer2serverShareEnabled:[s("federatedfilesharing","incomingServer2serverShareEnabled"),"incoming_server2server_share_enabled"],outgoingServer2serverGroupShareEnabled:[s("federatedfilesharing","outgoingServer2serverGroupShareEnabled"),"outgoing_server2server_group_share_enabled"],incomingServer2serverGroupShareEnabled:[s("federatedfilesharing","incomingServer2serverGroupShareEnabled"),"incoming_server2server_group_share_enabled"],federatedGroupSharingSupported:[s("federatedfilesharing","federatedGroupSharingSupported"),"federated_group_sharing_supported"],federatedTrustedShareAutoAccept:[s("federatedfilesharing","federatedTrustedShareAutoAccept"),"federatedTrustedShareAutoAccept"],lookupServerEnabled:[s("federatedfilesharing","lookupServerEnabled"),"lookupServerEnabled"],lookupServerUploadEnabled:[s("federatedfilesharing","lookupServerUploadEnabled"),"lookupServerUploadEnabled"]},{get(d,o){return d[o]?.[0]},set(d,o,t){return o in d?(d[o][0]=t,k(d[o][1],t),!0):!1}}),r=G(y);async function _(d){if(d===!1)return r.lookupServerUploadEnabled=!1;await b({name:e("federatedfilesharing","Confirm data upload to lookup server"),text:e("federatedfilesharing",'When enabled, all account properties (e.g. email address) with scope visibility set to "published", will be automatically synced and transmitted to an external system and made available in a public, global address book.'),labelConfirm:e("federatedfilesharing","Enable data upload"),labelReject:e("federatedfilesharing","Disable upload"),severity:"warning"}).then(()=>{r.lookupServerUploadEnabled=!0}).catch(()=>{r.lookupServerUploadEnabled=!1})}async function w(d){if(d===!1)return r.lookupServerEnabled=!1;await b({name:e("federatedfilesharing","Confirm querying lookup server"),text:e("federatedfilesharing","When enabled, the search input when creating shares will be sent to an external system that provides a public and global address book.")+e("federatedfilesharing","This is used to retrieve the federated cloud ID to make federated sharing easier.")+e("federatedfilesharing","Moreover, email addresses of users might be sent to that system in order to verify them."),labelConfirm:e("federatedfilesharing","Enable querying"),labelReject:e("federatedfilesharing","Disable querying"),severity:"warning"}).then(()=>{r.lookupServerEnabled=!0}).catch(()=>{r.lookupServerEnabled=!1})}async function k(d,o){await C();const t=D("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"files_sharing",key:d}),V=o?"yes":"no";try{const{data:n}=await x.post(t,{value:V});if(n.ocs.meta.status!=="ok")if(n.ocs.meta.message)v(n.ocs.meta.message),S.error("Error updating federated files sharing config",{error:n.ocs});else throw new Error(`Failed to update federatedfilesharing config, ${n.ocs.meta.statuscode}`)}catch(n){S.error("Error updating federated files sharing config",{error:n}),v(e("federatedfilesharing","Unable to update federated files sharing config"))}}return(d,o)=>(g(),c(a(I),{name:a(e)("federatedfilesharing","Federated Cloud Sharing"),description:a(e)("federatedfilesharing","Adjust how people can share between servers. This includes shares between people on this server as well if they are using federated sharing."),docUrl:a(E)},{default:i(()=>[f(a(u),{modelValue:r.outgoingServer2serverShareEnabled,"onUpdate:modelValue":o[0]||(o[0]=t=>r.outgoingServer2serverShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to send shares to other servers (this option also allows WebDAV access to public shares)")),1)]),_:1},8,["modelValue"]),f(a(u),{modelValue:r.incomingServer2serverShareEnabled,"onUpdate:modelValue":o[1]||(o[1]=t=>r.incomingServer2serverShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to receive shares from other servers")),1)]),_:1},8,["modelValue"]),r.federatedGroupSharingSupported?(g(),c(a(u),{key:0,modelValue:r.outgoingServer2serverGroupShareEnabled,"onUpdate:modelValue":o[2]||(o[2]=t=>r.outgoingServer2serverGroupShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to send shares to groups on other servers")),1)]),_:1},8,["modelValue"])):m("",!0),r.federatedGroupSharingSupported?(g(),c(a(u),{key:1,modelValue:r.incomingServer2serverGroupShareEnabled,"onUpdate:modelValue":o[3]||(o[3]=t=>r.incomingServer2serverGroupShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to receive group shares from other servers")),1)]),_:1},8,["modelValue"])):m("",!0),h("fieldset",null,[h("legend",null,l(a(e)("federatedfilesharing","The lookup server is only available for global scale.")),1),f(a(u),{type:"switch",modelValue:r.lookupServerEnabled,disabled:"","onUpdate:modelValue":w},{default:i(()=>[p(l(a(e)("federatedfilesharing","Search global and public address book for people")),1)]),_:1},8,["modelValue"]),f(a(u),{type:"switch",modelValue:r.lookupServerUploadEnabled,disabled:"","onUpdate:modelValue":_},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people to publish their data to a global and public address book")),1)]),_:1},8,["modelValue"])]),h("div",j,[h("h3",q,l(a(e)("federatedfilesharing","Trusted federation")),1),f(a(u),{modelValue:r.federatedTrustedShareAutoAccept,"onUpdate:modelValue":o[4]||(o[4]=t=>r.federatedTrustedShareAutoAccept=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Automatically accept shares from trusted federated accounts and groups by default")),1)]),_:1},8,["modelValue"])])]),_:1},8,["name","description","docUrl"]))}}),W=A(F,[["__scopeId","data-v-71370f43"]]),N=s("federatedfilesharing","internalOnly",!1);N||T(W).mount("#vue-admin-federated"); //# sourceMappingURL=federatedfilesharing-settings-admin.mjs.map diff --git a/dist/federatedfilesharing-settings-personal.mjs b/dist/federatedfilesharing-settings-personal.mjs index b0ee2e4e49608..57502a27b166d 100644 --- a/dist/federatedfilesharing-settings-personal.mjs +++ b/dist/federatedfilesharing-settings-personal.mjs @@ -1,4 +1,4 @@ -import{o,j as s,k as i,t as l,m as I,y as L,b as Z,c as w,w as r,e as u,u as e,g as f,F as j,B as J,r as H,p as _,h as W}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{d as z}from"./index-DCJOwzzz.chunk.mjs";import{a as M,l as h}from"./index-C3KLQ_oe.chunk.mjs";import{t as a}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{i as x}from"./index-DgEyzq8A.chunk.mjs";import{N as b}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{N as q}from"./TrashCanOutline-BZ98FFoG.chunk.mjs";import{I as E,N as G}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import"./modulepreload-polyfill-BxzAKjcf.chunk.mjs";import"./index-CO7ZwNPX.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";const K={name:"CheckIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Q=["aria-hidden","aria-label"],X=["fill","width","height"],ee={d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},ae={key:0};function te(d,n,t,k,p,y){return o(),s("span",L(d.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon check-icon",role:"img",onClick:n[0]||(n[0]=m=>d.$emit("click",m))}),[(o(),s("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[i("path",ee,[t.title?(o(),s("title",ae,l(t.title),1)):I("",!0)])],8,X))],16,Q)}const ie=M(K,[["render",te]]),re={name:"WebIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},le=["aria-hidden","aria-label"],oe=["fill","width","height"],ne={d:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},se={key:0};function de(d,n,t,k,p,y){return o(),s("span",L(d.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon web-icon",role:"img",onClick:n[0]||(n[0]=m=>d.$emit("click",m))}),[(o(),s("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[i("path",ne,[t.title?(o(),s("title",se,l(t.title),1)):I("",!0)])],8,oe))],16,le)}const ce=M(re,[["render",de]]),ue={class:"social-button"},fe=["src"],he=["src"],pe=["src"],me={style:{margin:"10px 0"}},ge=["href"],Ce=Z({__name:"PersonalSettings",setup(d){const n=window.OC.theme.productName,t=h("federatedfilesharing","color"),k=h("federatedfilesharing","textColor"),p=h("federatedfilesharing","cloudId"),y=h("federatedfilesharing","docUrlFederated"),m=h("federatedfilesharing","logoPath"),g=h("federatedfilesharing","reference"),S=x("core","facebook"),B=x("core","mastodon"),F=x("core","bluesky"),U=a("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID, see {url}",{url:g}),D=a("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID"),R=`https://mastodon.social/?text=${encodeURIComponent(D)}&url=${encodeURIComponent(g)}`,T=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(g)}`,A=`https://bsky.app/intent/compose?text=${encodeURIComponent(U)}`,O=new URL(m,location.origin),v=H(!1),C=H(!1),$=_(()=>` +import{o,j as s,k as i,t as l,m as I,y as L,b as Z,c as w,w as r,e as u,u as e,g as f,F as j,B as J,r as H,p as _,h as W}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{d as z}from"./index-WQvok30H.chunk.mjs";import{a as M,l as h}from"./index-C3KLQ_oe.chunk.mjs";import{t as a}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{i as x}from"./index-DgEyzq8A.chunk.mjs";import{N as b}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{N as q}from"./TrashCanOutline-BZ98FFoG.chunk.mjs";import{I as E,N as G}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import"./modulepreload-polyfill-BxzAKjcf.chunk.mjs";import"./index-CO7ZwNPX.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";const K={name:"CheckIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Q=["aria-hidden","aria-label"],X=["fill","width","height"],ee={d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},ae={key:0};function te(d,n,t,k,p,y){return o(),s("span",L(d.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon check-icon",role:"img",onClick:n[0]||(n[0]=m=>d.$emit("click",m))}),[(o(),s("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[i("path",ee,[t.title?(o(),s("title",ae,l(t.title),1)):I("",!0)])],8,X))],16,Q)}const ie=M(K,[["render",te]]),re={name:"WebIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},le=["aria-hidden","aria-label"],oe=["fill","width","height"],ne={d:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},se={key:0};function de(d,n,t,k,p,y){return o(),s("span",L(d.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon web-icon",role:"img",onClick:n[0]||(n[0]=m=>d.$emit("click",m))}),[(o(),s("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[i("path",ne,[t.title?(o(),s("title",se,l(t.title),1)):I("",!0)])],8,oe))],16,le)}const ce=M(re,[["render",de]]),ue={class:"social-button"},fe=["src"],he=["src"],pe=["src"],me={style:{margin:"10px 0"}},ge=["href"],Ce=Z({__name:"PersonalSettings",setup(d){const n=window.OC.theme.productName,t=h("federatedfilesharing","color"),k=h("federatedfilesharing","textColor"),p=h("federatedfilesharing","cloudId"),y=h("federatedfilesharing","docUrlFederated"),m=h("federatedfilesharing","logoPath"),g=h("federatedfilesharing","reference"),S=x("core","facebook"),B=x("core","mastodon"),F=x("core","bluesky"),U=a("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID, see {url}",{url:g}),D=a("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID"),R=`https://mastodon.social/?text=${encodeURIComponent(D)}&url=${encodeURIComponent(g)}`,T=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(g)}`,A=`https://bsky.app/intent/compose?text=${encodeURIComponent(U)}`,O=new URL(m,location.origin),v=H(!1),C=H(!1),$=_(()=>` padding:10px; background-color:${t}; color:${k}; diff --git a/dist/federation-settings-admin.mjs b/dist/federation-settings-admin.mjs index ac9279973e750..035b8ee8305bc 100644 --- a/dist/federation-settings-admin.mjs +++ b/dist/federation-settings-admin.mjs @@ -1,2 +1,2 @@ -import{b as g,s as D,o as l,j as U,k as h,t as C,u as t,n as u,e as _,w as T,C as L,r as w,H as k,c as f,p,m as O,T as P,F as R,A as K,h as V}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{a as F,l as q}from"./index-C3KLQ_oe.chunk.mjs";import{t as r}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{N as z}from"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import{N as G}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import{e as B,N as M,f as j,a as H,b as W,d as J}from"./mdi-CYMOyMtM.chunk.mjs";import{d as Q,a as y}from"./index-DCJOwzzz.chunk.mjs";import{N as E}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{N as A}from"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import{_ as X}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{c as b,i as Y}from"./index-9ZBo3L67.chunk.mjs";import{c as $,g as Z}from"./index-DgEyzq8A.chunk.mjs";import"./index-CO7ZwNPX.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import"./index-sH3U_332.chunk.mjs";const n=Object.freeze({STATUS_OK:1,STATUS_PENDING:2,STATUS_FAILURE:3,STATUS_ACCESS_REVOKED:4});class N extends Error{}async function ee(a){try{const{data:i}=await b.post($("apps/federation/trusted-servers"),{url:a}),s=i.ocs.data;return{id:s.id,url:s.url,status:n.STATUS_PENDING}}catch(i){throw I(i)}}async function te(a){try{await b.delete($(`apps/federation/trusted-servers/${a}`))}catch(i){throw I(i)}}function I(a){return Y(a)&&a.response?.data?.ocs?new N(a.response.data.ocs.meta.message,{cause:a}):a}const x=Z().setApp("federation").build(),re=g({__name:"AddTrustedServerForm",emits:["add"],setup(a,{emit:i}){const s=i,v=D("form"),d=w("");async function m(){try{const e=await ee(d.value);d.value="",s("add",e),k(()=>v.value?.reset()),Q(r("federation","Added to the list of trusted servers"))}catch(e){x.error("Failed to add trusted server",{error:e}),e instanceof N?y(e.message):y(r("federation","Could not add trusted server. Please try again later."))}}return(e,o)=>(l(),U("form",{ref:"form",onSubmit:L(m,["prevent"])},[h("h3",{class:u(e.$style.addTrustedServerForm__heading)},C(t(r)("federation","Add trusted server")),3),h("div",{class:u(e.$style.addTrustedServerForm__wrapper)},[_(t(X),{modelValue:d.value,"onUpdate:modelValue":o[0]||(o[0]=c=>d.value=c),label:t(r)("federation","Server url"),placeholder:"https://…",required:"",type:"url"},null,8,["modelValue","label"]),_(t(E),{class:u(e.$style.addTrustedServerForm__submitButton),"aria-label":t(r)("federation","Add"),title:t(r)("federation","Add"),type:"submit",variant:"primary"},{icon:T(()=>[_(t(A),{path:t(B)},null,8,["path"])]),_:1},8,["class","aria-label","title"])],2)],544))}}),se="_addTrustedServerForm__heading_14ngv_2",ae="_addTrustedServerForm__wrapper_14ngv_7",ie="_addTrustedServerForm__submitButton_14ngv_14",de={addTrustedServerForm__heading:se,addTrustedServerForm__wrapper:ae,addTrustedServerForm__submitButton:ie},ne={$style:de},oe=F(re,[["__cssModules",ne]]),le=["textContent"],ue=g({__name:"TrustedServer",props:{server:{}},emits:["delete"],setup(a,{emit:i}){const s=a,v=i,d=w(!1),m=p(()=>s.server.status===n.STATUS_FAILURE),e=p(()=>{switch(s.server.status){case n.STATUS_OK:return J;case n.STATUS_PENDING:case n.STATUS_ACCESS_REVOKED:return W;case n.STATUS_FAILURE:default:return H}}),o=p(()=>{switch(s.server.status){case n.STATUS_OK:return[r("federation","Server ok"),r("federation","User list was exchanged at least once successfully with the remote server.")];case n.STATUS_PENDING:return[r("federation","Server pending"),r("federation","Waiting for shared secret or initial user list exchange.")];case n.STATUS_ACCESS_REVOKED:return[r("federation","Server access revoked"),r("federation","Server access revoked")];case n.STATUS_FAILURE:default:return[r("federation","Server failure"),r("federation","Connection to the remote server failed or the remote server is misconfigured.")]}});async function c(){try{d.value=!0,await te(s.server.id),v("delete",s.server)}catch(S){d.value=!1,x.error("Failed to delete trusted server",{error:S}),y(r("federation","Failed to delete trusted server. Please try again later."))}}return(S,Ce)=>(l(),U("li",{class:u(S.$style.trustedServer)},[_(t(A),{class:u({[S.$style.trustedServer__icon_error]:m.value}),path:e.value,name:o.value[0],title:o.value[1]},null,8,["class","path","name","title"]),h("code",{class:u(S.$style.trustedServer__url),textContent:C(a.server.url)},null,10,le),_(t(E),{"aria-label":t(r)("federation","Delete"),title:t(r)("federation","Delete"),disabled:d.value,onClick:c},{icon:T(()=>[d.value?(l(),f(t(M),{key:0})):(l(),f(t(A),{key:1,path:t(j)},null,8,["path"]))]),_:1},8,["aria-label","title","disabled"])],2))}}),_e="_trustedServer_1wqey_2",ce="_trustedServer__icon_error_1wqey_15",ve="_trustedServer__url_1wqey_19",me={trustedServer:_e,trustedServer__icon_error:ce,trustedServer__url:ve},Se={$style:me},fe=F(ue,[["__cssModules",Se]]),pe=g({__name:"AdminSettings",setup(a){const i=q("federation","adminSettings"),s=w(i.trustedServers),v=p(()=>s.value.some(e=>e.status===n.STATUS_PENDING));async function d(e){s.value.unshift(e)}function m(e){s.value=s.value.filter(o=>o.id!==e.id)}return(e,o)=>(l(),f(t(G),{name:t(r)("federation","Trusted servers"),docUrl:t(i).docUrl,description:t(r)("federation","Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share.")},{default:T(()=>[v.value?(l(),f(t(z),{key:0,type:"info",text:t(r)("federation","Each server must validate the other. This process may require a few cron cycles.")},null,8,["text"])):O("",!0),_(P,{class:u(e.$style.federationAdminSettings__trustedServersList),"aria-label":t(r)("federation","Trusted servers"),tag:"ul",enterFromClass:e.$style.transition_hidden,enterActiveClass:e.$style.transition_active,leaveActiveClass:e.$style.transition_active,leaveToClass:e.$style.transition_hidden},{default:T(()=>[(l(!0),U(R,null,K(s.value,c=>(l(),f(fe,{key:c.id,class:u(e.$style.federationAdminSettings__trustedServersListItem),server:c,onDelete:m},null,8,["class","server"]))),128))]),_:1},8,["class","aria-label","enterFromClass","enterActiveClass","leaveActiveClass","leaveToClass"]),_(oe,{onAdd:d})]),_:1},8,["name","docUrl","description"]))}}),Te="_federationAdminSettings__trustedServersList_z3uvu_2",he="_federationAdminSettings__trustedServersListItem_z3uvu_9",ye="_transition_active_z3uvu_13",Ae="_transition_hidden_z3uvu_17",ge={federationAdminSettings__trustedServersList:Te,federationAdminSettings__trustedServersListItem:he,transition_active:ye,transition_hidden:Ae},Ue={$style:ge},we=F(pe,[["__cssModules",Ue]]),Fe=V(we);Fe.mount("#federation-admin-settings"); +import{b as g,s as D,o as l,j as U,k as h,t as C,u as t,n as u,e as _,w as T,C as L,r as w,H as k,c as f,p,m as O,T as P,F as R,A as K,h as V}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{a as F,l as q}from"./index-C3KLQ_oe.chunk.mjs";import{t as r}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{N as z}from"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import{N as G}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import{e as B,N as M,f as j,a as H,b as W,d as J}from"./mdi-CYMOyMtM.chunk.mjs";import{d as Q,a as y}from"./index-WQvok30H.chunk.mjs";import{N as E}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import{N as A}from"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import{_ as X}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{c as b,i as Y}from"./index-9ZBo3L67.chunk.mjs";import{c as $,g as Z}from"./index-DgEyzq8A.chunk.mjs";import"./index-CO7ZwNPX.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import"./index-sH3U_332.chunk.mjs";const n=Object.freeze({STATUS_OK:1,STATUS_PENDING:2,STATUS_FAILURE:3,STATUS_ACCESS_REVOKED:4});class N extends Error{}async function ee(a){try{const{data:i}=await b.post($("apps/federation/trusted-servers"),{url:a}),s=i.ocs.data;return{id:s.id,url:s.url,status:n.STATUS_PENDING}}catch(i){throw I(i)}}async function te(a){try{await b.delete($(`apps/federation/trusted-servers/${a}`))}catch(i){throw I(i)}}function I(a){return Y(a)&&a.response?.data?.ocs?new N(a.response.data.ocs.meta.message,{cause:a}):a}const x=Z().setApp("federation").build(),re=g({__name:"AddTrustedServerForm",emits:["add"],setup(a,{emit:i}){const s=i,v=D("form"),d=w("");async function m(){try{const e=await ee(d.value);d.value="",s("add",e),k(()=>v.value?.reset()),Q(r("federation","Added to the list of trusted servers"))}catch(e){x.error("Failed to add trusted server",{error:e}),e instanceof N?y(e.message):y(r("federation","Could not add trusted server. Please try again later."))}}return(e,o)=>(l(),U("form",{ref:"form",onSubmit:L(m,["prevent"])},[h("h3",{class:u(e.$style.addTrustedServerForm__heading)},C(t(r)("federation","Add trusted server")),3),h("div",{class:u(e.$style.addTrustedServerForm__wrapper)},[_(t(X),{modelValue:d.value,"onUpdate:modelValue":o[0]||(o[0]=c=>d.value=c),label:t(r)("federation","Server url"),placeholder:"https://…",required:"",type:"url"},null,8,["modelValue","label"]),_(t(E),{class:u(e.$style.addTrustedServerForm__submitButton),"aria-label":t(r)("federation","Add"),title:t(r)("federation","Add"),type:"submit",variant:"primary"},{icon:T(()=>[_(t(A),{path:t(B)},null,8,["path"])]),_:1},8,["class","aria-label","title"])],2)],544))}}),se="_addTrustedServerForm__heading_14ngv_2",ae="_addTrustedServerForm__wrapper_14ngv_7",ie="_addTrustedServerForm__submitButton_14ngv_14",de={addTrustedServerForm__heading:se,addTrustedServerForm__wrapper:ae,addTrustedServerForm__submitButton:ie},ne={$style:de},oe=F(re,[["__cssModules",ne]]),le=["textContent"],ue=g({__name:"TrustedServer",props:{server:{}},emits:["delete"],setup(a,{emit:i}){const s=a,v=i,d=w(!1),m=p(()=>s.server.status===n.STATUS_FAILURE),e=p(()=>{switch(s.server.status){case n.STATUS_OK:return J;case n.STATUS_PENDING:case n.STATUS_ACCESS_REVOKED:return W;case n.STATUS_FAILURE:default:return H}}),o=p(()=>{switch(s.server.status){case n.STATUS_OK:return[r("federation","Server ok"),r("federation","User list was exchanged at least once successfully with the remote server.")];case n.STATUS_PENDING:return[r("federation","Server pending"),r("federation","Waiting for shared secret or initial user list exchange.")];case n.STATUS_ACCESS_REVOKED:return[r("federation","Server access revoked"),r("federation","Server access revoked")];case n.STATUS_FAILURE:default:return[r("federation","Server failure"),r("federation","Connection to the remote server failed or the remote server is misconfigured.")]}});async function c(){try{d.value=!0,await te(s.server.id),v("delete",s.server)}catch(S){d.value=!1,x.error("Failed to delete trusted server",{error:S}),y(r("federation","Failed to delete trusted server. Please try again later."))}}return(S,Ce)=>(l(),U("li",{class:u(S.$style.trustedServer)},[_(t(A),{class:u({[S.$style.trustedServer__icon_error]:m.value}),path:e.value,name:o.value[0],title:o.value[1]},null,8,["class","path","name","title"]),h("code",{class:u(S.$style.trustedServer__url),textContent:C(a.server.url)},null,10,le),_(t(E),{"aria-label":t(r)("federation","Delete"),title:t(r)("federation","Delete"),disabled:d.value,onClick:c},{icon:T(()=>[d.value?(l(),f(t(M),{key:0})):(l(),f(t(A),{key:1,path:t(j)},null,8,["path"]))]),_:1},8,["aria-label","title","disabled"])],2))}}),_e="_trustedServer_1wqey_2",ce="_trustedServer__icon_error_1wqey_15",ve="_trustedServer__url_1wqey_19",me={trustedServer:_e,trustedServer__icon_error:ce,trustedServer__url:ve},Se={$style:me},fe=F(ue,[["__cssModules",Se]]),pe=g({__name:"AdminSettings",setup(a){const i=q("federation","adminSettings"),s=w(i.trustedServers),v=p(()=>s.value.some(e=>e.status===n.STATUS_PENDING));async function d(e){s.value.unshift(e)}function m(e){s.value=s.value.filter(o=>o.id!==e.id)}return(e,o)=>(l(),f(t(G),{name:t(r)("federation","Trusted servers"),docUrl:t(i).docUrl,description:t(r)("federation","Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share.")},{default:T(()=>[v.value?(l(),f(t(z),{key:0,type:"info",text:t(r)("federation","Each server must validate the other. This process may require a few cron cycles.")},null,8,["text"])):O("",!0),_(P,{class:u(e.$style.federationAdminSettings__trustedServersList),"aria-label":t(r)("federation","Trusted servers"),tag:"ul",enterFromClass:e.$style.transition_hidden,enterActiveClass:e.$style.transition_active,leaveActiveClass:e.$style.transition_active,leaveToClass:e.$style.transition_hidden},{default:T(()=>[(l(!0),U(R,null,K(s.value,c=>(l(),f(fe,{key:c.id,class:u(e.$style.federationAdminSettings__trustedServersListItem),server:c,onDelete:m},null,8,["class","server"]))),128))]),_:1},8,["class","aria-label","enterFromClass","enterActiveClass","leaveActiveClass","leaveToClass"]),_(oe,{onAdd:d})]),_:1},8,["name","docUrl","description"]))}}),Te="_federationAdminSettings__trustedServersList_z3uvu_2",he="_federationAdminSettings__trustedServersListItem_z3uvu_9",ye="_transition_active_z3uvu_13",Ae="_transition_hidden_z3uvu_17",ge={federationAdminSettings__trustedServersList:Te,federationAdminSettings__trustedServersListItem:he,transition_active:ye,transition_hidden:Ae},Ue={$style:ge},we=F(pe,[["__cssModules",Ue]]),Fe=V(we);Fe.mount("#federation-admin-settings"); //# sourceMappingURL=federation-settings-admin.mjs.map diff --git a/dist/files_external-auth_rsa.mjs b/dist/files_external-auth_rsa.mjs index 0b40d95204676..8a76421be6c5f 100644 --- a/dist/files_external-auth_rsa.mjs +++ b/dist/files_external-auth_rsa.mjs @@ -1,3 +1,3 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('', '', 'dist/AuthMechanismRsa-DqH1rMWg.chunk.mjs'),window.OC.filePath('', '', 'dist/runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs'),window.OC.filePath('', '', 'dist/index-9ZBo3L67.chunk.mjs'),window.OC.filePath('', '', 'dist/index-DgEyzq8A.chunk.mjs'),window.OC.filePath('', '', 'dist/index-sH3U_332.chunk.mjs'),window.OC.filePath('', '', 'dist/index-DCJOwzzz.chunk.mjs'),window.OC.filePath('', '', 'dist/index-C3KLQ_oe.chunk.mjs'),window.OC.filePath('', '', 'dist/index-CO7ZwNPX.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs'),window.OC.filePath('', '', 'dist/translation-DoG5ZELJ-Bq3q05SR.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-C_oBIsvc.chunk.css'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-DcSJKjY8.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-Ks0gkIDB.chunk.css'),window.OC.filePath('', '', 'dist/mdi-CYMOyMtM.chunk.mjs'),window.OC.filePath('', '', 'dist/mdi-BYHcrfvW.chunk.css'),window.OC.filePath('', '', 'dist/index-BaQM1-G8.chunk.css'),window.OC.filePath('', '', 'dist/NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs'),window.OC.filePath('', '', 'dist/NcNoteCard-mI7qVZ9j-BWNFKLbC.chunk.css'),window.OC.filePath('', '', 'dist/NcSelect--kERLlBK-DUoCWpPg.chunk.mjs'),window.OC.filePath('', '', 'dist/NcSelect--kERLlBK-BWhNCeJl.chunk.css'),window.OC.filePath('', '', 'dist/NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs'),window.OC.filePath('', '', 'dist/NcCheckboxRadioSwitch-DVdt5Hkq-Ct9ZGMmH.chunk.css'),window.OC.filePath('', '', 'dist/NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs'),window.OC.filePath('', '', 'dist/TrashCanOutline-BZ98FFoG.chunk.mjs'),window.OC.filePath('', '', 'dist/TrashCanOutline-BYHxARP-.chunk.css'),window.OC.filePath('', '', 'dist/NcPasswordField-BFyzHTOO-Crp_EMfV.chunk.css'),window.OC.filePath('', '', 'dist/NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs'),window.OC.filePath('', '', 'dist/types-CnbnigDb.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-DTrLKxyb.chunk.mjs'),window.OC.filePath('', '', 'dist/AuthMechanismRsa-DGFpo-hc.chunk.css')])))=>i.map(i=>d[i]); -import{_ as t}from"./index-C3KLQ_oe.chunk.mjs";import{d as a,a as i}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";const r=i(()=>t(()=>import("./AuthMechanismRsa-DqH1rMWg.chunk.mjs").then(e=>e.A),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]),import.meta.url)),s=a(r,{shadowRoot:!1});customElements.define("files_external-auth-mechanism-rsa",s),window.OCA.FilesExternal.AuthMechanism.registerHandler({id:"rsa",tagName:"files_external-auth-mechanism-rsa",enabled(e){return e.scheme==="publickey"&&e.identifier==="publickey::rsa"}}); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('', '', 'dist/AuthMechanismRsa-DiZqNNSC.chunk.mjs'),window.OC.filePath('', '', 'dist/runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs'),window.OC.filePath('', '', 'dist/index-9ZBo3L67.chunk.mjs'),window.OC.filePath('', '', 'dist/index-DgEyzq8A.chunk.mjs'),window.OC.filePath('', '', 'dist/index-sH3U_332.chunk.mjs'),window.OC.filePath('', '', 'dist/index-WQvok30H.chunk.mjs'),window.OC.filePath('', '', 'dist/index-C3KLQ_oe.chunk.mjs'),window.OC.filePath('', '', 'dist/index-CO7ZwNPX.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs'),window.OC.filePath('', '', 'dist/translation-DoG5ZELJ-Bq3q05SR.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-C_oBIsvc.chunk.css'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-DcSJKjY8.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-Ks0gkIDB.chunk.css'),window.OC.filePath('', '', 'dist/mdi-CYMOyMtM.chunk.mjs'),window.OC.filePath('', '', 'dist/mdi-BYHcrfvW.chunk.css'),window.OC.filePath('', '', 'dist/index-BaQM1-G8.chunk.css'),window.OC.filePath('', '', 'dist/NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs'),window.OC.filePath('', '', 'dist/NcNoteCard-mI7qVZ9j-BWNFKLbC.chunk.css'),window.OC.filePath('', '', 'dist/NcSelect--kERLlBK-DUoCWpPg.chunk.mjs'),window.OC.filePath('', '', 'dist/NcSelect--kERLlBK-BWhNCeJl.chunk.css'),window.OC.filePath('', '', 'dist/NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs'),window.OC.filePath('', '', 'dist/NcCheckboxRadioSwitch-DVdt5Hkq-Ct9ZGMmH.chunk.css'),window.OC.filePath('', '', 'dist/NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs'),window.OC.filePath('', '', 'dist/TrashCanOutline-BZ98FFoG.chunk.mjs'),window.OC.filePath('', '', 'dist/TrashCanOutline-BYHxARP-.chunk.css'),window.OC.filePath('', '', 'dist/NcPasswordField-BFyzHTOO-Crp_EMfV.chunk.css'),window.OC.filePath('', '', 'dist/NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs'),window.OC.filePath('', '', 'dist/types-CnbnigDb.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-DTrLKxyb.chunk.mjs'),window.OC.filePath('', '', 'dist/AuthMechanismRsa-DGFpo-hc.chunk.css')])))=>i.map(i=>d[i]); +import{_ as t}from"./index-C3KLQ_oe.chunk.mjs";import{d as a,a as i}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";const r=i(()=>t(()=>import("./AuthMechanismRsa-DiZqNNSC.chunk.mjs").then(e=>e.A),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]),import.meta.url)),s=a(r,{shadowRoot:!1});customElements.define("files_external-auth-mechanism-rsa",s),window.OCA.FilesExternal.AuthMechanism.registerHandler({id:"rsa",tagName:"files_external-auth-mechanism-rsa",enabled(e){return e.scheme==="publickey"&&e.identifier==="publickey::rsa"}}); //# sourceMappingURL=files_external-auth_rsa.mjs.map diff --git a/dist/files_external-init.mjs b/dist/files_external-init.mjs index 341feb83dff7f..c56e40d2716ae 100644 --- a/dist/files_external-init.mjs +++ b/dist/files_external-init.mjs @@ -1,3 +1,3 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('', '', 'dist/CredentialsDialog-CCk7Ebzf.chunk.mjs'),window.OC.filePath('', '', 'dist/translation-DoG5ZELJ-Bq3q05SR.chunk.mjs'),window.OC.filePath('', '', 'dist/index-DgEyzq8A.chunk.mjs'),window.OC.filePath('', '', 'dist/index-CO7ZwNPX.chunk.mjs'),window.OC.filePath('', '', 'dist/runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-C_oBIsvc.chunk.css'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-DcSJKjY8.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-Ks0gkIDB.chunk.css'),window.OC.filePath('', '', 'dist/mdi-CYMOyMtM.chunk.mjs'),window.OC.filePath('', '', 'dist/mdi-BYHcrfvW.chunk.css'),window.OC.filePath('', '', 'dist/index-BaQM1-G8.chunk.css'),window.OC.filePath('', '', 'dist/NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs'),window.OC.filePath('', '', 'dist/NcNoteCard-mI7qVZ9j-BWNFKLbC.chunk.css'),window.OC.filePath('', '', 'dist/NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs'),window.OC.filePath('', '', 'dist/index-9ZBo3L67.chunk.mjs'),window.OC.filePath('', '', 'dist/index-sH3U_332.chunk.mjs'),window.OC.filePath('', '', 'dist/index-C3KLQ_oe.chunk.mjs'),window.OC.filePath('', '', 'dist/TrashCanOutline-BZ98FFoG.chunk.mjs'),window.OC.filePath('', '', 'dist/TrashCanOutline-BYHxARP-.chunk.css'),window.OC.filePath('', '', 'dist/NcPasswordField-BFyzHTOO-Crp_EMfV.chunk.css'),window.OC.filePath('', '', 'dist/NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs')])))=>i.map(i=>d[i]); -import{D as x,g as C,V as E,C as p,b as c}from"./index-CPriPmaq.chunk.mjs";import{_ as V,l as M}from"./index-C3KLQ_oe.chunk.mjs";import{t as s}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{c as l}from"./index-9ZBo3L67.chunk.mjs";import{d as w,a as h,s as L,e as S}from"./index-DCJOwzzz.chunk.mjs";import{b as m,f as _,a as u,c as T,h as v}from"./index-DgEyzq8A.chunk.mjs";import{a as A,P as N}from"./index-CaHqqZcX.chunk.mjs";import{s as P}from"./index-CO7ZwNPX.chunk.mjs";import{S as a}from"./types-CnbnigDb.chunk.mjs";import{i as y,b as H,P as d}from"./externalStorageUtils-BzJyVKar.chunk.mjs";import{a as D}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";const I='',k='';function b(e){return e.status===void 0||e.status===a.Success?!1:e.userProvided||e.authMechanism==="password::global::user"}A(l);async function O(e,t,n){const r=(await l.request({method:"PUT",url:m("apps/files_external/userglobalstorages/{id}",{id:e.id}),confirmPassword:N.Strict,data:{backendOptions:{user:t,password:n}}})).data;return r.status!==a.Success?(h(s("files_external","Unable to update this external storage config. {statusMessage}",{statusMessage:r?.statusMessage||""})),null):(w(s("files_external","New configuration successfully saved")),e.attributes.config=r,_("files:node:updated",e),!0)}const R="credentials-external-storage",U={id:R,displayName:()=>s("files","Enter missing credentials"),iconSvgInline:()=>k,enabled:({nodes:e})=>{if(e.length!==1||!e[0])return!1;const t=e[0];if(!y(t))return!1;const n=t.attributes?.config||{};return!!b(n)},async exec({nodes:e}){const{login:t,password:n}=await P(D(()=>V(()=>import("./CredentialsDialog-CCk7Ebzf.chunk.mjs"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]),import.meta.url)))??{};if(t&&n)try{await O(e[0],t,n),w(s("files_external","Credentials successfully set"))}catch(r){h(s("files_external","Error while setting credentials: {error}",{error:r.message}))}return null},order:-1e3,default:x.DEFAULT,inline:()=>!0},$='',o=`/files/${u()?.uid}`;function B(e){const t=(e.path+"/"+e.name).replace(/^\//gm,"");return new H({id:e.id,source:v("dav"+o+"/"+t),root:o,owner:u()?.uid||null,permissions:e.config.status!==a.Success?d.NONE:e?.permissions||d.READ,attributes:{displayName:t,...e}})}async function F(){const e=(await l.get(T("apps/files_external/api/v1/mounts"))).data.ocs.data.map(B);return{folder:new H({id:0,source:v("dav"+o),root:o,owner:u()?.uid||null,permissions:d.READ}),contents:e}}function Z(e,t=!0){const n=t?"userglobalstorages":"userstorages";return l.get(m(`apps/files_external/${n}/${e}?testOnly=false`))}const j={id:"check-external-storage",displayName:()=>"",iconSvgInline:()=>"",enabled:({nodes:e})=>e.every(t=>y(t)===!0),exec:async()=>null,async renderInline({nodes:e}){if(e.length!==1||!e[0])return null;const t=e[0],n=document.createElement("span");n.className="files-list__row-status",n.innerHTML=s("files_external","Checking storage …");let r;try{const{data:i}=await Z(t.id,t.attributes.scope==="system");if(r=i,t.attributes.config=r,_("files:node:updated",t),r.status!==a.Success)throw new Error(r?.statusMessage||s("files_external","There was an error with this external storage."));n.remove()}catch(i){i.response&&!r&&L(s("files_external","We were unable to check the external storage {basename}",{basename:t.basename})),n.innerHTML="";const f=r?b(r):!1,g=document.createElement("span");g.classList.add(`files-list__row-status--${f?"warning":"error"}`),f||(n.innerHTML=$,n.title=i.message),n.prepend(g)}return n},order:10},q={id:"open-in-files-external-storage",displayName:({nodes:e})=>(e?.[0]?.attributes?.config||{status:a.Indeterminate}).status!==a.Success?s("files_external","Examine this faulty external storage configuration"):s("files","Open in Files"),iconSvgInline:()=>"",enabled:({view:e})=>e.id==="extstoragemounts",async exec({nodes:e}){if(e[0]?.attributes?.config?.status!==a.Success){if(await S({name:s("files_external","External mount error"),text:s("files_external","There was an error with this external storage. Do you want to review this mount point config in the settings page?"),labelConfirm:s("files_external","Open settings"),labelReject:s("files_external","Ignore")})===!0){const t=u()?.isAdmin?"admin":"user";window.location.href=m(`/settings/${t}/externalstorages`)}return null}return window.OCP.Files.Router.goToRoute(null,{view:"files"},{dir:e[0].path}),null},order:-1e3,default:x.HIDDEN},W=M("files_external","allowUserMounting",!1),Y=C();Y.register(new E({id:"extstoragemounts",name:s("files_external","External storage"),caption:s("files_external","List of external storage."),emptyCaption:W?s("files_external","There is no external storage configured. You can configure them in your Personal settings."):s("files_external","There is no external storage configured and you don't have the permission to configure them."),emptyTitle:s("files_external","No external storage"),icon:I,order:30,columns:[new p({id:"storage-type",title:s("files_external","Storage type"),render(e){const t=e.attributes?.backend||s("files_external","Unknown"),n=document.createElement("span");return n.textContent=t,n}}),new p({id:"scope",title:s("files_external","Scope"),render(e){const t=document.createElement("span");let n=s("files_external","Personal");return e.attributes?.scope==="system"&&(n=s("files_external","System")),t.textContent=n,t}})],getContents:F})),c(U),c(j),c(q); +import{D as x,g as C,V as E,C as p,b as c}from"./index-CPriPmaq.chunk.mjs";import{_ as V,l as M}from"./index-C3KLQ_oe.chunk.mjs";import{t as s}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{c as l}from"./index-9ZBo3L67.chunk.mjs";import{d as w,a as h,s as L,e as S}from"./index-WQvok30H.chunk.mjs";import{b as m,f as _,a as u,c as T,h as v}from"./index-DgEyzq8A.chunk.mjs";import{a as A,P as N}from"./index-CaHqqZcX.chunk.mjs";import{s as P}from"./index-CO7ZwNPX.chunk.mjs";import{S as a}from"./types-CnbnigDb.chunk.mjs";import{i as y,b as H,P as d}from"./externalStorageUtils-BzJyVKar.chunk.mjs";import{a as D}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";const I='',k='';function b(e){return e.status===void 0||e.status===a.Success?!1:e.userProvided||e.authMechanism==="password::global::user"}A(l);async function O(e,t,n){const r=(await l.request({method:"PUT",url:m("apps/files_external/userglobalstorages/{id}",{id:e.id}),confirmPassword:N.Strict,data:{backendOptions:{user:t,password:n}}})).data;return r.status!==a.Success?(h(s("files_external","Unable to update this external storage config. {statusMessage}",{statusMessage:r?.statusMessage||""})),null):(w(s("files_external","New configuration successfully saved")),e.attributes.config=r,_("files:node:updated",e),!0)}const R="credentials-external-storage",U={id:R,displayName:()=>s("files","Enter missing credentials"),iconSvgInline:()=>k,enabled:({nodes:e})=>{if(e.length!==1||!e[0])return!1;const t=e[0];if(!y(t))return!1;const n=t.attributes?.config||{};return!!b(n)},async exec({nodes:e}){const{login:t,password:n}=await P(D(()=>V(()=>import("./CredentialsDialog-CCk7Ebzf.chunk.mjs"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]),import.meta.url)))??{};if(t&&n)try{await O(e[0],t,n),w(s("files_external","Credentials successfully set"))}catch(r){h(s("files_external","Error while setting credentials: {error}",{error:r.message}))}return null},order:-1e3,default:x.DEFAULT,inline:()=>!0},$='',o=`/files/${u()?.uid}`;function B(e){const t=(e.path+"/"+e.name).replace(/^\//gm,"");return new H({id:e.id,source:v("dav"+o+"/"+t),root:o,owner:u()?.uid||null,permissions:e.config.status!==a.Success?d.NONE:e?.permissions||d.READ,attributes:{displayName:t,...e}})}async function F(){const e=(await l.get(T("apps/files_external/api/v1/mounts"))).data.ocs.data.map(B);return{folder:new H({id:0,source:v("dav"+o),root:o,owner:u()?.uid||null,permissions:d.READ}),contents:e}}function Z(e,t=!0){const n=t?"userglobalstorages":"userstorages";return l.get(m(`apps/files_external/${n}/${e}?testOnly=false`))}const j={id:"check-external-storage",displayName:()=>"",iconSvgInline:()=>"",enabled:({nodes:e})=>e.every(t=>y(t)===!0),exec:async()=>null,async renderInline({nodes:e}){if(e.length!==1||!e[0])return null;const t=e[0],n=document.createElement("span");n.className="files-list__row-status",n.innerHTML=s("files_external","Checking storage …");let r;try{const{data:i}=await Z(t.id,t.attributes.scope==="system");if(r=i,t.attributes.config=r,_("files:node:updated",t),r.status!==a.Success)throw new Error(r?.statusMessage||s("files_external","There was an error with this external storage."));n.remove()}catch(i){i.response&&!r&&L(s("files_external","We were unable to check the external storage {basename}",{basename:t.basename})),n.innerHTML="";const f=r?b(r):!1,g=document.createElement("span");g.classList.add(`files-list__row-status--${f?"warning":"error"}`),f||(n.innerHTML=$,n.title=i.message),n.prepend(g)}return n},order:10},q={id:"open-in-files-external-storage",displayName:({nodes:e})=>(e?.[0]?.attributes?.config||{status:a.Indeterminate}).status!==a.Success?s("files_external","Examine this faulty external storage configuration"):s("files","Open in Files"),iconSvgInline:()=>"",enabled:({view:e})=>e.id==="extstoragemounts",async exec({nodes:e}){if(e[0]?.attributes?.config?.status!==a.Success){if(await S({name:s("files_external","External mount error"),text:s("files_external","There was an error with this external storage. Do you want to review this mount point config in the settings page?"),labelConfirm:s("files_external","Open settings"),labelReject:s("files_external","Ignore")})===!0){const t=u()?.isAdmin?"admin":"user";window.location.href=m(`/settings/${t}/externalstorages`)}return null}return window.OCP.Files.Router.goToRoute(null,{view:"files"},{dir:e[0].path}),null},order:-1e3,default:x.HIDDEN},W=M("files_external","allowUserMounting",!1),Y=C();Y.register(new E({id:"extstoragemounts",name:s("files_external","External storage"),caption:s("files_external","List of external storage."),emptyCaption:W?s("files_external","There is no external storage configured. You can configure them in your Personal settings."):s("files_external","There is no external storage configured and you don't have the permission to configure them."),emptyTitle:s("files_external","No external storage"),icon:I,order:30,columns:[new p({id:"storage-type",title:s("files_external","Storage type"),render(e){const t=e.attributes?.backend||s("files_external","Unknown"),n=document.createElement("span");return n.textContent=t,n}}),new p({id:"scope",title:s("files_external","Scope"),render(e){const t=document.createElement("span");let n=s("files_external","Personal");return e.attributes?.scope==="system"&&(n=s("files_external","System")),t.textContent=n,t}})],getContents:F})),c(U),c(j),c(q); //# sourceMappingURL=files_external-init.mjs.map diff --git a/dist/files_external-settings.mjs b/dist/files_external-settings.mjs index 5e00880980cc0..7c305faff5b00 100644 --- a/dist/files_external-settings.mjs +++ b/dist/files_external-settings.mjs @@ -1,2 +1,2 @@ -import{d as Te,c as Oe}from"./pinia-Ccd8xxFH.chunk.mjs";import{a3 as W,a0 as K,G as fe,p as S,b as O,q as B,o as u,c as h,u as e,r as A,v as Z,j as x,n as y,k as b,t as g,F as M,E as qe,A as q,Z as J,_ as X,m as T,z as Y,O as z,$ as _e,e as v,w,g as V,C as Ne,h as Ee}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{N as ge,l as Pe,n as Re,o as Fe,p as je,q as De,f as Be,r as Le,e as Ge}from"./mdi-CYMOyMtM.chunk.mjs";import{a as N,l as $}from"./index-C3KLQ_oe.chunk.mjs";import{t as n,b as He}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{N as R}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./Plus-gXjhFOHV.chunk.mjs";import{N as j}from"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import{N as ne}from"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import{N as ve}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import{d as Ie,N as Qe,s as ze}from"./index-CO7ZwNPX.chunk.mjs";import{N as oe}from"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import{_ as be}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{c as U}from"./index-9ZBo3L67.chunk.mjs";import{b as P}from"./index-DgEyzq8A.chunk.mjs";import{N as Ze}from"./index-COiwHfFG.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./NcRichText-BO_4KtBA-DXDa2H1Y.chunk.mjs";import{N as F}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import{N as pe}from"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";/* empty css */import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import{N as We}from"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./index-CuPuSdF1.chunk.mjs";import{N as Ke}from"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import{C as ye}from"./AuthMechanismRsa-DqH1rMWg.chunk.mjs";import{C as I,a as he,M as D,S as L,b as Ye,c as Je}from"./types-CnbnigDb.chunk.mjs";import{a as xe,P as Q}from"./index-CaHqqZcX.chunk.mjs";import{c as we}from"./externalStorageUtils-BzJyVKar.chunk.mjs";import{a as ie,d as re}from"./index-DCJOwzzz.chunk.mjs";import{l as ke}from"./logger-DTrLKxyb.chunk.mjs";import"./index-sH3U_332.chunk.mjs";const Xe='',ee=fe(new Map),ae=fe(new Map),te=new Set;function Ve(s){const a=S(()=>K(s).map(t=>({id:`user:${t}`,user:t,displayName:ee.get(t)||t})));return W(async()=>{const t=K(s).filter(i=>!ee.has(i));if(t.length>0){const{data:i}=await U.post(P("/displaynames"),{users:t});for(const[c,d]of Object.entries(i.users))ee.set(c,d)}}),a}function Se(s){const a=S(()=>K(s).map(t=>Ce(t,ae.get(t))));return W(async()=>{const t=K(s).filter(i=>!ae.has(i)&&!te.has(i));t.forEach(i=>te.add(i));for(const i of t)try{const{data:c}=await U.get(P("apps/files_external/ajax/applicable"),{params:{pattern:i,limit:50}});ae.set(i,c.groups[i]??i)}finally{te.delete(i)}}),a}function Ce(s,a){return{id:s,isNoUser:!0,displayName:a||s,iconSvg:Xe}}const ea=O({__name:"ApplicableEntities",props:{groups:{default:()=>[]},groupsModifiers:{},users:{default:()=>[]},usersModifiers:{}},emits:["update:groups","update:users"],setup(s){const a=B(s,"groups"),t=B(s,"users"),i=A([]),c=Ve(t),d=Se(a),_=S({get(){return[...d.value,...c.value]},set(o){t.value=o.filter(p=>p.user).map(p=>p.user),a.value=o.filter(p=>p.isNoUser).map(p=>p.id)}}),r=Ie(l,500);async function l(o){const{data:p}=await U.get(P("apps/files_external/ajax/applicable"),{params:{pattern:o,limit:20}}),m=[...i.value.map(f=>[f.id,f]),...Object.entries(p.groups).map(([f,C])=>[f,{...Ce(f),displayName:C}]),...Object.entries(p.users).map(([f,C])=>[`user:${f}`,{id:`user:${f}`,user:f,displayName:C}])];i.value=[...new Map(m).values()]}return(o,p)=>(u(),h(e(Ze),{modelValue:_.value,"onUpdate:modelValue":p[0]||(p[0]=m=>_.value=m),keepOpen:"",multiple:"",options:i.value,inputLabel:e(n)("files_external","Restrict to"),onSearch:e(r)},null,8,["modelValue","options","inputLabel","onSearch"]))}}),aa=O({__name:"AuthMechanismConfiguration",props:Y({authMechanism:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const a=B(s,"modelValue"),t=s,i=S(()=>{if(!t.authMechanism.configuration)return;const l=Object.entries(t.authMechanism.configuration).filter(([,o])=>!(o.flags&I.UserProvided));return Object.fromEntries(l)}),c=S(()=>window.OCA.FilesExternal.AuthMechanism.getHandler(t.authMechanism)),d=S(()=>{if(!i.value)return!1;for(const l of Object.values(i.value))if(!(l.flags&I.Hidden||l.flags&I.UserProvided))return!0;return!1}),_=A(!1);W(async()=>{c.value&&(_.value=!0,await window.customElements.whenDefined(c.value.tagName),_.value=!1)}),Z(i,()=>{for(const l in i.value)l in a.value||(a.value[l]=i.value[l]?.type===he.Boolean?!1:"")});function r(l){const o=[l.detail].flat()[0];a.value={...a.value,...o}}return(l,o)=>d.value?(u(),x("fieldset",{key:0,class:y(l.$style.authMechanismConfiguration)},[b("legend",null,g(e(n)("files_external","Authentication")),1),c.value?(u(),x(M,{key:0},[_.value?(u(),h(e(ge),{key:0})):(u(),h(qe(c.value.tagName),{key:1,".modelValue":a.value,".authMechanism":s.authMechanism,"onUpdate:modelValue":r},null,40,[".modelValue",".authMechanism"]))],64)):(u(!0),x(M,{key:1},q(i.value,(p,m)=>J((u(),h(ye,{key:p.value,modelValue:a.value[m],"onUpdate:modelValue":f=>a.value[m]=f,"config-key":m,"config-option":p},null,8,["modelValue","onUpdate:modelValue","config-key","config-option"])),[[X,!(p.flags&e(I).Hidden)]])),128))],2)):T("",!0)}}),ta="_authMechanismConfiguration_kpcpy_2",la={authMechanismConfiguration:ta},sa={$style:la},na=N(aa,[["__cssModules",sa]]),oa=O({__name:"BackendConfiguration",props:Y({configuration:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const a=B(s,"modelValue"),t=s;return Z(()=>t.configuration,()=>{for(const i in t.configuration)i in a.value||(a.value[i]=t.configuration[i]?.defaultValue??(t.configuration[i]?.type===he.Boolean?!1:""))},{immediate:!0}),(i,c)=>(u(),x("fieldset",{class:y(i.$style.backendConfiguration)},[b("legend",null,g(e(n)("files_external","Storage configuration")),1),(u(!0),x(M,null,q(s.configuration,(d,_)=>J((u(),h(ye,{key:d.value,modelValue:a.value[_],"onUpdate:modelValue":r=>a.value[_]=r,configKey:_,configOption:d},null,8,["modelValue","onUpdate:modelValue","configKey","configOption"])),[[X,!(d.flags&e(I).Hidden)]])),128))],2))}}),ia="_backendConfiguration_1sf6y_2",ra={backendConfiguration:ia},ua={$style:ra},da=N(oa,[["__cssModules",ua]]),{isAdmin:ca}=$("files_external","settings"),_a=Object.freeze({encrypt:!0,previews:!0,filesystem_check_changes:D.OncePerRequest,enable_sharing:!1,encoding_compatibility:!1,readonly:!1}),ue=Te("files_external--storages",()=>{const s=A([]),a=A([]);async function t(m){const f=P("apps/files_external/globalstorages"),{data:C}=await U.post(f,z(m),{confirmPassword:Q.Strict});s.value.push(G(C))}async function i(m){const f=P("apps/files_external/userstorages"),{data:C}=await U.post(f,z(m),{confirmPassword:Q.Strict});a.value.push(G(C))}async function c(m){await U.delete(o(m),{confirmPassword:Q.Strict}),m.type==="personal"?a.value=a.value.filter(f=>f.id!==m.id):s.value=s.value.filter(f=>f.id!==m.id)}async function d(m){const{data:f}=await U.put(o(m),z(m),{confirmPassword:Q.Strict});p(G(f))}async function _(m){const{data:f}=await U.get(o(m));p(G(f))}return l(),{globalStorages:s,userStorages:a,createGlobalStorage:t,createUserStorage:i,deleteStorage:c,reloadStorage:_,updateStorage:d};async function r(m){const f=`apps/files_external/${m}`,{data:C}=await U.get(P(f));return Object.values(C).map(G)}async function l(){xe(U),ca?s.value=await r("globalstorages"):(a.value=await r("userstorages"),s.value=await r("userglobalstorages"))}function o(m){const f=m.type==="personal"?"userstorages":"globalstorages";return P(`apps/files_external/${f}/${m.id}`)}function p(m){if(m.type==="personal"){const f=a.value.findIndex(C=>C.id===m.id);a.value.splice(f,1,m)}else{const f=s.value.findIndex(C=>C.id===m.id);s.value.splice(f,1,m)}}});function G(s){return{...s,mountOptions:Me(s.mountOptions)}}function Me(s){const a={...s};return a.encrypt=H(a.encrypt,!0),a.previews=H(a.previews,!0),a.enable_sharing=H(a.enable_sharing,!1),a.filesystem_check_changes=typeof a.filesystem_check_changes=="string"?Number.parseInt(a.filesystem_check_changes):a.filesystem_check_changes??D.Never,a.encoding_compatibility=H(a.encoding_compatibility,!1),a.readonly=H(a.readonly,!1),a}function H(s,a=!1){return s===void 0?a:s===!0||s==="true"||s==="1"}const pa=["id","aria-labelledby"],ma=O({__name:"MountOptions",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(s){const a=B(s,"modelValue");W(()=>{Object.keys(a.value).length===0&&(a.value=Me(a.value))});const{hasEncryption:t}=$("files_external","settings"),i=_e(),c=_e(),d=A(!1),_=[{label:n("files_external","Never"),value:D.Never},{label:n("files_external","Once every direct access"),value:D.OncePerRequest},{label:n("files_external","Always"),value:D.Always}],r=S({get(){return _.find(l=>l.value===a.value.filesystem_check_changes)},set(l){a.value.filesystem_check_changes=l?.value??D.OncePerRequest}});return(l,o)=>(u(),x("div",{class:y(l.$style.mountOptions)},[v(e(R),{id:e(i),"aria-controls":e(c),"aria-expanded":d.value,variant:"tertiary-no-background",onClick:o[0]||(o[0]=p=>d.value=!d.value)},{icon:w(()=>[v(e(j),{directional:"",path:d.value?e(Pe):e(Re)},null,8,["path"])]),default:w(()=>[V(" "+g(e(n)("files_external","Mount options")),1)]),_:1},8,["id","aria-controls","aria-expanded"]),J(b("fieldset",{id:e(c),class:y(l.$style.mountOptions__fieldset),"aria-labelledby":e(i)},[v(e(oe),{modelValue:r.value,"onUpdate:modelValue":o[1]||(o[1]=p=>r.value=p),inputLabel:e(n)("files_external","Check filesystem changes"),options:_},null,8,["modelValue","inputLabel"]),v(e(F),{modelValue:s.modelValue.readonly,"onUpdate:modelValue":o[2]||(o[2]=p=>s.modelValue.readonly=p),type:"switch"},{default:w(()=>[V(g(e(n)("files_external","Read only")),1)]),_:1},8,["modelValue"]),v(e(F),{modelValue:s.modelValue.previews,"onUpdate:modelValue":o[3]||(o[3]=p=>s.modelValue.previews=p),type:"switch"},{default:w(()=>[V(g(e(n)("files_external","Enable previews")),1)]),_:1},8,["modelValue"]),v(e(F),{modelValue:s.modelValue.enable_sharing,"onUpdate:modelValue":o[4]||(o[4]=p=>s.modelValue.enable_sharing=p),type:"switch"},{default:w(()=>[V(g(e(n)("files_external","Enable sharing")),1)]),_:1},8,["modelValue"]),e(t)?(u(),h(e(F),{key:0,modelValue:s.modelValue.encrypt,"onUpdate:modelValue":o[5]||(o[5]=p=>s.modelValue.encrypt=p),type:"switch"},{default:w(()=>[V(g(e(n)("files_external","Enable encryption")),1)]),_:1},8,["modelValue"])):T("",!0),v(e(F),{modelValue:s.modelValue.encoding_compatibility,"onUpdate:modelValue":o[6]||(o[6]=p=>s.modelValue.encoding_compatibility=p),type:"switch"},{default:w(()=>[V(g(e(n)("files_external","Compatibility with Mac NFD encoding (slow)")),1)]),_:1},8,["modelValue"])],10,pa),[[X,d.value]])],2))}}),fa="_mountOptions_1fqyb_2",ga="_mountOptions__fieldset_1fqyb_12",va={mountOptions:fa,mountOptions__fieldset:ga},ba={$style:va},ya=N(ma,[["__cssModules",ba]]),{isAdmin:le}=$("files_external","settings"),ha=$("files_external","allowedBackends"),me=$("files_external","backends").filter(s=>ha.includes(s.identifier)),xa=$("files_external","authMechanisms"),wa=O({__name:"AddExternalStorageDialog",props:Y({storage:{default:()=>({backendOptions:{},mountOptions:{..._a},type:le?"system":"personal"})}},{open:{type:Boolean,default:!0},openModifiers:{}}),emits:Y(["close"],["update:open"]),setup(s){const a=B(s,"open"),t=A(structuredClone(z(s.storage)));W(()=>{a.value&&(t.value=structuredClone(z(s.storage)))});const i=S(()=>we(t.value.applicableUsers,t.value.applicableGroups)),c=S({get(){return me.find(r=>r.identifier===t.value.backend)},set(r){t.value.backend=r?.identifier}}),d=S(()=>xa.filter(({scheme:r})=>c.value?.authSchemes[r])),_=S({get(){return d.value.find(r=>r.identifier===t.value.authMechanism)},set(r){t.value.authMechanism=r?.identifier}});return Z(d,()=>{d.value.length===1&&(t.value.authMechanism=d.value[0].identifier)}),(r,l)=>(u(),h(e(Qe),{open:a.value,"onUpdate:open":[l[9]||(l[9]=o=>a.value=o),l[11]||(l[11]=o=>o||r.$emit("close"))],isForm:"",contentClasses:r.$style.externalStorageDialog,name:t.value.id?e(n)("files_external","Edit storage"):e(n)("files_external","Add storage"),onSubmit:l[10]||(l[10]=o=>r.$emit("close",t.value))},{actions:w(()=>[s.storage.id?(u(),h(e(R),{key:0,onClick:l[8]||(l[8]=o=>r.$emit("close"))},{default:w(()=>[V(g(e(n)("files_external","Cancel")),1)]),_:1})):T("",!0),v(e(R),{variant:"primary",type:"submit"},{default:w(()=>[V(g(s.storage.id?e(n)("files_external","Edit"):e(n)("files_external","Create")),1)]),_:1})]),default:w(()=>[v(e(be),{modelValue:t.value.mountPoint,"onUpdate:modelValue":l[0]||(l[0]=o=>t.value.mountPoint=o),label:e(n)("files_external","Folder name"),required:""},null,8,["modelValue","label"]),v(ya,{modelValue:t.value.mountOptions,"onUpdate:modelValue":l[1]||(l[1]=o=>t.value.mountOptions=o)},null,8,["modelValue"]),e(le)?(u(),h(ea,{key:0,groups:t.value.applicableGroups,"onUpdate:groups":l[2]||(l[2]=o=>t.value.applicableGroups=o),users:t.value.applicableUsers,"onUpdate:users":l[3]||(l[3]=o=>t.value.applicableUsers=o),class:y(r.$style.externalStorageDialog__dropdown)},null,8,["groups","users","class"])):T("",!0),e(le)&&i.value?(u(),h(e(ne),{key:1,type:"info",text:e(n)("files_external","Without a restriction this storage is available to every account on this server.")},null,8,["text"])):T("",!0),v(e(oe),{modelValue:c.value,"onUpdate:modelValue":l[4]||(l[4]=o=>c.value=o),options:e(me),disabled:!!(t.value.id&&t.value.backend),inputLabel:e(n)("files_external","External storage"),class:y(r.$style.externalStorageDialog__dropdown),label:"name",required:""},null,8,["modelValue","options","disabled","inputLabel","class"]),v(e(oe),{modelValue:_.value,"onUpdate:modelValue":l[5]||(l[5]=o=>_.value=o),options:d.value,disabled:!t.value.backend||d.value.length<=1||!!(t.value.id&&t.value.authMechanism),inputLabel:e(n)("files_external","Authentication"),class:y(r.$style.externalStorageDialog__dropdown),label:"name",required:""},null,8,["modelValue","options","disabled","inputLabel","class"]),c.value&&t.value.backendOptions?(u(),h(da,{key:2,modelValue:t.value.backendOptions,"onUpdate:modelValue":l[6]||(l[6]=o=>t.value.backendOptions=o),class:y(r.$style.externalStorageDialog__configuration),configuration:c.value.configuration},null,8,["modelValue","class","configuration"])):T("",!0),_.value&&t.value.backendOptions?(u(),h(na,{key:3,modelValue:t.value.backendOptions,"onUpdate:modelValue":l[7]||(l[7]=o=>t.value.backendOptions=o),class:y(r.$style.externalStorageDialog__configuration),authMechanism:_.value},null,8,["modelValue","class","authMechanism"])):T("",!0)]),_:1},8,["open","contentClasses","name"]))}}),ka="_externalStorageDialog_l5jv4_2",Va="_externalStorageDialog__configuration_l5jv4_9",Sa="_externalStorageDialog__dropdown_l5jv4_13",Ca={externalStorageDialog:ka,externalStorageDialog__configuration:Va,externalStorageDialog__dropdown:Sa},Ma={$style:Ca},Ae=N(wa,[["__cssModules",Ma]]),Aa={class:"hidden-visually"},$a={key:0},Ua=O({__name:"ExternalStorageTableRow",props:{storage:{},isAdmin:{type:Boolean}},setup(s){const a=s,t=ue(),i=$("files_external","backends"),c=S(()=>i.find(k=>k.identifier===a.storage.backend).name),d=$("files_external","authMechanisms"),_=S(()=>d.find(k=>k.identifier===a.storage.authMechanism).name),r=A(!1),l=S(()=>{if(r.value)return{icon:"loading",label:n("files_external","Checking …")};const k=a.storage.status??L.Indeterminate,de=a.storage.statusMessage||Ye[k],E=Je[k],ce=k===L.NetworkError||k===L.Timeout,Ue=!ce&&k!==L.Success&&k!==L.Indeterminate;return{icon:E,label:de,isWarning:ce,isError:Ue}}),o=Ve(()=>a.storage.applicableUsers||[]),p=Se(()=>a.storage.applicableGroups||[]),m=S(()=>we(a.storage.applicableUsers,a.storage.applicableGroups));async function f(){await t.deleteStorage(a.storage)}async function C(){const k=await ze(Ae,{storage:a.storage});k&&await t.updateStorage(k)}async function $e(){r.value=!0;try{await t.reloadStorage(a.storage)}finally{r.value=!1}}return(k,de)=>(u(),x("tr",{class:y(k.$style.storageTableRow)},[b("td",null,[b("span",Aa,g(l.value.label),1),v(e(R),{"aria-label":e(n)("files_external","Recheck status"),title:l.value.label,variant:"tertiary-no-background",onClick:$e},{icon:w(()=>[l.value.icon==="loading"?(u(),h(e(ge),{key:0})):(u(),h(e(j),{key:1,class:y({[k.$style.storageTableRow__status_error]:l.value.isError,[k.$style.storageTableRow__status_warning]:l.value.isWarning}),path:l.value.icon},null,8,["class","path"]))]),_:1},8,["aria-label","title"])]),b("td",null,g(s.storage.mountPoint),1),b("td",null,g(c.value),1),b("td",null,g(_.value),1),s.isAdmin?(u(),x("td",$a,[b("div",{class:y(k.$style.storageTableRow__cellApplicable)},[m.value?(u(),h(e(pe),{key:0,iconPath:e(Fe),noClose:"",text:e(n)("files_external","All accounts")},null,8,["iconPath","text"])):T("",!0),(u(!0),x(M,null,q(e(p),E=>(u(),h(e(pe),{key:E.id,iconPath:e(je),noClose:"",text:E.displayName},null,8,["iconPath","text"]))),128)),(u(!0),x(M,null,q(e(o),E=>(u(),h(e(Ke),{key:E.user,displayName:E.displayName,size:24,user:E.user},null,8,["displayName","user"]))),128))],2)])):T("",!0),b("td",null,[s.isAdmin||s.storage.type==="personal"?(u(),x("div",{key:0,class:y(k.$style.storageTableRow__cellActions)},[v(e(R),{"aria-label":e(n)("files_external","Edit"),title:e(n)("files_external","Edit"),onClick:C},{icon:w(()=>[v(e(j),{path:e(De)},null,8,["path"])]),_:1},8,["aria-label","title"]),v(e(R),{"aria-label":e(n)("files_external","Delete"),title:e(n)("files_external","Delete"),variant:"error",onClick:f},{icon:w(()=>[v(e(j),{path:e(Be)},null,8,["path"])]),_:1},8,["aria-label","title"])],2)):(u(),h(e(j),{key:1,inline:"",path:e(Le),name:e(n)("files_external","System provided storage"),title:e(n)("files_external","System provided storage")},null,8,["path","name","title"]))])],2))}}),Ta="_storageTableRow__cellActions_goqfw_2",Oa="_storageTableRow__cellApplicable_goqfw_7",qa="_storageTableRow__status_warning_goqfw_17",Na="_storageTableRow__status_error_goqfw_21",Ea={storageTableRow__cellActions:Ta,storageTableRow__cellApplicable:Oa,storageTableRow__status_warning:qa,storageTableRow__status_error:Na},Pa={$style:Ea},Ra=N(Ua,[["__cssModules",Pa]]),Fa=["aria-label"],ja={class:"hidden-visually"},Da={key:0},Ba={class:"hidden-visually"},La=O({__name:"ExternalStorageTable",setup(s){const a=ue(),{isAdmin:t}=$("files_external","settings"),i=S(()=>t?a.globalStorages:[...a.userStorages,...a.globalStorages]);return(c,d)=>(u(),x("table",{class:y(c.$style.storageTable),"aria-label":e(n)("files_external","External storages")},[b("thead",{class:y(c.$style.storageTable__header)},[b("tr",null,[b("th",{class:y(c.$style.storageTable__headerStatus)},[b("span",ja,g(e(n)("files_external","Status")),1)],2),b("th",{class:y(c.$style.storageTable__headerFolder)},g(e(n)("files_external","Folder name")),3),b("th",{class:y(c.$style.storageTable__headerBackend)},g(e(n)("files_external","External storage")),3),b("th",{class:y(c.$style.storageTable__headerAuthentication)},g(e(n)("files_external","Authentication")),3),e(t)?(u(),x("th",Da,g(e(n)("files_external","Restricted to")),1)):T("",!0),b("th",{class:y(c.$style.storageTable__headerActions)},[b("span",Ba,g(e(n)("files_external","Actions")),1)],2)])],2),b("tbody",null,[(u(!0),x(M,null,q(i.value,_=>(u(),h(Ra,{key:_.id,isAdmin:e(t),storage:_},null,8,["isAdmin","storage"]))),128))])],10,Fa))}}),Ga="_storageTable_1dqte_2",Ha="_storageTable__header_1dqte_11",Ia="_storageTable__headerStatus_1dqte_16",Qa="_storageTable__headerFolder_1dqte_20",za="_storageTable__headerBackend_1dqte_24",Za="_storageTable__headerFAuthentication_1dqte_28",Wa="_storageTable__headerActions_1dqte_32",Ka={storageTable:Ga,storageTable__header:Ha,storageTable__headerStatus:Ia,storageTable__headerFolder:Qa,storageTable__headerBackend:za,storageTable__headerFAuthentication:Za,storageTable__headerActions:Wa},Ya={$style:Ka},Ja=N(La,[["__cssModules",Ya]]),Xa=O({__name:"UserMountSettings",setup(s){const a=$("files_external","user-mounting"),t=$("files_external","backends").filter(d=>d.identifier!=="local"),i=A(a.allowUserMounting),c=A(a.allowedBackends);return Z(i,()=>{const d=!i.value;window.OCP.AppConfig.setValue("files_external","allow_user_mounting",i.value?"yes":"no",{success:()=>re(n("files_external","Saved")),error:()=>{i.value=d,ie(n("files_external","Error while saving"))}})}),Z(c,(d,_)=>{window.OCP.AppConfig.setValue("files_external","user_mounting_backends",d.join(","),{success:()=>re(n("files_external","Saved allowed backends")),error:()=>{ie(n("files_external","Failed to save allowed backends")),c.value=_}})}),(d,_)=>(u(),x("form",null,[b("h3",{class:y(d.$style.userMountSettings__heading)},g(e(n)("files_external","Advanced options for external storage mounts")),3),v(e(F),{modelValue:i.value,"onUpdate:modelValue":_[0]||(_[0]=r=>i.value=r),type:"switch"},{default:w(()=>[V(g(e(n)("files_external","Allow people to mount external storage")),1)]),_:1},8,["modelValue"]),J(b("fieldset",{class:y(d.$style.userMountSettings__backends)},[b("legend",null,g(e(n)("files_external","External storage backends people are allowed to mount")),1),(u(!0),x(M,null,q(e(t),r=>(u(),h(e(F),{key:r.identifier,modelValue:c.value,"onUpdate:modelValue":_[1]||(_[1]=l=>c.value=l),value:r.identifier,name:"allowUserMountingBackends[]"},{default:w(()=>[V(g(r.name),1)]),_:2},1032,["modelValue","value"]))),128))],2),[[X,i.value]])]))}}),et="_userMountSettings__heading_59moz_2",at="_userMountSettings__backends_59moz_9",tt={userMountSettings__heading:et,userMountSettings__backends:at},lt={$style:tt},st=N(Xa,[["__cssModules",lt]]);const nt=["aria-label"],ot=O({__name:"ExternalStoragesSection",setup(s){const a=$("files_external","settings",{docUrl:"",dependencyIssues:{messages:null,modules:null},isAdmin:!1}),t=ue(),i=a.dependencyIssues?.messages??[],c=a.dependencyIssues?.modules??{},d=A(!1),_=A();async function r(l){if(d.value=!1,!!l)try{a.isAdmin?await t.createGlobalStorage(l):await t.createUserStorage(l),_.value=void 0}catch(o){ke.error("Failed to add external storage",{error:o,storage:l}),_.value={...l},d.value=!0}}return(l,o)=>(u(),h(e(ve),{docUrl:e(a).docUrl,name:e(n)("files_external","External storage"),description:e(n)("files_external","External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices.")+(e(a).isAdmin?" "+e(n)("files_external","You may also allow people to mount their own external storage services."):"")},{default:w(()=>[(u(!0),x(M,null,q(e(i),(p,m)=>(u(),h(e(ne),{key:m,type:"error"},{default:w(()=>[V(g(p),1)]),_:2},1024))),128)),(u(!0),x(M,null,q(e(c),(p,m)=>(u(),h(e(ne),{key:m,type:"warning"},{default:w(()=>[b("p",null,[m==="curl"?(u(),x(M,{key:0},[V(g(e(n)("files_external","The cURL support in PHP is not enabled or installed.")),1)],64)):m==="ftp"?(u(),x(M,{key:1},[V(g(e(n)("files_external","The FTP support in PHP is not enabled or installed.")),1)],64)):(u(),x(M,{key:2},[V(g(e(n)("files_external","{module} is not installed.",{module:m})),1)],64)),V(" "+g(e(He)("files_external","Please ask your system administrator to install it as otherwise mounting the following backend is not possible:","Please ask your system administrator to install it as otherwise mounting the following backends is not possible:",p.length)),1)]),b("ul",{class:y(l.$style.externalStoragesSection__dependantList),"aria-label":e(n)("files_external","Dependant backends")},[(u(!0),x(M,null,q(p,f=>(u(),x("li",{key:f},g(f),1))),128))],10,nt)]),_:2},1024))),128)),T("",!0),v(Ja),v(e(R),{class:y(l.$style.externalStoragesSection__newStorageButton),variant:"primary",onClick:o[0]||(o[0]=p=>d.value=!d.value)},{icon:w(()=>[v(e(j),{path:e(Ge)},null,8,["path"])]),default:w(()=>[V(" "+g(e(n)("files_external","Add external storage")),1)]),_:1},8,["class"]),v(Ae,{open:d.value,"onUpdate:open":o[1]||(o[1]=p=>d.value=p),storage:_.value,onClose:r},null,8,["open","storage"]),e(a).isAdmin?(u(),h(st,{key:1})):T("",!0)]),_:1},8,["docUrl","name","description"]))}}),it="_externalStoragesSection__dependantList_atsmn_2",rt="_externalStoragesSection__newStorageButton_atsmn_7",ut={externalStoragesSection__dependantList:it,externalStoragesSection__newStorageButton:rt},dt={$style:ut},ct=N(ot,[["__cssModules",dt]]),_t=O({__name:"GlobalCredentialsSection",setup(s){const a=$("files_external","global-credentials"),t=A(!1),i=A(a.user),c=A(a.password);xe(U);async function d(){try{t.value=!0;const{data:_}=await U.post(P("apps/files_external/globalcredentials"),{uid:a.uid,user:i.value,password:c.value},{confirmPassword:Q.Strict});if(_){re(n("files_external","Global credentials saved"));return}}catch(_){ke.error(_)}finally{t.value=!1}ie(n("files_external","Could not save global credentials")),i.value=a.user,c.value=a.password}return(_,r)=>(u(),h(e(ve),{name:e(n)("files_external","Global credentials"),description:e(n)("files_external","Global credentials can be used to authenticate with multiple external storages that have the same credentials.")},{default:w(()=>[b("form",{id:"global_credentials",class:y(_.$style.globalCredentialsSectionForm),autocomplete:"false",onSubmit:Ne(d,["prevent"])},[v(e(be),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=l=>i.value=l),name:"username",autocomplete:"false",label:e(n)("files_external","Login")},null,8,["modelValue","label"]),v(e(We),{modelValue:c.value,"onUpdate:modelValue":r[1]||(r[1]=l=>c.value=l),name:"password",autocomplete:"false",label:e(n)("files_external","Password")},null,8,["modelValue","label"]),v(e(R),{class:y(_.$style.globalCredentialsSectionForm__submit),disabled:t.value,variant:"primary",type:"submit"},{default:w(()=>[V(g(t.value?e(n)("files_external","Saving …"):e(n)("files_external","Save")),1)]),_:1},8,["class","disabled"])],34)]),_:1},8,["name","description"]))}}),pt="_globalCredentialsSectionForm_bgjv2_2",mt="_globalCredentialsSectionForm__submit_bgjv2_10",ft={globalCredentialsSectionForm:pt,globalCredentialsSectionForm__submit:mt},gt={$style:ft},vt=N(_t,[["__cssModules",gt]]),bt=O({__name:"FilesExternalSettings",setup(s){return(a,t)=>(u(),x(M,null,[v(ct),v(vt)],64))}}),yt=Oe(),se=Ee(bt);se.config.idPrefix="files-external",se.use(yt),se.mount("#files-external"); +import{d as Te,c as Oe}from"./pinia-Ccd8xxFH.chunk.mjs";import{a3 as W,a0 as K,G as fe,p as S,b as O,q as B,o as u,c as h,u as e,r as A,v as Z,j as x,n as y,k as b,t as g,F as M,E as qe,A as q,Z as J,_ as X,m as T,z as Y,O as z,$ as _e,e as v,w,g as V,C as Ne,h as Ee}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{N as ge,l as Pe,n as Re,o as Fe,p as je,q as De,f as Be,r as Le,e as Ge}from"./mdi-CYMOyMtM.chunk.mjs";import{a as N,l as $}from"./index-C3KLQ_oe.chunk.mjs";import{t as n,b as He}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{N as R}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./Plus-gXjhFOHV.chunk.mjs";import{N as j}from"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import{N as ne}from"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import{N as ve}from"./ContentCopy-DvmnNVoZ.chunk.mjs";import{d as Ie,N as Qe,s as ze}from"./index-CO7ZwNPX.chunk.mjs";import{N as oe}from"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import{_ as be}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import{c as U}from"./index-9ZBo3L67.chunk.mjs";import{b as P}from"./index-DgEyzq8A.chunk.mjs";import{N as Ze}from"./index-COiwHfFG.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./NcRichText-BO_4KtBA-DXDa2H1Y.chunk.mjs";import{N as F}from"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import{N as pe}from"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";/* empty css */import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import{N as We}from"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./index-CuPuSdF1.chunk.mjs";import{N as Ke}from"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import{C as ye}from"./AuthMechanismRsa-DiZqNNSC.chunk.mjs";import{C as I,a as he,M as D,S as L,b as Ye,c as Je}from"./types-CnbnigDb.chunk.mjs";import{a as xe,P as Q}from"./index-CaHqqZcX.chunk.mjs";import{c as we}from"./externalStorageUtils-BzJyVKar.chunk.mjs";import{a as ie,d as re}from"./index-WQvok30H.chunk.mjs";import{l as ke}from"./logger-DTrLKxyb.chunk.mjs";import"./index-sH3U_332.chunk.mjs";const Xe='',ee=fe(new Map),ae=fe(new Map),te=new Set;function Ve(s){const a=S(()=>K(s).map(t=>({id:`user:${t}`,user:t,displayName:ee.get(t)||t})));return W(async()=>{const t=K(s).filter(i=>!ee.has(i));if(t.length>0){const{data:i}=await U.post(P("/displaynames"),{users:t});for(const[c,d]of Object.entries(i.users))ee.set(c,d)}}),a}function Se(s){const a=S(()=>K(s).map(t=>Ce(t,ae.get(t))));return W(async()=>{const t=K(s).filter(i=>!ae.has(i)&&!te.has(i));t.forEach(i=>te.add(i));for(const i of t)try{const{data:c}=await U.get(P("apps/files_external/ajax/applicable"),{params:{pattern:i,limit:50}});ae.set(i,c.groups[i]??i)}finally{te.delete(i)}}),a}function Ce(s,a){return{id:s,isNoUser:!0,displayName:a||s,iconSvg:Xe}}const ea=O({__name:"ApplicableEntities",props:{groups:{default:()=>[]},groupsModifiers:{},users:{default:()=>[]},usersModifiers:{}},emits:["update:groups","update:users"],setup(s){const a=B(s,"groups"),t=B(s,"users"),i=A([]),c=Ve(t),d=Se(a),_=S({get(){return[...d.value,...c.value]},set(o){t.value=o.filter(p=>p.user).map(p=>p.user),a.value=o.filter(p=>p.isNoUser).map(p=>p.id)}}),r=Ie(l,500);async function l(o){const{data:p}=await U.get(P("apps/files_external/ajax/applicable"),{params:{pattern:o,limit:20}}),m=[...i.value.map(f=>[f.id,f]),...Object.entries(p.groups).map(([f,C])=>[f,{...Ce(f),displayName:C}]),...Object.entries(p.users).map(([f,C])=>[`user:${f}`,{id:`user:${f}`,user:f,displayName:C}])];i.value=[...new Map(m).values()]}return(o,p)=>(u(),h(e(Ze),{modelValue:_.value,"onUpdate:modelValue":p[0]||(p[0]=m=>_.value=m),keepOpen:"",multiple:"",options:i.value,inputLabel:e(n)("files_external","Restrict to"),onSearch:e(r)},null,8,["modelValue","options","inputLabel","onSearch"]))}}),aa=O({__name:"AuthMechanismConfiguration",props:Y({authMechanism:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const a=B(s,"modelValue"),t=s,i=S(()=>{if(!t.authMechanism.configuration)return;const l=Object.entries(t.authMechanism.configuration).filter(([,o])=>!(o.flags&I.UserProvided));return Object.fromEntries(l)}),c=S(()=>window.OCA.FilesExternal.AuthMechanism.getHandler(t.authMechanism)),d=S(()=>{if(!i.value)return!1;for(const l of Object.values(i.value))if(!(l.flags&I.Hidden||l.flags&I.UserProvided))return!0;return!1}),_=A(!1);W(async()=>{c.value&&(_.value=!0,await window.customElements.whenDefined(c.value.tagName),_.value=!1)}),Z(i,()=>{for(const l in i.value)l in a.value||(a.value[l]=i.value[l]?.type===he.Boolean?!1:"")});function r(l){const o=[l.detail].flat()[0];a.value={...a.value,...o}}return(l,o)=>d.value?(u(),x("fieldset",{key:0,class:y(l.$style.authMechanismConfiguration)},[b("legend",null,g(e(n)("files_external","Authentication")),1),c.value?(u(),x(M,{key:0},[_.value?(u(),h(e(ge),{key:0})):(u(),h(qe(c.value.tagName),{key:1,".modelValue":a.value,".authMechanism":s.authMechanism,"onUpdate:modelValue":r},null,40,[".modelValue",".authMechanism"]))],64)):(u(!0),x(M,{key:1},q(i.value,(p,m)=>J((u(),h(ye,{key:p.value,modelValue:a.value[m],"onUpdate:modelValue":f=>a.value[m]=f,"config-key":m,"config-option":p},null,8,["modelValue","onUpdate:modelValue","config-key","config-option"])),[[X,!(p.flags&e(I).Hidden)]])),128))],2)):T("",!0)}}),ta="_authMechanismConfiguration_kpcpy_2",la={authMechanismConfiguration:ta},sa={$style:la},na=N(aa,[["__cssModules",sa]]),oa=O({__name:"BackendConfiguration",props:Y({configuration:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const a=B(s,"modelValue"),t=s;return Z(()=>t.configuration,()=>{for(const i in t.configuration)i in a.value||(a.value[i]=t.configuration[i]?.defaultValue??(t.configuration[i]?.type===he.Boolean?!1:""))},{immediate:!0}),(i,c)=>(u(),x("fieldset",{class:y(i.$style.backendConfiguration)},[b("legend",null,g(e(n)("files_external","Storage configuration")),1),(u(!0),x(M,null,q(s.configuration,(d,_)=>J((u(),h(ye,{key:d.value,modelValue:a.value[_],"onUpdate:modelValue":r=>a.value[_]=r,configKey:_,configOption:d},null,8,["modelValue","onUpdate:modelValue","configKey","configOption"])),[[X,!(d.flags&e(I).Hidden)]])),128))],2))}}),ia="_backendConfiguration_1sf6y_2",ra={backendConfiguration:ia},ua={$style:ra},da=N(oa,[["__cssModules",ua]]),{isAdmin:ca}=$("files_external","settings"),_a=Object.freeze({encrypt:!0,previews:!0,filesystem_check_changes:D.OncePerRequest,enable_sharing:!1,encoding_compatibility:!1,readonly:!1}),ue=Te("files_external--storages",()=>{const s=A([]),a=A([]);async function t(m){const f=P("apps/files_external/globalstorages"),{data:C}=await U.post(f,z(m),{confirmPassword:Q.Strict});s.value.push(G(C))}async function i(m){const f=P("apps/files_external/userstorages"),{data:C}=await U.post(f,z(m),{confirmPassword:Q.Strict});a.value.push(G(C))}async function c(m){await U.delete(o(m),{confirmPassword:Q.Strict}),m.type==="personal"?a.value=a.value.filter(f=>f.id!==m.id):s.value=s.value.filter(f=>f.id!==m.id)}async function d(m){const{data:f}=await U.put(o(m),z(m),{confirmPassword:Q.Strict});p(G(f))}async function _(m){const{data:f}=await U.get(o(m));p(G(f))}return l(),{globalStorages:s,userStorages:a,createGlobalStorage:t,createUserStorage:i,deleteStorage:c,reloadStorage:_,updateStorage:d};async function r(m){const f=`apps/files_external/${m}`,{data:C}=await U.get(P(f));return Object.values(C).map(G)}async function l(){xe(U),ca?s.value=await r("globalstorages"):(a.value=await r("userstorages"),s.value=await r("userglobalstorages"))}function o(m){const f=m.type==="personal"?"userstorages":"globalstorages";return P(`apps/files_external/${f}/${m.id}`)}function p(m){if(m.type==="personal"){const f=a.value.findIndex(C=>C.id===m.id);a.value.splice(f,1,m)}else{const f=s.value.findIndex(C=>C.id===m.id);s.value.splice(f,1,m)}}});function G(s){return{...s,mountOptions:Me(s.mountOptions)}}function Me(s){const a={...s};return a.encrypt=H(a.encrypt,!0),a.previews=H(a.previews,!0),a.enable_sharing=H(a.enable_sharing,!1),a.filesystem_check_changes=typeof a.filesystem_check_changes=="string"?Number.parseInt(a.filesystem_check_changes):a.filesystem_check_changes??D.Never,a.encoding_compatibility=H(a.encoding_compatibility,!1),a.readonly=H(a.readonly,!1),a}function H(s,a=!1){return s===void 0?a:s===!0||s==="true"||s==="1"}const pa=["id","aria-labelledby"],ma=O({__name:"MountOptions",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(s){const a=B(s,"modelValue");W(()=>{Object.keys(a.value).length===0&&(a.value=Me(a.value))});const{hasEncryption:t}=$("files_external","settings"),i=_e(),c=_e(),d=A(!1),_=[{label:n("files_external","Never"),value:D.Never},{label:n("files_external","Once every direct access"),value:D.OncePerRequest},{label:n("files_external","Always"),value:D.Always}],r=S({get(){return _.find(l=>l.value===a.value.filesystem_check_changes)},set(l){a.value.filesystem_check_changes=l?.value??D.OncePerRequest}});return(l,o)=>(u(),x("div",{class:y(l.$style.mountOptions)},[v(e(R),{id:e(i),"aria-controls":e(c),"aria-expanded":d.value,variant:"tertiary-no-background",onClick:o[0]||(o[0]=p=>d.value=!d.value)},{icon:w(()=>[v(e(j),{directional:"",path:d.value?e(Pe):e(Re)},null,8,["path"])]),default:w(()=>[V(" "+g(e(n)("files_external","Mount options")),1)]),_:1},8,["id","aria-controls","aria-expanded"]),J(b("fieldset",{id:e(c),class:y(l.$style.mountOptions__fieldset),"aria-labelledby":e(i)},[v(e(oe),{modelValue:r.value,"onUpdate:modelValue":o[1]||(o[1]=p=>r.value=p),inputLabel:e(n)("files_external","Check filesystem changes"),options:_},null,8,["modelValue","inputLabel"]),v(e(F),{modelValue:s.modelValue.readonly,"onUpdate:modelValue":o[2]||(o[2]=p=>s.modelValue.readonly=p),type:"switch"},{default:w(()=>[V(g(e(n)("files_external","Read only")),1)]),_:1},8,["modelValue"]),v(e(F),{modelValue:s.modelValue.previews,"onUpdate:modelValue":o[3]||(o[3]=p=>s.modelValue.previews=p),type:"switch"},{default:w(()=>[V(g(e(n)("files_external","Enable previews")),1)]),_:1},8,["modelValue"]),v(e(F),{modelValue:s.modelValue.enable_sharing,"onUpdate:modelValue":o[4]||(o[4]=p=>s.modelValue.enable_sharing=p),type:"switch"},{default:w(()=>[V(g(e(n)("files_external","Enable sharing")),1)]),_:1},8,["modelValue"]),e(t)?(u(),h(e(F),{key:0,modelValue:s.modelValue.encrypt,"onUpdate:modelValue":o[5]||(o[5]=p=>s.modelValue.encrypt=p),type:"switch"},{default:w(()=>[V(g(e(n)("files_external","Enable encryption")),1)]),_:1},8,["modelValue"])):T("",!0),v(e(F),{modelValue:s.modelValue.encoding_compatibility,"onUpdate:modelValue":o[6]||(o[6]=p=>s.modelValue.encoding_compatibility=p),type:"switch"},{default:w(()=>[V(g(e(n)("files_external","Compatibility with Mac NFD encoding (slow)")),1)]),_:1},8,["modelValue"])],10,pa),[[X,d.value]])],2))}}),fa="_mountOptions_1fqyb_2",ga="_mountOptions__fieldset_1fqyb_12",va={mountOptions:fa,mountOptions__fieldset:ga},ba={$style:va},ya=N(ma,[["__cssModules",ba]]),{isAdmin:le}=$("files_external","settings"),ha=$("files_external","allowedBackends"),me=$("files_external","backends").filter(s=>ha.includes(s.identifier)),xa=$("files_external","authMechanisms"),wa=O({__name:"AddExternalStorageDialog",props:Y({storage:{default:()=>({backendOptions:{},mountOptions:{..._a},type:le?"system":"personal"})}},{open:{type:Boolean,default:!0},openModifiers:{}}),emits:Y(["close"],["update:open"]),setup(s){const a=B(s,"open"),t=A(structuredClone(z(s.storage)));W(()=>{a.value&&(t.value=structuredClone(z(s.storage)))});const i=S(()=>we(t.value.applicableUsers,t.value.applicableGroups)),c=S({get(){return me.find(r=>r.identifier===t.value.backend)},set(r){t.value.backend=r?.identifier}}),d=S(()=>xa.filter(({scheme:r})=>c.value?.authSchemes[r])),_=S({get(){return d.value.find(r=>r.identifier===t.value.authMechanism)},set(r){t.value.authMechanism=r?.identifier}});return Z(d,()=>{d.value.length===1&&(t.value.authMechanism=d.value[0].identifier)}),(r,l)=>(u(),h(e(Qe),{open:a.value,"onUpdate:open":[l[9]||(l[9]=o=>a.value=o),l[11]||(l[11]=o=>o||r.$emit("close"))],isForm:"",contentClasses:r.$style.externalStorageDialog,name:t.value.id?e(n)("files_external","Edit storage"):e(n)("files_external","Add storage"),onSubmit:l[10]||(l[10]=o=>r.$emit("close",t.value))},{actions:w(()=>[s.storage.id?(u(),h(e(R),{key:0,onClick:l[8]||(l[8]=o=>r.$emit("close"))},{default:w(()=>[V(g(e(n)("files_external","Cancel")),1)]),_:1})):T("",!0),v(e(R),{variant:"primary",type:"submit"},{default:w(()=>[V(g(s.storage.id?e(n)("files_external","Edit"):e(n)("files_external","Create")),1)]),_:1})]),default:w(()=>[v(e(be),{modelValue:t.value.mountPoint,"onUpdate:modelValue":l[0]||(l[0]=o=>t.value.mountPoint=o),label:e(n)("files_external","Folder name"),required:""},null,8,["modelValue","label"]),v(ya,{modelValue:t.value.mountOptions,"onUpdate:modelValue":l[1]||(l[1]=o=>t.value.mountOptions=o)},null,8,["modelValue"]),e(le)?(u(),h(ea,{key:0,groups:t.value.applicableGroups,"onUpdate:groups":l[2]||(l[2]=o=>t.value.applicableGroups=o),users:t.value.applicableUsers,"onUpdate:users":l[3]||(l[3]=o=>t.value.applicableUsers=o),class:y(r.$style.externalStorageDialog__dropdown)},null,8,["groups","users","class"])):T("",!0),e(le)&&i.value?(u(),h(e(ne),{key:1,type:"info",text:e(n)("files_external","Without a restriction this storage is available to every account on this server.")},null,8,["text"])):T("",!0),v(e(oe),{modelValue:c.value,"onUpdate:modelValue":l[4]||(l[4]=o=>c.value=o),options:e(me),disabled:!!(t.value.id&&t.value.backend),inputLabel:e(n)("files_external","External storage"),class:y(r.$style.externalStorageDialog__dropdown),label:"name",required:""},null,8,["modelValue","options","disabled","inputLabel","class"]),v(e(oe),{modelValue:_.value,"onUpdate:modelValue":l[5]||(l[5]=o=>_.value=o),options:d.value,disabled:!t.value.backend||d.value.length<=1||!!(t.value.id&&t.value.authMechanism),inputLabel:e(n)("files_external","Authentication"),class:y(r.$style.externalStorageDialog__dropdown),label:"name",required:""},null,8,["modelValue","options","disabled","inputLabel","class"]),c.value&&t.value.backendOptions?(u(),h(da,{key:2,modelValue:t.value.backendOptions,"onUpdate:modelValue":l[6]||(l[6]=o=>t.value.backendOptions=o),class:y(r.$style.externalStorageDialog__configuration),configuration:c.value.configuration},null,8,["modelValue","class","configuration"])):T("",!0),_.value&&t.value.backendOptions?(u(),h(na,{key:3,modelValue:t.value.backendOptions,"onUpdate:modelValue":l[7]||(l[7]=o=>t.value.backendOptions=o),class:y(r.$style.externalStorageDialog__configuration),authMechanism:_.value},null,8,["modelValue","class","authMechanism"])):T("",!0)]),_:1},8,["open","contentClasses","name"]))}}),ka="_externalStorageDialog_l5jv4_2",Va="_externalStorageDialog__configuration_l5jv4_9",Sa="_externalStorageDialog__dropdown_l5jv4_13",Ca={externalStorageDialog:ka,externalStorageDialog__configuration:Va,externalStorageDialog__dropdown:Sa},Ma={$style:Ca},Ae=N(wa,[["__cssModules",Ma]]),Aa={class:"hidden-visually"},$a={key:0},Ua=O({__name:"ExternalStorageTableRow",props:{storage:{},isAdmin:{type:Boolean}},setup(s){const a=s,t=ue(),i=$("files_external","backends"),c=S(()=>i.find(k=>k.identifier===a.storage.backend).name),d=$("files_external","authMechanisms"),_=S(()=>d.find(k=>k.identifier===a.storage.authMechanism).name),r=A(!1),l=S(()=>{if(r.value)return{icon:"loading",label:n("files_external","Checking …")};const k=a.storage.status??L.Indeterminate,de=a.storage.statusMessage||Ye[k],E=Je[k],ce=k===L.NetworkError||k===L.Timeout,Ue=!ce&&k!==L.Success&&k!==L.Indeterminate;return{icon:E,label:de,isWarning:ce,isError:Ue}}),o=Ve(()=>a.storage.applicableUsers||[]),p=Se(()=>a.storage.applicableGroups||[]),m=S(()=>we(a.storage.applicableUsers,a.storage.applicableGroups));async function f(){await t.deleteStorage(a.storage)}async function C(){const k=await ze(Ae,{storage:a.storage});k&&await t.updateStorage(k)}async function $e(){r.value=!0;try{await t.reloadStorage(a.storage)}finally{r.value=!1}}return(k,de)=>(u(),x("tr",{class:y(k.$style.storageTableRow)},[b("td",null,[b("span",Aa,g(l.value.label),1),v(e(R),{"aria-label":e(n)("files_external","Recheck status"),title:l.value.label,variant:"tertiary-no-background",onClick:$e},{icon:w(()=>[l.value.icon==="loading"?(u(),h(e(ge),{key:0})):(u(),h(e(j),{key:1,class:y({[k.$style.storageTableRow__status_error]:l.value.isError,[k.$style.storageTableRow__status_warning]:l.value.isWarning}),path:l.value.icon},null,8,["class","path"]))]),_:1},8,["aria-label","title"])]),b("td",null,g(s.storage.mountPoint),1),b("td",null,g(c.value),1),b("td",null,g(_.value),1),s.isAdmin?(u(),x("td",$a,[b("div",{class:y(k.$style.storageTableRow__cellApplicable)},[m.value?(u(),h(e(pe),{key:0,iconPath:e(Fe),noClose:"",text:e(n)("files_external","All accounts")},null,8,["iconPath","text"])):T("",!0),(u(!0),x(M,null,q(e(p),E=>(u(),h(e(pe),{key:E.id,iconPath:e(je),noClose:"",text:E.displayName},null,8,["iconPath","text"]))),128)),(u(!0),x(M,null,q(e(o),E=>(u(),h(e(Ke),{key:E.user,displayName:E.displayName,size:24,user:E.user},null,8,["displayName","user"]))),128))],2)])):T("",!0),b("td",null,[s.isAdmin||s.storage.type==="personal"?(u(),x("div",{key:0,class:y(k.$style.storageTableRow__cellActions)},[v(e(R),{"aria-label":e(n)("files_external","Edit"),title:e(n)("files_external","Edit"),onClick:C},{icon:w(()=>[v(e(j),{path:e(De)},null,8,["path"])]),_:1},8,["aria-label","title"]),v(e(R),{"aria-label":e(n)("files_external","Delete"),title:e(n)("files_external","Delete"),variant:"error",onClick:f},{icon:w(()=>[v(e(j),{path:e(Be)},null,8,["path"])]),_:1},8,["aria-label","title"])],2)):(u(),h(e(j),{key:1,inline:"",path:e(Le),name:e(n)("files_external","System provided storage"),title:e(n)("files_external","System provided storage")},null,8,["path","name","title"]))])],2))}}),Ta="_storageTableRow__cellActions_goqfw_2",Oa="_storageTableRow__cellApplicable_goqfw_7",qa="_storageTableRow__status_warning_goqfw_17",Na="_storageTableRow__status_error_goqfw_21",Ea={storageTableRow__cellActions:Ta,storageTableRow__cellApplicable:Oa,storageTableRow__status_warning:qa,storageTableRow__status_error:Na},Pa={$style:Ea},Ra=N(Ua,[["__cssModules",Pa]]),Fa=["aria-label"],ja={class:"hidden-visually"},Da={key:0},Ba={class:"hidden-visually"},La=O({__name:"ExternalStorageTable",setup(s){const a=ue(),{isAdmin:t}=$("files_external","settings"),i=S(()=>t?a.globalStorages:[...a.userStorages,...a.globalStorages]);return(c,d)=>(u(),x("table",{class:y(c.$style.storageTable),"aria-label":e(n)("files_external","External storages")},[b("thead",{class:y(c.$style.storageTable__header)},[b("tr",null,[b("th",{class:y(c.$style.storageTable__headerStatus)},[b("span",ja,g(e(n)("files_external","Status")),1)],2),b("th",{class:y(c.$style.storageTable__headerFolder)},g(e(n)("files_external","Folder name")),3),b("th",{class:y(c.$style.storageTable__headerBackend)},g(e(n)("files_external","External storage")),3),b("th",{class:y(c.$style.storageTable__headerAuthentication)},g(e(n)("files_external","Authentication")),3),e(t)?(u(),x("th",Da,g(e(n)("files_external","Restricted to")),1)):T("",!0),b("th",{class:y(c.$style.storageTable__headerActions)},[b("span",Ba,g(e(n)("files_external","Actions")),1)],2)])],2),b("tbody",null,[(u(!0),x(M,null,q(i.value,_=>(u(),h(Ra,{key:_.id,isAdmin:e(t),storage:_},null,8,["isAdmin","storage"]))),128))])],10,Fa))}}),Ga="_storageTable_1dqte_2",Ha="_storageTable__header_1dqte_11",Ia="_storageTable__headerStatus_1dqte_16",Qa="_storageTable__headerFolder_1dqte_20",za="_storageTable__headerBackend_1dqte_24",Za="_storageTable__headerFAuthentication_1dqte_28",Wa="_storageTable__headerActions_1dqte_32",Ka={storageTable:Ga,storageTable__header:Ha,storageTable__headerStatus:Ia,storageTable__headerFolder:Qa,storageTable__headerBackend:za,storageTable__headerFAuthentication:Za,storageTable__headerActions:Wa},Ya={$style:Ka},Ja=N(La,[["__cssModules",Ya]]),Xa=O({__name:"UserMountSettings",setup(s){const a=$("files_external","user-mounting"),t=$("files_external","backends").filter(d=>d.identifier!=="local"),i=A(a.allowUserMounting),c=A(a.allowedBackends);return Z(i,()=>{const d=!i.value;window.OCP.AppConfig.setValue("files_external","allow_user_mounting",i.value?"yes":"no",{success:()=>re(n("files_external","Saved")),error:()=>{i.value=d,ie(n("files_external","Error while saving"))}})}),Z(c,(d,_)=>{window.OCP.AppConfig.setValue("files_external","user_mounting_backends",d.join(","),{success:()=>re(n("files_external","Saved allowed backends")),error:()=>{ie(n("files_external","Failed to save allowed backends")),c.value=_}})}),(d,_)=>(u(),x("form",null,[b("h3",{class:y(d.$style.userMountSettings__heading)},g(e(n)("files_external","Advanced options for external storage mounts")),3),v(e(F),{modelValue:i.value,"onUpdate:modelValue":_[0]||(_[0]=r=>i.value=r),type:"switch"},{default:w(()=>[V(g(e(n)("files_external","Allow people to mount external storage")),1)]),_:1},8,["modelValue"]),J(b("fieldset",{class:y(d.$style.userMountSettings__backends)},[b("legend",null,g(e(n)("files_external","External storage backends people are allowed to mount")),1),(u(!0),x(M,null,q(e(t),r=>(u(),h(e(F),{key:r.identifier,modelValue:c.value,"onUpdate:modelValue":_[1]||(_[1]=l=>c.value=l),value:r.identifier,name:"allowUserMountingBackends[]"},{default:w(()=>[V(g(r.name),1)]),_:2},1032,["modelValue","value"]))),128))],2),[[X,i.value]])]))}}),et="_userMountSettings__heading_59moz_2",at="_userMountSettings__backends_59moz_9",tt={userMountSettings__heading:et,userMountSettings__backends:at},lt={$style:tt},st=N(Xa,[["__cssModules",lt]]);const nt=["aria-label"],ot=O({__name:"ExternalStoragesSection",setup(s){const a=$("files_external","settings",{docUrl:"",dependencyIssues:{messages:null,modules:null},isAdmin:!1}),t=ue(),i=a.dependencyIssues?.messages??[],c=a.dependencyIssues?.modules??{},d=A(!1),_=A();async function r(l){if(d.value=!1,!!l)try{a.isAdmin?await t.createGlobalStorage(l):await t.createUserStorage(l),_.value=void 0}catch(o){ke.error("Failed to add external storage",{error:o,storage:l}),_.value={...l},d.value=!0}}return(l,o)=>(u(),h(e(ve),{docUrl:e(a).docUrl,name:e(n)("files_external","External storage"),description:e(n)("files_external","External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices.")+(e(a).isAdmin?" "+e(n)("files_external","You may also allow people to mount their own external storage services."):"")},{default:w(()=>[(u(!0),x(M,null,q(e(i),(p,m)=>(u(),h(e(ne),{key:m,type:"error"},{default:w(()=>[V(g(p),1)]),_:2},1024))),128)),(u(!0),x(M,null,q(e(c),(p,m)=>(u(),h(e(ne),{key:m,type:"warning"},{default:w(()=>[b("p",null,[m==="curl"?(u(),x(M,{key:0},[V(g(e(n)("files_external","The cURL support in PHP is not enabled or installed.")),1)],64)):m==="ftp"?(u(),x(M,{key:1},[V(g(e(n)("files_external","The FTP support in PHP is not enabled or installed.")),1)],64)):(u(),x(M,{key:2},[V(g(e(n)("files_external","{module} is not installed.",{module:m})),1)],64)),V(" "+g(e(He)("files_external","Please ask your system administrator to install it as otherwise mounting the following backend is not possible:","Please ask your system administrator to install it as otherwise mounting the following backends is not possible:",p.length)),1)]),b("ul",{class:y(l.$style.externalStoragesSection__dependantList),"aria-label":e(n)("files_external","Dependant backends")},[(u(!0),x(M,null,q(p,f=>(u(),x("li",{key:f},g(f),1))),128))],10,nt)]),_:2},1024))),128)),T("",!0),v(Ja),v(e(R),{class:y(l.$style.externalStoragesSection__newStorageButton),variant:"primary",onClick:o[0]||(o[0]=p=>d.value=!d.value)},{icon:w(()=>[v(e(j),{path:e(Ge)},null,8,["path"])]),default:w(()=>[V(" "+g(e(n)("files_external","Add external storage")),1)]),_:1},8,["class"]),v(Ae,{open:d.value,"onUpdate:open":o[1]||(o[1]=p=>d.value=p),storage:_.value,onClose:r},null,8,["open","storage"]),e(a).isAdmin?(u(),h(st,{key:1})):T("",!0)]),_:1},8,["docUrl","name","description"]))}}),it="_externalStoragesSection__dependantList_atsmn_2",rt="_externalStoragesSection__newStorageButton_atsmn_7",ut={externalStoragesSection__dependantList:it,externalStoragesSection__newStorageButton:rt},dt={$style:ut},ct=N(ot,[["__cssModules",dt]]),_t=O({__name:"GlobalCredentialsSection",setup(s){const a=$("files_external","global-credentials"),t=A(!1),i=A(a.user),c=A(a.password);xe(U);async function d(){try{t.value=!0;const{data:_}=await U.post(P("apps/files_external/globalcredentials"),{uid:a.uid,user:i.value,password:c.value},{confirmPassword:Q.Strict});if(_){re(n("files_external","Global credentials saved"));return}}catch(_){ke.error(_)}finally{t.value=!1}ie(n("files_external","Could not save global credentials")),i.value=a.user,c.value=a.password}return(_,r)=>(u(),h(e(ve),{name:e(n)("files_external","Global credentials"),description:e(n)("files_external","Global credentials can be used to authenticate with multiple external storages that have the same credentials.")},{default:w(()=>[b("form",{id:"global_credentials",class:y(_.$style.globalCredentialsSectionForm),autocomplete:"false",onSubmit:Ne(d,["prevent"])},[v(e(be),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=l=>i.value=l),name:"username",autocomplete:"false",label:e(n)("files_external","Login")},null,8,["modelValue","label"]),v(e(We),{modelValue:c.value,"onUpdate:modelValue":r[1]||(r[1]=l=>c.value=l),name:"password",autocomplete:"false",label:e(n)("files_external","Password")},null,8,["modelValue","label"]),v(e(R),{class:y(_.$style.globalCredentialsSectionForm__submit),disabled:t.value,variant:"primary",type:"submit"},{default:w(()=>[V(g(t.value?e(n)("files_external","Saving …"):e(n)("files_external","Save")),1)]),_:1},8,["class","disabled"])],34)]),_:1},8,["name","description"]))}}),pt="_globalCredentialsSectionForm_bgjv2_2",mt="_globalCredentialsSectionForm__submit_bgjv2_10",ft={globalCredentialsSectionForm:pt,globalCredentialsSectionForm__submit:mt},gt={$style:ft},vt=N(_t,[["__cssModules",gt]]),bt=O({__name:"FilesExternalSettings",setup(s){return(a,t)=>(u(),x(M,null,[v(ct),v(vt)],64))}}),yt=Oe(),se=Ee(bt);se.config.idPrefix="files-external",se.use(yt),se.mount("#files-external"); //# sourceMappingURL=files_external-settings.mjs.map diff --git a/dist/files_reminders-init.mjs b/dist/files_reminders-init.mjs index d6624b7be6b01..f421589f953d8 100644 --- a/dist/files_reminders-init.mjs +++ b/dist/files_reminders-init.mjs @@ -1,2 +1,2 @@ -import{b as l}from"./index-CPriPmaq.chunk.mjs";import{c as X}from"./dav-q7lxn7Ev.chunk.mjs";import{c as W,f as y,g as K}from"./index-DgEyzq8A.chunk.mjs";import{a as B,t as i}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{c as O}from"./index-9ZBo3L67.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./index-COiwHfFG.chunk.mjs";import{N as ee}from"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{N as te,f as re,s as ie}from"./index-CO7ZwNPX.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./NcRichText-BO_4KtBA-DXDa2H1Y.chunk.mjs";import{N as k}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";import"./Plus-gXjhFOHV.chunk.mjs";/* empty css */import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import{N as A}from"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import"./index-CuPuSdF1.chunk.mjs";import"./ContentCopy-DvmnNVoZ.chunk.mjs";import"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import{b as ne,I as ae,U as se,o as w,c as D,w as d,k as oe,C as de,e as T,u as a,g as m,t as u,m as I,r as c,p as le}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{a as f,d as N}from"./index-DCJOwzzz.chunk.mjs";import{a as me}from"./index-C3KLQ_oe.chunk.mjs";import"./externalStorageUtils-BzJyVKar.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-Ds0AsAbv.chunk.mjs";const ue='';async function E(e,t){const r=W("/apps/files_reminders/api/v1/{fileId}",{fileId:e});return(await O.put(r,{dueDate:t.toISOString()})).data.ocs.data}async function U(e){const t=W("/apps/files_reminders/api/v1/{fileId}",{fileId:e});return(await O.delete(t,{validateStatus:r=>r===200||r===404})).data.ocs.data}var p=(e=>(e.LaterToday="later-today",e.Tomorrow="tomorrow",e.ThisWeekend="this-weekend",e.NextWeek="next-week",e))(p||{});function F(){const e=new Date;return e.setHours(0,0,0,0),e.setDate(e.getDate()-e.getDay()+1),new Date(e)}function M(e){new Date(e).setHours(0,0,0,0);const t=new Date(e.getFullYear(),0,1,0,0,0,0),r=(e.getTime()-t.getTime())/864e5;return Math.ceil((r+t.getDay()+1)/7)}function ce(e,t){return M(e)===M(t)&&e.getFullYear()===t.getFullYear()}function fe(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function b(e){return{"later-today":()=>{const t=new Date,r=new Date;r.setHours(18,0,0,0);const s=new Date;return s.setHours(17,0,0,0),t>=s?null:r},tomorrow:()=>{const t=new Date,r=new Date;return r.setDate(t.getDate()+1),r.setHours(8,0,0,0),r},"this-weekend":()=>{const t=new Date;if([5,6,0].includes(t.getDay()))return null;const r=new Date,s=F();return r.setDate(s.getDate()+5),r.setHours(8,0,0,0),r},"next-week":()=>{if(new Date().getDay()===0)return null;const t=new Date,r=F();return t.setDate(r.getDate()+7),t.setHours(8,0,0,0),t}}[e]()}function pe(){const e=new Date,t=new Date;return t.setHours(e.getHours()+2,0,0,0),t}function V(e){let t={hour:"numeric",minute:"2-digit"};const r=new Date;return fe(e,r)||(t={...t,weekday:"short"}),ce(e,r)||(t={...t,month:"short",day:"numeric"}),e.getFullYear()!==r.getFullYear()&&(t={...t,year:"numeric"}),e.toLocaleString(B(),t)}function L(e){let t={month:"long",day:"numeric",weekday:"long",hour:"numeric",minute:"2-digit"};const r=new Date;return e.getFullYear()!==r.getFullYear()&&(t={...t,year:"numeric"}),e.toLocaleString(B(),t)}const ge={id:"clear-reminder",displayName:()=>i("files_reminders","Clear reminder"),title:({nodes:e})=>{const t=e.at(0),r=new Date(t.attributes["reminder-due-date"]);return`${i("files_reminders","Clear reminder")} – ${L(r)}`},iconSvgInline:()=>ue,enabled:({nodes:e})=>e.length!==1?!1:!!e.at(0).attributes["reminder-due-date"],async exec({nodes:e}){const t=e.at(0);if(t.fileid)try{return await U(t.fileid),t.attributes["reminder-due-date"]="",y("files:node:updated",t),!0}catch{return!1}return null},order:19},Z='',_=K().setApp("files_reminders").detectUser().build(),ve=ne({__name:"SetCustomReminderModal",props:{node:{}},emits:["close"],setup(e,{emit:t}){const r=e,s=t,h=c(!1),S=c(!1),g=c(!0),o=c(),C=c(new Date),z=le(()=>{const n=re(o.value??0);return C.value.getTime()>=(o.value?.getTime()??0)?i("files_reminders","We reminded you of this file {relativeDueDate}",{relativeDueDate:n}):i("files_reminders","We will remind you of this file {relativeDueDate}",{relativeDueDate:n})});ae(()=>{const n=r.node.attributes["reminder-due-date"]?new Date(r.node.attributes["reminder-due-date"]):void 0;h.value=!!n,g.value=!0,S.value=!0,o.value=n??pe(),C.value=new Date}),se(()=>{const n=document.getElementById("set-custom-reminder");n.focus(),h.value||n.showPicker()});async function j(){if(!(o.value instanceof Date)||isNaN(o.value.getTime())){f(i("files_reminders","Please choose a valid date & time"));return}try{await E(r.node.fileid,o.value);const n=r.node.clone();n.attributes["reminder-due-date"]=o.value.toISOString(),y("files:node:updated",n),N(i("files_reminders",'Reminder set for "{fileName}"',{fileName:r.node.displayname})),v()}catch(n){_.error("Failed to set reminder",{error:n}),f(i("files_reminders","Failed to set reminder"))}}async function G(){try{await U(r.node.fileid);const n=r.node.clone();n.attributes["reminder-due-date"]="",y("files:node:updated",n),N(i("files_reminders",'Reminder cleared for "{fileName}"',{fileName:r.node.displayname})),v()}catch(n){_.error("Failed to clear reminder",{error:n}),f(i("files_reminders","Failed to clear reminder"))}}function v(){S.value=!1,s("close")}function J(){const n=document.getElementById("set-custom-reminder");g.value=n.checkValidity()}return(n,H)=>S.value?(w(),D(a(te),{key:0,name:a(i)("files_reminders","Set reminder for '{fileName}'",{fileName:e.node.displayname}),outTransition:"",size:"small",closeOnClickOutside:"",onClosing:v},{actions:d(()=>[T(a(k),{variant:"tertiary",onClick:v},{default:d(()=>[m(u(a(i)("files_reminders","Cancel")),1)]),_:1}),h.value?(w(),D(a(k),{key:0,onClick:G},{default:d(()=>[m(u(a(i)("files_reminders","Clear reminder")),1)]),_:1})):I("",!0),T(a(k),{disabled:!g.value,variant:"primary",form:"set-custom-reminder-form",type:"submit"},{default:d(()=>[m(u(a(i)("files_reminders","Set reminder")),1)]),_:1},8,["disabled"])]),default:d(()=>[oe("form",{id:"set-custom-reminder-form",class:"custom-reminder-modal",onSubmit:de(j,["prevent"])},[T(a(ee),{id:"set-custom-reminder",modelValue:o.value,"onUpdate:modelValue":H[0]||(H[0]=Q=>o.value=Q),label:a(i)("files_reminders","Reminder at custom date & time"),min:C.value,required:!0,type:"datetime-local",onInput:J},null,8,["modelValue","label","min"]),g.value&&o.value?(w(),D(a(A),{key:0,type:"info"},{default:d(()=>[m(u(z.value),1)]),_:1})):(w(),D(a(A),{key:1,type:"error"},{default:d(()=>[m(u(a(i)("files_reminders","Please choose a valid date & time")),1)]),_:1}))],32)]),_:1},8,["name"])):I("",!0)}}),we=me(ve,[["__scopeId","data-v-d7127154"]]);async function q(e){await ie(we,{node:e})}const De={id:"reminder-status",inline:()=>!0,displayName:()=>"",title:({nodes:e})=>{const t=e.at(0),r=new Date(t.attributes["reminder-due-date"]);return`${i("files_reminders","Reminder set")} – ${L(r)}`},iconSvgInline:()=>Z,enabled:({nodes:e})=>{if(e.length!==1)return!1;const t=e.at(0).attributes["reminder-due-date"],r=new Date;return!!t&&new Date(t)>r},async exec({nodes:e}){const t=e.at(0);return await q(t),null},order:-15},ye='',x="set-reminder-menu",be={id:x,displayName:()=>i("files_reminders","Set reminder"),iconSvgInline:()=>Z,enabled:({nodes:e,view:t})=>t.id==="trashbin"||e.length!==1?!1:e.at(0).attributes["reminder-due-date"]!==void 0,async exec(){return null},order:20},Le={id:"set-reminder-custom",displayName:()=>i("files_reminders","Custom reminder"),title:()=>i("files_reminders","Reminder at custom date & time"),iconSvgInline:()=>ye,enabled:({nodes:e,view:t})=>t.id==="trashbin"||e.length!==1?!1:e.at(0).attributes["reminder-due-date"]!==void 0,parent:x,async exec({nodes:e}){const t=e.at(0);return q(t),null},order:22},P={dateTimePreset:p.LaterToday,label:i("files_reminders","Later today"),ariaLabel:i("files_reminders","Set reminder for later today"),dateString:"",verboseDateString:""},Y={dateTimePreset:p.Tomorrow,label:i("files_reminders","Tomorrow"),ariaLabel:i("files_reminders","Set reminder for tomorrow"),dateString:"",verboseDateString:""},$={dateTimePreset:p.ThisWeekend,label:i("files_reminders","This weekend"),ariaLabel:i("files_reminders","Set reminder for this weekend"),dateString:"",verboseDateString:""},R={dateTimePreset:p.NextWeek,label:i("files_reminders","Next week"),ariaLabel:i("files_reminders","Set reminder for next week"),dateString:"",verboseDateString:""};function _e(){return[P,Y,$,R].forEach(e=>{const t=b(e.dateTimePreset);t&&(e.dateString=V(t),e.verboseDateString=L(t),setInterval(()=>{const r=b(e.dateTimePreset);r&&(e.dateString=V(r),e.verboseDateString=L(r))},1e3*30*60))}),[P,Y,$,R].map(he)}function he(e){return{id:`set-reminder-${e.dateTimePreset}`,displayName:()=>`${e.label} – ${e.dateString}`,title:()=>`${e.ariaLabel} – ${e.verboseDateString}`,iconSvgInline:()=>"",enabled:({nodes:t,view:r})=>r.id==="trashbin"||t.length!==1?!1:t.at(0).attributes["reminder-due-date"]!==void 0&&!!b(e.dateTimePreset),parent:x,async exec({nodes:t}){const r=t.at(0);if(!r.fileid)return _.error("Failed to set reminder, missing file id"),f(i("files_reminders","Failed to set reminder")),null;try{const s=b(e.dateTimePreset);await E(r.fileid,s),r.attributes["reminder-due-date"]=s.toISOString(),y("files:node:updated",r),N(i("files_reminders",'Reminder set for "{fileName}"',{fileName:r.basename}))}catch(s){_.error("Failed to set reminder",{error:s}),f(i("files_reminders","Failed to set reminder"))}return null},order:21}}X("nc:reminder-due-date",{nc:"http://nextcloud.org/ns"}),l(De),l(ge),l(be),l(Le),_e().forEach(l); +import{b as l}from"./index-CPriPmaq.chunk.mjs";import{c as X}from"./dav-CSaJxXR-.chunk.mjs";import{c as W,f as y,g as K}from"./index-DgEyzq8A.chunk.mjs";import{a as B,t as i}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{c as O}from"./index-9ZBo3L67.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./index-COiwHfFG.chunk.mjs";import{N as ee}from"./NcBreadcrumbs-B4eyDS9i-BPbJ96XZ.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";import{N as te,f as re,s as ie}from"./index-CO7ZwNPX.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./NcRichText-BO_4KtBA-DXDa2H1Y.chunk.mjs";import{N as k}from"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./NcCheckboxRadioSwitch-DVdt5Hkq-BDAr9NJI.chunk.mjs";import"./NcChip-DKRlV47q-DPnkPqM0.chunk.mjs";import"./NcColorPicker-BCkasLwT-Bvg1YEOn.chunk.mjs";import"./TrayArrowDown-DQikeHMO.chunk.mjs";import"./NcSelect--kERLlBK-DUoCWpPg.chunk.mjs";import"./NcEmojiPicker-UTxgju3f-Ck73so0G.chunk.mjs";import"./Plus-gXjhFOHV.chunk.mjs";/* empty css */import"./TrashCanOutline-BZ98FFoG.chunk.mjs";import{N as A}from"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./NcPasswordField-BFyzHTOO-DkauLlYU.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs";import"./index-CuPuSdF1.chunk.mjs";import"./ContentCopy-DvmnNVoZ.chunk.mjs";import"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import{b as ne,I as ae,U as se,o as w,c as D,w as d,k as oe,C as de,e as T,u as a,g as m,t as u,m as I,r as c,p as le}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{a as f,d as N}from"./index-WQvok30H.chunk.mjs";import{a as me}from"./index-C3KLQ_oe.chunk.mjs";import"./externalStorageUtils-BzJyVKar.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-C5O29_27.chunk.mjs";const ue='';async function E(e,t){const r=W("/apps/files_reminders/api/v1/{fileId}",{fileId:e});return(await O.put(r,{dueDate:t.toISOString()})).data.ocs.data}async function U(e){const t=W("/apps/files_reminders/api/v1/{fileId}",{fileId:e});return(await O.delete(t,{validateStatus:r=>r===200||r===404})).data.ocs.data}var p=(e=>(e.LaterToday="later-today",e.Tomorrow="tomorrow",e.ThisWeekend="this-weekend",e.NextWeek="next-week",e))(p||{});function F(){const e=new Date;return e.setHours(0,0,0,0),e.setDate(e.getDate()-e.getDay()+1),new Date(e)}function M(e){new Date(e).setHours(0,0,0,0);const t=new Date(e.getFullYear(),0,1,0,0,0,0),r=(e.getTime()-t.getTime())/864e5;return Math.ceil((r+t.getDay()+1)/7)}function ce(e,t){return M(e)===M(t)&&e.getFullYear()===t.getFullYear()}function fe(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function b(e){return{"later-today":()=>{const t=new Date,r=new Date;r.setHours(18,0,0,0);const s=new Date;return s.setHours(17,0,0,0),t>=s?null:r},tomorrow:()=>{const t=new Date,r=new Date;return r.setDate(t.getDate()+1),r.setHours(8,0,0,0),r},"this-weekend":()=>{const t=new Date;if([5,6,0].includes(t.getDay()))return null;const r=new Date,s=F();return r.setDate(s.getDate()+5),r.setHours(8,0,0,0),r},"next-week":()=>{if(new Date().getDay()===0)return null;const t=new Date,r=F();return t.setDate(r.getDate()+7),t.setHours(8,0,0,0),t}}[e]()}function pe(){const e=new Date,t=new Date;return t.setHours(e.getHours()+2,0,0,0),t}function V(e){let t={hour:"numeric",minute:"2-digit"};const r=new Date;return fe(e,r)||(t={...t,weekday:"short"}),ce(e,r)||(t={...t,month:"short",day:"numeric"}),e.getFullYear()!==r.getFullYear()&&(t={...t,year:"numeric"}),e.toLocaleString(B(),t)}function L(e){let t={month:"long",day:"numeric",weekday:"long",hour:"numeric",minute:"2-digit"};const r=new Date;return e.getFullYear()!==r.getFullYear()&&(t={...t,year:"numeric"}),e.toLocaleString(B(),t)}const ge={id:"clear-reminder",displayName:()=>i("files_reminders","Clear reminder"),title:({nodes:e})=>{const t=e.at(0),r=new Date(t.attributes["reminder-due-date"]);return`${i("files_reminders","Clear reminder")} – ${L(r)}`},iconSvgInline:()=>ue,enabled:({nodes:e})=>e.length!==1?!1:!!e.at(0).attributes["reminder-due-date"],async exec({nodes:e}){const t=e.at(0);if(t.fileid)try{return await U(t.fileid),t.attributes["reminder-due-date"]="",y("files:node:updated",t),!0}catch{return!1}return null},order:19},Z='',_=K().setApp("files_reminders").detectUser().build(),ve=ne({__name:"SetCustomReminderModal",props:{node:{}},emits:["close"],setup(e,{emit:t}){const r=e,s=t,h=c(!1),S=c(!1),g=c(!0),o=c(),C=c(new Date),z=le(()=>{const n=re(o.value??0);return C.value.getTime()>=(o.value?.getTime()??0)?i("files_reminders","We reminded you of this file {relativeDueDate}",{relativeDueDate:n}):i("files_reminders","We will remind you of this file {relativeDueDate}",{relativeDueDate:n})});ae(()=>{const n=r.node.attributes["reminder-due-date"]?new Date(r.node.attributes["reminder-due-date"]):void 0;h.value=!!n,g.value=!0,S.value=!0,o.value=n??pe(),C.value=new Date}),se(()=>{const n=document.getElementById("set-custom-reminder");n.focus(),h.value||n.showPicker()});async function j(){if(!(o.value instanceof Date)||isNaN(o.value.getTime())){f(i("files_reminders","Please choose a valid date & time"));return}try{await E(r.node.fileid,o.value);const n=r.node.clone();n.attributes["reminder-due-date"]=o.value.toISOString(),y("files:node:updated",n),N(i("files_reminders",'Reminder set for "{fileName}"',{fileName:r.node.displayname})),v()}catch(n){_.error("Failed to set reminder",{error:n}),f(i("files_reminders","Failed to set reminder"))}}async function G(){try{await U(r.node.fileid);const n=r.node.clone();n.attributes["reminder-due-date"]="",y("files:node:updated",n),N(i("files_reminders",'Reminder cleared for "{fileName}"',{fileName:r.node.displayname})),v()}catch(n){_.error("Failed to clear reminder",{error:n}),f(i("files_reminders","Failed to clear reminder"))}}function v(){S.value=!1,s("close")}function J(){const n=document.getElementById("set-custom-reminder");g.value=n.checkValidity()}return(n,H)=>S.value?(w(),D(a(te),{key:0,name:a(i)("files_reminders","Set reminder for '{fileName}'",{fileName:e.node.displayname}),outTransition:"",size:"small",closeOnClickOutside:"",onClosing:v},{actions:d(()=>[T(a(k),{variant:"tertiary",onClick:v},{default:d(()=>[m(u(a(i)("files_reminders","Cancel")),1)]),_:1}),h.value?(w(),D(a(k),{key:0,onClick:G},{default:d(()=>[m(u(a(i)("files_reminders","Clear reminder")),1)]),_:1})):I("",!0),T(a(k),{disabled:!g.value,variant:"primary",form:"set-custom-reminder-form",type:"submit"},{default:d(()=>[m(u(a(i)("files_reminders","Set reminder")),1)]),_:1},8,["disabled"])]),default:d(()=>[oe("form",{id:"set-custom-reminder-form",class:"custom-reminder-modal",onSubmit:de(j,["prevent"])},[T(a(ee),{id:"set-custom-reminder",modelValue:o.value,"onUpdate:modelValue":H[0]||(H[0]=Q=>o.value=Q),label:a(i)("files_reminders","Reminder at custom date & time"),min:C.value,required:!0,type:"datetime-local",onInput:J},null,8,["modelValue","label","min"]),g.value&&o.value?(w(),D(a(A),{key:0,type:"info"},{default:d(()=>[m(u(z.value),1)]),_:1})):(w(),D(a(A),{key:1,type:"error"},{default:d(()=>[m(u(a(i)("files_reminders","Please choose a valid date & time")),1)]),_:1}))],32)]),_:1},8,["name"])):I("",!0)}}),we=me(ve,[["__scopeId","data-v-d7127154"]]);async function q(e){await ie(we,{node:e})}const De={id:"reminder-status",inline:()=>!0,displayName:()=>"",title:({nodes:e})=>{const t=e.at(0),r=new Date(t.attributes["reminder-due-date"]);return`${i("files_reminders","Reminder set")} – ${L(r)}`},iconSvgInline:()=>Z,enabled:({nodes:e})=>{if(e.length!==1)return!1;const t=e.at(0).attributes["reminder-due-date"],r=new Date;return!!t&&new Date(t)>r},async exec({nodes:e}){const t=e.at(0);return await q(t),null},order:-15},ye='',x="set-reminder-menu",be={id:x,displayName:()=>i("files_reminders","Set reminder"),iconSvgInline:()=>Z,enabled:({nodes:e,view:t})=>t.id==="trashbin"||e.length!==1?!1:e.at(0).attributes["reminder-due-date"]!==void 0,async exec(){return null},order:20},Le={id:"set-reminder-custom",displayName:()=>i("files_reminders","Custom reminder"),title:()=>i("files_reminders","Reminder at custom date & time"),iconSvgInline:()=>ye,enabled:({nodes:e,view:t})=>t.id==="trashbin"||e.length!==1?!1:e.at(0).attributes["reminder-due-date"]!==void 0,parent:x,async exec({nodes:e}){const t=e.at(0);return q(t),null},order:22},P={dateTimePreset:p.LaterToday,label:i("files_reminders","Later today"),ariaLabel:i("files_reminders","Set reminder for later today"),dateString:"",verboseDateString:""},Y={dateTimePreset:p.Tomorrow,label:i("files_reminders","Tomorrow"),ariaLabel:i("files_reminders","Set reminder for tomorrow"),dateString:"",verboseDateString:""},$={dateTimePreset:p.ThisWeekend,label:i("files_reminders","This weekend"),ariaLabel:i("files_reminders","Set reminder for this weekend"),dateString:"",verboseDateString:""},R={dateTimePreset:p.NextWeek,label:i("files_reminders","Next week"),ariaLabel:i("files_reminders","Set reminder for next week"),dateString:"",verboseDateString:""};function _e(){return[P,Y,$,R].forEach(e=>{const t=b(e.dateTimePreset);t&&(e.dateString=V(t),e.verboseDateString=L(t),setInterval(()=>{const r=b(e.dateTimePreset);r&&(e.dateString=V(r),e.verboseDateString=L(r))},1e3*30*60))}),[P,Y,$,R].map(he)}function he(e){return{id:`set-reminder-${e.dateTimePreset}`,displayName:()=>`${e.label} – ${e.dateString}`,title:()=>`${e.ariaLabel} – ${e.verboseDateString}`,iconSvgInline:()=>"",enabled:({nodes:t,view:r})=>r.id==="trashbin"||t.length!==1?!1:t.at(0).attributes["reminder-due-date"]!==void 0&&!!b(e.dateTimePreset),parent:x,async exec({nodes:t}){const r=t.at(0);if(!r.fileid)return _.error("Failed to set reminder, missing file id"),f(i("files_reminders","Failed to set reminder")),null;try{const s=b(e.dateTimePreset);await E(r.fileid,s),r.attributes["reminder-due-date"]=s.toISOString(),y("files:node:updated",r),N(i("files_reminders",'Reminder set for "{fileName}"',{fileName:r.basename}))}catch(s){_.error("Failed to set reminder",{error:s}),f(i("files_reminders","Failed to set reminder"))}return null},order:21}}X("nc:reminder-due-date",{nc:"http://nextcloud.org/ns"}),l(De),l(ge),l(be),l(Le),_e().forEach(l); //# sourceMappingURL=files_reminders-init.mjs.map diff --git a/dist/files_trashbin-init.mjs b/dist/files_trashbin-init.mjs index 5cbad6d27c4dd..395bf7d81831b 100644 --- a/dist/files_trashbin-init.mjs +++ b/dist/files_trashbin-init.mjs @@ -1,4 +1,4 @@ -import{C as c,V as _,g as v,a as x,b as V}from"./index-CPriPmaq.chunk.mjs";import{a as o,b as H,g as A,h as C,f as p}from"./index-DgEyzq8A.chunk.mjs";import{c as u,i as N}from"./index-9ZBo3L67.chunk.mjs";import{a as b,d as E,g as S}from"./index-DCJOwzzz.chunk.mjs";import{P as $}from"./externalStorageUtils-BzJyVKar.chunk.mjs";import{d as I,e as D,l as L}from"./index-C3KLQ_oe.chunk.mjs";import{g as y,a as f,t as n}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{g as M,a as T,b as k,r as F,d as B}from"./dav-q7lxn7Ev.chunk.mjs";import{f as U}from"./index-CO7ZwNPX.chunk.mjs";import{h as P}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{N as O}from"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./index-Ds0AsAbv.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";const R='',q='',g=`/trashbin/${o()?.uid}/trash`,z=M(),K=` +import{C as c,V as _,g as v,a as x,b as V}from"./index-CPriPmaq.chunk.mjs";import{a as o,b as H,g as A,h as C,f as p}from"./index-DgEyzq8A.chunk.mjs";import{c as u,i as N}from"./index-9ZBo3L67.chunk.mjs";import{a as b,d as E,g as S}from"./index-WQvok30H.chunk.mjs";import{P as $}from"./externalStorageUtils-BzJyVKar.chunk.mjs";import{d as I,e as D,l as L}from"./index-C3KLQ_oe.chunk.mjs";import{g as y,a as f,t as n}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{g as M,a as T,b as k,r as F,d as B}from"./dav-CSaJxXR-.chunk.mjs";import{f as U}from"./index-CO7ZwNPX.chunk.mjs";import{h as P}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{N as O}from"./NcUserBubble-BXR7vT0V-DnebWv3y.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs";import"./NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs";import"./logger-D3RVzcfQ-DcSJKjY8.chunk.mjs";import"./index-C5O29_27.chunk.mjs";import"./mdi-CYMOyMtM.chunk.mjs";import"./NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs";import"./colors-Cv9F-jWS-Yylf7QmF.chunk.mjs";import"./NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs";import"./PencilOutline-Byyi13ia.chunk.mjs";import"./NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs";const R='',q='',g=`/trashbin/${o()?.uid}/trash`,z=M(),K=` diff --git a/dist/files_versions-sidebar-tab.mjs b/dist/files_versions-sidebar-tab.mjs index fd3fa7d0869e5..14c6d496baeb9 100644 --- a/dist/files_versions-sidebar-tab.mjs +++ b/dist/files_versions-sidebar-tab.mjs @@ -1,3 +1,3 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('', '', 'dist/FilesVersionsSidebarTab-Bdeocctt.chunk.mjs'),window.OC.filePath('', '', 'dist/index-DCJOwzzz.chunk.mjs'),window.OC.filePath('', '', 'dist/index-C3KLQ_oe.chunk.mjs'),window.OC.filePath('', '', 'dist/index-CO7ZwNPX.chunk.mjs'),window.OC.filePath('', '', 'dist/runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs'),window.OC.filePath('', '', 'dist/translation-DoG5ZELJ-Bq3q05SR.chunk.mjs'),window.OC.filePath('', '', 'dist/index-DgEyzq8A.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-C_oBIsvc.chunk.css'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-DcSJKjY8.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-Ks0gkIDB.chunk.css'),window.OC.filePath('', '', 'dist/mdi-CYMOyMtM.chunk.mjs'),window.OC.filePath('', '', 'dist/mdi-BYHcrfvW.chunk.css'),window.OC.filePath('', '', 'dist/index-BaQM1-G8.chunk.css'),window.OC.filePath('', '', 'dist/NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs'),window.OC.filePath('', '', 'dist/NcNoteCard-mI7qVZ9j-BWNFKLbC.chunk.css'),window.OC.filePath('', '', 'dist/index-CPriPmaq.chunk.mjs'),window.OC.filePath('', '', 'dist/externalStorageUtils-BzJyVKar.chunk.mjs'),window.OC.filePath('', '', 'dist/index-sH3U_332.chunk.mjs'),window.OC.filePath('', '', 'dist/PencilOutline-Byyi13ia.chunk.mjs'),window.OC.filePath('', '', 'dist/PencilOutline-B3DMd8SU.chunk.css'),window.OC.filePath('', '', 'dist/NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs'),window.OC.filePath('', '', 'dist/NcActionRouter-vYFtIOzD-b9UhLDij.chunk.css'),window.OC.filePath('', '', 'dist/NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs'),window.OC.filePath('', '', 'dist/index-9ZBo3L67.chunk.mjs'),window.OC.filePath('', '', 'dist/colors-Cv9F-jWS-Yylf7QmF.chunk.mjs'),window.OC.filePath('', '', 'dist/NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs'),window.OC.filePath('', '', 'dist/NcUserStatusIcon-BF5OEQFU-Bq_6hmXG.chunk.css'),window.OC.filePath('', '', 'dist/NcAvatar-1KxMUN7V-BCJwOkRP.chunk.css'),window.OC.filePath('', '', 'dist/NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs'),window.OC.filePath('', '', 'dist/TrashCanOutline-BZ98FFoG.chunk.mjs'),window.OC.filePath('', '', 'dist/TrashCanOutline-BYHxARP-.chunk.css'),window.OC.filePath('', '', 'dist/TrayArrowDown-DQikeHMO.chunk.mjs'),window.OC.filePath('', '', 'dist/TrayArrowDown-BEbvWlY3.chunk.css'),window.OC.filePath('', '', 'dist/dav-q7lxn7Ev.chunk.mjs'),window.OC.filePath('', '', 'dist/index-Ds0AsAbv.chunk.mjs'),window.OC.filePath('', '', 'dist/files_versions-FilesVersionsSidebarTab-Cjl2hr1y.chunk.css')])))=>i.map(i=>d[i]); -import{i as s,_ as e}from"./index-C3KLQ_oe.chunk.mjs";import{r}from"./index-CPriPmaq.chunk.mjs";import{t}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{d as m,a as n}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{F as a}from"./externalStorageUtils-BzJyVKar.chunk.mjs";import"./index-DgEyzq8A.chunk.mjs";import"./index-sH3U_332.chunk.mjs";const d='',i="files-versions_sidebar-tab";r({id:"files_versions",tagName:i,order:90,displayName:t("files_versions","Versions"),iconSvgInline:d,enabled({node:o}){return!(s()||o.type!==a.File)},async onInit(){const o=n(()=>e(()=>import("./FilesVersionsSidebarTab-Bdeocctt.chunk.mjs"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]),import.meta.url));window.customElements.define(i,m(o,{shadowRoot:!1}))}}); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('', '', 'dist/FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs'),window.OC.filePath('', '', 'dist/index-WQvok30H.chunk.mjs'),window.OC.filePath('', '', 'dist/index-C3KLQ_oe.chunk.mjs'),window.OC.filePath('', '', 'dist/index-CO7ZwNPX.chunk.mjs'),window.OC.filePath('', '', 'dist/runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-ij7XnKl9.chunk.mjs'),window.OC.filePath('', '', 'dist/translation-DoG5ZELJ-Bq3q05SR.chunk.mjs'),window.OC.filePath('', '', 'dist/index-DgEyzq8A.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-C_oBIsvc.chunk.css'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-DcSJKjY8.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-Ks0gkIDB.chunk.css'),window.OC.filePath('', '', 'dist/mdi-CYMOyMtM.chunk.mjs'),window.OC.filePath('', '', 'dist/mdi-BYHcrfvW.chunk.css'),window.OC.filePath('', '', 'dist/index-BaQM1-G8.chunk.css'),window.OC.filePath('', '', 'dist/NcNoteCard-mI7qVZ9j-uLRcr9nN.chunk.mjs'),window.OC.filePath('', '', 'dist/NcNoteCard-mI7qVZ9j-BWNFKLbC.chunk.css'),window.OC.filePath('', '', 'dist/index-CPriPmaq.chunk.mjs'),window.OC.filePath('', '', 'dist/externalStorageUtils-BzJyVKar.chunk.mjs'),window.OC.filePath('', '', 'dist/index-sH3U_332.chunk.mjs'),window.OC.filePath('', '', 'dist/PencilOutline-Byyi13ia.chunk.mjs'),window.OC.filePath('', '', 'dist/PencilOutline-B3DMd8SU.chunk.css'),window.OC.filePath('', '', 'dist/NcActionRouter-vYFtIOzD-B8tCkq27.chunk.mjs'),window.OC.filePath('', '', 'dist/NcActionRouter-vYFtIOzD-b9UhLDij.chunk.css'),window.OC.filePath('', '', 'dist/NcAvatar-1KxMUN7V-Cc-cyWdv.chunk.mjs'),window.OC.filePath('', '', 'dist/index-9ZBo3L67.chunk.mjs'),window.OC.filePath('', '', 'dist/colors-Cv9F-jWS-Yylf7QmF.chunk.mjs'),window.OC.filePath('', '', 'dist/NcUserStatusIcon-BF5OEQFU-CiI19blP.chunk.mjs'),window.OC.filePath('', '', 'dist/NcUserStatusIcon-BF5OEQFU-Bq_6hmXG.chunk.css'),window.OC.filePath('', '', 'dist/NcAvatar-1KxMUN7V-BCJwOkRP.chunk.css'),window.OC.filePath('', '', 'dist/NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-DDp8C1oX.chunk.mjs'),window.OC.filePath('', '', 'dist/TrashCanOutline-BZ98FFoG.chunk.mjs'),window.OC.filePath('', '', 'dist/TrashCanOutline-BYHxARP-.chunk.css'),window.OC.filePath('', '', 'dist/TrayArrowDown-DQikeHMO.chunk.mjs'),window.OC.filePath('', '', 'dist/TrayArrowDown-BEbvWlY3.chunk.css'),window.OC.filePath('', '', 'dist/dav-CSaJxXR-.chunk.mjs'),window.OC.filePath('', '', 'dist/index-C5O29_27.chunk.mjs'),window.OC.filePath('', '', 'dist/files_versions-FilesVersionsSidebarTab-Cjl2hr1y.chunk.css')])))=>i.map(i=>d[i]); +import{i as s,_ as e}from"./index-C3KLQ_oe.chunk.mjs";import{r}from"./index-CPriPmaq.chunk.mjs";import{t}from"./translation-DoG5ZELJ-Bq3q05SR.chunk.mjs";import{d as m,a as n}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{F as a}from"./externalStorageUtils-BzJyVKar.chunk.mjs";import"./index-DgEyzq8A.chunk.mjs";import"./index-sH3U_332.chunk.mjs";const d='',i="files-versions_sidebar-tab";r({id:"files_versions",tagName:i,order:90,displayName:t("files_versions","Versions"),iconSvgInline:d,enabled({node:o}){return!(s()||o.type!==a.File)},async onInit(){const o=n(()=>e(()=>import("./FilesVersionsSidebarTab-C6E0TwdT.chunk.mjs"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]),import.meta.url));window.customElements.define(i,m(o,{shadowRoot:!1}))}}); //# sourceMappingURL=files_versions-sidebar-tab.mjs.map diff --git a/dist/index-C5O29_27.chunk.mjs b/dist/index-C5O29_27.chunk.mjs new file mode 100644 index 0000000000000..0068989a78465 --- /dev/null +++ b/dist/index-C5O29_27.chunk.mjs @@ -0,0 +1,9 @@ +import{ag as Ct}from"./runtime-dom.esm-bundler-DhTGVTkD.chunk.mjs";import{p as It}from"./index-DgEyzq8A.chunk.mjs";var Bt={},Bn={2(n){function t(i,s,o){i instanceof RegExp&&(i=e(i,o)),s instanceof RegExp&&(s=e(s,o));var a=r(i,s,o);return a&&{start:a[0],end:a[1],pre:o.slice(0,a[0]),body:o.slice(a[0]+i.length,a[1]),post:o.slice(a[1]+s.length)}}function e(i,s){var o=s.match(i);return o?o[0]:null}function r(i,s,o){var a,l,u,c,h,p=o.indexOf(i),m=o.indexOf(s,p+1),g=p;if(p>=0&&m>0){for(a=[],u=o.length;g>=0&&!h;)g==p?(a.push(g),p=o.indexOf(i,g+1)):a.length==1?h=[a.pop(),m]:((l=a.pop())=0?p:m;a.length&&(h=[u,c])}return h}n.exports=t,t.range=r},101(n,t,e){var r;n=e.nmd(n),(function(){var i=(n&&n.exports,typeof Ct=="object"&&Ct);i.global!==i&&i.window;var s=function(c){this.message=c};(s.prototype=new Error).name="InvalidCharacterError";var o=function(c){throw new s(c)},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,u={encode:function(c){c=String(c),/[^\0-\xFF]/.test(c)&&o("The string to be encoded contains characters outside of the Latin1 range.");for(var h,p,m,g,f=c.length%3,d="",b=-1,y=c.length-f;++b>18&63)+a.charAt(g>>12&63)+a.charAt(g>>6&63)+a.charAt(63&g);return f==2?(h=c.charCodeAt(b)<<8,p=c.charCodeAt(++b),d+=a.charAt((g=h+p)>>10)+a.charAt(g>>4&63)+a.charAt(g<<2&63)+"="):f==1&&(g=c.charCodeAt(b),d+=a.charAt(g>>2)+a.charAt(g<<4&63)+"=="),d},decode:function(c){var h=(c=String(c).replace(l,"")).length;h%4==0&&(h=(c=c.replace(/==?$/,"")).length),(h%4==1||/[^+a-zA-Z0-9/]/.test(c))&&o("Invalid character: the string to be decoded is not correctly encoded.");for(var p,m,g=0,f="",d=-1;++d>(-2*g&6)));return f},version:"1.0.0"};(r=function(){return u}.call(t,e,t,n))===void 0||(n.exports=r)})()},172(n,t){t.d=function(e){if(!e)return 0;for(var r=(e=e.toString()).length,i=e.length;i--;){var s=e.charCodeAt(i);56320<=s&&s<=57343&&i--,127>>32-i},rotr:function(r,i){return r<<32-i|r>>>i},endian:function(r){if(r.constructor==Number)return 16711935&e.rotl(r,8)|4278255360&e.rotl(r,24);for(var i=0;i0;r--)i.push(Math.floor(256*Math.random()));return i},bytesToWords:function(r){for(var i=[],s=0,o=0;s>>5]|=r[s]<<24-o%32;return i},wordsToBytes:function(r){for(var i=[],s=0;s<32*r.length;s+=8)i.push(r[s>>>5]>>>24-s%32&255);return i},bytesToHex:function(r){for(var i=[],s=0;s>>4).toString(16)),i.push((15&r[s]).toString(16));return i.join("")},hexToBytes:function(r){for(var i=[],s=0;s>>6*(3-a)&63)):i.push("=");return i.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/gi,"");for(var i=[],s=0,o=0;s>>6-2*o);return i}},n.exports=e},135(n){function t(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}n.exports=function(e){return e!=null&&(t(e)||(function(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&t(r.slice(0,0))})(e)||!!e._isBuffer)}},542(n,t,e){(function(){var r=e(298),i=e(526).utf8,s=e(135),o=e(526).bin,a=function(l,u){l.constructor==String?l=u&&u.encoding==="binary"?o.stringToBytes(l):i.stringToBytes(l):s(l)?l=Array.prototype.slice.call(l,0):Array.isArray(l)||l.constructor===Uint8Array||(l=l.toString());for(var c=r.bytesToWords(l),h=8*l.length,p=1732584193,m=-271733879,g=-1732584194,f=271733878,d=0;d>>24)|4278255360&(c[d]<<24|c[d]>>>8);c[h>>>5]|=128<>>9<<4)]=h;var b=a._ff,y=a._gg,x=a._hh,v=a._ii;for(d=0;d>>0,m=m+E>>>0,g=g+N>>>0,f=f+S>>>0}return r.endian([p,m,g,f])};a._ff=function(l,u,c,h,p,m,g){var f=l+(u&c|~u&h)+(p>>>0)+g;return(f<>>32-m)+u},a._gg=function(l,u,c,h,p,m,g){var f=l+(u&h|c&~h)+(p>>>0)+g;return(f<>>32-m)+u},a._hh=function(l,u,c,h,p,m,g){var f=l+(u^c^h)+(p>>>0)+g;return(f<>>32-m)+u},a._ii=function(l,u,c,h,p,m,g){var f=l+(c^(u|~h))+(p>>>0)+g;return(f<>>32-m)+u},a._blocksize=16,a._digestsize=16,n.exports=function(l,u){if(l==null)throw new Error("Illegal argument "+l);var c=r.wordsToBytes(a(l,u));return u&&u.asBytes?c:u&&u.asString?o.bytesToString(c):r.bytesToHex(c)}})()},285(n,t,e){var r=e(2);n.exports=function(x,v){if(!x)return[];var w=(v=v||{}).max==null?1e5:v.max,E=v.maxLength==null?4e6:v.maxLength;return x.substr(0,2)==="{}"&&(x="\\{\\}"+x.substr(2)),y((function(N){return N.split("\\\\").join(i).split("\\{").join(s).split("\\}").join(o).split("\\,").join(a).split("\\.").join(l)})(x),w,E,!0).map(c)};var i="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function u(x){return parseInt(x,10)==x?parseInt(x,10):x.charCodeAt(0)}function c(x){return x.split(i).join("\\").split(s).join("{").split(o).join("}").split(a).join(",").split(l).join(".")}function h(x){if(!x)return[""];var v=[],w=r("{","}",x);if(!w)return x.split(",");var E=w.pre,N=w.body,S=w.post,T=E.split(",");T[T.length-1]+="{"+N+"}";var P=h(S);return S.length&&(T[T.length-1]+=P.shift(),T.push.apply(T,P)),v.push.apply(v,T),v}function p(x){return"{"+x+"}"}function m(x){return/^-?0\d/.test(x)}function g(x,v){return x<=v}function f(x,v){return x>=v}function d(x,v,w,E,N,S){for(var T=[],P=0,M=0;M=E)return T;var A=x[M]+v+w[J];if(!S||A){if(P+A.length>N)return T;T.push(A),P+=A.length}}return T}function b(x,v,w,E){var N=x.split(/\.\./),S=[];if(N[0]===void 0||N[1]===void 0)return S;var T=u(N[0]),P=u(N[1]),M=Math.max(N[0].length,N[1].length),J=N.length===3&&N[2]!==void 0?Math.max(Math.abs(u(N[2])),1):1,A=g;P0){var et=new Array(W+1).join("0");j=K<0?"-"+et+j.slice(1):et+j}}if(Y+j.length>E)break;S.push(j),Y+=j.length}return S}function y(x,v,w,E){for(var N=[""],S=!1,T=!0;;){const C=r("{","}",x);if(!C)return d(N,x,[""],v,w,S);const lt=C.pre;if(/\$$/.test(lt)){if(N=d(N,lt+"{"+C.body+"}",[""],v,w,S&&!C.post.length),T=!1,!C.post.length)break;x=C.post}else{var P,M=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(C.body),J=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(C.body),A=M||J,ot=C.body.indexOf(",")>=0;if(!A&&!ot){if(C.post.match(/,(?!,).*\}/)){x=C.pre+"{"+C.body+o+C.post,E=!0;continue}return d(N,lt+"{"+C.body+"}"+C.post,[""],v,w,S)}if(T&&(S=E&&!A,T=!1),A)P=b(C.body,J,v,w);else{var Y=h(C.body);if(Y.length===1&&Y[0]!==void 0&&(Y=y(Y[0],v,w,!1).map(p)).length===1){if(N=d(N,lt+Y[0],[""],v,w,S&&!C.post.length),!C.post.length)break;x=C.post;continue}for(var K=S&&!C.post.length&&!lt,j=0;K&&j=v||W+$t.length>w)break t;P.push($t),W+=$t.length}}}if(N=d(N,lt,P,v,w,S&&!C.post.length),!C.post.length)break;x=C.post}}return N}},829(n){function t(u){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},t(u)}function e(u){var c=typeof Map=="function"?new Map:void 0;return e=function(h){if(h===null||(p=h,Function.toString.call(p).indexOf("[native code]")===-1))return h;var p;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(c!==void 0){if(c.has(h))return c.get(h);c.set(h,m)}function m(){return r(h,arguments,s(this).constructor)}return m.prototype=Object.create(h.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),i(m,h)},e(u)}function r(u,c,h){return r=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch{return!1}})()?Reflect.construct:function(p,m,g){var f=[null];f.push.apply(f,m);var d=new(Function.bind.apply(p,f));return g&&i(d,g.prototype),d},r.apply(null,arguments)}function i(u,c){return i=Object.setPrototypeOf||function(h,p){return h.__proto__=p,h},i(u,c)}function s(u){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},s(u)}var o=(function(u){function c(h){var p;return(function(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")})(this,c),(p=(function(m,g){return!g||t(g)!=="object"&&typeof g!="function"?(function(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f})(m):g})(this,s(c).call(this,h))).name="ObjectPrototypeMutationError",p}return(function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),p&&i(h,p)})(c,u),c})(e(Error));function a(u,c){for(var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},p=c.split("."),m=p.length,g=function(b){var y=p[b];if(!u)return{v:void 0};if(y==="+"){if(Array.isArray(u))return{v:u.map((function(v,w){var E=p.slice(b+1);return E.length>0?a(v,E.join("."),h):h(u,w,p,b)}))};var x=p.slice(0,b).join(".");throw new Error("Object at wildcard (".concat(x,") is not an array"))}u=h(u,y,p,b)},f=0;f2&&arguments[2]!==void 0?arguments[2]:{};if(t(u)!="object"||u===null||c===void 0)return!1;if(typeof c=="number")return c in u;try{var p=!1;return a(u,c,(function(m,g,f,d){if(!l(f,d))return m&&m[g];p=h.own?m.hasOwnProperty(g):g in m})),p}catch{return!1}},hasOwn:function(u,c,h){return this.has(u,c,h||{own:!0})},isIn:function(u,c,h){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t(u)!="object"||u===null||c===void 0)return!1;try{var m=!1,g=!1;return a(u,c,(function(f,d,b,y){return m=m||f===h||!!f&&f[d]===h,g=l(b,y)&&t(f)==="object"&&d in f,f&&f[d]})),p.validPath?m&&g:m}catch{return!1}},ObjectPrototypeMutationError:o}},47(n,t,e){var r=e(410),i=function(u){return typeof u=="string"};function s(u,c){for(var h=[],p=0;p=-1&&!c;h--){var p=h>=0?arguments[h]:It.cwd();if(!i(p))throw new TypeError("Arguments to path.resolve must be strings");p&&(u=p+"/"+u,c=p.charAt(0)==="/")}return(c?"/":"")+(u=s(u.split("/"),!c).join("/"))||"."},a.normalize=function(u){var c=a.isAbsolute(u),h=u.substr(-1)==="/";return(u=s(u.split("/"),!c).join("/"))||c||(u="."),u&&h&&(u+="/"),(c?"/":"")+u},a.isAbsolute=function(u){return u.charAt(0)==="/"},a.join=function(){for(var u="",c=0;c=0&&y[v]==="";v--);return x>v?[]:y.slice(x,v+1)}u=a.resolve(u).substr(1),c=a.resolve(c).substr(1);for(var p=h(u.split("/")),m=h(c.split("/")),g=Math.min(p.length,m.length),f=g,d=0;d=2&&(v=v.slice(2)):f(E)?v=w[4]:E?N&&(v=v.slice(2)):T>=2&&f(x.protocol)&&(v=w[4]),{protocol:E,slashes:N||f(E),slashesCount:T,rest:v}}function b(y,x,v){if(y=(y=h(y)).replace(o,""),!(this instanceof b))return new b(y,x,v);var w,E,N,S,T,P,M=p.slice(),J=typeof x,A=this,ot=0;for(J!=="object"&&J!=="string"&&(v=x,x=null),v&&typeof v!="function"&&(v=i.parse),w=!(E=d(y||"",x=g(x))).protocol&&!E.slashes,A.slashes=E.slashes||w&&x.slashes,A.protocol=E.protocol||x.protocol||"",y=E.rest,(E.protocol==="file:"&&(E.slashesCount!==2||c.test(y))||!E.slashes&&(E.protocol||E.slashesCount<2||!f(A.protocol)))&&(M[3]=[/(.*)/,"pathname"]);ot{var t=n&&n.__esModule?()=>n.default:()=>n;return $.d(t,{a:t}),t},$.d=(n,t)=>{for(var e in t)$.o(t,e)&&!$.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},$.o=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),$.nmd=n=>(n.paths=[],n.children||(n.children=[]),n);var Wn=$(737),Gn=$.n(Wn);function Wt(n){if(!re(n))throw new Error("Parameter was not an error")}function re(n){return!!n&&typeof n=="object"&&(t=n,Object.prototype.toString.call(t)==="[object Error]")||n instanceof Error;var t}class B extends Error{constructor(t,e){const r=[...arguments],{options:i,shortMessage:s}=(function(a){let l,u="";if(a.length===0)l={};else if(re(a[0]))l={cause:a[0]},u=a.slice(1).join(" ")||"";else if(a[0]&&typeof a[0]=="object")l=Object.assign({},a[0]),u=a.slice(1).join(" ")||"";else{if(typeof a[0]!="string")throw new Error("Invalid arguments passed to Layerr");l={},u=u=a.join(" ")||""}return{options:l,shortMessage:u}})(r);let o=s;if(i.cause&&(o=`${o}: ${i.cause.message}`),super(o),this.message=o,i.name&&typeof i.name=="string"?this.name=i.name:this.name="Layerr",i.cause&&Object.defineProperty(this,"_cause",{value:i.cause}),Object.defineProperty(this,"_info",{value:{}}),i.info&&typeof i.info=="object"&&Object.assign(this._info,i.info),Error.captureStackTrace){const a=i.constructorOpt||this.constructor;Error.captureStackTrace(this,a)}}static cause(t){return Wt(t),t._cause&&re(t._cause)?t._cause:null}static fullStack(t){Wt(t);const e=B.cause(t);return e?`${t.stack} +caused by: ${B.fullStack(e)}`:t.stack??""}static info(t){Wt(t);const e={},r=B.cause(t);return r&&Object.assign(e,B.info(r)),t._info&&Object.assign(e,t._info),e}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}}var zn=$(47),Rt=$.n(zn);const Pe="__PATH_SEPARATOR_POSIX__",je="__PATH_SEPARATOR_WINDOWS__";function O(n){try{const t=n.replace(/\//g,Pe).replace(/\\\\/g,je);return encodeURIComponent(t).split(je).join("\\\\").split(Pe).join("/")}catch(t){throw new B(t,"Failed encoding path")}}function $e(n){return n.startsWith("/")?n:"/"+n}function jt(n){let t=n;return t[0]!=="/"&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function Hn(n){let t=new(Gn())(n).pathname;return t.length<=0&&(t="/"),jt(t)}function _(...n){return(function(){return(function(t){var e=[];if(t.length===0)return"";if(typeof t[0]!="string")throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var r=t.shift();t[0]=r+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var i=0;i0&&(s=s.replace(/^[\/]+/,"")),s=i0?"?":"")+a.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(n.reduce(((t,e,r)=>((r===0||e!=="/"||e==="/"&&t[t.length-1]!=="/")&&t.push(e),t)),[]))}var Yn=$(542),xt=$.n(Yn);function Ce(n,t){const e=n.url.replace("//",""),r=e.indexOf("/")==-1?"/":e.slice(e.indexOf("/")),i=n.method?n.method.toUpperCase():"GET",s=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",o=`00000000${t.nc}`.slice(-8),a=(function(p,m,g,f,d,b,y){const x=y||xt()(`${m}:${g}:${f}`);return p&&p.toLowerCase()==="md5-sess"?xt()(`${x}:${d}:${b}`):x})(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=xt()(`${i}:${r}`),u=s?xt()(`${a}:${t.nonce}:${o}:${t.cnonce}:${s}:${l}`):xt()(`${a}:${t.nonce}:${l}`),c={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:s,response:u,nc:o,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},h=[];for(const p in c)c[p]&&(p==="qop"||p==="nc"||p==="algorithm"?h.push(`${p}=${c[p]}`):h.push(`${p}="${c[p]}"`));return`Digest ${h.join(", ")}`}function sn(n){return(n.headers&&n.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var Xn=$(101),on=$.n(Xn);function Oe(n){return on().decode(n)}function _e(n,t){var e;return`Basic ${e=`${n}:${t}`,on().encode(e)}`}let H=(function(n){return n.Auto="auto",n.Digest="digest",n.None="none",n.Password="password",n.Token="token",n})({}),st=(function(n){return n.DataTypeNoLength="data-type-no-length",n.InvalidAuthType="invalid-auth-type",n.InvalidOutputFormat="invalid-output-format",n.LinkUnsupportedAuthType="link-unsupported-auth",n.InvalidUpdateRange="invalid-update-range",n.NotSupported="not-supported",n})({});function an(n,t,e,r,i){switch(n.authType){case H.Auto:t&&e&&(n.headers.Authorization=_e(t,e));break;case H.Digest:n.digest=(function(o,a,l){return{username:o,password:a,ha1:l,nc:0,algorithm:"md5",hasDigestAuth:!1}})(t,e,i);break;case H.None:break;case H.Password:n.headers.Authorization=_e(t,e);break;case H.Token:n.headers.Authorization=`${(s=r).token_type} ${s.access_token}`;break;default:throw new B({info:{code:st.InvalidAuthType}},`Invalid auth type: ${n.authType}`)}var s}$(345),$(800);const ke=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,Zn=ke.fetch.bind(ke),Ie="@@HOTPATCHER",Jn=()=>{};function Gt(n){return{original:n,methods:[n],final:!1}}class Kn{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=Ie}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(t){this.configuration.getEmptyAction=t}control(t,e=!1){if(!t||t.__type__!==Ie)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(t.configuration.registry).forEach((r=>{this.configuration.registry.hasOwnProperty(r)?e&&(this.configuration.registry[r]=Object.assign({},t.configuration.registry[r])):this.configuration.registry[r]=Object.assign({},t.configuration.registry[r])})),t._configuration=this.configuration,this}execute(t,...e){return(this.get(t)||Jn)(...e)}get(t){const e=this.configuration.registry[t];if(!e)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${t}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return(function(...r){if(r.length===0)throw new Error("Failed creating sequence: No functions provided");return function(...i){let s=i;const o=this;for(;r.length>0;)s=[r.shift().apply(o,s)];return s[0]}})(...e.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,e,r={}){const{chain:i=!1}=r;if(this.configuration.registry[t]&&this.configuration.registry[t].final)throw new Error(`Failed patching '${t}': Method marked as being final`);if(typeof e!="function")throw new Error(`Failed patching '${t}': Provided method is not a function`);if(i)this.configuration.registry[t]?this.configuration.registry[t].methods.push(e):this.configuration.registry[t]=Gt(e);else if(this.isPatched(t)){const{original:s}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(Gt(e),{original:s})}else this.configuration.registry[t]=Gt(e);return this}patchInline(t,e,...r){return this.isPatched(t)||this.patch(t,e),this.execute(t,...r)}plugin(t,...e){return e.forEach((r=>{this.patch(t,r,{chain:!0})})),this}restore(t){if(!this.isPatched(t))throw new Error(`Failed restoring method: No method present for key: ${t}`);if(typeof this.configuration.registry[t].original!="function")throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${t}`);return this.configuration.registry[t].methods=[this.configuration.registry[t].original],this}setFinal(t){if(!this.configuration.registry.hasOwnProperty(t))throw new Error(`Failed marking '${t}' as final: No method found for key`);return this.configuration.registry[t].final=!0,this}}let zt=null;function Qn(){return zt||(zt=new Kn),zt}function Lt(n){return(function(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e})(n)?Object.assign({},n):Object.setPrototypeOf(Object.assign({},n),Object.getPrototypeOf(n))}function Re(...n){let t=null,e=[...n];for(;e.length>0;){const r=e.shift();t=t?cn(t,r):Lt(r)}return t}function cn(n,t){const e=Lt(n);return Object.keys(t).forEach((r=>{e.hasOwnProperty(r)?Array.isArray(t[r])?e[r]=Array.isArray(e[r])?[...e[r],...t[r]]:[...t[r]]:typeof t[r]=="object"&&t[r]?e[r]=typeof e[r]=="object"&&e[r]?cn(e[r],t[r]):Lt(t[r]):e[r]=t[r]:e[r]=t[r]})),e}function tr(n){const t={};return n.forEach(((e,r)=>{t[r]=e})),t}function ie(...n){if(n.length===0)return{};const t={};return n.reduce(((e,r)=>(Object.keys(r).forEach((i=>{const s=i.toLowerCase();t.hasOwnProperty(s)?e[t[s]]=r[i]:(t[s]=i,e[i]=r[i])})),e)),{})}$(805);const er=typeof ArrayBuffer=="function",{toString:nr}=Object.prototype;function un(n){return er&&(n instanceof ArrayBuffer||nr.call(n)==="[object ArrayBuffer]")}function ln(n){return n!=null&&n.constructor!=null&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function de(n){return function(){for(var t=[],e=0;et.patchInline("fetch",Zn,e.url,(function(r){let i={};const s={method:r.method};if(r.headers&&(i=ie(i,r.headers)),r.data!==void 0){const[o,a]=(function(l){if(typeof l=="string")return[l,{}];if(ln(l))return[l,{}];if(un(l))return[l,{}];if(l&&typeof l=="object")return[JSON.stringify(l),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof l)})(r.data);s.body=o,i=ie(i,a)}return r.signal&&(s.signal=r.signal),r.withCredentials&&(s.credentials="include"),s.headers=i,s})(e))),n)}var ir=$(285);const Dt=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>65536)throw new TypeError("pattern is too long")},sr={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},vt=n=>n.replace(/[[\]\\-]/g,"\\$&"),Le=n=>n.join(""),or=(n,t)=>{const e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");const r=[],i=[];let s=e+1,o=!1,a=!1,l=!1,u=!1,c=e,h="";t:for(;sh?r.push(vt(h)+"-"+vt(f)):f===h&&r.push(vt(f)),h="",s++):n.startsWith("-]",s+1)?(r.push(vt(f+"-")),s+=2):n.startsWith("-",s+1)?(h=f,s+=2):(r.push(vt(f)),s++)}else l=!0,s++}else u=!0,s++}if(ct?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var z;const ar=new Set(["!","?","+","*","@"]),oe=n=>ar.has(n),Me=n=>oe(n.type),cr=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),ur=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),lr=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),De=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),Ht="(?!\\.)",hr=new Set(["[","."]),pr=new Set(["..","."]),fr=new Set("().*{}+?[]^$\\!"),ge="[^/]",Fe=ge+"*?",Ue=ge+"+?";class me{type;#n;#r;#i=!1;#t=[];#e;#a;#u;#c=!1;#s;#o;#l=!1;constructor(t,e,r={}){this.type=t,t&&(this.#r=!0),this.#e=e,this.#n=this.#e?this.#e.#n:this,this.#s=this.#n===this?r:this.#n.#s,this.#u=this.#n===this?[]:this.#n.#u,t!=="!"||this.#n.#c||this.#u.push(this),this.#a=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#t.map((t=>String(t))).join("|")+")":this.#o=this.#t.map((t=>String(t))).join("")}#y(){if(this!==this.#n)throw new Error("should only call on root");if(this.#c)return this;let t;for(this.toString(),this.#c=!0;t=this.#u.pop();){if(t.type!=="!")continue;let e=t,r=e.#e;for(;r;){for(let i=e.#a+1;!r.type&&itypeof e=="string"?e:e.toJSON())):[this.type,...this.#t.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#c&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#n===this)return!0;if(!this.#e?.isStart())return!1;if(this.#a===0)return!0;const t=this.#e;for(let e=0;e{const[m,g,f,d]=typeof p=="string"?z.#N(p,this.#r,l):p.toRegExpSource(t);return this.#r=this.#r||f,this.#i=this.#i||d,m})).join("");let c="";if(this.isStart()&&typeof this.#t[0]=="string"&&(this.#t.length!==1||!pr.has(this.#t[0]))){const p=hr,m=e&&p.has(u.charAt(0))||u.startsWith("\\.")&&p.has(u.charAt(2))||u.startsWith("\\.\\.")&&p.has(u.charAt(4)),g=!e&&!t&&p.has(u.charAt(0));c=m?"(?!(?:^|/)\\.\\.?(?:$|/))":g?Ht:""}let h="";return this.isEnd()&&this.#n.#c&&this.#e?.type==="!"&&(h="(?:$|\\/)"),[c+u+h,St(u),this.#r=!!this.#r,this.#i]}const r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:";let s=this.#m(e);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){const l=this.toString(),u=this;return u.#t=[l],u.type=null,u.#r=void 0,[l,St(this.toString()),!1,!1]}let o=!r||t||e?"":this.#m(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";return a=this.type==="!"&&this.#l?(this.isStart()&&!e?Ht:"")+Ue:i+s+(this.type==="!"?"))"+(!this.isStart()||e||t?"":Ht)+Fe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`),[a,St(s),this.#r=!!this.#r,this.#i]}#m(t){return this.#t.map((e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[r,i,s,o]=e.toRegExpSource(t);return this.#i=this.#i||o,r})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#N(t,e,r=!1){let i=!1,s="",o=!1,a=!1;for(let l=0;l(Dt(t),!(!e.nocomment&&t.charAt(0)==="#")&&new Ft(t,e).match(n)),dr=/^\*+([^+@!?\*\[\(]*)$/,gr=n=>t=>!t.startsWith(".")&&t.endsWith(n),mr=n=>t=>t.endsWith(n),yr=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),br=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),xr=/^\*+\.\*+$/,vr=n=>!n.startsWith(".")&&n.includes("."),wr=n=>n!=="."&&n!==".."&&n.includes("."),Er=/^\.\*+$/,Nr=n=>n!=="."&&n!==".."&&n.startsWith("."),Ar=/^\*+$/,Sr=n=>n.length!==0&&!n.startsWith("."),Tr=n=>n.length!==0&&n!=="."&&n!=="..",Pr=/^\?+([^+@!?\*\[\(]*)?$/,jr=([n,t=""])=>{const e=pn([n]);return t?(t=t.toLowerCase(),r=>e(r)&&r.toLowerCase().endsWith(t)):e},$r=([n,t=""])=>{const e=fn([n]);return t?(t=t.toLowerCase(),r=>e(r)&&r.toLowerCase().endsWith(t)):e},Cr=([n,t=""])=>{const e=fn([n]);return t?r=>e(r)&&r.endsWith(t):e},Or=([n,t=""])=>{const e=pn([n]);return t?r=>e(r)&&r.endsWith(t):e},pn=([n])=>{const t=n.length;return e=>e.length===t&&!e.startsWith(".")},fn=([n])=>{const t=n.length;return e=>e.length===t&&e!=="."&&e!==".."},dn=typeof It=="object"&&It?typeof Bt=="object"&&Bt&&Bt.__MINIMATCH_TESTING_PLATFORM__||It.platform:"posix";F.sep=dn==="win32"?"\\":"/";const D=Symbol("globstar **");F.GLOBSTAR=D,F.filter=(n,t={})=>e=>F(e,n,t);const Q=(n,t={})=>Object.assign({},n,t);F.defaults=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return F;const t=F;return Object.assign(((e,r,i={})=>t(e,r,Q(n,i))),{Minimatch:class extends t.Minimatch{constructor(e,r={}){super(e,Q(n,r))}static defaults(e){return t.defaults(Q(n,e)).Minimatch}},AST:class extends t.AST{constructor(e,r,i={}){super(e,r,Q(n,i))}static fromGlob(e,r={}){return t.AST.fromGlob(e,Q(n,r))}},unescape:(e,r={})=>t.unescape(e,Q(n,r)),escape:(e,r={})=>t.escape(e,Q(n,r)),filter:(e,r={})=>t.filter(e,Q(n,r)),defaults:e=>t.defaults(Q(n,e)),makeRe:(e,r={})=>t.makeRe(e,Q(n,r)),braceExpand:(e,r={})=>t.braceExpand(e,Q(n,r)),match:(e,r,i={})=>t.match(e,r,Q(n,i)),sep:t.sep,GLOBSTAR:D})};const gn=(n,t={})=>(Dt(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:ir(n));F.braceExpand=gn,F.makeRe=(n,t={})=>new Ft(n,t).makeRe(),F.match=(n,t,e={})=>{const r=new Ft(t,e);return n=n.filter((i=>r.match(i))),r.options.nonull&&!n.length&&n.push(t),n};const Ve=/[?*]|[+@!]\(.*?\)|\[|\]/;class Ft{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,e={}){Dt(t),e=e||{},this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion??200,this.pattern=t,this.platform=e.platform||dn,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#")return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);const r=this.globSet.map((s=>this.slashSplit(s)));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map(((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const l=!(s[0]!==""||s[1]!==""||s[2]!=="?"&&Ve.test(s[2])||Ve.test(s[3])),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map((c=>this.parse(c)))];if(u)return[s[0],...s.slice(1).map((c=>this.parse(c)))]}return s.map((l=>this.parse(l)))}));if(this.debug(this.pattern,i),this.set=i.filter((s=>s.indexOf(!1)===-1)),this.isWindows)for(let s=0;s=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((e=>{let r=-1;for(;(r=e.indexOf("**",r+1))!==-1;){let i=r;for(;e[i+1]==="**";)i++;i!==r&&e.splice(r,i-r)}return e}))}levelOneOptimize(t){return t.map((e=>(e=e.reduce(((r,i)=>{const s=r[r.length-1];return i==="**"&&s==="**"?r:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(r.pop(),r):(r.push(i),r)}),[])).length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;ii&&r.splice(i+1,o-i);let a=r[i+1];const l=r[i+2],u=r[i+3];if(a!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;e=!0,r.splice(i,1);const c=r.slice(0);c[i]="**",t.push(c),i--}if(!this.preserveMultipleSlashes){for(let o=1;oe.length))}partsMatch(t,e,r=!1){let i=0,s=0,o=[],a="";for(;i=2&&(t=this.levelTwoFileOptimize(t)),e.includes(D)?this.#n(t,e,r,i,s):this.#i(t,e,r,i,s)}#n(t,e,r,i,s){const o=e.indexOf(D,s),a=e.lastIndexOf(D),[l,u,c]=r?[e.slice(s,o),e.slice(o+1),[]]:[e.slice(s,o),e.slice(o+1,a),e.slice(a+1)];if(l.length){const y=t.slice(i,i+l.length);if(!this.#i(y,l,r,0,0))return!1;i+=l.length}let h=0;if(c.length){if(c.length+i>t.length)return!1;let y=t.length-c.length;if(this.#i(t,c,r,y,0))h=c.length;else{if(t[t.length-1]!==""||i+c.length===t.length||(y--,!this.#i(t,c,r,y,0)))return!1;h=c.length+1}}if(!u.length){let y=!!h;for(let x=i;x{const u=l.map((c=>{if(c instanceof RegExp)for(const h of c.flags.split(""))i.add(h);return typeof c=="string"?c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):c===D?D:c._src}));return u.forEach(((c,h)=>{const p=u[h+1],m=u[h-1];c===D&&m!==D&&(m===void 0?p!==void 0&&p!==D?u[h+1]="(?:\\/|"+r+"\\/)?"+p:u[h]=r:p===void 0?u[h-1]=m+"(?:\\/|"+r+")?":p!==D&&(u[h-1]=m+"(?:\\/|\\/"+r+"\\/)"+p,u[h+1]=D))})),u.filter((c=>c!==D)).join("/")})).join("|");const[o,a]=t.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;const r=this.options;this.isWindows&&(t=t.split("\\").join("/"));const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let a=i.length-2;!o&&a>=0;a--)o=i[a];for(let a=0;a=400)throw ye(t);return t}function yt(n,t,e=!1){return e?{data:t,headers:n.headers?tr(n.headers):{},status:n.status,statusText:n.statusText}:t}F.AST=me,F.Minimatch=Ft,F.escape=(n,{windowsPathsNoEscape:t=!1}={})=>t?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&"),F.unescape=St;const _r=(qe=function(n,t,e,r={}){const i=R({url:_(n.remoteURL,O(t)),method:"COPY",headers:{Destination:_(n.remoteURL,O(e)),Overwrite:r.overwrite===!1?"F":"T",Depth:r.shallow?"0":"infinity"}},n,r);return o=function(a){L(n,a)},(s=I(i,n))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o},function(){for(var n=[],t=0;tbe.includes(n)?"__"+n:n,Ir={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0,unicode:!1},tagValueProcessor:function(n,t){return t},attributeValueProcessor:function(n,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,t,e){return n},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:bn};function Rr(n,t){if(typeof n!="string")return;const e=n.toLowerCase();if(be.some((r=>e===r.toLowerCase())))throw new Error(`[SECURITY] Invalid ${t}: "${n}" is a reserved JavaScript keyword that could cause prototype pollution`);if(yn.some((r=>e===r.toLowerCase())))throw new Error(`[SECURITY] Invalid ${t}: "${n}" is a reserved JavaScript keyword that could cause prototype pollution`)}function xn(n,t){return typeof n=="boolean"?{enabled:n,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof n=="object"&&n!==null?{enabled:n.enabled!==!1,maxEntitySize:Math.max(1,n.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,n.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,n.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,n.maxExpandedLength??1e5),maxEntityCount:Math.max(1,n.maxEntityCount??1e3),allowedTags:n.allowedTags??null,tagFilter:n.tagFilter??null,appliesTo:n.appliesTo??"all"}:xn(!0)}const Lr=function(n){const t=Object.assign({},Ir,n),e=[{value:t.attributeNamePrefix,name:"attributeNamePrefix"},{value:t.attributesGroupName,name:"attributesGroupName"},{value:t.textNodeName,name:"textNodeName"},{value:t.cdataPropName,name:"cdataPropName"},{value:t.commentPropName,name:"commentPropName"}];for(const{value:r,name:i}of e)r&&Rr(r,i);return t.onDangerousProperty===null&&(t.onDangerousProperty=bn),t.processEntities=xn(t.processEntities,t.htmlEntities),t.unpairedTagsSet=new Set(t.unpairedTags),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map((r=>typeof r=="string"&&r.startsWith("*.")?".."+r.substring(2):r))),t};let ht;ht=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class rt{constructor(t){this.tagname=t,this.child=[],this[":@"]=Object.create(null)}add(t,e){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),this.addStartIndex(e)}addStartIndex(t){t!==void 0&&(this.child[this.child.length-1][ht]={startIndex:t})}addEndIndex(t){const e=this.child[this.child.length-1];e!==void 0&&e[ht]!==void 0&&e[ht].endIndex===void 0&&(e[ht].endIndex=t)}static getMetaDataSymbol(){return ht}}const We=":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�",vn=":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",Mr=vn+"\\-\\.\\d·̀-ͯ҇‿-⁀",xe=(n,t,e="")=>{const r=`[${n.replace(":","")}][${t.replace(":","")}]*`;return{name:new RegExp(`^[${n}][${t}]*$`,e),ncName:new RegExp(`^${r}$`,e),qName:new RegExp(`^${r}(?::${r})?$`,e),nmToken:new RegExp(`^[${t}]+$`,e),nmTokens:new RegExp(`^[${t}]+(?:\\s+[${t}]+)*$`,e)}},Dr=xe(We,We+"\\-\\.\\d·̀-ͯ‿-⁀"),Fr=xe(vn,Mr,"u"),Ge=":A-Za-z_",Ur=xe(Ge,Ge+"\\-\\.\\d"),wn=(n="1.0",t=!1)=>t?Ur:n==="1.1"?Fr:Dr,En=(n,{xmlVersion:t="1.0",asciiOnly:e=!1}={})=>wn(t,e).qName.test(n),ze=["name","ncName","qName","nmToken","nmTokens"],Nn=(n,{xmlVersion:t="1.0",asciiOnly:e=!1,maxCacheSize:r=2048}={})=>{if(!ze.includes(n))throw new TypeError(`Unknown production "${n}". Must be one of: ${ze.join(", ")}`);const i=wn(t,e)[n];let s=new Map;const o=a=>{const l=s.get(a);if(l!==void 0)return l;const u=i.test(a);return s.size{s=new Map},o};class Vr{constructor(t,e){this.suppressValidationErr=!t,this.options=t,this.xmlVersion=e||1}setXmlVersion(t=1){this.xmlVersion=t}readDocType(t,e){const r=Object.create(null);let i=0;if(t[e+3]!=="O"||t[e+4]!=="C"||t[e+5]!=="T"||t[e+6]!=="Y"||t[e+7]!=="P"||t[e+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let s=1,o=!1,a=!1,l=null,u="";for(;e"){if(a?t[e-1]==="-"&&t[e-2]==="-"&&(a=!1,s--):s--,s===0)break}else t[e]==="["?o=!0:u+=t[e];else{if(o&&ct(t,"!ENTITY",e)){let c,h;if(e+=7,[c,h,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),h.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&i>=this.options.maxEntityCount)throw new Error(`Entity count (${i+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);r[c]=h,i++}}else if(o&&ct(t,"!ELEMENT",e)){e+=8;const{index:c}=this.readElementExp(t,e+1);e=c}else if(o&&ct(t,"!ATTLIST",e))e+=8;else if(o&&ct(t,"!NOTATION",e)){e+=9;const{index:c}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=c}else{if(!ct(t,"!--",e))throw new Error("Invalid DOCTYPE");a=!0}s++,u=""}else l=t[e],u+=t[e];else t[e]===l&&(l=null),u+=t[e];if(l!==null||s!==0)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:e}}readEntityExp(t,e){const r=e=G(t,e);for(;ethis.options.maxEntitySize)throw new Error(`Entity "${i}" size (${s.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[i,s,--e]}readNotationExp(t,e){const r=e=G(t,e);for(;e{for(;t=48&&l<=57||l===45)){if(l=55296&&l<=56319){if(a+1=56320&&u<=57343){const c=65536+(l-55296<<10)+(u-56320);if(ae.has(c)){s=a;break}}}}else if(ce[l-Tt]!==255||Ot.has(l)){s=a;break}}}if(s===-1)return r;const o=[];s>0&&o.push(r.slice(0,s));for(let a=s;a=48&&l<=57||l===45){o.push(r[a]);continue}if(l=55296&&l<=56319){if(a+1=56320&&c<=57343){const h=65536+(l-55296<<10)+(c-56320),p=ae.get(h);if(p!==void 0){o.push(String.fromCharCode(p+48)),a++;continue}}}o.push(r[a]);continue}if(Ot.has(l)){o.push("-");continue}const u=ce[l-Tt];o.push(u!==255?String.fromCharCode(u+48):r[a])}return o.join("")})(e),e==="0"))return 0;if(t.hex&&Br.test(e))return Yt(e,16);if(t.binary&&Wr.test(e))return Yt(e,2);if(t.octal&&Gr.test(e))return Yt(e,8);if(isFinite(e)){if(e.includes("e")||e.includes("E"))return(function(r,i,s){if(!s.eNotation)return r;const o=i.match(Xr);if(o){let a=o[1]||"";const l=o[3].indexOf("e")===-1?"E":"e",u=o[2],c=a?r[u.length+1]===l:r[u.length]===l;return u.length>1&&c?r:(u.length!==1||!o[3].startsWith(`.${l}`)&&o[3][0]!==l)&&u.length>0?s.leadingZeros&&!c?(i=(o[1]||"")+o[3],Number(i)):r:Number(i)}return r})(n,e,t);{const r=zr.exec(e);if(r){const i=r[1]||"",s=r[2];let o=(function(l){if(l&&l.indexOf(".")!==-1){let u=l.length;for(;u>0&&l.charCodeAt(u-1)===48;)u--;return(l=l.slice(0,u))==="."?l="0":l[0]==="."?l="0"+l:l[l.length-1]==="."&&(l=l.substring(0,l.length-1)),l}return l})(r[3]);const a=i?n[s.length+1]===".":n[s.length]===".";if(!t.leadingZeros&&(s.length>1||s.length===1&&!a))return n;{const l=Number(e),u=String(l);if(l===0)return l;if(u.search(/[eE]/)!==-1)return t.eNotation?l:n;if(e.indexOf(".")!==-1)return u==="0"||u===o||u===`${i}${o}`?l:n;let c=s?o:e;return s?c===u||i+c===u?l:n:c===u||c===i+u?l:n}}return n}}return(function(r,i,s){const o=i===1/0;switch(s.infinity.toLowerCase()){case"null":return null;case"infinity":return i;case"string":return o?"Infinity":"-Infinity";default:return r}})(n,Number(e),t)}const Xr=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Yt(n,t){const e=n.trim();if(t!==2&&t!==8||(n=e.substring(2)),parseInt)return parseInt(n,t);if(Number.parseInt)return Number.parseInt(n,t);if(window&&window.parseInt)return window.parseInt(n,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}class Zr{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){const t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){const t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){const e=this._matcher.path;if(e.length!==0)return e[e.length-1].values?.[t]}hasAttr(t){const e=this._matcher.path;if(e.length===0)return!1;const r=e[e.length-1];return r.values!==void 0&&t in r.values}getAnyParentAttr(t){return this._matcher.getAnyParentAttr(t)}hasAnyParentAttr(t){return this._matcher.hasAnyParentAttr(t)}getPosition(){const t=this._matcher.path;return t.length===0?-1:t[t.length-1].position??0}getCounter(){const t=this._matcher.path;return t.length===0?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,e=!0){return this._matcher.toString(t,e)}toArray(){return this._matcher.path.map((t=>t.tag))}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class ve{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new Zr(this),this._keptAttrs=[]}push(t,e=null,r=null,i=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const s=this.path.length;let o=this.siblingStacks[s];o||(o={counts:new Map,total:0},this.siblingStacks[s]=o);const a=r?`${r}:${t}`:t,l=o.counts.get(a)||0,u=o.total;o.counts.set(a,l+1),o.total++;const c={tag:t,position:u,counter:l};r!=null&&(c.namespace=r),e!=null&&(c.values=e),this.path.push(c);const h=this.path.length,p=i!==null?i.keep:null;if(p!=null&&p.length>0&&e)for(let m=0;mthis.path.length+1&&(this.siblingStacks.length=this.path.length+1);const e=this.path.length+1;for(;this._keptAttrs.length>0&&this._keptAttrs[this._keptAttrs.length-1].depth>=e;)this._keptAttrs.pop();return t}updateCurrent(t){if(this.path.length>0){const e=this.path[this.path.length-1];t!=null&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(this.path.length!==0)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(this.path.length===0)return!1;const e=this.path[this.path.length-1];return e.values!==void 0&&t in e.values}getAnyParentAttr(t){const e=this._keptAttrs;for(let r=e.length-1;r>=0;r--)if(e[r].name===t)return e[r].value}hasAnyParentAttr(t){const e=this._keptAttrs;for(let r=e.length-1;r>=0;r--)if(e[r].name===t)return!0;return!1}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){const r=t||this.separator;if(r===this.separator&&e===!0){if(this._pathStringCache!==null)return this._pathStringCache;const i=this.path.map((s=>s.namespace?`${s.namespace}:${s.tag}`:s.tag)).join(r);return this._pathStringCache=i,i}return this.path.map((i=>e&&i.namespace?`${i.namespace}:${i.tag}`:i.tag)).join(r)}toArray(){return this.path.map((t=>t.tag))}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[],this._keptAttrs=[]}matches(t){const e=t.segments;return e.length!==0&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e=0&&e>=0;){const i=t[r];if(i.type==="deep-wildcard"){if(r--,r<0)return!0;const s=t[r];let o=!1;for(let a=e;a>=0;a--)if(this._matchSegment(s,this.path[a],a===this.path.length-1)){e=a-1,r--,o=!0;break}if(!o)return!1}else{if(!this._matchSegment(i,this.path[e],e===this.path.length-1))return!1;e--,r--}}return r<0}_matchSegment(t,e,r){if(t.tag!=="*"&&t.tag!==e.tag||t.namespace!==void 0&&t.namespace!=="*"&&t.namespace!==e.namespace||t.attrName!==void 0&&(!r||!e.values||!(t.attrName in e.values)||t.attrValue!==void 0&&String(e.values[t.attrName])!==String(t.attrValue)))return!1;if(t.position!==void 0){if(!r)return!1;const i=e.counter??0;if(t.position==="first"&&i!==0||t.position==="odd"&&i%2!=1||t.position==="even"&&i%2!=0||t.position==="nth"&&i!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map((t=>({...t}))),siblingStacks:this.siblingStacks.map((t=>t&&{counts:new Map(t.counts),total:t.total})),keptAttrs:this._keptAttrs.map((t=>({...t})))}}restore(t){this._pathStringCache=null,this.path=t.path.map((e=>({...e}))),this.siblingStacks=t.siblingStacks.map((e=>e&&{counts:new Map(e.counts),total:e.total})),this._keptAttrs=(t.keptAttrs||[]).map((e=>({...e})))}readOnly(){return this._view}}class mt{constructor(t,e={},r){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this.data=r,this._hasDeepWildcard=this.segments.some((i=>i.type==="deep-wildcard")),this._hasAttributeCondition=this.segments.some((i=>i.attrName!==void 0)),this._hasPositionSelector=this.segments.some((i=>i.position!==void 0))}_parse(t){const e=[];let r=0,i="";for(;r",lt:"<",quot:'"'},Qr={nbsp:" ",copy:"©",reg:"®",trade:"™",mdash:"—",ndash:"–",hellip:"…",laquo:"«",raquo:"»",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",para:"¶",sect:"§",deg:"°",frac12:"½",frac14:"¼",frac34:"¾"},Ut=Object.freeze({ALLOW:"allow",BLOCK:"block",THROW:"throw"}),ti=new Set("!?\\\\/[]$%{}^&*()<>|+");function He(n){if(n[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${n}"`);for(const t of n)if(ti.has(t))throw new Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${n}"`);return n}function Et(...n){const t=Object.create(null);for(const e of n)if(e)for(const r of Object.keys(e)){const i=e[r];if(typeof i=="string")t[r]=i;else if(i&&typeof i=="object"&&i.val!==void 0){const s=i.val;typeof s=="string"&&(t[r]=s)}}return t}const ut="external",_t="base",Xt="all",X=Object.freeze({allow:0,leave:1,remove:2,throw:3}),ei=new Set([9,10,13]);class Sn{constructor(t={}){var e;this._limit=t.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof t.postCheck=="function"?t.postCheck:i=>i,this._limitTiers=(e=this._limit.applyLimitsTo??ut)&&e!==ut?e===Xt?new Set([Xt]):e===_t?new Set([_t]):Array.isArray(e)?new Set(e):new Set([ut]):new Set([ut]),this._numericAllowed=t.numericAllowed??!0,this._baseMap=Et(An,t.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(t.remove&&Array.isArray(t.remove)?t.remove:[]),this._leaveSet=new Set(t.leave&&Array.isArray(t.leave)?t.leave:[]);const r=(function(i){if(!i)return{xmlVersion:1,onLevel:X.allow,nullLevel:X.remove};const s=i.xmlVersion===1.1?1.1:1,o=X[i.onNCR]??X.allow,a=X[i.nullNCR]??X.remove;return{xmlVersion:s,onLevel:o,nullLevel:Math.max(a,X.remove)}})(t.ncr);this._ncrXmlVersion=r.xmlVersion,this._ncrOnLevel=r.onLevel,this._ncrNullLevel=r.nullLevel,this._onExternalEntity=typeof t.onExternalEntity=="function"?t.onExternalEntity:null,this._onInputEntity=typeof t.onInputEntity=="function"?t.onInputEntity:null}_applyRegistrationHook(t,e,r,i){if(!t)return!0;const s=t(e,r);if(s===Ut.BLOCK)return!1;if(s===Ut.THROW)throw new Error(`[EntityDecoder] Registration of ${i} entity "&${e};" was rejected by hook`);return!0}setExternalEntities(t){if(t)for(const i of Object.keys(t))He(i);if(!this._onExternalEntity)return void(this._externalMap=Et(t));const e=Et(t),r=Object.create(null);for(const[i,s]of Object.entries(e))this._applyRegistrationHook(this._onExternalEntity,i,s,"external")&&(r[i]=s);this._externalMap=r}addExternalEntity(t,e){He(t),typeof e=="string"&&e.indexOf("&")===-1&&this._applyRegistrationHook(this._onExternalEntity,t,e,"external")&&(this._externalMap[t]=e)}addInputEntities(t){if(this._totalExpansions=0,this._expandedLength=0,!this._onInputEntity)return void(this._inputMap=Et(t));const e=Et(t),r=Object.create(null);for(const[i,s]of Object.entries(e))this._applyRegistrationHook(this._onInputEntity,i,s,"input")&&(r[i]=s);this._inputMap=r}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(t){this._ncrXmlVersion=t===1.1?1.1:1}decode(t){if(typeof t!="string"||t.length===0||t.indexOf("&")===-1)return t;const e=t,r=[],i=t.length;let s=0,o=0;const a=this._maxTotalExpansions>0,l=this._maxExpandedLength>0,u=a||l;for(;o=i||t.charCodeAt(h)!==59){o++;continue}const p=t.slice(o+1,h);if(p.length===0){o++;continue}let m,g;if(this._removeSet.has(p))m="",g===void 0&&(g=ut);else{if(this._leaveSet.has(p)){o++;continue}if(p.charCodeAt(0)===35){const f=this._resolveNCR(p);if(f===void 0){o++;continue}m=f,g=_t}else{const f=this._resolveName(p);m=f?.value,g=f?.tier}}if(m!==void 0){if(o>s&&r.push(t.slice(s,o)),r.push(m),s=h+1,o=s,u&&this._tierCounts(g)){if(a&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(l){const f=m.length-(p.length+2);if(f>0&&(this._expandedLength+=f,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}else o++}s=55296&&t<=57343||this._ncrXmlVersion===1&&t>=1&&t<=31&&!ei.has(t)?X.remove:-1}_applyNCRAction(t,e,r){switch(t){case X.allow:return String.fromCodePoint(r);case X.remove:return"";case X.leave:return;case X.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${e}; (U+${r.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(r)}}_resolveNCR(t){const e=t.charCodeAt(1);let r;if(r=e===120||e===88?parseInt(t.slice(2),16):parseInt(t.slice(1),10),Number.isNaN(r)||r<0||r>1114111)return;const i=this._classifyNCR(r);if(!this._numericAllowed&&i/]/i},{id:"html-script-close",description:"<\/script closing tag",pattern:/<\/script[\s>]/i},{id:"html-javascript-protocol",description:"javascript: URI scheme (with optional whitespace/encoding)",pattern:/j[\t\n\r ]*a[\t\n\r ]*v[\t\n\r ]*a[\t\n\r ]*s[\t\n\r ]*c[\t\n\r ]*r[\t\n\r ]*i[\t\n\r ]*p[\t\n\r ]*t[\t\n\r ]*:/i},{id:"html-vbscript-protocol",description:"vbscript: URI scheme",pattern:/vbscript[\t\n\r ]*:/i},{id:"html-data-html",description:"data:text/html URI — can execute scripts in browsers",pattern:/data[\t\n\r ]*:[\t\n\r ]*text\/html/i},{id:"html-data-xhtml",description:"data:application/xhtml+xml URI",pattern:/data[\t\n\r ]*:[\t\n\r ]*application\/xhtml/i},{id:"html-data-svg",description:"data:image/svg+xml URI — can execute scripts",pattern:/data[\t\n\r ]*:[\t\n\r ]*image\/svg\+xml/i},{id:"html-inline-event-handler",description:"Inline event handler attributes: onclick=, onerror=, onload=, etc.",pattern:/\bon\w{1,30}\s*=/i},{id:"html-entity-obfuscated-script",description:"HTML-entity-encoded