class i{constructor(n,e){this.platformId=n;this.service=e;this.isBrowser.set(O(this.platformId))}destroyRef=_(A);sEOService=_(P);hiddenTags=g([]);isBrowser=g(!1);onLoading=g(!1);mappingId=w("");data=g({});realIndex=g(0);readyToshow=g(!1);firstImageLoaded=g(!1);remainingLoaded=g(!1);carouselActivated=g(!1);customOptions=g({loop:!0,items:1,autoplay:!0,autoplayTimeout:3e3,autoplayHoverPause:!1,dots:!0,nav:!1});ngOnInit(){this.onLoading.set(!0),this.setHiddenTags(this.mappingId()),this.service.getBanner$(this.mappingId()).pipe(I(this.destroyRef),ne(n=>{let e=(n.bannerSettingBase??[]).filter(t=>t.isOn&&t.pcImageUrl&&t.mbImageUrl);return re(J({},n),{bannerSettingBase:e})}),y(n=>{let e=n.carouselInterval??5;this.customOptions.update(t=>re(J({},t),{autoplayTimeout:e*1e3})),this.data.set(n),this.preloadFirstImage()}),W(()=>this.onLoading.set(!1))).subscribe()}ngAfterViewInit(){this.isBrowser()&&this.readyToshow.set(!0)}onFirstImageLoad(){if(!this.firstImageLoaded()&&(this.firstImageLoaded.set(!0),this.isBrowser())){let n=()=>this.carouselActivated.set(!0);try{typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{n()},{timeout:800}):setTimeout(()=>{n()},120)}catch{setTimeout(()=>{n()},120)}this.startLCPGate()}}lcpGateStarted=!1;startLCPGate(){if(this.lcpGateStarted||(this.lcpGateStarted=!0,!this.isBrowser()))return;let n=!1,e=()=>{n||(n=!0,this.loadRestImages())},t=setTimeout(e,1800);try{if("PerformanceObserver"in window){let a=new PerformanceObserver(o=>{o.getEntries().length&&(e(),clearTimeout(t),a.disconnect())});a.observe({type:"largest-contentful-paint",buffered:!0})}}catch{}}loadRestImages(){this.remainingLoaded()||this.remainingLoaded.set(!0)}preloadFirstImage(){if(!this.isBrowser())return;let n=this.data().bannerSettingBase?.[0];if(!n?.pcImageUrl)return;let e=n.pcImageUrl;if(document.querySelector(`link[rel=preload][href="${e}"]`))return;let t=document.createElement("link");t.rel="preload",t.as="image",t.href=e,t.fetchPriority="high",document.head.appendChild(t)}onTranslated(n){n?.startPosition!==void 0&&(this.realIndex.set(n.startPosition),!this.remainingLoaded()&&n.startPosition>=1&&this.remainingLoaded.set(!0))}setHiddenTags=(n="")=>{n&&this.sEOService.apiSEOSEOTitleGet(n).pipe(I(this.destroyRef)).subscribe(e=>{this.hiddenTags.set(e)})};static \u0275fac=function(e){return new(e||i)(S(L),S(we))};static \u0275cmp=M({type:i,selectors:[["banner1"]],inputs:{mappingId:[1,"mappingId"]},features:[me([we])],decls:3,vars:1,consts:[[1,"relative","pb-20","pad:pb-5","min-h-[380px]","pad:min-h-[400px]"],[3,"tagsData"],[1,"overflow-hidden","pad:pl-20"],[1,"custom-style",3,"options"],[1,"absolute","aspect-[230/180]","min-h-[220px]","pad:h-auto","pad:min-h-[330px]","max-w-[48%]","pad:max-w-[42%]","pad:aspect-[540/330]","bottom-0","left-0","z-10","bg-primary-600/[.95]","bg-[url(/assets/images/modules/infinite-white.png)]","rounded-br-[100px]","pad:rounded-tl-[100px]","pt-7","pad:pt-11","pad:pb-10",3,"ngClass"],[1,"w-full","px-4","pad:ml-[10%]"],[1,"text-xs","font-normal","text-left","text-white","pad:text-base","w-full","pad:w-[164px]","overflow-hidden","whitespace-nowrap"],[1,"mt-2.5","h-[60px]","pad:pr-12","pad:h-auto","overflow-y-hidden","w-full","text-2xl","text-white","pad:text-[35px]","break-words","leading-tight"],[1,"hidden","tracking-[0px]","mt-5","overflow-hidden","text-base","pad:w-[355px]","text-white","whitespace-nowrap","pad:block"],["target","_blank","rel","noreferrer noopener","appMonitorBizLoan","",1,"mt-8","pad:mt-9","inline-block","text-sm","pad:text-base","px-4","py-3","overflow-hidden","text-center","w-[118px]","pad:w-[210px]","truncate","bg-white","rounded-full","whitespace-nowrap","text-ellipsis","pad:px-6","pad:py-2","text-dark-500","hover:bg-gray-200",3,"href"],[1,"custom-style",3,"translated","options"],["carouselSlide",""],[1,"aspect-[1150/490]","min-h-[300px]","pad:min-h-[400px]","w-full","bg-gray-200","animate-pulse","pad:rounded-br-[100px]"],["media","(min-width: 768px)",3,"srcset"],["decoding","async","loading","eager","fetchpriority","high",1,"aspect-[1150/490]","min-h-[380px]","pad:min-h-[400px]","w-full","object-cover","pad:rounded-br-[100px]",3,"alt","src"],[1,"hidden","pad:block"],["decoding","async","loading","lazy","fetchpriority","low",1,"aspect-[1150/490]","min-h-[380px]","pad:min-h-[400px]","w-full","object-cover","hidden","pc:block","pad:rounded-br-[100px]",3,"alt","src"],[1,"pad:hidden"],["media","(max-width: 768px)",3,"srcset"],["decoding","async","loading","lazy","fetchpriority","low",1,"min-h-[300px]","w-full","object-cover","pc:hidden",3,"alt","src"],["media","(min-width: 768px)"],["width","1150","height","490","decoding","async","loading","eager","fetchpriority","high",1,"aspect-[1150/490]","min-h-[380px]","pad:min-h-[400px]","w-full","object-cover","pad:rounded-br-[100px]",3,"load","alt"]],template:function(e,t){if(e&1&&(l(0,"div",0),f(1,da,13,9)(2,ca,0,0),d()),e&2){let a;r(),v(!t.onLoading()&&((a=t.data().bannerSettingBase)!=null&&a.length)?1:t.onLoading()?2:-1)}},dependencies:[G,q,lt,st,je,ae,R],styles:[".custom-style .owl-theme .owl-dots .owl-dot span{width:12px!important;height:2px!important}@media screen and (max-width: 768px){ .custom-style .owl-theme .owl-dots{padding-left:30px;padding-top:20px} .custom-style .owl-theme .owl-dots .owl-dot{display:inline-block} .custom-style .owl-theme .owl-dots .owl-dot span{width:12px!important;height:2px!important}}"]})}
車輛融資
機車、手機資金額度
小額融資免出門,線上申辦只要3分鐘。
立即申請