PageSourceSearch

https://www.miabambinaboutique.com/cdn/shop/t/53/assets/product-fo…?v=48803871317136312141788979166

js miabambinaboutique.com collected 2026-09-26 14:06:22 UTC 8,009 bytes, 2 lines download raw bytes

1(function(){var HIDE="hide";function classifyFormat(value){var v=String(value||"").toLowerCase();return v.indexOf("rent")!==-1?"rent":v.indexOf("preorder")!==-1||v.indexOf("pre-order")!==-1||v.indexOf("custom")!==-1?"custom":"in-stock"}function getDisplayCents(variant,format,variants){if(!variant)return null;if(window.theme&&theme.RentalPrice&&typeof theme.RentalPrice.getDisplayCents=="function")return theme.RentalPrice.getDisplayCents(variant,variants);if(format==="rent"){var blob=[variant.sku,variant.option1,variant.title].join(" "),match=String(blob).replace(/,/g,"").match(/\$(\d+(?:\.\d{1,2})?)/);if(match)return Math.round(parseFloat(match[1])*100)}return variant.price}function formatMoney(cents){if(window.theme&&theme.RentalPrice&&typeof theme.RentalPrice.formatMoneyWithCode=="function")return theme.RentalPrice.formatMoneyWithCode(cents);if(window.theme&&theme.Currency&&typeof theme.Currency.formatMoney=="function")return theme.Currency.formatMoney(cents,theme.settings&&theme.settings.moneyFormat);var amount=Number(cents);return isFinite(amount)||(amount=0),"$"+(amount/100).toFixed(2)}function getVariants(section){var el=section.querySelector("[data-variant-json]");if(!el)return[];try{return JSON.parse(el.textContent)}catch(err){return[]}}function getCurrentVariant(section){var masterSelect=section.querySelector("[data-product-select]"),variants=getVariants(section);if(!masterSelect||!variants.length)return null;for(var currentId=masterSelect.value,i=0;i<variants.length;i++)if(String(variants[i].id)===String(currentId))return variants[i];return null}function resolveFormat(section,variant){var picker=section.querySelector("[data-format-picker]");if(picker){var selected=picker.querySelector("[data-format-select]:checked");if(selected)return selected.getAttribute("data-format-select")}var sizeInput=section.querySelector("[data-format-option] [data-variant-input]:checked");return sizeInput?classifyFormat(sizeInput.value):variant&&window.theme&&theme.RentalPrice&&typeof theme.RentalPrice.isRentVariant=="function"&&theme.RentalPrice.isRentVariant(variant)?"rent":variant&&variant.option1?classifyFormat(variant.option1):"in-stock"}function syncRentalProperties(section,variant){var wrap=section.querySelector("[data-rental-properties]");if(wrap){for(var format=resolveFormat(section,variant),isRentVariant=!!(format==="rent"&&variant&&window.theme&&theme.RentalPrice&&typeof theme.RentalPrice.isRentVariant=="function"&&theme.RentalPrice.isRentVariant(variant)),inputs=wrap.querySelectorAll("[data-rental-prop]"),i=0;i<inputs.length;i++)isRentVariant?inputs[i].removeAttribute("disabled"):inputs[i].setAttribute("disabled","disabled");if(!(!isRentVariant||!theme.RentalPrice)){var variants=getVariants(section),currencyCode=wrap.getAttribute("data-currency-code")||"",feeInput=wrap.querySelector('[data-rental-prop="fee"]'),depositInput=wrap.querySelector('[data-rental-prop="deposit"]'),feeCents=theme.RentalPrice.getDisplayCents(variant,variants),depositCents=theme.RentalPrice.getDepositCents(variant,variants),formatFn=theme.RentalPrice.formatMoneyWithCode;feeInput&&typeof formatFn=="function"&&(feeInput.value=formatFn(feeCents,currencyCode)),depositInput&&typeof formatFn=="function"&&(depositInput.value=formatFn(depositCents,currencyCode))}}}function filterSizes(sizeWrap,format){sizeWrap&&sizeWrap.querySelectorAll(".variant-input[data-format]").forEach(function(row){row.getAttribute("data-format")===format?row.classList.remove(HIDE):row.classList.add(HIDE)})}function pickSizeInput(sizeWrap,format){if(!sizeWrap)return null;var rows=sizeWrap.querySelectorAll('.variant-input[data-format="'+format+'"]'),checked=sizeWrap.querySelector("[data-variant-input]:checked");if(checked&&classifyFormat(checked.value)===format)return checked;for(var fallback=null,i=0;i<rows.length;i++){var input=rows[i].querySelector("[data-variant-input]");if(input&&(fallback||(fallback=input),!input.classList.contains("disabled")))return input}return fallback}function selectSize(sizeWrap,format,dispatch){var input=pickSizeInput(sizeWrap,format);if(input){var changed=!input.checked;
1changed&&(input.checked=!0),(dispatch||changed)&&input.dispatchEvent(new Event("change",{bubbles:!0}))}}function toggleRentalInfo(section,format){var info=section.querySelector("[data-rental-info]");if(info){var isRent=format==="rent";info.classList.toggle(HIDE,!isRent),isRent?info.removeAttribute("hidden"):info.setAttribute("hidden","")}}function toggleCustomSizeInfo(section){section&&section.querySelectorAll("[data-custom-size-info]").forEach(function(note){var wrap=note.previousElementSibling,sizeInput=wrap?wrap.querySelector("[data-variant-input]:checked"):null,sizeVal=sizeInput?String(sizeInput.value).toLowerCase():"",show=sizeVal.indexOf("custom size")!==-1;note.hidden=!show,note.classList.remove(HIDE)})}function updatePrice(section,variant,format){var priceEl=section.querySelector("[data-product-price]");if(!(!priceEl||!variant)){var variants=getVariants(section),cents=window.theme&&theme.RentalPrice&&typeof theme.RentalPrice.getDisplayCents=="function"?theme.RentalPrice.getDisplayCents(variant,variants):getDisplayCents(variant,format,variants);cents!=null&&(priceEl.innerHTML=formatMoney(cents))}}function currentFormat(picker){var selected=picker.querySelector("[data-format-select]:checked");return selected?selected.getAttribute("data-format-select"):picker.getAttribute("data-current-format")||"in-stock"}function bindSection(section){!section||section.dataset.formatPickerBound||(section.dataset.formatPickerBound="true",section.addEventListener("variantChange",function(evt){var detail=evt.detail||{},variant=detail.variant||getCurrentVariant(section),format=resolveFormat(section,variant);syncRentalProperties(section,variant),requestAnimationFrame(function(){updatePrice(section,variant,format),toggleRentalInfo(section,format),toggleCustomSizeInfo(section),syncRentalProperties(section,variant)})}))}function bindPicker(picker){if(!(!picker||picker.dataset.formatPickerReady)){picker.dataset.formatPickerReady="true";var section=picker.closest('[data-section-type="product"]');if(section){bindSection(section);var sizeWrap=section.querySelector("[data-format-option]");if(sizeWrap){var format=currentFormat(picker);filterSizes(sizeWrap,format),toggleRentalInfo(section,format),toggleCustomSizeInfo(section),selectSize(sizeWrap,format,!1);var variant=getCurrentVariant(section);variant&&(updatePrice(section,variant,format),syncRentalProperties(section,variant),toggleCustomSizeInfo(section)),picker.querySelectorAll("[data-format-select]").forEach(function(input){input.addEventListener("change",function(){if(input.checked){var nextFormat=input.getAttribute("data-format-select");picker.setAttribute("data-current-format",nextFormat),filterSizes(sizeWrap,nextFormat),toggleRentalInfo(section,nextFormat),nextFormat!=="rent"&&syncRentalProperties(section,getCurrentVariant(section)),selectSize(sizeWrap,nextFormat,!0),syncRentalProperties(section,getCurrentVariant(section)),toggleCustomSizeInfo(section)}})})}}}}function bindRentalForms(){document.querySelectorAll("[data-rental-properties]").forEach(function(wrap){var section=wrap.closest('[data-section-type="product"]');if(section){bindSection(section);var variant=getCurrentVariant(section);syncRentalProperties(section,variant),toggleCustomSizeInfo(section)}})}function bindCustomSizeNotes(){document.querySelectorAll('[data-section-type="product"]').forEach(function(section){section.querySelector("[data-custom-size-info]")&&(bindSection(section),toggleCustomSizeInfo(section))})}function init(){document.querySelectorAll("[data-format-picker]").forEach(bindPicker),bindRentalForms(),bindCustomSizeNotes()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init(),document.addEventListener("page:loaded",init),document.addEventListener("shopify:section:load",init)})();
2//# sourceMappingURL=/cdn/shop/t/53/assets/product-format-picker.js.map?v=48803871317136312141788979166

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.