HOME


Mini Shell 1.0
Negocios La Pieza.DO | Registrate o Inicia Sesión

Inicie Sesión en su Cuenta de Negocios

Olvidó Contraseña?
DIR: /var/www/lapieza.do/
Upload File :
Current File : /var/www/lapieza.do/51.e02a7b831bc3a865.js
(self.webpackChunkapp_lapieza=self.webpackChunkapp_lapieza||[]).push([[51],{3108:(Fi,se,P)=>{"use strict";P.d(se,{s:()=>oe});var U=P(8041),D=P(5312),F=P(8457);let oe=(()=>{class R{http;apiUrl=D.c.apiUrl;constructor(e){this.http=e}getAllShops(e=1){return this.http.get(`${this.apiUrl}shops?page=${e}`,{headers:this.getHeaders()})}getShops(e="",j=1){return this.http.get(`${this.apiUrl}shops?page=${j}&name=${e}`,{headers:this.getHeaders()})}getShopInfo(e){return this.http.get(`${this.apiUrl}shops/details/${e}`)}getTopFromThisSellerProducts(e){return this.http.get(`${this.apiUrl}shops/products/top/${e}`,{headers:this.getHeaders()})}getNewFromThisSellerProducts(e){return this.http.get(`${this.apiUrl}shops/products/new/${e}`,{headers:this.getHeaders()})}getFeaturedFromThisSellerProducts(e){return this.http.get(`${this.apiUrl}shops/products/featured/${e}`,{headers:this.getHeaders()})}followedCheck(e){return this.http.get(`${this.apiUrl}followed-seller/check/${e}`,{headers:this.getHeaders(!0)})}followedAdd(e){return this.http.get(`${this.apiUrl}followed-seller/store/${e}`,{headers:this.getHeaders(!0)})}followedRemove(e){return this.http.get(`${this.apiUrl}followed-seller/remove/${e}`,{headers:this.getHeaders(!0)})}followedList(e=1){return this.http.get(`${this.apiUrl}followed-seller?page=${e}`,{headers:this.getHeaders(!0)})}topSellers(){return this.http.get(`${this.apiUrl}seller/top`,{headers:this.getHeaders()})}getHeaders(e=!1){const j=new U.b({});if(e){const be=localStorage.getItem("authToken")||"";return j.set("Authorization",`Bearer ${be}`)}return j}static \u0275fac=function(j){return new(j||R)(F.KVO(U.a))};static \u0275prov=F.jDH({token:R,factory:R.\u0275fac,providedIn:"root"})}return R})()},9051:(Fi,se,P)=>{"use strict";P.r(se),P.d(se,{WelcomeComponent:()=>Ue});var U=P(5528),D=P(4909),F=P(8834),oe=P(1653),R=P.n(oe),e=(P(1310),P(8457)),j=P(7374);function be(o,h){if(1&o&&(e.j41(0,"div")(1,"div",7)(2,"a",8),e.nrm(3,"img",9),e.k0s(),e.j41(4,"div",10)(5,"h6"),e.EFF(6),e.nI1(7,"translate"),e.k0s()()()()),2&o){const i=h.$implicit;e.R7$(2),e.ZvI("circle-",i.id,""),e.Y8G("routerLink",i.links.products),e.R7$(),e.Y8G("src",i.icon||"https://via.placeholder.com/150",e.B4B)("alt",i.name||"Category Image"),e.R7$(3),e.JRh(e.bMT(7,7,i.name))}}let He=(()=>{class o{categoryService;cdr;imageUrl;constructor(i,a){this.categoryService=i,this.cdr=a}categories=[];ngOnInit(){this.fetchProducts()}fetchProducts(){this.categoryService.getCategoriesFeatured().subscribe({next:i=>{this.categories=i,this.cdr.detectChanges(),setTimeout(()=>{this.loadCategorySlider()},0)},error:i=>{console.error("Failed to load categories:",i)}})}loadCategorySlider(){0!==R()(".category-slider").length?(R()(".category-slider").hasClass("slick-initialized")&&R()(".category-slider").slick("unslick"),R()(".category-slider").slick({arrows:!0,infinite:!0,slidesToShow:8,slidesToScroll:1,responsive:[{breakpoint:1745,settings:{slidesToShow:7}},{breakpoint:1399,settings:{slidesToShow:6}},{breakpoint:1124,settings:{slidesToShow:5}},{breakpoint:900,settings:{slidesToShow:4}},{breakpoint:692,settings:{slidesToShow:3}},{breakpoint:482,settings:{slidesToShow:2}}]})):console.warn("Slick slider element not found. Initialization skipped.")}static \u0275fac=function(a){return new(a||o)(e.rXU(j.M),e.rXU(e.gRc))};static \u0275cmp=e.VBU({type:o,selectors:[["app-category-slider"]],inputs:{imageUrl:"imageUrl"},decls:10,vars:4,consts:[[1,"category-section-2"],[1,"container-fluid-lg"],[1,"title"],[1,"row"],[1,"col-12"],[1,"category-slider","arrow-slider"],[4,"ngFor","ngForOf"],[1,"shop-category-box","border-0","wow","fadeIn"],[3,"routerLink"],[1,"img-fluid","blur-up","lazyload",3,"src","alt"],[1,"category-name"]],template:function(a,d){1&a&&(e.j41(0,"section",0)(1,"div",1)(2,"div",2)(3,"h2"),e.EFF(4),e.nI1(5,"translate"),e.k0s()(),e.j41(6,"div",3)(7,"div",4)(8,"div",5),e.DNE(9,be,8,9,"div",6),e.k0s()()()()()),2&a&&(e.R7$(4),e.JRh(e.bMT(5,2,"category_menu_title")),e.R7$(5),e.Y8G("ngForOf",d.categories))},dependencies:[U.R,D.h,D.D9,F.G],encapsulation:2})}return o})();P(9973);var Ie=P(7673),X=P(6354),V=P(9437),H=P(5312),lt=P(8041);let Ae=(()=>{class o{http;apiUrl=H.c.apiUrl;constructor(i){this.http=i}getSlidersBanner(){return this.http.get(`${this.apiUrl}sliders`).pipe((0,X.T)(i=>i&&i.success&&Array.isArray(i.data)?i.data:(console.warn("Invalid API response format:",i),[])),(0,V.W)(i=>(console.error("Error fetching News Products:",i),[])))}getMainBanner(){return this.http.get(`${this.apiUrl}banners`).pipe((0,X.T)(i=>i&&i.success&&Array.isArray(i.data)?i.data:(console.warn("Invalid API response format:",i),[])),(0,V.W)(i=>(console.error("Error fetching News Products:",i),[])))}getFirstBanner(){return this.http.get(`${this.apiUrl}banners-one`).pipe((0,X.T)(i=>i&&i.success&&Array.isArray(i.data)?i.data:(console.warn("Invalid API response format:",i),[])),(0,V.W)(i=>(console.error("Error fetching News Products:",i),[])))}getSecondBanner(){return this.http.get(`${this.apiUrl}banners-two`).pipe((0,X.T)(i=>i&&i.success&&Array.isArray(i.data)?i.data:(console.warn("Invalid API response format:",i),[])),(0,V.W)(i=>(console.error("Error fetching News Products:",i),[])))}getThirdBanner(){return this.http.get(`${this.apiUrl}banners-three`).pipe((0,X.T)(i=>i&&i.success&&Array.isArray(i.data)?i.data:(console.warn("Invalid API response format:",i),[])),(0,V.W)(i=>(console.error("Error fetching News Products:",i),(0,Ie.of)([]))))}getFourthBanner(){return this.http.get(`${this.apiUrl}banners-four`).pipe((0,X.T)(i=>i&&i.success&&Array.isArray(i.data)?i.data:(console.warn("Invalid API response format:",i),[])),(0,V.W)(i=>(console.error("Error fetching News Products:",i),(0,Ie.of)([]))))}getFifthBanner(){return this.http.get(`${this.apiUrl}banners-five`).pipe((0,X.T)(i=>i&&i.success&&Array.isArray(i.data)?i.data:(console.warn("Invalid API response format:",i),[])),(0,V.W)(i=>(console.error("Error fetching News Products:",i),(0,Ie.of)([]))))}static \u0275fac=function(a){return new(a||o)(e.KVO(lt.a))};static \u0275prov=e.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();const Gt=o=>({active:o});function Ti(o,h){1&o&&(e.j41(0,"div",5)(1,"div",6)(2,"span",7),e.EFF(3,"Cargando..."),e.k0s()()())}function xi(o,h){if(1&o&&(e.j41(0,"div",8),e.EFF(1),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.SpI(" ",i.errorMessage," ")}}function $t(o,h){if(1&o&&(e.j41(0,"div",21)(1,"div",22),e.nrm(2,"img",23),e.j41(3,"div",24)(4,"div")(5,"h6",25),e.EFF(6),e.k0s(),e.j41(7,"h1",26),e.EFF(8),e.k0s(),e.j41(9,"h3",27),e.EFF(10),e.k0s(),e.j41(11,"p",28),e.EFF(12),e.k0s(),e.j41(13,"button",29)(14,"b"),e.EFF(15),e.nI1(16,"translate"),e.k0s()()()()()()),2&o){const i=h.$implicit;e.Y8G("ngClass",e.eq3(9,Gt,0===h.index)),e.R7$(2),e.Y8G("src",i.photo,e.B4B),e.R7$(4),e.JRh(i.text1),e.R7$(2),e.JRh(i.text2),e.R7$(2),e.JRh(i.text3),e.R7$(2),e.JRh(i.text4),e.R7$(3),e.JRh(e.bMT(16,7,"buy_now"))}}function Yt(o,h){if(1&o&&(e.qex(0),e.DNE(1,$t,17,11,"div",20),e.bVm()),2&o){const i=e.XpG(2);e.R7$(),e.Y8G("ngForOf",i.slidersBanners)}}function Ut(o,h){if(1&o&&e.nrm(0,"button",32),2&o){const i=h.index;e.Y8G("ngClass",e.eq3(4,Gt,0===i)),e.BMQ("data-bs-target","#productCarousel")("data-bs-slide-to",i)("aria-current",0===i?"true":null)}}function Ri(o,h){if(1&o&&(e.j41(0,"div",30),e.DNE(1,Ut,1,6,"button",31),e.k0s()),2&o){const i=e.XpG(2);e.R7$(),e.Y8G("ngForOf",i.slidersBanners)}}function zt(o,h){if(1&o&&(e.j41(0,"div",33)(1,"div",34),e.nrm(2,"img",35),e.k0s(),e.j41(3,"div",36)(4,"div")(5,"h4",37),e.EFF(6),e.k0s(),e.j41(7,"h5",38),e.EFF(8),e.k0s(),e.j41(9,"p",39),e.EFF(10),e.k0s(),e.nrm(11,"br"),e.j41(12,"button",40)(13,"b"),e.EFF(14),e.nI1(15,"translate"),e.k0s()()()()()),2&o){const i=e.XpG(2);e.R7$(2),e.Y8G("src",i.firstBanners[0].photo,e.B4B),e.R7$(4),e.JRh(i.firstBanners[0].text1),e.R7$(2),e.JRh(i.firstBanners[0].text2),e.R7$(2),e.JRh(i.firstBanners[0].text3),e.R7$(2),e.Y8G("routerLink","/shop"),e.R7$(2),e.JRh(e.bMT(15,6,"buy_now"))}}function Xt(o,h){if(1&o&&(e.j41(0,"div",41)(1,"div",42)(2,"a",43),e.nrm(3,"img",44),e.k0s(),e.j41(4,"div",45)(5,"div")(6,"h4",38),e.EFF(7),e.k0s(),e.j41(8,"h5",38),e.EFF(9),e.k0s()()()()()),2&o){const i=e.XpG(2);e.R7$(3),e.Y8G("src",i.secondBanners[0].photo,e.B4B),e.R7$(4),e.JRh(i.secondBanners[0].text1),e.R7$(2),e.JRh(i.secondBanners[0].text2)}}function Vt(o,h){if(1&o&&(e.j41(0,"div",41)(1,"div",42)(2,"a",43),e.nrm(3,"img",46),e.k0s(),e.j41(4,"div",47)(5,"div")(6,"h4",37),e.EFF(7),e.k0s(),e.j41(8,"h5"),e.EFF(9),e.k0s()()()()()),2&o){const i=e.XpG(2);e.R7$(3),e.Y8G("src",i.secondBanners[1].photo,e.B4B),e.R7$(4),e.JRh(i.secondBanners[1].text1),e.R7$(2),e.JRh(i.secondBanners[1].text2)}}function Jt(o,h){if(1&o&&(e.j41(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12),e.DNE(4,Yt,2,1,"ng-container",13),e.k0s(),e.DNE(5,Ri,2,1,"div",14),e.k0s()(),e.j41(6,"div",15),e.DNE(7,zt,16,8,"div",16),e.k0s(),e.j41(8,"div",17)(9,"div",18),e.DNE(10,Xt,10,3,"div",19)(11,Vt,10,3,"div",19),e.k0s()()()),2&o){const i=e.XpG();e.R7$(4),e.Y8G("ngIf",i.slidersBanners&&i.slidersBanners.length>0),e.R7$(),e.Y8G("ngIf",i.slidersBanners&&i.slidersBanners.length>1),e.R7$(2),e.Y8G("ngIf",i.firstBanners&&i.firstBanners.length>0),e.R7$(3),e.Y8G("ngIf",i.secondBanners&&i.secondBanners.length>0),e.R7$(),e.Y8G("ngIf",i.secondBanners&&i.secondBanners.length>1)}}let Ht=(()=>{class o{bannersService;cdr;slidersBanners=[];mainBanner=[];firstBanners=[];secondBanners=[];imageUrl;isLoading=!0;errorMessage;constructor(i,a){this.bannersService=i,this.cdr=a}ngOnInit(){this.fetchSlidersBanners(),this.fetchMainBanner(),this.fetchFirstBanners(),this.fetchSecondBanners()}ngAfterViewInit(){}initSlider(i,a={}){R()(i).hasClass("slick-initialized")&&R()(i).slick("unslick");const m={arrows:!0,infinite:!0,slidesToShow:1,slidesToScroll:1,autoplay:!0,autoplaySpeed:3e3,...a};R()(i).slick(m)}initSlidersCarousel(){this.initSlider(".sliders-banner-carousel",{dots:!0,fade:!0,cssEase:"linear"})}initMainBannerSlider(){this.initSlider(".main-banner-slider",{dots:!1,fade:!0})}initFirstBannerSlider(){this.initSlider(".first-banner-slider",{dots:!1,fade:!0,autoplaySpeed:4e3})}initSecondBannerSlider(){this.initSlider(".second-banner-slider",{dots:!1,fade:!0,autoplaySpeed:4e3})}fetchSlidersBanners(){this.isLoading=!0,this.bannersService.getSlidersBanner().subscribe({next:i=>{this.slidersBanners=i.map(a=>{const d={photo:a.photo||"",text1:a.text1||"",text2:a.text2||"",text3:a.text3||"",text4:a.text4||""};return console.log("Mapped banner:",d),d}),this.isLoading=!1,this.cdr.detectChanges(),setTimeout(()=>{this.initSlidersCarousel()},0)},error:i=>{console.error("Error al cargar sliders banners:",i),this.errorMessage="No se pudieron cargar los banners principales",this.slidersBanners=[],this.isLoading=!1}})}fetchMainBanner(){this.isLoading=!0,this.bannersService.getMainBanner().subscribe({next:i=>{this.mainBanner=i.data||[],this.isLoading=!1,this.cdr.detectChanges(),this.mainBanner.length>1&&setTimeout(()=>{this.initMainBannerSlider()},0)},error:i=>{console.error("Error al cargar main banner:",i),this.errorMessage="No se pudo cargar el banner principal",this.mainBanner=[],this.isLoading=!1}})}fetchFirstBanners(){this.isLoading=!0,this.bannersService.getFirstBanner().subscribe({next:i=>{this.firstBanners=i.map(a=>({photo:a.photo||"",text1:a.text1||"",text2:a.text2||"",text3:a.text3||"",text4:a.text4||""})),this.isLoading=!1,this.cdr.detectChanges(),this.firstBanners.length>2&&setTimeout(()=>{this.initFirstBannerSlider()},0)},error:i=>{console.error("Error al cargar first banners:",i),this.errorMessage="No se pudieron cargar los banners secundarios",this.firstBanners=[],this.isLoading=!1}})}fetchSecondBanners(){this.isLoading=!0,this.bannersService.getSecondBanner().subscribe({next:i=>{this.secondBanners=i.map(a=>({photo:a.photo||"",text1:a.text1||"",text2:a.text2||"",text3:a.text3||"",text4:a.text4||""})),this.isLoading=!1,this.cdr.detectChanges(),this.secondBanners.length>2&&setTimeout(()=>{this.initSecondBannerSlider()},0)},error:i=>{console.error("Error al cargar second banners:",i),this.errorMessage="No se pudieron cargar los banners secundarios",this.secondBanners=[],this.isLoading=!1}})}static \u0275fac=function(a){return new(a||o)(e.rXU(Ae),e.rXU(e.gRc))};static \u0275cmp=e.VBU({type:o,selectors:[["app-banners-front"]],inputs:{imageUrl:"imageUrl"},decls:5,vars:3,consts:[[1,"home-section-2","home-section-small","section-b-space"],[1,"container-fluid-lg"],["class","text-center py-5",4,"ngIf"],["class","alert alert-danger",4,"ngIf"],["class","row g-4",4,"ngIf"],[1,"text-center","py-5"],["role","status",1,"spinner-border","text-primary"],[1,"visually-hidden"],[1,"alert","alert-danger"],[1,"row","g-4"],[1,"col-xxl-6","col-md-8"],["id","productCarousel","data-bs-ride","carousel","data-bs-interval","2000",1,"carousel","slide"],[1,"carousel-inner"],[4,"ngIf"],["class","carousel-indicators",4,"ngIf"],[1,"col-xxl-3","col-md-4","ratio_medium","d-md-block","d-none"],["class","home-contain home-small h-100",4,"ngIf"],[1,"col-xxl-3","ratio_65","d-xxl-block","d-none"],[1,"row","g-3"],["class","col-xxl-12 col-sm-6",4,"ngIf"],["class","carousel-item",3,"ngClass",4,"ngFor","ngForOf"],[1,"carousel-item",3,"ngClass"],[1,"home-contain","h-100"],["alt","Banner",1,"img-fluid","bg-img","blur-up","lazyload",3,"src"],[1,"home-detail","home-width","p-center-left","position-absolute"],[1,"ls-expanded","theme-color"],[1,"fw-bold","w-100"],[1,"text-content","fw-light"],[1,"d-sm-block","d-none"],["routerLink","/shop",1,"btn","mt-sm-4","btn-2","theme-bg-color","text-white","mend-auto","btn-2-animation"],[1,"carousel-indicators"],["type","button",3,"ngClass",4,"ngFor","ngForOf"],["type","button",3,"ngClass"],[1,"home-contain","home-small","h-100"],[1,"h-100"],["alt","Main Banner",1,"img-fluid","bg-img","blur-up","lazyload",2,"border-radius","10px !important",3,"src"],[1,"home-detail","text-center","p-top-center","w-100","text-white"],[1,"fw-bold"],[1,"text-center"],[1,"d-sm-block","d-none","text-white"],[1,"btn","btn-2","theme-bg-color","text-white","mx-auto","btn-2-animation",3,"routerLink"],[1,"col-xxl-12","col-sm-6"],[1,"home-contain"],["routerLink","/shop"],["alt","Second Banner Top",1,"img-fluid","bg-img","blur-up","lazyload",3,"src"],[1,"home-detail","text-white","p-bottom-bottom-center","text-center"],["alt","Second Banner Bottom",1,"img-fluid","bg-img","blur-up","lazyload",3,"src"],[1,"home-detail","text-white","w-50","p-center-left","home-p-sm"]],template:function(a,d){1&a&&(e.j41(0,"section",0)(1,"div",1),e.DNE(2,Ti,4,0,"div",2)(3,xi,2,1,"div",3)(4,Jt,12,5,"div",4),e.k0s()()),2&a&&(e.R7$(2),e.Y8G("ngIf",d.isLoading),e.R7$(),e.Y8G("ngIf",d.errorMessage),e.R7$(),e.Y8G("ngIf",!d.isLoading&&!d.errorMessage))},dependencies:[D.h,D.D9,F.D,F.E,F.G,F.I,U.R,U.m],encapsulation:2})}return o})();function Et(o,h){1&o&&(e.j41(0,"div",5)(1,"div",6)(2,"span",7),e.EFF(3,"Cargando..."),e.k0s()()())}function Pi(o,h){if(1&o&&(e.j41(0,"div",8),e.EFF(1),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.SpI(" ",i.errorMessage," ")}}function Wt(o,h){if(1&o&&(e.qex(0),e.j41(1,"div")(2,"div",14),e.nrm(3,"img",15),e.j41(4,"div",16)(5,"button",17),e.EFF(6),e.nI1(7,"translate"),e.k0s()()()(),e.bVm()),2&o){const i=h.$implicit;e.R7$(3),e.Y8G("src",i.photo,e.B4B),e.R7$(3),e.SpI(" ",e.bMT(7,2,"view_offers_button")," ")}}function g(o,h){if(1&o&&(e.j41(0,"div",9)(1,"div",10)(2,"div",11)(3,"h2"),e.EFF(4),e.nI1(5,"translate"),e.k0s()(),e.j41(6,"div",12),e.DNE(7,Wt,8,4,"ng-container",13),e.k0s()()()),2&o){const i=e.XpG();e.R7$(4),e.JRh(e.bMT(5,2,"best_rated_title")),e.R7$(3),e.Y8G("ngForOf",i.thirdBanners)}}let Ft=(()=>{class o{bannersService;cdr;thirdBanners=[];imageUrl;isLoading=!0;errorMessage;constructor(i,a){this.bannersService=i,this.cdr=a}ngAfterViewInit(){this.fetchThirdBanners()}ngOnInit(){}initThreeSlider(){R()(".three-slider-1").slick({arrows:!0,infinite:!0,slidesToShow:3,slidesToScroll:1,autoplay:!0,autoplaySpeed:3e3,responsive:[{breakpoint:1300,settings:{slidesToShow:2}},{breakpoint:757,settings:{slidesToShow:1,fade:!0}}]})}fetchThirdBanners(){this.isLoading=!0,this.bannersService.getThirdBanner().subscribe({next:i=>{this.thirdBanners=i||[],this.isLoading=!1,this.cdr.detectChanges(),this.initThreeSlider()},error:i=>{console.error("Error al cargar third banners:",i),this.errorMessage="No se pudieron cargar los banners de ofertas",this.thirdBanners=[],this.isLoading=!1}})}static \u0275fac=function(a){return new(a||o)(e.rXU(Ae),e.rXU(e.gRc))};static \u0275cmp=e.VBU({type:o,selectors:[["app-best-value"]],inputs:{imageUrl:"imageUrl"},decls:5,vars:3,consts:[[1,"best-value-section","section-b-space"],[1,"container-fluid-lg"],["class","text-center py-5",4,"ngIf"],["class","alert alert-danger",4,"ngIf"],["class","row",4,"ngIf"],[1,"text-center","py-5"],["role","status",1,"spinner-border","text-primary"],[1,"visually-hidden"],[1,"alert","alert-danger"],[1,"row"],[1,"col-12"],[1,"title"],[1,"three-slider-1","arrow-slider"],[4,"ngFor","ngForOf"],[1,"offer-banner","hover-effect"],["alt","Offer Banner",1,"img-fluid","bg-img","blur-up","lazyload",3,"src"],[1,"offer-box"],["routerLink","/shop",1,"btn-category","btn","theme-bg-color","text-white"]],template:function(a,d){1&a&&(e.j41(0,"section",0)(1,"div",1),e.DNE(2,Et,4,0,"div",2)(3,Pi,2,1,"div",3)(4,g,8,4,"div",4),e.k0s()()),2&a&&(e.R7$(2),e.Y8G("ngIf",d.isLoading),e.R7$(),e.Y8G("ngIf",d.errorMessage),e.R7$(),e.Y8G("ngIf",!d.isLoading&&!d.errorMessage))},dependencies:[D.h,D.D9,F.D,F.G,F.I,U.R,U.m],encapsulation:2})}return o})();var ct=P(9121),$e=P(7506);const fe=()=>[1,2,3,4,5];function We(o,h){if(1&o&&(e.j41(0,"li"),e.nrm(1,"i",28),e.k0s()),2&o){const i=h.$implicit,a=e.XpG().$implicit;e.R7$(),e.Y8G("ngClass",i<=a.rating?"feather-star fill":"feather-star")}}function ae(o,h){if(1&o&&(e.j41(0,"div",29)(1,"ul")(2,"li")(3,"div",30)(4,"div",31)(5,"h6"),e.EFF(6),e.k0s(),e.j41(7,"span"),e.EFF(8),e.nI1(9,"translate"),e.k0s()()()(),e.j41(10,"li")(11,"div",30)(12,"div",32)(13,"h6"),e.EFF(14),e.k0s(),e.j41(15,"span"),e.EFF(16),e.nI1(17,"translate"),e.k0s()()()(),e.j41(18,"li")(19,"div",30)(20,"div",33)(21,"h6"),e.EFF(22),e.k0s(),e.j41(23,"span"),e.EFF(24),e.nI1(25,"translate"),e.k0s()()()(),e.j41(26,"li")(27,"div",30)(28,"div",34)(29,"h6"),e.EFF(30),e.k0s(),e.j41(31,"span"),e.EFF(32),e.nI1(33,"translate"),e.k0s()()()()()()),2&o){const i=e.XpG().$implicit,a=e.XpG(2);e.R7$(6),e.JRh((null==a.timers[1e3*i.dealId]?null:a.timers[1e3*i.dealId].days)||"0"),e.R7$(2),e.JRh(e.bMT(9,8,"days_text")),e.R7$(6),e.JRh((null==a.timers[1e3*i.dealId]?null:a.timers[1e3*i.dealId].hours)||"00"),e.R7$(2),e.JRh(e.bMT(17,10,"hours_text")),e.R7$(6),e.JRh((null==a.timers[1e3*i.dealId]?null:a.timers[1e3*i.dealId].minutes)||"00"),e.R7$(2),e.JRh(e.bMT(25,12,"minutes_text")),e.R7$(6),e.JRh((null==a.timers[1e3*i.dealId]?null:a.timers[1e3*i.dealId].seconds)||"00"),e.R7$(2),e.JRh(e.bMT(33,14,"seconds_text"))}}function St(o,h){if(1&o&&(e.j41(0,"div",10)(1,"div",11)(2,"a",12),e.nrm(3,"img",13),e.k0s(),e.j41(4,"div",14)(5,"div",15)(6,"span"),e.EFF(7),e.nI1(8,"translate"),e.k0s()(),e.nrm(9,"app-cart-button-icon",16),e.j41(10,"ul",17),e.DNE(11,We,2,1,"li",18),e.k0s(),e.j41(12,"a",19)(13,"h5",20),e.EFF(14),e.k0s()(),e.j41(15,"h5",21),e.EFF(16),e.j41(17,"span"),e.EFF(18),e.k0s()(),e.j41(19,"div",22),e.nrm(20,"div",23),e.k0s(),e.j41(21,"h4",24),e.EFF(22),e.nI1(23,"translate"),e.j41(24,"a",25),e.EFF(25),e.k0s()(),e.j41(26,"h4",26),e.EFF(27),e.nI1(28,"translate"),e.k0s(),e.DNE(29,ae,34,16,"div",27),e.k0s()()()),2&o){const i=h.$implicit,a=e.XpG(2);e.R7$(2),e.Y8G("routerLink","product/"+i.slug),e.R7$(),e.Y8G("src",i.image,e.B4B)("alt",i.name),e.R7$(4),e.JRh(e.bMT(8,19,"hot_deals_text")),e.R7$(2),e.Y8G("productId",i.id)("variant",i.variant||"5x5x5")("weight",i.weight||0)("initialQuantity",1),e.R7$(2),e.Y8G("ngForOf",e.lJ4(25,fe)),e.R7$(),e.Y8G("routerLink","product/"+i.slug),e.R7$(2),e.JRh(i.name),e.R7$(2),e.SpI(" ",i.price," "),e.R7$(2),e.JRh(i.original_price),e.R7$(2),e.xc7("width",i.soldPercentage||50,"%"),e.R7$(2),e.SpI("",e.bMT(23,21,"sold_text")," "),e.R7$(3),e.SpI("",i.soldItems||30," Items"),e.R7$(2),e.JRh(e.bMT(28,23,"hurry_up_text")),e.R7$(2),e.Y8G("ngIf",a.isDealActive(i.dealDate))}}function y(o,h){if(1&o&&(e.j41(0,"div",8),e.DNE(1,St,30,26,"div",9),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.Y8G("ngForOf",i.allProducts)}}function dt(o,h){1&o&&(e.j41(0,"div",35)(1,"div",36)(2,"span",37),e.EFF(3,"Cargando..."),e.k0s()()())}function qt(o,h){if(1&o&&(e.j41(0,"div",38),e.EFF(1),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.SpI(" ",i.flashErrorMessage," ")}}let Ii=(()=>{class o{productsService;timers={};flashDeals=[];allProducts=[];isFlashLoading=!0;flashErrorMessage="";constructor(i){this.productsService=i}ngAfterViewInit(){this.initializeSlider()}ngOnInit(){this.loadFlashDeals()}loadFlashDeals(){this.productsService.getProductsFlash().subscribe({next:i=>{this.flashDeals=i,this.processFlashDeals(),this.isFlashLoading=!1,setTimeout(()=>this.initializeSlider(),100)},error:i=>{console.error("Error fetching flash deals:",i),this.flashErrorMessage="Failed to load flash deals.",this.isFlashLoading=!1}})}processFlashDeals(){this.allProducts=[],this.flashDeals.forEach(i=>{if(i.products&&i.products.data){const a=i.products.data.map(m=>{const Y=m.price.replace("RD$","").replace(",","");return{...m,numericPrice:parseFloat(Y),rating:m.rating||3,soldPercentage:m.soldPercentage||50,soldItems:m.soldItems||30,dealId:i.id,dealDate:i.date,slug:m.slug}}),d=new Date(1e3*i.date);this.initializeTimer(1e3*i.id,d),this.allProducts.push(...a)}})}initializeSlider(){R()(".three-slider-1").hasClass("slick-initialized")&&R()(".three-slider-1").slick("unslick"),R()(".three-slider-1").slick({dots:!1,infinite:!0,speed:500,slidesToShow:3,slidesToScroll:3,arrows:!0,responsive:[{breakpoint:1024,settings:{slidesToShow:3,slidesToScroll:3}},{breakpoint:600,settings:{slidesToShow:1,slidesToScroll:1}}]})}ngOnDestroy(){R()(".three-slider-1").hasClass("slick-initialized")&&R()(".three-slider-1").slick("unslick")}initializeTimer(i,a){const d=()=>{const m=this.getTimeRemaining(a);if(m.total<=0)return clearInterval(this.timers[i]?.intervalId),void(this.timers[i]={days:0,hours:"00",minutes:"00",seconds:"00",intervalId:null,expired:!0});this.timers[i]={days:m.days,hours:("0"+m.hours).slice(-2),minutes:("0"+m.minutes).slice(-2),seconds:("0"+m.seconds).slice(-2),intervalId:this.timers[i]?.intervalId,expired:!1}};this.timers[i]={},d(),this.timers[i].intervalId=setInterval(d,1e3)}getTimeRemaining(i){const a=Date.parse(i.toString())-Date.parse((new Date).toString()),d=Math.floor(a/1e3%60),m=Math.floor(a/1e3/60%60),Y=Math.floor(a/36e5%24);return{total:a,days:Math.floor(a/864e5),hours:Y,minutes:m,seconds:d}}isDealActive(i){return 1e3*i>(new Date).getTime()}static \u0275fac=function(a){return new(a||o)(e.rXU($e.g))};static \u0275cmp=e.VBU({type:o,selectors:[["app-deals-day"]],decls:11,vars:6,consts:[[1,"deal-section"],[1,"container-fluid-lg"],[1,"title"],[1,"row"],[1,"col-12"],["class","three-slider-1 arrow-slider mb-4",4,"ngIf"],["class","text-center",4,"ngIf"],["class","alert alert-danger",4,"ngIf"],[1,"three-slider-1","arrow-slider","mb-4"],["class","slick-slide product-slide",4,"ngFor","ngForOf"],[1,"slick-slide","product-slide"],[1,"deal-box","wow","fadeInUp"],[1,"category-image","order-sm-2",3,"routerLink"],[1,"img-fluid","blur-up","lazyload",3,"src","alt"],[1,"deal-detail","order-sm-1"],[1,"hot-deal"],[3,"productId","variant","weight","initialQuantity"],[1,"rating"],[4,"ngFor","ngForOf"],[1,"text-title",3,"routerLink"],[1,"product-name"],[1,"price"],[1,"progress","custom-progressbar"],["role","progressbar",1,"progress-bar"],[1,"item"],[1,"text-16"],[1,"offer"],["class","timer",4,"ngIf"],[3,"ngClass"],[1,"timer"],[1,"counter"],[1,"days"],[1,"hours"],[1,"minutes"],[1,"seconds"],[1,"text-center"],["role","status",1,"spinner-border","text-primary"],[1,"visually-hidden"],[1,"alert","alert-danger"]],template:function(a,d){1&a&&(e.j41(0,"section",0)(1,"div",1)(2,"div",2)(3,"h2"),e.EFF(4),e.nI1(5,"translate"),e.k0s()(),e.j41(6,"div",3)(7,"div",4),e.DNE(8,y,2,1,"div",5)(9,dt,4,0,"div",6)(10,qt,2,1,"div",7),e.k0s()()()()),2&a&&(e.R7$(4),e.JRh(e.bMT(5,4,"offer_flash_text_menu")),e.R7$(4),e.Y8G("ngIf",d.flashDeals&&d.flashDeals.length>0),e.R7$(),e.Y8G("ngIf",d.isFlashLoading),e.R7$(),e.Y8G("ngIf",d.flashErrorMessage))},dependencies:[D.h,D.D9,F.D,F.E,F.G,F.I,ct.X,U.R],styles:["span[_ngcontent-%COMP%]{font-size:8px!important}.days[_ngcontent-%COMP%], .hours[_ngcontent-%COMP%], .minutes[_ngcontent-%COMP%], .seconds[_ngcontent-%COMP%]{text-align:center}.dealsClass[_ngcontent-%COMP%]{background-color:#e63118!important;font-size:20px!important;width:100%!important;max-width:60px!important;position:absolute!important;margin-top:-33px!important;float:right!important;right:18px!important}#cart-counter[_ngcontent-%COMP%]{visibility:hidden!important}"]})}return o})();var Kt=P(2599),Ee=P(9211);const qe=o=>["product/",o],je=()=>["/compare"],Fe=()=>[1,2,3,4,5];function Ai(o,h){1&o&&(e.j41(0,"div",8),e.nrm(1,"span",9),e.EFF(2),e.nI1(3,"translate"),e.k0s()),2&o&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"loading")," "))}function ji(o,h){if(1&o&&(e.j41(0,"div",10),e.EFF(1),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.SpI(" ",i.error," ")}}function Di(o,h){if(1&o){const i=e.RV6();e.qex(0),e.j41(1,"li",12)(2,"button",15),e.bIt("click",function(){const d=e.eBV(i).$implicit,m=e.XpG(2);return e.Njj(m.setActiveTab(d))}),e.EFF(3),e.k0s()(),e.bVm()}if(2&o){const i=h.$implicit,a=e.XpG(2);e.R7$(2),e.AVh("active",a.isTabActive(i)),e.Mz_("id","",i,"-tab"),e.Mz_("bs-target","#",i,""),e.R7$(),e.SpI(" ",a.getCategoryName(i)," ")}}function Li(o,h){if(1&o){const i=e.RV6();e.j41(0,"ul",11)(1,"li",12)(2,"button",13),e.bIt("click",function(){e.eBV(i);const d=e.XpG();return e.Njj(d.setActiveTab("all"))}),e.EFF(3),e.nI1(4,"translate"),e.k0s()(),e.DNE(5,Di,4,7,"ng-container",14),e.k0s()}if(2&o){const i=e.XpG();e.R7$(2),e.AVh("active",i.isTabActive("all")),e.R7$(),e.SpI(" ",e.bMT(4,4,"all_tab")," "),e.R7$(2),e.Y8G("ngForOf",i.activeCategories)}}function Oi(o,h){1&o&&(e.j41(0,"div",16)(1,"h3"),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&o&&(e.R7$(2),e.JRh(e.bMT(3,1,"no_products_found")))}function Ni(o,h){if(1&o&&(e.j41(0,"div",40)(1,"label"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG().$implicit;e.R7$(2),e.JRh(i.discount)}}function Bi(o,h){if(1&o&&(e.qex(0),e.j41(1,"li"),e.nrm(2,"i",41),e.k0s(),e.bVm()),2&o){const i=h.$implicit,a=e.XpG().$implicit;e.R7$(2),e.AVh("fill",i<=a.rating)}}function ut(o,h){if(1&o&&(e.j41(0,"del"),e.EFF(1),e.nI1(2,"number"),e.k0s()),2&o){const i=e.XpG().$implicit,a=e.XpG(2);e.R7$(),e.Lme("",a.getCurrencySymbol(),"",e.i5U(2,2,i.discountedPrice,"1.2-2"),"")}}function ye(o,h){if(1&o&&(e.qex(0),e.j41(1,"div",20)(2,"div",21)(3,"div",22)(4,"div",23),e.DNE(5,Ni,3,1,"div",24),e.j41(6,"div"),e.nrm(7,"app-wishlist-button-icon",25),e.k0s()(),e.j41(8,"a",26),e.nrm(9,"img",27),e.k0s(),e.j41(10,"ul",28)(11,"li",29)(12,"a",30),e.nrm(13,"i",31),e.k0s()(),e.j41(14,"li",32)(15,"a",26),e.nrm(16,"i",33),e.k0s()()()(),e.j41(17,"div",34)(18,"ul",35),e.DNE(19,Bi,3,2,"ng-container",14),e.k0s(),e.j41(20,"a",26)(21,"h5",36),e.EFF(22),e.k0s()(),e.j41(23,"h5",37),e.EFF(24),e.nI1(25,"number"),e.DNE(26,ut,3,5,"del",38),e.k0s(),e.nrm(27,"app-cart-button-icon",39),e.k0s()()(),e.bVm()),2&o){const i=h.$implicit,a=e.XpG(2);e.R7$(5),e.Y8G("ngIf",i.has_discount),e.R7$(2),e.Y8G("product",i)("productId",i.id),e.R7$(),e.Y8G("routerLink",e.eq3(20,qe,i.slug)),e.R7$(),e.FS9("alt",i.name),e.Y8G("src",i.thumbnail_image,e.B4B),e.R7$(6),e.Y8G("routerLink",e.lJ4(22,je)),e.R7$(4),e.Y8G("ngForOf",e.lJ4(23,Fe)),e.R7$(),e.Y8G("routerLink",e.eq3(24,qe,i.slug)),e.R7$(2),e.JRh(i.name),e.R7$(2),e.Lme(" ",a.getCurrencySymbol(),"",e.i5U(25,17,i.price,"1.2-2")," "),e.R7$(2),e.Y8G("ngIf",i.has_discount),e.R7$(),e.Y8G("productId",i.id)("variant",i.variant||"5x5x5")("weight",i.weight)("initialQuantity",1)}}function Qt(o,h){if(1&o&&(e.j41(0,"div",40)(1,"label"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG().$implicit;e.R7$(2),e.JRh(i.discount)}}function Mi(o,h){if(1&o&&(e.qex(0),e.j41(1,"li"),e.nrm(2,"i",41),e.k0s(),e.bVm()),2&o){const i=h.$implicit,a=e.XpG().$implicit;e.R7$(2),e.AVh("fill",i<=a.rating)}}function Gi(o,h){if(1&o&&(e.j41(0,"del"),e.EFF(1),e.nI1(2,"number"),e.k0s()),2&o){const i=e.XpG().$implicit,a=e.XpG(3);e.R7$(),e.Lme("",a.getCurrencySymbol(),"",e.i5U(2,2,i.discountedPrice,"1.2-2"),"")}}function Ke(o,h){if(1&o&&(e.qex(0),e.j41(1,"div",20)(2,"div",21)(3,"div",22)(4,"div",23),e.DNE(5,Qt,3,1,"div",24),e.j41(6,"div")(7,"button",43),e.nrm(8,"i",44),e.k0s()()(),e.j41(9,"a",26),e.nrm(10,"img",27),e.k0s(),e.j41(11,"ul",28)(12,"li",29)(13,"a",30),e.nrm(14,"i",31),e.k0s()(),e.j41(15,"li",32)(16,"a",26),e.nrm(17,"i",33),e.k0s()()()(),e.j41(18,"div",34)(19,"ul",35),e.DNE(20,Mi,3,2,"ng-container",14),e.k0s(),e.j41(21,"a",26)(22,"h5",36),e.EFF(23),e.k0s()(),e.j41(24,"h5",37),e.EFF(25),e.nI1(26,"number"),e.DNE(27,Gi,3,5,"del",38),e.k0s(),e.nrm(28,"app-cart-button-icon",39),e.k0s()()(),e.bVm()),2&o){const i=h.$implicit,a=e.XpG(3);e.R7$(5),e.Y8G("ngIf",i.has_discount),e.R7$(4),e.Y8G("routerLink",e.eq3(18,qe,i.slug)),e.R7$(),e.FS9("alt",i.name),e.Y8G("src",i.thumbnail_image,e.B4B),e.R7$(6),e.Y8G("routerLink",e.lJ4(20,je)),e.R7$(4),e.Y8G("ngForOf",e.lJ4(21,Fe)),e.R7$(),e.Y8G("routerLink",e.eq3(22,qe,i.slug)),e.R7$(2),e.JRh(i.name),e.R7$(2),e.Lme(" ",a.getCurrencySymbol(),"",e.i5U(26,15,i.price,"1.2-2")," "),e.R7$(2),e.Y8G("ngIf",i.has_discount),e.R7$(),e.Y8G("productId",i.id)("variant",i.variant||"5x5x5")("weight",i.weight||0)("initialQuantity",1)}}function De(o,h){if(1&o&&(e.qex(0),e.j41(1,"div",42)(2,"div",19),e.DNE(3,Ke,29,24,"ng-container",14),e.k0s()(),e.bVm()),2&o){const i=h.$implicit,a=e.XpG(2);e.R7$(),e.AVh("show",a.isTabActive(i))("active",a.isTabActive(i)),e.FS9("id",i),e.R7$(2),e.Y8G("ngForOf",a.categorizedProducts[i])}}function Le(o,h){if(1&o&&(e.j41(0,"div",17)(1,"div",18)(2,"div",19),e.DNE(3,ye,28,26,"ng-container",14),e.k0s()(),e.DNE(4,De,4,6,"ng-container",14),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.AVh("show",i.isTabActive("all"))("active",i.isTabActive("all")),e.R7$(2),e.Y8G("ngForOf",i.categorizedProducts.all),e.R7$(),e.Y8G("ngForOf",i.activeCategories)}}let ht=(()=>{class o{http;currencyService;categoryService;imageUrl;apiUrl=H.c.apiUrl;productList=[];categorizedProducts={};activeCategories=[];currentCurrency="DOP";exchangeRates={USD:62.58,DOP:1,AUD:39.33,EUR:67.93,CNY:8.63};loading=!0;error=null;activeTab="all";constructor(i,a,d){this.http=i,this.currencyService=a,this.categoryService=d}ngOnInit(){this.currencyService.currency$.subscribe(i=>{this.currentCurrency=i,this.productList.length>0&&this.updateProductPrices()}),this.getProductsNews().subscribe(i=>{this.productList=i,this.updateProductPrices(),this.organizeProductsByCategory(),this.loading=!1},i=>{this.error="Error loading products",this.loading=!1,console.error("Error loading products:",i)})}getProductsNews(){return this.http.get(`${this.apiUrl}products/search?sort_key=newest`).pipe((0,X.T)(i=>i&&i.success&&Array.isArray(i.data)?i.data:(console.warn("Invalid API response format:",i),[])),(0,V.W)(i=>(console.error("Error fetching News Products:",i),(0,Ie.of)([]))))}updateProductPrices(){const i=this.exchangeRates[this.currentCurrency]||1;this.productList=this.productList.map(a=>{const d=ze=>parseFloat(ze.replace("RD$","").replace(/,/g,"").trim()),m=a.originalPrice||d(a.stroked_price),Y=a.originalDiscountedPrice||(a.has_discount?d(a.main_price):null),W=+(m/i).toFixed(2),me=Y?+(Y/i).toFixed(2):null;return{...a,originalPrice:m,originalDiscountedPrice:Y,price:W,discountedPrice:me}})}organizeProductsByCategory(){this.categorizedProducts={all:[]},this.activeCategories=[],this.categorizedProducts.all=this.productList.slice(0,12),this.productList.forEach(i=>{if(i.category){const a=`category_${i.category.id}`;this.categorizedProducts[a]||(this.categorizedProducts[a]=[]),this.categorizedProducts[a].length<12&&this.categorizedProducts[a].push(i)}});for(const i in this.categorizedProducts)"all"!==i&&this.categorizedProducts[i].length>0&&this.activeCategories.push(i);this.activeCategories=this.activeCategories.slice(0,4)}getCategoryName(i){if("all"===i)return"All";if(i.startsWith("category_")){const a=parseInt(i.replace("category_",""));return this.productList.find(m=>m.category&&m.category.id===a)?.category?.name||i}return i}setActiveTab(i){this.activeTab=i}isTabActive(i){return this.activeTab===i}getCurrencySymbol(){switch(this.currentCurrency){case"USD":return"USD$";case"DOP":return"RD$";case"EUR":return"EUR\u20ac";case"AUD":return"AUD$";case"CNY":return"CNY\xa5";default:return""}}static \u0275fac=function(a){return new(a||o)(e.rXU(lt.a),e.rXU(Ee.P),e.rXU(j.M))};static \u0275cmp=e.VBU({type:o,selectors:[["app-product-section"]],inputs:{imageUrl:"imageUrl"},decls:11,vars:8,consts:[[1,"product-section"],[1,"container-fluid-lg"],[1,"title","title-flex-2"],["class","text-center",4,"ngIf"],["class","alert alert-danger",4,"ngIf"],["class","nav nav-tabs tab-style-color-2 tab-style-color","id","myTab",4,"ngIf"],["class","text-center py-5",4,"ngIf"],["class","tab-content","id","myTabContent",4,"ngIf"],[1,"text-center"],[1,"spinner-border","text-primary"],[1,"alert","alert-danger"],["id","myTab",1,"nav","nav-tabs","tab-style-color-2","tab-style-color"],[1,"nav-item"],["id","all-tab","data-bs-toggle","tab","data-bs-target","#all","type","button",1,"nav-link","btn",3,"click"],[4,"ngFor","ngForOf"],["data-bs-toggle","tab","type","button",1,"nav-link","btn",3,"click","id","bs-target"],[1,"text-center","py-5"],["id","myTabContent",1,"tab-content"],["id","all","role","tabpanel",1,"tab-pane","fade"],[1,"row","g-8"],[1,"col-xxl-2","col-lg-3","col-md-4","col-6","wow","fadeInUp"],[1,"product-box-4"],[1,"product-image"],[1,"label-flex"],["class","discount",4,"ngIf"],[3,"product","productId"],[3,"routerLink"],[1,"img-fluid",3,"src","alt"],[1,"option"],["data-bs-toggle","tooltip","data-bs-placement","top","title","Vista R\xe1pida"],["href","javascript:void(0)","data-bs-toggle","modal","data-bs-target","#view"],[1,"iconly-Show","icli"],["data-bs-toggle","tooltip","data-bs-placement","top","title","Comparar"],[1,"iconly-Swap","icli"],[1,"product-detail"],[1,"rating"],[1,"name"],[1,"price","theme-color"],[4,"ngIf"],[3,"productId","variant","weight","initialQuantity"],[1,"discount"],["data-feather","star"],["role","tabpanel",1,"tab-pane","fade",3,"id"],[1,"btn","p-0","wishlist","btn-wishlist","notifi-wishlist"],[1,"iconly-Heart","icli"]],template:function(a,d){1&a&&(e.j41(0,"section",0)(1,"div",1)(2,"div",2)(3,"h2"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.DNE(6,Ai,4,3,"div",3)(7,ji,2,1,"div",4)(8,Li,6,6,"ul",5),e.k0s(),e.DNE(9,Oi,4,3,"div",6)(10,Le,5,6,"div",7),e.k0s()()),2&a&&(e.R7$(4),e.JRh(e.bMT(5,6,"new_products_title")),e.R7$(2),e.Y8G("ngIf",d.loading),e.R7$(),e.Y8G("ngIf",d.error),e.R7$(),e.Y8G("ngIf",!d.loading&&!d.error&&d.productList.length>0),e.R7$(),e.Y8G("ngIf",!d.loading&&!d.error&&0===d.productList.length),e.R7$(),e.Y8G("ngIf",!d.loading&&!d.error&&d.productList.length>0))},dependencies:[F.D,F.G,F.I,F.a3,D.h,D.D9,Kt.K,ct.X,U.m,U.R],encapsulation:2})}return o})();const Yi=(o,h)=>({"banner-details-dark text-white":o,"text-dark":h}),Tt=o=>({"text-content":o}),Ui=(o,h)=>({"theme-color bg-white":o,"theme-bg-color text-white":h});function zi(o,h){if(1&o){const i=e.RV6();e.j41(0,"div",5)(1,"div",6),e.nrm(2,"img",7),e.j41(3,"div",8)(4,"div")(5,"h6",9),e.EFF(6),e.k0s(),e.j41(7,"h3",10),e.EFF(8),e.k0s(),e.j41(9,"h4",11),e.EFF(10),e.k0s(),e.j41(11,"button",12),e.bIt("click",function(){e.eBV(i);const d=e.XpG(2);return e.Njj(d.navigateToShop())}),e.EFF(12),e.nI1(13,"translate"),e.k0s()()()()()}if(2&o){const i=h.$implicit,a=h.index;e.R7$(2),e.Y8G("src",i.photo,e.B4B)("alt","Banner "+(a+1)),e.R7$(),e.Y8G("ngClass",e.l_i(11,Yi,0===a,1===a)),e.R7$(3),e.JRh(i.text1),e.R7$(2),e.JRh(i.text2),e.R7$(),e.Y8G("ngClass",e.eq3(14,Tt,1===a)),e.R7$(),e.JRh(i.text3),e.R7$(),e.Y8G("ngClass",e.l_i(16,Ui,0===a,1===a)),e.R7$(),e.SpI(" ",e.bMT(13,9,"buy_now")," ")}}function Xi(o,h){if(1&o&&(e.j41(0,"div",3),e.DNE(1,zi,14,19,"div",4),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.Y8G("ngForOf",i.banners)}}let Vi=(()=>{class o{bannersService;banners=[];imageUrl;constructor(i){this.bannersService=i}ngOnInit(){this.bannersService.getFourthBanner().subscribe({next:i=>{this.banners=i},error:i=>{console.error("Error loading banners:",i)}})}navigateToShop(){window.location.href="shop-left-sidebar.html"}static \u0275fac=function(a){return new(a||o)(e.rXU(Ae))};static \u0275cmp=e.VBU({type:o,selectors:[["app-banners-section-middle"]],inputs:{imageUrl:"imageUrl"},decls:3,vars:1,consts:[[1,"banner-section"],[1,"container-fluid-lg"],["class","row gy-xl-0 gy-3",4,"ngIf"],[1,"row","gy-xl-0","gy-3"],["class","col-xl-6",4,"ngFor","ngForOf"],[1,"col-xl-6"],[1,"banner-contain-3","hover-effect"],[1,"bg-img","img-fluid",3,"src","alt"],[1,"banner-detail",3,"ngClass"],[1,"ls-expanded","text-uppercase"],[1,"mb-sm-3","mb-1"],[3,"ngClass"],[1,"btn","btn-md","fw-bold","mt-sm-3","mt-1","mend-auto",3,"click","ngClass"]],template:function(a,d){1&a&&(e.j41(0,"section",0)(1,"div",1),e.DNE(2,Xi,2,1,"div",2),e.k0s()()),2&a&&(e.R7$(2),e.Y8G("ngIf",d.banners&&d.banners.length>0))},dependencies:[F.D,F.E,F.G,F.I,D.h,D.D9],encapsulation:2})}return o})();const we=()=>[];function Ji(o,h){1&o&&(e.j41(0,"div")(1,"p"),e.EFF(2,"Cargando Productos..."),e.k0s()())}function Zt(o,h){if(1&o&&(e.j41(0,"div",13),e.EFF(1),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.SpI(" ",i.errorMessage," ")}}function pt(o,h){1&o&&(e.j41(0,"li"),e.nrm(1,"i",37),e.k0s())}function ei(o,h){1&o&&(e.j41(0,"li"),e.nrm(1,"i",38),e.k0s())}function ti(o,h){if(1&o&&(e.j41(0,"div",18)(1,"div",19)(2,"a",20),e.nrm(3,"img",21),e.k0s(),e.j41(4,"div",22)(5,"ul",23),e.DNE(6,pt,2,0,"li",15)(7,ei,2,0,"li",15),e.k0s(),e.j41(8,"a",24)(9,"h4",25),e.EFF(10),e.k0s()(),e.j41(11,"h5",26),e.EFF(12),e.nI1(13,"currency"),e.k0s(),e.j41(14,"ul",27)(15,"li",28)(16,"a",24),e.nrm(17,"i",29),e.k0s()(),e.j41(18,"li",30)(19,"a",31),e.nrm(20,"i",32),e.k0s()(),e.j41(21,"li",33)(22,"a",24),e.nrm(23,"i",34),e.k0s()(),e.j41(24,"li",35)(25,"a",24),e.nrm(26,"i",36),e.k0s()()()()()()),2&o){const i=h.$implicit,a=h.index,d=e.XpG(3);e.R7$(),e.BMQ("data-wow-delay",.05*a+"s"),e.R7$(),e.Y8G("routerLink","product/"+i.slug),e.R7$(),e.Y8G("src",i.thumbnail_image,e.B4B)("alt",i.name),e.R7$(3),e.Y8G("ngForOf",e.lJ4(18,we).constructor(i.rating)),e.R7$(),e.Y8G("ngForOf",e.lJ4(19,we).constructor(5-i.rating)),e.R7$(),e.Y8G("routerLink","/product/"+i.slug),e.R7$(2),e.SpI(" ",i.name," "),e.R7$(2),e.SpI(" ",e.ii3(13,13,i.price,d.currentCurrency,"symbol","1.2-2"),"\n"),e.R7$(4),e.Y8G("routerLink","/cart"),e.R7$(3),e.Y8G("routerLink","/product/"+i.slug),e.R7$(3),e.Y8G("routerLink","/wishlist"),e.R7$(3),e.Y8G("routerLink","/compare")}}function Hi(o,h){if(1&o&&(e.j41(0,"div")(1,"div",16),e.DNE(2,ti,27,20,"div",17),e.k0s()()),2&o){const i=h.$implicit;e.R7$(2),e.Y8G("ngForOf",i)}}function Wi(o,h){if(1&o&&(e.j41(0,"div",14),e.DNE(1,Hi,3,1,"div",15),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.Y8G("ngForOf",i.groupedProducts)}}function qi(o,h){1&o&&(e.j41(0,"div")(1,"p"),e.EFF(2,"Cargando Productos..."),e.k0s()())}function Ki(o,h){if(1&o&&(e.j41(0,"div",13),e.EFF(1),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.SpI(" ",i.errorMessage," ")}}function Oe(o,h){1&o&&(e.j41(0,"li"),e.nrm(1,"i",37),e.k0s())}function Qe(o,h){1&o&&(e.j41(0,"li"),e.nrm(1,"i",38),e.k0s())}function Qi(o,h){if(1&o&&(e.j41(0,"div",18)(1,"div",19)(2,"a",20),e.nrm(3,"img",21),e.k0s(),e.j41(4,"div",22)(5,"ul",23),e.DNE(6,Oe,2,0,"li",15)(7,Qe,2,0,"li",15),e.k0s(),e.j41(8,"a",24)(9,"h4",25),e.EFF(10),e.k0s()(),e.j41(11,"h5",26),e.EFF(12),e.nI1(13,"currency"),e.k0s(),e.j41(14,"ul",27)(15,"li",28)(16,"a",24),e.nrm(17,"i",29),e.k0s()(),e.j41(18,"li",30)(19,"a",31),e.nrm(20,"i",32),e.k0s()(),e.j41(21,"li",33)(22,"a",24),e.nrm(23,"i",34),e.k0s()(),e.j41(24,"li",35)(25,"a",24),e.nrm(26,"i",36),e.k0s()()()()()()),2&o){const i=h.$implicit,a=e.XpG(3);e.R7$(2),e.Y8G("routerLink","/product/"+i.slug),e.R7$(),e.Y8G("src",i.thumbnail_image,e.B4B)("alt",i.name),e.R7$(3),e.Y8G("ngForOf",e.lJ4(17,we).constructor(i.rating)),e.R7$(),e.Y8G("ngForOf",e.lJ4(18,we).constructor(5-i.rating)),e.R7$(),e.Y8G("routerLink","/product/"+i.slug),e.R7$(2),e.JRh(i.name),e.R7$(2),e.SpI(" ",e.ii3(13,12,i.price,a.currentCurrency,"symbol","1.2-2"),"\n"),e.R7$(4),e.Y8G("routerLink","cart"),e.R7$(3),e.Y8G("routerLink","product/"+i.slug),e.R7$(3),e.Y8G("routerLink","wishlist"),e.R7$(3),e.Y8G("routerLink","compare")}}function Zi(o,h){if(1&o&&(e.j41(0,"div")(1,"div",16),e.DNE(2,Qi,27,19,"div",17),e.k0s()()),2&o){const i=h.$implicit;e.R7$(2),e.Y8G("ngForOf",i)}}function en(o,h){if(1&o&&(e.j41(0,"div",39),e.DNE(1,Zi,3,1,"div",15),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.Y8G("ngForOf",i.groupedFeaturedProducts)}}function tn(o,h){1&o&&(e.j41(0,"div")(1,"p"),e.EFF(2,"Cargando Productos..."),e.k0s()())}function nn(o,h){if(1&o&&(e.j41(0,"div",13),e.EFF(1),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.SpI(" ",i.errorMessage," ")}}function xt(o,h){1&o&&(e.j41(0,"li"),e.nrm(1,"i",37),e.k0s())}function Ne(o,h){1&o&&(e.j41(0,"li"),e.nrm(1,"i",38),e.k0s())}function gt(o,h){if(1&o&&(e.j41(0,"div",18)(1,"div",19)(2,"a",20),e.nrm(3,"img",21),e.k0s(),e.j41(4,"div",22)(5,"ul",23),e.DNE(6,xt,2,0,"li",15)(7,Ne,2,0,"li",15),e.k0s(),e.j41(8,"a",24)(9,"h4",25),e.EFF(10),e.k0s()(),e.j41(11,"h5",26),e.EFF(12),e.nI1(13,"currency"),e.k0s(),e.j41(14,"ul",27)(15,"li",28)(16,"a",24),e.nrm(17,"i",29),e.k0s()(),e.j41(18,"li",30)(19,"a",31),e.nrm(20,"i",32),e.k0s()(),e.j41(21,"li",33)(22,"a",24),e.nrm(23,"i",34),e.k0s()(),e.j41(24,"li",35)(25,"a",24),e.nrm(26,"i",36),e.k0s()()()()()()),2&o){const i=h.$implicit,a=e.XpG(3);e.R7$(2),e.Y8G("routerLink","/product/"+i.slug),e.R7$(),e.Y8G("src",i.thumbnail_image,e.B4B)("alt",i.name),e.R7$(3),e.Y8G("ngForOf",e.lJ4(17,we).constructor(i.rating)),e.R7$(),e.Y8G("ngForOf",e.lJ4(18,we).constructor(5-i.rating)),e.R7$(),e.Y8G("routerLink","/product/"+i.slug),e.R7$(2),e.JRh(i.name),e.R7$(2),e.SpI(" ",e.ii3(13,12,i.price,a.currentCurrency,"symbol","1.2-2"),"\n"),e.R7$(4),e.Y8G("routerLink","/cart"),e.R7$(3),e.Y8G("routerLink","/product/"+i.slug),e.R7$(3),e.Y8G("routerLink","/wishlist"),e.R7$(3),e.Y8G("routerLink","/compare")}}function rn(o,h){if(1&o&&(e.j41(0,"div")(1,"div",16),e.DNE(2,gt,27,19,"div",17),e.k0s()()),2&o){const i=h.$implicit;e.R7$(2),e.Y8G("ngForOf",i)}}function Rt(o,h){if(1&o&&(e.j41(0,"div",40),e.DNE(1,rn,3,1,"div",15),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.Y8G("ngForOf",i.groupedBestSellerProducts)}}function sn(o,h){1&o&&(e.j41(0,"div")(1,"p"),e.EFF(2,"Cargando Productos..."),e.k0s()())}function on(o,h){if(1&o&&(e.j41(0,"div",13),e.EFF(1),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.SpI(" ",i.errorMessage," ")}}function Be(o,h){1&o&&(e.j41(0,"li"),e.nrm(1,"i",37),e.k0s())}function K(o,h){1&o&&(e.j41(0,"li"),e.nrm(1,"i",38),e.k0s())}function Z(o,h){if(1&o&&(e.j41(0,"div",18)(1,"div",19)(2,"a",20),e.nrm(3,"img",21),e.k0s(),e.j41(4,"div",22)(5,"ul",23),e.DNE(6,Be,2,0,"li",15)(7,K,2,0,"li",15),e.k0s(),e.j41(8,"a",24)(9,"h4",25),e.EFF(10),e.k0s()(),e.j41(11,"h5",26),e.EFF(12),e.nI1(13,"currency"),e.k0s(),e.j41(14,"ul",27)(15,"li",28)(16,"a",24),e.nrm(17,"i",29),e.k0s()(),e.j41(18,"li",30)(19,"a",31),e.nrm(20,"i",32),e.k0s()(),e.j41(21,"li",33)(22,"a",24),e.nrm(23,"i",34),e.k0s()(),e.j41(24,"li",35)(25,"a",24),e.nrm(26,"i",36),e.k0s()()()()()()),2&o){const i=h.$implicit,a=h.index,d=e.XpG(3);e.R7$(),e.BMQ("data-wow-delay",.05*a+"s"),e.R7$(),e.Y8G("routerLink","/product/"+i.slug),e.R7$(),e.Y8G("src",i.thumbnail_image,e.B4B)("alt",i.name),e.R7$(3),e.Y8G("ngForOf",e.lJ4(18,we).constructor(i.rating)),e.R7$(),e.Y8G("ngForOf",e.lJ4(19,we).constructor(5-i.rating)),e.R7$(),e.Y8G("routerLink","/product/"+i.slug),e.R7$(2),e.JRh(i.name),e.R7$(2),e.SpI(" ",e.ii3(13,13,i.price,d.currentCurrency,"symbol","1.2-2"),"\n"),e.R7$(4),e.Y8G("routerLink","/cart"),e.R7$(3),e.Y8G("routerLink","/product/"+i.slug),e.R7$(3),e.Y8G("routerLink","/wishlist"),e.R7$(3),e.Y8G("routerLink","/compare")}}function ee(o,h){if(1&o&&(e.j41(0,"div")(1,"div",16),e.DNE(2,Z,27,20,"div",17),e.k0s()()),2&o){const i=h.$implicit;e.R7$(2),e.Y8G("ngForOf",i)}}function Q(o,h){if(1&o&&(e.j41(0,"div",41),e.DNE(1,ee,3,1,"div",15),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.Y8G("ngForOf",i.groupedTodayDealsProducts)}}let ft=(()=>{class o{productsService;cdr;currencyService;imageUrl;productList=[];featuredProducts=[];bestSellerProducts=[];todayDealsProducts=[];groupedProducts=[];groupedFeaturedProducts=[];groupedBestSellerProducts=[];groupedTodayDealsProducts=[];isLoading=!0;errorMessage;currentCurrency="DOP";exchangeRates={USD:62.58,DOP:1,AUD:39.33,EUR:67.93,CNY:8.63};constructor(i,a,d){this.productsService=i,this.cdr=a,this.currencyService=d}ngAfterViewInit(){}initSlider(i){R()(i).hasClass("slick-initialized")&&R()(i).slick("unslick"),R()(i).slick({arrows:!0,infinite:!0,slidesToShow:1,slidesToScroll:1})}initNewProductsSlider(){this.initSlider(".new-products-slider")}initFeaturedProductsSlider(){this.initSlider(".featured-products-slider")}initBestSellerProductsSlider(){this.initSlider(".best-seller-slider")}initTodayDealsProductsSlider(){this.initSlider(".today-deals-slider")}ngOnInit(){this.fetchProducts(),this.fetchFeaturedProducts(),this.fetchBestSellerProducts(),this.fetchTodayDealsProducts();const i=localStorage.getItem("currency");this.currentCurrency=i&&this.exchangeRates[i]?i:"DOP",this.currencyService.changeCurrency(this.currentCurrency),this.updateProductPrices()}fetchProducts(){this.productsService.getProductsNews().subscribe({next:i=>{this.productList=i?this.updateProductCategoryPrices(i):[],this.groupProducts(),this.isLoading=!1,this.cdr.detectChanges(),setTimeout(()=>{this.initNewProductsSlider()},0)},error:i=>{console.error("Failed to fetch News Products:",i),this.errorMessage="Failed to load News Products",this.productList=[],this.isLoading=!1}})}fetchFeaturedProducts(){this.isLoading=!0,this.productsService.getProductsFeatured().subscribe({next:i=>{this.featuredProducts=this.updateFeaturedProductPrices(i),this.featuredProducts=this.featuredProducts.map(a=>({...a,price:a.discounted_price,originalPrice:a.base_price})),this.groupFeaturedProducts(),this.isLoading=!1,this.cdr.detectChanges(),setTimeout(()=>{this.initFeaturedProductsSlider()},0)},error:i=>{console.error("Failed to fetch Featured Products:",i),this.errorMessage="Failed to load Featured Products",this.isLoading=!1}})}updateFeaturedProductPrices(i){const a=this.exchangeRates[this.currentCurrency??""];if(!a)return console.error(`Exchange rate not found for currency "${this.currentCurrency}".`),i;const d=["USD","AUD","EUR","CNY"];return i.map(m=>{const Y=m.base_price||0,W=m.discounted_price||0,me=d.includes(this.currentCurrency)?+Y/a:+Y*a,ze=d.includes(this.currentCurrency)?+W/a:+W*a,Ze=`${this.cleanPrice(me)} ${this.currentCurrency}`,Dt=`${this.cleanPrice(ze)} ${this.currentCurrency}`;return{...m,originalBasePrice:Y,originalDiscountedPrice:W,base_price:me,base_price_formatted:Ze,discounted_price:ze,discounted_price_formatted:Dt}})}fetchBestSellerProducts(){this.isLoading=!0,this.productsService.getProductsBestSeller().subscribe({next:i=>{this.bestSellerProducts=i?this.updateProductCategoryPrices(i):[],this.groupBestSellerProducts(),this.isLoading=!1,this.cdr.detectChanges(),setTimeout(()=>{this.initBestSellerProductsSlider()},0)},error:i=>{console.error("Failed to fetch Best Seller Products:",i),this.errorMessage="Failed to load Best Seller Products",this.bestSellerProducts=[],this.isLoading=!1}})}fetchTodayDealsProducts(){this.isLoading=!0,this.productsService.getProductsTodayDeals().subscribe({next:i=>{this.todayDealsProducts=i?this.updateProductCategoryPrices(i):[],this.groupTodayDealsProducts(),this.isLoading=!1,this.cdr.detectChanges(),setTimeout(()=>{this.initTodayDealsProductsSlider()},0)},error:i=>{console.error("Failed to fetch Today Deals Products:",i),this.errorMessage="Failed to load Today Deals Products",this.todayDealsProducts=[],this.isLoading=!1}})}groupProducts(){this.groupedProducts=this.groupArrayElements(this.productList,3)}groupFeaturedProducts(){this.groupedFeaturedProducts=this.groupArrayElements(this.featuredProducts,3)}groupBestSellerProducts(){this.groupedBestSellerProducts=this.groupArrayElements(this.bestSellerProducts,3)}groupTodayDealsProducts(){this.groupedTodayDealsProducts=this.groupArrayElements(this.todayDealsProducts,3)}groupArrayElements(i,a){const d=[];for(let m=0;m<i.length;m+=a)d.push(i.slice(m,m+a));return d}updateProductCategoryPrices(i){const a=this.exchangeRates[this.currentCurrency??""];if(!a)return console.error(`Exchange rate not found for currency "${this.currentCurrency}".`),i;const d=["USD","AUD","EUR","CNY"];return i.map(m=>{const Y=this.cleanPrice(m.main_price);if(!Y)return console.warn(`Product (${m.name}) does not have a valid price.`),m;const W=d.includes(this.currentCurrency)?+Y/a:+Y*a,me=`${this.currentCurrency}$${W.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`;return{...m,originalPrice:Y,price:+W.toFixed(2),formattedPrice:me}})}getPriceFromFields(i,a){for(let d of a)if(i[d])return i[d];return null}cleanPrice(i){if(!i)return 0;if("number"==typeof i)return i;const a=i.toString().replace(/[^0-9.-]+/g,"").replace(/,/g,""),d=parseFloat(a);return isNaN(d)?0:d}updateProductPrices(){this.productList=this.updateProductCategoryPrices(this.productList),this.featuredProducts=this.updateFeaturedProductPrices(this.featuredProducts),this.bestSellerProducts=this.updateProductCategoryPrices(this.bestSellerProducts),this.todayDealsProducts=this.updateProductCategoryPrices(this.todayDealsProducts),this.groupProducts(),this.groupFeaturedProducts(),this.groupBestSellerProducts(),this.groupTodayDealsProducts(),this.cdr.detectChanges(),setTimeout(()=>{this.initNewProductsSlider(),this.initFeaturedProductsSlider(),this.initBestSellerProductsSlider(),this.initTodayDealsProductsSlider()},0)}static \u0275fac=function(a){return new(a||o)(e.rXU($e.g),e.rXU(e.gRc),e.rXU(Ee.P))};static \u0275cmp=e.VBU({type:o,selectors:[["app-new-products"]],inputs:{imageUrl:"imageUrl"},decls:43,vars:24,consts:[[1,"product-section-2"],[1,"container-fluid-lg"],[1,"row","gy-sm-5","gy-4"],[1,"col-xxl-3","col-md-6"],[1,"row"],[1,"col-xl-12"],[1,"title","title-border","d-block"],[4,"ngIf"],["class","alert alert-danger",4,"ngIf"],["class","product-category-1 arrow-slider-2 new-products-slider",4,"ngIf"],["class","product-category-1 arrow-slider-2 featured-products-slider",4,"ngIf"],["class","product-category-1 arrow-slider-2 best-seller-slider",4,"ngIf"],["class","product-category-1 arrow-slider-2 today-deals-slider",4,"ngIf"],[1,"alert","alert-danger"],[1,"product-category-1","arrow-slider-2","new-products-slider"],[4,"ngFor","ngForOf"],[1,"row","gy-sm-4","gy-3"],["class","col-12",4,"ngFor","ngForOf"],[1,"col-12"],[1,"product-box-4","wow","fadeInUp"],[1,"product-image",3,"routerLink"],[1,"img-fluid",3,"src","alt"],[1,"product-details"],[1,"rating"],[3,"routerLink"],[1,"name",2,"text-transform","capitalize !important"],[1,"price"],[1,"option"],["data-bs-toggle","tooltip","data-bs-placement","top","title","Agregar al Carrito"],[1,"iconly-Buy","icli"],["data-bs-toggle","tooltip","data-bs-placement","top","title","Vista R\xe1pida"],["data-bs-toggle","modal","data-bs-target","#exampleModal",3,"routerLink"],[1,"iconly-Show","icli"],["data-bs-toggle","tooltip","data-bs-placement","top","title","Mi Lista"],[1,"iconly-Heart","icli"],["data-bs-toggle","tooltip","data-bs-placement","top","title","Comparar"],[1,"iconly-Swap","icli"],["data-feather","star",1,"fill"],["data-feather","star"],[1,"product-category-1","arrow-slider-2","featured-products-slider"],[1,"product-category-1","arrow-slider-2","best-seller-slider"],[1,"product-category-1","arrow-slider-2","today-deals-slider"]],template:function(a,d){1&a&&(e.j41(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"h3"),e.EFF(8),e.nI1(9,"translate"),e.k0s()(),e.DNE(10,Ji,3,0,"div",7)(11,Zt,2,1,"div",8)(12,Wi,2,1,"div",9),e.k0s()()(),e.j41(13,"div",3)(14,"div",4)(15,"div",5)(16,"div",6)(17,"h3"),e.EFF(18),e.nI1(19,"translate"),e.k0s()(),e.DNE(20,qi,3,0,"div",7)(21,Ki,2,1,"div",8)(22,en,2,1,"div",10),e.k0s()()(),e.j41(23,"div",3)(24,"div",4)(25,"div",5)(26,"div",6)(27,"h3"),e.EFF(28),e.nI1(29,"translate"),e.k0s()(),e.DNE(30,tn,3,0,"div",7)(31,nn,2,1,"div",8)(32,Rt,2,1,"div",11),e.k0s()()(),e.j41(33,"div",3)(34,"div",4)(35,"div",5)(36,"div",6)(37,"h3"),e.EFF(38),e.nI1(39,"translate"),e.k0s()(),e.DNE(40,sn,3,0,"div",7)(41,on,2,1,"div",8)(42,Q,2,1,"div",12),e.k0s()()()()()()),2&a&&(e.R7$(8),e.JRh(e.bMT(9,16,"new_products_title")),e.R7$(2),e.Y8G("ngIf",d.isLoading),e.R7$(),e.Y8G("ngIf",d.errorMessage),e.R7$(),e.Y8G("ngIf",!d.isLoading&&!d.errorMessage),e.R7$(6),e.JRh(e.bMT(19,18,"featured_products_title")),e.R7$(2),e.Y8G("ngIf",d.isLoading),e.R7$(),e.Y8G("ngIf",d.errorMessage),e.R7$(),e.Y8G("ngIf",!d.isLoading&&!d.errorMessage),e.R7$(6),e.JRh(e.bMT(29,20,"best_selling_products_title")),e.R7$(2),e.Y8G("ngIf",d.isLoading),e.R7$(),e.Y8G("ngIf",d.errorMessage),e.R7$(),e.Y8G("ngIf",!d.isLoading&&!d.errorMessage),e.R7$(6),e.JRh(e.bMT(39,22,"on_sale_products_title")),e.R7$(2),e.Y8G("ngIf",d.isLoading),e.R7$(),e.Y8G("ngIf",d.errorMessage),e.R7$(),e.Y8G("ngIf",!d.isLoading&&!d.errorMessage))},dependencies:[F.D,F.G,F.I,F.a2,U.R,D.h,D.D9,U.m],encapsulation:2})}return o})(),Me=(()=>{class o{bannerService;banner={photo:"",text1:"",text2:"",text3:""};imageUrl;constructor(i){this.bannerService=i}ngOnInit(){this.bannerService.getFifthBanner().subscribe(i=>{i&&i.length>0&&(this.banner=i[0])})}static \u0275fac=function(a){return new(a||o)(e.rXU(Ae))};static \u0275cmp=e.VBU({type:o,selectors:[["app-banner-section-full"]],inputs:{imageUrl:"imageUrl"},decls:17,vars:7,consts:[[1,"banner-section"],[1,"container-fluid-lg"],[1,"row"],[1,"col-12"],[1,"banner-contain-3","section-b-space","section-t-space","hover-effect"],["alt","",1,"img-fluid","bg-img",3,"src"],[1,"banner-detail","p-center","text-dark","position-absolute","text-center","p-0"],[1,"ls-expanded","text-uppercase","theme-color"],[1,"my-3"],[1,"text-content","fw-300"],["onclick","location.href = 'shop-left-sidebar.html';",1,"btn","theme-bg-color","mt-sm-4","btn-md","mx-auto","text-white","fw-bold"]],template:function(a,d){1&a&&(e.j41(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e.nrm(5,"img",5),e.j41(6,"div",6)(7,"div")(8,"h4",7),e.EFF(9),e.k0s(),e.j41(10,"h2",8),e.EFF(11),e.k0s(),e.j41(12,"h4",9),e.EFF(13),e.k0s(),e.j41(14,"button",10),e.EFF(15),e.nI1(16,"translate"),e.k0s()()()()()()()()),2&a&&(e.R7$(5),e.Y8G("src",d.banner.photo,e.B4B),e.R7$(4),e.SpI(" ",d.banner.text1," "),e.R7$(2),e.SpI(" ",d.banner.text2," "),e.R7$(2),e.SpI(" ",d.banner.text3," "),e.R7$(2),e.JRh(e.bMT(16,5,"buy_now")))},dependencies:[D.h,D.D9,F.D],encapsulation:2})}return o})(),Se=(()=>{class o{transform(i,a){if(!i||a<=0)return[];const d=[];for(let m=0;m<i.length;m+=a)d.push(i.slice(m,m+a));return d}static \u0275fac=function(a){return new(a||o)};static \u0275pipe=e.EJ8({name:"groupBy",type:o,pure:!0})}return o})();const Ge=()=>["/compare"],ii=()=>[1,2,3,4,5];function Pt(o,h){1&o&&(e.j41(0,"div",5)(1,"p"),e.EFF(2,"Cargando Productos..."),e.k0s()())}function Ye(o,h){if(1&o&&(e.j41(0,"li"),e.nrm(1,"i",26),e.k0s()),2&o){const i=h.$implicit,a=e.XpG().$implicit;e.R7$(),e.AVh("fill",i<=((null==a?null:a.rating)||0))}}function ni(o,h){if(1&o&&(e.j41(0,"del"),e.EFF(1),e.nI1(2,"currency"),e.k0s()),2&o){let i;const a=e.XpG().$implicit,d=e.XpG(3);e.R7$(),e.SpI(" ",e.ii3(2,1,null!==(i=a.originalPrice)&&void 0!==i?i:0,d.currentCurrency,"symbol","1.2-2")," ")}}function It(o,h){if(1&o&&(e.j41(0,"div",9)(1,"div",10),e.nrm(2,"app-wishlist-button-icon",11),e.j41(3,"a",12),e.nrm(4,"img",13),e.k0s(),e.j41(5,"ul",14)(6,"li",15)(7,"a",16),e.nrm(8,"i",17),e.k0s()(),e.j41(9,"li",18)(10,"a",12),e.nrm(11,"i",19),e.k0s()()()(),e.j41(12,"div",20)(13,"ul",21),e.DNE(14,Ye,2,2,"li",7),e.k0s(),e.j41(15,"a",12)(16,"h5",22),e.EFF(17),e.k0s()(),e.j41(18,"h5",23),e.EFF(19),e.nI1(20,"currency"),e.DNE(21,ni,3,6,"del",24),e.k0s(),e.nrm(22,"app-cart-button-icon",25),e.k0s()()),2&o){const i=h.$implicit,a=e.XpG(3);e.R7$(2),e.Y8G("product",i)("productId",i.id),e.R7$(),e.Y8G("routerLink","product/"+i.slug||0),e.R7$(),e.Y8G("src",i.thumbnail_image||"assets/images/default-product.png",e.B4B)("alt",i.name||"Product Image"),e.R7$(6),e.Y8G("routerLink",e.lJ4(20,Ge)),e.R7$(4),e.Y8G("ngForOf",e.lJ4(21,ii)),e.R7$(),e.Y8G("routerLink","product/"+i.slug||0),e.R7$(2),e.JRh(i.name),e.R7$(2),e.SpI(" ",e.ii3(20,15,i.price,a.currentCurrency,"symbol","1.2-2")," "),e.R7$(2),e.Y8G("ngIf",i.discountedPrice),e.R7$(),e.Y8G("productId",i.id)("variant",i.variant||"5x5x5")("weight",i.weight||0)("initialQuantity",1)}}function At(o,h){if(1&o&&(e.j41(0,"div"),e.DNE(1,It,23,22,"div",8),e.k0s()),2&o){const i=h.$implicit;e.R7$(),e.Y8G("ngForOf",i)}}function ri(o,h){if(1&o&&(e.j41(0,"div",6),e.DNE(1,At,2,1,"div",7),e.nI1(2,"groupBy"),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.Y8G("ngForOf",e.i5U(2,1,i.productList,2))}}let si=(()=>{class o{currencyService;cdr;zone;productsService;imageUrl;productList=[];slickInitialized=!1;isLoading=!0;currentCurrency="DOP";exchangeRates={USD:62.58,DOP:1,AUD:39.33,EUR:67.93,CNY:8.63};constructor(i,a,d,m){this.currencyService=i,this.cdr=a,this.zone=d,this.productsService=m}ngOnChanges(i){i.productList&&i.productList.currentValue&&this.refreshSlickSlider()}ngAfterViewInit(){this.productList.length>0&&this.initializeSlickSlider()}ngAfterViewChecked(){!this.slickInitialized&&R()(".product-featured").length>0&&this.initializeSlickSlider()}initializeSlickSlider(){const i=R()(".product-featured");i&&0!==i.length?this.zone.runOutsideAngular(()=>{i.slick({arrows:!1,infinite:!0,slidesToShow:6,slidesToScroll:1,responsive:[{breakpoint:1560,settings:{slidesToShow:5,autoplay:!0,autoplaySpeed:3500}},{breakpoint:1270,settings:{slidesToShow:4}},{breakpoint:1010,settings:{slidesToShow:3}},{breakpoint:730,settings:{slidesToShow:2}}]}),this.slickInitialized=!0}):console.warn("Slick slider element not found. Initialization skipped.")}refreshSlickSlider(){const i=R()(".product-featured");if(this.slickInitialized&&i.hasClass("slick-initialized")){try{i.slick("unslick")}catch(a){console.warn("Failed to destroy existing Slick instance:",a)}this.slickInitialized=!1}this.initializeSlickSlider()}ngOnInit(){const i=localStorage.getItem("currency");this.currentCurrency=i&&this.exchangeRates[i]?i:"DOP",this.currencyService.changeCurrency(this.currentCurrency),this.updateProductPrices(),this.fetchProducts(),this.currencyService.currency$.subscribe(a=>{a!==this.currentCurrency&&(this.currentCurrency=a,localStorage.setItem("currency",a),this.updateProductPrices(),this.refreshSlickSlider())})}parseCurrency(i){return"string"!=typeof i?(console.warn("Invalid value passed to parseCurrency:",i),0):parseFloat(i.replace(/[^\d.-]/g,""))||0}fetchProducts(){this.isLoading=!0,this.productsService.getProductsFeatured().subscribe({next:i=>{this.productList=i.map(a=>{const d=a.has_discount?a.discounted_price_formatted:a.base_price_formatted,m=a.base_price_formatted;return{...a,originalPrice:this.parseFormattedPrice(m),price:this.parseFormattedPrice(d)}}),this.updateProductPrices(),this.refreshSlickSlider(),this.isLoading=!1},error:i=>{console.error("Failed to load products:",i),this.isLoading=!1}})}parseFormattedPrice(i){if(!i)return console.warn("Attempted to parse an undefined or null formatted price:",i),0;try{return parseFloat(i.replace(/[^\d.-]/g,""))||0}catch(a){return console.error("Failed to parse formatted price:",i,a),0}}updateProductPrices(){const i=this.exchangeRates[this.currentCurrency??""]??null;if(!i)return void console.error(`Exchange rate not found for currency "${this.currentCurrency}".`);const a=["USD","AUD","EUR","CNY"];this.productList=this.productList.map(d=>{const m=d.originalPrice||0,Y=a.includes(this.currentCurrency??"")?+(m/i).toFixed(2):m;return{...d,price:Y}}),this.cdr.detectChanges()}static \u0275fac=function(a){return new(a||o)(e.rXU(Ee.P),e.rXU(e.gRc),e.rXU(e.SKi),e.rXU($e.g))};static \u0275cmp=e.VBU({type:o,selectors:[["app-product-featured"]],inputs:{imageUrl:"imageUrl"},features:[e.OA$],decls:8,vars:5,consts:[[1,"product-section"],[1,"container-fluid-lg"],[1,"title"],["class","loading-state text-center",4,"ngIf"],["class","product-featured slider-6 img-slider slick-slider-1 arrow-slider",4,"ngIf"],[1,"loading-state","text-center"],[1,"product-featured","slider-6","img-slider","slick-slider-1","arrow-slider"],[4,"ngFor","ngForOf"],["class","product-box-4 wow fadeInUp","data-wow-delay","0.2s",4,"ngFor","ngForOf"],["data-wow-delay","0.2s",1,"product-box-4","wow","fadeInUp"],[1,"product-image"],[3,"product","productId"],[3,"routerLink"],[1,"img-fluid",3,"src","alt"],[1,"option"],["data-bs-toggle","tooltip","data-bs-placement","top","title","Vista R\xe1pida"],["href","javascript:void(0)","data-bs-toggle","modal","data-bs-target","#view"],[1,"iconly-Show","icli"],["data-bs-toggle","tooltip","data-bs-placement","top","title","Comparar"],[1,"iconly-Swap","icli"],[1,"product-detail"],[1,"rating"],[1,"name"],[1,"price","theme-color"],[4,"ngIf"],[3,"productId","variant","weight","initialQuantity"],["data-feather","star"]],template:function(a,d){1&a&&(e.j41(0,"section",0)(1,"div",1)(2,"div",2)(3,"h2"),e.EFF(4),e.nI1(5,"translate"),e.k0s()(),e.DNE(6,Pt,3,0,"div",3)(7,ri,3,4,"div",4),e.k0s()()),2&a&&(e.R7$(4),e.JRh(e.bMT(5,3,"main_products_title")),e.R7$(2),e.Y8G("ngIf",d.isLoading),e.R7$(),e.Y8G("ngIf",!d.isLoading&&d.productList&&d.productList.length>0))},dependencies:[F.D,F.G,F.I,F.a2,D.h,D.D9,Se,ct.X,Kt.K,U.m,U.R],encapsulation:2})}return o})();var oi=P(1070);const jt=o=>["/blog",o],ai=()=>({width:"520px",height:"232px","object-fit":"cover"});function li(o,h){1&o&&(e.j41(0,"div",6)(1,"p"),e.EFF(2,"Cargando blogs..."),e.k0s()())}function ci(o,h){if(1&o&&(e.j41(0,"div",7)(1,"p"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG();e.R7$(2),e.JRh(i.error)}}function di(o,h){if(1&o&&(e.j41(0,"div")(1,"div",10)(2,"div",11)(3,"a",12),e.nrm(4,"img",13),e.k0s()(),e.j41(5,"div",14)(6,"label"),e.EFF(7),e.k0s(),e.j41(8,"a",12)(9,"h2"),e.EFF(10),e.k0s()(),e.j41(11,"div",15)(12,"span"),e.EFF(13),e.k0s(),e.j41(14,"span"),e.EFF(15,"Por La Pieza Support"),e.k0s()()()()()),2&o){const i=h.$implicit,a=e.XpG(2);e.R7$(3),e.Y8G("routerLink",e.eq3(8,jt,i.slug)),e.R7$(),e.Y8G("src",i.imageUrl,e.B4B)("alt",i.title)("ngStyle",e.lJ4(10,ai)),e.R7$(3),e.JRh(a.getCategoryName(i.category_id)),e.R7$(),e.Y8G("routerLink",e.eq3(11,jt,i.slug)),e.R7$(2),e.JRh(i.title),e.R7$(3),e.JRh(a.formatDate(i.created_at))}}function ui(o,h){if(1&o&&(e.j41(0,"div",8),e.DNE(1,di,16,13,"div",9),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.Y8G("ngForOf",i.blogs)}}function hi(o,h){1&o&&(e.j41(0,"div",6)(1,"p"),e.EFF(2,"No hay blogs disponibles en este momento."),e.k0s()())}let ce=(()=>{class o{blogService;imageUrl;blogs=[];loading=!0;error=null;apiUrl=H.c.apiUrl||"";categories={1:"Veh\xedculos Alta Gama",2:"Consejos para tu Veh\xedculo",3:"Noticias",4:"Veh\xedculos Alta Gama"};constructor(i){this.blogService=i,console.log("BlogFrontSectionComponent constructor")}ngOnInit(){console.log("BlogFrontSectionComponent ngOnInit"),this.loadActiveBlogs()}ngAfterViewInit(){console.log("BlogFrontSectionComponent ngAfterViewInit")}loadActiveBlogs(){console.log("Intentando cargar blogs activos..."),this.loading=!0,this.blogService.getActiveBlogs().subscribe({next:i=>{console.log("Datos recibidos del servidor:",i),i&&i.data&&Array.isArray(i.data)?(this.blogs=i.data,this.blogs.forEach(a=>{a.banner&&this.loadImageUrl(a)}),console.log("Blogs procesados:",this.blogs),this.loading=!1,this.blogs.length>0&&setTimeout(()=>{this.refreshSlider()},300)):(console.error("Estructura de datos inesperada:",i),this.error="Formato de datos no reconocido",this.loading=!1)},error:i=>{console.error("Error al cargar los blogs:",i),this.error="Error al cargar los blogs: "+(i.message||"Error desconocido"),this.loading=!1}})}loadImageUrl(i){this.blogService.getImageUrl(i.banner).subscribe({next:a=>{i.imageUrl=a.file_url},error:a=>{console.error(`Error al cargar imagen para blog ${i.id}:`,a),i.imageUrl="assets/images/blog/default-blog-image.jpg"}})}getBannerUrl(i){return i?`${this.apiUrl}/images/${i}`:"assets/images/blog/default-blog-image.jpg"}getCategoryName(i){return this.categories[i]||"Categor\xeda"}refreshSlider(){console.log("Refrescando slider..."),R()(".slider-3").hasClass("slick-initialized")&&(console.log("Destruyendo slider existente"),R()(".slider-3").slick("unslick")),console.log("Inicializando slider nuevo"),this.loadThreeSlider()}loadThreeSlider(){console.log("Configurando slider...");try{R()(".slider-3").slick({infinite:!0,slidesToScroll:1,slidesToShow:3,arrows:!1,responsive:[{breakpoint:992,settings:{slidesToShow:2}},{breakpoint:768,settings:{slidesToShow:1}}]}),console.log("Slider inicializado correctamente")}catch(i){console.error("Error al inicializar slider:",i)}}formatDate(i){try{const a=new Date(i);return isNaN(a.getTime())?i:`${["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"][a.getMonth()]} ${a.getDate()}, ${a.getFullYear()}`}catch(a){return console.error("Error al formatear fecha:",a),i}}static \u0275fac=function(a){return new(a||o)(e.rXU(oi.c))};static \u0275cmp=e.VBU({type:o,selectors:[["app-blog-front-section"]],inputs:{imageUrl:"imageUrl"},decls:10,vars:7,consts:[[1,"blog-section"],[1,"container-fluid-lg"],[1,"title"],["class","text-center py-4",4,"ngIf"],["class","text-center py-4 text-danger",4,"ngIf"],["class","slider-3 arrow-slider",4,"ngIf"],[1,"text-center","py-4"],[1,"text-center","py-4","text-danger"],[1,"slider-3","arrow-slider"],[4,"ngFor","ngForOf"],[1,"blog-box","ratio_50"],[1,"blog-box-image"],[3,"routerLink"],[1,"img-fluid","bg-img",3,"src","alt","ngStyle"],[1,"blog-detail"],[1,"blog-list"]],template:function(a,d){1&a&&(e.j41(0,"section",0)(1,"div",1)(2,"div",2)(3,"h2"),e.EFF(4),e.nI1(5,"translate"),e.k0s()(),e.DNE(6,li,3,0,"div",3)(7,ci,3,1,"div",4)(8,ui,2,1,"div",5)(9,hi,3,0,"div",3),e.k0s()()),2&a&&(e.R7$(4),e.JRh(e.bMT(5,5,"blog_title")),e.R7$(2),e.Y8G("ngIf",d.loading),e.R7$(),e.Y8G("ngIf",d.error),e.R7$(),e.Y8G("ngIf",!d.loading&&!d.error&&d.blogs.length>0),e.R7$(),e.Y8G("ngIf",!d.loading&&!d.error&&0===d.blogs.length))},dependencies:[D.h,D.D9,F.D,F.G,F.I,F.M,U.m,U.R],encapsulation:2})}return o})(),te=(()=>{class o{imageUrl;static \u0275fac=function(a){return new(a||o)};static \u0275cmp=e.VBU({type:o,selectors:[["app-newsletter-front-section"]],inputs:{imageUrl:"imageUrl"},decls:26,vars:12,consts:[[1,"newsletter-section-2","section-b-space"],[1,"container-fluid-lg"],[1,"row"],[1,"col-12"],[1,"newsletter-box","hover-effect","bg-size",2,"background-image","url('assets/images/veg-3/shape/background.png')","background-size","cover","background-position","center center","background-repeat","no-repeat","display","block"],[1,"col-xxl-8","col-xl-7"],[1,"newsletter-detail","p-center-left","text-white"],[1,"row","g-2"],[1,"col-sm-10","col-12"],[1,"newsletter-form"],["type","email","id","email",1,"form-control",3,"placeholder"],["type","submit",1,"btn","bg-white","theme-color","btn-md","fw-500","submit-button"],[1,"col-xxl-4","col-xl-5","d-xl-block","d-none"],[1,"shape-box"],["src","assets/images/veg-3/shape/basket.png","alt","",1,"img-fluid","image-1"]],template:function(a,d){1&a&&(e.j41(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",2)(6,"div",5)(7,"div",6)(8,"div")(9,"h2"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"h4"),e.EFF(13),e.nI1(14,"translate"),e.k0s(),e.j41(15,"form",7)(16,"div",8)(17,"div",9),e.nrm(18,"input",10),e.nI1(19,"translate"),e.j41(20,"button",11),e.EFF(21),e.nI1(22,"translate"),e.k0s()()()()()()(),e.j41(23,"div",12)(24,"div",13),e.nrm(25,"img",14),e.k0s()()()()()()()()),2&a&&(e.R7$(10),e.JRh(e.bMT(11,4,"subscribe_newsletter_title")),e.R7$(3),e.JRh(e.bMT(14,6,"subscribe_newsletter_description")),e.R7$(5),e.FS9("placeholder",e.bMT(19,8,"email_placeholder")),e.R7$(3),e.JRh(e.bMT(22,10,"subscribe_button")))},dependencies:[D.h,D.D9],encapsulation:2})}return o})(),Te=(()=>{class o{ngOnInit(){this.loadMenuScript()}loadMenuScript(){$(".mobile-menu ul li a").click(function(){$("li a").removeClass("active"),$(this).addClass("active")}),$(".mobile-category").click(function(){$(".bg-overlay, .category-dropdown").addClass("show")}),$(".close-button, .bg-overlay").click(function(){$(".bg-overlay, .category-dropdown").removeClass("show")})}static \u0275fac=function(a){return new(a||o)};static \u0275cmp=e.VBU({type:o,selectors:[["app-mobile-menu"]],decls:27,vars:2,consts:[[1,"mobile-menu","d-md-none","d-block","mobile-cart"],[1,"active"],["href","index.html"],[1,"iconly-Home","icli"],[1,"mobile-category"],["href","javascript:void(0)"],[1,"iconly-Category","icli","js-link"],["href","search.html",1,"search-box"],[1,"iconly-Search","icli"],[1,"notifi-wishlist",3,"routerLink"],[1,"iconly-Heart","icli"],[3,"routerLink"],[1,"iconly-Bag-2","icli","fly-cate"]],template:function(a,d){1&a&&(e.j41(0,"div",0)(1,"ul")(2,"li",1)(3,"a",2),e.nrm(4,"i",3),e.j41(5,"span"),e.EFF(6,"Inicio"),e.k0s()()(),e.j41(7,"li",4)(8,"a",5),e.nrm(9,"i",6),e.j41(10,"span"),e.EFF(11,"Categor\xedas"),e.k0s()()(),e.j41(12,"li")(13,"a",7),e.nrm(14,"i",8),e.j41(15,"span"),e.EFF(16,"Buscar"),e.k0s()()(),e.j41(17,"li")(18,"a",9),e.nrm(19,"i",10),e.j41(20,"span"),e.EFF(21,"Mi Lista"),e.k0s()()(),e.j41(22,"li")(23,"a",11),e.nrm(24,"i",12),e.j41(25,"span"),e.EFF(26,"Carrito"),e.k0s()()()()()),2&a&&(e.R7$(18),e.Y8G("routerLink","/wishlist"),e.R7$(5),e.Y8G("routerLink","/cart"))},dependencies:[U.R],encapsulation:2})}return o})();var ie=P(3137),mt=P(3108),_t=P(2289);function de(o,h){if(1&o&&(e.j41(0,"li",20),e.nrm(1,"img",21),e.j41(2,"div")(3,"a",22),e.EFF(4),e.k0s()()()),2&o){const i=h.$implicit,a=e.XpG(2);e.R7$(),e.Y8G("src",a.getProductThumbnail(i.product_id),e.B4B)("alt",a.getProductName(i.product_id)),e.R7$(3),e.SpI("",a.getProductName(i.product_id)," ")}}function xe(o,h){if(1&o){const i=e.RV6();e.j41(0,"div")(1,"div",5)(2,"div",6)(3,"div",7)(4,"div",8),e.nrm(5,"img",9),e.k0s(),e.j41(6,"div",10)(7,"h2")(8,"a",11),e.EFF(9),e.k0s(),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"h5",12),e.EFF(13),e.k0s(),e.j41(14,"h5",13)(15,"b"),e.EFF(16),e.nI1(17,"translate"),e.k0s(),e.nrm(18,"br"),e.EFF(19),e.k0s()()(),e.j41(20,"div",14)(21,"ul",15),e.DNE(22,de,5,3,"li",16),e.k0s()()(),e.j41(23,"div",17)(24,"h4"),e.EFF(25,"Cup\xf3n: "),e.nrm(26,"input",18),e.k0s(),e.j41(27,"button",19),e.bIt("click",function(){const d=e.eBV(i).$implicit,m=e.XpG();return e.Njj(m.copyCode(d.code))}),e.EFF(28),e.nI1(29,"translate"),e.k0s()()()()}if(2&o){const i=h.$implicit,a=e.XpG();e.R7$(5),e.Y8G("src",a.getShopLogo(i.user_id),e.B4B)("alt",i.name),e.R7$(4),e.SpI("",i.discount,"%"),e.R7$(),e.SpI(" ",e.bMT(11,11,"discount_text")," "),e.R7$(3),e.JRh(i.description),e.R7$(3),e.JRh(e.bMT(17,13,"valid_until")),e.R7$(3),e.JRh(a.convertUnixTimestamp(i.end_date)),e.R7$(3),e.Y8G("ngForOf",i.details),e.R7$(4),e.Y8G("id","coupon-"+i.id)("value",i.code),e.R7$(2),e.SpI(" ",e.bMT(29,15,"copy_coupon_code")," ")}}let vt=(()=>{class o{mainMenuService;couponsService;shopService;productsService;ngZone;imageUrl;coupons=[];shopLogos=new Map;productDetails=new Map;constructor(i,a,d,m,Y){this.mainMenuService=i,this.couponsService=a,this.shopService=d,this.productsService=m,this.ngZone=Y}ngOnInit(){this.loadCouponsAndShops()}loadCouponsAndShops(){this.couponsService.getAllCoupons().subscribe({next:i=>{this.coupons=Array.isArray(i)?i:i.data||i.coupons||[],console.log("Cupones cargados:",this.coupons),this.loadAllProducts(),this.loadShopLogos(),this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.initializeSlider()},0)})},error:i=>{console.error("Error loading coupons:",i)}})}loadAllProducts(){const i=new Set;this.coupons.forEach(a=>{Array.isArray(a.details)&&a.details.forEach(d=>{d.product_id&&i.add(String(d.product_id))})}),console.log("IDs de productos a cargar:",Array.from(i)),Array.from(i).forEach(a=>{console.log(`Iniciando petici\xf3n para producto ID: ${a}`);const d=Number(a);isNaN(d)?console.error(`ID de producto inv\xe1lido (no es un n\xfamero): ${a}`):this.productsService.getProductById(d).subscribe({next:m=>{if(console.log(`Datos recibidos para producto ID ${a}:`,m),Array.isArray(m)&&m.length>0){const Y=m[0];this.productDetails.set(a,Y),console.log(`Producto guardado en Map. ID: ${a}, Nombre: ${Y.name}`)}else m&&"object"==typeof m?(this.productDetails.set(a,m),console.log(`Producto guardado en Map. ID: ${a}, Nombre: ${m.name}`)):console.error(`Datos de producto vac\xedos o formato incorrecto para ID ${a}`)},error:m=>{console.error(`Error al cargar el producto ${a}:`,m)}})})}getProductThumbnail(i){const a=String(i),d=this.productDetails.get(a);return d&&d.thumbnail_image?d.thumbnail_image:"../assets/images/default-thumbnail.png"}getProductName(i){const a=String(i),d=this.productDetails.get(a);return d&&d.name?d.name:"Cargando..."}loadShopLogos(){this.shopService.getAllShops().subscribe({next:i=>{(Array.isArray(i)?i:i.data||[]).forEach(d=>{this.shopLogos.set(d.user_id,d.logo)}),console.log("Logos de tiendas cargados:",this.shopLogos)},error:i=>{console.error("Error loading shops:",i)}})}getShopLogo(i){return this.shopLogos.get(i)||"../assets/images/grocery/bank/name/1.png"}initializeSlider(){try{if(typeof $>"u"||!$.fn.slick)return void console.error("jQuery or Slick slider is not loaded");const i=$(".slider-bank-3");i.hasClass("slick-initialized")&&i.slick("unslick"),i.slick({infinite:!0,slidesToScroll:1,slidesToShow:3,arrows:!0,responsive:[{breakpoint:1652,settings:{slidesToShow:2}},{breakpoint:914,settings:{slidesToShow:1}}]}),console.log("Slider initialized successfully")}catch(i){console.error("Error initializing slider:",i)}}convertUnixTimestamp(i){const a=new Date(1e3*i);return new Intl.DateTimeFormat("es-ES",{day:"2-digit",month:"long",year:"numeric"}).format(a)}copyCode(i){navigator.clipboard.writeText(i).then(()=>{alert("C\xf3digo copiado al portapapeles!")}).catch(a=>{console.error("Failed to copy coupon code:",a),alert("Error al copiar el c\xf3digo")})}ngAfterViewInit(){this.initializeSlider()}static \u0275fac=function(a){return new(a||o)(e.rXU(_t.Y),e.rXU(ie.r),e.rXU(mt.s),e.rXU($e.g),e.rXU(e.SKi))};static \u0275cmp=e.VBU({type:o,selectors:[["app-coupon-front"]],inputs:{imageUrl:"imageUrl"},features:[e.Jv_([ie.r,mt.s,$e.g])],decls:8,vars:4,consts:[[1,"bank-section","overflow-hidden"],[1,"container-fluid-lg"],[1,"title"],[1,"slider-bank-3","arrow-slider","slick-height"],[4,"ngFor","ngForOf"],[1,"bank-offer"],[1,"bank-header"],[1,"bank-left","w-100"],[1,"bank-image"],[1,"img-fluid","border-r20",3,"src","alt"],[1,"bank-name"],[2,"color","black"],[1,"discount","text-content"],[1,"valid","text-content"],[1,"bank-right","w-100"],[1,"product-image"],["style","display: flex; align-items: center; margin-bottom: 10px;",4,"ngFor","ngForOf"],[1,"bank-footer","bank-footer-1"],["readonly","",3,"id","value"],["type","button",1,"bank-coupon","btn",3,"click"],[2,"display","flex","align-items","center","margin-bottom","10px"],[1,"img-fluid","image_border",3,"src","alt"],[1,"text-14","text-title",2,"display","-webkit-box","-webkit-line-clamp","2","-webkit-box-orient","vertical","overflow","hidden","text-overflow","ellipsis"]],template:function(a,d){1&a&&(e.j41(0,"section",0)(1,"div",1)(2,"div",2)(3,"h2"),e.EFF(4),e.nI1(5,"translate"),e.k0s()(),e.j41(6,"div",3),e.DNE(7,xe,30,17,"div",4),e.k0s()()()),2&a&&(e.R7$(4),e.JRh(e.bMT(5,2,"coupon_text")),e.R7$(3),e.Y8G("ngForOf",d.coupons))},dependencies:[F.D,F.G,lt.o,D.h,D.D9],encapsulation:2})}return o})(),Ue=(()=>{class o{mainMenuService;isMainMenuOpen=!1;isMobileMenuOpen=!1;ImageURL=H.c.ImageUrl;constructor(i){this.mainMenuService=i}ngOnInit(){this.mainMenuService.openMenu()}toggleMenu(){this.mainMenuService.toggleMainMenu()}static \u0275fac=function(a){return new(a||o)(e.rXU(_t.Y))};static \u0275cmp=e.VBU({type:o,selectors:[["app-welcome"]],decls:13,vars:11,consts:[[3,"imageUrl"]],template:function(a,d){1&a&&e.nrm(0,"app-mobile-menu")(1,"app-banners-front",0)(2,"app-category-slider",0)(3,"app-best-value",0)(4,"app-deals-day")(5,"app-product-section",0)(6,"app-coupon-front",0)(7,"app-banners-section-middle",0)(8,"app-new-products",0)(9,"app-banner-section-full",0)(10,"app-product-featured",0)(11,"app-blog-front-section",0)(12,"app-newsletter-front-section",0),2&a&&(e.R7$(),e.Y8G("imageUrl",d.ImageURL),e.R7$(),e.Y8G("imageUrl",d.ImageURL),e.R7$(),e.Y8G("imageUrl",d.ImageURL),e.R7$(2),e.Y8G("imageUrl",d.ImageURL),e.R7$(),e.Y8G("imageUrl",d.ImageURL),e.R7$(),e.Y8G("imageUrl",d.ImageURL),e.R7$(),e.Y8G("imageUrl",d.ImageURL),e.R7$(),e.Y8G("imageUrl",d.ImageURL),e.R7$(),e.Y8G("imageUrl",d.ImageURL),e.R7$(),e.Y8G("imageUrl",d.ImageURL),e.R7$(),e.Y8G("imageUrl",d.ImageURL))},dependencies:[He,Ht,Ft,Ii,ht,Vi,ft,Me,si,ce,te,Te,vt],encapsulation:2})}return o})()},9973:function(Fi){Fi.exports=function(){"use strict";const se=new Map,P={set(r,t,n){se.has(r)||se.set(r,new Map);const s=se.get(r);s.has(t)||0===s.size?s.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(r,t)=>se.has(r)&&se.get(r).get(t)||null,remove(r,t){if(!se.has(r))return;const n=se.get(r);n.delete(t),0===n.size&&se.delete(r)}},U="transitionend",D=r=>(r&&window.CSS&&window.CSS.escape&&(r=r.replace(/#([^\s"#']+)/g,(t,n)=>`#${CSS.escape(n)}`)),r),F=r=>{r.dispatchEvent(new Event(U))},oe=r=>!(!r||"object"!=typeof r)&&(void 0!==r.jquery&&(r=r[0]),void 0!==r.nodeType),R=r=>oe(r)?r.jquery?r[0]:r:"string"==typeof r&&r.length>0?document.querySelector(D(r)):null,Je=r=>{if(!oe(r)||0===r.getClientRects().length)return!1;const t="visible"===getComputedStyle(r).getPropertyValue("visibility"),n=r.closest("details:not([open])");if(!n)return t;if(n!==r){const s=r.closest("summary");if(s&&s.parentNode!==n||null===s)return!1}return t},e=r=>!r||r.nodeType!==Node.ELEMENT_NODE||!!r.classList.contains("disabled")||(void 0!==r.disabled?r.disabled:r.hasAttribute("disabled")&&"false"!==r.getAttribute("disabled")),j=r=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof r.getRootNode){const t=r.getRootNode();return t instanceof ShadowRoot?t:null}return r instanceof ShadowRoot?r:r.parentNode?j(r.parentNode):null},be=()=>{},Si=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Ie=[],X=()=>"rtl"===document.documentElement.dir,V=r=>{var t;t=()=>{const n=Si();if(n){const s=r.NAME,l=n.fn[s];n.fn[s]=r.jQueryInterface,n.fn[s].Constructor=r,n.fn[s].noConflict=()=>(n.fn[s]=l,r.jQueryInterface)}},"loading"===document.readyState?(Ie.length||document.addEventListener("DOMContentLoaded",()=>{for(const n of Ie)n()}),Ie.push(t)):t()},H=(r,t=[],n=r)=>"function"==typeof r?r.call(...t):n,lt=(r,t,n=!0)=>{if(!n)return void H(r);const s=(u=>{if(!u)return 0;let{transitionDuration:p,transitionDelay:f}=window.getComputedStyle(u);const v=Number.parseFloat(p),b=Number.parseFloat(f);return v||b?(p=p.split(",")[0],f=f.split(",")[0],1e3*(Number.parseFloat(p)+Number.parseFloat(f))):0})(t)+5;let l=!1;const c=({target:u})=>{u===t&&(l=!0,t.removeEventListener(U,c),H(r))};t.addEventListener(U,c),setTimeout(()=>{l||F(t)},s)},Ae=(r,t,n,s)=>{const l=r.length;let c=r.indexOf(t);return-1===c?!n&&s?r[l-1]:r[0]:(c+=n?1:-1,s&&(c=(c+l)%l),r[Math.max(0,Math.min(c,l-1))])},Gt=/[^.]*(?=\..*)\.|.*/,Ti=/\..*/,xi=/::\d+$/,$t={};let Yt=1;const Ut={mouseenter:"mouseover",mouseleave:"mouseout"},Ri=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function zt(r,t){return t&&`${t}::${Yt++}`||r.uidEvent||Yt++}function Xt(r){const t=zt(r);return r.uidEvent=t,$t[t]=$t[t]||{},$t[t]}function Vt(r,t,n=null){return Object.values(r).find(s=>s.callable===t&&s.delegationSelector===n)}function Jt(r,t,n){const s="string"==typeof t,l=s?n:t||n;let c=Wt(r);return Ri.has(c)||(c=r),[s,l,c]}function Ht(r,t,n,s,l){if("string"!=typeof t||!r)return;let[c,u,p]=Jt(t,n,s);var C;t in Ut&&(C=u,u=function(k){if(!k.relatedTarget||k.relatedTarget!==k.delegateTarget&&!k.delegateTarget.contains(k.relatedTarget))return C.call(this,k)});const f=Xt(r),v=f[p]||(f[p]={}),b=Vt(v,u,c?n:null);if(b)return void(b.oneOff=b.oneOff&&l);const _=zt(u,t.replace(Gt,"")),S=c?function(w,C,k){return function E(N){const G=w.querySelectorAll(C);for(let{target:x}=N;x&&x!==this;x=x.parentNode)for(const A of G)if(A===x)return Ft(N,{delegateTarget:x}),E.oneOff&&g.off(w,N.type,C,k),k.apply(x,[N])}}(r,n,u):function(w,C){return function k(E){return Ft(E,{delegateTarget:w}),k.oneOff&&g.off(w,E.type,C),C.apply(w,[E])}}(r,u);S.delegationSelector=c?n:null,S.callable=u,S.oneOff=l,S.uidEvent=_,v[_]=S,r.addEventListener(p,S,c)}function Et(r,t,n,s,l){const c=Vt(t[n],s,l);c&&(r.removeEventListener(n,c,!!l),delete t[n][c.uidEvent])}function Pi(r,t,n,s){const l=t[n]||{};for(const[c,u]of Object.entries(l))c.includes(s)&&Et(r,t,n,u.callable,u.delegationSelector)}function Wt(r){return r=r.replace(Ti,""),Ut[r]||r}const g={on(r,t,n,s){Ht(r,t,n,s,!1)},one(r,t,n,s){Ht(r,t,n,s,!0)},off(r,t,n,s){if("string"!=typeof t||!r)return;const[l,c,u]=Jt(t,n,s),p=u!==t,f=Xt(r),v=f[u]||{},b=t.startsWith(".");if(void 0===c){if(b)for(const _ of Object.keys(f))Pi(r,f,_,t.slice(1));for(const[_,S]of Object.entries(v)){const w=_.replace(xi,"");p&&!t.includes(w)||Et(r,f,u,S.callable,S.delegationSelector)}}else{if(!Object.keys(v).length)return;Et(r,f,u,c,l?n:null)}},trigger(r,t,n){if("string"!=typeof t||!r)return null;const s=Si();let l=null,c=!0,u=!0,p=!1;t!==Wt(t)&&s&&(l=s.Event(t,n),s(r).trigger(l),c=!l.isPropagationStopped(),u=!l.isImmediatePropagationStopped(),p=l.isDefaultPrevented());const f=Ft(new Event(t,{bubbles:c,cancelable:!0}),n);return p&&f.preventDefault(),u&&r.dispatchEvent(f),f.defaultPrevented&&l&&l.preventDefault(),f}};function Ft(r,t={}){for(const[n,s]of Object.entries(t))try{r[n]=s}catch{Object.defineProperty(r,n,{configurable:!0,get:()=>s})}return r}function ct(r){if("true"===r)return!0;if("false"===r)return!1;if(r===Number(r).toString())return Number(r);if(""===r||"null"===r)return null;if("string"!=typeof r)return r;try{return JSON.parse(decodeURIComponent(r))}catch{return r}}function $e(r){return r.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const fe={setDataAttribute(r,t,n){r.setAttribute(`data-bs-${$e(t)}`,n)},removeDataAttribute(r,t){r.removeAttribute(`data-bs-${$e(t)}`)},getDataAttributes(r){if(!r)return{};const t={},n=Object.keys(r.dataset).filter(s=>s.startsWith("bs")&&!s.startsWith("bsConfig"));for(const s of n){let l=s.replace(/^bs/,"");l=l.charAt(0).toLowerCase()+l.slice(1),t[l]=ct(r.dataset[s])}return t},getDataAttribute:(r,t)=>ct(r.getAttribute(`data-bs-${$e(t)}`))};class We{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,n){const s=oe(n)?fe.getDataAttribute(n,"config"):{};return{...this.constructor.Default,..."object"==typeof s?s:{},...oe(n)?fe.getDataAttributes(n):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,n=this.constructor.DefaultType){for(const[l,c]of Object.entries(n)){const u=t[l],p=oe(u)?"element":null==(s=u)?`${s}`:Object.prototype.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(c).test(p))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${l}" provided type "${p}" but expected type "${c}".`)}var s}}class ae extends We{constructor(t,n){super(),(t=R(t))&&(this._element=t,this._config=this._getConfig(n),P.set(this._element,this.constructor.DATA_KEY,this))}dispose(){P.remove(this._element,this.constructor.DATA_KEY),g.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,n,s=!0){lt(t,n,s)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return P.get(R(t),this.DATA_KEY)}static getOrCreateInstance(t,n={}){return this.getInstance(t)||new this(t,"object"==typeof n?n:null)}static get VERSION(){return"5.3.5"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const St=r=>{let t=r.getAttribute("data-bs-target");if(!t||"#"===t){let n=r.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map(n=>D(n)).join(","):null},y={find:(r,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,r)),findOne:(r,t=document.documentElement)=>Element.prototype.querySelector.call(t,r),children:(r,t)=>[].concat(...r.children).filter(n=>n.matches(t)),parents(r,t){const n=[];let s=r.parentNode.closest(t);for(;s;)n.push(s),s=s.parentNode.closest(t);return n},prev(r,t){let n=r.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(r,t){let n=r.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(r){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(n=>`${n}:not([tabindex^="-"])`).join(",");return this.find(t,r).filter(n=>!e(n)&&Je(n))},getSelectorFromElement(r){const t=St(r);return t&&y.findOne(t)?t:null},getElementFromSelector(r){const t=St(r);return t?y.findOne(t):null},getMultipleElementsFromSelector(r){const t=St(r);return t?y.find(t):[]}},dt=(r,t="hide")=>{const s=r.NAME;g.on(document,`click.dismiss${r.EVENT_KEY}`,`[data-bs-dismiss="${s}"]`,function(l){if(["A","AREA"].includes(this.tagName)&&l.preventDefault(),e(this))return;const c=y.getElementFromSelector(this)||this.closest(`.${s}`);r.getOrCreateInstance(c)[t]()})},qt=".bs.alert",Ii=`close${qt}`,Kt=`closed${qt}`;class Ee extends ae{static get NAME(){return"alert"}close(){if(g.trigger(this._element,Ii).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),g.trigger(this._element,Kt),this.dispose()}static jQueryInterface(t){return this.each(function(){const n=Ee.getOrCreateInstance(this);if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t](this)}})}}dt(Ee,"close"),V(Ee);const qe='[data-bs-toggle="button"]';class je extends ae{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each(function(){const n=je.getOrCreateInstance(this);"toggle"===t&&n[t]()})}}g.on(document,"click.bs.button.data-api",qe,r=>{r.preventDefault();const t=r.target.closest(qe);je.getOrCreateInstance(t).toggle()}),V(je);const Fe=".bs.swipe",Ai=`touchstart${Fe}`,ji=`touchmove${Fe}`,Di=`touchend${Fe}`,Li=`pointerdown${Fe}`,Oi=`pointerup${Fe}`,Ni={endCallback:null,leftCallback:null,rightCallback:null},Bi={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ut extends We{constructor(t,n){super(),this._element=t,t&&ut.isSupported()&&(this._config=this._getConfig(n),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Ni}static get DefaultType(){return Bi}static get NAME(){return"swipe"}dispose(){g.off(this._element,Fe)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),H(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const n=t/this._deltaX;this._deltaX=0,n&&H(n>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(g.on(this._element,Li,t=>this._start(t)),g.on(this._element,Oi,t=>this._end(t)),this._element.classList.add("pointer-event")):(g.on(this._element,Ai,t=>this._start(t)),g.on(this._element,ji,t=>this._move(t)),g.on(this._element,Di,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ye=".bs.carousel",Qt=".data-api",Mi="ArrowLeft",Gi="ArrowRight",Ke="next",De="prev",Le="left",ht="right",Yi=`slide${ye}`,Tt=`slid${ye}`,Ui=`keydown${ye}`,zi=`mouseenter${ye}`,Xi=`mouseleave${ye}`,Vi=`dragstart${ye}`,we=`load${ye}${Qt}`,Ji=`click${ye}${Qt}`,Zt="carousel",pt="active",ei=".active",ti=".carousel-item",Hi=ei+ti,Wi={[Mi]:ht,[Gi]:Le},qi={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Ki={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Oe extends ae{constructor(t,n){super(t,n),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=y.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Zt&&this.cycle()}static get Default(){return qi}static get DefaultType(){return Ki}static get NAME(){return"carousel"}next(){this._slide(Ke)}nextWhenVisible(){!document.hidden&&Je(this._element)&&this.next()}prev(){this._slide(De)}pause(){this._isSliding&&F(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?g.one(this._element,Tt,()=>this.cycle()):this.cycle())}to(t){const n=this._getItems();if(t>n.length-1||t<0)return;if(this._isSliding)return void g.one(this._element,Tt,()=>this.to(t));const s=this._getItemIndex(this._getActive());s!==t&&this._slide(t>s?Ke:De,n[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&g.on(this._element,Ui,t=>this._keydown(t)),"hover"===this._config.pause&&(g.on(this._element,zi,()=>this.pause()),g.on(this._element,Xi,()=>this._maybeEnableCycle())),this._config.touch&&ut.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const n of y.find(".carousel-item img",this._element))g.on(n,Vi,s=>s.preventDefault());this._swipeHelper=new ut(this._element,{leftCallback:()=>this._slide(this._directionToOrder(Le)),rightCallback:()=>this._slide(this._directionToOrder(ht)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}})}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const n=Wi[t.key];n&&(t.preventDefault(),this._slide(this._directionToOrder(n)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const n=y.findOne(ei,this._indicatorsElement);n.classList.remove(pt),n.removeAttribute("aria-current");const s=y.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);s&&(s.classList.add(pt),s.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const n=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=n||this._config.defaultInterval}_slide(t,n=null){if(this._isSliding)return;const s=this._getActive(),l=t===Ke,c=n||Ae(this._getItems(),s,l,this._config.wrap);if(c===s)return;const u=this._getItemIndex(c),p=_=>g.trigger(this._element,_,{relatedTarget:c,direction:this._orderToDirection(t),from:this._getItemIndex(s),to:u});if(p(Yi).defaultPrevented||!s||!c)return;const f=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(u),this._activeElement=c;const v=l?"carousel-item-start":"carousel-item-end",b=l?"carousel-item-next":"carousel-item-prev";c.classList.add(b),s.classList.add(v),c.classList.add(v),this._queueCallback(()=>{c.classList.remove(v,b),c.classList.add(pt),s.classList.remove(pt,b,v),this._isSliding=!1,p(Tt)},s,this._isAnimated()),f&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return y.findOne(Hi,this._element)}_getItems(){return y.find(ti,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return X()?t===Le?De:Ke:t===Le?Ke:De}_orderToDirection(t){return X()?t===De?Le:ht:t===De?ht:Le}static jQueryInterface(t){return this.each(function(){const n=Oe.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t]()}}else n.to(t)})}}g.on(document,Ji,"[data-bs-slide], [data-bs-slide-to]",function(r){const t=y.getElementFromSelector(this);if(!t||!t.classList.contains(Zt))return;r.preventDefault();const n=Oe.getOrCreateInstance(t),s=this.getAttribute("data-bs-slide-to");return s?(n.to(s),void n._maybeEnableCycle()):"next"===fe.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())}),g.on(window,we,()=>{const r=y.find('[data-bs-ride="carousel"]');for(const t of r)Oe.getOrCreateInstance(t)}),V(Oe);const Qe=".bs.collapse",Qi=`show${Qe}`,Zi=`shown${Qe}`,en=`hide${Qe}`,tn=`hidden${Qe}`,nn=`click${Qe}.data-api`,xt="show",Ne="collapse",gt="collapsing",rn=`:scope .${Ne} .${Ne}`,Rt='[data-bs-toggle="collapse"]',sn={parent:null,toggle:!0},on={parent:"(null|element)",toggle:"boolean"};class Be extends ae{constructor(t,n){super(t,n),this._isTransitioning=!1,this._triggerArray=[];const s=y.find(Rt);for(const l of s){const c=y.getSelectorFromElement(l),u=y.find(c).filter(p=>p===this._element);null!==c&&u.length&&this._triggerArray.push(l)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return sn}static get DefaultType(){return on}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(l=>l!==this._element).map(l=>Be.getOrCreateInstance(l,{toggle:!1}))),t.length&&t[0]._isTransitioning||g.trigger(this._element,Qi).defaultPrevented)return;for(const l of t)l.hide();const n=this._getDimension();this._element.classList.remove(Ne),this._element.classList.add(gt),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const s=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(gt),this._element.classList.add(Ne,xt),this._element.style[n]="",g.trigger(this._element,Zi)},this._element,!0),this._element.style[n]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown()||g.trigger(this._element,en).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,this._element.classList.add(gt),this._element.classList.remove(Ne,xt);for(const n of this._triggerArray){const s=y.getElementFromSelector(n);s&&!this._isShown(s)&&this._addAriaAndCollapsedClass([n],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(gt),this._element.classList.add(Ne),g.trigger(this._element,tn)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(xt)}_configAfterMerge(t){return t.toggle=!!t.toggle,t.parent=R(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Rt);for(const n of t){const s=y.getElementFromSelector(n);s&&this._addAriaAndCollapsedClass([n],this._isShown(s))}}_getFirstLevelChildren(t){const n=y.find(rn,this._config.parent);return y.find(t,this._config.parent).filter(s=>!n.includes(s))}_addAriaAndCollapsedClass(t,n){if(t.length)for(const s of t)s.classList.toggle("collapsed",!n),s.setAttribute("aria-expanded",n)}static jQueryInterface(t){const n={};return"string"==typeof t&&/show|hide/.test(t)&&(n.toggle=!1),this.each(function(){const s=Be.getOrCreateInstance(this,n);if("string"==typeof t){if(void 0===s[t])throw new TypeError(`No method named "${t}"`);s[t]()}})}}g.on(document,nn,Rt,function(r){("A"===r.target.tagName||r.delegateTarget&&"A"===r.delegateTarget.tagName)&&r.preventDefault();for(const t of y.getMultipleElementsFromSelector(this))Be.getOrCreateInstance(t,{toggle:!1}).toggle()}),V(Be);var K="top",Z="bottom",ee="right",Q="left",ft="auto",Me=[K,Z,ee,Q],Se="start",Ge="end",ii="clippingParents",Pt="viewport",Ye="popper",ni="reference",It=Me.reduce(function(r,t){return r.concat([t+"-"+Se,t+"-"+Ge])},[]),At=[].concat(Me,[ft]).reduce(function(r,t){return r.concat([t,t+"-"+Se,t+"-"+Ge])},[]),ri="beforeRead",oi="afterRead",jt="beforeMain",li="afterMain",ci="beforeWrite",ui="afterWrite",hi=[ri,"read",oi,jt,"main",li,ci,"write",ui];function ce(r){return r?(r.nodeName||"").toLowerCase():null}function te(r){if(null==r)return window;if("[object Window]"!==r.toString()){var t=r.ownerDocument;return t&&t.defaultView||window}return r}function Te(r){return r instanceof te(r).Element||r instanceof Element}function ie(r){return r instanceof te(r).HTMLElement||r instanceof HTMLElement}function mt(r){return typeof ShadowRoot<"u"&&(r instanceof te(r).ShadowRoot||r instanceof ShadowRoot)}const _t={name:"applyStyles",enabled:!0,phase:"write",fn:function(r){var t=r.state;Object.keys(t.elements).forEach(function(n){var s=t.styles[n]||{},l=t.attributes[n]||{},c=t.elements[n];ie(c)&&ce(c)&&(Object.assign(c.style,s),Object.keys(l).forEach(function(u){var p=l[u];!1===p?c.removeAttribute(u):c.setAttribute(u,!0===p?"":p)}))})},effect:function(r){var t=r.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(s){var l=t.elements[s],c=t.attributes[s]||{},u=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:n[s]).reduce(function(p,f){return p[f]="",p},{});ie(l)&&ce(l)&&(Object.assign(l.style,u),Object.keys(c).forEach(function(p){l.removeAttribute(p)}))})}},requires:["computeStyles"]};function de(r){return r.split("-")[0]}var xe=Math.max,vt=Math.min,Ue=Math.round;function o(){var r=navigator.userAgentData;return null!=r&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function h(){return!/^((?!chrome|android).)*safari/i.test(o())}function i(r,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var s=r.getBoundingClientRect(),l=1,c=1;t&&ie(r)&&(l=r.offsetWidth>0&&Ue(s.width)/r.offsetWidth||1,c=r.offsetHeight>0&&Ue(s.height)/r.offsetHeight||1);var u=(Te(r)?te(r):window).visualViewport,p=!h()&&n,f=(s.left+(p&&u?u.offsetLeft:0))/l,v=(s.top+(p&&u?u.offsetTop:0))/c,b=s.width/l,_=s.height/c;return{width:b,height:_,top:v,right:f+b,bottom:v+_,left:f,x:f,y:v}}function a(r){var t=i(r),n=r.offsetWidth,s=r.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:r.offsetLeft,y:r.offsetTop,width:n,height:s}}function d(r,t){var n=t.getRootNode&&t.getRootNode();if(r.contains(t))return!0;if(n&&mt(n)){var s=t;do{if(s&&r.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function m(r){return te(r).getComputedStyle(r)}function Y(r){return["table","td","th"].indexOf(ce(r))>=0}function W(r){return((Te(r)?r.ownerDocument:r.document)||window.document).documentElement}function me(r){return"html"===ce(r)?r:r.assignedSlot||r.parentNode||(mt(r)?r.host:null)||W(r)}function ze(r){return ie(r)&&"fixed"!==m(r).position?r.offsetParent:null}function Ze(r){for(var t=te(r),n=ze(r);n&&Y(n)&&"static"===m(n).position;)n=ze(n);return n&&("html"===ce(n)||"body"===ce(n)&&"static"===m(n).position)?t:n||function(s){var l=/firefox/i.test(o());if(/Trident/i.test(o())&&ie(s)&&"fixed"===m(s).position)return null;var c=me(s);for(mt(c)&&(c=c.host);ie(c)&&["html","body"].indexOf(ce(c))<0;){var u=m(c);if("none"!==u.transform||"none"!==u.perspective||"paint"===u.contain||-1!==["transform","perspective"].indexOf(u.willChange)||l&&"filter"===u.willChange||l&&u.filter&&"none"!==u.filter)return c;c=c.parentNode}return null}(r)||t}function Dt(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function Lt(r,t,n){return xe(r,vt(t,n))}function xn(r){return Object.assign({},{top:0,right:0,bottom:0,left:0},r)}function Rn(r,t){return t.reduce(function(n,s){return n[s]=r,n},{})}const Pn={name:"arrow",enabled:!0,phase:"main",fn:function(r){var t,B,O,n=r.state,s=r.name,l=r.options,c=n.elements.arrow,u=n.modifiersData.popperOffsets,p=de(n.placement),f=Dt(p),v=[Q,ee].indexOf(p)>=0?"height":"width";if(c&&u){var b=(O=n,xn("number"!=typeof(B="function"==typeof(B=l.padding)?B(Object.assign({},O.rects,{placement:O.placement})):B)?B:Rn(B,Me))),_=a(c),S="y"===f?K:Q,w="y"===f?Z:ee,C=n.rects.reference[v]+n.rects.reference[f]-u[f]-n.rects.popper[v],k=u[f]-n.rects.reference[f],E=Ze(c),N=E?"y"===f?E.clientHeight||0:E.clientWidth||0:0,T=N/2-_[v]/2+(C/2-k/2),I=Lt(b[S],T,N-_[v]-b[w]);n.modifiersData[s]=((t={})[f]=I,t.centerOffset=I-T,t)}},effect:function(r){var t=r.state,n=r.options.element,s=void 0===n?"[data-popper-arrow]":n;null!=s&&("string"!=typeof s||(s=t.elements.popper.querySelector(s)))&&d(t.elements.popper,s)&&(t.elements.arrow=s)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function bt(r){return r.split("-")[1]}var Mr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function In(r){var t,n=r.popper,s=r.popperRect,l=r.placement,c=r.variation,u=r.offsets,p=r.position,f=r.gpuAcceleration,v=r.adaptive,b=r.roundOffsets,_=r.isFixed,S=u.x,w=void 0===S?0:S,C=u.y,k=void 0===C?0:C,E="function"==typeof b?b({x:w,y:k}):{x:w,y:k};w=E.x,k=E.y;var N=u.hasOwnProperty("x"),G=u.hasOwnProperty("y"),x=Q,A=K,T=window;if(v){var I=Ze(n),L="clientHeight",B="clientWidth";I===te(n)&&"static"!==m(I=W(n)).position&&"absolute"===p&&(L="scrollHeight",B="scrollWidth"),(l===K||(l===Q||l===ee)&&c===Ge)&&(A=Z,k-=(_&&I===T&&T.visualViewport?T.visualViewport.height:I[L])-s.height,k*=f?1:-1),l!==Q&&(l!==K&&l!==Z||c!==Ge)||(x=ee,w-=(_&&I===T&&T.visualViewport?T.visualViewport.width:I[B])-s.width,w*=f?1:-1)}var O,ve,ne,pe,z,J=Object.assign({position:p},v&&Mr),le=!0===b?(ve={x:w,y:k},ne=te(n),pe=ve.y,{x:Ue(ve.x*(z=ne.devicePixelRatio||1))/z||0,y:Ue(pe*z)/z||0}):{x:w,y:k};return w=le.x,k=le.y,Object.assign({},J,f?((O={})[A]=G?"0":"",O[x]=N?"0":"",O.transform=(T.devicePixelRatio||1)<=1?"translate("+w+"px, "+k+"px)":"translate3d("+w+"px, "+k+"px, 0)",O):((t={})[A]=G?k+"px":"",t[x]=N?w+"px":"",t.transform="",t))}const an={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(r){var t=r.state,n=r.options,s=n.gpuAcceleration,l=void 0===s||s,c=n.adaptive,u=void 0===c||c,p=n.roundOffsets,f=void 0===p||p,v={placement:de(t.placement),variation:bt(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:l,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,In(Object.assign({},v,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:u,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,In(Object.assign({},v,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var pi={passive:!0};const ln={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(r){var t=r.state,n=r.instance,s=r.options,l=s.scroll,c=void 0===l||l,u=s.resize,p=void 0===u||u,f=te(t.elements.popper),v=[].concat(t.scrollParents.reference,t.scrollParents.popper);return c&&v.forEach(function(b){b.addEventListener("scroll",n.update,pi)}),p&&f.addEventListener("resize",n.update,pi),function(){c&&v.forEach(function(b){b.removeEventListener("scroll",n.update,pi)}),p&&f.removeEventListener("resize",n.update,pi)}},data:{}};var Gr={left:"right",right:"left",bottom:"top",top:"bottom"};function gi(r){return r.replace(/left|right|bottom|top/g,function(t){return Gr[t]})}var Yr={start:"end",end:"start"};function An(r){return r.replace(/start|end/g,function(t){return Yr[t]})}function cn(r){var t=te(r);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function dn(r){return i(W(r)).left+cn(r).scrollLeft}function un(r){var t=m(r);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function jn(r){return["html","body","#document"].indexOf(ce(r))>=0?r.ownerDocument.body:ie(r)&&un(r)?r:jn(me(r))}function Ot(r,t){var n;void 0===t&&(t=[]);var s=jn(r),l=s===(null==(n=r.ownerDocument)?void 0:n.body),c=te(s),u=l?[c].concat(c.visualViewport||[],un(s)?s:[]):s,p=t.concat(u);return l?p:p.concat(Ot(me(u)))}function hn(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function Dn(r,t,n){return t===Pt?hn(function(s,l){var c=te(s),u=W(s),p=c.visualViewport,f=u.clientWidth,v=u.clientHeight,b=0,_=0;if(p){f=p.width,v=p.height;var S=h();(S||!S&&"fixed"===l)&&(b=p.offsetLeft,_=p.offsetTop)}return{width:f,height:v,x:b+dn(s),y:_}}(r,n)):Te(t)?((c=i(s=t,!1,"fixed"===n)).top=c.top+s.clientTop,c.left=c.left+s.clientLeft,c.bottom=c.top+s.clientHeight,c.right=c.left+s.clientWidth,c.width=s.clientWidth,c.height=s.clientHeight,c.x=c.left,c.y=c.top,c):hn(function(s){var l,c=W(s),u=cn(s),p=null==(l=s.ownerDocument)?void 0:l.body,f=xe(c.scrollWidth,c.clientWidth,p?p.scrollWidth:0,p?p.clientWidth:0),v=xe(c.scrollHeight,c.clientHeight,p?p.scrollHeight:0,p?p.clientHeight:0),b=-u.scrollLeft+dn(s),_=-u.scrollTop;return"rtl"===m(p||c).direction&&(b+=xe(c.clientWidth,p?p.clientWidth:0)-f),{width:f,height:v,x:b,y:_}}(W(r)));var s,c}function Ln(r){var t,n=r.reference,s=r.element,l=r.placement,c=l?de(l):null,u=l?bt(l):null,p=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2;switch(c){case K:t={x:p,y:n.y-s.height};break;case Z:t={x:p,y:n.y+n.height};break;case ee:t={x:n.x+n.width,y:f};break;case Q:t={x:n.x-s.width,y:f};break;default:t={x:n.x,y:n.y}}var v=c?Dt(c):null;if(null!=v){var b="y"===v?"height":"width";switch(u){case Se:t[v]=t[v]-(n[b]/2-s[b]/2);break;case Ge:t[v]=t[v]+(n[b]/2-s[b]/2)}}return t}function yt(r,t){void 0===t&&(t={});var ne,he,pe,z,M,re,ge,ke,Ce,q,s=t.placement,l=void 0===s?r.placement:s,c=t.strategy,u=void 0===c?r.strategy:c,p=t.boundary,f=void 0===p?ii:p,v=t.rootBoundary,b=void 0===v?Pt:v,_=t.elementContext,S=void 0===_?Ye:_,w=t.altBoundary,C=void 0!==w&&w,k=t.padding,E=void 0===k?0:k,N=xn("number"!=typeof E?E:Rn(E,Me)),x=r.rects.popper,A=r.elements[C?S===Ye?ni:Ye:S],T=(ne=Te(A)?A:A.contextElement||W(r.elements.popper),pe=b,z=u,ke="clippingParents"===(he=f)?(re=Ot(me(M=ne)),Te(ge=["absolute","fixed"].indexOf(m(M).position)>=0&&ie(M)?Ze(M):M)?re.filter(function(Ve){return Te(Ve)&&d(Ve,ge)&&"body"!==ce(Ve)}):[]):[].concat(he),q=(Ce=[].concat(ke,[pe])).reduce(function(M,re){var ge=Dn(ne,re,z);return M.top=xe(ge.top,M.top),M.right=vt(ge.right,M.right),M.bottom=vt(ge.bottom,M.bottom),M.left=xe(ge.left,M.left),M},Dn(ne,Ce[0],z)),q.width=q.right-q.left,q.height=q.bottom-q.top,q.x=q.left,q.y=q.top,q),I=i(r.elements.reference),L=Ln({reference:I,element:x,placement:l}),B=hn(Object.assign({},x,L)),O=S===Ye?B:I,J={top:T.top-O.top+N.top,bottom:O.bottom-T.bottom+N.bottom,left:T.left-O.left+N.left,right:O.right-T.right+N.right},le=r.modifiersData.offset;if(S===Ye&&le){var ve=le[l];Object.keys(J).forEach(function(ne){var he=[ee,Z].indexOf(ne)>=0?1:-1,pe=[K,Z].indexOf(ne)>=0?"y":"x";J[ne]+=ve[pe]*he})}return J}const On={name:"flip",enabled:!0,phase:"main",fn:function(r){var t=r.state,n=r.options,s=r.name;if(!t.modifiersData[s]._skip){for(var l=n.mainAxis,c=void 0===l||l,u=n.altAxis,p=void 0===u||u,f=n.fallbackPlacements,v=n.padding,b=n.boundary,_=n.rootBoundary,S=n.altBoundary,w=n.flipVariations,C=void 0===w||w,k=n.allowedAutoPlacements,E=t.options.placement,N=de(E),G=f||(N!==E&&C?function(M){if(de(M)===ft)return[];var re=gi(M);return[An(M),re,An(re)]}(E):[gi(E)]),x=[E].concat(G).reduce(function(M,re){return M.concat(de(re)===ft?function Ur(r,t){void 0===t&&(t={});var l=t.boundary,c=t.rootBoundary,u=t.padding,p=t.flipVariations,f=t.allowedAutoPlacements,v=void 0===f?At:f,b=bt(t.placement),_=b?p?It:It.filter(function(C){return bt(C)===b}):Me,S=_.filter(function(C){return v.indexOf(C)>=0});0===S.length&&(S=_);var w=S.reduce(function(C,k){return C[k]=yt(r,{placement:k,boundary:l,rootBoundary:c,padding:u})[de(k)],C},{});return Object.keys(w).sort(function(C,k){return w[C]-w[k]})}(t,{placement:re,boundary:b,rootBoundary:_,padding:v,flipVariations:C,allowedAutoPlacements:k}):re)},[]),A=t.rects.reference,T=t.rects.popper,I=new Map,L=!0,B=x[0],O=0;O<x.length;O++){var J=x[O],le=de(J),ve=bt(J)===Se,ne=[K,Z].indexOf(le)>=0,he=ne?"width":"height",pe=yt(t,{placement:J,boundary:b,rootBoundary:_,altBoundary:S,padding:v}),z=ne?ve?ee:Q:ve?Z:K;A[he]>T[he]&&(z=gi(z));var ke=gi(z),Ce=[];if(c&&Ce.push(pe[le]<=0),p&&Ce.push(pe[z]<=0,pe[ke]<=0),Ce.every(function(M){return M})){B=J,L=!1;break}I.set(J,Ce)}if(L)for(var Ct=function(M){var re=x.find(function(ge){var Ve=I.get(ge);if(Ve)return Ve.slice(0,M).every(function(Ci){return Ci})});if(re)return B=re,"break"},q=C?3:1;q>0&&"break"!==Ct(q);q--);t.placement!==B&&(t.modifiersData[s]._skip=!0,t.placement=B,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Nn(r,t,n){return void 0===n&&(n={x:0,y:0}),{top:r.top-t.height-n.y,right:r.right-t.width+n.x,bottom:r.bottom-t.height+n.y,left:r.left-t.width-n.x}}function Bn(r){return[K,ee,Z,Q].some(function(t){return r[t]>=0})}const Mn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(r){var t=r.state,n=r.name,s=t.rects.reference,l=t.rects.popper,c=t.modifiersData.preventOverflow,u=yt(t,{elementContext:"reference"}),p=yt(t,{altBoundary:!0}),f=Nn(u,s),v=Nn(p,l,c),b=Bn(f),_=Bn(v);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:v,isReferenceHidden:b,hasPopperEscaped:_},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":b,"data-popper-escaped":_})}},Gn={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(r){var t=r.state,s=r.name,l=r.options.offset,c=void 0===l?[0,0]:l,u=At.reduce(function(b,_){return b[_]=(w=t.rects,C=c,k=de(S=_),E=[Q,K].indexOf(k)>=0?-1:1,G=(G=(N="function"==typeof C?C(Object.assign({},w,{placement:S})):C)[0])||0,x=((x=N[1])||0)*E,[Q,ee].indexOf(k)>=0?{x,y:G}:{x:G,y:x}),b;var S,w,C,k,E,N,G,x},{}),p=u[t.placement],v=p.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=p.x,t.modifiersData.popperOffsets.y+=v),t.modifiersData[s]=u}},pn={name:"popperOffsets",enabled:!0,phase:"read",fn:function(r){var t=r.state;t.modifiersData[r.name]=Ln({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},Yn={name:"preventOverflow",enabled:!0,phase:"main",fn:function(r){var Tn,Br,t=r.state,n=r.options,s=r.name,l=n.mainAxis,c=void 0===l||l,u=n.altAxis,p=void 0!==u&&u,S=n.tether,w=void 0===S||S,C=n.tetherOffset,k=void 0===C?0:C,E=yt(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),N=de(t.placement),G=bt(t.placement),x=!G,A=Dt(N),T="x"===A?"y":"x",I=t.modifiersData.popperOffsets,L=t.rects.reference,B=t.rects.popper,O="function"==typeof k?k(Object.assign({},t.rects,{placement:t.placement})):k,J="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),le=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ve={x:0,y:0};if(I){if(c){var ne,he="y"===A?K:Q,pe="y"===A?Z:ee,z="y"===A?"height":"width",ke=I[A],Ce=ke+E[he],Ct=ke-E[pe],q=w?-B[z]/2:0,M=G===Se?L[z]:B[z],re=G===Se?-B[z]:-L[z],ge=t.elements.arrow,Ve=w&&ge?a(ge):{width:0,height:0},Ci=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Tr=Ci[he],xr=Ci[pe],$i=Lt(0,L[z],Ve[z]),ko=x?L[z]/2-q-$i-Tr-J.mainAxis:M-$i-Tr-J.mainAxis,Co=x?-L[z]/2+q+$i+xr+J.mainAxis:re+$i+xr+J.mainAxis,Fn=t.elements.arrow&&Ze(t.elements.arrow),$o=Fn?"y"===A?Fn.clientTop||0:Fn.clientLeft||0:0,Rr=null!=(ne=le?.[A])?ne:0,Eo=ke+Co-Rr,Pr=Lt(w?vt(Ce,ke+ko-Rr-$o):Ce,ke,w?xe(Ct,Eo):Ct);I[A]=Pr,ve[A]=Pr-ke}if(p){var Ir,at=I[T],Ei="y"===T?"height":"width",Ar=at+E["x"===A?K:Q],jr=at-E["x"===A?Z:ee],Sn=-1!==[K,Q].indexOf(N),Dr=null!=(Ir=le?.[T])?Ir:0,Lr=Sn?Ar:at-L[Ei]-B[Ei]-Dr+J.altAxis,Or=Sn?at+L[Ei]+B[Ei]-Dr-J.altAxis:jr,Nr=w&&Sn?(Br=Lt(Lr,at,Tn=Or))>Tn?Tn:Br:Lt(w?Lr:Ar,at,w?Or:jr);I[T]=Nr,ve[T]=Nr-at}t.modifiersData[s]=ve}},requiresIfExists:["offset"]};function zr(r,t,n){void 0===n&&(n=!1);var s,l,_,S,w,C,c=ie(t),u=ie(t)&&(S=(_=t).getBoundingClientRect(),w=Ue(S.width)/_.offsetWidth||1,C=Ue(S.height)/_.offsetHeight||1,1!==w||1!==C),p=W(t),f=i(r,u,n),v={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(c||!c&&!n)&&(("body"!==ce(t)||un(p))&&(v=(s=t)!==te(s)&&ie(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:cn(s)),ie(t)?((b=i(t,!0)).x+=t.clientLeft,b.y+=t.clientTop):p&&(b.x=dn(p))),{x:f.left+v.scrollLeft-b.x,y:f.top+v.scrollTop-b.y,width:f.width,height:f.height}}function Xr(r){var t=new Map,n=new Set,s=[];function l(c){n.add(c.name),[].concat(c.requires||[],c.requiresIfExists||[]).forEach(function(u){if(!n.has(u)){var p=t.get(u);p&&l(p)}}),s.push(c)}return r.forEach(function(c){t.set(c.name,c)}),r.forEach(function(c){n.has(c.name)||l(c)}),s}var Un={placement:"bottom",modifiers:[],strategy:"absolute"};function zn(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return!t.some(function(s){return!(s&&"function"==typeof s.getBoundingClientRect)})}function fi(r){void 0===r&&(r={});var n=r.defaultModifiers,s=void 0===n?[]:n,l=r.defaultOptions,c=void 0===l?Un:l;return function(u,p,f){void 0===f&&(f=c);var v,b,_={placement:"bottom",orderedModifiers:[],options:Object.assign({},Un,c),modifiersData:{},elements:{reference:u,popper:p},attributes:{},styles:{}},S=[],w=!1,C={state:_,setOptions:function(E){var N="function"==typeof E?E(_.options):E;k(),_.options=Object.assign({},c,_.options,N),_.scrollParents={reference:Te(u)?Ot(u):u.contextElement?Ot(u.contextElement):[],popper:Ot(p)};var G,x,T,I,A=(G=[].concat(s,_.options.modifiers),x=G.reduce(function(T,I){var L=T[I.name];return T[I.name]=L?Object.assign({},L,I,{options:Object.assign({},L.options,I.options),data:Object.assign({},L.data,I.data)}):I,T},{}),T=Object.keys(x).map(function(T){return x[T]}),I=Xr(T),hi.reduce(function(L,B){return L.concat(I.filter(function(O){return O.phase===B}))},[]));return _.orderedModifiers=A.filter(function(T){return T.enabled}),_.orderedModifiers.forEach(function(T){var L=T.options,O=T.effect;if("function"==typeof O){var J=O({state:_,name:T.name,instance:C,options:void 0===L?{}:L});S.push(J||function(){})}}),C.update()},forceUpdate:function(){if(!w){var E=_.elements,N=E.reference,G=E.popper;if(zn(N,G)){_.rects={reference:zr(N,Ze(G),"fixed"===_.options.strategy),popper:a(G)},_.reset=!1,_.placement=_.options.placement,_.orderedModifiers.forEach(function(O){return _.modifiersData[O.name]=Object.assign({},O.data)});for(var x=0;x<_.orderedModifiers.length;x++)if(!0!==_.reset){var A=_.orderedModifiers[x],T=A.fn,I=A.options;"function"==typeof T&&(_=T({state:_,options:void 0===I?{}:I,name:A.name,instance:C})||_)}else _.reset=!1,x=-1}}},update:(v=function(){return new Promise(function(E){C.forceUpdate(),E(_)})},function(){return b||(b=new Promise(function(E){Promise.resolve().then(function(){b=void 0,E(v())})})),b}),destroy:function(){k(),w=!0}};if(!zn(u,p))return C;function k(){S.forEach(function(E){return E()}),S=[]}return C.setOptions(f).then(function(E){!w&&f.onFirstUpdate&&f.onFirstUpdate(E)}),C}}var Vr=fi(),Jr=fi({defaultModifiers:[ln,pn,an,_t]}),gn=fi({defaultModifiers:[ln,pn,an,_t,Gn,On,Yn,Pn,Mn]});const Xn=Object.freeze(Object.defineProperty({__proto__:null,afterMain:li,afterRead:oi,afterWrite:ui,applyStyles:_t,arrow:Pn,auto:ft,basePlacements:Me,beforeMain:jt,beforeRead:ri,beforeWrite:ci,bottom:Z,clippingParents:ii,computeStyles:an,createPopper:gn,createPopperBase:Vr,createPopperLite:Jr,detectOverflow:yt,end:Ge,eventListeners:ln,flip:On,hide:Mn,left:Q,main:"main",modifierPhases:hi,offset:Gn,placements:At,popper:Ye,popperGenerator:fi,popperOffsets:pn,preventOverflow:Yn,read:"read",reference:ni,right:ee,start:Se,top:K,variationPlacements:It,viewport:Pt,write:"write"},Symbol.toStringTag,{value:"Module"})),Vn="dropdown",et=".bs.dropdown",fn=".data-api",Hr="ArrowUp",Jn="ArrowDown",Wr=`hide${et}`,qr=`hidden${et}`,Kr=`show${et}`,Qr=`shown${et}`,Hn=`click${et}${fn}`,Wn=`keydown${et}${fn}`,Zr=`keyup${et}${fn}`,wt="show",tt='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',es=`${tt}.${wt}`,mi=".dropdown-menu",ts=X()?"top-end":"top-start",is=X()?"top-start":"top-end",ns=X()?"bottom-end":"bottom-start",rs=X()?"bottom-start":"bottom-end",ss=X()?"left-start":"right-start",os=X()?"right-start":"left-start",as={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},ls={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class _e extends ae{constructor(t,n){super(t,n),this._popper=null,this._parent=this._element.parentNode,this._menu=y.next(this._element,mi)[0]||y.prev(this._element,mi)[0]||y.findOne(mi,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return as}static get DefaultType(){return ls}static get NAME(){return Vn}toggle(){return this._isShown()?this.hide():this.show()}show(){if(e(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!g.trigger(this._element,Kr,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const n of[].concat(...document.body.children))g.on(n,"mouseover",be);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(wt),this._element.classList.add(wt),g.trigger(this._element,Qr,t)}}hide(){!e(this._element)&&this._isShown()&&this._completeHide({relatedTarget:this._element})}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!g.trigger(this._element,Wr,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const n of[].concat(...document.body.children))g.off(n,"mouseover",be);this._popper&&this._popper.destroy(),this._menu.classList.remove(wt),this._element.classList.remove(wt),this._element.setAttribute("aria-expanded","false"),fe.removeDataAttribute(this._menu,"popper"),g.trigger(this._element,qr,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!oe(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Vn.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===Xn)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let t=this._element;"parent"===this._config.reference?t=this._parent:oe(this._config.reference)?t=R(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const n=this._getPopperConfig();this._popper=gn(t,this._menu,n)}_isShown(){return this._menu.classList.contains(wt)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return ss;if(t.classList.contains("dropstart"))return os;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const n="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?n?is:ts:n?rs:ns}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(n=>Number.parseInt(n,10)):"function"==typeof t?n=>t(n,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(fe.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...H(this._config.popperConfig,[void 0,t])}}_selectMenuItem({key:t,target:n}){const s=y.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(l=>Je(l));s.length&&Ae(s,n,t===Jn,!s.includes(n)).focus()}static jQueryInterface(t){return this.each(function(){const n=_e.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}})}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const n=y.find(es);for(const s of n){const l=_e.getInstance(s);if(!l||!1===l._config.autoClose)continue;const c=t.composedPath(),u=c.includes(l._menu);if(c.includes(l._element)||"inside"===l._config.autoClose&&!u||"outside"===l._config.autoClose&&u||l._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const p={relatedTarget:l._element};"click"===t.type&&(p.clickEvent=t),l._completeHide(p)}}static dataApiKeydownHandler(t){const n=/input|textarea/i.test(t.target.tagName),s="Escape"===t.key,l=[Hr,Jn].includes(t.key);if(!l&&!s||n&&!s)return;t.preventDefault();const c=this.matches(tt)?this:y.prev(this,tt)[0]||y.next(this,tt)[0]||y.findOne(tt,t.delegateTarget.parentNode),u=_e.getOrCreateInstance(c);if(l)return t.stopPropagation(),u.show(),void u._selectMenuItem(t);u._isShown()&&(t.stopPropagation(),u.hide(),c.focus())}}g.on(document,Wn,tt,_e.dataApiKeydownHandler),g.on(document,Wn,mi,_e.dataApiKeydownHandler),g.on(document,Hn,_e.clearMenus),g.on(document,Zr,_e.clearMenus),g.on(document,Hn,tt,function(r){r.preventDefault(),_e.getOrCreateInstance(this).toggle()}),V(_e);const qn="backdrop",Qn=`mousedown.bs.${qn}`,cs={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ds={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Zn extends We{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return cs}static get DefaultType(){return ds}static get NAME(){return qn}show(t){if(!this._config.isVisible)return void H(t);this._append();const n=this._getElement();n.classList.add("show"),this._emulateAnimation(()=>{H(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove("show"),this._emulateAnimation(()=>{this.dispose(),H(t)})):H(t)}dispose(){this._isAppended&&(g.off(this._element,Qn),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=R(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),g.on(t,Qn,()=>{H(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){lt(t,this._getElement(),this._config.isAnimated)}}const _i=".bs.focustrap",us=`focusin${_i}`,hs=`keydown.tab${_i}`,er="backward",ps={autofocus:!0,trapElement:null},gs={autofocus:"boolean",trapElement:"element"};class tr extends We{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return ps}static get DefaultType(){return gs}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),g.off(document,_i),g.on(document,us,t=>this._handleFocusin(t)),g.on(document,hs,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,g.off(document,_i))}_handleFocusin(t){const{trapElement:n}=this._config;if(t.target===document||t.target===n||n.contains(t.target))return;const s=y.focusableChildren(n);0===s.length?n.focus():this._lastTabNavDirection===er?s[s.length-1].focus():s[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?er:"forward")}}const ir=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",nr=".sticky-top",vi="padding-right",rr="margin-right";class mn{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,vi,n=>n+t),this._setElementAttributes(ir,vi,n=>n+t),this._setElementAttributes(nr,rr,n=>n-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,vi),this._resetElementAttributes(ir,vi),this._resetElementAttributes(nr,rr)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,n,s){const l=this.getWidth();this._applyManipulationCallback(t,c=>{if(c!==this._element&&window.innerWidth>c.clientWidth+l)return;this._saveInitialAttribute(c,n);const u=window.getComputedStyle(c).getPropertyValue(n);c.style.setProperty(n,`${s(Number.parseFloat(u))}px`)})}_saveInitialAttribute(t,n){const s=t.style.getPropertyValue(n);s&&fe.setDataAttribute(t,n,s)}_resetElementAttributes(t,n){this._applyManipulationCallback(t,s=>{const l=fe.getDataAttribute(s,n);null!==l?(fe.removeDataAttribute(s,n),s.style.setProperty(n,l)):s.style.removeProperty(n)})}_applyManipulationCallback(t,n){if(oe(t))n(t);else for(const s of y.find(t,this._element))n(s)}}const ue=".bs.modal",fs=`hide${ue}`,ms=`hidePrevented${ue}`,sr=`hidden${ue}`,or=`show${ue}`,_s=`shown${ue}`,vs=`resize${ue}`,bs=`click.dismiss${ue}`,ys=`mousedown.dismiss${ue}`,ws=`keydown.dismiss${ue}`,ks=`click${ue}.data-api`,ar="modal-open",_n="modal-static",Cs={backdrop:!0,focus:!0,keyboard:!0},$s={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class it extends ae{constructor(t,n){super(t,n),this._dialog=y.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new mn,this._addEventListeners()}static get Default(){return Cs}static get DefaultType(){return $s}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||g.trigger(this._element,or,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ar),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){this._isShown&&!this._isTransitioning&&(g.trigger(this._element,fs).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove("show"),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){g.off(window,ue),g.off(this._dialog,ue),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Zn({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new tr({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const n=y.findOne(".modal-body",this._dialog);n&&(n.scrollTop=0),this._element.classList.add("show"),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,g.trigger(this._element,_s,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){g.on(this._element,ws,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),g.on(window,vs,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),g.on(this._element,ys,t=>{g.one(this._element,bs,n=>{this._element===t.target&&this._element===n.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(ar),this._resetAdjustments(),this._scrollBar.reset(),g.trigger(this._element,sr)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(g.trigger(this._element,ms).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,n=this._element.style.overflowY;"hidden"===n||this._element.classList.contains(_n)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(_n),this._queueCallback(()=>{this._element.classList.remove(_n),this._queueCallback(()=>{this._element.style.overflowY=n},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,n=this._scrollBar.getWidth(),s=n>0;if(s&&!t){const l=X()?"paddingLeft":"paddingRight";this._element.style[l]=`${n}px`}if(!s&&t){const l=X()?"paddingRight":"paddingLeft";this._element.style[l]=`${n}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,n){return this.each(function(){const s=it.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===s[t])throw new TypeError(`No method named "${t}"`);s[t](n)}})}}g.on(document,ks,'[data-bs-toggle="modal"]',function(r){const t=y.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&r.preventDefault(),g.one(t,or,s=>{s.defaultPrevented||g.one(t,sr,()=>{Je(this)&&this.focus()})});const n=y.findOne(".modal.show");n&&it.getInstance(n).hide(),it.getOrCreateInstance(t).toggle(this)}),dt(it),V(it);const Re=".bs.offcanvas",cr=".data-api",Es=`load${Re}${cr}`,ur="showing",pr=".offcanvas.show",Fs=`show${Re}`,Ss=`shown${Re}`,Ts=`hide${Re}`,gr=`hidePrevented${Re}`,fr=`hidden${Re}`,xs=`resize${Re}`,Rs=`click${Re}${cr}`,Ps=`keydown.dismiss${Re}`,Is={backdrop:!0,keyboard:!0,scroll:!1},As={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Pe extends ae{constructor(t,n){super(t,n),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Is}static get DefaultType(){return As}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||g.trigger(this._element,Fs,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new mn).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ur),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add("show"),this._element.classList.remove(ur),g.trigger(this._element,Ss,{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&(g.trigger(this._element,Ts).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add("hiding"),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove("show","hiding"),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new mn).reset(),g.trigger(this._element,fr)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=!!this._config.backdrop;return new Zn({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():g.trigger(this._element,gr)}:null})}_initializeFocusTrap(){return new tr({trapElement:this._element})}_addEventListeners(){g.on(this._element,Ps,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():g.trigger(this._element,gr))})}static jQueryInterface(t){return this.each(function(){const n=Pe.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t](this)}})}}g.on(document,Rs,'[data-bs-toggle="offcanvas"]',function(r){const t=y.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&r.preventDefault(),e(this))return;g.one(t,fr,()=>{Je(this)&&this.focus()});const n=y.findOne(pr);n&&n!==t&&Pe.getInstance(n).hide(),Pe.getOrCreateInstance(t).toggle(this)}),g.on(window,Es,()=>{for(const r of y.find(pr))Pe.getOrCreateInstance(r).show()}),g.on(window,xs,()=>{for(const r of y.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(r).position&&Pe.getOrCreateInstance(r).hide()}),dt(Pe),V(Pe);const mr={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},js=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ds=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Ls=(r,t)=>{const n=r.nodeName.toLowerCase();return t.includes(n)?!js.has(n)||!!Ds.test(r.nodeValue):t.filter(s=>s instanceof RegExp).some(s=>s.test(n))},Os={allowList:mr,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Ns={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Bs={entry:"(string|element|function|null)",selector:"(string|element)"};class Ms extends We{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Os}static get DefaultType(){return Ns}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[l,c]of Object.entries(this._config.content))this._setContent(t,c,l);const n=t.children[0],s=this._resolvePossibleFunction(this._config.extraClass);return s&&n.classList.add(...s.split(" ")),n}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[n,s]of Object.entries(t))super._typeCheckConfig({selector:n,entry:s},Bs)}_setContent(t,n,s){const l=y.findOne(s,t);l&&((n=this._resolvePossibleFunction(n))?oe(n)?this._putElementInTemplate(R(n),l):this._config.html?l.innerHTML=this._maybeSanitize(n):l.textContent=n:l.remove())}_maybeSanitize(t){return this._config.sanitize?function(n,s,l){if(!n.length)return n;if(l&&"function"==typeof l)return l(n);const c=(new window.DOMParser).parseFromString(n,"text/html"),u=[].concat(...c.body.querySelectorAll("*"));for(const p of u){const f=p.nodeName.toLowerCase();if(!Object.keys(s).includes(f)){p.remove();continue}const v=[].concat(...p.attributes),b=[].concat(s["*"]||[],s[f]||[]);for(const _ of v)Ls(_,b)||p.removeAttribute(_.nodeName)}return c.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return H(t,[void 0,this])}_putElementInTemplate(t,n){if(this._config.html)return n.innerHTML="",void n.append(t);n.textContent=t.textContent}}const Gs=new Set(["sanitize","allowList","sanitizeFn"]),vn="fade",bi="show",Ys=".tooltip-inner",vr="hide.bs.modal",Nt="hover",bn="focus",Us={AUTO:"auto",TOP:"top",RIGHT:X()?"left":"right",BOTTOM:"bottom",LEFT:X()?"right":"left"},zs={allowList:mr,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},Xs={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class nt extends ae{constructor(t,n){if(void 0===Xn)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,n),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return zs}static get DefaultType(){return Xs}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),g.off(this._element.closest(".modal"),vr,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=g.trigger(this._element,this.constructor.eventName("show")),n=(j(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!n)return;this._disposePopper();const s=this._getTipElement();this._element.setAttribute("aria-describedby",s.getAttribute("id"));const{container:l}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(l.append(s),g.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(s),s.classList.add(bi),"ontouchstart"in document.documentElement)for(const c of[].concat(...document.body.children))g.on(c,"mouseover",be);this._queueCallback(()=>{g.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!g.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(bi),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))g.off(t,"mouseover",be);this._activeTrigger.click=!1,this._activeTrigger[bn]=!1,this._activeTrigger[Nt]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),g.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const n=this._getTemplateFactory(t).toHtml();if(!n)return null;n.classList.remove(vn,bi),n.classList.add(`bs-${this.constructor.NAME}-auto`);const s=(l=>{do{l+=Math.floor(1e6*Math.random())}while(document.getElementById(l));return l})(this.constructor.NAME).toString();return n.setAttribute("id",s),this._isAnimated()&&n.classList.add(vn),n}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Ms({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Ys]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(vn)}_isShown(){return this.tip&&this.tip.classList.contains(bi)}_createPopper(t){const n=H(this._config.placement,[this,t,this._element]),s=Us[n.toUpperCase()];return gn(this._element,t,this._getPopperConfig(s))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(n=>Number.parseInt(n,10)):"function"==typeof t?n=>t(n,this._element):t}_resolvePossibleFunction(t){return H(t,[this._element,this._element])}_getPopperConfig(t){const n={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:s=>{this._getTipElement().setAttribute("data-popper-placement",s.state.placement)}}]};return{...n,...H(this._config.popperConfig,[void 0,n])}}_setListeners(){const t=this._config.trigger.split(" ");for(const n of t)if("click"===n)g.on(this._element,this.constructor.eventName("click"),this._config.selector,s=>{this._initializeOnDelegatedTarget(s).toggle()});else if("manual"!==n){const s=this.constructor.eventName(n===Nt?"mouseenter":"focusin"),l=this.constructor.eventName(n===Nt?"mouseleave":"focusout");g.on(this._element,s,this._config.selector,c=>{const u=this._initializeOnDelegatedTarget(c);u._activeTrigger["focusin"===c.type?bn:Nt]=!0,u._enter()}),g.on(this._element,l,this._config.selector,c=>{const u=this._initializeOnDelegatedTarget(c);u._activeTrigger["focusout"===c.type?bn:Nt]=u._element.contains(c.relatedTarget),u._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},g.on(this._element.closest(".modal"),vr,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,n){clearTimeout(this._timeout),this._timeout=setTimeout(t,n)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const n=fe.getDataAttributes(this._element);for(const s of Object.keys(n))Gs.has(s)&&delete n[s];return t={...n,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:R(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[n,s]of Object.entries(this._config))this.constructor.Default[n]!==s&&(t[n]=s);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const n=nt.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}})}}V(nt);const Vs=".popover-header",Js=".popover-body",Hs={...nt.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},Ws={...nt.DefaultType,content:"(null|string|element|function)"};class yi extends nt{static get Default(){return Hs}static get DefaultType(){return Ws}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Vs]:this._getTitle(),[Js]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const n=yi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}})}}V(yi);const yn=".bs.scrollspy",qs=`activate${yn}`,br=`click${yn}`,Ks=`load${yn}.data-api`,kt="active",wn="[href]",yr=".nav-link",Qs=`${yr}, .nav-item > ${yr}, .list-group-item`,Zs={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},eo={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Bt extends ae{constructor(t,n){super(t,n),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Zs}static get DefaultType(){return eo}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=R(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map(n=>Number.parseFloat(n))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(g.off(this._config.target,br),g.on(this._config.target,br,wn,t=>{const n=this._observableSections.get(t.target.hash);if(n){t.preventDefault();const s=this._rootElement||window,l=n.offsetTop-this._element.offsetTop;if(s.scrollTo)return void s.scrollTo({top:l,behavior:"smooth"});s.scrollTop=l}}))}_getNewObserver(){return new IntersectionObserver(n=>this._observerCallback(n),{root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin})}_observerCallback(t){const n=u=>this._targetLinks.get(`#${u.target.id}`),s=u=>{this._previousScrollData.visibleEntryTop=u.target.offsetTop,this._process(n(u))},l=(this._rootElement||document.documentElement).scrollTop,c=l>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=l;for(const u of t){if(!u.isIntersecting){this._activeTarget=null,this._clearActiveClass(n(u));continue}const p=u.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(c&&p){if(s(u),!l)return}else c||p||s(u)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=y.find(wn,this._config.target);for(const n of t){if(!n.hash||e(n))continue;const s=y.findOne(decodeURI(n.hash),this._element);Je(s)&&(this._targetLinks.set(decodeURI(n.hash),n),this._observableSections.set(n.hash,s))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(kt),this._activateParents(t),g.trigger(this._element,qs,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))y.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(kt);else for(const n of y.parents(t,".nav, .list-group"))for(const s of y.prev(n,Qs))s.classList.add(kt)}_clearActiveClass(t){t.classList.remove(kt);const n=y.find(`${wn}.${kt}`,t);for(const s of n)s.classList.remove(kt)}static jQueryInterface(t){return this.each(function(){const n=Bt.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t]()}})}}g.on(window,Ks,()=>{for(const r of y.find('[data-bs-spy="scroll"]'))Bt.getOrCreateInstance(r)}),V(Bt);const rt=".bs.tab",to=`hide${rt}`,io=`hidden${rt}`,no=`show${rt}`,ro=`shown${rt}`,so=`click${rt}`,oo=`keydown${rt}`,ao=`load${rt}`,lo="ArrowLeft",wr="ArrowRight",co="ArrowUp",kr="ArrowDown",kn="Home",Cr="End",st="active",Cn="show",Er=".dropdown-toggle",$n=`:not(${Er})`,Fr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',En=`.nav-link${$n}, .list-group-item${$n}, [role="tab"]${$n}, ${Fr}`,uo=`.${st}[data-bs-toggle="tab"], .${st}[data-bs-toggle="pill"], .${st}[data-bs-toggle="list"]`;class ot extends ae{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),g.on(this._element,oo,n=>this._keydown(n)))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const n=this._getActiveElem(),s=n?g.trigger(n,to,{relatedTarget:t}):null;g.trigger(t,no,{relatedTarget:n}).defaultPrevented||s&&s.defaultPrevented||(this._deactivate(n,t),this._activate(t,n))}_activate(t,n){t&&(t.classList.add(st),this._activate(y.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),g.trigger(t,ro,{relatedTarget:n})):t.classList.add(Cn)},t,t.classList.contains("fade")))}_deactivate(t,n){t&&(t.classList.remove(st),t.blur(),this._deactivate(y.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),g.trigger(t,io,{relatedTarget:n})):t.classList.remove(Cn)},t,t.classList.contains("fade")))}_keydown(t){if(![lo,wr,co,kr,kn,Cr].includes(t.key))return;t.stopPropagation(),t.preventDefault();const n=this._getChildren().filter(l=>!e(l));let s;if([kn,Cr].includes(t.key))s=n[t.key===kn?0:n.length-1];else{const l=[wr,kr].includes(t.key);s=Ae(n,t.target,l,!0)}s&&(s.focus({preventScroll:!0}),ot.getOrCreateInstance(s).show())}_getChildren(){return y.find(En,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,n){this._setAttributeIfNotExists(t,"role","tablist");for(const s of n)this._setInitialAttributesOnChild(s)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const n=this._elemIsActive(t),s=this._getOuterElement(t);t.setAttribute("aria-selected",n),s!==t&&this._setAttributeIfNotExists(s,"role","presentation"),n||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const n=y.getElementFromSelector(t);n&&(this._setAttributeIfNotExists(n,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(n,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,n){const s=this._getOuterElement(t);if(!s.classList.contains("dropdown"))return;const l=(c,u)=>{const p=y.findOne(c,s);p&&p.classList.toggle(u,n)};l(Er,st),l(".dropdown-menu",Cn),s.setAttribute("aria-expanded",n)}_setAttributeIfNotExists(t,n,s){t.hasAttribute(n)||t.setAttribute(n,s)}_elemIsActive(t){return t.classList.contains(st)}_getInnerElement(t){return t.matches(En)?t:y.findOne(En,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const n=ot.getOrCreateInstance(this);if("string"==typeof t){if(void 0===n[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);n[t]()}})}}g.on(document,so,Fr,function(r){["A","AREA"].includes(this.tagName)&&r.preventDefault(),e(this)||ot.getOrCreateInstance(this).show()}),g.on(window,ao,()=>{for(const r of y.find(uo))ot.getOrCreateInstance(r)}),V(ot);const Xe=".bs.toast",ho=`mouseover${Xe}`,po=`mouseout${Xe}`,go=`focusin${Xe}`,fo=`focusout${Xe}`,mo=`hide${Xe}`,_o=`hidden${Xe}`,vo=`show${Xe}`,bo=`shown${Xe}`,wi="show",ki="showing",yo={animation:"boolean",autohide:"boolean",delay:"number"},wo={animation:!0,autohide:!0,delay:5e3};class Mt extends ae{constructor(t,n){super(t,n),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return wo}static get DefaultType(){return yo}static get NAME(){return"toast"}show(){g.trigger(this._element,vo).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove("hide"),this._element.classList.add(wi,ki),this._queueCallback(()=>{this._element.classList.remove(ki),g.trigger(this._element,bo),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(g.trigger(this._element,mo).defaultPrevented||(this._element.classList.add(ki),this._queueCallback(()=>{this._element.classList.add("hide"),this._element.classList.remove(ki,wi),g.trigger(this._element,_o)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(wi),super.dispose()}isShown(){return this._element.classList.contains(wi)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,n){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=n;break;case"focusin":case"focusout":this._hasKeyboardInteraction=n}if(n)return void this._clearTimeout();const s=t.relatedTarget;this._element===s||this._element.contains(s)||this._maybeScheduleHide()}_setListeners(){g.on(this._element,ho,t=>this._onInteraction(t,!0)),g.on(this._element,po,t=>this._onInteraction(t,!1)),g.on(this._element,go,t=>this._onInteraction(t,!0)),g.on(this._element,fo,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const n=Mt.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](this)}})}}return dt(Mt),V(Mt),{Alert:Ee,Button:je,Carousel:Oe,Collapse:Be,Dropdown:_e,Modal:it,Offcanvas:Pe,Popover:yi,ScrollSpy:Bt,Tab:ot,Toast:Mt,Tooltip:nt}}()}}]);