vue-pure-admin/dist/static/js/index-f7eaa9e7.js
2023-05-26 23:30:14 +08:00

2 lines
18 KiB
JavaScript

import{r as h,a8 as dt,o as B,a9 as ot,e as w,j as _,aa as S,f as b,ab as R,h as d,E as I,A as x,n as rt,p as ft,q as mt,d as D,S as F,ac as pt,y as N,ad as gt,ae as ht,u as y,F as At,k as vt,C as yt,af as P,ag as wt,b as T,c as bt,w as j,ah as _t,ai as Et,aj as zt}from"./index-898bbf46.js";import{b as Ot}from"./back_top-0df08449.js";function St(t=6){return Number(Math.random().toString().substr(3,t)+Date.now()).toString(36)}const It=["#409EFF","#67C23A","#E6A23C","#F56C6C","#909399"];function xt(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Rt(){return It[xt(0,4)]}const Ft="https://www.getphotoblanket.com",Nt=({page:t=1,pageSize:e=20})=>{const n=`${Ft}/products.json?page=${t}&limit=${e}`;return fetch(n).then(o=>o.json()).then(o=>o.products).then(o=>o.map(r=>({id:St(),star:!1,price:r.variants[0].price,src:{original:r.images[0].src},backgroundColor:Rt(),name:r.title})))},jt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABbFJREFUaEPtWV1sFFUUPufOLmjpD7G0nXtm11igD0Q0CpqImsiDEcGoIVEReeBBNGgkEQSjwUR4MQZ/MBr/MeFFFIkxYAR9MGr84cFijBJ9UFPD7r3TqtWWLsVuO3PM3ew20+3uzizTxpDsTSa7e+ec75zvnPtz7l2E87zhee4/NAj83xlsZKCRgZgRaAyhmAGMrV4zA5lM5sJEItGcz+dbhBDN5gGAZkRsQcTCd/Mwc0vpu+k3v5l5yHGcDUEPtdY7AeAsIp4t/5yYmCj0myefz//LzGfNY/p7enrGqjGtSEAp9ZgQYgsz07mGiJk3OY7zVklfKbULEZ88FzxE1L7vv+Q4ztPl+tMIZLPZFUKIb87FUFBHCLHQtu2+Up/WmuNi+r5/bSqVOh7EmUZAa70VAJ6PYwwRJ6SUyRK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Bod/8TUrKGLyV0CaHUHW9X/D9N93V6azvezAAAAAElFTkSuQmCC";const it=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},Bt={},Dt=t=>(ft("data-v-259be2b2"),t=t(),mt(),t),Mt={class:"container"},Pt=Dt(()=>d("div",{class:"spinner"},null,-1)),Tt=[Pt];function kt(t,e){return w(),_("div",Mt,Tt)}const Lt=it(Bt,[["render",kt],["__scopeId","data-v-259be2b2"],["__file","/home/oumoussa/side-projects/infinite/src/components/Spinner.vue"]]),Ht=t=>({loading(){t.value="loading"},loaded(){t.value="loaded"},complete(){t.value="complete"},error(){t.value="error"}}),Kt=(t,e,n)=>()=>{const o=n.parentEl||document.documentElement;n.prevHeight=o.scrollHeight,e.loading(),t("infinite",e)},Ut=(t,e)=>{const n=t.getBoundingClientRect();if(!e)return n.top>=0&&n.bottom<=window.innerHeight;const o=e.getBoundingClientRect();return n.top>=o.top&&n.bottom<=o.bottom},k=t=>{t.parentEl=document.querySelector(t.target)||null;let e=`0px 0px ${t.distance}px 0px`;t.top&&(e=`${t.distance}px 0px 0px 0px`);const n=new IntersectionObserver(o=>{o[0].isIntersecting&&(t.firstload&&t.emit(),t.firstload=!0)},{root:t.parentEl,rootMargin:e});return n.observe(t.infiniteLoading.value),n},Qt={class:"state-error"},Wt={__name:"InfiniteLoading",props:{top:{type:Boolean,required:!1},target:{type:[String,Boolean],required:!1},distance:{type:Number,required:!1,default:0},identifier:{required:!1},firstload:{type:Boolean,required:!1,default:!0},slots:{type:Object,required:!1}},emits:["infinite"],setup(t,{emit:e}){const n=t;let o=null;const r=h(null),s=h("ready"),{top:i,firstload:a,target:u,distance:l}=n,{identifier:f}=dt(n),c={infiniteLoading:r,target:u,top:i,firstload:a,distance:l,prevHeight:0,parentEl:null};c.emit=Kt(e,Ht(s),c);const g=()=>x(s,async p=>{const A=c.parentEl||document.documentElement;await rt(),p=="loaded"&&i&&(A.scrollTop=A.scrollHeight-c.prevHeight),p=="loaded"&&Ut(r.value,c.parentEl)&&c.emit(),p=="complete"&&o.disconnect()}),m=()=>x(f,()=>{s.value="ready",o.disconnect(),o=k(c)});return B(()=>{o=k(c),g(),f&&m()}),ot(()=>{o.disconnect()}),(p,A)=>(w(),_("div",{ref_key:"infiniteLoading",ref:r},[s.value=="loading"?S(p.$slots,"spinner",{key:0},()=>[b(Lt)],!0):R("v-if",!0),s.value=="complete"?S(p.$slots,"complete",{key:1},()=>{var v;return[d("span",null,I(((v=t.slots)==null?void 0:v.complete)||"No more results!"),1)]},!0):R("v-if",!0),s.value=="error"?S(p.$slots,"error",{key:2,retry:c.emit},()=>{var v;return[d("span",Qt,[d("span",null,I(((v=t.slots)==null?void 0:v.error)||"Oops something went wrong!"),1),d("button",{class:"retry",onClick:A[0]||(A[0]=(...E)=>c.emit&&c.emit(...E))}," retry ")])]},!0):R("v-if",!0)],512))}},Yt=it(Wt,[["__scopeId","data-v-9d82030b"],["__file","/home/oumoussa/side-projects/infinite/src/components/InfiniteLoading.vue"]]);function Gt(t){return gt()?(ht(t),!0):!1}const st=typeof window<"u";function Vt(t,e){function n(...o){t(()=>e.apply(this,o),{fn:e,thisArg:this,args:o})}return n}function Zt(t,e={}){let n,o;return s=>{const i=y(t),a=y(e.maxWait);if(n&&clearTimeout(n),i<=0||a!==void 0&&a<=0)return o&&(clearTimeout(o),o=null),s();a&&!o&&(o=setTimeout(()=>{n&&clearTimeout(n),o=null,s()},a)),n=setTimeout(()=>{o&&clearTimeout(o),o=null,s()},i)}}function qt(t,e=200,n={}){return Vt(Zt(e,n),t)}function Xt(t){var e;const n=y(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Jt=st?window:void 0,L=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},H="__vueuse_ssr_handlers__";L[H]=L[H]||{};var K=Object.getOwnPropertySymbols,$t=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ee=(t,e)=>{var n={};for(var o in t)$t.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&K)for(var o of K(t))e.indexOf(o)<0&&te.call(t,o)&&(n[o]=t[o]);return n};function ne(t,e,n={}){const o=n,{window:r=Jt}=o,s=ee(o,["window"]);let i;const a=r&&"ResizeObserver"in r,u=()=>{i&&(i.disconnect(),i=void 0)},l=x(()=>Xt(t),c=>{u(),a&&r&&c&&(i=new ResizeObserver(e),i.observe(c,s))},{immediate:!0,flush:"post"}),f=()=>{u(),l()};return Gt(f),{isSupported:a,stop:f}}var U,Q;st&&(window!=null&&window.navigator)&&((U=window==null?void 0:window.navigator)!=null&&U.platform)&&/iP(ad|hone|od)/.test((Q=window==null?void 0:window.navigator)==null?void 0:Q.platform);const oe=({breakpoints:t,wrapperWidth:e,gutter:n,hasAroundGutter:o,initWidth:r})=>{const s=Object.keys(t).map(l=>Number(l)).sort((l,f)=>l-f);let i=e,a=!1;for(const l of s)if(e<=l){i=l,a=!0;break}if(!a)return r;const u=t[i].rowPerView;return o?(e-n)/u-n:(e-(u-1)*n)/u};function re(t){const e=h(0),n=h(null);ne(n,i=>{const a=i[0],{width:u}=a.contentRect;e.value=u});const o=N(()=>oe({wrapperWidth:e.value,breakpoints:t.breakpoints,gutter:t.gutter,hasAroundGutter:t.hasAroundGutter,initWidth:t.width})),r=N(()=>{const i=t.hasAroundGutter?-t.gutter:t.gutter;return Math.floor((e.value+i)/(o.value+t.gutter))}),s=N(()=>{const i=t.hasAroundGutter?t.gutter:-t.gutter,a=r.value*(o.value+t.gutter)+i;return(e.value-a)/2});return{waterfallWrapper:n,wrapperWidth:e,colWidth:o,cols:r,offsetX:s}}function at(t,e){return new RegExp(`(^|\\s)${e}(\\s|$)`).test(t.className)}function W(t,e){if(at(t,e))return;const n=t.className.split(/\s+/);n.push(e),t.className=n.join(" ")}const ie=document.createElement("div").style,C=(()=>{const t={webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform",standard:"transform"};for(const e in t){const n=t[e];if(ie[n]!==void 0)return e}return!1})();function O(t){return C===!1?!1:C==="standard"?t:C+t.charAt(0).toUpperCase()+t.substr(1)}const Y=O("transform"),G=O("animation-duration"),V=O("animation-delay"),Z=O("transition"),q=O("animation-fill-mode");function se(t,e,n,o,r){const s=h([]),i=h(0),a=c=>{const g=t.hasAroundGutter?c+1:c;return t.gutter*g+e.value*c+o.value},u=()=>{s.value=new Array(n.value).fill(t.hasAroundGutter?t.gutter:0)},l=ae(t);return{wrapperHeight:i,layoutHandle:async()=>{u();const c=[];if(r&&r.value&&r.value.childNodes.forEach(g=>{g.className==="waterfall-item"&&c.push(g)}),c.length===0)return!1;for(let g=0;g<c.length;g++){const m=c[g],p=Math.min.apply(null,s.value),A=s.value.indexOf(p),v=a(A),E=m.style;Y&&(E[Y]=`translate3d(${v}px,${p}px, 0)`),E.width=`${e.value}px`;const{height:ut}=m.getBoundingClientRect();s.value[A]+=ut+t.gutter,l(m,()=>{Z&&(E[Z]="transform .3s")})}i.value=Math.max.apply(null,s.value)}}}function ae(t){return(e,n)=>{const o=e.firstChild;if(o&&!at(o,t.animationPrefix)){const r=`${t.animationDuration/1e3}s`,s=`${t.animationDelay/1e3}s`,i=o.style;i.visibility="visible",G&&(i[G]=r),V&&(i[V]=s),q&&(i[q]="both"),W(o,t.animationPrefix),W(o,t.animationEffect),n&&setTimeout(()=>{n()},t.animationDuration+t.animationDelay)}}}const le=typeof window<"u"&&window!==null,X=de(),ce=Object.prototype.propertyIsEnumerable,J=Object.getOwnPropertySymbols;function ue(t,...e){return e.map(o=>o.replace(/\[(\w+)\]/g,".$1").split(".").reduce((r,s)=>r&&r[s],t))}function de(){return le&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype?("isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get(){return this.intersectionRatio>0}}),!0):!1}function z(t){return typeof t=="function"||toString.call(t)==="[object Object]"}function fe(t){return typeof t=="object"?t===null:typeof t!="function"}function me(t){return t!=="__proto__"&&t!=="constructor"&&t!=="prototype"}function pe(t,...e){if(!z(t))throw new TypeError("expected the first argument to be an object");if(e.length===0||typeof Symbol!="function"||typeof J!="function")return t;for(const n of e){const o=J(n);for(const r of o)ce.call(n,r)&&(t[r]=n[r])}return t}function lt(t,...e){let n=0;for(fe(t)&&(t=e[n++]),t||(t={});n<e.length;n++)if(z(e[n])){for(const o of Object.keys(e[n]))me(o)&&(z(t[o])&&z(e[n][o])?lt(t[o],e[n][o]):t[o]=e[n][o]);pe(t,e[n])}return t}function $(t,e){return new Promise((n,o)=>{const r=new Image;r.onload=()=>{n(r)},r.onerror=()=>{o(new Error("Image load error"))},e&&(r.crossOrigin="Anonymous"),r.src=t})}const ge={rootMargin:"0px",threshold:0},tt="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",he="";class Ae{constructor(e=!0,n,o=!0){this.lazyActive=!0,this.crossOrigin=!0,this.options={loading:tt,error:he,observerOptions:ge,log:!0},this._images=new WeakMap,this.lazyActive=e,this.crossOrigin=o,this.config(n)}config(e={}){lt(this.options,e)}mount(e,n,o){const{src:r,loading:s,error:i}=this._valueFormatter(n);e.setAttribute("lazy","loading"),e.setAttribute("src",s||tt),this.lazyActive?(X||(this._setImageSrc(e,r,o,i),this._log(()=>{throw new Error("Not support IntersectionObserver!")})),this._initIntersectionObserver(e,r,o,i)):this._setImageSrc(e,r,o,i)}resize(e,n){const o=e.getAttribute("lazy"),r=e.getAttribute("src");o&&o==="loaded"&&r&&$(r,this.crossOrigin).then(s=>{const{width:i,height:a}=s,u=e.width/i*a;e.height=u;const l=e.style;l.height=`${u}px`,n()})}unmount(e){const n=this._realObserver(e);n&&n.unobserve(e),this._images.delete(e)}_setImageSrc(e,n,o,r){!n||e.getAttribute("src")===n||$(n,this.crossOrigin).then(i=>{const{width:a,height:u}=i,l=u/a,f=e.parentNode.parentNode;f.style.paddingBottom=`${l*100}%`,e.setAttribute("lazy","loaded"),e.removeAttribute("src"),e.setAttribute("src",n),o()}).catch(()=>{const i=this._realObserver(e);i&&i.disconnect(),r&&(e.setAttribute("lazy","error"),e.setAttribute("src",r)),this._log(()=>{throw new Error(`Image failed to load!And failed src was: ${n} `)}),o()})}_isOpenLazy(){return X&&this.lazyActive}_initIntersectionObserver(e,n,o,r){const s=this.options.observerOptions;this._images.set(e,new IntersectionObserver(a=>{Array.prototype.forEach.call(a,u=>{if(u.isIntersecting){const l=this._realObserver(e);l&&l.unobserve(u.target),this._setImageSrc(e,n,o,r)}})},s));const i=this._realObserver(e);i&&i.observe(e)}_valueFormatter(e){let n=e,o=this.options.loading,r=this.options.error;return z(e)&&(n=e.src,o=e.loading||this.options.loading,r=e.error||this.options.error),{src:n,loading:o,error:r}}_log(e){this.options.log&&e()}_realObserver(e){return this._images.get(e)}}var ct=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n};const M=D({props:{list:{type:Array,default:()=>[]},rowKey:{type:String,default:"id"},imgSelector:{type:String,default:"src"},width:{type:Number,default:200},breakpoints:{type:Object,default:()=>({1200:{rowPerView:3},800:{rowPerView:2},500:{rowPerView:1}})},gutter:{type:Number,default:10},hasAroundGutter:{type:Boolean,default:!0},animationPrefix:{type:String,default:"animate__animated"},animationEffect:{type:String,default:"fadeIn"},animationDuration:{type:Number,default:1e3},animationDelay:{type:Number,default:300},backgroundColor:{type:String,default:"#fff"},lazyload:{type:Boolean,default:!0},loadProps:{type:Object,default:()=>{}},crossOrigin:{type:Boolean,default:!0},delay:{type:Number,default:300}},setup(t){const e=new Ae(t.lazyload,t.loadProps,t.crossOrigin);F("lazy",e);const{waterfallWrapper:n,wrapperWidth:o,colWidth:r,cols:s,offsetX:i}=re(t),{wrapperHeight:a,layoutHandle:u}=se(t,r,s,i,n),l=qt(()=>{u()},t.delay);x(()=>[o,r,t.list],()=>{l()},{deep:!0});const f=h(0);return F("sizeChangeTime",f),F("imgLoaded",l),{waterfallWrapper:n,wrapperHeight:a,getRenderURL:m=>ue(m,t.imgSelector)[0],getKey:(m,p)=>m[t.rowKey]||p}}}),et=()=>{pt(t=>({e0bdcc92:t.backgroundColor}))},nt=M.setup;M.setup=nt?(t,e)=>(et(),nt(t,e)):et;const ve=M,ye={class:"waterfall-card"};function we(t,e,n,o,r,s){return w(),_("div",{ref:"waterfallWrapper",class:"waterfall-list",style:yt({height:`${t.wrapperHeight}px`})},[(w(!0),_(At,null,vt(t.list,(i,a)=>(w(),_("div",{key:t.getKey(i,a),class:"waterfall-item"},[d("div",ye,[S(t.$slots,"item",{item:i,index:a,url:t.getRenderURL(i)},void 0,!0)])]))),128))],4)}var be=ct(ve,[["render",we],["__scopeId","data-v-585fbbe9"]]);const _e=D({props:{url:{type:String,default:""}},setup(t){const e=P("imgLoaded"),n=P("lazy"),o=h(null);B(()=>{r()}),ot(()=>{s()});function r(){o.value&&n.mount(o.value,t.url,()=>{e()})}function s(){o.value&&n.unmount(o.value)}return{lazyRef:o}}}),Ee={class:"lazy__box"},ze={class:"lazy__resource"},Oe={ref:"lazyRef",class:"lazy__img"};function Se(t,e,n,o,r,s){return w(),_("div",Ee,[d("div",ze,[d("img",Oe,null,512)])])}var Ie=ct(_e,[["render",Se],["__scopeId","data-v-5a384790"]]);const xe=["onClick"],Re={class:"overflow-hidden"},Fe={class:"px-4 pt-2 pb-4 border-t border-t-gray-800"},Ne={class:"pb-4 text-gray-50 group-hover:text-yellow-300"},je={class:"pt-3 flex justify-between items-center border-t border-t-gray-600 border-opacity-50"},Ce={class:"text-gray-50"},Be=["onClick"],Pe=D({__name:"index",setup(t){const e=wt({rowKey:"id",gutter:10,hasAroundGutter:!0,width:320,breakpoints:{1200:{rowPerView:4},800:{rowPerView:3},500:{rowPerView:2}},animationEffect:"animate__zoomInUp",animationDuration:1e3,animationDelay:300,imgSelector:"src.original",loadProps:{loading:Ct,error:jt},lazyload:!0}),n=h(1),o=h([]),r=h(),s=h();function i(){s.value=_t.service({target:".content",background:"transparent",text:"加载中"}),Nt({page:n.value,pageSize:r.value}).then(l=>{setTimeout(()=>{o.value.push(...l),n.value+=1,rt(()=>{s.value.close()})},500)})}function a(l,f){o.value.splice(f,1)}function u(l){}return B(()=>{i()}),(l,f)=>{const c=T("el-backtop"),g=T("el-scrollbar");return w(),bt(g,{height:"87vh",class:"content"},{default:j(()=>[b(y(be),zt({list:o.value},e),{item:j(({item:m,url:p,index:A})=>[d("div",{class:"bg-gray-900 rounded-lg shadow-md overflow-hidden transition-all duration-300 ease-linear hover:shadow-lg hover:shadow-gray-600 group",onClick:v=>void 0},[d("div",Re,[b(y(Ie),{url:p,class:"cursor-pointer transition-all duration-300 ease-linear group-hover:scale-105"},null,8,["url"])]),d("div",Fe,[d("h4",Ne,I(m.name),1),d("div",je,[d("div",Ce,"$ "+I(m.price),1),d("div",null,[d("button",{class:"px-3 h-7 rounded-full bg-red-500 text-sm text-white shadow-lg transition-all duration-300 hover:bg-red-600",onClick:Et(v=>a(m,A),["stop"])}," 删除 ",8,Be)])])])],8,xe)]),_:1},16,["list"]),b(c,{title:"回到顶部",right:35,"visibility-height":400,target:".content .el-scrollbar__wrap"},{default:j(()=>[b(y(Ot))]),_:1}),b(y(Yt),{firstload:!1,onInfinite:i})]),_:1})}}});export{Pe as default};