!function(t){"use strict";const e=t.params,n=(document.querySelector.bind(document),(t,e)=>e.split(".").reduce((t,e)=>t&&t[e],t)),i=()=>null,s=t=>null===t||t===undefined?"":t,o="wc/store/checkout";function a(t){document.querySelectorAll("wc-order-attribution-inputs").forEach((t,e)=>{e>0&&t.remove()});for(const e of document.querySelectorAll("wc-order-attribution-inputs"))e.values=t}function r(t){window.wp&&window.wp.data&&window.wp.data.dispatch&&window.wc&&window.wc.wcBlocksData&&window.wp.data.dispatch(window.wc.wcBlocksData.CHECKOUT_STORE_KEY).setExtensionData("woocommerce/order-attribution",t,!0)}function c(){return"undefined"!=typeof sbjs}function d(){if(window.wp&&window.wp.data&&"function"==typeof window.wp.data.subscribe){const e=window.wp.data.subscribe(function(){e(),r(t.getAttributionData())},o)}}t.getAttributionData=function(){const s=e.allowTracking&&c()?n:i,o=c()?sbjs.get:{},a=Object.entries(t.fields).map(([t,e])=>[t,s(o,e)]);return Object.fromEntries(a)},t.setOrderTracking=function(n){if(e.allowTracking=n,n){if(!c())return;sbjs.init({lifetime:Number(e.lifetime),session_length:Number(e.session),base64:Boolean(e.base64),timezone_offset:"0"})}else!function(){const t=window.location.hostname;["sbjs_current","sbjs_current_add","sbjs_first","sbjs_first_add","sbjs_session","sbjs_udata","sbjs_migrations","sbjs_promo"].forEach(e=>{document.cookie=`${e}=; path=/; max-age=-999; domain=.${t};`})}();const i=t.getAttributionData();a(i),r(i)},t.setOrderTracking(e.allowTracking),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d(),window.customElements.define("wc-order-attribution-inputs",class extends HTMLElement{constructor(){if(super(),this._fieldNames=Object.keys(t.fields),this.hasOwnProperty("_values")){let t=this.values;delete this.values,this.values=t||{}}}connectedCallback(){this.innerHTML="";const t=new DocumentFragment;for(const n of this._fieldNames){const i=document.createElement("input");i.type="hidden",i.name=`${e.prefix}${n}`,i.value=s(this.values&&this.values[n]||""),t.appendChild(i)}this.appendChild(t)}set values(t){if(this._values=t,this.isConnected)for(const t of this._fieldNames){const n=this.querySelector(`input[name="${e.prefix}${t}"]`);n?n.value=s(this.values[t]):console.warn(`Field "${t}" not found. `+"Most likely, the '<wc-order-attribution-inputs>' element was manipulated.")}}get values(){return this._values}})}(window.wc_order_attribution);
;(function($){
'use strict';
$.fn.bookworm_variations_radio_style_form=function (){
return this.each(function(){
var $form=$(this);
$form
.on('click', '.custom-radio', function(e){
e.preventDefault();
var $el=$(this);
$el.find('.custom-control-input').prop("checked", true);
var attributes=$(this).data('attributes');
$.map(attributes, function(val, i){
var attribute_name=val.attribute_name,
attribute_value=val.attribute_value,
$select=$form.find('select[name="'+ attribute_name +'"]');
$select.trigger('focusin');
$select.val(attribute_value);
$select.change();
});
});
});
};
$(function (){
$('.variations_form').bookworm_variations_radio_style_form();
$(document.body).trigger('bookworm_variations_radio_style_initialized');
});
})(jQuery);
(()=>{"use strict";var e={4990:(e,t,r)=>{function o(e){if("object"!=typeof e||null===e||!e.hasOwnProperty("responses"))throw new Error("Response not valid")}function s(e){if("object"!=typeof e||null===e||!("body"in e)||!("headers"in e))throw new Error("Response not valid")}r.r(t),r.d(t,{assertBatchResponseIsValid:()=>o,assertResponseIsValid:()=>s,isApiErrorResponse:()=>S,isAttributeQuery:()=>_,isAttributeQueryCollection:()=>j,isAttributeTerm:()=>m,isAttributeTermCollection:()=>v,isBoolean:()=>n,isCartResponseTotals:()=>a,isEmpty:()=>b,isEmptyObject:()=>i.RI,isError:()=>c,isErrorResponse:()=>d.CR,isFailResponse:()=>d.al,isFormFields:()=>u,isFunction:()=>y,isNull:()=>p.k,isNumber:()=>f,isObject:()=>i.Gv,isObserverResponse:()=>d.mW,isRatingQueryCollection:()=>O,isStockStatusOptions:()=>h,isStockStatusQueryCollection:()=>R,isString:()=>g,isSuccessResponse:()=>d.ny,isValidFieldValidationStatus:()=>A.w,isValidValidationErrorsObject:()=>A.Y,nonNullable:()=>p.T,objectHasProp:()=>i.DU,responseTypes:()=>d.hT});const n=e=>"boolean"==typeof e;var i=r(9870);const a=e=>!!(0,i.Gv)(e)&&Object.keys({total_items:0,total_items_tax:0,total_fees:0,total_fees_tax:0,total_discount:0,total_discount_tax:0,total_shipping:0,total_shipping_tax:0,total_price:0,total_tax:0,tax_lines:0,currency_code:0,currency_symbol:0,currency_minor_unit:0,currency_decimal_separator:0,currency_thousand_separator:0,currency_prefix:0,currency_suffix:0}).every(t=>t in e),c=e=>e instanceof Error,l=e=>{if("object"!=typeof e||null===e)return!1;const t=e;return"string"==typeof t.label&&"string"==typeof t.optionalLabel&&"boolean"==typeof t.required&&"boolean"==typeof t.hidden&&"number"==typeof t.index},u=e=>{if("object"!=typeof e||null===e||Array.isArray(e))return!1;const t=e,r=["email","country","first_name","last_name","company","address_1","address_2","city","state","postcode","phone"];if(!r.every(e=>e in t))return!1;for(const[e,o]of Object.entries(t))if(r.includes(e)&&!l(o))return!1;return!0},y=e=>"function"==typeof e;var p=r(2116);const f=e=>"number"==typeof e,b=e=>null==e||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length;var d=r(1378);const g=e=>"string"==typeof e,m=e=>(0,i.DU)(e,"count")&&(0,i.DU)(e,"description")&&(0,i.DU)(e,"id")&&(0,i.DU)(e,"name")&&(0,i.DU)(e,"parent")&&(0,i.DU)(e,"slug")&&"number"==typeof e.count&&"string"==typeof e.description&&"number"==typeof e.id&&"string"==typeof e.name&&"number"==typeof e.parent&&"string"==typeof e.slug,v=e=>Array.isArray(e)&&e.every(m),_=e=>(0,i.DU)(e,"attribute")&&(0,i.DU)(e,"operator")&&(0,i.DU)(e,"slug")&&"string"==typeof e.attribute&&"string"==typeof e.operator&&Array.isArray(e.slug)&&e.slug.every(e=>"string"==typeof e),j=e=>Array.isArray(e)&&e.every(_),O=e=>Array.isArray(e)&&e.every(e=>["1","2","3","4","5"].includes(e)),R=e=>Array.isArray(e)&&e.every(e=>["instock","outofstock","onbackorder"].includes(e)),h=e=>(0,i.Gv)(e)&&Object.keys(e).every(e=>["instock","outofstock","onbackorder"].includes(e)),S=e=>(0,i.Gv)(e)&&(0,i.DU)(e,"code")&&(0,i.DU)(e,"message");var A=r(8026)},2116:(e,t,r)=>{r.d(t,{T:()=>s,k:()=>o});const o=e=>null===e;function s(e){return null!=e}},9870:(e,t,r)=>{r.d(t,{DU:()=>n,Gv:()=>s,RI:()=>i});var o=r(2116);const s=e=>!(0,o.k)(e)&&e instanceof Object&&e.constructor===Object;function n(e,t){return s(e)&&t in e}const i=e=>0===Object.keys(e).length},1378:(e,t,r)=>{r.d(t,{CR:()=>c,al:()=>l,hT:()=>s,mW:()=>n,ny:()=>a});var o=r(4990);let s=function(e){return e.SUCCESS="success",e.FAIL="failure",e.ERROR="error",e}({});const n=e=>(0,o.isObject)(e)&&(0,o.objectHasProp)(e,"type"),i=(e,t)=>(0,o.isObject)(e)&&"type"in e&&e.type===t,a=e=>i(e,s.SUCCESS),c=e=>i(e,s.ERROR),l=e=>i(e,s.FAIL)},8026:(e,t,r)=>{r.d(t,{Y:()=>n,w:()=>s});var o=r(4990);const s=e=>(0,o.isObject)(e)&&(0,o.objectHasProp)(e,"message")&&(0,o.objectHasProp)(e,"hidden")&&(0,o.isString)(e.message)&&(0,o.isBoolean)(e.hidden),n=e=>(0,o.isObject)(e)&&Object.entries(e).every(([e,t])=>(0,o.isString)(e)&&s(t))}},t={};function r(o){var s=t[o];if(void 0!==s)return s.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o=r(4990);(this.wc=this.wc||{}).wcTypes=o})();