1(self["webpackChunk_novel_vendor_storefront"]=self["webpackChunk_novel_vendor_storefront"]||[]).push([[275],{28683:function(t,n,e){function r(){return(0,c.b)(t=>!!t.storefrontAuth.isShopifyLoggedIn&&!!t.storefrontAuth.storefrontCustomerAuth&&t.storefrontAuth.storefrontCustomerAuth.isLoggedIn&&t.storefrontAuth.storefrontCustomerAuth.emailVerified)}function o(){return(0,c.b)(t=>{if(t.storefrontAuth.storefrontCustomerAuth&&t.storefrontAuth.storefrontCustomerAuth.isLoggedIn)return{balanceFormat:t.storefrontAuth.storefrontCustomerAuth.balanceFormat,balance:t.storefrontAuth.storefrontCustomerAuth.balance}})}function i(){return(0,c.b)(t=>{var n,e;const r=t.storefrontAuth;return!(null===(n=r.storefrontCustomerAuth)||void 0===n?void 0:n.isLoggedIn)||!(null===(e=r.storefrontCustomerAuth)||void 0===e?void 0:e.emailVerified)})}function a(){return(0,c.b)(t=>!!t.storefrontAuth.sessionToken)}function l(){const t=(0,u.i)(),n=r(),e=a();return t?n:e}function s(){return(0,c.b)(t=>({cryptoAddresses:t.storefrontAuth.cryptoAddresses,storefrontAuthJson:t.storefrontAuth.storefrontCustomerAuth}))}e.d(n,{a:function(){return a},b:function(){return r},c:function(){return i},d:function(){return s},e:function(){return o},f:function(){return l}});var c=e(74278),u=e(21379)},35275:function(t,n,e){function r({applied:t}){const[n,e]=(0,i.useState)(!1),r=(0,u.e)(),_=(0,f.a)(),y=(0,u.d)(),x=(0,g.b)(t=>t.storefrontAuth.sessionToken),b=(0,p.a)(async()=>{var t,n,r;if((null===(t=y.storefrontAuthJson)||void 0===t?void 0:t.isLoggedIn)&&x&&_){e(!0);try{const t=await a.c.postReq("/api/public/customer/:externalId/subscription/:subscriptionId/apply-credit",{headers:{[m.v]:x},params:{externalId:null===(n=y.storefrontAuthJson)||void 0===n?void 0:n.externalId,subscriptionId:`${_}`}});if("error"===t.type)return console.error("Error applying store credit",t.error),401===t.status?((0,h.d)(),void window.location.reload()):((0,d.errorToast)({content:(null===(r=t.error)||void 0===r?void 0:r.message)||"Sorry, we couldn't apply your store credit. Please try again."}),void e(!1))}catch(t){return console.error("Error applying store credit",t),(0,d.errorToast)({content:(t instanceof Error?t.message:void 0)||"Sorry, we couldn't apply your store credit. Please try again."}),void e(!1)}(0,h.d)(),window.location.reload()}},[]);return i.createElement(l.a,null,n?i.createElement("div",{className:"__subscriptionStoreCreditWidget__",style:{justifyContent:"center"}},i.createElement("span",{className:"__subscriptionApplyCreditLoader__"})):t?i.createElement("div",{className:"__subscriptionStoreCreditWidget__",style:{justifyContent:"flex-start",cursor:"default",width:"auto"}},i.createElement("div",{className:"__applyCheckmark__"},i.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"#07bc0c"},i.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))),i.createElement("div",{className:"__subscriptionStoreCreditWidgetTextContainer__"},"Store Credit Applied"," ")):i.createElement("div",{className:"__subscriptionStoreCreditWidget__",onClick:b},i.createElement("div",{className:"__subscriptionStoreCreditWidgetTextContainer__"},null==r?void 0:r.balanceFormat," ",i.createElement("span",{className:"__subscriptionStoreCreditWidgetLightText__"},"Store Credit")),i.createElement("div",{className:"__applyStoreCreditButton__"},"Apply"," ",i.createElement("span",{className:"__applyChevronLeft__"},i.createElement(c.a,{source:s.S,color:"highlight"})))),i.createElement(o,null))}function o(){return i.createElement("style",null,"\n .__subscriptionStoreCreditWidget__ {\n width: 314px;\n cursor: pointer;\n color: white;\n background-color: black;\n position: fixed;\n height: 60px;\n z-index: 0;\n overflow: hidden;\n box-shadow: 0px 0px 0px 1px white;\n left: 50%;\n transform: translate(-50%, -50%);\n bottom: 20px;\n border-radius: 30px !important;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 15px;\n }\n\n .__subscriptionStoreCreditWidgetTextContainer__ {\n font-family: Poppins;\n font-size: 14px;\n font-weight: 700;\n line-height: 15px;\n text-align: left;\n }\n\n .__subscriptionStoreCreditWidgetLightText__ {\n font-weight: 400;\n }\n .__applyStoreCreditButton__ {\n font-family: Poppins;\n font-size: 10px;\n font-weight: 500;\n line-height: 15px;\n letter-spacing: 0.1em;\n text-align: left;\n color: #959595;\n display: flex;\n }\n .__applyCheckmark__ {\n font-family: Poppins;\n margin-right: 5px;\n font-size: 10px;\n font-weight: 500;\n line-height: 15px;\n letter-spacing: 0.1em;\n text-align: left;\n color: #959595;\n display: flex;
1\n width: 20px;\n height: 20px;\n }\n .__applyChevronLeft__ {\n padding-top: 2px;\n width: 12px;\n color: #959595;\n }\n\n .__subscriptionApplyCreditLoader__ {\n width: 25px;\n height: 25px;\n border-radius: 50%;\n position: relative;\n animation: rotate 1s linear infinite;\n }\n .__subscriptionApplyCreditLoader__::before {\n content: \"\";\n box-sizing: border-box;\n position: absolute;\n inset: 0px;\n border-radius: 50%;\n border: 5px solid #fff;\n animation: prixClipFix 2s linear infinite;\n }\n\n @keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n }\n\n @keyframes prixClipFix {\n 0% {\n clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);\n }\n 25% {\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);\n }\n 50% {\n clip-path: polygon(\n 50% 50%,\n 0 0,\n 100% 0,\n 100% 100%,\n 100% 100%,\n 100% 100%\n );\n }\n 75% {\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);\n }\n 100% {\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);\n }\n }\n\n @media (max-width: 768px) {\n #front-chat-holder div[role='button'][style*='left:'] {\n left: 6px !important;\n }\n #front-chat-holder div[role='button'][style*='right:'] {\n right: 6px !important;\n }\n\n #gorgias-chat-container #chat-button[style*='left:'] {\n left: 6px !important;\n }\n #gorgias-chat-container #chat-button[style*='right:'] {\n right: 6px !important;\n }\n\n .intercom-launcher[style*='left:'] {\n left: 6px !important;\n }\n .intercom-launcher[style*='right:'] {\n right: 6px !important;\n }\n\n #dummy-chat-button-iframe[style*='left:'] {\n left: 6px !important;\n }\n #dummy-chat-button-iframe[style*='right:'] {\n right: 6px !important;\n }\n\n #ShopifyChat[buttonposition=\"bottom_left\"] {\n left: 6px !important;\n }\n #ShopifyChat[buttonposition=\"bottom_right\"] {\n right: 6px !important;\n }\n }\n ")}e.r(n),e.d(n,{SubscriptionWidget:function(){return r}});var i=e(63696),a=e(74097),l=e(78585),s=e(67267),c=e(46223),u=e(28683),p=e(45341),d=e(49104),f=e(41626),h=e(13750),m=e(78504),g=e(74278)},46223:function(t,n,e){function r({children:t}){return i.createElement("span",{className:l.VisuallyHidden},t)}function o({source:t,color:n,backdrop:e,accessibilityLabel:o}){let l;l="function"==typeof t?"function":"placeholder"===t?"placeholder":"external",e&&n&&s.includes(n);const c=function(...t){return t.filter(Boolean).join(" ")}(a.Icon,n&&a[(u=n,`color${u.charAt(0).toUpperCase()}${u.slice(1)}`)],n&&a.applyColor,e&&a.hasBackdrop);var u;const p=t,d={function:i.createElement(p,{className:a.Svg,focusable:"false","aria-hidden":"true"}),placeholder:i.createElement("div",{className:a.Placeholder}),external:i.createElement("img",{className:a.Img,src:`data:image/svg+xml;utf8,${t}`,alt:"","aria-hidden":"true"})};return i.createElement("span",{className:c}
1,i.createElement(r,null,o),d[l])}e.d(n,{a:function(){return o}});var i=e(63696),a={Icon:"Polaris-Icon",applyColor:"Polaris-Icon--applyColor",hasBackdrop:"Polaris-Icon--hasBackdrop",colorBase:"Polaris-Icon--colorBase",colorSubdued:"Polaris-Icon--colorSubdued",colorCritical:"Polaris-Icon--colorCritical",colorInteractive:"Polaris-Icon--colorInteractive",colorWarning:"Polaris-Icon--colorWarning",colorHighlight:"Polaris-Icon--colorHighlight",colorSuccess:"Polaris-Icon--colorSuccess",colorPrimary:"Polaris-Icon--colorPrimary",Svg:"Polaris-Icon__Svg",Img:"Polaris-Icon__Img",Placeholder:"Polaris-Icon__Placeholder"},l={VisuallyHidden:"Polaris-VisuallyHidden"};const s=["base","critical","highlight","success","warning"]},67267:function(t,n,e){e.d(n,{S:function(){return o}});var r=e(63696),o=function(t){return r.createElement("svg",Object.assign({viewBox:"0 0 20 20"},t),r.createElement("path",{fillRule:"evenodd",d:"M7.72 14.53a.75.75 0 0 1 0-1.06l3.47-3.47-3.47-3.47a.75.75 0 0 1 1.06-1.06l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0Z"}))};o.displayName="ChevronRightMinor"},78585:function(t,n,e){function r(t){const[n,e]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{var t;let n=!0;return null===(t=(0,i.loadStorefrontStyleSheet)())||void 0===t||t.then(()=>{n&&e(!0)}),()=>{n=!1}},[]),n?o.createElement(o.Fragment,null,t.children):o.createElement(o.Fragment,null)}e.d(n,{a:function(){return r}});var o=e(63696),i=e(95920)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.