index-legacy.4a4e16fb.js 2.8 KB

1
  1. !function(){function r(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null==t)return;var n,i,o=[],a=!0,u=!1;try{for(t=t.call(r);!(a=(n=t.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(l){u=!0,i=l}finally{try{a||null==t.return||t.return()}finally{if(u)throw i}}return o}(r,t)||function(r,t){if(!r)return;if("string"==typeof r)return e(r,t);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 e(r,t)}(r,t)||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 e(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}System.register(["./App-legacy.445e1227.js"],(function(e){"use strict";var t,n,i,o,a,u,l,f,c,d,s,g,v,h,p,y,b;return{setters:[function(r){t=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,y=r.b8,b=r.R}],execute:function(){var m=r(d("list"),3),S=m[0],x=m[1],w=m[2],A=t({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,e){var t=e.emit,n=e.slots,d=i(!1),b=i(),m=i(),S=s(),A=o(b),T=function(){g((function(){if(!(d.value||r.finished||r.error||!1===(null==S?void 0:S.value))){var e=r.offset,n=r.direction,i=v(A);if(i.height&&!h(b)){var o=v(m);("up"===n?i.top-o.top<=e:o.bottom-i.bottom<=e)&&(d.value=!0,t("update:loading",!0),t("load"))}}}))},j=function(){if(r.finished){var e=n.finished?n.finished():r.finishedText;if(e)return c("div",{class:x("finished-text")},[e])}},k=function(){t("update:error",!1),T()},C=function(){if(r.error){var e=n.error?n.error():r.errorText;if(e)return c("div",{class:x("error-text"),onClick:k},[e])}},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()})),y({check:T}),f("scroll",T,{target:A}),function(){var e=null==n.default?void 0:n.default(),t=c("div",{ref:m,class:x("placeholder")},null);return c("div",{ref:b,role:"feed",class:x(),"aria-busy":d.value},["down"===r.direction?e:t,B(),j(),C(),"up"===r.direction?e:t])}}});e("L",b(A))}}}))}();