PageSourceSearch

https://www.booksellers.ca/_next/static/chunks/2941-e34759b10a623793.js

js booksellers.ca collected 2026-09-26 08:47:40 UTC 26,533 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="09923ebb-4ed3-4533-9d1a-825d52a3f536",e._sentryDebugIdIdentifier="sentry-dbid-09923ebb-4ed3-4533-9d1a-825d52a3f536")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2941],{18725:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(37876),n=s(14232),l=s(75975),i=s(21468);let r=(0,n.memo)(e=>{let t;if(!e.link&&!e.onClick&&!e.children)return null;let s=["btn",e.className],n=e.iconPlacement?e.iconPlacement:"right";e.withArrow&&(t="›",s.push("btn--arrow"),s.push("btn--icon")),e.icon&&!e.isLoading&&(t=(0,a.jsx)(i.A,{value:e.icon}),s.push("btn--icon")),e.isLoading&&(s.push("btn--loading"),s.push("btn--icon"),t=(0,a.jsx)(i.A,{value:"spinner",className:"animate-spin"})),(e.withArrow||t)&&s.push(`btn--icon--${n}`);let r=(0,a.jsxs)(a.Fragment,{children:[t&&"left"===n?(0,a.jsx)("span",{className:"btn__icon",children:t}):null,e.children&&!e.isLoading?(0,a.jsx)("span",{className:"btn__text",children:e.children}):null,t&&"right"===n?(0,a.jsx)("span",{className:"btn__icon",children:t}):null]});return e.onClick?e.link?(0,a.jsx)(l.A,{href:e.link,title:e.title,"aria-label":e.ariaLabel,className:s.join(" "),style:e.style,onClick:e.onClick,"aria-disabled":e.isLoading,children:r}):(0,a.jsx)("button",{type:"button",disabled:e.disabled||e.isLoading,title:e.title,"aria-label":e.ariaLabel,className:s.join(" "),style:e.style,onClick:e.onClick,"aria-busy":e.isLoading,"aria-disabled":!!e.ariaDisabled||void 0,children:r}):e.external?(0,a.jsx)(l.A,{href:e.link,title:e.title,"aria-label":e.ariaLabel,className:s.join(" "),style:e.style,target:"_blank",rel:"noreferrer noopener",children:r}):(0,a.jsx)(l.A,{href:e.link,title:e.title,"aria-label":e.ariaLabel,className:s.join(" "),style:e.style,children:r})})},26399:(e,t,s)=>{s.d(t,{S:()=>i});var a=s(14232),n=s(99897),l=s(44420);let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"book",{specialClassification:s}=(0,l.r)(e,t);return(0,a.useMemo)(()=>(0,n.kK)(s),[s])}},36853:(e,t,s)=>{s.d(t,{A:()=>y});var a=s(37876),n=s(14232),l=s(96010),i=s(35088),r=s(41991),o=s(80998),c=s(44420),d=s(8269),u=s(21356),m=s(1648),b=s(74619),h=s(25117),p=s(12212),f=s(49023),g=s(80713),x=s(37257),k=s(44013),j=s(52696),_=s(32435);let N=(0,n.memo)(e=>{let{item:t,itemType:s,onClose:i}=e,{t:r}=(0,p.B)(),{isInstitutional:o,institutionalBookstores:d}=(0,m.A)(),{allBookstores:u}=(0,h.Z)(),[b,f]=(0,n.useState)(null),[g,N]=(0,n.useState)(!0),$=(0,n.useCallback)(()=>N(e=>
1!e),[]),[v]=(0,k.A)(x.$v.USER_POSITION,null),[y,A]=(0,n.useState)(null);(0,n.useEffect)(()=>{A(v?.position||v||null)},[v]);let{isLoading:C,bookstoresAvailability:w,getQuantityAt:O,getStatusAt:M,getMessageAt:R,isInStockAt:E}=(0,c.r)(t?.id,s),S=(0,n.useMemo)(()=>u?u.filter(e=>w.some(t=>{let{id:s}=t;return s===e.id})):[],[u,w]),D=(0,n.useMemo)(()=>S.filter(e=>!!o||!g||E(e.id)),[S,o,g,E]),F=(0,n.useMemo)(()=>S.filter(e=>o&&g?d.some(t=>{let{id:s}=t;return s===e.id}):(!!o||!g)&&(!o||!!g)||E(e.id)).sort((e,t)=>null===y?0:parseFloat((0,_.K)({lat:parseFloat(e.address.latitude),lng:parseFloat(e.address.longitude)},y))>parseFloat((0,_.K)({lat:parseFloat(t.address.latitude),lng:parseFloat(t.address.longitude)},y))?1:-1),[S,o,g,d,y,E]),I=(0,n.useMemo)(()=>F.map(e=>{let t=null!==y?(0,_.K)({lat:parseFloat(e.address.latitude),lng:parseFloat(e.address.longitude)},y):null,s=O(e.id),n=M(e.id),l=R(e.id,!0);if(E(e.id)){let e=s>6?r("product.view.modalstock.sixmore"):s;l=`${l} (${e})`}return(0,a.jsx)("li",{children:(0,a.jsxs)("button",{type:"button",id:`item-${e.id}`,title:e.organization.name,className:`marker-list-item ${b&&b.id===e.id?"active":""}`,onClick:()=>{f(e)},children:[(0,a.jsxs)("div",{className:"marker-list-item__head",children:[(0,a.jsx)("strong",{children:e.name}),(0,a.jsx)("span",{children:null!==t?` – ${t.toFixed(0)} km`:""})]}),(0,a.jsx)("div",{className:"marker-list-item__infos",children:`${e.address.street_address} ${e.address.city} ${e.address.postal_code}`}),(0,a.jsx)("span",{className:`status status--${n||"outofstock"}`,children:l})]})},e.id)}),[F,y,O,M,R,E,b,r]);return t?.id?(0,a.jsxs)("div",{className:"store-selector",children:[(0,a.jsx)(j.A,{onPositionChange:A,bookstores:D}),(0,a.jsxs)("label",{className:"d-flex align-items-center mt-3",children:[(0,a.jsxs)("div",{className:"switch",children:[(0,a.jsx)("input",{type:"checkbox",checked:g,onChange:$}),(0,a.jsx)("span",{className:"switch__slider"})]}),(0,a.jsx)("div",{className:`switch__text${g?" switch__text--active":""}`,children:o?r("product.stocks.locator.showhideinsti"):r("product.stocks.locator.showhide")})]}),(0,a.jsx)("div",{className:"store-selector__popup__results",children:(0,a.jsxs)("ul",{className:"marker-list",children:[C&&(0,a.jsx)(l.A,{count:1,duration:2,height:70,baseColor:"#FFF5F0"}),I]})}),(0,a.jsx)("div",{className:"store-selector__popup__actions pt-3",children:i&&(0,a.jsx)("button",{type:"button",className:"btn btn--outline btn--outline--forest text-center w-100",onClick:i,children:r("product.view.modalstock.cancel")})})]}):null});var $=s(79881);let v=new Set([i.XQ.ORDER,i.XQ.PREORDER,i.XQ.COMING_SOON]),y=(0,n.memo)(e=>{let{product:t,currentVariation:s,hideBookmark:x,itemType:k="book"}=e,{t:j,locale:_}=(0,p.B)(),{isAuthenticated:y}=(0,u.A)(),{isInstitutional:A,institutionalBookstores:C}=(0,m.A)(),{allBookstores:w,currStore:O}=(0,h.Z)(),M=(0,n.useRef)(),R=(0,b.A)(M,{rootMargin:50,once:!0}),E=(0,n.useMemo)(()=>s.id,[s.id]),{isDownloadable:S,isPrintOnDemand:D}=(0,d.o)(s),F=(0,n.useMemo)(()=>(0,i.Fk)(t),[t]),{isLoading:I,hasAvailabilityData:P,isInStock:T,isOrderable:L,isPreorderable:X,status:B,message:Q,isAvailabilityLimited:Y,isAvailableForPurchase:U,distributorDeliveryTime:Z,isInStockAtFavoriteBookstore:V,isOrderableAtFavoriteBookstore:H,isPreorderableAtFavoriteBookstore:G,messageAtFavoriteStore:z,bookstoresWithStock:q,getBookstoresWithStatus:W,getMessageAt:K}=(0,c.r)(E,k,R),J=(0,n.useMemo)(()=>{if(!P)return{classNameStatus:null,displayedMessage:null,isPOD:D};let e=i.XQ.UNAVAILABLE,t=O?z:Q;if(A&&C.length>0)if(!v.has(B))return{classNameStatus:null,displayedMessage:null,isPOD:D};else e=B,t=Q;return S&&U||V?e=i.XQ.IN_INVENTORY:H||!O&&L?e=i.XQ.ORDER:G||!O&&X?e=i.XQ.PREORDER:B===i.XQ.COMING_SOON&&(e=i.XQ.COMING_SOON,t=Q),D&&(e===i.XQ.ORDER||e===i.XQ.PREORDER)&&(t=Z?j("product.stocks.statuses.with_delay",{status:j("product.stocks.statuses.print_on_demand"),delay:Z}):j("product.stocks.statuses.print_on_demand")),{classNameStatus:e,displayedMessage:t,isPOD:D}},[P,D,S,U,V,H,L,G,X,B,O,z,Q,A,C.length,Z,j]),ee=(0,n.useMemo)(()=>J.classNameStatus!==i.XQ.PREORDER&&J.classNameStatus!==i.XQ.COMING_SOON?null:(0,a.jsxs)("span",{className:"span--weight--regular",children:[(0,a.jsx)("br",{}),(0,r.PR)(F)?j("product.stocks.parution",{date:F}):j("product.stocks.tobedetermined")]}),[J.classNameStatus,F,j]),et=(0,n.useMemo)(()=>
1{if(!P)return null;if(A&&C.length>0&&!v.has(B)){let e=W(i.ou),s=e.slice(0,4);return(0,a.jsxs)("div",{className:"mb-2",children:[0===e.length?(0,a.jsx)("div",{className:`status status--${i.XQ.OUT_OF_STOCK}`,children:(0,a.jsx)("p",{children:j(C.length>1?"product.stocks.statuses.outofstockinmany":"product.stocks.statuses.outofstockin")})}):s.map(e=>(0,a.jsx)("div",{className:"mb-1",children:(0,a.jsx)("div",{className:`status status--${i.XQ.IN_INVENTORY}`,children:(0,a.jsx)("p",{children:K(e.id)})})},`bookstore-${e.id}`)),C&&C.length>1&&w&&w.length>1&&(0,a.jsxs)($.A,{className:"modal-wrapper--thin",children:[(0,a.jsx)($.A.Button,{ariaLabel:j("product.stocks.button_verify_others_full",{name:(0,o.bT)(t.name,_)}),className:"link link--weight--smbold link--fs-14",children:j("product.stocks.button_verify_others")}),(0,a.jsx)($.A.Content,{title:j("product.stocks.locator.title"),children:(0,a.jsx)(N,{item:t,itemType:k})})]})]})}if(0===q.length)return null;let e=q.length,s=e>1?"instockinX":"instockinXsingle",n="button_verify";return(V&&(s=--e>1?"instockinXothers":"instockinXotherssingle",e>1&&(n="button_verify_others")),0===e)?null:(0,a.jsx)("div",{className:`status status--${i.XQ.IN_INVENTORY}`,children:(0,a.jsxs)("p",{children:[j(`product.stocks.statuses.${s}`,{count:e}),(0,a.jsxs)($.A,{className:"modal-wrapper--thin",children:[(0,a.jsx)($.A.Button,{ariaLabel:j(`product.stocks.${n}_full`,{name:(0,o.bT)(t.name,_)}),className:"link link--weight--smbold",children:j(`product.stocks.${n}`)}),(0,a.jsx)($.A.Content,{title:j("product.stocks.locator.title"),children:(0,a.jsx)(N,{item:t,itemType:k})})]})]})})},[P,w,q.length,V,B,A,C,W,K,j,_,t,k]),es=(0,n.useMemo)(()=>{let{classNameStatus:e,displayedMessage:t,isPOD:s}=J;return null===e?et:S&&U?(0,a.jsx)("div",{className:`status status--${e}`,children:(0,a.jsx)("p",{children:j("product.stocks.statuses.download")})}):!T||O||s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:`status status--${e}`,children:(0,a.jsxs)("p",{children:[t,!s&&ee]})}),!s&&et]}):et},[S,U,J,T,O,j,ee,et]),ea=(0,n.useMemo)(()=>({minHeight:"24px"}),[]),en=(0,n.useMemo)(()=>({fontSize:"13px"}),[]),el=(0,n.useMemo)(()=>Y?(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)("small",{className:"product__variation__mention",style:en,children:j("product.view.distributoravail")})}):null,[Y,j,en]);return w&&!I&&R?(0,a.jsxs)("div",{ref:M,children:[(0,a.jsxs)("div",{className:"product__availability",style:ea,children:[es,el]}),(0,a.jsxs)("div",{className:"product__actions actions",children:[(0,a.jsx)(g.A,{product:t,currentVariation:s,itemType:k}),y&&void 0===x&&(0,a.jsx)(f.A,{product:t,type:k})]})]}):(0,a.jsxs)("div",{ref:M,children:[(0,a.jsx)(l.A,{count:2,duration:2,height:20,width:300,baseColor:"#FFF5F0"}),(0,a.jsx)(l.A,{duration:2,height:50,width:200,baseColor:"#FFF5F0"})]})})},43361:(e,t,s)=>{s.d(t,{A:()=>h});var a=s(37876),n=s(14232),l=s(62867),i=s(80998),r=s(3789),o=s(45625),c=s(25117),d=s(46037),u=s(12212);let m={src:"/_next/static/media/liq-share-en.1091d0ce.png"},b={src:"/_next/static/media/liq-share-fr.6ab958bb.png"},h=(0,n.memo)(e=>{let{title:t="",description:s,route:h,slug:p="",image:f,selfCanonical:g=!1,overwrites:x={}}=e,{t:k}=(0,u.B)(),{domains:j,seoTitle:_,seoDescription:N,canonicalUrls:$,subdomainPrefix:v,image:y}=(e=>{let{title:t="",description:s,route:a,slug:l="",image:h}=e,{t:p,locale:f}=(0,u.B)(),{subdomain:g,organization:x}=(0,c.Z)(),{currentHost:k}=(0,o.n)(),j=(0,n.useMemo)(()=>{if(k){let e=(0,r.Bj)(k);return`https://${e}`}let e=(0,r.HU)(f);return`https://www.${e}`},[k,f]),_=(0,n.useMemo)(()=>{let e=(0,r.KV)(k||window.location.host);return{base:(0,r.HU)(f),current:(0,r.YT)(f,{keepWww:e}),fr:(0,r.YT)(d.YZ.FRENCH,{keepWww:e}),en:(0,r.YT)(d.YZ.ENGLISH,{keepWww:e})}},[f,k]),N=(0,n.useMemo)(()=>{if(!a)return{current:"/",fr:"/",en:"/"};let e=e=>{let t=p(e);return!t||t===e||t.startsWith("routes.")?"/":`/${t}`},t=e(`routes.${a}`),s=f===d.YZ.FRENCH?t:e(`routes.${a}-trans`),n=f===d.YZ.FRENCH?e(`routes.${a}-trans`):t;return{current:t,fr:s,en:n}},[a,f,p]),$=(0,n.useCallback)((e,t,s,a)=>{let n=l;for(let r of("object"==typeof l&&(n=(0,i.bT)(l,e)),[t,s,a].map(e=>e.replace(/^\//,"")))){if(!r)continue;let e=[`/${r}`,r].find(e=>n===e||n.startsWith(`${e}/`));if(e){n=n.substring(e.length);break}}return n.startsWith("/")?n:n?`/${n}`:""},[l]),v=(0,n.useMemo)(()=>{let e=`${p("meta.prefix")}${t}`;if(g&&x){let t=x.name.toLowerCase().includes("librairie")?"":p("meta.sudomain.prefix");e=`${e} | ${t}${x.name}${p("meta.suffixsubdomain")}`}else e=`${e}${p("meta.suffix")}`;return e.startsWith(" | ")?e.substring(3):e},[g,x,t,p]),y=(0,n.useMemo)(()=>s??p("meta.default_description"),[s,p]),A=(0,n.useMemo)(()=>{let e=$(f,N.current,N.fr,N.en),t=$(d.YZ.FRENCH,N.current,N.fr,N.en),s=$(d.YZ.ENGLISH,N.current,N.fr,N.en);return{current:`${N.current}${e}`.replace(/\/\//g,"/"),fr:`${N.fr}${t}`.replace(/\/\//g,"/"),en:`${N.en}${s}`.replace(/\/\//g,"/")}}
1,[N,$,f]),C=(0,n.useMemo)(()=>{if(h&&"string"==typeof h){if(h.startsWith("http")||h.startsWith("//"))return h;let e=h.startsWith("/")?h:`/${h}`;return`${j}${e}`}let e=f!==d.YZ.FRENCH?m.src:b.src;return`${j}${e}`},[h,f,j]);return{domains:_,routes:N,seoTitle:v,seoDescription:y,canonicalUrls:A,processedSlug:$,subdomainPrefix:g?`${g}.`:_.base===_.current?"www.":"",image:C}})({title:t,description:s,route:h,slug:p,image:f}),A=j.base===j.current?"www.":"";return(0,a.jsx)(l.bV,{title:_,description:N,canonical:`https://${g?v:A}${j.current}${$.current}`,languageAlternates:[{hrefLang:"x-default",href:`https://${v}${j.fr}${$.fr}`},{hrefLang:"fr",href:`https://${v}${j.fr}${$.fr}`},{hrefLang:"en",href:`https://${v}${j.en}${$.en}`}],openGraph:{title:_,description:N,images:[{url:y,alt:_,type:"image/png"}],site_name:k("meta.default_title")},...x})})},49023:(e,t,s)=>{s.d(t,{A:()=>d});var a=s(37876);s(14232);var n=s(12212),l=s(21468),i=s(80648),r=s(93347),o=s(23685),c=s(1648);let d=e=>{let{t,locale:s}=(0,n.B)(),{isInstitutional:d}=(0,c.A)(),[u,m]=(0,r.A)(!1),b=(0,o.A)(()=>{m(!1)});return(0,a.jsxs)("div",{className:"position-relative d-inline-block",ref:b,children:[void 0!==e.small&&e.small?(0,a.jsx)("button",{className:"btn btn--bookmark btn--bookmark--small btn--outline action",title:t("bookmarks.actions.add"),onClick:()=>m(!u),children:(0,a.jsx)(l.A,{value:"bookmark"})}):(0,a.jsxs)("button",{className:"btn btn--bookmark btn--outline action ms-3",title:t("bookmarks.actions.add"),onClick:()=>m(!u),children:[(0,a.jsx)("span",{className:"btn__icon",children:(0,a.jsx)(l.A,{value:"bookmark"})}),t(d?"bookmarks.actions.addinsti":"bookmarks.actions.add"),(0,a.jsx)("span",{className:"btn--bookmark__toggler",children:u?(0,a.jsx)(l.A,{value:"dropdown-up"}):(0,a.jsx)(l.A,{value:"dropdown"})})]}),u&&e.product&&(0,a.jsx)(i.A,{product:e.product,productName:"product"===e.type?e.product.name[s]:e.product.name,setOpenBookmarkDropdown:m,mode:"add",type:e.type})]})}},52696:(e,t,s)=>{s.d(t,{A:()=>f});var a=s(37876),n=s(14232),l=s(57142),i=s(37257),r=s(2847),o=s(33850),c=s(21356),d=s(44013),u=s(93347),m=s(25117),b=s(12212),h=s(21468),p=s(40898);let f=e=>{let{onBookstoreSelection:t,onPositionChange:s,bookstores:f}=e,{t:g}=(0,b.B)(),{isAuthenticated:x}=(0,c.A)(),{allBookstores:k}=(0,m.Z)(),{loadAddresses:j}=(0,o.A)(),{isSupported:_,location:N,error:$}=(()=>{let[e,t]=(0,u.A)(!1),[s,a]=(0,u.A)(null),[l,i]=(0,n.useState)(null);return(0,n.useEffect)(()=>{if(!navigator.geolocation){t(!1),i("Geolocation is not supported by this browser.");return}t(!0)},[]),(0,n.useEffect)(()=>{e&&null===s&&navigator.geolocation.getCurrentPosition(e=>{a(e.coords)},e=>{i(e.message)})},[e,s]),{isSupported:e,location:s,error:l,refresh:()=>{a(null),i(null)}}})(),[v,y]=(0,d.A)(i.$v.USER_POSITION,null),[A,C]=(0,n.useState)(!1),[w,O]=(0,n.useState)(!1),[M,R]=(0,n.useState)(!1),[E,S]=(0,n.useState)(""),D=(0,n.useMemo)(()=>f??k,[f,k]),F=(0,n.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#marker-list li:first-child";setTimeout(()=>{let t=document.querySelector(e);t&&(0,r.yx)(t,".store-selector__popup__results")},150)},[]),I=(0,n.useCallback)(()=>{if(_&&N&&!$){let e={lat:N.latitude,lng:N.longitude};y({name:g("utils.geoloc"),position:e}),s&&s(e),F()}},[_,N,$,s,F,g,y]);(0,n.useEffect)(()=>{_&&N&&!$&&!A&&(C(!0),null===v&&I())},[_,N,$,A,v,I]),(0,n.useEffect)(()=>{!w&&x&&null===v&&j().then(e=>{if(!Array.isArray(e))return;let t=e.find(e=>"billing"===e.type),a=t?.postal_code;a&&(0,l.V)(a).then(e=>{if(e?.latitude&&e?.longitude){let t={lat:e.latitude,lng:e.longitude};y({name:a,position:t}),s&&s(t),F()}}).catch(e=>{console.error("Error geocoding user address:",e)})}).catch(()=>{}),O(!0)},[w,x,v,j,s,F,y]);let P=(0,n.useCallback)(e=>{let a={lat:e.address.latitude,lng:e.address.longitude};t&&t(e),y({name:e.name,position:a}),R(!1),s&&s(a),F(`#marker-list li #item-${e.id}`)},[t,s,F,y]),T=(0,n.useCallback)(e=>{s&&s(e),F()},[s,F]),L=(0,n.useCallback)((e,t,s,a)=>{t&&R(!0),s&&a&&v?.name!==s&&y({name:s,position:a})},[v,y]),X=(0,n.useCallback)(()=>{S(v?.name===g("utils.geoloc")?"":v?.name||""),R(!0),y(null)},[v,y,g]);return v&&!M?(0,a.jsx)("div",{className:"gsearchbox",children:(0,a.jsxs)("div",{className:"border-bottom pb-2 gsearchbox__userposition",children:[(0,a.jsx)("p",{className:"gsearchbox__label",children:v.name===g("utils.geoloc")?g("header.storeselector.myposition"):g("catalog.searchfor")}),(0,a.jsxs)("span",{children:[v.name,(0,a.jsx)("button",{type:"button",className:"link link--tomato",onClick:X,children:g("utils.modify")})]})]})}):(0,a.jsxs)("div",{className:"gsearchbox",children:[(0,a.jsx)("p",{className:"gsearchbox__label",children:g("header.storeselector.enterzip2")}),(0,a.jsx)(p.A,{bookstores:D,onBookstoreSelect:P,onPositionChange:T,onSearchChange:L,inputClassName:"pe-4",initialValue:E}),A&&(0,a.jsxs)("button",{type:"button",className:"btn link link--tomato link--underline",onClick:I,children:[(0,a.jsx)(h.A,{value:"localize"}),"\xa0",(0,a.jsx)("span",{className:"text-decoration-underline link--c-tomato",children:g("header.storeselector.localize")})]})]})}},80713:(e,t,s)=>{s.d(t,{A:()=>N});var a=s(37876),n=s(14232),l=s(8440),i=s(56720),r=s(93153),o=s(12212),c=s(18725),d=s(65975),u=s(92029),m=s(87329),b=s(70396
1),h=s(16095),p=s(21356),f=s(1648),g=s(8269),x=s(44420),k=s(26399),j=s(80998),_=s(35088);let N=(0,n.memo)(e=>{let{product:t,currentVariation:s,itemType:N="book",hidePickupAlert:$=!1}=e,{t:v,locale:y}=(0,o.B)(),{isAuthenticated:A}=(0,p.A)(),{isInstitutional:C}=(0,f.A)(),w=(0,g.o)(s),O="book"!==N,M=!O&&w.isDownloadable,R=!!O||w.isPhysical,E=!O&&w.isPrintOnDemand,S=O?null:w.format,{status:D,isDistributorAvailable:F,isAvailableForPurchase:I,isPickupOnly:P,isLoading:T}=(0,x.r)(s.id,N),{cart:L}=(0,b._)(),{isAdding:X,addToCart:B}=(e=>{let{product:t,currentVariation:s}=e,{t:a,locale:l}=(0,o.B)(),{isAuthenticated:i}=(0,p.A)(),{isInstitutional:r}=(0,f.A)(),{addOrIncrementItem:c}=(0,b._)(),[d,u]=(0,n.useState)(!1);return{isAdding:d,addToCart:(0,n.useCallback)(e=>{let{type:n,notes:o="",gtmItems:d}=e;return u(!0),c(s.id,n,!1,s.qty,o).then(e=>{e&&(0,h.RR)({event:h.bk.ADD_TO_CART,clientType:(0,h.oV)(i,r),ecommerce:{currency:"CAD",value:s.price,items:d??[{...t}]}},{},void 0,l,a)}).finally(()=>u(!1))},[c,s,t,i,r,l,a])}})({product:t,currentVariation:s}),{specialTypes:Q,requiresAddToCartConsent:Y}=(0,k.S)(s?.id,N),[U,Z]=(0,n.useState)(!1),V=(0,n.useMemo)(()=>Y?"special_product":M?"digital_book_consent":null,[Y,M]),H=C&&s?.notes?s.notes:"",G=(0,n.useCallback)(e=>[{...t,price:s.price,book_format:e,isbn:s.isbn}],[t,s]),z=(0,n.useCallback)(()=>{B({type:"book",notes:H,gtmItems:G(s.book_format)})},[B,H,G,s]),q=(0,n.useCallback)(()=>"book"===N?I||R?M||Y?void Z(!0):void B({type:"book",notes:H,gtmItems:G(S)}):void r.oR.error(v("minicart.actionscantadded",{name:t.name})):I?void B({type:"product",notes:s.notes,gtmItems:[{...t}]}):void r.oR.error(v("minicart.actionscantadded",{name:t.name})),[B,G,s,S,H,I,M,R,N,t,Y,v]);if(!t)return"";let W=D===_.XQ.PREORDER,K=D===_.XQ.ORDER,J=D===_.XQ.COMING_SOON,ee="book"===N,et=ee&&M&&!!L?.items?.some(e=>{let{isbn:t}=e;return t===s.isbn}),es=ee&&C&&(!R||E),ea=ee?T||!I&&(!R||S===t.book_format)||J||es||et:!I,en="";ee&&C&&E?en=`${v("minicart.pod_institutional_blocked")} ${v("minicart.pod_institutional_contact")}`:et&&(en=v("product.messages.alreadyin"));let el=""!==en,ei=!1,er=!1,eo=v("catalog.actions.addtocart"),ec=v("catalog.actions.addtocartfull",{name:(0,j.bT)(t?.name,y)});"book"===N&&R?W||J?(er=W,eo=v("catalog.actions.preorder"),ec=v("catalog.actions.preorderfull",{name:t.name})):K&&(ei=!0):"product"===N&&(W||J)&&(eo=v("catalog.actions.preorder"));let ed=null;P&&R&&!$&&(ed=(0,a.jsx)(d.A,{type:"info",message:v("shipping.pickup_only"),size:"big",icon:"store"}));let eu="book"===N&&!E&&A&&F&&(ea||ei||er);return(0,a.jsxs)(a.Fragment,{children:[ea?(0,a.jsx)(a.Fragment,{children:el?(0,a.jsx)(l.A,{placement:"top",overlay:(0,a.jsx)(i.A,{id:"tooltip1",children:en}),children:(0,a.jsx)("span",{style:{cursor:"not-allowed"},children:(0,a.jsx)(c.A,{className:"action action--addtocart btn--raised btn--raised--tomato disabled",onClick:e=>e.preventDefault(),ariaLabel:ec,icon:"bag",disabled:!1,ariaDisabled:!0,iconPlacement:"left",children:eo})})}):(0,a.jsx)("span",{style:{cursor:"not-allowed"},className:"mb-2 mb-lg-0 d-inline-block",children:(0,a.jsx)(c.A,{className:"action action--addtocart btn--raised btn--raised--tomato disabled",onClick:e=>e.preventDefault(),ariaLabel:ec,icon:"bag",disabled:!1,ariaDisabled:!0,iconPlacement:"left",children:eo})})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.A,{className:"action action--addtocart btn--raised btn--raised--tomato",title:v("catalog.actions.addtocart"),ariaLabel:ec,onClick:q,icon:"bag",disabled:ea,isLoading:X,iconPlacement:"left",children:eo}),ed]}),eu&&(0,a.jsx)(u.A,{type:"stocks",subjectType:N,subjectId:s.id,withText:!0}),V&&(0,a.jsx)(m.A,{isOpen:U,onOpenChange:Z,warningType:V,isConsentMode:!1,variation:s,specialTypes:Q,onConfirm:z})]})})},87329:(e,t,s)=>{s.d(t,{A:()=>h});var a=s(37876),n=s(14232),l=s(62808),i=s(93153),r=s(34924),o=s(37068),c=s(99897),d=s(12212),u=s(79881),m=s(75975),b=s(51161);let h=(0,n.memo)(e=>{let{isOpen:t,onOpenChange:s,warningType:h="digital_book_consent",isConsentMode:p=!1,variation:f=null,specialTypes:g=[],onConfirm:x,onCancel:k,isConfirming:j=!1}=e,{t:_,locale:N}
1=(0,d.B)(),[$,v]=(0,n.useState)(!1),y="special_product"===h?"special_product.consent":`minicart.${h}`,A=(0,n.useCallback)(async()=>{if(p){v(!0);try{await x(),s(!1)}catch(e){(0,r.vV)("UI",`Error accepting ${h} consent`,e),i.oR.error(_("utils.error"))}finally{v(!1)}}else x(),s(!1)},[p,x,s,h,_]),C=(0,n.useCallback)(()=>{k&&k(),s(!1)},[k,s]),w=(0,n.useMemo)(()=>_(`${y}.title`,{mode:p?"consent":"other"}),[p,y,_]),O=(0,n.useMemo)(()=>{if("digital_book_consent"!==h||!f)return null;let e=f.protection||"watermark",t=`${y}.variation.${e}`,s=_(t);if(!s||s===t)return null;if(s.includes("{{helpUrl}}")||s.includes("{helpUrl}")){let t="";return"fixedlayout"===e||"fixed-layout"===e?t=(0,o.pv)(o.q5.FIXED_LAYOUT_EPUB,N):("adobe-drm"===e||"acs4"===e)&&(t=(0,o.pv)(o.q5.ADOBE_DRM,N)),s.replace(/\{\{?helpUrl\}\}?/g,t)}return s},[h,f,y,_,N]),M=(0,n.useMemo)(()=>{let e=(0,c.PX)(g),t=(0,c.bE)(g);return(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("p",{children:_.rich(`${y}.intro`,{productType:_(`${y}.productType.${e}`),bold:e=>(0,a.jsx)("strong",{children:e}),link:e=>(0,a.jsx)(m.A,{href:`/${_("routes.conditions")}#special-products`,className:"link link--underline",target:"_blank",rel:"noreferrer",children:e})})}),t.length>0&&(0,a.jsx)("ul",{children:t.map(e=>(0,a.jsx)("li",{children:_.rich(`${y}.bullets.${e}`,{bold:e=>(0,a.jsx)("strong",{children:e})})},e))}),(0,a.jsx)("strong",{children:_(`${y}.question`)})]})},[g,y,_]),R=(0,n.useMemo)(()=>{if("special_product"===h)return M;let e=p?"consent":"other";return(0,a.jsxs)("div",{className:"mb-3",children:[_.rich(`${y}.description`,{mode:e,p:e=>(0,a.jsx)("p",{children:e}),bold:e=>(0,a.jsx)("strong",{children:e})}),f&&O&&(0,a.jsx)(b.A,{content:O,as:"div"})]})},[h,M,p,y,_,f,O]),E=(0,n.useMemo)(()=>p?(0,a.jsxs)(u.A.Buttons,{className:"d-flex gap-2 flex-column",children:[(0,a.jsx)(l.$,{onPress:A,className:"btn btn--raised btn--raised--tomato w-100",isDisabled:$||j,children:_(`${y}.accept`)}),(0,a.jsx)(l.$,{onPress:C,className:"btn btn--outline btn--outline--forest w-100",isDisabled:$||j,children:_(`${y}.decline`)})]}):(0,a.jsxs)(u.A.Buttons,{children:[(0,a.jsx)(l.$,{onPress:C,className:"btn btn--outline btn--outline--forest",children:_("minicart.popupcancel")}),(0,a.jsx)(l.$,{onPress:A,className:"btn btn--raised btn--raised--tomato",isDisabled:j,children:_("minicart.addtocart")})]}),[p,y,C,A,$,j,_]);return(0,a.jsx)(u.A,{isOpen:t,onOpenChange:s,className:"modal-wrapper--medium modal-dialog--modalite",isDismissable:!p,children:(0,a.jsxs)(u.A.Content,{title:w,titleIcon:"exclamation",children:[R,E]})})})},89405:(e,t,s)=>{s.d(t,{A:()=>m});var a=s(14232),n=s(93153),l=s(75130),i=s(21356),r=s(93347),o=s(44170),c=s(25117),d=s(12212);let u={book:"book",publisher:"publisher",author:"contributor",contributor:"contributor",collection:"collection",serie:"collection"},m=e=>{let{type:t,subjectType:s,subjectId:m}=e,{t:b}=(0,d.B)(),{subdomain:h,organization:p}=(0,c.Z)(),{isLoading:f}=(0,i.A)(),{isSupported:g,notifications:x,refreshNotifications:k}=(0,o.A)(),j=(0,a.useMemo)(()=>!f&&g,[f,g]),_=(0,a.useMemo)(()=>u[s.toLowerCase()],[s]),N=(0,a.useMemo)(()=>"stocks"===t,[t]),$=(0,a.useMemo)(()=>h&&p&&N?p.id:null,[h,p,N]),[v,y]=(0,r.A)(),A=(0,a.useCallback)(e=>{let{type:s,subject_type:a,subject_id:n,organization_id:l}=e,i=s===t&&a===_&&n===m;return N&&(i=i&&l===$),i},[t,_,m,N,$]),{isSubscribed:C,matchingSubscription:w}=(0,a.useMemo)(()=>{if(j&&null!==x){let e=x.find(e=>A(e));return{isSubscribed:!!e,matchingSubscription:e||null}}return{isSubscribed:!1,matchingSubscription:null}},[j,x,A]),O=async()=>{await k(),y(!1)},M=e=>{n.oR.error(b("utils.error")),console.error("An error occured while managing a notification",{type:t,subjectType:_,subjectId:m},e)},R=()=>g?(y(!0),(0,l.am)({type:t,subjectType:_,subjectId:m,organizationId:$}).then(e=>{e&&200===e.status&&n.oR.success(b(`notifications.subscribe.${t}.${s}.message`))}).catch(M).finally(O)):(console.warn("Notification feature is not enabled for this user"),Promise.resolve()),E=()=>
1{if(C&&null!==w)return y(!0),(0,l.Pk)(w.id).then(e=>{e&&(200===e.status||204===e.status)&&n.oR.success(b(`notifications.unsubscribe.${t}.${s}.message`))}).catch(M).finally(O)};return{isSupported:g,isLoading:v,isSubscribed:C,subscribe:R,unsubscribe:E,manageSubscription:()=>{if(!g)return void console.warn("Notification feature is not enabled for this user");C?E():R()}}}},92029:(e,t,s)=>{s.d(t,{A:()=>o});var a=s(37876),n=s(14232),l=s(12212),i=s(89405),r=s(18725);let o=(0,n.memo)(e=>{let{type:t,subjectType:s,subjectId:o,withText:c}=e,{t:d}=(0,l.B)(),{isLoading:u,isSubscribed:m,isSupported:b,manageSubscription:h}=(0,i.A)({type:t,subjectType:s,subjectId:o}),p=(0,n.useMemo)(()=>{let e=m?"unsubscribe":"subscribe";return d(`notifications.${e}.${t}.${s}.aria`)},[m,d,t,s]),f=(0,n.useMemo)(()=>{if(!c)return null;let e=m?"unsubscribe":"subscribe";return d(`notifications.${e}.${t}.${s}.action`)},[c,m,d,t,s]);if(!b)return null;let g=["action","action--addtocart",m?"btn--outline btn--outline--tomato":"btn--raised btn--raised--tomato",!c&&"btn--small",u&&"disabled"].filter(Boolean).join(" ");return(0,a.jsx)(r.A,{className:g,onClick:h,icon:m?"bell-slash":"bell",disabled:u,iconPlacement:"left",ariaLabel:p,title:p,children:f})})}}]);

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.