summaryrefslogtreecommitdiffstats
path: root/dist/files-main.js
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2021-12-03 17:25:57 +0100
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-01-08 10:15:45 +0100
commita6874aa7cef79ca01443dc19ce0f507a63008d0f (patch)
tree3077705a13e72264beff1af720284ebe4255dbe0 /dist/files-main.js
parent26fb63d81f09aa9a1019185ffab43fed5cbdac1d (diff)
downloadnextcloud-server-a6874aa7cef79ca01443dc19ce0f507a63008d0f.tar.gz
nextcloud-server-a6874aa7cef79ca01443dc19ce0f507a63008d0f.zip
Compile bundle
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'dist/files-main.js')
-rw-r--r--dist/files-main.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/files-main.js b/dist/files-main.js
index eac6e4f19a4..0f357d71684 100644
--- a/dist/files-main.js
+++ b/dist/files-main.js
@@ -1,3 +1,3 @@
/*! For license information please see files-main.js.LICENSE.txt */
-(()=>{"use strict";var e,n={68936:(e,n,i)=>{var a=i(20144);const r={name:"Setting",props:{el:{type:Function,required:!0}},mounted(){this.$el.appendChild(this.el())}};var l=i(51900);const o={name:"Settings",components:{Setting:(0,l.Z)(r,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,null,null).exports},data:()=>({settings:OCA.Files.Settings.settings})},s=(0,l.Z)(o,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"files-app-extra-settings"}},[e._l(e.settings,(function(e){return[n("Setting",{key:e.name,attrs:{el:e.el}})]}))],2)}),[],!1,null,"31c9bb4b",null).exports;function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}a.default.prototype.t=t,window.OCA.Files||(window.OCA.Files={}),Object.assign(window.OCA.Files,{Settings:new class{constructor(){var e,t;t=void 0,(e="_settings")in this?Object.defineProperty(this,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):this[e]=t,this._settings=[],console.debug("OCA.Files.Settings initialized")}register(e){return this._settings.filter((t=>t.name===e.name)).length>0?(console.error("A setting with the same name is already registered"),!1):(this._settings.push(e),!0)}get settings(){return this._settings}}}),Object.assign(window.OCA.Files.Settings,{Setting:class{constructor(e,t){let{el:n,open:i,close:a}=t;c(this,"_close",void 0),c(this,"_el",void 0),c(this,"_name",void 0),c(this,"_open",void 0),this._name=e,this._el=n,this._open=i,this._close=a,"function"!=typeof this._open&&(this._open=()=>{}),"function"!=typeof this._close&&(this._close=()=>{})}get name(){return this._name}get el(){return this._el}get open(){return this._open}get close(){return this._close}}}),window.addEventListener("DOMContentLoaded",(function(){new a.default({el:"#files-app-settings",render:e=>e(s)});const e=document.getElementById("app-settings-header");e&&e.addEventListener("click",(e=>{const t=e.currentTarget.children[0].classList.contains("opened");OCA.Files.Settings.settings.forEach((e=>t?e.close():e.open()))}))}));var d=i(17499),p=i(16453),A=i(9944),m=i(79753),u=i(22200);const h=function(){var e,t,n,i;const a=(null===(e=OCA)||void 0===e||null===(t=e.Files)||void 0===t||null===(n=t.App)||void 0===n||null===(i=n.currentFileList)||void 0===i?void 0:i.dirInfo)||{path:"/",name:""};return"".concat(a.path,"/").concat(a.name).replace(/\/\//gi,"/")};var f=i(4820),v=i(62520),g=i(26932),C=i(97e3),b=i.n(C),_=i(47450),w=i.n(_);const y=256,k={name:"TemplatePreview",inheritAttrs:!1,props:{basename:{type:String,required:!0},checked:{type:Boolean,default:!1},fileid:{type:[String,Number],required:!0},filename:{type:String,required:!0},previewUrl:{type:String,default:null},hasPreview:{type:Boolean,default:!0},mime:{type:String,required:!0},ratio:{type:Number,default:null}},data:()=>({failedPreview:!1}),computed:{nameWithoutExt(){return this.basename.indexOf(".")>-1?this.basename.split(".").slice(0,-1).join("."):this.basename},id(){return"template-picker-".concat(this.fileid)},realPreviewUrl(){return this.failedPreview&&this.mimeIcon?this.mimeIcon:this.previewUrl?this.previewUrl:(0,u.getCurrentUser)()?(0,m.generateUrl)("/core/preview?fileId=".concat(this.fileid,"&x=").concat(y,"&y=").concat(y,"&a=1")):(0,m.generateUrl)("/apps/files_sharing/publicpreview/".concat(document.getElementById("sharingToken")&&document.getElementById("sharingToken").value,"?fileId=").concat(this.fileid,"&file=").concat(function(e){const t=(e.startsWith("/")?e:"/".concat(e)).split("/");let n="";return t.forEach((e=>{""!==e&&(n+="/"+encodeURIComponent(e))})),n}(this.filename),"&x=").concat(y,"&y=").concat(y,"&a=1"))},mimeIcon(){return OC.MimeType.getIconUrl(this.mime)}},methods:{onCheck(){this.$emit("check",this.fileid)},onFailure(){this.failedPreview=!0}}},x=k;var E=i(93379),O=i.n(E),F=i(78299);O()(F.Z,{insert:"head",singleton:!1}),F.Z.locals;const P=(0,l.Z)(x,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("li",{staticClass:"template-picker__item"},[n("input",{staticClass:"radio",attrs:{id:e.id,type:"radio",name:"template-picker"},domProps:{checked:e.checked},on:{change:e.onCheck}}),e._v(" "),n("label",{staticClass:"template-picker__label",attrs:{for:e.id}},[n("div",{staticClass:"template-picker__preview",class:e.failedPreview?"template-picker__preview--failed":""},[n("img",{staticClass:"template-picker__image",attrs:{src:e.realPreviewUrl,alt:"",draggable:"false"},on:{error:e.onFailure}})]),e._v(" "),n("span",{staticClass:"template-picker__title"},[e._v("\n\t\t\t"+e._s(e.nameWithoutExt)+"\n\t\t")])])])}),[],!1,null,"440aea22",null).exports,T={name:"TemplatePicker",components:{EmptyContent:b(),Modal:w(),TemplatePreview:P},props:{logger:{type:Object,required:!0}},data:()=>({checked:-1,loading:!1,name:null,opened:!1,provider:null}),computed:{nameWithoutExt(){return this.name.indexOf(".")>-1?this.name.split(".").slice(0,-1).join("."):this.name},emptyTemplate(){var e,n;return{basename:t("files","Blank"),fileid:-1,filename:this.t("files","Blank"),hasPreview:!1,mime:(null===(e=this.provider)||void 0===e?void 0:e.mimetypes[0])||(null===(n=this.provider)||void 0===n?void 0:n.mimetypes)}},selectedTemplate(){return this.provider.templates.find((e=>e.fileid===this.checked))},style(){return{"--margin":"8px","--width":"160px","--border":"2px","--fullwidth":"180px","--height":this.provider.ratio?Math.round(160/this.provider.ratio)+"px":null}}},methods:{async open(e,t){this.checked=this.emptyTemplate.fileid,this.name=e,this.provider=t;const n=(await async function(){return(await f.default.get((0,m.generateOcsUrl)("apps/files/api/v1/templates"))).data.ocs.data}()).find((e=>e.app===t.app&&e.label===t.label));if(null===n)throw new Error("Failed to match provider in results");this.provider=n,0!==n.templates.length?this.opened=!0:this.onSubmit()},close(){this.checked=this.emptyTemplate.fileid,this.loading=!1,this.name=null,this.opened=!1,this.provider=null},onCheck(e){this.checked=e},async onSubmit(){var e,t,n;this.loading=!0;const i=h(),a=null===(e=OCA)||void 0===e||null===(t=e.Files)||void 0===t||null===(n=t.App)||void 0===n?void 0:n.currentFileList;var r,l;this.nameWithoutExt===this.name&&(this.logger.debug("Fixed invalid filename",{name:this.name,extension:null===(r=this.provider)||void 0===r?void 0:r.extension}),this.name=this.name+(null===(l=this.provider)||void 0===l?void 0:l.extension));try{var o,s;const e=await async function(e,t,n){return(await f.default.post((0,m.generateOcsUrl)("apps/files/api/v1/templates/create"),{filePath:e,templatePath:t,templateType:n})).data.ocs.data}((0,v.normalize)("".concat(i,"/").concat(this.name)),null===(o=this.selectedTemplate)||void 0===o?void 0:o.filename,null===(s=this.selectedTemplate)||void 0===s?void 0:s.templateType);this.logger.debug("Created new file",e),await(null==a?void 0:a.addAndFetchFileInfo(this.name)),OCA.Files.fileActions.getDefaultFileAction(e.mime,"file",OC.PERMISSION_ALL).action(e.basename,{$file:null==a?void 0:a.findFileEl(this.name),dir:i,fileList:a,fileActions:null==a?void 0:a.fileActions,fileInfoModel:null==a?void 0:a.getModelForFile(this.name)}),this.close()}catch(e){this.logger.error("Error while creating the new file from template"),console.error(e),(0,g.x2)(this.t("files","Unable to create new file from template"))}finally{this.loading=!1}}}};var B=i(1554);O()(B.Z,{insert:"head",singleton:!1}),B.Z.locals;const S=(0,l.Z)(T,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.opened?n("Modal",{staticClass:"templates-picker",attrs:{"clear-view-delay":-1,size:"large"},on:{close:e.close}},[n("form",{staticClass:"templates-picker__form",style:e.style,on:{submit:function(t){return t.preventDefault(),t.stopPropagation(),e.onSubmit.apply(null,arguments)}}},[n("h2",[e._v(e._s(e.t("files","Pick a template for {name}",{name:e.nameWithoutExt})))]),e._v(" "),n("ul",{staticClass:"templates-picker__list"},[n("TemplatePreview",e._b({attrs:{checked:e.checked===e.emptyTemplate.fileid},on:{check:e.onCheck}},"TemplatePreview",e.emptyTemplate,!1)),e._v(" "),e._l(e.provider.templates,(function(t){return n("TemplatePreview",e._b({key:t.fileid,attrs:{checked:e.checked===t.fileid,ratio:e.provider.ratio},on:{check:e.onCheck}},"TemplatePreview",t,!1))}))],2),e._v(" "),n("div",{staticClass:"templates-picker__buttons"},[n("button",{on:{click:e.close}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Cancel"))+"\n\t\t\t")]),e._v(" "),n("input",{staticClass:"primary",attrs:{type:"submit","aria-label":e.t("files","Create a new file with the selected template")},domProps:{value:e.t("files","Create")}})])]),e._v(" "),e.loading?n("EmptyContent",{staticClass:"templates-picker__loading",attrs:{icon:"icon-loading"}},[e._v("\n\t\t"+e._s(e.t("files","Creating file"))+"\n\t")]):e._e()],1):e._e()}),[],!1,null,"447a36e2",null).exports,j=(0,d.getLoggerBuilder)().setApp("files").detectUser().build();a.default.mixin({methods:{t:A.translate,n:A.translatePlural}});const M=document.createElement("div");M.id="template-picker",document.body.appendChild(M);let D=(0,p.loadState)("files","templates",[]),I=(0,p.loadState)("files","templates_path",!1);j.debug("Templates providers",D),j.debug("Templates folder",{templatesPath:I});const U=new(a.default.extend(S))({name:"TemplatePicker",propsData:{logger:j}});U.$mount("#template-picker"),window.addEventListener("DOMContentLoaded",(function(){if(!I){j.debug("Templates folder not initialized");const e={attach(e){e.addMenuEntry({id:"template-init",displayName:(0,A.translate)("files","Set up templates folder"),templateName:(0,A.translate)("files","Templates"),iconClass:"icon-template-add",fileType:"file",actionHandler(t){L(t),e.removeMenuEntry("template-init")}})}};OC.Plugins.register("OCA.Files.NewFileMenu",e)}})),D.forEach(((e,t)=>{const n={attach(n){const i=n.fileList;"files"!==i.id&&"files.public"!==i.id||n.addMenuEntry({id:"template-new-".concat(e.app,"-").concat(t),displayName:e.label,templateName:e.label+e.extension,iconClass:e.iconClass||"icon-file",fileType:"file",actionHandler(t){U.open(t,e)}})}};OC.Plugins.register("OCA.Files.NewFileMenu",n)}));const L=async function(e){const t=(h()+"/".concat(e)).replace("//","/");try{j.debug("Initializing the templates directory",{templatePath:t});const e=await f.default.post((0,m.generateOcsUrl)("apps/files/api/v1/templates/path"),{templatePath:t,copySystemTemplates:!0});OCA.Files.App.currentFileList.changeDirectory(t,!0,!0),D=e.data.ocs.data.templates,I=e.data.ocs.data.template_path}catch(e){j.error("Unable to initialize the templates directory"),(0,g.x2)((0,A.translate)("files","Unable to initialize the templates directory"))}};var q=i(74854);!function(){const e={attach(e){(0,q.subscribe)("nextcloud:unified-search.search",(t=>{let{query:n}=t;e.setFilter(n)})),(0,q.subscribe)("nextcloud:unified-search.reset",(()=>{this.query=null,e.setFilter("")}))}};window.OC.Plugins.register("OCA.Files.FileList",e)}()},78299:(e,t,n)=>{n.d(t,{Z:()=>o});var i=n(94015),a=n.n(i),r=n(23645),l=n.n(r)()(a());l.push([e.id,".template-picker__item[data-v-440aea22]{display:flex}.template-picker__label[data-v-440aea22]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-440aea22],.template-picker__label *[data-v-440aea22]{cursor:pointer;user-select:none}.template-picker__label[data-v-440aea22]::before{display:none !important}.template-picker__preview[data-v-440aea22]{display:block;overflow:hidden;flex:1 1;width:var(--width);min-height:var(--height);max-height:var(--height);padding:0;border:var(--border) solid var(--color-border);border-radius:var(--border-radius-large)}input:checked+label>.template-picker__preview[data-v-440aea22]{border-color:var(--color-primary)}.template-picker__preview--failed[data-v-440aea22]{display:flex}.template-picker__image[data-v-440aea22]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-440aea22]{width:calc(var(--margin)*8);margin:auto;background-color:transparent !important;object-fit:initial}.template-picker__title[data-v-440aea22]{overflow:hidden;max-width:calc(var(--width) + 4px);padding:var(--margin);white-space:nowrap;text-overflow:ellipsis}","",{version:3,sources:["webpack://./apps/files/src/components/TemplatePreview.vue"],names:[],mappings:"AAsJC,wCACC,YAAA,CAGD,yCACC,YAAA,CAEA,kBAAA,CACA,QAAA,CACA,qBAAA,CAEA,oFACC,cAAA,CACA,gBAAA,CAGD,iDACC,uBAAA,CAIF,2CACC,aAAA,CACA,eAAA,CAEA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,SAAA,CACA,8CAAA,CACA,wCAAA,CAEA,+DACC,iCAAA,CAGD,mDAEC,YAAA,CAIF,yCACC,cAAA,CACA,6CAAA,CAEA,gBAAA,CAID,2EACC,2BAAA,CAEA,WAAA,CACA,uCAAA,CAEA,kBAAA,CAGD,yCACC,eAAA,CAEA,kCAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA",sourcesContent:["\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\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\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\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.template-picker {\n\t&__item {\n\t\tdisplay: flex;\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\t// Align in the middle of the grid\n\t\talign-items: center;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\n\t\t&, * {\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\t&__preview {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\t// Stretch so all entries are the same width\n\t\tflex: 1 1;\n\t\twidth: var(--width);\n\t\tmin-height: var(--height);\n\t\tmax-height: var(--height);\n\t\tpadding: 0;\n\t\tborder: var(--border) solid var(--color-border);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\tinput:checked + label > & {\n\t\t\tborder-color: var(--color-primary);\n\t\t}\n\n\t\t&--failed {\n\t\t\t// Make sure to properly center fallback icon\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n\n\t&__image {\n\t\tmax-width: 100%;\n\t\tbackground-color: var(--color-main-background);\n\n\t\tobject-fit: cover;\n\t}\n\n\t// Failed preview, fallback to mime icon\n\t&__preview--failed &__image {\n\t\twidth: calc(var(--margin) * 8);\n\t\t// Center mime icon\n\t\tmargin: auto;\n\t\tbackground-color: transparent !important;\n\n\t\tobject-fit: initial;\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\t// also count preview border\n\t\tmax-width: calc(var(--width) + 2*2px);\n\t\tpadding: var(--margin);\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n"],sourceRoot:""}]);const o=l},1554:(e,t,n)=>{n.d(t,{Z:()=>o});var i=n(94015),a=n.n(i),r=n(23645),l=n.n(r)()(a());l.push([e.id,".templates-picker__form[data-v-447a36e2]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-447a36e2]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-447a36e2]{display:grid;grid-gap:calc(var(--margin)*2);grid-auto-columns:1fr;max-width:calc(var(--fullwidth)*6);grid-template-columns:repeat(auto-fit, var(--fullwidth));grid-auto-rows:1fr;justify-content:center}.templates-picker__buttons[data-v-447a36e2]{display:flex;justify-content:space-between;padding:calc(var(--margin)*2) var(--margin);position:sticky;bottom:0;background-image:linear-gradient(0, var(--gradient-main-background))}.templates-picker__buttons button[data-v-447a36e2],.templates-picker__buttons input[type=submit][data-v-447a36e2]{height:44px}.templates-picker[data-v-447a36e2] .modal-container{position:relative;overflow-y:auto !important}.templates-picker__loading[data-v-447a36e2]{position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;margin:0;background-color:var(--color-main-background-translucent)}","",{version:3,sources:["webpack://./apps/files/src/views/TemplatePicker.vue"],names:[],mappings:"AAsPC,yCACC,6BAAA,CAEA,gBAAA,CAEA,4CACC,iBAAA,CACA,gBAAA,CACA,4CAAA,CAIF,yCACC,YAAA,CACA,8BAAA,CACA,qBAAA,CAEA,kCAAA,CACA,wDAAA,CAEA,kBAAA,CAEA,sBAAA,CAGD,4CACC,YAAA,CACA,6BAAA,CACA,2CAAA,CACA,eAAA,CACA,QAAA,CACA,oEAAA,CAEA,kHACC,WAAA,CAKF,qDACC,iBAAA,CACA,0BAAA,CAGD,4CACC,iBAAA,CACA,KAAA,CACA,MAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,yDAAA",sourcesContent:["\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\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\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\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\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\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.templates-picker {\n\t&__form {\n\t\tpadding: calc(var(--margin) * 2);\n\t\t// Will be handled by the buttons\n\t\tpadding-bottom: 0;\n\n\t\th2 {\n\t\t\ttext-align: center;\n\t\t\tfont-weight: bold;\n\t\t\tmargin: var(--margin) 0 calc(var(--margin) * 2);\n\t\t}\n\t}\n\n\t&__list {\n\t\tdisplay: grid;\n\t\tgrid-gap: calc(var(--margin) * 2);\n\t\tgrid-auto-columns: 1fr;\n\t\t// We want maximum 5 columns. Putting 6 as we don't count the grid gap. So it will always be lower than 6\n\t\tmax-width: calc(var(--fullwidth) * 6);\n\t\tgrid-template-columns: repeat(auto-fit, var(--fullwidth));\n\t\t// Make sure all rows are the same height\n\t\tgrid-auto-rows: 1fr;\n\t\t// Center the columns set\n\t\tjustify-content: center;\n\t}\n\n\t&__buttons {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tpadding: calc(var(--margin) * 2) var(--margin);\n\t\tposition: sticky;\n\t\tbottom: 0;\n\t\tbackground-image: linear-gradient(0, var(--gradient-main-background));\n\n\t\tbutton, input[type='submit'] {\n\t\t\theight: 44px;\n\t\t}\n\t}\n\n\t// Make sure we're relative for the loading emptycontent on top\n\t::v-deep .modal-container {\n\t\tposition: relative;\n\t\toverflow-y: auto !important;\n\t}\n\n\t&__loading {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmargin: 0;\n\t\tbackground-color: var(--color-main-background-translucent);\n\t}\n}\n\n"],sourceRoot:""}]);const o=l}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=n,a.amdD=function(){throw new Error("define cannot be used indirect")},a.amdO={},e=[],a.O=(t,n,i,r)=>{if(!n){var l=1/0;for(d=0;d<e.length;d++){n=e[d][0],i=e[d][1],r=e[d][2];for(var o=!0,s=0;s<n.length;s++)(!1&r||l>=r)&&Object.keys(a.O).every((e=>a.O[e](n[s])))?n.splice(s--,1):(o=!1,r<l&&(l=r));if(o){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[n,i,r]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=181,(()=>{var e={181:0};a.O.j=t=>0===e[t];var t=(t,n)=>{var i,r,l=n[0],o=n[1],s=n[2],c=0;if(l.some((t=>0!==e[t]))){for(i in o)a.o(o,i)&&(a.m[i]=o[i]);if(s)var d=s(a)}for(t&&t(n);c<l.length;c++)r=l[c],a.o(e,r)&&e[r]&&e[r][0](),e[l[c]]=0;return a.O(d)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=a.O(void 0,[874],(()=>a(68936)));r=a.O(r)})();
-//# sourceMappingURL=files-main.js.map?v=80037b7e96e23616e9eb \ No newline at end of file
+!function(){"use strict";var e,n={68936:function(e,n,i){var r=i(20144);function a(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var o=function(){function e(){var n,t;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),t=void 0,(n="_settings")in this?Object.defineProperty(this,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):this[n]=t,this._settings=[],console.debug("OCA.Files.Settings initialized")}var n,t;return n=e,(t=[{key:"register",value:function(e){return this._settings.filter((function(n){return n.name===e.name})).length>0?(console.error("A setting with the same name is already registered"),!1):(this._settings.push(e),!0)}},{key:"settings",get:function(){return this._settings}}])&&a(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),e}(),l={name:"Setting",props:{el:{type:Function,required:!0}},mounted:function(){this.$el.appendChild(this.el())}},s=i(51900),c={name:"Settings",components:{Setting:(0,s.Z)(l,(function(){var e=this.$createElement;return(this._self._c||e)("div")}),[],!1,null,null,null).exports},data:function(){return{settings:OCA.Files.Settings.settings}}},u=(0,s.Z)(c,(function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{attrs:{id:"files-app-extra-settings"}},[e._l(e.settings,(function(e){return[t("Setting",{key:e.name,attrs:{el:e.el}})]}))],2)}),[],!1,null,"31c9bb4b",null).exports;function d(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function p(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var m=function(){function e(n,t){var i=t.el,r=t.open,a=t.close;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),p(this,"_close",void 0),p(this,"_el",void 0),p(this,"_name",void 0),p(this,"_open",void 0),this._name=n,this._el=i,this._open=r,this._close=a,"function"!=typeof this._open&&(this._open=function(){}),"function"!=typeof this._close&&(this._close=function(){})}var n,t;return n=e,(t=[{key:"name",get:function(){return this._name}},{key:"el",get:function(){return this._el}},{key:"open",get:function(){return this._open}},{key:"close",get:function(){return this._close}}])&&d(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),e}();r.default.prototype.t=t,window.OCA.Files||(window.OCA.Files={}),Object.assign(window.OCA.Files,{Settings:new o}),Object.assign(window.OCA.Files.Settings,{Setting:m}),window.addEventListener("DOMContentLoaded",(function(){new r.default({el:"#files-app-settings",render:function(e){return e(u)}});var e=document.getElementById("app-settings-header");e&&e.addEventListener("click",(function(e){var n=e.currentTarget.children[0].classList.contains("opened");OCA.Files.Settings.settings.forEach((function(e){return n?e.close():e.open()}))}))}));var f=i(17499),A=i(16453),v=i(9944),h=i(79753),g=i(22200),C=function(){var e,n,t,i,r=(null===(e=OCA)||void 0===e||null===(n=e.Files)||void 0===n||null===(t=n.App)||void 0===t||null===(i=t.currentFileList)||void 0===i?void 0:i.dirInfo)||{path:"/",name:""};return"".concat(r.path,"/").concat(r.name).replace(/\/\//gi,"/")},b=i(4820),w=i(62520),y=i(26932),_=i(97e3),k=i.n(_),x=i(47450),O=i.n(x);function P(e,n,t,i,r,a,o){try{var l=e[a](o),s=l.value}catch(e){return void t(e)}l.done?n(s):Promise.resolve(s).then(i,r)}function E(e){return function(){var n=this,t=arguments;return new Promise((function(i,r){var a=e.apply(n,t);function o(e){P(a,i,r,o,l,"next",e)}function l(e){P(a,i,r,o,l,"throw",e)}o(void 0)}))}}var F=function(){var e=E(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b.default.get((0,h.generateOcsUrl)("apps/files/api/v1/templates"));case 2:return n=e.sent,e.abrupt("return",n.data.ocs.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=function(){var e=E(regeneratorRuntime.mark((function e(n,t,i){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b.default.post((0,h.generateOcsUrl)("apps/files/api/v1/templates/create"),{filePath:n,templatePath:t,templateType:i});case 2:return r=e.sent,e.abrupt("return",r.data.ocs.data);case 4:case"end":return e.stop()}}),e)})));return function(n,t,i){return e.apply(this,arguments)}}(),B=256,S={name:"TemplatePreview",inheritAttrs:!1,props:{basename:{type:String,required:!0},checked:{type:Boolean,default:!1},fileid:{type:[String,Number],required:!0},filename:{type:String,required:!0},previewUrl:{type:String,default:null},hasPreview:{type:Boolean,default:!0},mime:{type:String,required:!0},ratio:{type:Number,default:null}},data:function(){return{failedPreview:!1}},computed:{nameWithoutExt:function(){return this.basename.indexOf(".")>-1?this.basename.split(".").slice(0,-1).join("."):this.basename},id:function(){return"template-picker-".concat(this.fileid)},realPreviewUrl:function(){return this.failedPreview&&this.mimeIcon?this.mimeIcon:this.previewUrl?this.previewUrl:(0,g.getCurrentUser)()?(0,h.generateUrl)("/core/preview?fileId=".concat(this.fileid,"&x=").concat(B,"&y=").concat(B,"&a=1")):(0,h.generateUrl)("/apps/files_sharing/publicpreview/".concat(document.getElementById("sharingToken")&&document.getElementById("sharingToken").value,"?fileId=").concat(this.fileid,"&file=").concat(function(e){var n=(e.startsWith("/")?e:"/".concat(e)).split("/"),t="";return n.forEach((function(e){""!==e&&(t+="/"+encodeURIComponent(e))})),t}(this.filename),"&x=").concat(B,"&y=").concat(B,"&a=1"))},mimeIcon:function(){return OC.MimeType.getIconUrl(this.mime)}},methods:{onCheck:function(){this.$emit("check",this.fileid)},onFailure:function(){this.failedPreview=!0}}},j=S,M=i(93379),D=i.n(M),I=i(78299),U=(D()(I.Z,{insert:"head",singleton:!1}),I.Z.locals,(0,s.Z)(j,(function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("li",{staticClass:"template-picker__item"},[t("input",{staticClass:"radio",attrs:{id:e.id,type:"radio",name:"template-picker"},domProps:{checked:e.checked},on:{change:e.onCheck}}),e._v(" "),t("label",{staticClass:"template-picker__label",attrs:{for:e.id}},[t("div",{staticClass:"template-picker__preview",class:e.failedPreview?"template-picker__preview--failed":""},[t("img",{staticClass:"template-picker__image",attrs:{src:e.realPreviewUrl,alt:"",draggable:"false"},on:{error:e.onFailure}})]),e._v(" "),t("span",{staticClass:"template-picker__title"},[e._v("\n\t\t\t"+e._s(e.nameWithoutExt)+"\n\t\t")])])])}),[],!1,null,"440aea22",null).exports);function L(e,n,t,i,r,a,o){try{var l=e[a](o),s=l.value}catch(e){return void t(e)}l.done?n(s):Promise.resolve(s).then(i,r)}function R(e){return function(){var n=this,t=arguments;return new Promise((function(i,r){var a=e.apply(n,t);function o(e){L(a,i,r,o,l,"next",e)}function l(e){L(a,i,r,o,l,"throw",e)}o(void 0)}))}}var q={name:"TemplatePicker",components:{EmptyContent:k(),Modal:O(),TemplatePreview:U},props:{logger:{type:Object,required:!0}},data:function(){return{checked:-1,loading:!1,name:null,opened:!1,provider:null}},computed:{nameWithoutExt:function(){return this.name.indexOf(".")>-1?this.name.split(".").slice(0,-1).join("."):this.name},emptyTemplate:function(){var e,n;return{basename:t("files","Blank"),fileid:-1,filename:this.t("files","Blank"),hasPreview:!1,mime:(null===(e=this.provider)||void 0===e?void 0:e.mimetypes[0])||(null===(n=this.provider)||void 0===n?void 0:n.mimetypes)}},selectedTemplate:function(){var e=this;return this.provider.templates.find((function(n){return n.fileid===e.checked}))},style:function(){return{"--margin":"8px","--width":"160px","--border":"2px","--fullwidth":"180px","--height":this.provider.ratio?Math.round(160/this.provider.ratio)+"px":null}}},methods:{open:function(e,n){var t=this;return R(regeneratorRuntime.mark((function i(){var r,a;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t.checked=t.emptyTemplate.fileid,t.name=e,t.provider=n,i.next=5,F();case 5:if(r=i.sent,null!==(a=r.find((function(e){return e.app===n.app&&e.label===n.label})))){i.next=9;break}throw new Error("Failed to match provider in results");case 9:if(t.provider=a,0!==a.templates.length){i.next=13;break}return t.onSubmit(),i.abrupt("return");case 13:t.opened=!0;case 14:case"end":return i.stop()}}),i)})))()},close:function(){this.checked=this.emptyTemplate.fileid,this.loading=!1,this.name=null,this.opened=!1,this.provider=null},onCheck:function(e){this.checked=e},onSubmit:function(){var e=this;return R(regeneratorRuntime.mark((function n(){var t,i,r,a,o,l,s,c,u,d;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.loading=!0,a=C(),o=null===(t=OCA)||void 0===t||null===(i=t.Files)||void 0===i||null===(r=i.App)||void 0===r?void 0:r.currentFileList,e.nameWithoutExt===e.name&&(e.logger.debug("Fixed invalid filename",{name:e.name,extension:null===(l=e.provider)||void 0===l?void 0:l.extension}),e.name=e.name+(null===(s=e.provider)||void 0===s?void 0:s.extension)),n.prev=4,n.next=7,T((0,w.normalize)("".concat(a,"/").concat(e.name)),null===(c=e.selectedTemplate)||void 0===c?void 0:c.filename,null===(u=e.selectedTemplate)||void 0===u?void 0:u.templateType);case 7:return d=n.sent,e.logger.debug("Created new file",d),n.next=11,null==o?void 0:o.addAndFetchFileInfo(e.name);case 11:OCA.Files.fileActions.getDefaultFileAction(d.mime,"file",OC.PERMISSION_ALL).action(d.basename,{$file:null==o?void 0:o.findFileEl(e.name),dir:a,fileList:o,fileActions:null==o?void 0:o.fileActions,fileInfoModel:null==o?void 0:o.getModelForFile(e.name)}),e.close(),n.next=21;break;case 16:n.prev=16,n.t0=n.catch(4),e.logger.error("Error while creating the new file from template"),console.error(n.t0),(0,y.x2)(e.t("files","Unable to create new file from template"));case 21:return n.prev=21,e.loading=!1,n.finish(21);case 24:case"end":return n.stop()}}),n,null,[[4,16,21,24]])})))()}}},W=q,Z=i(1554),N=(D()(Z.Z,{insert:"head",singleton:!1}),Z.Z.locals,(0,s.Z)(W,(function(){var e=this,n=e.$createElement,t=e._self._c||n;return e.opened?t("Modal",{staticClass:"templates-picker",attrs:{"clear-view-delay":-1,size:"large"},on:{close:e.close}},[t("form",{staticClass:"templates-picker__form",style:e.style,on:{submit:function(n){return n.preventDefault(),n.stopPropagation(),e.onSubmit.apply(null,arguments)}}},[t("h2",[e._v(e._s(e.t("files","Pick a template for {name}",{name:e.nameWithoutExt})))]),e._v(" "),t("ul",{staticClass:"templates-picker__list"},[t("TemplatePreview",e._b({attrs:{checked:e.checked===e.emptyTemplate.fileid},on:{check:e.onCheck}},"TemplatePreview",e.emptyTemplate,!1)),e._v(" "),e._l(e.provider.templates,(function(n){return t("TemplatePreview",e._b({key:n.fileid,attrs:{checked:e.checked===n.fileid,ratio:e.provider.ratio},on:{check:e.onCheck}},"TemplatePreview",n,!1))}))],2),e._v(" "),t("div",{staticClass:"templates-picker__buttons"},[t("button",{on:{click:e.close}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Cancel"))+"\n\t\t\t")]),e._v(" "),t("input",{staticClass:"primary",attrs:{type:"submit","aria-label":e.t("files","Create a new file with the selected template")},domProps:{value:e.t("files","Create")}})])]),e._v(" "),e.loading?t("EmptyContent",{staticClass:"templates-picker__loading",attrs:{icon:"icon-loading"}},[e._v("\n\t\t"+e._s(e.t("files","Creating file"))+"\n\t")]):e._e()],1):e._e()}),[],!1,null,"447a36e2",null)),$=N.exports;function z(e,n,t,i,r,a,o){try{var l=e[a](o),s=l.value}catch(e){return void t(e)}l.done?n(s):Promise.resolve(s).then(i,r)}var G=(0,f.getLoggerBuilder)().setApp("files").detectUser().build();r.default.mixin({methods:{t:v.translate,n:v.translatePlural}});var Y=document.createElement("div");Y.id="template-picker",document.body.appendChild(Y);var Q=(0,A.loadState)("files","templates",[]),H=(0,A.loadState)("files","templates_path",!1);G.debug("Templates providers",Q),G.debug("Templates folder",{templatesPath:H});var K=new(r.default.extend($))({name:"TemplatePicker",propsData:{logger:G}});K.$mount("#template-picker"),window.addEventListener("DOMContentLoaded",(function(){if(!H){G.debug("Templates folder not initialized");var e={attach:function(e){e.addMenuEntry({id:"template-init",displayName:(0,v.translate)("files","Set up templates folder"),templateName:(0,v.translate)("files","Templates"),iconClass:"icon-template-add",fileType:"file",actionHandler:function(n){V(n),e.removeMenuEntry("template-init")}})}};OC.Plugins.register("OCA.Files.NewFileMenu",e)}})),Q.forEach((function(e,n){var t={attach:function(t){var i=t.fileList;"files"!==i.id&&"files.public"!==i.id||t.addMenuEntry({id:"template-new-".concat(e.app,"-").concat(n),displayName:e.label,templateName:e.label+e.extension,iconClass:e.iconClass||"icon-file",fileType:"file",actionHandler:function(n){K.open(n,e)}})}};OC.Plugins.register("OCA.Files.NewFileMenu",t)}));var J,V=function(){var e,n=(e=regeneratorRuntime.mark((function e(n){var t,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(C()+"/".concat(n)).replace("//","/"),e.prev=1,G.debug("Initializing the templates directory",{templatePath:t}),e.next=5,b.default.post((0,h.generateOcsUrl)("apps/files/api/v1/templates/path"),{templatePath:t,copySystemTemplates:!0});case 5:i=e.sent,OCA.Files.App.currentFileList.changeDirectory(t,!0,!0),Q=i.data.ocs.data.templates,H=i.data.ocs.data.template_path,e.next=15;break;case 11:e.prev=11,e.t0=e.catch(1),G.error("Unable to initialize the templates directory"),(0,y.x2)((0,v.translate)("files","Unable to initialize the templates directory"));case 15:case"end":return e.stop()}}),e,null,[[1,11]])})),function(){var n=this,t=arguments;return new Promise((function(i,r){var a=e.apply(n,t);function o(e){z(a,i,r,o,l,"next",e)}function l(e){z(a,i,r,o,l,"throw",e)}o(void 0)}))});return function(e){return n.apply(this,arguments)}}(),X=i(74854);J={attach:function(e){var n=this;(0,X.subscribe)("nextcloud:unified-search.search",(function(n){var t=n.query;e.setFilter(t)})),(0,X.subscribe)("nextcloud:unified-search.reset",(function(){n.query=null,e.setFilter("")}))}},window.OC.Plugins.register("OCA.Files.FileList",J)},78299:function(e,n,t){var i=t(94015),r=t.n(i),a=t(23645),o=t.n(a)()(r());o.push([e.id,".template-picker__item[data-v-440aea22]{display:flex}.template-picker__label[data-v-440aea22]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-440aea22],.template-picker__label *[data-v-440aea22]{cursor:pointer;user-select:none}.template-picker__label[data-v-440aea22]::before{display:none !important}.template-picker__preview[data-v-440aea22]{display:block;overflow:hidden;flex:1 1;width:var(--width);min-height:var(--height);max-height:var(--height);padding:0;border:var(--border) solid var(--color-border);border-radius:var(--border-radius-large)}input:checked+label>.template-picker__preview[data-v-440aea22]{border-color:var(--color-primary)}.template-picker__preview--failed[data-v-440aea22]{display:flex}.template-picker__image[data-v-440aea22]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-440aea22]{width:calc(var(--margin)*8);margin:auto;background-color:transparent !important;object-fit:initial}.template-picker__title[data-v-440aea22]{overflow:hidden;max-width:calc(var(--width) + 4px);padding:var(--margin);white-space:nowrap;text-overflow:ellipsis}","",{version:3,sources:["webpack://./apps/files/src/components/TemplatePreview.vue"],names:[],mappings:"AAsJC,wCACC,YAAA,CAGD,yCACC,YAAA,CAEA,kBAAA,CACA,QAAA,CACA,qBAAA,CAEA,oFACC,cAAA,CACA,gBAAA,CAGD,iDACC,uBAAA,CAIF,2CACC,aAAA,CACA,eAAA,CAEA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,wBAAA,CACA,SAAA,CACA,8CAAA,CACA,wCAAA,CAEA,+DACC,iCAAA,CAGD,mDAEC,YAAA,CAIF,yCACC,cAAA,CACA,6CAAA,CAEA,gBAAA,CAID,2EACC,2BAAA,CAEA,WAAA,CACA,uCAAA,CAEA,kBAAA,CAGD,yCACC,eAAA,CAEA,kCAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA",sourcesContent:["\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\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\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\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.template-picker {\n\t&__item {\n\t\tdisplay: flex;\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\t// Align in the middle of the grid\n\t\talign-items: center;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\n\t\t&, * {\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\t&__preview {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\t// Stretch so all entries are the same width\n\t\tflex: 1 1;\n\t\twidth: var(--width);\n\t\tmin-height: var(--height);\n\t\tmax-height: var(--height);\n\t\tpadding: 0;\n\t\tborder: var(--border) solid var(--color-border);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\tinput:checked + label > & {\n\t\t\tborder-color: var(--color-primary);\n\t\t}\n\n\t\t&--failed {\n\t\t\t// Make sure to properly center fallback icon\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n\n\t&__image {\n\t\tmax-width: 100%;\n\t\tbackground-color: var(--color-main-background);\n\n\t\tobject-fit: cover;\n\t}\n\n\t// Failed preview, fallback to mime icon\n\t&__preview--failed &__image {\n\t\twidth: calc(var(--margin) * 8);\n\t\t// Center mime icon\n\t\tmargin: auto;\n\t\tbackground-color: transparent !important;\n\n\t\tobject-fit: initial;\n\t}\n\n\t&__title {\n\t\toverflow: hidden;\n\t\t// also count preview border\n\t\tmax-width: calc(var(--width) + 2*2px);\n\t\tpadding: var(--margin);\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n"],sourceRoot:""}]),n.Z=o},1554:function(e,n,t){var i=t(94015),r=t.n(i),a=t(23645),o=t.n(a)()(r());o.push([e.id,".templates-picker__form[data-v-447a36e2]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-447a36e2]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-447a36e2]{display:grid;grid-gap:calc(var(--margin)*2);grid-auto-columns:1fr;max-width:calc(var(--fullwidth)*6);grid-template-columns:repeat(auto-fit, var(--fullwidth));grid-auto-rows:1fr;justify-content:center}.templates-picker__buttons[data-v-447a36e2]{display:flex;justify-content:space-between;padding:calc(var(--margin)*2) var(--margin);position:sticky;bottom:0;background-image:linear-gradient(0, var(--gradient-main-background))}.templates-picker__buttons button[data-v-447a36e2],.templates-picker__buttons input[type=submit][data-v-447a36e2]{height:44px}.templates-picker[data-v-447a36e2] .modal-container{position:relative;overflow-y:auto !important}.templates-picker__loading[data-v-447a36e2]{position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;margin:0;background-color:var(--color-main-background-translucent)}","",{version:3,sources:["webpack://./apps/files/src/views/TemplatePicker.vue"],names:[],mappings:"AAsPC,yCACC,6BAAA,CAEA,gBAAA,CAEA,4CACC,iBAAA,CACA,gBAAA,CACA,4CAAA,CAIF,yCACC,YAAA,CACA,8BAAA,CACA,qBAAA,CAEA,kCAAA,CACA,wDAAA,CAEA,kBAAA,CAEA,sBAAA,CAGD,4CACC,YAAA,CACA,6BAAA,CACA,2CAAA,CACA,eAAA,CACA,QAAA,CACA,oEAAA,CAEA,kHACC,WAAA,CAKF,qDACC,iBAAA,CACA,0BAAA,CAGD,4CACC,iBAAA,CACA,KAAA,CACA,MAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CACA,QAAA,CACA,yDAAA",sourcesContent:["\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\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\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\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\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\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.templates-picker {\n\t&__form {\n\t\tpadding: calc(var(--margin) * 2);\n\t\t// Will be handled by the buttons\n\t\tpadding-bottom: 0;\n\n\t\th2 {\n\t\t\ttext-align: center;\n\t\t\tfont-weight: bold;\n\t\t\tmargin: var(--margin) 0 calc(var(--margin) * 2);\n\t\t}\n\t}\n\n\t&__list {\n\t\tdisplay: grid;\n\t\tgrid-gap: calc(var(--margin) * 2);\n\t\tgrid-auto-columns: 1fr;\n\t\t// We want maximum 5 columns. Putting 6 as we don't count the grid gap. So it will always be lower than 6\n\t\tmax-width: calc(var(--fullwidth) * 6);\n\t\tgrid-template-columns: repeat(auto-fit, var(--fullwidth));\n\t\t// Make sure all rows are the same height\n\t\tgrid-auto-rows: 1fr;\n\t\t// Center the columns set\n\t\tjustify-content: center;\n\t}\n\n\t&__buttons {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tpadding: calc(var(--margin) * 2) var(--margin);\n\t\tposition: sticky;\n\t\tbottom: 0;\n\t\tbackground-image: linear-gradient(0, var(--gradient-main-background));\n\n\t\tbutton, input[type='submit'] {\n\t\t\theight: 44px;\n\t\t}\n\t}\n\n\t// Make sure we're relative for the loading emptycontent on top\n\t::v-deep .modal-container {\n\t\tposition: relative;\n\t\toverflow-y: auto !important;\n\t}\n\n\t&__loading {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmargin: 0;\n\t\tbackground-color: var(--color-main-background-translucent);\n\t}\n}\n\n"],sourceRoot:""}]),n.Z=o}},i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var a=i[e]={id:e,loaded:!1,exports:{}};return n[e].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.m=n,r.amdD=function(){throw new Error("define cannot be used indirect")},r.amdO={},e=[],r.O=function(n,t,i,a){if(!t){var o=1/0;for(u=0;u<e.length;u++){t=e[u][0],i=e[u][1],a=e[u][2];for(var l=!0,s=0;s<t.length;s++)(!1&a||o>=a)&&Object.keys(r.O).every((function(e){return r.O[e](t[s])}))?t.splice(s--,1):(l=!1,a<o&&(o=a));if(l){e.splice(u--,1);var c=i();void 0!==c&&(n=c)}}return n}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[t,i,a]},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,{a:n}),n},r.d=function(e,n){for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},r.j=181,function(){var e={181:0};r.O.j=function(n){return 0===e[n]};var n=function(n,t){var i,a,o=t[0],l=t[1],s=t[2],c=0;if(o.some((function(n){return 0!==e[n]}))){for(i in l)r.o(l,i)&&(r.m[i]=l[i]);if(s)var u=s(r)}for(n&&n(t);c<o.length;c++)a=o[c],r.o(e,a)&&e[a]&&e[a][0](),e[o[c]]=0;return r.O(u)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))}();var a=r.O(void 0,[874],(function(){return r(68936)}));a=r.O(a)}();
+//# sourceMappingURL=files-main.js.map?v=e9d118516539b28c0adc \ No newline at end of file