|
|
|
(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[2737],{40300:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>o});var a=s(76777);const o={props:{feed:{type:Array,required:!0},canLoadMore:{type:Boolean,default:!1},withLinks:{type:Boolean,default:!1},withOverlay:{type:Boolean,default:!0},autoPlay:{type:Boolean,default:!1},autoPlayInterval:{type:Number,default:function(){return 5e3}}},data:function(){return{glideInstance:null}},mounted:function(){this.initGlide()},computed:{webfinger:{get:function(){if(this.feed&&this.feed.length){var t=this.feed[0].account,e=new URL(t.url).host;return"@".concat(t.username,"@").concat(e)}return""}}},methods:{initGlide:function(){this.glideInstance=new a.default(this.$refs.glide,{type:"carousel",startAt:0,perView:1,gap:0,hoverpause:!1,autoplay:!!this.autoPlay&&this.autoPlayInterval,keyboard:!0}),this.glideInstance.on("run.after",this.checkForPagination),this.glideInstance.mount()},checkForPagination:function(){this.glideInstance.index===this.feed.length-1&&this.canLoadMore&&this.$emit("load-more")},loadMore:function(){this.$emit("load-more")},formatDate:function(t){var e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:navigator.language;if("string"==typeof t){if(e=new Date(t),isNaN(e.getTime()))throw new Error("Invalid date string. Please provide a valid ISO 8601 format.")}else{if(!(t instanceof Date))throw new Error("Invalid input. Please provide a Date object or an ISO 8601 string.");e=t}return new Intl.DateTimeFormat(s,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0}).format(e)},updateGlide:function(){var t=this;this.$nextTick((function(){t.glideInstance&&t.glideInstance.update()}))}},watch:{feed:function(){this.updateGlide()}}}},86052:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>u});var a=s(84498),o=s(342);function i(t){return i="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},i(t)}function n(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var s={}.toString.call(t).slice(8,-1);return"Object"===s&&t.constructor&&(s=t.constructor.name),"Map"===s||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?r(t,e):void 0}}(t)||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 r(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,a=Array(e);s<e;s++)a[s]=t[s];return a}function l(){l=function(){return e};var t,e={},s=Object.prototype,a=s.hasOwnProperty,o=Object.defineProperty||function(t,e,s){t[e]=s.value},n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",c=n.asyncIterator||"@@asyncIterator",d=n.toStringTag||"@@toStringTag";function u(t,e,s){return Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,s){return t[e]=s}}function f(t,e,s,a){var i=e&&e.prototype instanceof _?e:_,n=Object.create(i.prototype),r=new A(a||[]);return o(n,"_invoke",{value:E(t,s,r)}),n}function p(t,e,s){try{return{type:"normal",arg:t.call(e,s)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",v="suspendedYield",m="executing",g="completed",b={};function _(){}function w(){}function x(){}var C={};u(C,r,(function(){return this}));var y=Object.getPrototypeOf,k=y&&y(y(T([])));k&&k!==s&&a.call(k,r)&&(C=k);var M=x.prototype=_.prototype=Object.create(C);function S(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function s(o,n,r,l){var c=p(t[o],t,n);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"==i(u)&&a.call(u,"__await")?e.resolve(u.__await).then((function(t){s("next",t,r,l)}),(function(t){s(
|