photos/js/photos-node_modules_blurhas...

3 lines
26 KiB
JavaScript

/*! For license information please see photos-node_modules_blurhash_dist_esm_index_js-node_modules_vue-material-design-icons_PackageVariant-6bf9ec.js.LICENSE.txt */
"use strict";(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["node_modules_blurhash_dist_esm_index_js-node_modules_vue-material-design-icons_PackageVariant-6bf9ec"],{66951:(t,e,n)=>{n.d(e,{Z:()=>A});var i=n(5656),a=n(65358),s=n(59537),o=n(45086),l=n(3301),r=n(81067),c=n(2161),d=n(80351),h=n.n(d),f=n(30319);var p=n(32114);const A={name:"FetchFilesMixin",mixins:[n(69363).Z],data:()=>({errorFetchingFiles:null,loadingFiles:!1,doneFetchingFiles:!1,fetchSemaphore:new p.Z(1),fetchedFileIds:[]}),watch:{"$route.path"(){this.resetFetchFilesState()}},methods:{async fetchFiles(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.doneFetchingFiles&&!n||this.loadingFiles)return[];const d=await this.fetchSemaphore.acquire();try{this.errorFetchingFiles=null,this.loadingFiles=!0;const n=200,d=await async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t={firstResult:0,nbResults:200,mimesType:l.Oj,onThisDay:!1,onlyFavorites:!1,...t};const e=t.mimesType.reduce(((t,e)=>"".concat(t,"\n\t\t<d:eq>\n\t\t\t<d:prop>\n\t\t\t\t<d:getcontenttype/>\n\t\t\t</d:prop>\n\t\t\t<d:literal>").concat(e,"</d:literal>\n\t\t</d:eq>\n\t")),""),n=t.onlyFavorites?"<d:eq>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:favorite/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:literal>1</d:literal>\n\t\t\t</d:eq>":"",s=t.onThisDay?"<d:or>".concat(Array(20).fill(1).map(((t,e)=>{const n=h()(Date.now()).startOf("day").subtract(3,"d").subtract(e+1,"y"),i=h()(Date.now()).endOf("day").add(3,"d").subtract(e+1,"y");return"<d:and>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified />\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>".concat(n.format(h().defaultFormatUtc),"</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t\t<d:lt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified />\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>").concat(i.format(h().defaultFormatUtc),"</d:literal>\n\t\t\t\t</d:lt>\n\t\t\t</d:and>")})).join("\n"),"</d:or>"):"",d=f.Z.state.userConfig.photosSourceFolders.map((t=>"\n\t\t\t<d:scope>\n\t\t\t\t<d:href>".concat((0,a.RQ)(i._o,t),"</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>"))).join("\n");return t=Object.assign({method:"SEARCH",headers:{"content-Type":"text/xml"},data:'<?xml version="1.0" encoding="UTF-8"?>\n\t\t\t<d:searchrequest xmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns"\n\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t\t<d:basicsearch>\n\t\t\t\t\t<d:select>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t'.concat(c.N,"\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t</d:select>\n\t\t\t\t\t<d:from>\n\t\t\t\t\t\t").concat(d,"\n\t\t\t\t\t</d:from>\n\t\t\t\t\t<d:where>\n\t\t\t\t\t\t<d:and>\n\t\t\t\t\t\t\t<d:or>\n\t\t\t\t\t\t\t\t").concat(e,"\n\t\t\t\t\t\t\t</d:or>\n\t\t\t\t\t\t\t").concat(n,"\n\t\t\t\t\t\t\t").concat(s,"\n\t\t\t\t\t\t</d:and>\n\t\t\t\t\t</d:where>\n\t\t\t\t\t<d:orderby>\n\t\t\t\t\t\t<d:order>\n\t\t\t\t\t\t\t<d:prop><nc:metadata-photos-original_date_time/></d:prop>\n\t\t\t\t\t\t\t<d:descending/>\n\t\t\t\t\t\t</d:order>\n\t\t\t\t\t\t<d:order>\n\t\t\t\t\t\t\t<d:prop><d:getlastmodified/></d:prop>\n\t\t\t\t\t\t\t<d:descending/>\n\t\t\t\t\t\t</d:order>\n\t\t\t\t\t</d:orderby>\n\t\t\t\t\t<d:limit>\n\t\t\t\t\t\t<d:nresults>").concat(t.nbResults,"</d:nresults>\n\t\t\t\t\t\t<ns:firstresult>").concat(t.firstResult,"</ns:firstresult>\n\t\t\t\t\t</d:limit>\n\t\t\t\t</d:basicsearch>\n\t\t\t</d:searchrequest>"),deep:!0,details:!0},t),(await r.ZP.getDirectoryContents("",t)).data.map((t=>(0,o.AX)(t)))}({firstResult:this.fetchedFileIds.length,nbResults:n,...t,signal:this.abortController.signal});d.length!==n&&(this.doneFetchingFiles=!0);const p=d.map((t=>t.fileid)).filter((t=>!this.fetchedFileIds.includes(t.toString())));return this.fetchedFileIds.push(...p.map((t=>t.toString())).filter((t=>!e.includes(t)))),this.$store.dispatch("appendFiles",d),s.Z.debug("[FetchFilesMixin] Fetched ".concat(p.length," new files: "),p),p}catch(t){var p;if(404===(null===(p=t.response)||void 0===p?void 0:p.status)){const e=f.Z.state.userConfig.photosSourceFolders;for(const n of e){var A,u;if(null!==(null===(A=t.response)||void 0===A||null===(u=A.data)||void 0===u?void 0:u.match("File with name /".concat(n," could not be located")))){s.Z.debug("The ".concat(n," folder does not exist, creating it."));try{return await(0,i.rp)().createDirectory((0,a.RQ)(i._o,n)),this.resetFetchFilesState(),[]}catch(t){this.errorFetchingFiles=404,s.Z.error("Fail to create source directory",{error:t})}}}}else{if("ERR_CANCELED"===t.code)return[];this.errorFetchingFiles=t}s.Z.error("Error fetching files",{error:t})}finally{this.loadingFiles=!1,this.fetchSemaphore.release(d)}return[]},resetFetchFilesState(){this.doneFetchingFiles=!1,this.errorFetchingFiles=null,this.loadingFiles=!1,this.fetchedFileIds=[]}}}},43985:(t,e,n)=>{n.d(e,{Jx:()=>f});var i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],a=t=>{let e=0;for(let n=0;n<t.length;n++){let a=t[n];e=83*e+i.indexOf(a)}return e},s=t=>{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},o=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.trunc(12.92*e*255+.5):Math.trunc(255*(1.055*Math.pow(e,.4166666666666667)-.055)+.5)},l=(t,e)=>(t=>t<0?-1:1)(t)*Math.pow(Math.abs(t),e),r=class extends Error{constructor(t){super(t),this.name="ValidationError",this.message=t}},c=t=>{if(!t||t.length<6)throw new r("The blurhash string must be at least 6 characters");let e=a(t[0]),n=Math.floor(e/9)+1,i=e%9+1;if(t.length!==4+2*i*n)throw new r(`blurhash length mismatch: length is ${t.length} but it should be ${4+2*i*n}`)},d=t=>{let e=t>>8&255,n=255&t;return[s(t>>16),s(e),s(n)]},h=(t,e)=>{let n=Math.floor(t/361),i=Math.floor(t/19)%19,a=t%19;return[l((n-9)/9,2)*e,l((i-9)/9,2)*e,l((a-9)/9,2)*e]},f=(t,e,n,i)=>{c(t),i|=1;let s=a(t[0]),l=Math.floor(s/9)+1,r=s%9+1,f=(a(t[1])+1)/166,p=new Array(r*l);for(let e=0;e<p.length;e++)if(0===e){let n=a(t.substring(2,6));p[e]=d(n)}else{let n=a(t.substring(4+2*e,6+2*e));p[e]=h(n,f*i)}let A=4*e,u=new Uint8ClampedArray(A*n);for(let t=0;t<n;t++)for(let i=0;i<e;i++){let a=0,s=0,c=0;for(let o=0;o<l;o++)for(let l=0;l<r;l++){let d=Math.cos(Math.PI*i*l/e)*Math.cos(Math.PI*t*o/n),h=p[l+o*r];a+=h[0]*d,s+=h[1]*d,c+=h[2]*d}let d=o(a),h=o(s),f=o(c);u[4*i+0+t*A]=d,u[4*i+1+t*A]=h,u[4*i+2+t*A]=f,u[4*i+3+t*A]=255}return u}},3640:(t,e,n)=>{n.d(e,{Z:()=>l});var i=n(87537),a=n.n(i),s=n(23645),o=n.n(s)()(a());o.push([t.id,".face-list[data-v-33326436]{display:flex;flex-direction:row;height:350px;flex-wrap:wrap;padding:12px}.loader[data-v-33326436]{margin:25% auto}","",{version:3,sources:["webpack://./src/components/Faces/FaceMergeForm.vue"],names:[],mappings:"AAEA,4BACC,YAAA,CACA,kBAAA,CACA,YAAA,CACA,cAAA,CACA,YAAA,CAGD,yBACC,eAAA",sourcesContent:['$sizes: ("400": ("count": 3, "marginTop": 66, "marginW": 8), "700": ("count": 4, "marginTop": 66, "marginW": 8), "1024": ("count": 5, "marginTop": 66, "marginW": 44), "1280": ("count": 4, "marginTop": 66, "marginW": 44), "1440": ("count": 5, "marginTop": 88, "marginW": 66), "1600": ("count": 6, "marginTop": 88, "marginW": 66), "2048": ("count": 7, "marginTop": 88, "marginW": 66), "2560": ("count": 8, "marginTop": 88, "marginW": 88), "3440": ("count": 9, "marginTop": 88, "marginW": 88), "max": ("count": 10, "marginTop": 88, "marginW": 88));\n\n.face-list {\n\tdisplay: flex;\n\tflex-direction: row;\n\theight: 350px;\n\tflex-wrap: wrap;\n\tpadding: 12px;\n}\n\n.loader {\n\tmargin: 25% auto;\n}\n'],sourceRoot:""}]);const l=o},91983:(t,e,n)=>{n.d(e,{Z:()=>l});var i=n(87537),a=n.n(i),s=n(23645),o=n.n(s)()(a());o.push([t.id,".face[data-v-22feae0f]{display:flex;flex-direction:column}.face__empty[data-v-22feae0f]{display:flex;flex-direction:column;align-items:center}.face__empty__button[data-v-22feae0f]{margin-top:32px}.face__header[data-v-22feae0f]{display:flex;min-height:60px;align-items:center;justify-content:space-between;position:-webkit-sticky;position:sticky;z-index:3;background:var(--color-main-background);padding:0 64px}@media only screen and (max-width: 1020px){.face__header[data-v-22feae0f]{padding:0;padding-left:64px}}.face__header__left[data-v-22feae0f]{height:100%;display:flex;align-items:center}.face__header__title[data-v-22feae0f]{margin-left:10px}.face__header__title h2[data-v-22feae0f]{margin-bottom:0}.face__header__loader[data-v-22feae0f]{margin-left:32px}.face__header__actions[data-v-22feae0f]{display:flex;align-items:center}.face__header__actions button[data-v-22feae0f]{margin-left:16px}.face__photos[data-v-22feae0f]{margin-top:16px;height:100%;min-height:0;padding:0 64px}@media only screen and (max-width: 1020px){.face__photos[data-v-22feae0f]{padding:0}}.empty-content-with-illustration[data-v-22feae0f] .empty-content__icon{width:200px;height:200px}.empty-content-with-illustration[data-v-22feae0f] .empty-content__icon svg{width:200px;height:200px}.rename-form[data-v-22feae0f]{display:flex;flex-direction:row;align-items:center;height:70px;padding:16px}.rename-form input[data-v-22feae0f]{width:100%}","",{version:3,sources:["webpack://./src/mixins/FaceContent.scss"],names:[],mappings:"AAqBA,uBACC,YAAA,CACA,qBAAA,CAEA,8BACC,YAAA,CACA,qBAAA,CACA,kBAAA,CAEA,sCACC,eAAA,CAKF,+BACC,YAAA,CACA,eAAA,CACA,kBAAA,CACA,6BAAA,CACA,uBAAA,CAAA,eAAA,CACA,SAAA,CACA,uCAAA,CACA,cAAA,CAEA,2CAVD,+BAWE,SAAA,CACA,iBAAA,CAAA,CAGD,qCACC,WAAA,CACA,YAAA,CACA,kBAAA,CAGD,sCACC,gBAAA,CACA,yCACC,eAAA,CAIF,uCACC,gBAAA,CAGD,wCACC,YAAA,CACA,kBAAA,CAEA,+CACC,gBAAA,CAKH,+BACC,eAAA,CACA,WAAA,CACA,YAAA,CACA,cAAA,CAEA,2CAND,+BAOE,SAAA,CAAA,CAKH,uEACC,WAAA,CACA,YAAA,CAEA,2EACC,WAAA,CACA,YAAA,CAIF,8BACC,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,WAAA,CACA,YAAA,CAEA,oCACC,UAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 Marcel Klehr <mklehr@gmx.net>\n *\n * @author Marcel Klehr <mklehr@gmx.net>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n.face {\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t&__empty {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\n\t\t&__button {\n\t\t\tmargin-top: 32px;\n\t\t}\n\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\tmin-height: 60px;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tposition: sticky;\n\t\tz-index: 3;\n\t\tbackground: var(--color-main-background);\n\t\tpadding: 0 64px;\n\n\t\t@media only screen and (max-width: 1020px) {\n\t\t\tpadding: 0;\n\t\t\tpadding-left: 64px;\n\t\t}\n\n\t\t&__left {\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t&__title {\n\t\t\tmargin-left: 10px;\n\t\t\th2 {\n\t\t\t\tmargin-bottom: 0;\n\t\t\t}\n\t\t}\n\n\t\t&__loader {\n\t\t\tmargin-left: 32px;\n\t\t}\n\n\t\t&__actions {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\tbutton {\n\t\t\t\tmargin-left: 16px;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__photos {\n\t\tmargin-top: 16px;\n\t\theight: 100%;\n\t\tmin-height: 0; // Prevent it from overflowing in a flex context.\n\t\tpadding: 0 64px;\n\n\t\t@media only screen and (max-width: 1020px) {\n\t\t\tpadding: 0;\n\t\t}\n\t}\n}\n\n.empty-content-with-illustration :deep .empty-content__icon {\n\twidth: 200px;\n\theight: 200px;\n\n\tsvg {\n\t\twidth: 200px;\n\t\theight: 200px;\n\t}\n}\n\n.rename-form {\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\theight: 70px;\n\tpadding: 16px;\n\n\tinput {\n\t\twidth: 100%;\n\t}\n}\n"],sourceRoot:""}]);const l=o},73981:(t,e,n)=>{n.d(e,{Z:()=>a});const i={name:"AccountSwitchIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon account-switch-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M16 9C22 9 22 13 22 13V15H16V13C16 13 16 11.31 14.85 9.8C14.68 9.57 14.47 9.35 14.25 9.14C14.77 9.06 15.34 9 16 9M2 13C2 13 2 9 8 9S14 13 14 13V15H2V13M9 17V19H15V17L18 20L15 23V21H9V23L6 20L9 17M8 1C6.34 1 5 2.34 5 4S6.34 7 8 7 11 5.66 11 4 9.66 1 8 1M16 1C14.34 1 13 2.34 13 4S14.34 7 16 7 19 5.66 19 4 17.66 1 16 1Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports},84320:(t,e,n)=>{n.d(e,{Z:()=>a});const i={name:"AlertCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon alert-circle-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M13,13H11V7H13M13,17H11V15H13M12,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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports},69254:(t,e,n)=>{n.d(e,{Z:()=>a});const i={name:"ArrowLeftIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon arrow-left-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports},34020:(t,e,n)=>{n.d(e,{Z:()=>a});const i={name:"DownloadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon download-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports},68204:(t,e,n)=>{n.d(e,{Z:()=>a});const i={name:"PackageVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon package-variant-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M2,10.96C1.5,10.68 1.35,10.07 1.63,9.59L3.13,7C3.24,6.8 3.41,6.66 3.6,6.58L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.66,6.72 20.82,6.88 20.91,7.08L22.36,9.6C22.64,10.08 22.47,10.69 22,10.96L21,11.54V16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V10.96C2.7,11.13 2.32,11.14 2,10.96M12,4.15V4.15L12,10.85V10.85L17.96,7.5L12,4.15M5,15.91L11,19.29V12.58L5,9.21V15.91M19,15.91V12.69L14,15.59C13.67,15.77 13.3,15.76 13,15.6V19.29L19,15.91M13.85,13.36L20.13,9.73L19.55,8.72L13.27,12.35L13.85,13.36Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports},39650:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(9073),a=n(91211);const s=(0,n(51900).Z)(a.Z,i.s,i.x,!1,null,null,null).exports},8131:(t,e,n)=>{n.d(e,{Z:()=>i});const i={name:"PlayCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}}},58613:(t,e,n)=>{n.d(e,{Z:()=>a});const i={name:"StarIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon star-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports},97167:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(59541),a=n(6900);const s=(0,n(51900).Z)(a.Z,i.s,i.x,!1,null,null,null).exports},90244:(t,e,n)=>{n.d(e,{Z:()=>i});const i={name:"VideoIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}}},35406:(t,e,n)=>{n.d(e,{Z:()=>F});var i=n(20629),a=n(46116),s=n(99751);const o={name:"FaceMergeForm",components:{FaceCover:n(4294).Z},mixins:[a.Z,s.Z],props:{firstFace:{type:String,required:!0}},data:()=>({loading:!1}),computed:{...(0,i.Se)(["files","faces","facesFiles"]),filteredFaces(){return Object.values(this.faces).filter((t=>t.basename!==this.firstFace)).sort(((t,e)=>t.props.nbItems&&e.props.nbItems?e.props.nbItems-t.props.nbItems:this.facesFiles[e.basename]&&this.facesFiles[t.basename]?this.facesFiles[e.basename].length-this.facesFiles[t.basename].length:0))}},methods:{handleSelect(t){this.$emit("select",t),this.loading=!0}}};var l=n(93379),r=n.n(l),c=n(7795),d=n.n(c),h=n(90569),f=n.n(h),p=n(3565),A=n.n(p),u=n(19216),g=n.n(u),m=n(44589),C=n.n(m),_=n(3640),v={};v.styleTagTransform=C(),v.setAttributes=A(),v.insert=f().bind(null,"head"),v.domAPI=d(),v.insertStyleElement=g();r()(_.Z,v);_.Z&&_.Z.locals&&_.Z.locals;const F=(0,n(51900).Z)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"merge-form face-list"},t._l(t.filteredFaces,(function(n){return e("FaceCover",{key:n.basename,attrs:{"base-name":n.basename,small:""},on:{click:function(e){return t.handleSelect(n.basename)}}})})),1)}),[],!1,null,"33326436",null).exports},80316:(t,e,n)=>{n.r(e),n.d(e,{default:()=>V});var i=n(20629),a=n(84320),s=n(58613),o=n(34020),l=n(69254),r=n(73981),c=n(64882),d=n(66951),h=n(98171),f=n(97519),p=n(64811),A=n(59537),u=n(99751),g=n(20144),m=n(35406);const C={name:"UnassignedFaces",components:{Star:s.Z,Download:o.Z,AlertCircle:a.Z,ArrowLeft:l.Z,FaceMergeForm:m.Z,FilesListViewer:f.Z,File:p.Z,NcLoadingIcon:c.lb,NcEmptyContent:c.SL,NcActions:c.O3,NcActionButton:c.Js,NcDialog:c.a0,AccountSwitch:r.Z},directives:{focus(t){g.ZP.nextTick((()=>t.focus()))}},mixins:[u.Z,d.Z,h.Z],data:()=>({showMoveModal:!1,loadingCount:0,appContent:document.getElementById("app-content-vue")}),computed:{...(0,i.Se)(["files","unassignedFiles"]),faceFileIds(){return this.unassignedFiles||[]},shouldFavoriteSelection(){return this.selectedFileIds.some((t=>0===this.$store.state.files.files[t].favorite))}},mounted(){this.fetchUnassignedFaces()},methods:{...(0,i.nv)(["appendFiles","deleteFace","renameFace","downloadFiles","toggleFavoriteForFiles","removeFilesFromFace","moveFilesToFace"]),openViewer(t){const e=this.files[t];OCA.Viewer.open({path:"/"+e.filename.split("/").slice(3).join("/"),list:this.faceFileIds.map((t=>({...this.files[t],basename:this.files[t].basename.split("-").slice(1).join("-")}))).filter((t=>!t.sectionHeader)),loadMore:e.loadMore?async()=>await e.loadMore(!0):()=>[],canLoop:e.canLoop})},async handleMove(t,e){try{this.loadingCount++,await this.moveFilesToFace({oldFace:null,faceName:t,fileIdsToMove:e}),this.showMoveModal=!1}catch(t){A.Z.error(t)}finally{this.loadingCount--}},async favoriteSelection(){try{this.loadingCount++,await this.toggleFavoriteForFiles({fileIds:this.selectedFileIds,favoriteState:!0})}catch(t){A.Z.error(t)}finally{this.loadingCount--}},async unFavoriteSelection(){try{this.loadingCount++,await this.toggleFavoriteForFiles({fileIds:this.selectedFileIds,favoriteState:!1})}catch(t){A.Z.error(t)}finally{this.loadingCount--}},async downloadSelection(){try{this.loadingCount++,await this.downloadFiles(this.selectedFileIds)}catch(t){A.Z.error(t)}finally{this.loadingCount--}}}};var _=n(93379),v=n.n(_),F=n(7795),y=n.n(F),x=n(90569),w=n.n(x),b=n(3565),Z=n.n(b),L=n(19216),k=n.n(L),S=n(44589),M=n.n(S),I=n(91983),B={};B.styleTagTransform=M(),B.setAttributes=Z(),B.insert=w().bind(null,"head"),B.domAPI=y(),B.insertStyleElement=k();v()(I.Z,B);I.Z&&I.Z.locals&&I.Z.locals;const V=(0,n(51900).Z)(C,(function(){var t=this,e=t._self._c;return t.errorFetchingFiles?e("NcEmptyContent",{scopedSlots:t._u([{key:"icon",fn:function(){return[e("AlertCircle")]},proxy:!0}],null,!1,794036927)},[t._v("\n\t"+t._s(t.t("photos","An error occurred"))+"\n")]):e("div",{staticClass:"face"},[e("div",{staticClass:"face__header"},[e("div",{staticClass:"face__header__left"},[e("NcActions",[e("NcActionButton",{on:{click:function(e){return t.$router.push("/faces/")}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("ArrowLeft")]},proxy:!0}])},[t._v(t._s(t.t("photos","Back"))+"\n\t\t\t\t")])],1),t._v(" "),e("div",{staticClass:"face__header__title"},[e("h2",{class:{"face-name":!0}},[t._v("\n\t\t\t\t\t"+t._s(t.t("photos","Unassigned faces"))+"\n\t\t\t\t")])]),t._v(" "),t.loadingCount>0||t.loadingFaces?e("NcLoadingIcon"):t._e()],1),t._v(" "),e("div",{staticClass:"face__header__actions"},[e("NcActions",{attrs:{"force-menu":!0}},[t.selectedFileIds.length?[e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Download selected files")},on:{click:t.downloadSelection}},[e("Download",{attrs:{slot:"icon"},slot:"icon"}),t._v("\n\t\t\t\t\t\t"+t._s(t.t("photos","Download selected photos"))+"\n\t\t\t\t\t")],1),t._v(" "),t.shouldFavoriteSelection?e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Mark selection as favorite")},on:{click:t.favoriteSelection}},[e("Star",{attrs:{slot:"icon"},slot:"icon"}),t._v("\n\t\t\t\t\t\t"+t._s(t.t("photos","Favorite"))+"\n\t\t\t\t\t")],1):e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Remove selection from favorites")},on:{click:t.unFavoriteSelection}},[e("Star",{attrs:{slot:"icon"},slot:"icon"}),t._v("\n\t\t\t\t\t\t"+t._s(t.t("photos","Remove from favorites"))+"\n\t\t\t\t\t")],1),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(e){t.showMoveModal=!0}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("AccountSwitch")]},proxy:!0}],null,!1,2937983280)},[t._v("\n\t\t\t\t\t\t"+t._s(t.n("photos","Move photo to a different person","Move photos to a different person",t.selectedFileIds.length))+"\n\t\t\t\t\t")])]:t._e()],2)],1)]),t._v(" "),e("FilesListViewer",{staticClass:"face__photos",attrs:{"container-element":t.appContent,"file-ids":t.faceFileIds,loading:t.loadingFiles||t.loadingFaces},scopedSlots:t._u([{key:"default",fn:function(n){let{file:i,distance:a}=n;return e("File",{attrs:{file:t.files[i.id],"allow-selection":!0,selected:!0===t.selection[i.id],distance:a},on:{click:t.openViewer,"select-toggled":t.onFileSelectToggle}})}}])}),t._v(" "),t.showMoveModal?e("NcDialog",{attrs:{name:t.t("photos","Move to different person"),"close-on-click-outside":"",size:"normal"},on:{closing:function(e){t.showMoveModal=!1}}},[e("FaceMergeForm",{attrs:{"first-face":"-1"},on:{select:function(e){return t.handleMove(e,t.selectedFileIds)}}})],1):t._e()],1)}),[],!1,null,"22feae0f",null).exports},91211:(t,e,n)=>{n.d(e,{Z:()=>i});const i=n(8131).Z},6900:(t,e,n)=>{n.d(e,{Z:()=>i});const i=n(90244).Z},9073:(t,e,n)=>{n.d(e,{s:()=>i,x:()=>a});var i=function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon play-circle-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M10,16.5V7.5L16,12M12,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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},a=[]},59541:(t,e,n)=>{n.d(e,{s:()=>i,x:()=>a});var i=function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon video-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},a=[]},18398:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-star" viewBox="0 0 24 24"><path d="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z" /></svg>'}}]);
//# sourceMappingURL=photos-node_modules_blurhash_dist_esm_index_js-node_modules_vue-material-design-icons_PackageVariant-6bf9ec.js.map?v=83df6777279ced2a9bc3