summaryrefslogtreecommitdiffstats
path: root/js/photos-node_modules_vue-material-design-icons_AccountBoxMultipleOutline_vue-src_components_FaceCover_vue.js
blob: 35d8129bdec0d1098967412b99b99a216f82a193 (plain)
1
2
3
/*! For license information please see photos-node_modules_vue-material-design-icons_AccountBoxMultipleOutline_vue-src_components_FaceCover_vue.js.LICENSE.txt */
"use strict";(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["node_modules_vue-material-design-icons_AccountBoxMultipleOutline_vue-src_components_FaceCover_vue"],{46116:(t,e,r)=>{function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,{Z:()=>i});const i={name:"FaceCoverMixin",computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},(0,r(20629).Se)(["faces","facesFiles","files"])),methods:{getFaceCover:function(t){var e=this,r=function(t){return Math.max(0,-1*(t.x-.5*t.width))+Math.max(0,-1*(t.y-.5*t.height))+Math.max(0,-1*(1-(t.x+t.width)-.5*t.width))+Math.max(0,-1*(1-(t.y+t.height)-.5*t.height))};return(this.facesFiles[t]||[]).slice(0,25).map((function(t){return e.files[t]})).sort((function(e,r){return r.faceDetections.find((function(e){return e.title===t})).width-e.faceDetections.find((function(e){return e.title===t})).width})).sort((function(t,e){return t.faceDetections.length-e.faceDetections.length})).sort((function(e,n){return r(e.faceDetections.find((function(e){return e.title===t})))-r(n.faceDetections.find((function(e){return e.title===t})))}))[0]},getCoverStyle:function(t){var e=this.getFaceCover(t);if(!e)return{};var r=e.faceDetections.find((function(e){return e.title===t})),n=Math.max(1,1/r.width*.4),o=100*(r.x+r.width/2),i=100*(r.y+r.height/2);return{width:"100%",transform:"translate(calc( var(--photos-face-width)/2 - ".concat(o,"% ), calc( var(--photos-face-width)/2 - ").concat(i,"% )) scale(").concat(n,")"),transformOrigin:"".concat(o,"% ").concat(i,"%")}}}}},99751:(e,r,n)=>{n.d(r,{Z:()=>w});var o=n(20629),i=n(82880),a=n(45994),c=n(81067),s=n(59537),u=n(2161),l=n(94236),f=n(69363),h=n(86492),p=n.n(h);function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function m(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){y(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function y(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function g(){g=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),c=new j(o||[]);return n(a,"_invoke",{value:C(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function h(){}function p(){}function v(){}var m={};s(m,i,(function(){return this}));var y=Object.getPrototypeOf,A=y&&y(y(E([])));A&&A!==e&&r.call(A,i)&&(m=A);var b=v.prototype=h.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(n,i,a,c){var s=l(t[n],t,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==d(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(s.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new