photos/js/photos-src_utils_Cancelable...

2 lines
11 KiB
JavaScript

"use strict";(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["src_utils_CancelableRequest_js-node_modules_vue-material-design-icons_Send_vue-src_components-ed1dc2"],{4615:(n,t,e)=>{e.d(t,{Z:()=>o});var r=e(26937);function i(n,t,e,r,i,o,s){try{var a=n[o](s),c=a.value}catch(n){return void e(n)}a.done?t(c):Promise.resolve(c).then(r,i)}const o=function(n){var t=r.Z.CancelToken.source(),e=function(){var e,r=(e=regeneratorRuntime.mark((function e(r,i){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n(r,Object.assign({cancelToken:t.token},i)));case 1:case"end":return e.stop()}}),e)})),function(){var n=this,t=arguments;return new Promise((function(r,o){var s=e.apply(n,t);function a(n){i(s,r,o,a,c,"next",n)}function c(n){i(s,r,o,a,c,"throw",n)}a(void 0)}))});return function(n,t){return r.apply(this,arguments)}}();return{request:e,cancel:t.cancel}}},78504:(n,t,e)=>{e.d(t,{Z:()=>a});var r=e(87537),i=e.n(r),o=e(23645),s=e.n(o)()(i());s.push([n.id,".loader{display:grid;height:60px}","",{version:3,sources:["webpack://./src/components/Loader.vue"],names:[],mappings:"AAsCA,QACC,YAAA,CACA,WAAA",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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.loader {\n\tdisplay: grid;\n\theight: 60px;\n}\n'],sourceRoot:""}]);const a=s},21238:(n,t,e)=>{e.d(t,{Z:()=>a});var r=e(87537),i=e.n(r),o=e(23645),s=e.n(o)()(i());s.push([n.id,".vs-container[data-v-5e8733b7]{overflow-y:scroll;height:100%}.vs-rows-container[data-v-5e8733b7]{box-sizing:border-box}","",{version:3,sources:["webpack://./src/components/VirtualScrolling.vue"],names:[],mappings:"AAkTA,+BACC,iBAAA,CACA,WAAA,CAGD,oCACC,qBAAA",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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.vs-container {\n\toverflow-y: scroll;\n\theight: 100%;\n}\n\n.vs-rows-container {\n\tbox-sizing: border-box;\n}\n'],sourceRoot:""}]);const a=s},75400:(n,t,e)=>{e.d(t,{Z:()=>i});const r={name:"SendIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const i=(0,e(51900).Z)(r,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("span",n._b({staticClass:"material-design-icon send-icon",attrs:{"aria-hidden":!n.title,"aria-label":n.title,role:"img"},on:{click:function(t){return n.$emit("click",t)}}},"span",n.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:n.fillColor,width:n.size,height:n.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M2,21L23,12L2,3V10L17,12L2,14V21Z"}},[n.title?e("title",[n._v(n._s(n.title))]):n._e()])])])}),[],!1,null,null,null).exports},8702:(n,t,e)=>{e.d(t,{Z:()=>b});const r={name:"Loader"};var i=e(93379),o=e.n(i),s=e(7795),a=e.n(s),c=e(90569),l=e.n(c),u=e(3565),d=e.n(u),h=e(19216),f=e.n(h),m=e(44589),p=e.n(m),g=e(78504),v={};v.styleTagTransform=p(),v.setAttributes=d(),v.insert=l().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=f();o()(g.Z,v);g.Z&&g.Z.locals&&g.Z.locals;const b=(0,e(51900).Z)(r,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"loader"},[n._t("icon",(function(){return[e("span",{staticClass:"icon-loading"})]}))],2)}),[],!1,null,null,null).exports},20561:(n,t,e)=>{e.d(t,{Z:()=>_});var r=e(20296),i=e(59537);function o(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=u(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return s=n.done,n},e:function(n){a=!0,o=n},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function s(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function a(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?s(Object(e),!0).forEach((function(t){c(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):s(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function c(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function l(n){return function(n){if(Array.isArray(n))return d(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||u(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(n,t){if(n){if("string"==typeof n)return d(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?d(n,t):void 0}}function d(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}const h={name:"VirtualScrolling",props:{rows:{type:Array,required:!0},containerElement:{type:HTMLElement,default:null},useWindow:{type:Boolean,default:!1},renderWindowRatio:{type:Number,default:4},willBeVisibleWindowRatio:{type:Number,default:4},visibleWindowRatio:{type:Number,default:0},bottomBufferRatio:{type:Number,default:5},scrollToKey:{type:String,default:""}},data:function(){return{scrollPosition:0,containerHeight:0,rowsContainerHeight:0,resizeObserver:null}},computed:{visibleRows:function(){i.Z.debug("[VirtualScrolling] Computing visible rows",this.rows);var n=this.scrollPosition,t=this.containerHeight,e=t*this.renderWindowRatio,r=t*this.willBeVisibleWindowRatio,o=t*this.visibleWindowRatio,s=0,c=0;return this.rows.reduce((function(i,u){if(s=c,c+=u.height,s<n-e||n+t+e<s)return i;var d="none";return n-r<s&&s<n+t+r&&(d="near",n-o<s&&s<n+t+o&&(d="visible"),n-o<c&&c<n+t+o&&(d="visible")),[].concat(l(i),[a(a({},u),{},{visibility:d})])}),[])},rowsHeight:function(){return this.rows.map((function(n){return n.height})).reduce((function(n,t){return n+t}),0)+200},paddingTop:function(){var n=this;if(0===this.visibleRows.length)return 0;var t=this.rows.findIndex((function(t){return t.items===n.visibleRows[0].items}));return this.rows.map((function(n){return n.height})).slice(0,t).reduce((function(n,t){return n+t}),0)},rowsContainerStyle:function(){return{height:"".concat(this.rowsHeight,"px"),paddingTop:"".concat(this.paddingTop,"px")}},isNearBottom:function(){var n=this.containerHeight*this.bottomBufferRatio;return this.scrollPosition+this.containerHeight>=this.rowsHeight-n},container:function(){return i.Z.debug("[VirtualScrolling] Computing container"),null!==this.containerElement?this.containerElement:this.useWindow?window:this.$refs.container}},watch:{isNearBottom:function(n){n&&this.$emit("need-content")},rows:function(){this.isNearBottom&&this.$emit("need-content")},scrollToKey:function(n){var t,e=0,r=o(this.rows);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i.key===n)return void this.$refs.container.scrollTo({top:e,behavior:"smooth"});e+=i.height}}catch(n){r.e(n)}finally{r.f()}}},mounted:function(){var n=this;this.resizeObserver=new ResizeObserver((function(t){var e,r=o(t);try{for(r.s();!(e=r.n()).done;){var i=e.value,s=i.contentRect;i.target.classList.contains("vs-container")&&(n.containerHeight=s.height),i.target.classList.contains("vs-rows-container")&&(n.rowsContainerHeight=s.height)}}catch(n){r.e(n)}finally{r.f()}})),this.useWindow?(window.addEventListener("resize",this.updateContainerSize),this.containerHeight=window.innerHeight):this.resizeObserver.observe(this.container),this.resizeObserver.observe(this.$refs.rowsContainer),this.container.addEventListener("scroll",this.updateScrollPosition)},beforeDestroy:function(){this.useWindow&&window.removeEventListener("resize",this.updateContainerSize),this.resizeObserver.disconnect(),this.container.removeEventListener("scroll",this.updateScrollPosition)},methods:{updateScrollPosition:(0,r.debounce)((function(){this.useWindow?this.scrollPosition=this.container.scrollY:this.scrollPosition=this.container.scrollTop}),200),updateContainerSize:function(){this.containerHeight=window.innerHeight}}};var f=e(93379),m=e.n(f),p=e(7795),g=e.n(p),v=e(90569),b=e.n(v),w=e(3565),y=e.n(w),A=e(19216),C=e.n(A),T=e(44589),W=e.n(T),S=e(21238),O={};O.styleTagTransform=W(),O.setAttributes=y(),O.insert=b().bind(null,"head"),O.domAPI=g(),O.insertStyleElement=C();m()(S.Z,O);S.Z&&S.Z.locals&&S.Z.locals;const _=(0,e(51900).Z)(h,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return n.useWindow||null!==n.containerElement?e("div",{ref:"rowsContainer",staticClass:"vs-rows-container",style:n.rowsContainerStyle},[n._t("default",null,{renderedRows:n.visibleRows}),n._v(" "),n._t("loader")],2):e("div",{ref:"container",staticClass:"vs-container"},[e("div",{ref:"rowsContainer",staticClass:"vs-rows-container",style:n.rowsContainerStyle},[n._t("default",null,{renderedRows:n.visibleRows}),n._v(" "),n._t("loader")],2)])}),[],!1,null,"5e8733b7",null).exports}}]);
//# sourceMappingURL=photos-src_utils_CancelableRequest_js-node_modules_vue-material-design-icons_Send_vue-src_components-ed1dc2.js.map?v=1d232c0555ae9ad46c62