import{Link as N}from"./484c2b8a.js";import{r as H,f as a,F as m1,j as t,R as g1}from"./index.00979935.js";import"./754a85d3.js";import"./9b6f90f6.js";import"./bf7618d2.js";import{a as V,u as h1,S as b1,W as u1,P as f1}from"./490baf47.js";import"./330888ed.js";import"./b4e1d7a1.js";import{P as x1,a as y1}from"./e42f3304.js";import{u as L1}from"./3aa906ac.js";import{u as v1,P as K}from"./69a2acc2.js";import{c as k}from"./299afbea.js";import{S as w1}from"./dd2c1676.js";import{f as N1,a as k1,g as O1,b as A1,c as I1,d as S1,s as M1}from"./c68048ca.js";import{C as m}from"./0b509314.js";import"./88db0e4c.js";import"./ee4b83b9.js";import"./92add5bc.js";import"./d8bf9054.js";import"./bf8ec3a3.js";import"./c13af59e.js";import"./67fa99b1.js";import"./af9dddda.js";import"./5a0f1f8c.js";import"./7b8fadb9.js";import"./eb936fa0.js";import"./eb94a662.js";import"./8eff7f85.js";import"./cc9718ab.js";import"./c6a4e396.js";import"./2baa0748.js";import"./ccba9d03.js";import"./1911b778.js";import"./5c83b284.js";import"./4c09b16e.js";import"./e5b4b169.js";function B1({storefrontProduct:r}){const{selectedVariant:o}=V();return!r||!o?null:a("div",{className:"blockB1 flex items-center gap-x-2 font-bold",children:[t(K,{data:r,variantId:o.id}),t(K,{className:"text-xs text-grey-dark line-through",data:r,priceType:"compareAt",variantId:o.id})]})}function _1({storefrontProduct:r,staffPick:o,productFaq:c,city:g}){var _,W,E,T,Z,F,R,U,P;const{selectedVariant:s}=V();if(!s)return null;const{href:h,hash:b}=L1(),[G,O]=H.exports.useState(!1),{bookinfo_ebility:$,bookinfo_thorpe:Y,status:q,categories:z}=h1(r),{author:J}=$,{author:Q,title:X,publisher:e1,page_count:t1,language:a1,publish_date:l1,onix_binding:r1,binding:i1,imprint:A,subtitle:I}=Y,{codes_merged:u}=z,{auckland:n1,wellington:s1,onorder_auckland:o1,onorder_wellington:d1}=q,f=[{label:"Pages:",value:t1},{label:"Language:",value:a1},{label:"Published:",value:l1},{label:"Format",value:r1||i1},{label:"Publisher",value:e1||A},{label:"Imprint",value:A}],S=((E=(W=(_=s==null?void 0:s.storeAvailability)==null?void 0:_.edges)==null?void 0:W.filter(e=>{var l;return(l=e==null?void 0:e.node)==null?void 0:l.available}))==null?void 0:E.map(e=>{var l,i;return(i=(l=e==null?void 0:e.node)==null?void 0:l.location)==null?void 0:i.name}))||[],d=S.includes("Auckland"),p=S.includes("Wellington"),M=(T=r==null?void 0:r.descriptionHtml)==null?void 0:T.replace(/<br> <br> <br> <br>/g,"<br/><br/>").replaceAll("<b>'","<b><br/>'").replaceAll("<b>",'<strong style="padding-right: 4px;">').replaceAll('<strong style="padding-right: 4px;"><br><br>','<strong style="padding-right: 4px;"><br/>').replaceAll(`<strong style="padding-right: 4px;"><br/>'`,`<strong style="padding-right: 4px;"><br/><br/>'`).replaceAll("</b>","</strong>").replaceAll("<i>",'<em style="padding: 0px;">').replaceAll("</i>","<em>").replaceAll("<u>",'<span style="text-decoration: underline; padding-right: 4px;">').replaceAll("</u>","</span>"),B=N1(X,r==null?void 0:r.title),x=k1(Q,J),y=(Z=u==null?void 0:u.split(","))==null?void 0:Z.map(e=>e.trim()),L=(R=(F=y==null?void 0:y.filter(e=>e))==null?void 0:F.map(e=>O1(m,e)))==null?void 0:R.filter(e=>e),v=L==null?void 0:L.flatMap(e=>{const l=[];if(!e)return l;function i(w,j,D){l.some(C1=>C1.categoryName===j.toUpperCase())||l.push({type:w,categoryName:j.toUpperCase(),correspondingEbilityCategoryCodes:D?[...new Set(D)]:[]})}return i("webDepartment",e.webDepartmentName.toUpperCase(),A1(m,e.webDepartmentName.toUpperCase())),i("subCategory",e.subCategoryName,I1(m,e.subCategoryName.toUpperCase())),i("mainCategory",e.mainCategoryName.toUpperCase(),S1(m,e.webDepartmentName.toUpperCase(),e.mainCategoryName.toUpperCase())),l}).filter(({categoryName:e})=>e!==void 0),p1=Array.from(new Map(v==null?void 0:v.map(e=>[e.categoryName,e])).values()),C=(U=x==null?void 0:x.split("&"))==null?void 0:U.map(e=>{const l=new URLSearchParams;l.set("shopify_products[refinementList][meta.bookinfo_thorpe.author][0]",M1(e));const i=`/collections/shop-all?${l}`;return{authorName:e,authorLink:i}}),n=v1({availableInAuckland:d,availableInWellington:p,aucklandStatus:n1,wellingtonStatus:s1,aucklandOnOrder:o1,wellingtonOnOrder:d1}),c1=n.aucklandOnPreOrder||n.wellingtonOnPreOrder;return H.exports.useEffect(()=>{const e=()=>{localStorage.setItem("back-from-product","true")};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}},[]),a(m1,{children:[a("div",{className:k("col-start-2 col-end-14 flex flex-col text-center md:col-start-7 md:gap-y-5 md:text-left xl:col-start-9"),children:[o&&a("div",{className:"flex items-center justify-center gap-x-2 md:justify-start",children:[t("svg",{width:"28",height:"29",viewBox:"0 0 28 29",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.9001 22.1859C24.8503 22.4935 23.7522 22.5595 22.6438 22.6262C21.2758 22.7085 19.8921 22.7918 18.5646 23.3313C18.6664 23.8791 18.7682 24.3976 18.8676 24.904L18.8677 24.9044C18.9367 25.256 19.0046 25.6017 19.0705 25.9475C16.1271 26.5744 13.3102 26.4659 10.4588 26.1283C10.4588 26.0352 10.4542 25.9536 10.45 25.8803V25.8803C10.4428 25.7543 10.437 25.6532 10.4588 25.5617C11.044 23.0873 10.6994 23.083 9.46317 23.0674H9.46314C9.19347 23.064 8.88137 23.0601 8.52725 23.0299C8.35855 23.02 8.18222 23.0422 8.0107 23.0638L8.01067 23.0638C7.97178 23.0687 7.93313 23.0736 7.89488 23.0781C6.44478 23.2357 4.99469 23.4004 3.48184 23.5723C3.02749 23.6239 2.56747 23.6762 2.1001 23.7291C2.131 23.2511 2.14763 22.784 2.16393 22.326C2.19616 21.4208 2.22712 20.5509 2.36454 19.7023C2.4297 19.3064 2.49409 18.91 2.5585 18.5135C2.99424 15.8315 3.43103 13.1429 4.11217 10.5275C4.4916 9.09278 5.38841 7.6822 6.3657 6.58508C7.82589 4.95748 9.52754 3.54689 11.7006 3.01642C13.9196 2.47388 16.1386 2.40155 18.3002 3.16109C19.3925 3.54689 20.4157 4.17382 21.4045 4.80075C21.7725 5.02982 22.0944 5.53618 22.2094 5.98226C22.3567 6.52875 22.5138 7.07523 22.671 7.62236L22.671 7.6224L22.671 7.62242C23.1764 9.38074 23.6836 11.1457 23.8765 12.9387C24.0375 14.5302 24.2099 16.1216 24.5089 17.6769C24.7077 18.7195 25.0607 19.7332 25.423 20.774L25.4231 20.7741C25.5845 21.2377 25.7477 21.7067 25.9001 22.1859ZM12.3674 14.1323L12.3648 14.1401L12.3789 14.1323H12.3674ZM11.259 13.5545C11.4304 14.0577 11.5967 14.546 12.3367 14.1552C12.4852 13.1181 11.9471 13.025 11.1487 13.2522C11.189 13.3487 11.2241 13.4519 11.259 13.5545L11.259 13.5545ZM12.6672 16.9959C12.7742 16.0245 12.877 15.091 12.3439 14.1988C12.0801 14.9018 11.5194 15.0614 10.8613 15.0848C10.2826 15.1007 9.70386 15.1378 9.06839 15.1786C8.74432 15.1994 8.40548 15.2211 8.04435 15.2415C8.11412 15.7074 8.1534 16.1721 8.19178 16.6262C8.27355 17.5937 8.35124 18.5129 8.71121 19.2924C9.41256 20.8115 10.4473 22.21 11.942 23.1022C13.4252 23.9823 15.1614 23.7894 16.3226 22.5235C16.4146 22.424 16.5081 22.3252 16.6018 22.2262C16.8825 21.9296 17.1649 21.6313 17.4149 21.3058L17.5554 21.1217C18.6039 19.7492 19.6561 18.3718 19.381 16.3868C19.345 16.1305 19.417 15.8554 19.49 15.5761C19.5337 15.4087 19.5779 15.2399 19.5994 15.0727C19.6445 14.7416 19.67 14.4053 19.695 14.0739C19.7083 13.8986 19.7215 13.7247 19.7374 13.5536C18.4842 14.0479 17.4149 14.4699 16.3226 14.9039C16.0352 15.8925 15.9777 16.8691 16.863 17.713C15.5497 18.4344 14.2648 18.482 12.9825 18.5295C12.8503 18.5344 12.7181 18.5393 12.5859 18.5449C12.5545 18.0186 12.6114 17.5021 12.6672 16.9959ZM14.4508 17.5203L14.4508 17.5203C14.68 17.3533 14.8665 17.2174 14.8969 17.0499C14.9688 16.6129 14.9733 16.1664 14.9778 15.7193V15.7192C14.9804 15.451 14.9831 15.1827 15.0004 14.916C15.0187 14.6094 15.0297 14.3012 15.0407 13.9928L15.0407 13.9928C15.0713 13.1369 15.1019 12.2801 15.2878 11.4558C15.5638 10.1779 16.3801 9.3098 17.7368 9.20129C17.9231 9.18682 18.1093 9.15934 18.2956 9.13185L18.2956 9.13185C18.4198 9.11352 18.5439 9.0952 18.6681 9.08073C18.4727 7.39285 17.2654 6.34395 15.5408 6.59713C14.4326 6.7568 13.343 7.07964 12.2539 7.40238L12.2538 7.40239C11.8627 7.51829 11.4716 7.63417 11.0797 7.74248C9.78048 8.10417 9.2056 9.06867 9.09063 10.5516C9.21835 10.5516 9.33914 10.5589 9.45493 10.5658C9.6727 10.5789 9.87276 10.591 10.0679 10.5516C11.4361 10.2502 12.3329 10.853 12.8963 12.1189C12.9196 12.1723 12.943 12.2258 12.9665 12.2794C13.1872 12.7827 13.4122 13.2959 13.5057 13.8188C13.6577 14.6495 13.7652 15.486 13.8902 16.4584C13.9447 16.8833 14.0027 17.334 14.0691 17.8215L14.0806 17.8095C14.2051 17.6993 14.3335 17.6058 14.4508 17.5203ZM11.6776 25.4411C14.8279 26.0198 16.6215 25.851 17.7943 24.8865L17.7943 24.8864C17.5873 24.4042 17.3804 23.922 17.1159 23.271C15.4948 24.1752 13.8391 24.6333 12.0455 24.1149L11.9643 24.4141C11.8671 24.7725 11.7868 25.0691 11.6776 25.4411ZM19.5189 11.5884C19.22 10.419 18.6566 9.77999 17.9323 9.90056C17.0121 10.0595 16.7646 10.8169 16.4893 11.6597C16.4723 11.712 16.4551 11.7647 16.4376 11.8175C17.5528 11.7331 18.5301 11.6608 19.5189 11.5884ZM8.41227 13.0834C8.8948 12.9114 9.34695 12.7521 9.78317 12.5984C10.3864 12.3859 10.9591 12.1841 11.5396 11.9742C10.9042 10.9081 10.0931 11.1411 9.2862 11.373L9.28619 11.373C9.2171 11.3928 9.14805 11.4127 9.07913 11.4317C8.44193 11.5987 8.43825 12.0301 8.43365 12.5718C8.43227 12.7338 8.4308 12.9057 8.41227 13.0834ZM16.4031 14.072C16.886 13.8671 17.1504 13.5295 16.932 12.9629C16.9009 12.8815 16.7547 12.8441 16.6063 12.8061C16.5349 12.7878 16.4629 12.7694 16.4031 12.7458L16.383 12.8845C16.3324 13.2338 16.2828 13.5759 16.2421 13.9274C16.2421 13.9413 16.2652 13.9593 16.3025 13.9884C16.3297 14.0095 16.3643 14.0365 16.4031 14.072ZM9.2171 14.5181C9.47746 14.4356 9.68361 14.3731 9.87586 14.3148L9.87591 14.3148C10.0487 14.2625 10.2103 14.2135 10.3899 14.1564C9.73449 13.2763 9.51604 13.6621 9.2171 14.5181ZM15.7132 20.0403C14.7819 20.3899 14.0116 20.4985 13.2068 20.3779C14.0806 19.8474 14.9161 19.7349 15.7132 20.0403ZM15.4948 21.4264C14.621 21.1612 13.9234 21.2134 13.4022 21.5831C13.4137 21.6434 13.4223 21.7067 13.431 21.77C13.4396 21.8333 13.4482 21.8966 13.4597 21.9569C14.0231 21.8122 14.5865 21.6675 15.4948 21.4264Z",fill:"#F5C136"})}),t("span",{className:"blockF0 uppercase",children:"Staff Pick"})]}),B&&a("div",{children:[t("h1",{className:"blockH1",children:B}),I&&t("h2",{className:"blockH3",children:I}),a("h2",{className:"blockB2 mt-2 md:mt-3 font-semibold",children:["by"," ",C==null?void 0:C.map(({authorName:e,authorLink:l},i)=>a(g1.Fragment,{children:[t(N,{to:l,children:e},e),i!==C.length-1&&" & "]},i))]})]}),a("div",{children:[t("div",{className:"wrap-small mt-3 line-clamp-3 overflow-hidden text-grey-dark md:mt-0",style:{WebkitLineClamp:3,WebkitBoxOrient:"vertical",display:"-webkit-box",textOverflow:"ellipsis",overflow:"hidden",maxHeight:"4.5rem"},dangerouslySetInnerHTML:{__html:((P=r==null?void 0:r.descriptionHtml)==null?void 0:P.replaceAll("<b>",'<strong style="padding-right: 4px;">').replaceAll('<strong style="padding-right: 4px;"><br><br>','<strong style="padding-right: 4px;">').replaceAll("</b>","</strong>").replaceAll("<i>",'<em style="padding: 0px;">').replaceAll("</i>","<em>").replaceAll("<u>",'<span style="text-decoration: underline; padding-right: 4px;">').replaceAll("</u>","</span>").replaceAll("<em>",'<em style="padding-left: 4px;">').replaceAll('<em style="padding-left: 4px;"><br>','<em style="padding-left: 4px;">'))||""}}),t(N,{to:`${h.replace(b,"")}#description`,className:"blockF3 transition-standard mx-auto mt-2 block w-min whitespace-nowrap !text-[18px] text-grey-dark hover:scale-110 md:ml-0",children:"READ MORE"})]}),t("div",{className:"mt-3 flex flex-wrap justify-center gap-5 md:mt-0 md:justify-start",children:[...p1].map((e,l)=>{const i=new URLSearchParams;e.type==="webDepartment"||e.categoryName==="NON FICTION"?i.set("shopify_products[refinementList][meta.categories.web_departments_merged][0]",e.categoryName):e.type==="mainCategory"?i.set("shopify_products[refinementList][meta.categories.main_merged][0]",e.categoryName):e.type==="subCategory"&&i.set("shopify_products[refinementList][meta.categories.sub_merged][0]",e.categoryName);const w=`/collections/shop-all?${i}`;return t("div",{className:"blockB7 bg-white px-3 py-2 uppercase",children:t(N,{to:w,prefetch:!1,children:e.categoryName})},l)})}),a("div",{className:"mt-5 md:mt-2",children:[d||p||!n.aucklandOnPreOrder&&!n.wellingtonOnPreOrder?a("div",{className:"blockB7 flex items-center justify-center gap-x-8 md:justify-start lg:gap-x-16",children:[a("div",{className:"flex items-center gap-x-3",children:[a("div",{className:"relative",children:[a("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("path",{d:"M20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10Z",fill:"black"}),t("path",{d:"M6.70332 14.0126L6.70332 14.0126L6.70317 14.0132C6.68666 14.0871 6.72131 14.1479 6.75949 14.1878C6.79727 14.2273 6.84926 14.259 6.90355 14.2845C7.0135 14.3362 7.16057 14.3751 7.30796 14.3963C7.45527 14.4174 7.61201 14.422 7.74142 14.3991C7.80601 14.3876 7.86928 14.3683 7.92199 14.3366C7.9757 14.3042 8.02312 14.2557 8.04256 14.1868L8.04281 14.1868L8.04424 14.1799C8.15096 13.6644 8.43951 12.6021 8.70173 12.0142L12.105 12.1335L12.77 14.4869L12.7764 14.5097L12.7924 14.5271C13.0291 14.7862 13.3681 14.8747 13.6476 14.8627C13.7877 14.8566 13.9196 14.8252 14.0219 14.7717C14.1212 14.7197 14.2122 14.6353 14.2252 14.5161L14.2273 14.4963L14.2217 14.4771C12.1278 7.33491 11.7594 6.10261 11.2471 4.73763C11.0598 4.23854 10.5597 3.86662 10.0688 3.77156C9.82132 3.72364 9.56742 3.74431 9.35307 3.86359C9.13649 3.98411 8.97232 4.19867 8.89539 4.51411L8.89538 4.5141L8.8951 4.51531L6.70332 14.0126ZM9.63302 7.30275C9.78636 6.78018 9.93867 6.26108 10.0708 5.75508L11.8062 11.0166L8.77814 10.9042C8.88262 10.0347 9.11052 9.12735 9.36784 8.21752C9.45405 7.91268 9.54371 7.60713 9.63302 7.30275Z",fill:"#F5C136",stroke:"#F5C136",strokeWidth:"0.2"})]}),t("div",{className:k(["absolute -right-1 -top-1 h-3 w-3 rounded-full",n.aucklandOnPreOrder?"bg-orange":d?"bg-green":"bg-red"])})]}),a("p",{children:["AUCK"," ",t("span",{className:"font-bold",children:n.aucklandOnItsWay?"ON ITS WAY":n.aucklandOnPreOrder?"PRE-ORDER AVAILABLE":d?"IN STOCK":"OUT OF STOCK"})]})]}),a("div",{className:"flex items-center gap-x-3",children:[a("div",{className:"relative",children:[a("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("path",{d:"M20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10Z",fill:"#F5C136"}),t("path",{d:"M9.16885 9.12346L9.07166 9.09994C9.01602 9.32986 8.79529 10.0555 8.55644 10.7993C8.38026 11.3479 8.19616 11.9003 8.06325 12.266C7.9523 11.7264 7.85603 11.1848 7.75931 10.6408C7.74401 10.5547 7.7287 10.4685 7.71332 10.3823C7.58107 9.64125 7.44366 8.89594 7.26343 8.15004C7.15071 7.67092 6.64661 5.42267 6.54801 4.93684C6.54475 4.84385 6.50006 4.77141 6.43719 4.7195C6.37507 4.66821 6.29508 4.63627 6.21659 4.6153C6.05913 4.57325 5.8733 4.56675 5.74915 4.56675C5.53436 4.56675 5.39097 4.62524 5.31026 4.74207C5.23587 4.84976 5.2335 4.98457 5.2335 5.08164V5.20209V5.21585L5.23721 5.2291C5.82328 7.31824 6.42575 9.4661 6.70805 11.5858L6.70815 11.5866L7.19938 15.0797L7.20275 15.1036L7.21671 15.1234C7.29624 15.2361 7.37422 15.3189 7.47907 15.3698C7.58257 15.4201 7.70034 15.4334 7.84632 15.4334C8.03011 15.4334 8.17166 15.4055 8.28008 15.3495C8.39138 15.2921 8.46036 15.209 8.50396 15.1143C8.54592 15.0231 8.56395 14.9218 8.5776 14.8284C8.58068 14.8074 8.58355 14.7867 8.58636 14.7664C8.5965 14.6932 8.60603 14.6245 8.62296 14.5568L9.85256 10.4008L11.3786 15.1898L11.3855 15.2114L11.401 15.228C11.453 15.2832 11.5343 15.3301 11.6197 15.3631C11.7067 15.3968 11.8087 15.42 11.9084 15.42C12.2211 15.42 12.4385 15.2144 12.5442 15.0198L12.5524 15.0046L12.5551 14.9876C12.989 12.2212 13.6831 9.53271 14.382 6.82538C14.5023 6.35951 14.6227 5.89308 14.7419 5.4256C14.7457 5.41738 14.7482 5.40994 14.7499 5.40437C14.7533 5.39292 14.7557 5.38129 14.7575 5.37081C14.761 5.34986 14.763 5.32662 14.7643 5.30499C14.7668 5.26189 14.7668 5.21602 14.7668 5.18949V5.18871C14.7668 5.07078 14.7246 4.95518 14.6297 4.87003C14.5356 4.78561 14.4006 4.74073 14.2323 4.74073C13.9871 4.74073 13.7998 4.8054 13.6586 4.91818C13.5187 5.02992 13.4333 5.18153 13.3775 5.33945C13.322 5.4968 13.2938 5.66675 13.2724 5.82071C13.2674 5.85655 13.2628 5.89121 13.2584 5.92462C13.2433 6.03916 13.2301 6.13906 13.2095 6.22183L13.2095 6.22183L13.2091 6.2234C13.183 6.33567 13.1463 6.49442 13.1012 6.68937C12.783 8.06415 12.0482 11.2389 11.7076 12.6053C11.6726 12.4781 11.6402 12.3416 11.6066 12.1988L11.6016 12.1774C11.5397 11.9143 11.4735 11.6331 11.3798 11.367L10.587 8.83991C10.5359 8.66914 10.4028 8.58151 10.2513 8.55113C10.1043 8.52167 9.93334 8.54323 9.77413 8.58905C9.61353 8.63527 9.45499 8.70901 9.32993 8.79399C9.26736 8.8365 9.21103 8.88327 9.16672 8.9327C9.12319 8.98126 9.08624 9.03796 9.07151 9.10056L9.16885 9.12346ZM9.16885 9.12346C9.24443 8.80226 10.3402 8.3606 10.4914 8.86917L8.10167 12.4499C8.39747 11.6717 9.06432 9.55542 9.16885 9.12346Z",fill:"black",stroke:"black",strokeWidth:"0.2"})]}),t("div",{className:k(["absolute -right-1 -top-1 h-3 w-3 rounded-full",n.wellingtonOnPreOrder?"bg-orange":p?"bg-green":"bg-red"])})]}),a("p",{children:["WGTN"," ",t("span",{className:"font-bold",children:n.wellingtonOnItsWay?"ON ITS WAY":n.wellingtonOnPreOrder?"PRE-ORDER AVAILABLE":p?"IN STOCK":"OUT OF STOCK"})]})]})]}):t("p",{className:" font-bold uppercase text-orange text-[12px]",children:n.aucklandOnItsWay||n.wellingtonOnItsWay?"on order and arriving soon!":"pre-order available"}),t("button",{onClick:()=>O(!0),className:"blockB7 transition-standard mt-2 underline hover:text-grey-dark",children:"Conditions of purchase, deliveries returns, etc."})]}),a("div",{id:"description",className:"desc mt-12 text-left md:mt-15",children:[a("div",{className:"grid grid-cols-2 gap-7",children:[f==null?void 0:f.map(({label:e,value:l},i)=>{if(l&&l!=="Invalid Date")return a("div",{children:[t("span",{className:"blockB6 font-bold",children:e}),t("p",{className:"blockB4 mt-1",children:l})]},i)}),(s==null?void 0:s.barcode)&&a("div",{children:[t("span",{className:"blockB6 font-bold",children:"ISBN:"}),t("p",{className:"blockB4 mt-1",children:s==null?void 0:s.barcode})]})]}),M&&t("div",{className:"wrap-normal mt-15",dangerouslySetInnerHTML:{__html:M}})]}),a("div",{className:"sticky bottom-0",children:[t("div",{className:"mt-5 w-full border-b border-black"}),a("div",{className:"flex items-center justify-between bg-background py-5",children:[t(B1,{storefrontProduct:r}),a("div",{className:"flex w-full items-center justify-end gap-x-6 md:w-[unset] md:justify-between md:gap-x-12",children:[t(b1,{city:g,label:d||p||n.aucklandOnItsWay||n.wellingtonOnItsWay?"Add to cart":c1?"Pre-order":"Sold out",storefrontProduct:r,showSoldOut:!d&&!p&&!n.aucklandOnPreOrder&&!n.wellingtonOnPreOrder}),t(u1,{product:r})]})]})]})]}),t(w1,{isOpen:G,children:t(x1,{productFaq:c,onClick:()=>O(!1)})})]})}function h2({initialVariantId:r,sanityProduct:o,storefrontProduct:c,staffPick:g,badges:s,productFaq:h,city:b}){return t(f1,{data:c,initialVariantId:r,children:a("div",{className:"grid grid-cols-14 gap-y-10 pb-space-m pt-space-h",children:[t(y1,{storefrontProduct:c,badges:s}),t(_1,{sanityProduct:o,storefrontProduct:c,staffPick:g,productFaq:h,city:b})]})})}export{h2 as default}; //# sourceMappingURL=b279088e.js.map