PageSourceSearch

https://www.joyce.org/dist/vite/site/js/wishlist_count_controller.BktXfgga.js

js joyce.org collected 2026-09-24 18:23:21 UTC 1,793 bytes, 2 lines download raw bytes

1import{C as d,d as c,a as u}from"./site.B0Uxz9u8.js";import{f as p}from"./fetchData.E2TeMMfN.js";import{w as f,a as w,b as m}from"./datalayer.lb6jFKVC.js";import{u as y}from"./createStore.Dm90ZrIA.js";import{isWishlistResponseMap as V}from"./wishlist_add_button_controller.Dw4KE8J5.js";import"./password-strength.AqUmoxgQ.js";const i=class i extends d{constructor(){super(...arguments),this.fetchFn=p}async connect(){y(this),this.loggedInValue===!0&&(await this.retrieveWishlist(),Object.keys(this.wishlistRetryValue).length>0&&await this.applyRetryIfExists())}async retrieveWishlist(){const t=await this.fetchFn(this.retrieveEndpointValue);t.ok&&this.setWishlistValue(t.data)}async applyRetryIfExists(){const t=this.wishlistRetryValue;if(typeof(t==null?void 0:t.id)>"u"){console.warn("No retry ID found");return}const s=new URLSearchParams;s.append("id",t.id);const e=this.wishlistRetryContextValue==="order"?this.orderSendEndpointValue:this.sendEndpointValue,o=this.wishlistRetryContextValue==="order",a=await this.fetchFn(e,"POST",{body:s});if(a.ok&&V(a.data)){const h=Object.entries(a.data).filter(([n,l])=>l===!0).map(([n])=>Number(n));o?window.location.reload():c(u.WishlistModalOpen,{modalId:"wishlistModal",title:(t==null?void 0:t.title)??""}),this.setWishlistValue([...this.wishlistValue,...h])}this.setWishlistRetryContextValue(""),this.setWishlistRetryValue({})}onWishlistUpdate(){var s;const t=((s=this.wishlistValue)==null?void 0:s.length)??0;t>0?this.counterTargets.forEach(e=>e.innerText=`(${t})`):this.counterTargets.forEach(e=>e.innerText=null)}};i.stores=[f,w,m],i.values={retrieveEndpoint:String,sendEndpoint:String,orderSendEndpoint:String,loggedIn:Boolean},i.targets=["counter"];let r=i;export{r as default};
2//# sourceMappingURL=wishlist_count_controller.BktXfgga.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.