!function(){function r(r,o){return function(r){if(Array.isArray(r))return r}(r)||function(r,n){var o=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null==o)return;var e,a,i=[],t=!0,l=!1;try{for(o=o.call(r);!(t=(e=o.next()).done)&&(i.push(e.value),!n||i.length!==n);t=!0);}catch(c){l=!0,a=c}finally{try{t||null==o.return||o.return()}finally{if(l)throw a}}return i}(r,o)||function(r,o){if(!r)return;if("string"==typeof r)return n(r,o);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(r);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return n(r,o)}(r,o)||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 n(r,n){(null==n||n>r.length)&&(n=r.length);for(var o=0,e=new Array(n);o<n;o++)e[o]=r[o];return e}var o=document.createElement("style");o.innerHTML=":root{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background-color: var(--van-background-color);--van-image-loading-icon-size: .85333rem;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: .85333rem;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-border-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background-color)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}\n",document.head.appendChild(o),System.register(["./index-legacy.2562bdba.js"],(function(n){"use strict";var o,e,a,i,t,l,c,u,d,v,s,g,f,m,h,y,p,b,z,_;return{setters:[function(r){o=r.A,e=r.E,a=r.G,i=r.$,t=r.d,l=r.S,c=r.a0,u=r.V,d=r.a1,v=r.L,s=r.a2,g=r.a3,f=r.a4,m=r.j,h=r.a5,y=r.a6,p=r.a7,b=r.W,z=r.M,_=r.N}],execute:function(){var w=r(o("image"),2),S=w[0],x=w[1],j={src:String,alt:String,fit:String,position:String,round:Boolean,width:e,height:e,radius:e,lazyLoad:Boolean,iconSize:e,showError:a,errorIcon:i("photo-fail"),iconPrefix:String,showLoading:a,loadingIcon:i("photo")},I=t({name:S,props:j,emits:["load","error"],setup:function(r,n){var o=n.emit,e=n.slots,a=l(!1),i=l(!0),t=l(),_=c().proxy.$Lazyload,w=u((function(){var n={width:d(r.width),height:d(r.height)};return v(r.radius)&&(n.overflow="hidden",n.borderRadius=d(r.radius)),n}));s((function(){return r.src}),(function(){a.value=!1,i.value=!0}));var S=function(r){i.value=!1,o("load",r)},j=function(r){a.value=!0,i.value=!1,o("error",r)},I=function(n,o,e){return e?e():m(z,{name:n,size:r.iconSize,class:o,classPrefix:r.iconPrefix},null)},L=function(){if(!a.value&&r.src){var n={alt:r.alt,class:x("img"),style:{objectFit:r.fit,objectPosition:r.position}};return r.lazyLoad?h(m("img",p({ref:t},n),null),[[y("lazy"),r.src]]):m("img",p({src:r.src,onLoad:S,onError:j},n),null)}},A=function(r){var n=r.el,o=function(){n===t.value&&i.value&&S()};t.value?o():b(o)},$=function(r){r.el!==t.value||a.value||j()};return _&&g&&(_.$on("loaded",A),_.$on("error",$),f((function(){_.$off("loaded",A),_.$off("error",$)}))),function(){var n;return m("div",{class:x({round:r.round}),style:w.value},[L(),i.value&&r.showLoading?m("div",{class:x("loading")},[I(r.loadingIcon,x("loading-icon"),e.loading)]):a.value&&r.showError?m("div",{class:x("error")},[I(r.errorIcon,x("error-icon"),e.error)]):void 0,null==(n=e.default)?void 0:n.call(e)])}}});n("I",_(I))}}}))}();
