index-legacy.817eb8d7.js 2.8 KB

1
  1. !function(){function r(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null==e)return;var n,i,o=[],a=!0,u=!1;try{for(e=e.call(r);!(a=(n=e.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(l){u=!0,i=l}finally{try{a||null==e.return||e.return()}finally{if(u)throw i}}return o}(r,e)||function(r,e){if(!r)return;if("string"==typeof r)return t(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);"Object"===n&&r.constructor&&(n=r.constructor.name);if("Map"===n||"Set"===n)return Array.from(r);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t(r,e)}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}System.register(["./App-legacy.5b2bb91a.js"],(function(t){"use strict";var e,n,i,o,a,u,l,f,c,d,s,g,v,h,p,b,y;return{setters:[function(r){e=r.g,n=r.L,i=r.r,o=r.b1,a=r.w,u=r.b2,l=r.o,f=r.b3,c=r.h,d=r.N,s=r.b4,g=r.ah,v=r.b5,h=r.b6,p=r.b7,b=r.b8,y=r.R}],execute:function(){var m=r(d("list"),3),S=m[0],x=m[1],w=m[2],A=e({name:S,props:{error:Boolean,loading:Boolean,finished:Boolean,errorText:String,loadingText:String,finishedText:String,immediateCheck:n,offset:{type:[Number,String],default:300},direction:{type:String,default:"down"}},emits:["load","update:error","update:loading"],setup:function(r,t){var e=t.emit,n=t.slots,d=i(!1),y=i(),m=i(),S=s(),A=o(y),T=function(){g((function(){if(!(d.value||r.finished||r.error||!1===(null==S?void 0:S.value))){var t=r.offset,n=r.direction,i=v(A);if(i.height&&!h(y)){var o=v(m);("up"===n?i.top-o.top<=t:o.bottom-i.bottom<=t)&&(d.value=!0,e("update:loading",!0),e("load"))}}}))},j=function(){if(r.finished){var t=n.finished?n.finished():r.finishedText;if(t)return c("div",{class:x("finished-text")},[t])}},k=function(){e("update:error",!1),T()},C=function(){if(r.error){var t=n.error?n.error():r.errorText;if(t)return c("div",{class:x("error-text"),onClick:k},[t])}},B=function(){if(d.value&&!r.finished)return c("div",{class:x("loading")},[n.loading?n.loading():c(p,{class:x("loading-icon")},{default:function(){return[r.loadingText||w("loading")]}})])};return a([function(){return r.loading},function(){return r.finished},function(){return r.error}],T),u((function(){d.value=r.loading})),l((function(){r.immediateCheck&&T()})),b({check:T}),f("scroll",T,{target:A}),function(){var t=null==n.default?void 0:n.default(),e=c("div",{ref:m,class:x("placeholder")},null);return c("div",{ref:y,role:"feed",class:x(),"aria-busy":d.value},["down"===r.direction?t:e,B(),j(),C(),"up"===r.direction?t:e])}}});t("L",y(A))}}}))}();