"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9340],{18376:function(e,t,r){var n,i=r(67294);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}t.Z=function(e){return i.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},e),n||(n=i.createElement("path",{d:"M2.375 15.906c0 7.749 6.282 14.031 14 14.031 7.78 0 14.063-6.282 14.063-14.031S24.156 1.875 16.375 1.875c-7.718 0-14 6.282-14 14.031zm25.813 0c0 6.518-5.261 11.776-11.75 11.776s-11.75-5.258-11.75-11.776c0-6.455 5.261-11.714 11.75-11.714s11.75 5.258 11.75 11.714zM17.875 9.219a1.47 1.47 0 1 0-2.939 0 1.47 1.47 0 0 0 2.939 0zm-2.75 3.531V23c0 .564.561 1 1.29 1 .649 0 1.21-.436 1.21-1V12.75c0-.564-.561-1-1.29-1-.649 0-1.21.436-1.21 1z"})))}},31297:function(e,t,r){var n,i=r(67294);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}t.Z=function(e){return i.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 47 10"},e),n||(n=i.createElement("path",{d:"M46.178 5v.001h-.002l-4.41 4.714a.824.824 0 0 1-.601.267h-.002a.836.836 0 0 1-.606-.267L36.147 5a3.042 3.042 0 0 1-.842-2.08 2.978 2.978 0 0 1 .823-2.04c.545-.584 1.23-.881 1.91-.88.69-.001 1.388.307 1.942.902l.09.096a.654.654 0 0 1 .002.88.556.556 0 0 1-.823 0l-.09-.096c-.364-.384-.747-.534-1.122-.538-.371.004-.734.146-1.086.516-.347.377-.48.765-.483 1.16.003.404.143.811.502 1.2l4.193 4.482 4.191-4.48c.347-.377.478-.765.483-1.16-.003-.402-.146-.813-.503-1.2-.348-.368-.723-.517-1.095-.52-.374.004-.738.146-1.092.519l-1.594 1.705a.557.557 0 0 1-.823 0 .652.652 0 0 1 0-.88L42.324.881c.546-.587 1.237-.884 1.916-.882.684-.001 1.374.3 1.917.884A3.04 3.04 0 0 1 47 2.963 2.972 2.972 0 0 1 46.178 5zM23.035 8.674c-.387-.15.02-.778.161-.924.538-.562 2.51-2.082 2.869-1.557.239.452-2.397 2.706-3.03 2.481zm-3.651-1.436c.46-.755.936-1.364 1-1.49.153-.295.056-.718-.206-.905a.645.645 0 0 0-.479-.1c-.104.021-.597.65-.597.65-.206.287-3.532 2.794-3.956 2.794-.212 0 .53-1.364.63-1.482l.005-.006c.276-.397.82-1.15.917-1.27.254-.309.338-.907.073-1.233-.148-.184-.53-.275-.671-.086-.141.189-.507.903-.849 1.186-.585.625-3.304 2.685-4.354 3.22-.04.02-.165.01-.117-.187.221-.862 1.166-2.476 1.43-2.894 1.947-2.306 2.23-2.684 2.512-3.1.283-.414.643-1.172.516-1.492-.127-.32-.597-.345-.82-.281a.26.26 0 0 0-.134.072l-.11.122c-.112.122-.44.523-1.111 1.504-.671.982-1.906 2.823-1.993 2.966-.25.398-1.161 1.516-2.25 2.25-.488.329-1.584 1.164-2.926 1.164-1.766 0-2.222-2.901-2.262-3.327 2.438-.226 7.77-2.265 7.3-3.898-.084-.243-.306-.356-.306-.356s-.17-.1-.318.031c-.048.043-.209.195-.256.239-.227.204-1.404 1.341-2.957 2.021-1.554.68-3.285.906-3.285.906C5.19 1.928 6.918 1.203 6.918.788c0-.415-.353-.604-.636-.604-.847 0-3.054 2.792-3.873 4.333-.337.635-.522.974-.921 1.828C.898 7.603.289 8.905.029 9.162c-.081.156.022.357.136.51.162.22.573.44.89.214.319-.227.406-.626.479-.82.31-.822.866-2.298 1.199-2.92.136.417.583 3.626 2.984 3.626 1.116 0 3.32-1.407 4.52-2.566-.037.065-.282.453-.388.83-.106.378-.149.733-.042.97.205.454.574.585 1.068.38a1.4 1.4 0 0 0 .374-.232c.078-.063.175-.13.238-.177.104-.079 3.059-2.29 3.13-2.338-.043.077-.38.78-.514 1.041-.18.35-.35.733-.297 1.225.034.315.201.577.447.704.237.123.501.1.724-.063.175-.127.327-.243.464-.35l.437-.347c.225-.181 2.322-1.794 2.376-1.832 0 0-.687 1.54-.863 1.94l-.012.031a.866.866 0 0 0-.027.453c.058.224.161.458.422.532.03.009.057.015.085.021h.006l.021.003a.577.577 0 0 0 .373-.093c.093-.074.3-.219.419-.32.214-.183 3.439-3.024 3.913-3.432.013-.014.034.002.022.024-.01.028-1.393 2.497-1.393 2.497-.26.49.025.945.365 1.057.315.104.712-.442.712-.442s.124.447.724.447 1.996-.698 2.843-1.567c.848-.868 1.408-1.832 1.395-2.321-.012-.49-.492-.763-.735-.802-.488-.077-.854-.029-1.596.31-.741.34-1.27.967-1.306.967-.036 0 .12-.59 1.554-2.514.193-.256.681-.892.883-1.132.076-.091.67-.813.744-.905.139-.168.187-.427.129-.696-.068-.31-.151-.561-.414-.67-.118-.039-.304.068-.495.345-.191.277-2.977 4.135-3.078 4.245-.804.867-4.274 3.944-4.377 3.849-.067-.058.357-.85.816-1.606zm12.877-.547c-.058.194-.482.774-1.33 1.265-.847.49-1.87.792-2.012.528-.141-.264.141-.604.742-1.095 1.465-1.151 2.302-1.234 2.51-1.183.209.05.148.291.09.485zm.056-6.398c.198.008.416.21.458.452.043.242-.32.85-.572 1.21l-.777 1.13c-.123.179-1.268 1.98-1.367 2.11-.127.167-.243.356-.363.533-.203.298-.777 1.133-.744 1.133.033 0 .485-.414.573-.493.204-.183 1.29-1.052 1.795-1.206.506-.155 1.13-.176 1.61.219.615.498.545 1.291.033 2.216-.513.925-2.525 2.17-4.08 2.17-.352 0-.613-.304-.776-.641-.121.362-.353.868-.777.868-.318 0-.666-.375-.383-1.205.847-2.303 4.664-8.016 4.763-8.194.14-.252.308-.313.604-.302zM14.683 7.949s.005 0 .014.006h-.018l.004-.006z",fill:"#134725",fillRule:"evenodd"})))}},13931:function(e,t,r){var n,i,a=r(67294);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}t.Z=function(e){return a.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),n||(n=a.createElement("path",{d:"M20 5h-4a3 3 0 0 0-3-3h-2a3 3 0 0 0-3 3H4a1 1 0 0 0 0 2h13v12a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-9a1 1 0 0 0-2 0v9a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V7h1a1 1 0 0 0 0-2zM10 5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h-4z"})),i||(i=a.createElement("path",{d:"M11 18v-8a1 1 0 0 0-2 0v8a1 1 0 0 0 2 0zm4 0v-8a1 1 0 0 0-2 0v8a1 1 0 0 0 2 0z"})))}},49371:function(e,t,r){r.d(t,{p:function(){return i}});var n=r(59821);function i(e){let t=[];if(e&&"object"==typeof e)for(let[r,i]of Object.entries(e)){let e;if("filter"===r.toLowerCase()&&Array.isArray(i)){if(i.length){let t=[];i.forEach((e,i)=>{Object.entries(e).forEach(e=>{if(void 0!==e[1]&&null!==e[1]){let a=(0,n.h_)(["".concat(r,"[").concat(i,"].").concat(e[0])],e[1]);void 0!==a&&t.push(a)}})}),e=t.join("&")}else e=void 0}else e=(0,n.h_)([r],i);e&&t.push(e)}return t.join("&")}},49769:function(e,t,r){r.d(t,{b:function(){return O}});var n=r(85893),i=r(67294),a=r(41664),l=r.n(a),s=r(11163),o=r(88078),c=r(61465),d=r(45139),u=r(82918),h=r(30306),x=r(49665);let f=x.fC,m=x.wy,p=x.Fw;var v=r(75509),g=r(87746),j=r(80190),y=r(30202),b=r(65782),E=r(46471),w=r(36443),C=r(90462);let k=(0,b.r)({queryKey:["article-category-navigation"],fetcher:async(e,t)=>{var r,n;let{meta:i}=t,a=new C.D({headers:null==i?void 0:i.headers}),l=await a.getNavigation({type:"Category",slug:null==e?void 0:e.slug,levels:null==e?void 0:e.levels}),s=null!==(n=null===(r=l.find(e=>e.slug?.replaceAll("/","").toLowerCase()==="produkter"))||void 0===r?void 0:r.children)&&void 0!==n?n:[];return s.reduce(N,[])},use:[function(e){return(t,r)=>{let n=(0,y.NL)(r),i=n.getQueryCache().find({queryKey:t.queryKey,exact:!1});return e({...t,placeholderData:null==i?void 0:i.state.data},r)}}],staleTime:1/0}),N=(e,t)=>{if((0,E.D)(t.slug)&&(0,E.D)(t.title)){var r,n,i;return[...e,{href:(0,w.x5)(t.slug),title:t.title,hasChildren:null!==(n=t.hasChildren)&&void 0!==n&&n,children:null!==(i=null===(r=t.children)||void 0===r?void 0:r.reduce(N,[]))&&void 0!==i?i:[]}]}return e};function Z(e){(0,u.u)((0,u.s)(e))}let M=e=>{let{category:t,level:r=1}=e,i=(0,h.u)(),a=t.children.length>0||t.hasChildren,s=i(t.href),o=!i(t.href,{exact:!0});return a?(0,n.jsxs)("li",{children:[(0,n.jsxs)(f,{defaultOpen:s,children:[(0,n.jsx)(m,{className:"group",asChild:!0,children:(0,n.jsxs)(T,{level:r>1?"nested":"root",children:[t.title,(0,n.jsx)(v.J,{name:"ArrowheadRight",size:"small",className:"fill-subtlest group-hover:fill-subtle group-focus-visible:fill-subtle ml-2 mt-[1.5px] flex-shrink-0 self-start transition-transform duration-200 group-aria-expanded:rotate-90 group-aria-expanded:fill-current"})]})}),(0,n.jsx)(p,{className:"ml-1 mt-1",children:(0,n.jsxs)("ul",{className:"flex w-full flex-col gap-y-1",children:[o?(0,n.jsx)("li",{children:(0,n.jsx)(T,{className:(0,j.cn)("no-underline"),asChild:!0,children:(0,n.jsx)(l(),{href:t.href,"aria-label":t.title,onClick:()=>Z(t.href),children:"Visa alla"})})}):null,t.children.map(e=>(0,n.jsx)(M,{category:e,level:r+1},e.href))]})})]}),(0,n.jsx)("a",{href:t.href,tabIndex:-1,"aria-hidden":!0,className:"sr-only",children:t.title})]}):(0,n.jsx)("li",{children:(0,n.jsx)(T,{className:(0,j.cn)("no-underline",s&&["text-brand","font-bold"]),asChild:!0,children:(0,n.jsx)(l(),{href:t.href,onClick:()=>Z(t.href),children:t.title})})})},O=()=>{let{error:e,data:t=[]}=k(),r=(0,s.useRouter)();return t?(0,n.jsx)("ul",{className:"flex w-full flex-col gap-y-1","aria-label":"Kategorier",children:t.map(e=>(0,n.jsx)(M,{category:e},e.href))},r.asPath):e?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{variant:"text",height:22}),(0,n.jsx)(o.Z,{variant:"text",height:22}),(0,n.jsx)(o.Z,{variant:"text",height:22})]})},I=(0,d.j)("hover:bg-default text-default flex w-full items-center justify-between overflow-hidden rounded-md px-1 py-0.5 text-left outline-none ring-offset-0 transition focus-visible:ring-1 aria-expanded:font-bold aria-expanded:ring-offset-2",{variants:{level:{root:["aria-expanded:bg-action-dark","aria-expanded:text-inverse-dark","ring-action-dark","aria-expanded:ring-action-darkest"],nested:["aria-expanded:bg-visual","aria-expanded:text-brand","ring-visual-darkest","aria-expanded:ring-visual-darkest"]}},defaultVariants:{level:"root"}}),T=i.forwardRef((e,t)=>{let{asChild:r=!1,level:i="root",className:a,children:l,...s}=e,o=r?c.g7:"button";return(0,n.jsx)(o,{ref:t,className:(0,j.cn)((0,g.o)({typography:"body"}),I({level:i}),a),...s,children:l})})},39402:function(e,t,r){r.d(t,{S:function(){return p}});var n=r(85893),i=r(67294),a=r(39696),l=r(7984),s=r(7746),o=r(39783),c=r(90149),d=r(73465),u=r(37897),h=r(49401),x=r(26250),f=r(77555);let m=new a.r({cloud:{cloudName:"icase-eu"},url:{secureDistribution:"assets.icanet.se",privateCdn:!0,analytics:!1}}),p=(0,i.forwardRef)(function(e,t){let{src:r,shouldUseRxFallback:i,preset:a,...p}=e;return i?(0,n.jsx)(d.E,{ref:t,width:u.Z.width,height:u.Z.height,...p,src:h.Z.src,alt:"receptbelagd produkt"}):(null==r?void 0:r.url)?(0,f.Q)(r)?(0,n.jsx)(c.E,{ref:t,...p,src:r.publicId,transformer:e=>{var t,r;return m.image(e.url.toString()).resize((0,s.Vw)(null!==(t=e.width)&&void 0!==t?t:p.width,null!==(r=e.height)&&void 0!==r?r:p.height)).delivery((0,l.uN)((0,o.d)())).delivery((0,l.WU)("auto")).delivery((0,l.np)("auto")).toURL()}}):(0,n.jsx)(c.E,{...p,src:r.url,transformer:e=>(0,x.R)(e.url.toString(),a||"large")}):(0,n.jsx)(d.E,{ref:t,width:u.Z.width,height:u.Z.height,...p,src:u.Z.src,alt:"bild saknas"})});p.displayName="ArticleImage"},51472:function(e,t,r){r.d(t,{P:function(){return o}});var n=r(85893),i=r(86896),a=r(87746),l=r(96495);let s=[l.kv.Supplement,l.kv.Drug],o=e=>{let{productType:t}=e,{formatMessage:r}=(0,i.Z)();return t&&s.includes(t)?(0,n.jsx)(a.Z,{typography:"footnote",color:"text-subtle",children:r({id:"PRODUCT_DETAILS.TYPE.".concat(t.toUpperCase())})}):null}},31214:function(e,t,r){r.d(t,{j:function(){return d}});var n=r(85893),i=r(58826),a=r(26447),l=r(2734),s=r(87290),o=r(33203),c=r(87746);let d=e=>{let{title:t,children:r,isOpen:d,onClose:u,anchor:h="right"}=e,x=(0,l.Z)();return(0,n.jsx)(i.ZP,{open:d,onClose:u,anchor:h,PaperProps:{sx:"right"===h?{borderTopLeftRadius:24,borderBottomLeftRadius:24}:{borderTopRightRadius:24,borderBottomRightRadius:24}},children:(0,n.jsxs)(a.Z,{width:{xs:320,md:400},height:"100%",children:[(0,n.jsxs)("div",{className:"border-subtle flex items-center justify-between border-b px-2 py-3",children:[(0,n.jsx)(c.Z,{typography:"headingExtraLarge",color:"text-brand",asChild:!0,children:(0,n.jsx)("h2",{children:t})}),(0,n.jsx)(s.h,{icon:o.Z,color:x.palette["color/text/default"],onClick:u})]}),r]})})}},5163:function(e,t,r){r.d(t,{u:function(){return l}});var n=r(67294),i=r(42708),a=r(85207);let l=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,{ref:l,inView:s}=(0,i.YD)({threshold:1,triggerOnce:!0});return(0,n.useEffect)(()=>{s&&e&&t&&(0,a.W0)(e,t,r+1)},[s,e,r,t]),{sendSelectItemEvent:()=>{e&&t&&(0,a.FN)(e,t,r)},cardRef:l}}},85207:function(e,t,r){r.d(t,{FN:function(){return d},IL:function(){return s},Ph:function(){return f},W0:function(){return u},cL:function(){return o},iR:function(){return h},nq:function(){return x},rS:function(){return c}});var n=r(25501),i=r(1516),a=r(34155);let l=e=>e?Math.round(100*e)/100:void 0,s=(e,t)=>{var r,i,s;let{originalPrice:o,discountedPrice:c}=e,d=o&&c?o-c:void 0,u=o&&d?o-d:o;return{item_id:e.articleCode,item_name:e.name,item_brand:null===(r=e.brand)||void 0===r?void 0:r.at(0),item_category:null==e?void 0:null===(i=e.category)||void 0===i?void 0:i.at(0),price:l(u),discount:l(d),is_sensitive:e.isSensitive,item_list_name:t,sponsored_id:e.isSponsored?new n.Z().get(null!==(s=a.env.NEXT_PUBLIC_SPONSORED_CUSTOMER_ID_COOKIE_NAME)&&void 0!==s?s:"SponsoredCustomerId"):void 0}},o=e=>{var t,r,n,i;return{...e,brand:(null===(t=e.brandReferences)||void 0===t?void 0:t.map(e=>{let{name:t}=e;return t}))||[],category:(null===(r=e.productCategoryDetails)||void 0===r?void 0:r.map(e=>{let{title:t}=e;return t}))||[],originalPrice:null===(n=e.price)||void 0===n?void 0:n.webPrice,discountedPrice:null===(i=e.price)||void 0===i?void 0:i.salesPrice}},c=e=>{var t;let r=s(o(e),"");delete r.item_list_name,(0,i.b5)({event:"view_item",ecommerce:{items:[{...r,stock_status:null===(t=e.stockItem)||void 0===t?void 0:t.stockStatus,index:0}]}})},d=(e,t,r)=>{var n;return(0,i.b5)({event:"select_item",ecommerce:{items:[{...s(o(e),t),stock_status:null===(n=e.stockItem)||void 0===n?void 0:n.stockStatus,index:r+1}]}})},u=(e,t,r)=>(0,i.b5)({event:"view_item_list",ecommerce:{items:[{...s(o(e),t),index:r}]}}),h=e=>(0,i.qP)({event:"more_campaigns",click_text:e}),x=e=>(0,i.qP)({event:"close_product_info",info_section:e}),f=e=>(0,i.qP)({event:"open_product_info",info_section:e})},77555:function(e,t,r){r.d(t,{Q:function(){return n}});function n(e){return void 0!==e.publicId}},33517:function(e,t,r){r.d(t,{Q:function(){return u}});var n=r(85893),i=r(67294),a=r(93946),l=r(53219),s=r(98456),o=r(86896),c=r(13931),d=r(8916);let u=i.memo(e=>{let{loading:t,removeItem:r,itemTitle:u}=e,h=(0,o.Z)(),[x,f]=(0,i.useState)(t||!1);return(0,n.jsxs)(a.Z,{"data-pw":"remove-item-button",onClick:()=>{!0!==x&&(f(!0),new Promise((e,t)=>{r({meta:{component:{identifier:"Checkout.Cart.RemoveItem",resolve:e,reject:t}}})}).then(()=>{f(!1)}).catch(()=>{f(!1)}))},disabled:x,disableRipple:!0,"aria-label":h.formatMessage({id:"CHECKOUT.CART.REMOVE_ITEM.TITLE"},{title:u}),sx:{alignSelf:"flex-start","&:focus > svg":{color:d.Z.palette["color/icon/action-dark"]}},children:[!1===x&&(0,n.jsx)(l.Z,{fontSize:"small",htmlColor:d.Z.palette["color/icon/action"],sx:{"&:hover":{color:d.Z.palette["color/icon/action-dark"]}},children:(0,n.jsx)(c.Z,{})}),!0===x&&(0,n.jsx)(s.Z,{size:"14px",color:"primary"})]})})},5138:function(e,t,r){r.d(t,{t:function(){return h}});var n=r(85893),i=r(67294),a=r(39696),l=r(7984),s=r(7746),o=r(39783),c=r(90149),d=r(88186);let u=new a.r({cloud:{cloudName:"icase-eu"},url:{secureDistribution:"assets.icanet.se",privateCdn:!0,analytics:!1}}),h=(0,i.forwardRef)(function(e,t){let{publicId:r,...i}=e,a=(0,d.P)({...i,src:r,cdn:"cloudinary"});return(0,n.jsx)(c.E,{ref:t,...a,transformer:e=>u.image(e.url.toString()).resize((0,s.Vw)(e.width,e.height)).delivery((0,l.uN)((0,o.d)())).delivery((0,l.WU)("auto")).delivery((0,l.np)("auto")).toURL()})})},67182:function(e,t,r){r.d(t,{AC:function(){return i},Gc:function(){return o},Lh:function(){return a},kG:function(){return s}});var n=r(48542);let i=(e,t)=>{if(t&&t.groupedBalances){let r=t.groupedBalances.find(t=>t.groupedLoyaltyAccountBalanceType===e);return r}return null},a=e=>{let t=new n.mg({voucherValue:0,pointValue:0}),r=i(n.QL.Stammis,e);return r||t},l=e=>{let t=new n.mg({voucherValue:0,pointValue:0}),r=i(n.QL.Other,e);return r||t},s=e=>l(e).detailedBalances||[],o=e=>a(e).detailedBalances||[]},73982:function(e,t,r){r.d(t,{Y:function(){return n}}),r(85893);let n=e=>{let{children:t}=e;return null}},84363:function(e,t,r){r.d(t,{Y:function(){return f}});var n=r(85893),i=r(67294),a=r(41664),l=r.n(a),s=r(23795),o=r(36443),c=r(64761);let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e||(t.match(/\/hitta-apotek-hjartat\/.*\/.+\/$/)?"aph_features_findpharmacy":"")},u=/^(?:\w+:)?\/\/([^\s.]+\.\S{2})\S*$/,h=e=>"object"==typeof e&&"pathname"in e,x=e=>{let t=h(e)?e.pathname:e;return t&&u.test(t)&&!(null==t?void 0:t.includes("https://www.apotekhjartat.se"))},f=i.forwardRef((e,t)=>{let{featureName:r,href:i,prefetch:a,forceAnchorLink:u,...f}=e,m=h(i)?i.pathname:i,p=d(r,m),{isEnabled:v,feature:g}=(0,c.Xm)(p),j=x(i);return i?u||g&&!v||j?(0,n.jsx)(s.Z,{ref:t,...f,href:m,target:j?"_blank":void 0,rel:j?"noopener noreferrer":void 0}):(0,n.jsx)(l(),{href:(0,o.x5)(m),passHref:!0,prefetch:a,legacyBehavior:!0,children:(0,n.jsx)(s.Z,{ref:t,...f})}):(0,n.jsx)(n.Fragment,{children:f.children})})},11838:function(e,t,r){r.d(t,{D:function(){return H}});var n,i=r(85893),a=r(67294),l=r(67182),s=r(1516);let o=e=>{(0,s.qP)({event:"profile_meny",click_text:e})};var c=r(78551),d=r(56830),u=r(57632),h=r(48542);let x=e=>{let{enabled:t}=e,r=(0,a.useMemo)(()=>(0,u.Z)(),[]),n=(0,c.a)({queryKey:["get-personal-offers"],queryFn:()=>{let e=d.nC.resolve(h.KU);return e.getPersonalOffersV3(r,"aphTinman",void 0)},retry:!1,staleTime:1/0,enabled:t});return n};var f=r(77849),m=r(50281),p=r(72153),v=r(62455),g=r(82144),j=r(11163),y=r(59556),b=r(93151);let E=()=>{let e=(0,j.useRouter)(),{amIMember:t}=(0,v.v)(),{getAmIMember:r}=(0,v.B)(),{bonusBalance:n}=(0,b.F)(),{getBonusBalance:i}=(0,b.P)(),{pathname:l}=e;(0,a.useEffect)(()=>{0===t.updated&&r()},[t.updated,r]);let s=t.data&&(!0===t.data.isMember||!1===t.data.isMember);(0,a.useEffect)(()=>{var e;(null===(e=t.data)||void 0===e?void 0:e.isMember)===!0&&0===n.updated&&i()},[n,i,t]);let o="/logga-ut"===l?(0,y.y)("top_navigation","/"):(0,y.y)("top_navigation");return(0,a.useMemo)(()=>({login:()=>e.push(o),isAuthenticated:s,isLoading:t.loading||0===t.updated,bonusBalance:n}),[t.loading,t.updated,n,s,o,e])};var w=r(41664),C=r.n(w),k=r(4157),N=r(86896),Z=r(44012),M=r(87746),O=r(80190);let I=(0,a.forwardRef)((e,t)=>{let{fullName:r,isMember:n,logoutUrl:a,onMenuItemClick:l,stammisGroup:s,totalAphCheckAmount:o,personalOffersCount:c}=e,d=(0,N.Z)(),u="".concat(d.messages["COMMON.PROFILE.MENU.LOGGED.IN.AS"].toString()," ").concat(r);return(0,i.jsxs)(k.VY,{className:"bg-elevated rounded-base z-[1100] w-[250px] pt-1 shadow-[0px_2px_8px_rgba(0,0,0,0.32)]",sideOffset:2,align:"end",ref:t,children:[(0,i.jsxs)(k.__,{className:"px-2 py-1",children:[(0,i.jsx)(M.Z,{typography:"footnote",color:"text-subtle","aria-hidden":!0,children:(0,i.jsx)(Z.Z,{id:"COMMON.PROFILE.MENU.LOGGED.IN.AS"})}),(0,i.jsx)(M.Z,{typography:"subHeading",className:"w-full truncate","aria-hidden":!0,children:r}),(0,i.jsx)("p",{className:"sr-only",children:u})]}),(0,i.jsx)(k.Z0,{asChild:!0,children:(0,i.jsx)("hr",{className:"border-default","aria-hidden":!0})}),n&&(0,i.jsx)("div",{className:"bg-success m-1 rounded-xl p-2",children:(0,i.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,i.jsx)(M.Z,{className:"font-bold","aria-hidden":!0,children:(0,i.jsx)(Z.Z,{id:"COMMON.PROFILE.MENU.MY.BONUS.TEXT"})}),(0,i.jsx)(M.Z,{typography:"subHeading","aria-hidden":!0,children:"".concat(d.messages["COMMON.PROFILE.MENU.MY.BONUS.VALUE.LABEL"].toString()," ").concat(s.pointValue,"p")}),(0,i.jsx)("p",{className:"sr-only",children:"".concat(d.messages["COMMON.PROFILE.MENU.MY.BONUS.VALUE.LABEL"].toString()," ").concat(s.pointValue," ").concat(d.messages["COMMON.PROFILE.MENU.POINTS"])}),(0,i.jsx)(M.Z,{typography:"subHeading","aria-hidden":!0,children:"".concat(d.messages["COMMON.PROFILE.MENU.MY.BONUS.VOUCHERS.LABEL"].toString()," ").concat(o,":-")}),(0,i.jsx)("p",{className:"sr-only",children:"".concat(d.messages["COMMON.PROFILE.MENU.MY.BONUS.VOUCHERS.LABEL"].toString()," ").concat(o,":-")})]})}),n?(0,i.jsx)(T,{children:(0,i.jsxs)(C(),{className:"flex gap-1",href:"/klubb-hjartat/klubberbjudanden",onClick:()=>{l(d.messages["COMMON.PROFILE.MENU.CLUB.OFFERS.TEXT"].toString())},children:[(0,i.jsx)(Z.Z,{id:"COMMON.PROFILE.MENU.CLUB.OFFERS.TEXT"}),!!c&&(0,i.jsx)("span",{className:"bg-notice text-notice flex aspect-square h-full items-center justify-center rounded-full text-xs",children:c})]})}):(0,i.jsx)(T,{children:(0,i.jsx)(C(),{href:"/klubb-hjartat/bli-medlem",onClick:()=>{l(d.messages["COMMON.PROFILE.MENU.BECOME.MEMBER.TEXT"].toString())},children:(0,i.jsx)(Z.Z,{id:"COMMON.PROFILE.MENU.BECOME.MEMBER.TEXT"})})}),n&&(0,i.jsx)(T,{children:(0,i.jsx)(C(),{href:"/klubb-hjartat/start",onClick:()=>{l(d.messages["COMMON.PROFILE.MENU.MY.PAGES.TEXT"].toString())},children:(0,i.jsx)(Z.Z,{id:"COMMON.PROFILE.MENU.MY.PAGES.TEXT"})})}),n&&(0,i.jsx)(T,{children:(0,i.jsx)(C(),{href:"/klubb-hjartat/orderhistorik",onClick:()=>{l(d.messages["COMMON.PROFILE.MENU.ORDERS.TEXT"].toString())},children:(0,i.jsx)(Z.Z,{id:"COMMON.PROFILE.MENU.ORDERS.TEXT"})})}),(0,i.jsx)(T,{children:(0,i.jsx)(C(),{href:"/mina-recept/receptlistan",onClick:()=>{l(d.messages["COMMON.PROFILE.MENU.RECIPES.TEXT"].toString())},children:(0,i.jsx)(Z.Z,{id:"COMMON.PROFILE.MENU.RECIPES.TEXT"})})}),(0,i.jsx)(k.Z0,{asChild:!0,children:(0,i.jsx)("hr",{className:"border-default","aria-hidden":!0})}),(0,i.jsx)(T,{className:"text-action font-bold",children:(0,i.jsx)(C(),{href:a,children:(0,i.jsx)(Z.Z,{id:"COMMON.PROFILE.MENU.LOGOUT.TEXT"})})}),(0,i.jsx)(k.Eh,{className:"fill-inverse","aria-hidden":!0})]})}),T=e=>{let{children:t,className:r,...n}=e;return(0,i.jsx)(k.ck,{className:(0,O.cn)("outline-action hover:bg-default flex h-5 w-full items-center px-2 py-1 no-underline hover:cursor-pointer",r),asChild:!0,...n,onPointerLeave:e=>e.preventDefault(),onPointerMove:e=>e.preventDefault(),children:t})};var R=r(68415),A=r(93105),L=r(75509);let S=e=>{let{buttonSize:t="small",children:r,isAuthenticated:n,shouldShowPersonalOffersBadge:a,onOpenChange:l,onLogin:s}=e,o=(0,N.Z)();return n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"hidden md:block",children:(0,i.jsxs)(k.fC,{modal:!1,onOpenChange:l,children:[(0,i.jsx)(k.xz,{asChild:!0,children:(0,i.jsxs)(A.z,{className:"relative select-none",size:t,variant:"secondary",children:[(0,i.jsx)(L.J,{name:"Profile",size:"small"}),(0,i.jsx)(Z.Z,{id:"COMMON.HEADER.PROFILE.BUTTON.TEXT"}),a&&(0,i.jsx)("span",{className:"bg-notice-dark border-inverse pointer-events-none absolute right-0.5 top-0.5 box-content h-1 w-1 -translate-y-1/2 translate-x-1/2 rounded-full border-[1px]","aria-hidden":!0})]})}),(0,i.jsx)(k.Uv,{children:r})]})}),(0,i.jsx)("span",{className:"block md:hidden",children:(0,i.jsxs)(k.fC,{modal:!1,onOpenChange:l,children:[(0,i.jsx)(k.xz,{asChild:!0,children:(0,i.jsx)(R.g,{className:"select-none",size:"medium",variant:"secondary",icon:"Profile",text:o.formatMessage({id:"COMMON.HEADER.PROFILE.BUTTON.TEXT"}),badge:a&&(0,i.jsx)("span",{className:"bg-notice-dark border-inverse pointer-events-none absolute right-0.5 top-0.5 box-content h-1 w-1 -translate-y-1/2 translate-x-1/2 rounded-full border-[1px]","aria-hidden":!0})})}),(0,i.jsx)(k.Uv,{children:r})]})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"hidden md:block",children:(0,i.jsxs)(A.z,{className:"select-none",size:t,variant:"secondary",onClick:s,children:[(0,i.jsx)(L.J,{name:"Profile",size:"small"}),(0,i.jsx)(Z.Z,{id:"COMMON.HEADER.PROFILE.BUTTON.TEXT.LOGIN"})]})}),(0,i.jsx)("span",{className:"block md:hidden",children:(0,i.jsx)(R.g,{className:"select-none",size:"medium",variant:"secondary",icon:"Profile",text:o.formatMessage({id:"COMMON.HEADER.PROFILE.BUTTON.TEXT.LOGIN"}),onClick:s})})]})},_=(e,t)=>{let r=0;return e&&e.forEach(e=>{var t;null===(t=e.vouchers)||void 0===t||t.forEach(e=>{(e.validAtOpCo===h.Eu.All||e.validAtOpCo===h.Eu.Aph)&&(r+=e.voucherAmount)})}),t&&t.forEach(e=>{var t;null===(t=e.vouchers)||void 0===t||t.forEach(e=>{(e.validAtOpCo===h.Eu.All||e.validAtOpCo===h.Eu.Aph)&&(r+=e.voucherAmount)})}),r};var P=r(88718);let D=e=>{let{enabled:t}=e,r=(0,a.useMemo)(()=>(0,u.Z)(),[]),n=(0,c.a)({queryKey:["get-bonus-vouchers"],queryFn:()=>{let e=d.nC.resolve(h.KU);return e.getVouchersV4(r,"aphTinman",void 0)},retry:!1,staleTime:1/0,enabled:t}),{isSuccess:i,error:l,status:s}=n;return(0,a.useEffect)(()=>{i&&P.k.info("useGetBonusVouchersQuery, Correlation ID: ".concat(r," was fetched successfully"))},[r,i]),(0,a.useEffect)(()=>{if(l){let{message:e}=l,t="".concat(e||"N\xe5got gick fel! Tyv\xe4rr kan inte denna del visas just nu");P.k.error("useGetBonusVouchersQuery, Correlation ID: ".concat(r," failed to fetch | errorMessage: ").concat(t," | status: ").concat(s))}},[r,l,s]),n};var B=r(73445),F=r(782);let U=(0,B.Ue)()((0,F.mW)((0,F.tJ)((e,t)=>{var r;return{shouldShowPersonalOffersBadge:null===(n=null===(r=t())||void 0===r?void 0:r.shouldShowPersonalOffersBadge)||void 0===n||n,setShouldShowPersonalOffersBadge:t=>e({shouldShowPersonalOffersBadge:t})}},{name:"profile-menu-store",storage:(0,F.FL)(()=>sessionStorage)}))),H=e=>{var t,r;let{buttonSize:n="small"}=e,{login:s,isAuthenticated:c,bonusBalance:d}=E(),u=(0,l.Lh)(d.data),{hasNoSessionRedirect:h}=(0,p.E)(),{amIMember:j}=(0,v.v)(),y=j.data&&j.data.isMember,{user:b}=(0,g.L)(),w=(0,f.X)({firstName:null==b?void 0:b.firstName,lastName:null==b?void 0:b.lastName}),{data:C}=x({enabled:null!=y&&y}),{data:k}=D({enabled:null!=y&&y}),{shouldShowPersonalOffersBadge:N,setShouldShowPersonalOffersBadge:Z}=U(),M=null!==(r=null==C?void 0:null===(t=C.combinations)||void 0===t?void 0:t.length)&&void 0!==r?r:0,O=(0,a.useMemo)(()=>_(null==k?void 0:k.adhocVouchers,null==k?void 0:k.monthVouchers),[null==k?void 0:k.adhocVouchers,null==k?void 0:k.monthVouchers]);return(0,i.jsx)(S,{isAuthenticated:c,onLogin:s,onOpenChange:e=>{e&&Z(!1)},buttonSize:n,shouldShowPersonalOffersBadge:N&&M>0,children:(0,i.jsx)(I,{fullName:w,isMember:y,logoutUrl:(0,m.P)(h),onMenuItemClick:e=>{o(e)},stammisGroup:u,totalAphCheckAmount:O,personalOffersCount:M})})}},87290:function(e,t,r){r.d(t,{h:function(){return l}});var n=r(85893);r(67294);var i=r(49990),a=r(53219);let l=e=>{let{icon:t,size:r,sx:l=[],...s}=e;return(0,n.jsx)(i.Z,{sx:[{color:e=>e.palette["color/icon/action"],fontSize:"32px","&:hover":{color:e=>e.palette["color/text/action-dark"]}},"small"===r&&{fontSize:"24px"},...Array.isArray(l)?l:[l]],...s,disableRipple:!0,children:(0,n.jsx)(a.Z,{inheritViewBox:!0,component:t})})}},78064:function(e,t,r){r.d(t,{M:function(){return d}});var n=r(85893);r(67294);var i=r(45139),a=r(30306),l=r(87746),s=r(80190),o=r(84363);let c=(0,i.j)("hover:bg-default focus-visible:outline-action-dark flex break-words rounded-md px-1 py-0.5 no-underline",{variants:{variant:{primary:"text-action-dark data-[active=true]:bg-visual font-black",secondary:"text-default data-[active=true]:bg-action-dark data-[active=true]:text-inverse-dark focus-visible:outline-offset-2"}},defaultVariants:{variant:"primary"}}),d=e=>{let{links:t,variant:r,onLinkClick:i,typography:d="body",isActiveStrategy:u="exact",className:h,...x}=e,f=(0,a.u)(),m="bodyBig"===d;return(0,n.jsx)("ul",{className:(0,s.cn)("flex flex-col gap-y-1",h),...x,children:t.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(l.Z,{"data-active":f(e.href,{exact:"exact"===u}),typography:d,className:(0,s.cn)(c({variant:r}),{"py-1":m}),asChild:!0,children:(0,n.jsx)(o.Y,{href:e.href,forceAnchorLink:e.isEpiLink,featureName:e.feature,onClick:()=>null==i?void 0:i(e),children:e.title})})},e.href))})}},62728:function(e,t,r){r.d(t,{h:function(){return n}});let n=[{title:"Nyheter",href:"/nyheter"},{title:"Kampanjer",href:"/kampanjer"},{title:"Outlet",href:"/kampanjer/outlet"},{title:"Varum\xe4rken",href:"/varumarken"},{title:"F\xf6rebyggande h\xe4lsa",href:"/tips-och-rad/halsa/forebyggande-halsa"},{title:"Kvinnoh\xe4lsa",href:"/tips-och-rad/kvinnohalsa/ma-bra-genom-livets-alla-faser"},{title:"V\xe5ra tj\xe4nster",href:"/vara-tjanster",isEpiLink:!0}]},78851:function(e,t,r){r.d(t,{v:function(){return h}});var n,i,a=r(85893),l=r(67294),s=r(53219),o=r(86896),c=r(84363);function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var u=function(e){return l.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 196 30"},e),n||(n=l.createElement("path",{d:"M37.276 11.392c0 2.26-1.802 3.86-4.71 3.86h-4.459V7.438h4.458c2.877 0 4.71 1.318 4.71 3.86v.094ZM32.85 3.986h-6.671A1.909 1.909 0 0 0 24.25 5.9v18.013c0 1.067.854 1.883 1.929 1.883a1.875 1.875 0 0 0 1.897-1.883v-5.24l4.49.03h.03c4.712-.062 8.569-2.604 8.569-7.405v-.063c0-4.362-3.194-7.249-8.315-7.249Zm29.434 10.888c0 4.205-3.035 7.625-7.366 7.625-4.332 0-7.43-3.452-7.43-7.688v-.063c0-4.205 3.035-7.657 7.367-7.657 4.331 0 7.43 3.483 7.43 7.688v.095ZM54.918 3.608c-6.703 0-11.445 5.115-11.445 11.203v.063c0 6.088 4.679 11.14 11.382 11.14 6.702 0 11.445-5.115 11.445-11.203v-.063c0-6.088-4.68-11.14-11.382-11.14Zm27.728.378H68.134c-.98 0-1.77.816-1.77 1.758 0 .972.79 1.757 1.77 1.757h5.311v16.412c0 1.067.886 1.883 1.929 1.883 1.075 0 1.928-.847 1.928-1.883V7.501h5.344c.98 0 1.739-.816 1.739-1.757 0-.942-.79-1.758-1.74-1.758Zm19.093 18.262H90.8v-5.806h9.39c.949 0 1.708-.753 1.708-1.663 0-.973-.791-1.726-1.708-1.726H90.8V7.405h10.781c.949 0 1.708-.753 1.708-1.695 0-.941-.791-1.694-1.708-1.694H88.903c-1.106 0-1.928.847-1.928 1.914v17.824c0 1.098.853 1.914 1.928 1.914h12.836c.949 0 1.708-.753 1.708-1.694.031-.942-.759-1.726-1.708-1.726Zm15.555-8.724 6.798-6.495c.442-.408.695-.848.695-1.413a1.74 1.74 0 0 0-1.77-1.757c-.696 0-1.138.251-1.581.722l-10.37 10.293V5.71a1.876 1.876 0 0 0-1.897-1.883c-1.107 0-1.929.847-1.929 1.883v18.2c0 1.067.854 1.883 1.929 1.883a1.875 1.875 0 0 0 1.897-1.883v-4.487l3.541-3.42 7.019 8.88c.411.534.885.91 1.612.91 1.107 0 1.929-.816 1.929-1.851 0-.596-.222-.973-.538-1.35l-7.335-9.069Zm51.222-4.581c0-2.228-.917-4.487-2.719-6.244C164.026.94 161.813.03 159.568.03c-2.213 0-4.426.879-6.196 2.636l-5.154 5.115a1.866 1.866 0 0 0 0 2.636 1.9 1.9 0 0 0 2.656 0l5.153-5.115c1.139-1.13 2.34-1.537 3.541-1.569 1.202 0 2.435.44 3.541 1.57 1.17 1.16 1.613 2.384 1.644 3.608 0 1.193-.442 2.354-1.58 3.483l-13.564 13.463-13.595-13.494c-1.17-1.161-1.612-2.385-1.644-3.609 0-1.192.443-2.353 1.581-3.483s2.308-1.538 3.509-1.538c1.202 0 2.466.471 3.636 1.6l.285.283a1.9 1.9 0 0 0 2.656 0 1.866 1.866 0 0 0 0-2.636l-.285-.282c-1.802-1.789-4.047-2.7-6.292-2.7-2.181 0-4.426.88-6.165 2.637-1.77 1.757-2.687 3.954-2.656 6.12 0 2.227.917 4.455 2.719 6.244l14.291 14.184a2.82 2.82 0 0 0 1.96.816c.696 0 1.423-.282 1.96-.785L165.86 15.03c1.739-1.694 2.656-3.89 2.656-6.088ZM13.12 5.24c-.442-.973-1.2-1.538-2.276-1.538h-.19c-1.074 0-1.865.597-2.307 1.538L.253 23.19c-.158.314-.253.596-.253.879 0 1.004.79 1.757 1.77 1.757.823 0 1.455-.44 1.771-1.192l1.834-4.174h5.501a1.701 1.701 0 0 0 1.644-1.695 1.7 1.7 0 0 0-1.644-1.694H6.861l3.825-8.756 3.826 8.756 1.454 3.389 1.77 4.048c.348.816.98 1.318 1.866 1.318a1.801 1.801 0 0 0 1.802-1.82c0-.251-.126-.565-.221-.816L13.12 5.24Z",fill:"#0BBA4E"})),i||(i=l.createElement("path",{fill:"#E3000B",d:"M173.355 14.813h2.751v10.826h-2.751V14.813Zm15.967-.283 6.228 11.109h-3.161l-.696-1.192h-3.098l1.106-1.946h.949l-1.297-2.322-1.359 2.416c-.221.377-.411.722-.632 1.004a5.675 5.675 0 0 1-4.553 2.26c-3.099 0-5.66-2.51-5.66-5.618 0-3.106 2.53-5.617 5.66-5.617 1.075 0 2.023.283 2.845.785l-1.328 2.385a2.95 2.95 0 0 0-1.517-.408c-1.581 0-2.877 1.287-2.877 2.855 0 1.57 1.296 2.856 2.877 2.856.853 0 1.581-.345 2.086-.879.222-.22.475-.596.57-.753l3.857-6.935Z"})))};let h=()=>{let e=(0,o.Z)();return(0,a.jsx)(c.Y,{forceAnchorLink:!0,href:"/",title:e.messages["COMMON.HEADER.LOGO_LINK_TITLE"].toString(),"aria-label":e.messages["COMMON.HEADER.LOGO_LINK_TITLE"].toString(),sx:{lineHeight:1,"&:focus-visible":{outline:e=>"1px solid ".concat(e.palette["color/border/action"],"}"),outlineOffset:"2px"}},children:(0,a.jsx)(s.Z,{component:u,inheritViewBox:!0,sx:{fontSize:"unset",width:"unset",height:"30px"}})})}},97039:function(e,t,r){r.d(t,{I:function(){return k}});var n,i,a=r(85893),l=r(67294),s=r(41664),o=r.n(s),c=r(80822),d=r(23795),u=r(88078),h=r(26447),x=r(36968),f=r.n(x),m=r(94375),p=r(23178),v=r(76046),g=r(87746),j=r(55703),y=r(39402),b=r(51472),E=r(5163);let w=l.forwardRef((e,t)=>{var r;let{article:i,listName:l,isLoading:s,index:x,onClick:f}=e;return(0,a.jsx)(c.Z,{ref:t,padding:2,bgcolor:e=>e.palette["color/background/elevated"],border:"1px solid",borderColor:e=>e.palette["color/border/default"],borderRadius:3,children:(0,a.jsx)(o(),{href:{pathname:(0,j.V)(null==i?void 0:i.articleUrlSegment),query:(null==i?void 0:i.trackingId)?{ri:i.trackingId}:void 0},legacyBehavior:!0,passHref:!0,prefetch:!1,children:(0,a.jsx)(d.Z,{underline:"none",flexGrow:1,onClick:f,children:(0,a.jsxs)(h.Z,{direction:"row",columnGap:2,children:[(0,a.jsx)(c.Z,{flexShrink:0,position:"relative",children:s?(0,a.jsx)(u.Z,{variant:"rectangular",height:72}):(0,a.jsx)(y.S,{layout:"constrained",height:72,width:72,objectFit:"contain",src:null==i?void 0:null===(r=i.images)||void 0===r?void 0:r[0],alt:null!==(n=null==i?void 0:i.name)&&void 0!==n?n:"",shouldUseRxFallback:null==i?void 0:i.requiresPrescriptionForPurchase})}),(0,a.jsxs)(h.Z,{rowGap:2,flex:1,minWidth:0,children:[(0,a.jsx)(h.Z,{children:s?(0,a.jsx)(u.Z,{variant:"text"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.Z,{typography:"headingSmall",className:"no-wrap",children:null==i?void 0:i.name}),(0,a.jsx)(b.P,{productType:null==i?void 0:i.productType})]})}),(0,a.jsx)(h.Z,{direction:"row",alignItems:"flex-end",justifyContent:"space-between",children:s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Z,{variant:"text",width:50,height:24}),(0,a.jsx)(u.Z,{variant:"rounded",width:"50%",height:24})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.c,{price:null==i?void 0:i.price,tags:null==i?void 0:i.tags,size:"medium",showOnlyOnePrice:!0}),(0,a.jsx)(c.Z,{onClick:e=>e.preventDefault(),marginLeft:2,flex:1,children:(0,a.jsx)(m.Q,{article:i,size:"small",index:x,listName:l})})]})})]})]})})})})}),C=l.forwardRef((e,t)=>{var r;let{article:n,isLoading:l,onClick:s}=e;return(0,a.jsx)(c.Z,{ref:t,children:(0,a.jsx)(o(),{href:{pathname:(0,j.V)(null==n?void 0:n.articleUrlSegment),query:(null==n?void 0:n.trackingId)?{ri:n.trackingId}:void 0},legacyBehavior:!0,passHref:!0,prefetch:!1,children:(0,a.jsx)(d.Z,{underline:"none",flexGrow:1,onClick:s,children:(0,a.jsxs)(h.Z,{direction:"row",columnGap:2,children:[(0,a.jsx)(c.Z,{flexShrink:0,children:l?(0,a.jsx)(u.Z,{variant:"rectangular",height:72}):(0,a.jsx)(y.S,{layout:"constrained",height:72,width:72,objectFit:"contain",src:null==n?void 0:null===(r=n.images)||void 0===r?void 0:r[0],alt:null!==(i=null==n?void 0:n.name)&&void 0!==i?i:"",shouldUseRxFallback:null==n?void 0:n.requiresPrescriptionForPurchase})}),(0,a.jsxs)(h.Z,{flex:1,minWidth:0,children:[(0,a.jsx)(h.Z,{children:l?(0,a.jsx)(u.Z,{variant:"text"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.Z,{typography:"headingSmall",className:"no-wrap",children:null==n?void 0:n.name}),(0,a.jsx)(b.P,{productType:null==n?void 0:n.productType})]})}),(0,a.jsx)(h.Z,{direction:"row",alignItems:"flex-end",justifyContent:"flex-end",children:l?(0,a.jsx)(u.Z,{variant:"text",width:50,height:24}):(0,a.jsx)(p.c,{price:null==n?void 0:n.price,size:"small",showOnlyOnePrice:!0})})]})]})})})})}),k=e=>{let{article:t,loading:r,listName:n,index:i,variant:l}=e,{sendSelectItemEvent:s,cardRef:o}=(0,E.u)(t,n,i),c=(0,v.D)();return(c&&t&&f()(t,"trackingId",void 0),"minicart"===l)?(0,a.jsx)(w,{ref:o,index:i||0,article:t,isLoading:r,listName:n,onClick:s}):"searchresult"===l?(0,a.jsx)(C,{ref:o,article:t,isLoading:r,onClick:s}):null}},11530:function(e,t,r){r.d(t,{S:function(){return o}});var n=r(85893),i=r(67294),a=r(88718),l=r(44012);let s=()=>(0,n.jsx)(l.Z,{id:"ERROR.GENERAL"});class o extends i.Component{static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){a.k.error("ErrorBoundary caught an error:",e)}render(){let{hasError:e}=this.state,{children:t}=this.props;return e?(0,n.jsx)(s,{}):t}constructor(e){super(e),this.state={hasError:!1}}}},50109:function(e,t,r){r.d(t,{$:function(){return s},s:function(){return o}});var n=r(85207),i=r(1516);let a=e=>{if(void 0!==e.isSensitive)return e.isSensitive?"yes":"no"},l=e=>({...(0,n.IL)(e,e.listName),quantity:Math.abs(e.oldQuantity-e.newQuantity),is_sensitive:a(e),index:e.index}),s=e=>{(0,i.b5)({event:"add_to_cart",ecommerce:{items:[l(e)]}})},o=e=>{(0,i.b5)({event:"remove_from_cart",ecommerce:{items:[l(e)]}})}},82918:function(e,t,r){r.d(t,{s:function(){return i},u:function(){return a}});var n=r(1516);function i(e){return"/"===e?["hem"]:e.split("/").filter(e=>!["","produkter"].includes(e))}let a=e=>{if(e.length<1)return;let t={menu_level_1:e[0],menu_level_2:e[1],menu_level_3:e[2]};(0,n.qP)({event:"main_navigation",...t})}},73016:function(e,t,r){r.d(t,{h:function(){return i},u:function(){return a}});var n=r(1516);let i=e=>{(0,n.qP)({event:"search",search_term:e})},a=e=>{(0,n.qP)({event:"quick_search",search_term:e})}},41561:function(e,t,r){r.d(t,{A:function(){return n}});let n=(e,t,r)=>({isSensitive:!0,name:"Receptk\xf6p",articleCode:"prescriptionItem",category:[(null==e?void 0:e.isForAnimal)?"Animal":"Human"],oldQuantity:t,newQuantity:r})},71289:function(e,t,r){r.d(t,{AT:function(){return s},j3:function(){return u},pp:function(){return l}});var n=r(85893),i=r(80822);let a={md:"216px",xl:"248px"},l={xxl:"1400px",xl:"1112px"},s={xs:"12px",sm:"24px",md:"40px",xl:"72px",xxl:"120px"},o={md:3,lg:4},c=e=>"".concat(8*e,"px"),d={xl:"calc(".concat(l.xl," + ").concat(c(o.lg)," + (").concat(s.xl," * 2) + ").concat(a.xl,")"),xxl:"calc(".concat(l.xxl," + ").concat(c(o.lg)," + (").concat(s.xxl," * 2) + ").concat(a.xl,")")},u=e=>{let{children:t,...r}=e;return(0,n.jsx)(i.Z,{width:"100%",position:"relative",...r,children:(0,n.jsx)(i.Z,{width:d,marginX:"auto",paddingX:s,children:t})})}},59340:function(e,t,r){r.d(t,{X:function(){return th}});var n,i,a,l,s,o,c,d,u,h,x=r(85893),f=r(67294),m=r(11163),p=r.n(m),v=r(68239),g=r(22430),j=r(2962),y=r(11530),b=r(80190),E=r(9640),w=r(64761),C=r(8916),k=r(80822),N=r(86886),Z=r(26447),M=r(53219),O=r(71289);function I(){return(I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var T=function(e){return f.createElement("svg",I({height:30,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 196 30"},e),i||(i=f.createElement("path",{d:"M37.276 11.392c0 2.26-1.802 3.86-4.71 3.86h-4.459V7.438h4.458c2.877 0 4.71 1.318 4.71 3.86v.094ZM32.85 3.986h-6.671A1.909 1.909 0 0 0 24.25 5.9v18.013c0 1.067.854 1.883 1.929 1.883a1.875 1.875 0 0 0 1.897-1.883v-5.24l4.49.03h.03c4.712-.062 8.569-2.604 8.569-7.405v-.063c0-4.362-3.194-7.249-8.315-7.249Zm29.434 10.888c0 4.205-3.035 7.625-7.366 7.625-4.332 0-7.43-3.452-7.43-7.688v-.063c0-4.205 3.035-7.657 7.367-7.657 4.331 0 7.43 3.483 7.43 7.688v.095ZM54.918 3.608c-6.703 0-11.445 5.115-11.445 11.203v.063c0 6.088 4.679 11.14 11.382 11.14 6.702 0 11.445-5.115 11.445-11.203v-.063c0-6.088-4.68-11.14-11.382-11.14Zm27.728.378H68.134c-.98 0-1.77.816-1.77 1.758 0 .972.79 1.757 1.77 1.757h5.311v16.412c0 1.067.886 1.883 1.929 1.883 1.075 0 1.928-.847 1.928-1.883V7.501h5.344c.98 0 1.739-.816 1.739-1.757 0-.942-.79-1.758-1.74-1.758Zm19.093 18.262H90.8v-5.806h9.39c.949 0 1.708-.753 1.708-1.663 0-.973-.791-1.726-1.708-1.726H90.8V7.405h10.781c.949 0 1.708-.753 1.708-1.695 0-.941-.791-1.694-1.708-1.694H88.903c-1.106 0-1.928.847-1.928 1.914v17.824c0 1.098.853 1.914 1.928 1.914h12.836c.949 0 1.708-.753 1.708-1.694.031-.942-.759-1.726-1.708-1.726Zm15.555-8.724 6.798-6.495c.442-.408.695-.848.695-1.413a1.74 1.74 0 0 0-1.77-1.757c-.696 0-1.138.251-1.581.722l-10.37 10.293V5.71a1.876 1.876 0 0 0-1.897-1.883c-1.107 0-1.929.847-1.929 1.883v18.2c0 1.067.854 1.883 1.929 1.883a1.875 1.875 0 0 0 1.897-1.883v-4.487l3.541-3.42 7.019 8.88c.411.534.885.91 1.612.91 1.107 0 1.929-.816 1.929-1.851 0-.596-.222-.973-.538-1.35l-7.335-9.069Zm51.222-4.581c0-2.228-.917-4.487-2.719-6.244C164.026.94 161.813.03 159.568.03c-2.213 0-4.426.879-6.196 2.636l-5.154 5.115a1.866 1.866 0 0 0 0 2.636 1.9 1.9 0 0 0 2.656 0l5.153-5.115c1.139-1.13 2.34-1.537 3.541-1.569 1.202 0 2.435.44 3.541 1.57 1.17 1.16 1.613 2.384 1.644 3.608 0 1.193-.442 2.354-1.58 3.483l-13.564 13.463-13.595-13.494c-1.17-1.161-1.612-2.385-1.644-3.609 0-1.192.443-2.353 1.581-3.483s2.308-1.538 3.509-1.538c1.202 0 2.466.471 3.636 1.6l.285.283a1.9 1.9 0 0 0 2.656 0 1.866 1.866 0 0 0 0-2.636l-.285-.282c-1.802-1.789-4.047-2.7-6.292-2.7-2.181 0-4.426.88-6.165 2.637-1.77 1.757-2.687 3.954-2.656 6.12 0 2.227.917 4.455 2.719 6.244l14.291 14.184a2.82 2.82 0 0 0 1.96.816c.696 0 1.423-.282 1.96-.785L165.86 15.03c1.739-1.694 2.656-3.89 2.656-6.088ZM13.12 5.24c-.442-.973-1.2-1.538-2.276-1.538h-.19c-1.074 0-1.865.597-2.307 1.538L.253 23.19c-.158.314-.253.596-.253.879 0 1.004.79 1.757 1.77 1.757.823 0 1.455-.44 1.771-1.192l1.834-4.174h5.501a1.701 1.701 0 0 0 1.644-1.695 1.7 1.7 0 0 0-1.644-1.694H6.861l3.825-8.756 3.826 8.756 1.454 3.389 1.77 4.048c.348.816.98 1.318 1.866 1.318a1.801 1.801 0 0 0 1.802-1.82c0-.251-.126-.565-.221-.816L13.12 5.24Z",fill:"#0BBA4E"})),a||(a=f.createElement("path",{fill:"#E3000B",d:"M173.355 14.813h2.751v10.826h-2.751V14.813Zm15.967-.283 6.228 11.109h-3.161l-.696-1.192h-3.098l1.106-1.946h.949l-1.297-2.322-1.359 2.416c-.221.377-.411.722-.632 1.004a5.675 5.675 0 0 1-4.553 2.26c-3.099 0-5.66-2.51-5.66-5.618 0-3.106 2.53-5.617 5.66-5.617 1.075 0 2.023.283 2.845.785l-1.328 2.385a2.95 2.95 0 0 0-1.517-.408c-1.581 0-2.877 1.287-2.877 2.855 0 1.57 1.296 2.856 2.877 2.856.853 0 1.581-.345 2.086-.879.222-.22.475-.596.57-.753l3.857-6.935Z"})))},R=r(1516),A=r(87746),L=r(30306),S=r(84363);(n=l||(l={})).bodyBig="bodyBig",n.body="body";let _=e=>{let{links:t,variant:r=l.body,className:n,onLinkClick:i}=e,a=(0,L.u)();return(0,x.jsx)("ul",{className:(0,b.cn)("flex flex-col gap-1",n),children:t.map(e=>(0,x.jsx)("li",{children:(0,x.jsx)(A.Z,{typography:r,color:"text-inverse",asChild:!0,children:(0,x.jsx)(S.Y,{href:e.href,forceAnchorLink:e.isEpiLink,featureName:e.feature,className:a(e.href,{exact:!0})?"active":void 0,onClick:()=>null==i?void 0:i({link:e}),underline:"none",paddingY:.5,paddingX:1,borderRadius:2,display:"flex",paddingLeft:{xs:0,sm:1},sx:{"&:hover":{background:e=>e.palette["color/background/action"]}},children:e.title})})},e.href))})},P=e=>{let{header:t,links:r,footerLinkClickEvent:n}=e;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(k.Z,{paddingBottom:1,children:(0,x.jsx)(A.Z,{typography:"body",className:"pl-1 font-bold",color:"text-inverse",asChild:!0,children:(0,x.jsx)("h2",{children:t.title})})}),(0,x.jsx)(_,{links:r,onLinkClick:n})]})};var D=r(25944);let B=e=>{let{links:t,header:r,footerLinkClickEvent:n}=e;return(0,x.jsx)("div",{className:"mx-1",children:(0,x.jsx)(D.U,{items:[{title:r.title,value:r.title,children:(0,x.jsx)(_,{className:"gap-2",links:t,onLinkClick:n})}],variant:"inverted"})})},F=e=>{let{linksData:t}=e,{header:r,links:n}=t,i=e=>{let{link:t}=e,r={event:"footer_navigation",click_text:t.title};(0,R.qP)(r)};return(0,x.jsxs)(Z.Z,{children:[(0,x.jsx)(k.Z,{display:{sm:"none",xs:"block"},children:(0,x.jsx)(B,{footerLinkClickEvent:i,header:r,links:n})}),(0,x.jsx)(k.Z,{display:{sm:"block",xs:"none"},children:(0,x.jsx)(P,{footerLinkClickEvent:i,header:r,links:n})})]})};function U(){return(U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var H=function(e){return f.createElement("svg",U({viewBox:"0 0 1440 102",preserveAspectRatio:"none",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s||(s=f.createElement("g",{clipPath:"url(#footer_wave_svg__a)"},f.createElement("path",{d:"M734.638 62.268C913.913 3.91 1101.92-6.442 1298.98 5.733 1470.12 16.3 1643.62 24.5 1817.35 23.495c233.76-1.394 307.24 30.974 362.67 145.983 66.18 137.319 154.27 271.072 237.8 405.359 46.25 74.411 78.6 147.117-37.68 219.111-95.22 58.887-214.89 94.803-357.86 104.943-96.16 6.787-178.51-6.338-242.64-42.279-65.28-36.596-127.68-74.837-197.2-109.135-169.01-83.457-379.89-127.853-608.543-156.218C715.491 559.235 555.18 474.22 497.405 339.172c-51.006-119.374 26.977-207.695 237.233-276.904Z",fill:"#FBD6CB"}),f.createElement("path",{d:"M1551.88 70.512c-3.31.993-6.66 2.004-6.82 3.047-.34 2.317 35.07 250.792 35.07 165.616H-338.418l-15.996-158.933c86.463-2.967 165.947-8.426 233.656-14.067 96.853-8.07 171.601-18.515 281.647-25.069 177.36-10.564 404.432-9.811 574.637 1.774 82.38 5.608 151.207 12.939 239.613 17.753 153.731 8.37 354.371 8.403 512.801 1.246 18.36-.83 76.63-3.974 93.71-1.866 3.4.42 1.86 1.028.17 1.537-9.99 2.987-19.97 5.975-29.95 8.962h.01Z",fill:"#175D30"}))),o||(o=f.createElement("defs",null,f.createElement("clipPath",{id:"footer_wave_svg__a"},f.createElement("path",{fill:"#fff",d:"M0 0h1440v102H0z"})))))};let z={popularCategories:{header:{title:"Popul\xe4ra kategorier"},links:[{title:"Ansiktsv\xe5rd",href:"/produkter/hudvard/ansiktsvard/"},{title:"Barn & f\xf6r\xe4ldrar",href:"/produkter/barn-foraldrar/"},{title:"Kosttillskott & vitaminer",href:"/produkter/kosttillskott-vitaminer/"},{title:"F\xf6rkylning",href:"/produkter/forkylning-nasa/forkylning/"}]},services:{header:{title:"V\xe5ra tj\xe4nster"},links:[{title:"Se Hj\xe4rtats tj\xe4nster i apoteken",href:"/vara-tjanster/",isEpiLink:!0}]},about:{header:{title:"Om oss"},links:[{title:"F\xf6r leverant\xf6rer",href:"/om-oss/kontakta-supportkontoret/for-leverantorer/",isEpiLink:!0},{title:"H\xe5llbarhet",href:"/om-oss/hallbarhet/",isEpiLink:!0},{title:"Karri\xe4r & lediga tj\xe4nster",href:"https://karriar.icagruppen.se/apotekhjartat/se/sv/home"},{title:"Kontakt supportkontoret",href:"/om-oss/kontakta-supportkontoret/",isEpiLink:!0},{title:"Just nu p\xe5 Hj\xe4rtat",href:"/om-oss/just-nu-pa-hjartat/",isEpiLink:!0},{title:"Press och bildbank",href:"/om-oss/pressrum/pressmeddelanden/",isEpiLink:!0}]},help:{header:{title:"Support"},links:[{title:"Hitta apotek",href:"/hitta-apotek-hjartat/",isEpiLink:!0},{title:"Kontakta oss",href:"/kundservice/kontakta-oss/"},{title:"Vanliga fr\xe5gor",href:"/kundservice/vanliga-fragor/"},{title:"Frakt & leverans",href:"/kundservice/frakt-leverans/"},{title:"Betalning",href:"/mina-recept/sa-funkar-det/delbetalning-pa-apotek-hjartat/",isEpiLink:!0},{title:"F\xf6rskrivare",href:"/kundservice/forskrivare/"},{title:"Receptfr\xe5gor",href:"/mina-recept/sa-funkar-det/hamta-ut-dina-recept-online/",isEpiLink:!0}]}},V=[{title:"Hem",href:"/"},{title:"R\xe5dgivning",href:"/tips-och-rad/"},{title:"Klubb Hj\xe4rtat",href:"/klubb-hjartat/mina-sidor/"},{title:"Hitta apotek",href:"/hitta-apotek-hjartat/"},{title:"Kontakta oss",href:"/kundservice/kontakta-oss/"}],K=[{title:"Anpassa cookieinst\xe4llningar",href:"/cookieinstallningar/"},{title:"Information om cookies",href:"/om-oss/information-om-cookies/",isEpiLink:!0},{title:"K\xf6pvillkor",href:"/kundservice/kopvillkor/"},{title:"Personuppgiftsbehandling",href:"/om-oss/var-personuppgiftsbehandling/",isEpiLink:!0}],G=[{href:"https://instagram.com/apotekhjartat",icon:"Instagram",ariaLabel:"Bes\xf6k Apotek Hj\xe4rtat's Instagram, \xf6ppnas i ny flik."},{href:"https://www.youtube.com/user/apotekhjartat",icon:"YouTube",ariaLabel:"Bes\xf6k Apotek Hj\xe4rtat's Youtube kanal, \xf6ppnas i ny flik."},{href:"https://www.facebook.com/apotekhjartat?fref=ts",icon:"Facebook",ariaLabel:"Bes\xf6k Apotek Hj\xe4rtat's Facebook, \xf6ppnas i ny flik."},{href:"https://www.linkedin.com/company/apotekhjartat/",icon:"LinkedIn",ariaLabel:"Bes\xf6k Apotek Hj\xe4rtat's Linkedin, \xf6ppnas i ny flik."}];var Y=r(44012),q=r(5138);function X(){return(X=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var Q=function(e){return f.createElement("svg",X({width:76,height:32,viewBox:"0 0 80 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),c||(c=f.createElement("path",{d:"M69.825.998H9.286A9.286 9.286 0 0 0 0 10.284v13.428a9.286 9.286 0 0 0 9.286 9.286h60.539a9.286 9.286 0 0 0 9.286-9.286V10.284A9.286 9.286 0 0 0 69.825.998Z",fill:"#FFB3C7"})),d||(d=f.createElement("path",{d:"M63.35 15.02a4.9 4.9 0 1 0 0 8.099v.593h2.78v-9.286h-2.78v.594Zm-2.529 6.438a2.393 2.393 0 1 1 2.52-2.389 2.457 2.457 0 0 1-2.52 2.39ZM25.22 10.287h-2.909v13.425h2.91V10.287ZM50.753 14.176a3.378 3.378 0 0 0-2.864 1.296v-1.046H45.12v9.286h2.802v-4.88a1.96 1.96 0 0 1 2.088-2.104c1.221 0 1.924.73 1.924 2.085v4.899h2.777v-5.905c0-2.161-1.718-3.631-3.958-3.631ZM34.018 15.02a4.9 4.9 0 1 0 0 8.099v.593h2.78v-9.286h-2.78v.594Zm-2.529 6.438a2.393 2.393 0 1 1 2.52-2.389 2.457 2.457 0 0 1-2.52 2.39ZM41.1 15.635v-1.21h-2.848v9.287h2.853v-4.335c0-1.463 1.586-2.25 2.686-2.25l.033.002v-2.703a3.467 3.467 0 0 0-2.725 1.209ZM69.082 20.418a1.745 1.745 0 1 0 0 3.49 1.745 1.745 0 0 0 0-3.49ZM20.306 10.284h-3.015a7.712 7.712 0 0 1-3.118 6.225l-1.195.894 4.63 6.313h3.805l-4.26-5.809a10.685 10.685 0 0 0 3.153-7.623ZM12.61 10.284H9.587v13.431h3.021v-13.43Z",fill:"#000"})))};function W(){return(W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var J=function(e){return f.createElement("svg",W({width:80,height:18,viewBox:"0 0 578 176",xmlns:"http://www.w3.org/2000/svg"},e),u||(u=f.createElement("defs",null,f.createElement("linearGradient",{x1:"80.815%",y1:"59.637%",x2:"59.868%",y2:"8.15%",id:"swish_logo_svg__a"},f.createElement("stop",{stopColor:"#EF2131",offset:"0%"}),f.createElement("stop",{stopColor:"#FECF2C",offset:"100%"})),f.createElement("linearGradient",{x1:"58.818%",y1:"0%",x2:"9.244%",y2:"94.071%",id:"swish_logo_svg__b"},f.createElement("stop",{stopColor:"#FBC52C",offset:"0%"}),f.createElement("stop",{stopColor:"#F87130",offset:"26.392%"}),f.createElement("stop",{stopColor:"#EF52E2",offset:"56.08%"}),f.createElement("stop",{stopColor:"#661EEC",offset:"100%"})),f.createElement("linearGradient",{x1:"20.569%",y1:"41.018%",x2:"40.597%",y2:"91.277%",id:"swish_logo_svg__c"},f.createElement("stop",{stopColor:"#78F6D8",offset:"0%"}),f.createElement("stop",{stopColor:"#77D1F6",offset:"26.571%"}),f.createElement("stop",{stopColor:"#70A4F3",offset:"55.447%"}),f.createElement("stop",{stopColor:"#661EEC",offset:"100%"})),f.createElement("linearGradient",{x1:"42.44%",y1:"100%",x2:"91.614%",y2:"6.278%",id:"swish_logo_svg__d"},f.createElement("stop",{stopColor:"#536EED",offset:"0%"}),f.createElement("stop",{stopColor:"#54C3EC",offset:"24.666%"}),f.createElement("stop",{stopColor:"#64D769",offset:"56.42%"}),f.createElement("stop",{stopColor:"#FECF2C",offset:"100%"})))),h||(h=f.createElement("g",{fill:"none",fillRule:"evenodd"},f.createElement("path",{d:"M549.059 48.903c0-2.03.373-3.932 1.12-5.708.746-1.776 1.76-3.325 3.04-4.647a14.192 14.192 0 0 1 4.5-3.124c1.72-.762 3.567-1.142 5.54-1.142 2 0 3.874.38 5.62 1.142a14.303 14.303 0 0 1 4.56 3.124c1.294 1.322 2.314 2.871 3.061 4.647.747 1.776 1.12 3.679 1.12 5.708 0 2.03-.373 3.933-1.12 5.709-.747 1.776-1.767 3.325-3.06 4.646a14.303 14.303 0 0 1-4.56 3.125c-1.747.761-3.62 1.142-5.62 1.142-1.974 0-3.82-.38-5.541-1.142a14.192 14.192 0 0 1-4.5-3.125c-1.28-1.321-2.294-2.87-3.04-4.646-.747-1.776-1.12-3.679-1.12-5.709Zm2.92 0c0 1.683.286 3.245.86 4.687.573 1.442 1.367 2.697 2.38 3.766a11.164 11.164 0 0 0 3.58 2.523c1.374.615 2.86.922 4.46.922 1.627 0 3.134-.307 4.52-.922a11.333 11.333 0 0 0 3.62-2.523 11.775 11.775 0 0 0 2.421-3.766c.587-1.442.88-3.004.88-4.687 0-1.682-.293-3.244-.88-4.687a11.775 11.775 0 0 0-2.42-3.765 11.333 11.333 0 0 0-3.62-2.524c-1.387-.614-2.894-.921-4.52-.921-1.6 0-3.087.307-4.46.921a11.164 11.164 0 0 0-3.581 2.524c-1.013 1.068-1.807 2.323-2.38 3.765-.574 1.443-.86 3.005-.86 4.687Zm6.4-6.289c0-.881.44-1.322 1.32-1.322h4.52c1.44 0 2.587.414 3.44 1.242.854.828 1.28 1.95 1.28 3.365 0 .587-.086 1.108-.26 1.562a4.381 4.381 0 0 1-.66 1.182c-.266.334-.56.607-.88.821-.32.214-.64.36-.96.44v.08c.027.028.067.081.12.161a.88.88 0 0 1 .16.26c.054.12.134.26.24.421l2.08 4.046c.24.454.294.821.16 1.102-.133.28-.426.42-.88.42h-.48c-.746 0-1.266-.32-1.56-.961l-2.32-4.887h-2.48v4.566c0 .855-.413 1.282-1.24 1.282h-.36c-.827 0-1.24-.427-1.24-1.282V42.614Zm5.24 5.849c.774 0 1.374-.227 1.8-.681.427-.454.64-1.082.64-1.883 0-.775-.213-1.375-.64-1.803-.426-.427-1.013-.64-1.76-.64h-2.44v5.007h2.4ZM447.016 58.04c4.522 0 8.357.577 11.505 1.731 3.148 1.155 5.608 2.22 7.382 3.197 1.507.8 2.394 1.865 2.66 3.197s.044 2.752-.665 4.262l-1.33 2.397c-.798 1.599-1.818 2.531-3.06 2.797-1.24.267-2.704.045-4.389-.666-1.507-.71-3.325-1.442-5.453-2.197-2.128-.755-4.61-1.132-7.448-1.132-2.927 0-5.188.577-6.784 1.731-1.596 1.155-2.394 2.797-2.394 4.928 0 1.865.82 3.375 2.46 4.529 1.641 1.154 3.725 2.176 6.252 3.064 2.527.887 5.232 1.842 8.114 2.863a40.313 40.313 0 0 1 8.113 3.93 20.588 20.588 0 0 1 6.251 6.126c1.64 2.487 2.461 5.639 2.461 9.457 0 3.02-.598 5.794-1.796 8.325-1.197 2.53-2.926 4.728-5.187 6.593-2.261 1.865-4.988 3.33-8.18 4.396-3.192 1.065-6.739 1.598-10.64 1.598-5.498 0-10.131-.8-13.9-2.398-3.768-1.598-6.672-3.107-8.712-4.528-1.507-.888-2.35-1.998-2.527-3.33-.177-1.332.222-2.753 1.197-4.262l1.596-2.398c.976-1.42 2.062-2.22 3.259-2.397 1.197-.178 2.638.177 4.323 1.065 1.596.888 3.657 1.887 6.185 2.997 2.527 1.11 5.52 1.665 8.978 1.665 2.926 0 5.231-.622 6.916-1.865 1.685-1.243 2.527-2.93 2.527-5.061 0-1.865-.82-3.352-2.46-4.462-1.64-1.11-3.725-2.131-6.252-3.064-2.527-.932-5.231-1.931-8.113-2.997a43.076 43.076 0 0 1-8.114-3.995 20.588 20.588 0 0 1-6.251-6.127c-1.64-2.487-2.46-5.683-2.46-9.59 0-3.286.686-6.216 2.06-8.791a18.467 18.467 0 0 1 5.587-6.394c2.35-1.687 5.099-2.974 8.247-3.862 3.147-.888 6.495-1.332 10.042-1.332Zm-197.709 0c4.523 0 8.358.577 11.506 1.731 3.147 1.155 5.608 2.22 7.382 3.197 1.507.8 2.394 1.865 2.66 3.197s.044 2.752-.665 4.262l-1.33 2.397c-.798 1.599-1.818 2.531-3.06 2.797-1.241.267-2.704.045-4.389-.666-1.507-.71-3.325-1.442-5.453-2.197-2.128-.755-4.611-1.132-7.449-1.132-2.926 0-5.187.577-6.783 1.731-1.596 1.155-2.394 2.797-2.394 4.928 0 1.865.82 3.375 2.46 4.529 1.641 1.154 3.725 2.176 6.252 3.064 2.527.887 5.232 1.842 8.113 2.863a40.313 40.313 0 0 1 8.114 3.93 20.588 20.588 0 0 1 6.251 6.126c1.64 2.487 2.46 5.639 2.46 9.457 0 3.02-.598 5.794-1.795 8.325-1.197 2.53-2.926 4.728-5.187 6.593-2.261 1.865-4.988 3.33-8.18 4.396-3.192 1.065-6.74 1.598-10.64 1.598-5.498 0-10.131-.8-13.9-2.398s-6.672-3.107-8.712-4.528c-1.507-.888-2.35-1.998-2.527-3.33-.177-1.332.222-2.753 1.197-4.262l1.596-2.398c.975-1.42 2.062-2.22 3.259-2.397 1.197-.178 2.638.177 4.323 1.065 1.596.888 3.657 1.887 6.184 2.997 2.528 1.11 5.52 1.665 8.978 1.665 2.927 0 5.232-.622 6.917-1.865 1.685-1.243 2.527-2.93 2.527-5.061 0-1.865-.82-3.352-2.46-4.462-1.641-1.11-3.725-2.131-6.252-3.064-2.527-.932-5.232-1.931-8.114-2.997a43.076 43.076 0 0 1-8.113-3.995 20.588 20.588 0 0 1-6.251-6.127c-1.64-2.487-2.461-5.683-2.461-9.59 0-3.286.687-6.216 2.062-8.791a18.467 18.467 0 0 1 5.586-6.394c2.35-1.687 5.099-2.974 8.246-3.862 3.148-.888 6.496-1.332 10.042-1.332ZM491.832 33c3.724 0 5.587 1.865 5.587 5.594v27.438c0 .888-.023 1.665-.067 2.331-.044.666-.11 1.266-.2 1.798a11.572 11.572 0 0 0-.132 1.599h.266c.798-1.599 1.928-3.22 3.391-4.862 1.463-1.643 3.192-3.13 5.188-4.462 1.995-1.332 4.256-2.397 6.783-3.197 2.527-.799 5.254-1.198 8.18-1.198 7.537 0 13.367 2.042 17.49 6.127 4.124 4.084 6.185 10.655 6.185 19.713v38.093c0 3.73-1.862 5.595-5.586 5.595h-5.72c-3.724 0-5.586-1.865-5.586-5.595v-34.63c0-4.174-.71-7.526-2.128-10.057-1.419-2.53-4.256-3.796-8.512-3.796-2.927 0-5.609.578-8.047 1.732-2.439 1.154-4.5 2.73-6.185 4.728-1.685 1.998-2.993 4.374-3.924 7.126-.93 2.753-1.396 5.728-1.396 8.924v25.973c0 3.73-1.863 5.595-5.587 5.595h-5.72c-3.723 0-5.585-1.865-5.585-5.595v-83.38c0-3.73 1.862-5.594 5.586-5.594h5.72ZM403.46 59.639c3.636 0 5.454 1.865 5.454 5.594v56.741c0 3.73-1.818 5.595-5.454 5.595h-5.852c-3.636 0-5.453-1.865-5.453-5.595v-56.74c0-3.73 1.817-5.595 5.453-5.595h5.852Zm-112.855 0c3.37 0 5.364 1.643 5.985 4.928l10.907 39.692c.177.977.332 1.865.465 2.664.133.8.288 1.554.466 2.265.177.799.31 1.554.399 2.264h.266c.089-.71.222-1.465.399-2.264.177-.71.332-1.465.465-2.265.133-.799.333-1.687.599-2.664l11.439-39.692c.62-3.196 2.66-4.795 6.118-4.795h5.054c3.281 0 5.32 1.599 6.119 4.795l11.305 39.692c.266.977.466 1.865.599 2.664.133.8.288 1.554.465 2.265.178.799.31 1.554.4 2.264h.265c.089-.71.222-1.465.4-2.264.177-.71.332-1.465.465-2.265.133-.799.332-1.687.598-2.664l10.774-39.692c.798-3.285 2.837-4.928 6.118-4.928h6.119c2.04 0 3.458.577 4.256 1.732.798 1.154.931 2.663.399 4.528l-17.424 57.008c-.887 3.108-2.97 4.662-6.251 4.662h-8.912c-3.37 0-5.453-1.599-6.251-4.795l-10.242-33.965a29.224 29.224 0 0 1-.665-2.664 52.115 52.115 0 0 0-.532-2.398c-.177-.799-.31-1.554-.399-2.264h-.266c-.177.71-.355 1.465-.532 2.264-.177.71-.355 1.51-.532 2.398a29.224 29.224 0 0 1-.665 2.664l-10.242 33.965c-.798 3.196-2.837 4.795-6.118 4.795h-9.177c-3.193 0-5.232-1.554-6.119-4.662l-17.557-57.008c-.532-1.865-.377-3.374.466-4.528.842-1.155 2.239-1.732 4.19-1.732h6.384Z",fill:"#4A4A49",fillRule:"nonzero"}),f.createElement("path",{d:"M0 146.685c35.32 16.893 78.912 8.533 105.246-22.845C136.46 86.648 131.612 31.203 94.418 0L69.692 29.462c29.057 24.377 32.845 67.694 8.46 96.75C58.706 149.378 26.691 157.114 0 146.684",fill:"url(#swish_logo_svg__a)",transform:"translate(50.006 20.581)"}),f.createElement("path",{d:"M0 146.685c35.32 16.893 78.912 8.533 105.246-22.845a88.51 88.51 0 0 0 8.524-12.067c4.159-25.843-4.987-53.159-26.5-71.207a76.989 76.989 0 0 0-17.575-11.1c29.055 24.377 32.84 67.691 8.456 96.745C58.707 149.38 26.693 157.115 0 146.685",fill:"url(#swish_logo_svg__b)",transform:"translate(50.006 20.581)"}),f.createElement("path",{d:"M125.821 8.56C90.501-8.331 46.91.029 20.575 31.407c-31.214 37.192-26.366 92.637 10.828 123.84l24.727-29.462c-29.058-24.377-32.846-67.694-8.46-96.75C67.114 5.866 99.128-1.869 125.82 8.561",fill:"url(#swish_logo_svg__c)"}),f.createElement("path",{d:"M125.821 8.56C90.501-8.331 46.91.029 20.575 31.407a88.492 88.492 0 0 0-8.524 12.067c-4.159 25.843 4.987 53.158 26.5 71.207a76.99 76.99 0 0 0 17.575 11.1c-29.054-24.377-32.84-67.691-8.456-96.746C67.114 5.866 99.128-1.869 125.82 8.561",fill:"url(#swish_logo_svg__d)"}))))};let $=()=>(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"my-2 flex flex-col justify-between gap-1 sm:flex-row",children:[(0,x.jsxs)("div",{className:"flex items-center gap-1 self-start sm:self-center",children:[(0,x.jsx)("span",{role:"img","aria-label":"Klarna, logotyp",className:"h-4",children:(0,x.jsx)(Q,{})}),(0,x.jsx)("span",{role:"img","aria-label":"Swish, logotyp",className:"bg-elevated flex h-4 items-center rounded-md",children:(0,x.jsx)(J,{})})]}),(0,x.jsxs)("div",{className:"mt-2 flex gap-1 pr-4 sm:mt-0 sm:gap-12",children:[(0,x.jsxs)("a",{className:"w-15 h-6 shrink-0 sm:mr-4",href:"https://www.lakemedelsverket.se/sv/handel-med-lakemedel/apotek",target:"_blank",rel:"noreferrer",children:[(0,x.jsx)(q.t,{publicId:"apotek_legal",objectFit:"contain",width:250,aspectRatio:2.5,layout:"constrained",alt:""}),(0,x.jsx)("span",{className:"sr-only",children:"L\xe4s mer om apotek med tillst\xe5nd hos L\xe4kemedelsverket"})]}),(0,x.jsxs)("div",{className:"flex shrink-0 gap-1 sm:gap-2",children:[(0,x.jsxs)("a",{className:"flex h-6",href:"https://www.lakemedelsverket.se/sv/handel-med-lakemedel/foretag-som-saljer-lakemedel-via-e-handel/sok-foretag-med-e-handel/e-handlare/a00001/apotek-hjartat-ab",target:"_blank",rel:"noreferrer",children:[(0,x.jsx)(q.t,{publicId:"pharmacy_eu_logo_animal",aspectRatio:1.2,layout:"constrained",objectFit:"contain",width:200,alt:""}),(0,x.jsx)("span",{className:"sr-only",children:"Klicka h\xe4r f\xf6r att kontrollera om webbplatsen \xe4r laglig"})]}),(0,x.jsxs)("a",{className:"flex h-6",href:"https://www.lakemedelsverket.se/sv/handel-med-lakemedel/foretag-som-saljer-lakemedel-via-e-handel/sok-foretag-med-e-handel/e-handlare/a00001/apotek-hjartat-ab",target:"_blank",rel:"noreferrer",children:[(0,x.jsx)(q.t,{publicId:"pharmacy_eu_logo",aspectRatio:1.2,layout:"constrained",objectFit:"contain",width:200,alt:""}),(0,x.jsx)("span",{className:"sr-only",children:"Klicka h\xe4r f\xf6r att kontrollera om webbplatsen \xe4r laglig"})]})]})]})]}),(0,x.jsx)("hr",{className:"border-default absolute h-[1px] w-[calc(100%-32px)] sm:left-0 sm:right-0 sm:w-full"}),(0,x.jsxs)("div",{className:"flex h-fit w-full flex-col items-center justify-between py-3 sm:flex-row sm:py-2",children:[(0,x.jsx)(A.Z,{className:"order-2 mt-4 w-full sm:order-1 sm:mt-0 sm:w-fit",typography:"subHeading",color:"text-inverse",asChild:!0,children:(0,x.jsx)("span",{children:(0,x.jsx)(Y.Z,{id:"COMMON.FOOTER.LEGAL.COPYRIGHT_TEXT",values:{currentYear:new Date().getFullYear()}})})}),(0,x.jsx)("div",{className:"order-1 flex w-full flex-col gap-2 sm:order-2 sm:w-fit sm:flex-row sm:gap-5",children:K.map(e=>(0,x.jsx)(A.Z,{typography:"subHeading",color:"text-inverse",asChild:!0,children:(0,x.jsx)(S.Y,{href:e.href,style:{textDecoration:"none"},forceAnchorLink:e.isEpiLink,children:e.title})},e.href))})]})]}),ee=e=>{let{links:t}=e;return(0,x.jsx)(_,{className:"gap-2 md:gap-3",links:t,variant:l.bodyBig})};var et=r(75509);let er=()=>(0,x.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:mt-0",children:[(0,x.jsx)(A.Z,{color:"text-inverse",className:"font-bold",children:(0,x.jsx)(Y.Z,{id:"COMMON.FOOTER.SOCIAL.FOLLOW"})}),(0,x.jsx)("div",{className:"flex gap-1",children:G.map(e=>(0,x.jsx)("a",{className:"bg-default outline-default hover:bg-elevated flex h-5 w-5 items-center justify-center rounded-full outline-2 outline-offset-2 focus-visible:outline",href:e.href,target:"_blank",rel:"noopener noreferrer","aria-label":e.ariaLabel,children:(0,x.jsx)(et.J,{name:e.icon,fill:"fill-action-dark","aria-hidden":!0})},e.icon))})]}),en=()=>(0,x.jsxs)("div",{className:"mt-4 w-full",children:[(0,x.jsx)(M.Z,{viewBox:"0 0 1440 102",preserveAspectRatio:"none",sx:{height:"auto",width:"100%",marginBottom:{xs:-2,sm:-2}},children:(0,x.jsx)(H,{})}),(0,x.jsx)("div",{className:"bg-inverse relative flex h-fit min-h-[732px] w-full flex-col items-center pt-4",children:(0,x.jsx)("footer",{className:"flex w-full flex-col items-center",children:(0,x.jsxs)(O.j3,{children:[(0,x.jsxs)("div",{className:"flex w-full flex-col md:flex-row",children:[(0,x.jsx)("div",{className:"pl-1 md:mr-3 md:min-w-[216px] lg:mr-4 xl:min-w-[248px]",children:(0,x.jsx)(M.Z,{inheritViewBox:!0,sx:{height:50,width:196},children:(0,x.jsx)(T,{})})}),(0,x.jsxs)(k.Z,{maxWidth:O.pp,height:"fit-content",display:"grid",rowGap:{xs:0,sm:2},columnGap:{xs:0,sm:2},width:"100%",gridTemplateColumns:{xs:"repeat(1, minmax(0, 1fr))",sm:"repeat(3, minmax(0, 1fr))",lg:"repeat(4, minmax(0, 1fr))",xl:"repeat(6, minmax(0, 1fr))"},children:[(0,x.jsx)(N.ZP,{item:!0,gridColumn:{lg:"1",xl:"1 / span 3"},display:{xs:"none",sm:"none",lg:"block"}}),(0,x.jsx)(N.ZP,{item:!0,marginLeft:1,children:(0,x.jsx)(ee,{links:V})}),(0,x.jsx)(N.ZP,{item:!0,marginTop:{xs:3,sm:0},marginBottom:{xs:1,sm:0},children:(0,x.jsxs)(Z.Z,{spacing:{xs:1,sm:4},children:[(0,x.jsx)(F,{linksData:z.about}),(0,x.jsx)(F,{linksData:z.services})]})}),(0,x.jsx)(N.ZP,{item:!0,children:(0,x.jsxs)(Z.Z,{spacing:{xs:1,sm:4},children:[(0,x.jsx)(F,{linksData:z.help}),(0,x.jsx)(F,{linksData:z.popularCategories})]})})]})]}),(0,x.jsxs)(k.Z,{marginTop:"auto",paddingX:1,children:[(0,x.jsx)(er,{}),(0,x.jsx)($,{})]})]})})})]});var ei=r(59526),ea=r(42492),el=r(86896),es=r(68415),eo=r(1669),ec=r(98456),ed=r(67720),eu=r(58826),eh=r(93946),ex=r(54776),ef=r(57820),em=r(32092),ep=r(33203),ev=r(93105),eg=r(45805),ej=r(94819),ey=r(47932),eb=r(50109),eE=r(41561),ew=r(76321),eC=r(33517),ek=r(80891),eN=r(18376),eZ=r(45409),eM=r(39402),eO=r(18097),eI=r(31297);let eT=e=>{let{promotionText:t,promotionTarget:r}=e,n="ClubMember"===r;return t||n?(0,x.jsxs)(Z.Z,{direction:"row",gap:1,padding:e=>e.spacing(.7,1.8),borderRadius:100,width:"fit-content",bgcolor:e=>n?e.palette["color/background/visual"]:e.palette["color/background/notice"],children:[n&&(0,x.jsx)(M.Z,{"aria-hidden":"false","aria-label":"Klubb Hj\xe4rtat, logotyp",role:"img",inheritViewBox:!0,fontSize:"small",sx:{minWidth:70},children:(0,x.jsx)(eI.Z,{})}),t&&(0,x.jsx)(A.Z,{className:"font-bold",color:n?"text-brand":"text-notice",children:t})]}):null},eR=e=>{var t,r,n;let{title:i,imageUrl:a,image:l,articleUrl:s,quantity:o,setQuantity:c,maxQuantity:d,updateQuantity:u,priceDetails:h,promotions:f,onRemoveLineItem:m,rxItem:p}=e,v=(0,el.Z)(),g=(null==h?void 0:null===(t=h.find(e=>e.type===ew.TK.OriginalPrice))||void 0===t?void 0:t.value)||0,j=p?(null==h?void 0:null===(r=h.find(e=>e.type===ew.TK.SubsidizedPrice))||void 0===r?void 0:r.value)||0:(null==h?void 0:null===(n=h.find(e=>e.type===ew.TK.DiscountPrice))||void 0===n?void 0:n.value)||0,y=(null==l?void 0:l.url)||a;return(0,x.jsxs)(k.Z,{children:[(0,x.jsx)(Z.Z,{p:"16px",children:(0,x.jsxs)(Z.Z,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",columnGap:2,children:[(0,x.jsx)(k.Z,{minWidth:"72px",children:(0,x.jsx)(eM.S,{height:72,width:72,preset:"medium",objectFit:"contain",layout:"fixed",src:{url:y,publicId:null==l?void 0:l.cloudinaryPublicId},shouldUseRxFallback:p,alt:"Image of ".concat(i)})}),(0,x.jsxs)(Z.Z,{flexGrow:"2",children:[(0,x.jsxs)(k.Z,{mb:2,children:[(0,x.jsxs)(Z.Z,{direction:"row",justifyContent:"space-between",alignItems:"baseline",gap:1,children:[(0,x.jsx)(A.Z,{typography:"headingSmall",asChild:!!s,className:"py-1",children:s?(0,x.jsx)("a",{className:"no-underline",href:s,children:(0,eZ.y)(i)}):(0,eZ.y)(i)}),(0,x.jsx)(k.Z,{mr:-1,children:(0,x.jsx)(eC.Q,{removeItem:m,itemTitle:i})})]}),f&&f.map(e=>(0,x.jsx)(eT,{promotionText:e.promotionDisplayName,promotionTarget:e.promotionTarget},e.promotionDisplayName))]}),(0,x.jsxs)(Z.Z,{gap:1,children:[d&&(0,x.jsxs)(Z.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,x.jsx)(M.Z,{color:"primary",fontSize:"inherit",children:(0,x.jsx)(eN.Z,{})}),(0,x.jsx)(A.Z,{typography:"footnote",color:"text-subtle",children:(0,x.jsx)(Y.Z,{id:p?"MAXPURCHASE.TEXT.RX":"MAXPURCHASE.TEXT",values:{maxQuantity:d}})})]}),(0,x.jsxs)(Z.Z,{direction:"row",justifyContent:"space-between",children:[(0,x.jsx)(k.Z,{minWidth:122,children:(0,x.jsx)(ek.c,{quantity:o,maxQuantity:d||void 0,maxQuantityReason:d?(0,x.jsx)(Y.Z,{id:p?"TOOLTIP.RX_QUANTITY_LIMIT":"MINICART.MAX_QUANTITY",values:{maxQuantity:d}}):void 0,minQuantity:0,setQuantity:c,updateFunctionFromParent:u})}),(0,x.jsx)(Z.Z,{direction:"column",alignItems:"flex-end",justifyContent:"space-evenly",children:g!==j?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(eO.p,{price:j,size:"medium",color:p?"text-default":"text-notice"}),(0,x.jsx)("span",{className:"sr-only relative",children:p?v.formatMessage({id:"CART.LINEITEM.RX.SUBSIDIZED"}):v.formatMessage({id:"CART.LINEITEM.HV.DISCOUNT"})}),(0,x.jsx)(eO.p,{price:g,strikeThrough:!0,size:"xsmall",color:"text-subtle"})]}):(0,x.jsx)(eO.p,{price:g,size:"medium"})})]})]})]})]})}),(0,x.jsx)(ed.Z,{})]})},eA=e=>{var t,r,n;let{lineItem:i,cartId:a,index:l,cartLoading:s}=e,[o,c]=(0,f.useState)(0),[d,u]=(0,f.useState)(!1),{updateCart:h,removeLineItem:m,getPrescriptionDetails:p}=(0,eo.g)(),v=null==i?void 0:i.priceDetails,g=null==v?void 0:null===(t=v.find(e=>e.type===ew.TK.OriginalUnitPrice))||void 0===t?void 0:t.value,j=null==v?void 0:null===(r=v.find(e=>e.type===ew.TK.DiscountPrice))||void 0===r?void 0:r.value;(0,f.useEffect)(()=>{if(!d){let e=(null==i?void 0:i.quantity)||0;c(e),u(!0)}},[i,c,d,u,v]),(0,f.useEffect)(()=>{i.quantity&&(s||c(i.quantity))},[i,c,s]);let y=(0,f.useCallback)(async(e,t)=>{if(i){let r=i.articleCode?p(i.articleCode):null,n=null!=r,a=n?(0,eE.A)(r,e,t):{name:i.title,articleCode:i.articleCode,originalPrice:g,discountedPrice:j,index:l,oldQuantity:e,newQuantity:t,listName:"Produkt"};t>e?(0,eb.$)(a):(0,eb.s)(a)}i.id&&await h({cartId:a,quantity:t,lineItemId:i.id,articleCode:i.articleCode||""}).catch(()=>c(e))},[i,p,g,j,l,h,a]),b=async()=>{if(null==i?void 0:i.id){let e=i.articleCode?p(i.articleCode):null,t=null!=e;await m(i.id);let r=t?(0,eE.A)(e,o,0):{name:i.title,articleCode:i.articleCode,originalPrice:g,discountedPrice:j,index:l,oldQuantity:o,newQuantity:0,listName:"Produkt"};(0,eb.s)(r)}};return(0,x.jsx)(eR,{title:i.title||"",articleUrl:i.articleUrl,imageUrl:i.imageUrl,image:i.image,setQuantity:c,updateQuantity:y,onRemoveLineItem:b,quantity:o,maxQuantity:i.maxQuantity,priceDetails:v,promotions:null===(n=i.hvItemProperties)||void 0===n?void 0:n.promotions,rxItem:!!i.rxItemProperties})},eL=()=>{let{cart:e}=(0,eo.x)(),t=t=>{var r,n;return(null==e?void 0:null===(n=e.priceDetails)||void 0===n?void 0:null===(r=n.find(e=>e.type===t))||void 0===r?void 0:r.value)||0},r=t(ey.TK.TotalDiscount),n=t(ey.TK.TotalExcludingShipping),i=t(ey.TK.TotalBonus),a=(null==e?void 0:e.bonusVouchers)&&(null==e?void 0:e.bonusVouchers.length)>0;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(Z.Z,{gap:.5,children:[(null==e?void 0:e.promotions)?(0,x.jsx)(Z.Z,{direction:"column",gap:.5,children:e.promotions.map(e=>(0,x.jsxs)(Z.Z,{width:"100%",direction:"row",justifyContent:"space-between",alignItems:"center",textAlign:"right",children:[(0,x.jsx)(A.Z,{children:e.promotionDisplayName},e.promotionDisplayName),e.salesPrice?(0,x.jsx)(eO.p,{price:-e.salesPrice,inline:!0,size:"small",color:"text-notice"}):null]}))}):null,r?(0,x.jsxs)(Z.Z,{width:"100%",direction:"row",justifyContent:"space-between",alignItems:"center",textAlign:"right",children:[(0,x.jsx)(A.Z,{children:(0,x.jsx)(Y.Z,{id:"MINICART.DISCOUNT"})}),(0,x.jsx)(eO.p,{price:r,inline:!0,size:"small"})]}):null,a?(0,x.jsxs)(Z.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",textAlign:"right",children:[(0,x.jsx)(A.Z,{children:(0,x.jsx)(Y.Z,{id:"SUMMARY.VOUCHER"})}),(0,x.jsx)(eO.p,{price:-i,inline:!0,size:"small",color:"text-notice"})]}):null]}),(0,x.jsxs)(Z.Z,{direction:"row",justifyContent:"space-between",mb:1,alignItems:"center",textAlign:"right",children:[(0,x.jsx)(A.Z,{typography:"headingSmall",children:"Totalt"}),(0,x.jsx)(eO.p,{price:n,inline:!0,size:"large"})]})]})},eS=()=>{var e,t,r,n;let{cart:i,loading:a,error:l,errorMessage:s,isMiniCartOpen:o,articleCount:c}=(0,eo.x)(),{setIsMiniCartOpen:d,deleteCart:u,fetch:h}=(0,eo.g)(),v=null==i?void 0:null===(e=i.lineItems)||void 0===e?void 0:e.filter(e=>"Hv"===e.productGroup),g=null==i?void 0:null===(t=i.lineItems)||void 0===t?void 0:t.filter(e=>"Rx"===e.productGroup),j=(0,m.useRouter)(),y=0===c(),b=(0,f.useRef)(null),[E,w]=(0,f.useState)(!1),N=null==i?void 0:i.prescriptionDetails,[O,I]=(0,f.useState)(!1),T=(0,el.Z)();(0,f.useEffect)(()=>{l&&I(!0)},[l]);let R=(0,f.useCallback)(()=>{I(!1),h()},[h]);return(0,x.jsx)(eu.ZP,{anchor:"right",open:o,onClose:()=>d(!1),PaperProps:{sx:{width:{xs:"100%",md:"500px"},borderTopLeftRadius:{md:24},borderBottomLeftRadius:{md:24}}},children:(0,x.jsxs)(Z.Z,{justifyContent:"space-between",height:"100%",width:"100%",children:[(0,x.jsx)(Z.Z,{direction:"row",alignItems:"flex-end",bgcolor:"color/background/elevated",px:2,py:3,height:100,children:(0,x.jsxs)(Z.Z,{direction:"row",alignItems:"center",width:"100%",justifyContent:"space-between",children:[(0,x.jsx)(A.Z,{typography:"headingExtraLarge",color:"text-brand",children:(0,x.jsx)(Y.Z,{id:"MINICART.TITLE"})}),(0,x.jsx)(eh.Z,{"aria-label":"L\xe4mna varukorg",onClick:()=>d(!1),children:(0,x.jsx)(M.Z,{fontSize:"medium",sx:{color:"color/icon/default"},children:(0,x.jsx)(ep.Z,{})})})]})}),(0,x.jsx)(ed.Z,{}),(0,x.jsxs)(Z.Z,{height:"100%",overflow:"auto",justifyContent:y?"center":"flex-start",ref:b,children:[!y&&!a&&i&&(0,x.jsxs)(x.Fragment,{children:[null==v?void 0:v.map((e,t)=>(0,x.jsx)(eA,{lineItem:e,cartId:null!==(r=i.id)&&void 0!==r?r:"",index:t,cartLoading:a},e.id)),(0,x.jsx)("div",{children:!!(null==g?void 0:g.length)&&(null==N?void 0:N.map(e=>{var t,r,l,s,o,c;return(0,x.jsxs)(Z.Z,{children:[(0,x.jsxs)(k.Z,{p:"16px",bgcolor:C.Z.palette["color/background/default"],children:[(0,x.jsx)(A.Z,{typography:"bodyBig",className:"font-bold",children:(0,x.jsx)(Y.Z,{id:e.isForAnimal?"MINICART.PRESCRIPTION_ANIMAL":"MINICART.PRESCRIPTION_FOR",values:{name:e.ownerFullName}})}),!e.isForAnimal&&(0,x.jsx)(A.Z,{color:"text-subtle",children:(0,eg.e)(e.personalNumber)})]}),g.filter(t=>{var r;return(null===(r=t.rxItemProperties)||void 0===r?void 0:r.prescriptionBagId)===e.id}).map((e,t)=>(0,x.jsx)(eA,{lineItem:e,index:t,cartId:null!==(n=i.id)&&void 0!==n?n:"",cartLoading:a},e.id)),(0,x.jsx)("span",{className:"sr-only relative",children:T.formatMessage({id:"SUMMARY.CART.RX"})}),(0,x.jsxs)(Z.Z,{p:"16px",children:[(0,x.jsxs)(Z.Z,{gap:.5,children:[(0,x.jsxs)(Z.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,x.jsx)(A.Z,{children:(0,x.jsx)(Y.Z,{id:"MINICART.PRESCRIPTION_PRICE_TOTAL"})}),(0,x.jsx)(ej.pf,{price:(null===(r=e.priceDetails)||void 0===r?void 0:null===(t=r.find(e=>e.type===ey.TK.GrossPrice))||void 0===t?void 0:t.value)||0,size:"small"})]}),(0,x.jsxs)(Z.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,x.jsx)(A.Z,{children:(0,x.jsx)(Y.Z,{id:"MINICART.PRESCRIPTION_DISCOUNT"})}),(0,x.jsx)(ej.pf,{price:(null===(s=e.priceDetails)||void 0===s?void 0:null===(l=s.find(e=>e.type===ey.TK.TotalBenefit))||void 0===l?void 0:l.value)||0,size:"small"})]})]}),(0,x.jsxs)(Z.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,x.jsx)(A.Z,{children:(0,x.jsx)(Y.Z,{id:"MINICART.PRESCRIPTION_PRICE"})}),(0,x.jsx)(ej.pf,{price:(null===(c=e.priceDetails)||void 0===c?void 0:null===(o=c.find(e=>e.type===ey.TK.TotalPrice))||void 0===o?void 0:o.value)||0,size:"medium"})]})]})]},e.id)}))}),!E&&(0,x.jsx)(Z.Z,{padding:"16px",alignItems:"center",children:(0,x.jsx)(ev.z,{"data-pw":"mini-cart-empty-button",onClick:()=>w(!0),variant:"secondary",children:(0,x.jsx)(Y.Z,{id:"MINICART.EMPTY_CART"})})})]}),y&&!a&&(0,x.jsx)(A.Z,{color:"text-brand",className:"text-center font-bold",children:(0,x.jsx)(Y.Z,{id:"MINICART.EMPTY"})}),a&&(0,x.jsx)(Z.Z,{alignItems:"center",justifyContent:"center",height:"100%",children:(0,x.jsx)(ec.Z,{color:"primary"})})]}),(0,x.jsx)(ex.Z,{direction:"up",in:E,container:b.current,mountOnEnter:!0,unmountOnExit:!0,children:(0,x.jsxs)(Z.Z,{width:"100%",alignItems:"center",justifyContent:"center",bgcolor:"#E5F1E4",p:"24px",children:[(0,x.jsx)(A.Z,{typography:"bodyBig",children:(0,x.jsx)(Y.Z,{id:"MINICART.ARE_YOU_SURE"})}),(0,x.jsxs)(Z.Z,{direction:"row",mt:"16px",justifyContent:"space-evenly",whiteSpace:"nowrap",width:"100%",children:[(0,x.jsx)(ev.z,{"data-pw":"mini-cart-empty-no-button",onClick:()=>w(!1),variant:"secondary",children:(0,x.jsx)(Y.Z,{id:"MINICART.NO"})}),(0,x.jsx)(ev.z,{"data-pw":"mini-cart-empty-yes-button",onClick:()=>{u(),w(!1)},children:(0,x.jsx)(Y.Z,{id:"MINICART.YES"})})]})]})}),l&&(0,x.jsx)(ef.Z,{open:O,autoHideDuration:5e3,onClose:R,anchorOrigin:{vertical:"top",horizontal:"center"},children:(0,x.jsx)(k.Z,{children:(0,x.jsx)(em.o,{"data-pw":"mini-cart-alert",severity:"info",variant:"filled",title:s})})}),(0,x.jsx)(Z.Z,{padding:"16px",bgcolor:C.Z.palette["color/background/default"],children:y?(0,x.jsx)(ev.z,{"data-pw":"mini-cart-start-shopping-button",onClick:()=>d(!1),children:(0,x.jsx)(Y.Z,{id:"MINICART.START_SHOPPING"})}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("span",{className:"sr-only relative",children:T.formatMessage({id:"SUMMARY.CART.TOTAL"})}),(0,x.jsx)(eL,{}),(0,x.jsx)(ev.z,{"data-pw":"mini-cart-go-to-checkout-button",className:"w-full",onClick:()=>{j.asPath.includes("rekommendationer")?p().push("/kassa"):p().push("/rekommendationer").then(()=>d(!1))},children:(0,x.jsx)(Y.Z,{id:"MINICART.GO_TO_CHECKOUT"})})]})})]})})};var e_=r(82918),eP=r(49769),eD=r(31214),eB=r(78064),eF=r(62728),eU=r(59556),eH=r(82144);let ez=()=>{let e=(0,m.useRouter)(),{user:t}=(0,eH.L)(),{fetch:r}=(0,eH._)();(0,f.useEffect)(()=>{void 0===t&&r()},[r,t]);let n=void 0!==t,i=(0,eU.y)("prescription","/mina-recept/receptlistan");return(0,f.useMemo)(()=>({onClickButton:()=>n?e.push("/mina-recept/receptlistan"):e.push(i)}),[n,e,i])};var eV=r(11838),eK=r(78851);let eG=[{title:"Hem",href:"/"},{title:"R\xe5dgivning",href:"/tips-och-rad"},{title:"Klubb Hj\xe4rtat",href:"/klubb-hjartat/mina-sidor"},{title:"Hitta apotek",href:"/hitta-apotek-hjartat",isEpiLink:!0},{title:"Kontakta oss",href:"/kundservice/kontakta-oss"},{title:"Produkter",href:"/produkter"}],eY=()=>{let e=(0,el.Z)(),t=ez(),r=e=>(0,e_.u)((0,e_.s)(e.href));return(0,x.jsx)("nav",{className:"py-1.5 md:py-1",children:(0,x.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,x.jsx)("div",{className:"md:hidden",children:(0,x.jsx)(eK.v,{})}),(0,x.jsx)("ul",{className:"hidden list-none gap-4 md:flex",children:eG.map(e=>(0,x.jsx)("li",{children:(0,x.jsx)(S.Y,{underline:"none",sx:{typography:e=>e.typography.body1,color:e=>e.palette["color/text/default"],"&.Mui-focusVisible":{outline:e=>"1px solid ".concat(e.palette["color/border/action"],"}"),outlineOffset:"2px"}},href:e.href,forceAnchorLink:e.isEpiLink,featureName:e.feature,onClick:()=>r(e),children:e.title})},e.href))}),(0,x.jsxs)("div",{className:"flex gap-2",children:[(0,x.jsx)("div",{className:"md:hidden",children:(0,x.jsx)(es.g,{icon:"Pill",size:"medium",text:e.formatMessage({id:"COMMON.HEADER.RECIPES"}),onClick:t.onClickButton})}),(0,x.jsx)("div",{className:"hidden md:block",children:(0,x.jsxs)(ev.z,{"data-pw":"top-navigation-button",size:"small",onClick:t.onClickButton,children:[(0,x.jsx)(et.J,{size:"small",name:"Pill"}),(0,x.jsx)(Y.Z,{id:"COMMON.HEADER.RECIPES"})]})}),(0,x.jsx)(eV.D,{})]})]})})},eq=()=>{let[e,t,r]=function(e){let[t,r]=(0,f.useState)(!1),n=(0,f.useCallback)(()=>r(e=>!e),[]);return[t,n,r]}(),n=(0,m.useRouter)(),{formatMessage:i}=(0,el.Z)();(0,f.useEffect)(()=>{let e=()=>{r(!1)};return n.events.on("routeChangeStart",e),()=>{n.events.off("routeChangeStart",e)}},[n,r,t]);let a=e=>(0,e_.u)((0,e_.s)(e.href));return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(es.g,{size:"extraLarge",icon:"Menu",onClick:t,variant:"secondary"}),(0,x.jsx)(eD.j,{title:i({id:"COMMON.HEADER.MENU"}),isOpen:e,onClose:t,anchor:"left",children:(0,x.jsxs)("nav",{className:"flex flex-col gap-2 px-1",children:[(0,x.jsx)(eB.M,{links:eG,variant:"secondary",onLinkClick:a,typography:"bodyBig",className:"mt-1"}),(0,x.jsx)(eB.M,{links:eF.h,variant:"primary",onLinkClick:a,className:"my-1.5"}),(0,x.jsx)("div",{className:"my-1.5",children:(0,x.jsx)(eP.b,{})})]})})]})};var eX=r(87109),eQ=r(63032),eW=r(88078),eJ=r(78551),e$=r(90512),e0=r(73016),e1=r(75010),e2=r(46471),e4=r(26978),e3=r(96495),e5=r(80360),e8=r(41664),e6=r.n(e8),e7=r(36443);let e9=e=>{let{categories:t}=e;return(null==t?void 0:t.length)?(0,x.jsx)("ul",{className:"flex flex-wrap gap-x-0.5 gap-y-1.5",children:t.map(e=>(0,x.jsx)("li",{className:"",children:(0,x.jsx)(e6(),{href:(0,e7.x5)(e.href),rel:"nofollow",className:"bg-visual text-action-dark mr-0 inline-flex rounded-2xl px-1.5 py-0.5 text-sm no-underline",children:e.name})},e.href))}):null},te=e=>{let{results:t}=e;return(null==t?void 0:t.length)?(0,x.jsx)("ul",{className:"flex flex-col gap-1.5",children:t.map(e=>(0,x.jsx)("li",{children:(0,x.jsx)(A.Z,{typography:"link",asChild:!0,children:(0,x.jsx)(S.Y,{rel:"nofollow",href:e.href,children:e.name})})},e.href))}):null};var tt=r(97039);let tr=e=>{let{articles:t}=e;return(null==t?void 0:t.length)?(0,x.jsx)("ul",{className:"flex flex-col divide-y-2",children:t.map((e,t)=>(0,x.jsx)("li",{className:"border-subtle p-2",children:(0,x.jsx)(tt.I,{variant:"searchresult",article:e,index:t+1,listName:"s\xf6kresultat"})},e.articleCode))}):null},tn=e=>(0,e2.D)(e.name)&&(0,e2.D)(e.href),ti=e=>void 0!==e.storeName?{name:e.storeName,href:e.slug}:{name:e.name,href:e.slug},ta=e=>{let{heading:t,children:r}=e;return(0,x.jsxs)("div",{className:"bg-elevated flex-1 rounded-md py-2",role:"group","aria-roledescription":"S\xf6kresultat",children:[(0,x.jsx)(A.Z,{typography:"headingMedium",color:"text-default",className:"border-subtle border-b bg-inherit px-2 pb-1",children:t}),(0,x.jsx)("div",{className:"px-2 pt-2",children:r})]})},tl=e=>{let{searchPhrase:t}=e,{data:r,...n}=(0,eJ.a)({queryKey:["quick-search",{searchPhrase:t}],queryFn:async()=>{(0,e0.u)(t);let e=new e5.H;return e.getSearchResult({searchPhrase:t,take:4,source:e3.xH.All,type:e3.Sc.QuickSearch})},select(e){var t,r,n,i,a,l,s,o,c,d,u,h,x,f;return{articles:null!==(d=null==e?void 0:null===(r=e.articles)||void 0===r?void 0:null===(t=r.results)||void 0===t?void 0:t.slice(0,4))&&void 0!==d?d:[],categories:null!==(u=null===(n=e.categories)||void 0===n?void 0:n.map(ti).filter(tn).slice(0,4))&&void 0!==u?u:[],brands:null!==(h=null===(a=e.brands)||void 0===a?void 0:null===(i=a.results)||void 0===i?void 0:i.map(ti).filter(tn).slice(0,4).map(e=>({...e,name:(0,e1.f)(e.name)})).sort((0,e4.M)("name")))&&void 0!==h?h:[],information:null!==(x=null===(s=e.pages)||void 0===s?void 0:null===(l=s.results)||void 0===l?void 0:l.map(ti).filter(tn).slice(0,4))&&void 0!==x?x:[],pharmacies:null!==(f=null===(c=e.stores)||void 0===c?void 0:null===(o=c.results)||void 0===o?void 0:o.map(ti).filter(tn).slice(0,4).map(e=>({...e,name:"Apotek Hj\xe4rtat ".concat(e.name)})))&&void 0!==f?f:[]}},enabled:t.length>2,staleTime:1/0,gcTime:12e4}),i=(0,m.useRouter)(),a=(0,el.Z)();if(r){let e=r.articles.length>0?(0,x.jsx)(ta,{heading:a.formatMessage({id:"COMMON.HEADER.SEARCH.PRODUCTS"}),children:(0,x.jsx)("div",{className:"-m-2",children:(0,x.jsx)(tr,{articles:r.articles})})}):null,n=r.categories.length>0?(0,x.jsx)(ta,{heading:a.formatMessage({id:"COMMON.HEADER.SEARCH.CATEGORIES"}),children:(0,x.jsx)(e9,{categories:r.categories})}):null,l=r.brands.length>0?(0,x.jsx)(ta,{heading:a.formatMessage({id:"COMMON.HEADER.SEARCH.BRANDS",defaultMessage:"Varum\xe4rken"}),children:(0,x.jsx)(te,{results:r.brands})}):null,s=r.information.length>0?(0,x.jsx)(ta,{heading:a.formatMessage({id:"COMMON.HEADER.SEARCH.INFORMATION",defaultMessage:"Information"}),children:(0,x.jsx)(te,{results:r.information})}):null,o=r.pharmacies.length>0?(0,x.jsx)(ta,{heading:a.formatMessage({id:"COMMON.HEADER.SEARCH.APOTEK",defaultMessage:"Apotek"}),children:(0,x.jsx)(te,{results:r.pharmacies})}):null,c=!e&&!n&&!l&&!s&&!o;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:(0,e$.Z)("bg-default overflow-auto p-1.5",{hidden:c}),children:[(0,x.jsxs)("div",{className:"flex flex-col gap-y-1.5 md:hidden",children:[e,n,l,s,o]}),(0,x.jsxs)("div",{className:"hidden grid-cols-3 items-start gap-x-1.5 md:grid",children:[e,(0,x.jsxs)("div",{className:"flex flex-col gap-y-1.5",children:[n,l]}),(0,x.jsxs)("div",{className:"flex flex-col gap-y-1.5",children:[s,o]})]})]}),(0,x.jsx)("div",{className:(0,e$.Z)("md:bg-default sticky bottom-0 grid place-items-center px-2 py-1.5 md:place-items-end md:pt-0",{hidden:c}),children:(0,x.jsxs)(ev.z,{size:"medium",variant:"primary",className:"max-md:w-full",onClick:()=>i.push({pathname:"/soksida",query:{query:t}}),children:["Visa alla tr\xe4ffar",(0,x.jsx)(et.J,{name:"ArrowRight",size:"medium"})]})})]})}return n.error||"fetching"!==n.fetchStatus?null:(0,x.jsxs)("div",{className:"bg-default flex flex-col gap-y-1.5 p-1.5 md:grid md:grid-cols-3",children:[(0,x.jsx)("div",{className:"bg-elevated rounded-md p-2",children:(0,x.jsx)(eW.Z,{variant:"rounded",height:80})}),(0,x.jsx)("div",{className:"bg-elevated rounded-md p-2",children:(0,x.jsx)(eW.Z,{variant:"rounded",height:80})}),(0,x.jsx)("div",{className:"bg-elevated rounded-md p-2",children:(0,x.jsx)(eW.Z,{variant:"rounded",height:80})})]})},ts=e=>{let{placeholder:t,onClose:r}=e,[n,i]=(0,f.useState)(""),a=(0,f.useDeferredValue)(n),l=(0,m.useRouter)();return(0,x.jsxs)("div",{className:"bg-elevated flex flex-col overflow-hidden",children:[(0,x.jsxs)("div",{className:"bg-elevated sticky top-0 z-[1] flex flex-row gap-4 px-2 py-1.5",children:[(0,x.jsx)(eQ.ZP,{value:n,onKeyDown:e=>{"Enter"===e.key&&l.push({pathname:"/soksida",query:{query:n}})},autoFocus:!0,placeholder:t,fullWidth:!0,sx:{display:"flex",borderRadius:"100px",backgroundColor:e=>e.palette["color/background/default"],paddingX:2.5,paddingY:1.5,"& .MuiInputBase-input":{typography:e=>e.typography.body1,color:e=>e.palette["color/text/subtle"]}},onChange:e=>{i(e.target.value)},startAdornment:(0,x.jsx)(eX.Z,{position:"start",children:(0,x.jsx)(et.J,{name:"MagnifyingGlass",fill:"fill-action",size:"large"})}),endAdornment:n.length>0?(0,x.jsx)(eX.Z,{position:"end",children:(0,x.jsx)("button",{type:"button","aria-label":"Rensa",className:"focus-within:outline",onKeyDown:e=>e.stopPropagation(),onClick:()=>{i("")},children:(0,x.jsx)(Y.Z,{id:"COMMON.HEADER.SEARCH.CLEAR"})})}):null}),(0,x.jsxs)("button",{"aria-label":"St\xe4ng",type:"button",onClick:r,children:[(0,x.jsx)("div",{className:"sr-only",children:(0,x.jsx)(Y.Z,{id:"COMMON.HEADER.SEARCH.CLOSE"})}),(0,x.jsx)(et.J,{name:"Close",size:"large"})]})]}),(0,x.jsx)(tl,{searchPhrase:a})]})},to=()=>{let e=(0,el.Z)(),{fetch:t,setIsMiniCartOpen:r}=(0,eo.g)();(0,f.useEffect)(()=>{t()},[]);let n=()=>r(!0);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(Z.Z,{display:{md:"none"},direction:"row",paddingY:1.5,gap:1,alignItems:"center",children:[(0,x.jsx)(eq,{}),(0,x.jsx)(td,{placeholder:e.formatMessage({id:"COMMON.HEADER.SEARCH.PLACEHOLDER.MOBILE"}),useFullScreenDialog:!0}),(0,x.jsx)(tc,{onClick:n})]}),(0,x.jsxs)(Z.Z,{display:{xs:"none",md:"flex"},direction:"row",paddingY:1.5,gap:4,alignItems:"center",children:[(0,x.jsx)(eK.v,{}),(0,x.jsx)(td,{placeholder:e.formatMessage({id:"COMMON.HEADER.SEARCH.PLACEHOLDER.DESKTOP"})}),(0,x.jsx)(tc,{onClick:n})]}),(0,x.jsx)(eS,{})]})},tc=e=>{var t;let{onClick:r}=e,{articleCount:n}=(0,eo.x)(),i=(0,el.Z)();return(0,x.jsxs)("div",{className:"relative flex",children:[(0,x.jsx)(es.g,{variant:"secondary",size:"extraLarge",icon:"Cart",onClick:r,"aria-label":i.formatMessage({id:"MINICART.TITLE_QUANTITY"},{quantity:null===(t=n())||void 0===t?void 0:t.toString()})}),(0,x.jsx)(ei.Z,{badgeContent:n(),max:99,"data-pw":"mini-cart-badge",overlap:"circular",anchorOrigin:{vertical:"top",horizontal:"right"},sx:{"&.MuiBadge-root":{position:"initial"},"& .MuiBadge-badge":{color:e=>e.palette["color/text/notice"],background:e=>e.palette["color/background/notice"],fontWeight:700,width:24,height:24,borderRadius:"100px"}}})]})},td=e=>{let{placeholder:t,useFullScreenDialog:r}=e,[n,i]=(0,f.useState)(!1),[a,l]=(0,f.useState)(),s=(0,m.useRouter)();return(0,f.useEffect)(()=>{let e=()=>{i(!1)};return s.events.on("routeChangeComplete",e),()=>{s.events.off("routeChangeComplete",e)}},[s]),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("button",{type:"button",className:"focus-visible:outline-action bg-default flex flex-auto flex-row items-center justify-start gap-0.5 self-stretch rounded-[100px] border-none py-1.5 hover:cursor-text focus-visible:outline max-[389px]:px-1 min-[390px]:px-2.5 md:px-3",onClick:e=>{l(e.currentTarget.getBoundingClientRect()),i(!0)},children:[(0,x.jsx)(et.J,{name:"MagnifyingGlass",fill:"fill-action",size:"large"}),(0,x.jsx)(A.Z,{color:"text-subtle",className:"md:max-w-auto max-w-[179px] whitespace-nowrap",asChild:!0,children:(0,x.jsx)("span",{children:t})})]}),(0,x.jsx)(ea.Z,{open:n,onClose:()=>i(!1),maxWidth:!1,sx:[{"& .MuiDialog-container":{position:"relative"},"& .MuiDialog-paper":{top:"".concat(null==a?void 0:a.top,"px"),left:r?void 0:"".concat(null==a?void 0:a.left,"px"),position:"absolute",margin:0,borderRadius:6,maxHeight:"80vh",width:r?"100%":"".concat(null==a?void 0:a.width,"px"),maxWidth:Object.entries(O.AT).reduce((e,t)=>{let[r,n]=t;return e[r]="calc(100% - (".concat(n," * 2))"),e},{})}}],children:(0,x.jsx)(ts,{placeholder:t,onClose:()=>i(!1)})})]})},tu=(0,v.Z)({...C.Z,breakpoints:{mqs:C.Z.breakpoints.mqs,keys:["xs","sm","md","lg","xl","xxl"],values:{...C.Z.breakpoints.values,xxl:1920}}}),th=e=>{let{seo:t,top:r,header:n,hero:i,sidebar:a,wave:l=!0,children:s}=e,o=(0,m.useRouter)(),c=!!a,{isEnabled:d}=(0,w.Xm)("aph_features_rosa_banded");return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(j.PB,{...t}),(0,x.jsxs)(g.Z,{theme:tu,children:[null!=r?r:(0,x.jsx)(E.z,{}),n?(0,x.jsx)(O.j3,{className:"bg-elevated",children:n}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(O.j3,{className:"bg-elevated",children:(0,x.jsx)(eY,{})}),(0,x.jsx)(O.j3,{className:"bg-elevated z-header sticky top-0",children:(0,x.jsx)(to,{})})]}),(0,x.jsx)(y.S,{children:(0,x.jsx)("div",{id:"main-content",className:(0,b.cn)("xxl:[--content-width:1400px] relative isolate z-[1] [--vertical-margin:12px] sm:[--vertical-margin:24px] md:[--vertical-margin:40px] xl:[--content-width:1112px]",{"bg-[--wave-color]":l,"[--grid-gap:theme(spacing.3)] md:[--sidebar-width:216px] lg:[--grid-gap:theme(spacing.4)] xl:[--sidebar-width:248px]":c,"[--wave-color:#F7CED7]":d}),style:{"--container-width":"calc(var(--content-width) + var(--sidebar-width) + var(--grid-gap))","--offset-left":"calc(var(--sidebar-width) + var(--grid-gap))","--offset-right-xl":"calc((100vw - var(--container-width)) / 2)","--offset-left-xl":"calc(var(--offset-right-xl) + var(--sidebar-width) + var(--grid-gap))"},children:(0,x.jsxs)("div",{className:(0,b.cn)("mx-auto pt-2 md:pt-4",{"flex-row-reverse md:flex md:gap-[--grid-gap] xl:max-w-[--container-width]":c}),children:[(0,x.jsxs)("div",{className:(0,b.cn)("flex w-full flex-col",{"md:max-xl:-ml-[--offset-left]":c}),children:[i?(0,x.jsx)("div",{className:(0,b.cn)("pb-3 max-md:px-[--vertical-margin]",{"md:max-xl:pl-[calc(var(--offset-left)_+_var(--vertical-margin))] md:max-xl:pr-[--vertical-margin]":c,"w-full md:max-xl:px-[--vertical-margin] xl:mx-auto xl:max-w-[--content-width]":!c}),children:i}):null,(0,x.jsxs)("div",{className:(0,b.cn)("bg-default h-full",{"xl:-ml-[--offset-left-xl] xl:-mr-[--offset-right-xl]":c}),children:[l?(0,x.jsx)(tx,{}):null,(0,x.jsx)("div",{className:(0,b.cn)("max-md:px-[--vertical-margin]",{"md:max-xl:pl-[calc(var(--offset-left)_+_var(--vertical-margin))] md:max-xl:pr-[--vertical-margin] xl:pl-[--offset-left-xl] xl:pr-[--offset-right-xl]":c,"md:max-xl:px-[--vertical-margin] xl:mx-auto xl:max-w-[--content-width]":!c,"pt-2":l}),children:s})]})]}),c?(0,x.jsx)(tf,{children:a}):null]})})},o.pathname),(0,x.jsx)(en,{})]})]})},tx=()=>(0,x.jsx)("div",{className:"xxl:h-[56px] relative -mt-[1px] h-[18px] w-full bg-[--wave-color] sm:h-[24px] md:h-[34px] lg:h-[40px] xl:h-[46px]","aria-hidden":!0,children:(0,x.jsx)("svg",{className:"absolute inset-0 mt-[1px] h-full w-full fill-[#F6F6F6]",viewBox:"0 0 1920 58",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("path",{d:"M608.75 0C291.25 0 80.667 21.967 0 32.697V58h1920V38.303c-9.6 1.37-100.7 13.079-347.5 13.079C1264 51.382 974.25 0 608.75 0Z"})})}),tf=e=>{let{children:t}=e;return(0,x.jsx)("aside",{className:"relative w-[--sidebar-width] shrink-0 max-md:hidden md:max-xl:left-[--vertical-margin]",children:(0,x.jsx)("div",{className:"bg-elevated rounded-2xl px-1 py-2",children:t})})}},94375:function(e,t,r){r.d(t,{Q:function(){return I}});var n=r(85893),i=r(67294),a=r(90970),l=r(88078),s=r(34386),o=r(30202),c=r(78551),d=r(20249),u=r(44012),h=r(50109),x=r(85207),f=r(40878),m=r(1669),p=r(80891),v=r(84363),g=r(93105),j=r(55703),y=r(42492),b=r(61730),E=r(88085),w=r(87746),C=r(8916);let k=e=>{let{showDialog:t,onClose:r}=e,i=(0,b.Z)(C.Z.breakpoints.down("sm"));return(0,n.jsxs)(y.Z,{sx:{"& .MuiDialog-container":{alignItems:{xs:"flex-end",sm:"center"}}},PaperProps:{sx:{maxWidth:{xs:"100vw",sm:"724px"},px:{xs:2,sm:4},pt:6,pb:4,borderTopLeftRadius:24,borderTopRightRadius:24,borderBottomLeftRadius:{xs:0,sm:24},borderBottomRightRadius:{xs:0,sm:24},m:{xs:0,sm:6}}},open:t,onClose:()=>r(!1),children:[(0,n.jsx)(w.Z,{color:"text-brand",typography:"headingExtraLarge",asChild:!0,children:(0,n.jsx)("h1",{children:(0,n.jsx)(u.Z,{id:"ADD_ARTICLE_TO_CART.DIKLOFENAK.TITLE"})})}),(0,n.jsx)(w.Z,{className:"xs:mb-5 whitespace-pre-line sm:mb-3",children:(0,n.jsx)(u.Z,{id:"ADD_ARTICLE_TO_CART.DIKLOFENAK.TEXT"})}),(0,n.jsxs)(E.Z,{justifyContent:"flex-end",flexDirection:{xs:"column-reverse",sm:"row"},gap:1,children:[(0,n.jsx)(g.z,{"data-pw":"diklofenak-cancel-button",variant:"tertiary",size:i?"large":"medium",width:i?"full":"auto",onClick:()=>r(!1),children:(0,n.jsx)(u.Z,{id:"ADD_ARTICLE_TO_CART.DIKLOFENAK.CANCEL"})}),(0,n.jsx)(g.z,{"data-pw":"diklofenak-confirm-button",variant:"primary",size:i?"large":"medium",width:i?"full":"auto",onClick:()=>r(!0),children:(0,n.jsx)(u.Z,{id:"ADD_ARTICLE_TO_CART.DIKLOFENAK.CONFIRM"})})]})]})},N=(0,i.forwardRef)((e,t)=>{let{onClick:r,article:a,isLoading:l,size:s,disabled:o,...c}=e,[d,h]=(0,i.useState)(!1),{hasVariants:x,activeSubstances:f,isAvailableForPurchase:m,requiresPrescriptionForPurchase:p,articleUrlSegment:y,name:b}=null!=a?a:{},E=(0,i.useMemo)(()=>x?m?"ADD_ARTICLE_TO_CART.BUTTON.HAS_VARIANTS":"ADD_ARTICLE_TO_CART.BUTTON.NOT.BUYABLE":p?"ADD_ARTICLE_TO_CART.BUTTON.BUY_VIA_PRESCRIPTION":m?"ADD_ARTICLE_TO_CART.BUTTON.BUYABLE":"ADD_ARTICLE_TO_CART.BUTTON.NOT.BUYABLE",[x,p,m]),w=(0,i.useMemo)(()=>x?(0,j.V)(y):p?"/mina-recept/receptlistan/":void 0,[x,p,y]),C=!m&&!p||o;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g.z,{"data-pw":"add-article-to-cart-button",ref:t,onClick:C?e=>{e.preventDefault()}:()=>{let e=(f||[]).map(e=>e.toLocaleLowerCase()).includes("diklofenak");e?h(!0):w||r()},width:"full",asChild:!!w,isLoading:l,size:s,"aria-label":"ADD_ARTICLE_TO_CART.BUTTON.BUYABLE"===E?"K\xf6p ".concat(b):void 0,"aria-disabled":C,className:C?"bg-action-subtle text-action-subtle hover:bg-action-subtle cursor-auto active:bg-action-subtle":"",...c,children:w?(0,n.jsx)(v.Y,{href:w,children:(0,n.jsx)(u.Z,{id:E})}):(0,n.jsx)(u.Z,{id:E})}),(0,n.jsx)(k,{showDialog:d,onClose:e=>{e&&r(),h(!1)}})]})});async function Z(e){let t=await (0,f.aX)(e);if(t.errorMessage)throw Error(t.errorMessage);if(t.cart)return t.cart;throw Error("N\xe5got gick fel, f\xf6rs\xf6k igen")}function M(e){let{cart:t,updated:r}=(0,m.x)(),n=(0,o.NL)();return(0,i.useEffect)(()=>{var e,i;(null!==(i=null===(e=n.getQueryState(["getCart"]))||void 0===e?void 0:e.dataUpdatedAt)&&void 0!==i?i:0)<r&&n.setQueryData(["getCart"],t)},[t,n,r]),(0,c.a)({queryKey:["getCart"],queryFn:()=>(0,f.dv)().then(e=>{if(e.cart)return e.cart;throw Error(e.errorMessage)}),gcTime:0,staleTime:1/0,enabled:!!t,select:e,initialData:t})}let O=e=>M(t=>{var r;return(null===(r=t.lineItems)||void 0===r?void 0:r.find(t=>t.articleCode===e))||void 0}),I=e=>{var t,r;let{article:c,listName:f,size:v,index:g}=e,{replaceCart:j}=(0,m.g)(),{data:y,isLoading:b}=M(e=>e.id),{data:E}=O(null==c?void 0:c.articleCode),w=(null==E?void 0:E.quantity)||0,C=(0,o.NL)(),{mutateAsync:k,isError:I,isPending:T,error:R,reset:A}=(0,d.D)({mutationFn:Z,onSuccess:j,onError:()=>C.invalidateQueries({queryKey:["getCart"]})}),L=(0,i.useCallback)(async(e,t)=>{var r;await k({cartId:null!=y?y:"",quantity:t,articleCode:(null==c?void 0:c.articleCode)||"",lineItemId:null!==(r=null==E?void 0:E.id)&&void 0!==r?r:"",recommendationsInfo:null==c?void 0:c.trackingId},{onSuccess(){let r={...(0,x.cL)(c||{}),listName:f,oldQuantity:e,index:g,newQuantity:t};t>e?(0,h.$)(r):(0,h.s)(r)}})},[k,y,null==E?void 0:E.id,c,g,f]);return b?(0,n.jsx)(l.Z,{variant:"rounded",height:"small"===v?32:40}):w>0?(0,n.jsx)(p.c,{size:v,fullWidth:!0,quantity:w,error:null==R?void 0:R.message,onDismissError:()=>A(),maxQuantity:null==c?void 0:null===(t=c.maxQuantityPerOrder)||void 0===t?void 0:t.maxQuantity,maxQuantityReason:(0,n.jsx)(u.Z,{id:"MAXPURCHASE.REASON.".concat(null==c?void 0:null===(r=c.maxQuantityPerOrder)||void 0===r?void 0:r.reason)}),minQuantity:0,updateFunctionFromParent:L}):(0,n.jsx)(a.d,{onClickAway:()=>A(),children:(0,n.jsx)(s.Z,{placement:"top",arrow:!0,title:(null==R?void 0:R.message)||!1,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,open:I,children:(0,n.jsx)(N,{article:c,isLoading:T,size:v,onClick:()=>L(w,w+1)})})})}},23178:function(e,t,r){r.d(t,{c:function(){return u},F:function(){return h}});var n=r(85893);r(67294);var i=r(88078),a=r(26447),l=r(44012),s=r(87746),o=r(35154);let c={small:"priceSmall",medium:"priceMedium",large:"priceLarge"},d=e=>{let{price:t,strikeThrough:r,label:i,color:a="text-subtle",unit:l,size:d="large"}=e;return(0,n.jsxs)("div",{className:"flex flex-col items-baseline",children:[(0,n.jsx)(s.Z,{typography:"subHeading",color:"text-subtle",children:i}),(0,n.jsxs)(s.Z,{typography:c[d],className:r?"line-through":"",color:a,children:[(0,o.T)(t),l]})]})},u=e=>{let{price:t,tags:r,size:s,spread:o,showOnlyOnePrice:c,loading:u}=e,{webPrice:h,salesPrice:x}=t||{};if(u)return(0,n.jsx)(i.Z,{height:41,children:(0,n.jsx)(d,{price:100,size:s,label:(0,n.jsx)(l.Z,{id:"ARTICLE.CAMPAIGN"})})});if(!h)return null;if(x){let e=null==r?void 0:r.find(e=>"ClubMemberFlyer"===e.type);return(0,n.jsxs)(a.Z,{justifyContent:o?"space-between":"flex-start",width:o?"100%":void 0,direction:"row",gap:o?1:3,alignItems:"flex-end",children:[(0,n.jsx)(d,{price:x,size:s,color:e?"text-brand":"text-notice",label:(0,n.jsx)(l.Z,{id:e?"ARTICLE.CLUB":"ARTICLE.CAMPAIGN"})}),!c&&(0,n.jsx)(d,{price:h,size:s,strikeThrough:!0,label:(0,n.jsx)(l.Z,{id:"ARTICLE.WEB"})})]})}return(0,n.jsx)(a.Z,{justifyContent:o?"space-between":"flex-start",width:o?"100%":void 0,direction:"row",gap:o?1:3,children:(0,n.jsx)(d,{price:h,size:s,color:"text-brand",label:(0,n.jsx)(l.Z,{id:"ARTICLE.WEB"})})})},h=e=>{var t,r;let{product:c,loading:d}=e;if(d)return(0,n.jsxs)(a.Z,{direction:"row",gap:1,height:50,children:[(0,n.jsx)(i.Z,{children:(0,n.jsx)(s.Z,{typography:"priceLarge",children:"priser"})}),(0,n.jsx)(i.Z,{children:(0,n.jsx)(s.Z,{typography:"priceLarge",children:"priser"})})]});if(!c.price)return null;let{price:h,isWebSaleOnly:x}=c,{retailPrice:f,webPrice:m=0}=h,p=f&&f>m&&!x;return(0,n.jsxs)(a.Z,{gap:1,children:[(0,n.jsx)(u,{price:h}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(null===(t=h.comparisonPrice)||void 0===t?void 0:t.pricePerUnit)&&(0,n.jsxs)(s.Z,{typography:"subHeading",color:"text-subtle",children:[(0,o.T)(null===(r=h.comparisonPrice)||void 0===r?void 0:r.pricePerUnit),h.comparisonPrice.unit?(0,n.jsx)(l.Z,{id:"ARTICLE.COMPARISON.UNIT.".concat(h.comparisonPrice.unit)}):void 0]}),p&&(0,n.jsxs)(s.Z,{typography:"subHeading",color:"text-subtle",children:[(0,n.jsx)(l.Z,{id:"ARTICLE.RETAIL",values:{price:""}}),(0,o.T)(f)]})]})]})}},90462:function(e,t,r){r.d(t,{D:function(){return c}});var n=r(13903),i=r(9750),a=r(36443),l=r(88718),s=r(34155);let o=e=>{if(e)return s.env.CONTENTFUL_PREVIEW_TOKEN};class c extends i.J{async getEntityBySlug(e){var t;let{data:r,error:i}=await this.client.GET("/content/v{version}/content/environments/{environmentId}",{params:{path:{version:"1",environmentId:null!==(t=s.env.CONTENTFUL_ENVIRONMENT)&&void 0!==t?t:"master"},query:{limit:1,include:10,"fields.slug":e.slug,content_type:e.contentType,preview_token:o(e.preview)}}});if(i)throw i;return(0,n.Z)(r,{removeUnresolved:!0,itemEntryPoints:["fields"]})[0]}async getPage(e){return this.getEntityBySlug(e).then(t=>(0,a.WN)(t.fields.slug,e.slug)?t:(l.k.debug("Redirect to ".concat(t.fields.slug)),{isRedirect:!0,location:(0,a.I)((0,a.mz)(t.fields.slug))}))}async getNavigation(e){let{data:t,error:r,response:n}=await this.client.GET("/content/v{version}/navigations",{params:{path:{version:"1"},query:{type:e.type,slug:e.slug,levels:e.levels}}});return r?(l.k.error({...r,url:n.url},"getNavigation: ".concat(r.title,".")),[]):t}}},1466:function(e,t,r){r.d(t,{b:function(){return o}});var n=r(85893),i=r(67294),a=r(90149),l=r(73982),s=r(88186);let o=(0,i.forwardRef)(function(e,t){let{fit:r,quality:i,className:o,alt:c,priority:d,unstyled:u,...h}=e,x=function(e,t){let r=new URL(e.startsWith("//")?"https:".concat(e):e);return t.fit&&r.searchParams.set("fit",t.fit),t.quality&&r.searchParams.set("q",t.quality.toString()),r}(h.src,{fit:r,quality:i});if("images.ctfassets.net"!==x.host)return(0,n.jsx)(l.Y,{children:(0,n.jsxs)("div",{className:"bg-notice-dark text-inverse rounded-md p-2",children:[(0,n.jsx)("b",{children:x.host})," is not a valid CDN url for Contentful images (maybe the asset too large, 20MB+)"]})});let f=(0,s.P)({...h,src:x.toString(),cdn:"contentful"});return(0,n.jsxs)("picture",{className:"contents",children:[(0,n.jsx)(a.H,{...f,type:"image/webp"}),(0,n.jsx)(a.E,{...f,ref:t,alt:c,priority:d,unstyled:u,className:o})]})})},9640:function(e,t,r){r.d(t,{z:function(){return v}});var n=r(85893),i=r(67294),a=r(86437),l=r(45139),s=r(84363),o=r(75509),c=r(87746),d=r(80190),u=r(71289),h=r(70825),x=r(43213);let f=()=>{let[e,t]=(0,i.useState)([]),{data:r}=x.h.content.getInfoBar.useQuery({slug:"global-service-message"},{staleTime:6e4,retry:!1});return{hideInfoBar:e=>{t(t=>[...t,e])},isInfoBarHidden:t=>!!(t&&e.includes(t)),globalServiceMessage:r}},m=(0,l.j)("bg-action child:text-inverse child:fill-inverse",{variants:{color:{Green:"bg-action-dark child:text-inverse child:fill-inverse",Pink:"bg-notice child:text-notice child:fill-notice",Winter:"child:text-[#D6E9F5] child:fill-[#D6E9F5] bg-[#0D6BA5]",Summer:"child:text-action-dark child:fill-action-dark bg-[#FFE17F]",Autumn:"child:text-[#FAE2CC] child:fill-[#FAE2CC] bg-[#B24A0A]",Christmas:"child:text-[#FBD6CB] child:fill-[#FBD6CB] bg-[#850304]","Black week":"child:text-[#F6F6F6] child:fill-[#F6F6F6] bg-[#262626]","Rosa bandet":"child:text-default child:fill-default bg-[#F7CED7]",Error:"child:text-inverse child:fill-inverse bg-[#B91509]"}}}),p=e=>(0,n.jsx)(c.Z,{typography:"subHeading",children:e}),v=e=>{let{data:t}=e,{hideInfoBar:r,isInfoBarHidden:i,globalServiceMessage:l}=f(),c=l||t,x=!c||i(c.slug);if(x)return null;let{displayText:v,linkUrl:g,slug:j,color:y}=c,b=(0,n.jsx)(h.E,{field:v,overrideNodes:{[a.BLOCKS.PARAGRAPH]:(e,t)=>p(t)}}),E=!!g;return(0,n.jsx)(u.j3,{className:(0,d.cn)(m({color:y}),{"child-hover:underline underline-offset-2":E}),children:(0,n.jsxs)("div",{className:"relative m-auto flex min-h-[40px] flex-row items-center justify-center",children:[E?(0,n.jsxs)(s.Y,{className:"flex",href:g,children:[b,(0,n.jsx)(o.J,{name:"ArrowheadRight",className:"ml-[4px]",size:"small"})]}):b,(0,n.jsx)(o.J,{name:"Close",size:"small",className:"absolute right-0","aria-label":"close",onClick:()=>r(j)})]})})}},70825:function(e,t,r){r.d(t,{E:function(){return Y}});var n,i,a,l,s,o,c=r(85893),d=r(67294),u=r(80190),h=r(74129),x=r(86437),f=r(80822),m=r(15861),p=r(18721),v=r.n(p),g=r(94819),j=r(29400),y=r(84363),b=r(87746);let E=e=>"Asset"===e.sys.type;var w=r(83942),C=r(53219);function k(){return(k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var N=function(e){return d.createElement("svg",k({width:22,height:22,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n||(n=d.createElement("path",{fill:"#1E1E1E",d:"M0 0h22v22H0z"})),i||(i=d.createElement("path",{d:"M-954-894a2 2 0 0 1 2-2h2186c1.1 0 2 .895 2 2v3582c0 1.1-.9 2-2 2H-952c-1.105 0-2-.9-2-2V-894Z",fill:"#404040"})),a||(a=d.createElement("path",{d:"M-952-895h2186v-2H-952v2Zm2187 1v3582h2V-894h-2Zm-1 3583H-952v2h2186v-2Zm-2187-1V-894h-2v3582h2Zm1 1c-.552 0-1-.45-1-1h-2c0 1.66 1.343 3 3 3v-2Zm2187-1c0 .55-.45 1-1 1v2c1.66 0 3-1.34 3-3h-2Zm-1-3583c.55 0 1 .448 1 1h2c0-1.657-1.34-3-3-3v2Zm-2186-2a3 3 0 0 0-3 3h2a1 1 0 0 1 1-1v-2Z",fill:"#fff",fillOpacity:.1})),l||(l=d.createElement("g",{clipPath:"url(#check-filled_svg__a)"},d.createElement("rect",{x:-304,y:-583,width:1440,height:2601,rx:8,fill:"#F6F6F6"}),d.createElement("rect",{x:-16,y:-68,width:642,height:319,rx:24,fill:"#fff"}),d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 22c6.075 0 11-4.925 11-11S17.075 0 11 0 0 4.925 0 11s4.925 11 11 11Zm5.08-14.794c.364.31.408.856.099 1.22l-5.885 6.923a.865.865 0 0 1-1.335-.02l-2.77-3.462a.865.865 0 1 1 1.352-1.08l2.114 2.641 5.205-6.123a.865.865 0 0 1 1.22-.099Z",fill:"#175D30"}))),s||(s=d.createElement("defs",null,d.createElement("clipPath",{id:"check-filled_svg__a"},d.createElement("rect",{x:-304,y:-583,width:1440,height:2601,rx:8,fill:"#fff"})))))};function Z(){return(Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var M=function(e){return d.createElement("svg",Z({"data-name":"Lager 4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),o||(o=d.createElement("path",{d:"M18.54 4.16a1 1 0 0 0-1.38.3l-8.33 13-4.12-4.17a1 1 0 0 0-1.42 1.42l5 5a.47.47 0 0 1 .09.06l.08.07.11.05h.09A1 1 0 0 0 9 20a1.14 1.14 0 0 0 .33-.06h.08a1.07 1.07 0 0 0 .28-.19 1.34 1.34 0 0 0 .11-.14l9-14a1 1 0 0 0-.26-1.45z"})))};let O=e=>{let{iconVariant:t}=e;switch(t){case"Check":default:return(0,c.jsx)(C.Z,{viewBox:"0 0 24 24",color:"success",children:(0,c.jsx)(M,{"aria-hidden":"true"})});case"Check-filled":return(0,c.jsx)(C.Z,{viewBox:"0 0 24 24",color:"success",children:(0,c.jsx)(N,{"aria-hidden":"true"})})}},I=e=>{let{list:{listItems:t,iconVariant:r,disclaimer:n}}=e;return(0,c.jsxs)("ul",{className:"not-rich-text--component my-2 flex flex-col gap-2",children:[t.map(e=>(0,c.jsxs)("li",{className:"flex gap-1.5",children:[(0,c.jsx)(O,{iconVariant:r}),(0,c.jsx)(b.Z,{children:e})]},e)),null==n?void 0:n.map(e=>(0,c.jsx)("li",{className:"self-end",children:(0,c.jsx)(b.Z,{typography:"body",className:"italic",children:e})},e))]})};var T=r(1466);let R=e=>{let{image:t,alt:r}=e,{description:n,title:i,file:a}=t.fields;if(a.url){var l;let{url:e,details:t}=a;if(null==t?void 0:t.image)return(0,c.jsx)(T.b,{src:e,alt:null!==(l=null!=r?r:n)&&void 0!==l?l:i,width:t.image.width,height:t.image.height,layout:"constrained"})}return null};var A=r(79064),L=r(93105),S=r(75509),_=r(36443);let P=e=>{let{text:t,size:r,variant:n,link:i,isExternalLink:a}=e,l=(0,A.isAbsoluteUrl)(i)?i:(0,_.mz)(i);return(0,c.jsx)(L.z,{"data-pw":"button-link",size:r,variant:n,formTarget:a?"_blank":void 0,asChild:!0,children:(0,c.jsxs)(y.Y,{href:l,target:a?"_blank":void 0,rel:a?"noopener noreferrer":void 0,children:[t,a?(0,c.jsx)(S.J,{name:"BoxArrow",size:r}):null]})})},D=e=>{let{identifier:t,children:r}=e;return(0,c.jsx)(L.z,{className:"w-full","data-pw":"jump-hyperlink",onClick:()=>{let e=document.getElementById(t);e&&e.scrollIntoView({behavior:"smooth"})},variant:"tertiary",children:r})},B=e=>{let{identifier:t}=e;return(0,c.jsx)("div",{id:t,className:"-mt-10 pt-10 md:-mt-12 md:pt-12"})},F=e=>["data","content","nodeType"].every(t=>v()(e,t)),U=e=>(0,c.jsx)(V,{...e,type:"PlainLink"}),H=e=>(0,c.jsx)(V,{...e,type:"AssetLink"}),z=e=>(0,c.jsx)(V,{...e,type:"EntryLink"}),V=e=>{let{type:t,data:r,content:n}=e,i=G({content:n,data:{},nodeType:x.BLOCKS.DOCUMENT}),a=r.uri;if("AssetLink"===t&&(a=r.target.fields.file.url),"EntryLink"===t){var l;a=null===(l=r.target)||void 0===l?void 0:l.fields.slug}return(0,c.jsx)(b.Z,{typography:"link",color:"text-default",asChild:!0,children:(0,c.jsx)(y.Y,{href:a,children:i})})},K=e=>{let{children:t,variant:r,...n}=e;return(0,c.jsx)(m.Z,{...n,variant:r,margin:"unset",mt:2,children:t})},G=(e,t)=>(0,h.h)(e,{renderMark:{[x.MARKS.BOLD]:e=>(0,c.jsx)("b",{children:e}),[x.MARKS.ITALIC]:e=>(0,c.jsx)("i",{children:e}),[x.MARKS.UNDERLINE]:e=>(0,c.jsx)("u",{children:e}),[x.MARKS.CODE]:e=>(0,c.jsx)("code",{children:e})},renderNode:{[x.INLINES.HYPERLINK]:U,[x.INLINES.ASSET_HYPERLINK]:H,[x.INLINES.ENTRY_HYPERLINK]:(e,t)=>{var r;let{data:n,content:i}=e;if((null===(r=n.target)||void 0===r?void 0:r.sys.contentType.sys.id)==="jumpLinkComponent"){let{identifier:e}=n.target.fields;return(0,c.jsx)(D,{identifier:e,children:t})}return(0,c.jsx)(z,{data:n,content:i})},[x.BLOCKS.HEADING_1]:(e,t)=>(0,c.jsx)(b.Z,{typography:"headingExtraLarge",color:"text-brand",asChild:!0,children:(0,c.jsx)("h1",{children:t})}),[x.BLOCKS.HEADING_2]:(e,t)=>(0,c.jsx)(b.Z,{typography:"headingLarge",color:"text-brand",asChild:!0,children:(0,c.jsx)("h2",{children:t})}),[x.BLOCKS.HEADING_3]:(e,t)=>(0,c.jsx)(b.Z,{typography:"headingMedium",color:"text-default",asChild:!0,children:(0,c.jsx)("h3",{children:t})}),[x.BLOCKS.HEADING_4]:(e,t)=>(0,c.jsx)(b.Z,{typography:"headingSmall",color:"text-default",asChild:!0,children:(0,c.jsx)("h4",{children:t})}),[x.BLOCKS.HEADING_5]:(e,t)=>(0,c.jsx)(K,{variant:"h4",fontSize:15,children:t}),[x.BLOCKS.HEADING_6]:(e,t)=>(0,c.jsx)(K,{variant:"h4",fontSize:14,children:t}),[x.BLOCKS.PARAGRAPH]:(e,t)=>(0,c.jsx)(b.Z,{typography:"body",color:"text-default",children:t}),[x.BLOCKS.UL_LIST]:(e,t)=>(0,c.jsx)("ul",{className:"list-disc",children:t}),[x.BLOCKS.OL_LIST]:(e,t)=>(0,c.jsx)("ol",{className:"list-decimal",children:t}),[x.BLOCKS.HR]:()=>(0,c.jsx)("hr",{className:"border-default"}),[x.BLOCKS.EMBEDDED_ASSET]:e=>{let{data:t}=e;return E(t.target)?(0,c.jsx)(R,{image:t.target}):null},[x.BLOCKS.EMBEDDED_ENTRY]:e=>{let{data:t}=e;if("aphChecklist"===t.target.sys.contentType.sys.id){let e=t.target.fields;return(0,c.jsx)(I,{list:e})}if((0,w.O)(t.target)){let e=t.target.fields;return e.caption?(0,c.jsxs)("figure",{children:[(0,c.jsx)(R,{image:e.image,alt:e.altText}),(0,c.jsx)(b.Z,{typography:"subHeading",color:"text-subtle",asChild:!0,children:(0,c.jsx)("figcaption",{children:e.caption})})]}):(0,c.jsx)(R,{image:e.image,alt:e.altText})}if("jumpLinkComponent"===t.target.sys.contentType.sys.id){let{identifier:e}=t.target.fields;return(0,c.jsx)(B,{identifier:e})}if("componentAlert"===t.target.sys.contentType.sys.id){let{title:e,message:r,severity:n,content:i}=t.target.fields;return(0,c.jsx)(f.Z,{maxWidth:521,className:"not-rich-text--component",children:(0,c.jsx)(g.oi,{"data-pw":"rich-text-render-alert",title:e,severity:n,children:i?G(i):r&&r})})}if("componentAccordion"===t.target.sys.contentType.sys.id){let{title:e,body:r}=t.target.fields;return(0,c.jsx)(j.T,{accordionSummary:e,accordionDetails:G(r),id:e})}if("componentButtonLink"===t.target.sys.contentType.sys.id){let{link:e,text:r,size:n,variant:i,isExternalLink:a}=t.target.fields;return(0,c.jsx)(P,{link:e,size:n,text:r,variant:i,isExternalLink:a})}return null},...t||{}},renderText:e=>e.split("\n").flatMap((e,t)=>[t>0&&(0,c.jsx)("br",{},t),e])}),Y=e=>{let{field:t,overrideNodes:r,className:n,...i}=e;return(0,c.jsx)("div",{className:(0,u.cn)("rich-text--component",n),...i,children:F(t)?G(t,r):t})}},83942:function(e,t,r){r.d(t,{O:function(){return i},g:function(){return n}});let n=e=>"genericPage"===e.sys.contentType.sys.id,i=e=>"image"===e.sys.contentType.sys.id},72153:function(e,t,r){r.d(t,{E:function(){return i}});var n=r(88718);function i(){return""==='{"authRedirect":"/mina-recept/logga-in/","hasNoSessionRedirect":"/logga-ut/","isNotClubMemberRedirect":"/klubb-hjartat/bli-medlem/","clubMemberAuthRedirect":"/klubb-hjartat/mina-sidor/","start":"/"}'.toString()&&n.k.warn({},"No redirect config available, using default"),JSON.parse('{"authRedirect":"/mina-recept/logga-in/","hasNoSessionRedirect":"/logga-ut/","isNotClubMemberRedirect":"/klubb-hjartat/bli-medlem/","clubMemberAuthRedirect":"/klubb-hjartat/mina-sidor/","start":"/"}')}},30306:function(e,t,r){r.d(t,{u:function(){return s}});var n=r(67294),i=r(11163),a=r(7334),l=r.n(a);function s(){let e=(0,i.useRouter)(),t=(0,n.useMemo)(()=>{let t=e.asPath.split("?")[0],r=t.split("/").filter(e=>e.length>0);return r.map(l())},[e.asPath]);return(0,n.useCallback)((e,r)=>{let n=e.split("?")[0],i=n.split("/").filter(e=>e.length>0).map(l());return(null==r||!r.exact||i.length===t.length)&&i.every((e,r)=>e===t[r])},[t])}},93151:function(e,t,r){r.d(t,{P:function(){return h},F:function(){return u}});var n=r(57632),i=r(73445),a=r(782),l=r(88718);let s={data:null,loading:!1,error:!1,errorMessage:null,updated:0};var o=r(56830),c=r(48542);let d=async e=>{let t=o.nC.resolve(c.KU),r=await t.getBalanceV4(e,"aphTinman",void 0);return l.k.info("Correlation ID: ".concat(e," getBalanceV4() was called")),r},u=(0,i.Ue)()((0,a.mW)(e=>({bonusBalance:s,actions:{getBonusBalance:async()=>{let t=(0,n.Z)();e({bonusBalance:{...s,loading:!0,error:!1,errorMessage:null,updated:Date.now()}},!1,"Fetching bonusBalance");try{let r=await d(t);l.k.info("getBonusBalanceSaga, Correlation ID: ".concat(t," was fetched successfully")),e({bonusBalance:{data:r||s.data,loading:!1,error:!1,errorMessage:null,updated:Date.now()}},!1,"Fetching bonusBalance success")}catch(o){let{userMessage:r,status:n,httpStatusCode:i}=o,a="".concat(r||"N\xe5got gick fel! Tyv\xe4rr kan inte denna del visas just nu");l.k.error("getBonusBalanceSaga, Correlation ID: ".concat(t," failed to fetch | errorMessage: ").concat(a," | status: ").concat(n," | httpStatusCode: ").concat(i)),e({bonusBalance:{...s,loading:!1,error:!0,errorMessage:a,updated:Date.now()}},!1,"Fetching bonusBalance failed")}}}}),{name:"UseBonusBalance",anonymousActionType:"UseBonusBalance",enabled:!1})),h=()=>u(e=>e.actions)},40878:function(e,t,r){r.d(t,{Ap:function(){return d},aX:function(){return u},al:function(){return s},dv:function(){return l},y4:function(){return o}});var n=r(56830),i=r(88718),a=r(47932);let l=async()=>{let e=n.nC.resolve(a.hU);try{let t=await e.getCart("1",void 0,void 0,void 0);return{cart:t}}catch(e){if(i.k.error("cart.api.ts failed to fetch cart from service ".concat(JSON.stringify(e))),e instanceof a.sZ)return{errorDescription:e,errorMessage:e.detail};return{errorMessage:"N\xe5got gick fel, f\xf6rs\xf6k igen"}}},s=async e=>{let t=n.nC.resolve(a.hU);try{await t.deleteCart(e,"1",void 0,void 0,void 0)}catch(e){i.k.error("cart.api.ts failed to delete cart from service ".concat(JSON.stringify(e)))}},o=async e=>{let{cartId:t,lineItemId:r}=e,l=n.nC.resolve(a.hU);try{let e=await l.deleteCartLineItem(t,r,"1",void 0,void 0,void 0);return{cart:e}}catch(e){if(i.k.error("cart.api.ts failed to delete item from cart from service ".concat(JSON.stringify(e))),e instanceof a.sZ)return{errorDescription:e,errorMessage:e.detail};return{errorMessage:"N\xe5got gick fel, f\xf6rs\xf6k igen"}}},c=async(e,t)=>{let{cartId:r,recommendationsInfo:l}=e,s=n.nC.resolve(a.hU);if(!t.articleCode)throw Error();try{let e=await s.createCartLineItem(r,"1",l,void 0,void 0,new a.yr(t));return{cart:e}}catch(e){if(i.k.error("cart.api.ts failed to add item to cart from service ".concat(JSON.stringify(e))),e instanceof a.sZ)return{errorDescription:e,errorMessage:e.detail};return{errorMessage:"N\xe5got gick fel, f\xf6rs\xf6k igen"}}},d=async(e,t)=>{let{cartId:r,lineItemId:l,recommendationsInfo:s}=e,o=n.nC.resolve(a.hU);try{let e=await o.updateCartLineItem(r,l,"1",s,void 0,void 0,new a.jk(t));return{cart:e}}catch(e){if(i.k.error("cart.api.ts failed to update item in cart from service ".concat(JSON.stringify(e))),e instanceof a.sZ)return{errorDescription:e,errorMessage:e.detail};return{errorMessage:"N\xe5got gick fel, f\xf6rs\xf6k igen"}}},u=async e=>{let{lineItemId:t,cartId:r,quantity:n,recommendationsInfo:i,...a}=e;if(t){let e=await d({cartId:r,lineItemId:t,recommendationsInfo:i},{quantity:n});return e}let l=await c({cartId:r,lineItemId:t,recommendationsInfo:i},{quantity:n,...a});return l}},1669:function(e,t,r){r.d(t,{g:function(){return u},x:function(){return d}});var n,i=r(73445),a=r(782),l=r(74319),s=r(68944),o=r(68628),c=r(40878);let d=(0,i.Ue)()((0,a.mW)((e,t)=>({...o.T,isMiniCartOpen:!1,actions:{fetch:async()=>{e({loading:!0,updated:Date.now(),error:!1},!1,"Fetching Cart");let{cart:t,errorMessage:r}=await (0,c.dv)();t?e({cart:t,updated:Date.now(),error:!1,errorMessage:void 0,loading:!1},!1,"Fetched Cart"):e({error:!0,errorMessage:r,updated:Date.now(),loading:!1},!1,"Failed")},replaceCart:async t=>{e({cart:t,updated:Date.now()})},updateCart:async t=>{e(()=>({loading:!0,updated:Date.now()}),!1,"Updating Cart"),(0,l.fV)(),(0,s.$l)();let{cart:r,errorMessage:n}=await (0,c.aX)(t);return r?e(()=>({loading:!1,cart:r,updated:Date.now()}),!1,"Updated Cart"):e(()=>({loading:!1,error:!0,errorMessage:n,updated:Date.now()}),!1,"Failed"),(0,l.O6)(),(0,s.En)(),null!=r},deleteCart:async()=>{var r,n;let i=null===(n=t())||void 0===n?void 0:null===(r=n.cart)||void 0===r?void 0:r.id;if(!i)return;e(()=>({updated:Date.now(),loading:!0}),!1,"Begin Deleting Cart"),await (0,c.al)(i);let{cart:a,errorMessage:l}=await (0,c.dv)();a?e(()=>({updated:Date.now(),loading:!1,cart:a})):e(()=>({updated:Date.now(),loading:!1,error:!0,errorMessage:l}),!1,"Delete Failed")},removeLineItem:async(r,n)=>{var i,a;let l=(null===(a=t())||void 0===a?void 0:null===(i=a.cart)||void 0===i?void 0:i.id)||n;if(!l)return;e(()=>({loading:!0,updated:Date.now()}),!1,"Removing LineItem");let{cart:s,errorMessage:o}=await (0,c.y4)({cartId:l,lineItemId:r});s?e(()=>({loading:!1,cart:s,updated:Date.now()}),!1,"Removed LineItem"):e(()=>({loading:!1,error:!0,errorMessage:o,updated:Date.now()}),!1,"Failed")},updateLineItem:async(r,n)=>{var i,a;let{lineItemId:l,quantity:s}=r,o=(null===(a=t())||void 0===a?void 0:null===(i=a.cart)||void 0===i?void 0:i.id)||n;if(!o)return;e(()=>({loading:!0,updated:Date.now()}),!1,"Updating LineItem");let{cart:d,errorMessage:u}=await (0,c.Ap)({cartId:o,lineItemId:l},{quantity:s});d?e(()=>({updated:Date.now(),loading:!1,error:!1,cart:d}),!1,"Updated LineItem"):e(()=>({loading:!1,error:!0,errorMessage:u,updated:Date.now()}),!1,"Failed")},setIsMiniCartOpen:t=>{e(()=>({isMiniCartOpen:t}))},lineItemArticleCount:e=>{var r,n,i,a;return null===(a=t())||void 0===a?void 0:null===(i=a.cart)||void 0===i?void 0:null===(n=i.lineItems)||void 0===n?void 0:null===(r=n.find(t=>t.id===e))||void 0===r?void 0:r.quantity},getMaxQuantity:e=>{var r,n,i,a;return null===(a=t())||void 0===a?void 0:null===(i=a.cart)||void 0===i?void 0:null===(n=i.lineItems)||void 0===n?void 0:null===(r=n.find(t=>t.articleCode===e))||void 0===r?void 0:r.maxQuantity},getMappedLineItem:e=>{var r,n,i;return null===(i=t())||void 0===i?void 0:null===(n=i.cart)||void 0===n?void 0:null===(r=n.lineItems)||void 0===r?void 0:r.find(t=>t.articleCode===e.toString())},getPrescriptionDetails:e=>{var r,n,i;let a=t().actions.getMappedLineItem(e),l=null==a?void 0:null===(r=a.rxItemProperties)||void 0===r?void 0:r.prescriptionBagId;return null===(i=t().cart)||void 0===i?void 0:null===(n=i.prescriptionDetails)||void 0===n?void 0:n.find(e=>e.id===l)}},articleCount:()=>{var e,r,i;return null===(i=t())||void 0===i?void 0:null===(r=i.cart)||void 0===r?void 0:null===(e=r.lineItems)||void 0===e?void 0:e.reduce((e,t)=>e+(null!==(n=t.quantity)&&void 0!==n?n:0),0)}}),{name:"CartStore",anonymousActionType:"Cart",enabled:!1})),u=()=>d(e=>e.actions)},68628:function(e,t,r){r.d(t,{T:function(){return n}});let n={loading:!1,error:!1,errorMessage:void 0,updated:0}},62455:function(e,t,r){r.d(t,{B:function(){return x},v:function(){return h}});var n=r(57632),i=r(73445),a=r(782),l=r(88718),s=r(8516);let o={data:void 0,error:null,loading:!1,updated:0};var c=r(56830),d=r(48542);let u=async e=>{let t=c.nC.resolve(d.KU),r=await t.amIMemberV3(e,"aphTinman",void 0);return r},h=(0,i.Ue)()((0,a.mW)(e=>({amIMember:o,actions:{getAmIMember:async()=>{let t=(0,n.Z)();e({amIMember:{...o,loading:!0,error:null,updated:Date.now()}},!1,"Fetching amIMember");try{let r=await u(t);l.k.info("getAmIMember, Correlation ID: ".concat(t," was fetched successfully")),e({amIMember:{data:r||o.data,loading:!1,error:null,updated:Date.now()}},!1,"Fetching amIMember success")}catch(a){let{status:r,httpStatusCode:n}=a,i=(0,s.j)(a,"AM_I_MEMBER.FAILED_TO_FETCH");l.k.error("getAmIMember, Correlation ID: ".concat(t," failed to fetch | errorMessage: ").concat(i.errorMessage," | error: ").concat(JSON.stringify(i)," | status: ").concat(r," | httpStatusCode: ").concat(n)),e({amIMember:{data:null,loading:!1,error:i||o.error,updated:Date.now()}},!1,"Fetching amIMember failed")}}}}),{name:"UseAmIMember",anonymousActionType:"UseAmIMember",enabled:!1})),x=()=>h(e=>e.actions)},8516:function(e,t,r){r.d(t,{j:function(){return i}});var n=r(48542);let i=(e,t)=>{if(e instanceof n.Dy&&e.userMessage&&0!==e.userMessage.length){let t=e.code||"",r=e.userMessage.join(" ");return{errorMessage:r,errorCode:t}}return{errorIntlKey:t}}},82144:function(e,t,r){r.d(t,{_:function(){return d},L:function(){return c}});var n=r(73445),i=r(782),a=r(56830),l=r(88718),s=r(27723);let o=async()=>{let e=a.nC.resolve(s.KU);try{let t=await e.getUserInfo();return{user:t}}catch(e){return l.k.error("user.api.ts failed to fetch user info from service ".concat(JSON.stringify(e))),e}},c=(0,n.Ue)()((0,i.mW)(e=>({user:void 0,loading:!0,error:!1,actions:{fetch:async()=>{e({loading:!0,error:!1},!1,"Fetching User");let{user:t}=await o();t?e({user:t,error:!1,loading:!1},!1,"Fetched User"):e({user:void 0,error:!0,loading:!1})}}}),{name:"UserStore",anonymousActionType:"User",enabled:!1})),d=()=>c(e=>e.actions)},80360:function(e,t,r){r.d(t,{H:function(){return l}});var n=r(9750),i=r(49371),a=r(88718);class l extends n.J{async getSearchResult(e){let{data:t,error:r,response:n}=await this.client.GET("/bff-articles/v{version}/search",{querySerializer:i.p,params:{query:{SearchPhrase:e.searchPhrase,SearchSource:e.source,SearchType:e.type,"Sorting.Selected":e.sortBy,Filter:e.filterBy,"Pagination.Take":e.take,"Pagination.Skip":e.skip},path:{version:"1"}}});if(r)throw a.k.error({...r,url:n.url},"getArticlesByCategory: ".concat(r.title,".")),r;return t}async getFilterAndSortingOptions(e){let{source:t,searchPhrase:r}=e;return this.client.GET("/bff-articles/v{version}/search",{params:{query:{"Pagination.Take":1,SearchSource:t,SearchPhrase:r,SearchType:"DetailedSearch"},path:{version:"1"}}}).then(e=>{if(e.data){var t,r,n,i;return{sorting:null===(r=e.data)||void 0===r?void 0:null===(t=r.articles)||void 0===t?void 0:t.sorting,filtering:null===(i=e.data)||void 0===i?void 0:null===(n=i.articles)||void 0===n?void 0:n.filter}}return null})}}},25944:function(e,t,r){r.d(t,{U:function(){return d}});var n=r(85893);r(67294);var i=r(7747),a=r(45139),l=r(80190),s=r(75509),o=r(87746);let c=(0,a.j)("rounded-md",{variants:{variant:{default:"bg-elevated child:border-subtle hover:shadow-md",outlined:"border-default child:border-default border hover:shadow-md",inverted:"child:text-inverse child:fill-inverse border-visual-darkest hover:border-visual child:border-inverse border"}},defaultVariants:{variant:"default"}}),d=e=>{let{items:t,variant:r,...i}=e;return(0,n.jsx)(u,{...i,children:t.map(e=>(0,n.jsxs)(h,{value:e.value,variant:r,children:[(0,n.jsx)(x,{variant:r,children:e.title}),(0,n.jsx)(f,{children:e.children})]},e.value))})},u=e=>{let{children:t,...r}=e;return(0,n.jsx)(i.fC,{type:"multiple",className:"flex flex-col gap-1",...r,children:t})},h=e=>{let{children:t,variant:r,value:a}=e;return(0,n.jsx)(i.ck,{value:a,className:(0,l.cn)("group",c({variant:r})),children:t})},x=e=>{let{children:t,variant:r,...a}=e,c="inverted"===r;return(0,n.jsx)(i.h4,{children:(0,n.jsxs)(i.xz,{className:(0,l.cn)("flex w-full items-center gap-1 p-2 transition-all focus-visible:rounded-lg",{"outline-inverse":c,"outline-action":!c}),...a,children:[(0,n.jsx)(o.Z,{className:"flex grow text-left font-bold",children:t}),(0,n.jsx)(s.J,{name:"ArrowheadDown",size:"medium",className:"self-baseline transition-transform duration-200 group-data-[state=open]:rotate-180"})]})})},f=e=>{let{children:t}=e;return(0,n.jsx)(i.VY,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden border-t",children:(0,n.jsxs)("div",{className:"exclude-child p-2",children:[" ",t]})})}},9750:function(e,t,r){r.d(t,{J:function(){return d}});var n=r(35937),i=r.n(n),a=r(59821),l=r(25501),s=r(57632),o=r(51821),c=r(34155);class d{constructor(e){let t={};if((0,o.s)()){if(!(null==e?void 0:e.headers))throw Error("Headers must be provided when running on the server");t=u(new l.Z(function(e){let t="";if(e instanceof Headers){var r;t=null!==(r=e.get("cookie"))&&void 0!==r?r:""}else if(Array.isArray(e)){let r=e.find(e=>"cookie"===e[0].toLowerCase());t=r?r[1]:""}else if("object"==typeof e){let r=e.cookie;"string"==typeof r&&(t=r)}return t}(e.headers)))}else t=u(new l.Z);this.client=(0,a.ZP)({baseUrl:"https://api.apotekhjartat.se",keepalive:!0,credentials:"include",redirect:"follow",mode:"cors",headers:t})}}function u(e){var t,r;let n=null!==(t=e.get("aph_anonymous_id"))&&void 0!==t?t:(0,s.Z)(),a=i()({"x-recommendations-session-id":e.get("ApptusSessionId"),"x-recommendations-customer-id":e.get("ApptusCustomerId"),"x-recommendations-sponsored-customer-id":e.get(null!==(r=c.env.NEXT_PUBLIC_SPONSORED_CUSTOMER_ID_COOKIE_NAME)&&void 0!==r?r:"SponsoredCustomerId")}),l={"X-requested-with":"fetch","X-Aph-Api-Key":"df6e4856-c145-43cf-8be4-2d0a1f0dbabb","X-Anonymous-Id":n,"X-Correlation-Id":(0,s.Z)(),...a};return l}},75010:function(e,t,r){r.d(t,{f:function(){return n}});function n(e){return e.charAt(0).toUpperCase()+e.slice(1)}},74319:function(e,t,r){r.d(t,{O6:function(){return d},fV:function(){return s},i1:function(){return l},vT:function(){return c}});let n="EVENT_DELIVERY_WIDGET_SUSPEND",i="EVENT_DELIVERY_WIDGET_RESUME",a=null,l=()=>{a=a||Event&&new Event(n),window.addEventListener(n,()=>{window&&"function"==typeof window._sw&&window._sw(e=>{let{suspend:t}=e;t&&t()})},!1)},s=()=>{a&&window.dispatchEvent(a)},o=null,c=()=>{o=o||!!Event&&new Event(i),window.addEventListener(i,()=>{window&&"function"==typeof window._sw&&window._sw(e=>{let{resume:t}=e;return t&&t()})},!1)},d=()=>{o&&window.dispatchEvent(o)}},45409:function(e,t,r){r.d(t,{y:function(){return n}});let n=e=>e?e.replaceAll("/","/​"):null},45805:function(e,t,r){r.d(t,{e:function(){return n}});let n=e=>{if(!e)return null;let t="".concat(e);return 12!==(t=t.replace(" ","").replace("-","")).length?null:"".concat(t.slice(0,8),"-").concat(t.slice(8))}},55703:function(e,t,r){r.d(t,{V:function(){return n}});function n(e){if(void 0!==e)return"/produkt/".concat(decodeURIComponent(e))}},77849:function(e,t,r){r.d(t,{X:function(){return i}});let n=e=>e.toLowerCase().replace(/(^|\s|-|')\S/g,e=>e.toUpperCase()),i=e=>{if(null==e)return"";let t=e.firstName&&e.lastName?" ":"";return n("".concat(e.firstName||"").concat(t).concat(e.lastName||""))}},46471:function(e,t,r){r.d(t,{D:function(){return n}});function n(e){return null!=e}},68944:function(e,t,r){r.d(t,{$l:function(){return s},En:function(){return d},G8:function(){return c},me:function(){return l}});let n="EVENT_PAYMENT_WIDGET_SUSPEND",i="EVENT_PAYMENT_WIDGET_RESUME",a=null,l=()=>{a=a||Event&&new Event(n),window.addEventListener(n,()=>{window&&"function"==typeof window._klarnaCheckout&&window._klarnaCheckout(e=>{let{suspend:t}=e;t&&t({autoResume:{enabled:!1}})})},!1)},s=()=>{a&&window.dispatchEvent(a)},o=null,c=()=>{o=o||!!Event&&new Event(i),window.addEventListener(i,()=>{window&&"function"==typeof window._klarnaCheckout&&window._klarnaCheckout(e=>{let{resume:t}=e;return t?t():null})},!1)},d=()=>{o&&window.dispatchEvent(o)}},26978:function(e,t,r){r.d(t,{M:function(){return i}});let n=new Intl.Collator("sv");function i(e){return(t,r)=>n.compare(t[e],r[e])}},88186:function(e,t,r){r.d(t,{P:function(){return n}});let n=e=>("fixed"===e.layout||e.layout,e)}}]);
//# sourceMappingURL=9340-282adbd5ec650644.js.map