PageSourceSearch

https://momery.com/cdn/shop/t/54/assets/momery-printess-form-fields.js?v=2628257343667941411790770303

js momery.com collected 2026-10-09 22:39:47 UTC 3,350 bytes, 2 lines download raw bytes

1(function(){if(window.__customPrintessFormFieldsInit)return;window.__customPrintessFormFieldsInit=!0;const REGISTER_RETRY_INTERVAL_MS=250,REGISTER_TIMEOUT_MS=1e4,PHOTOBOOK_THEME_FIELD_NAME="PHOTOBOOK_THEME",INITIAL_PAGE_COUNT_PARAM_NAME="initialFreestylePhotobookPages",config=window.customPrintessAppConfig||{},readId=value=>value?typeof value.getId=="function"?value.getId():value.id?.value!==null&&value.id?.value!==void 0?value.id.value:value.id!==null&&value.id!==void 0?value.id:value.value!==null&&value.value!==void 0?value.value:null:null,normalizeId=value=>value==null?"":String(value).trim(),getCurrentVariantId=context=>{const contextVariantId=normalizeId(readId(context?.variant));if(contextVariantId)return contextVariantId;const variantInput=document.querySelector(['form[action*="/cart/add"] input[name="id"]:not([disabled])','form[action*="/cart/add"] select[name="id"]','input[name="id"]:not([disabled])','select[name="id"]','input[name="id"]'].join(",")),inputVariantId=normalizeId(variantInput?.value);return inputVariantId||normalizeId(config.initialVariantId)},getPhotobookTheme=context=>{const variantId=getCurrentVariantId(context),variantValue=config.photobookThemeByVariant?.[variantId],variantTheme=variantValue==null?"":String(variantValue).trim();if(variantTheme)return variantTheme;const value=config.photobookTheme;return value==null?"":String(value).trim()},getPageCount=context=>{const variantId=getCurrentVariantId(context);if(!variantId)return null;const pageCount=Number(config.initialPageCountByVariant?.[variantId]);return!Number.isInteger(pageCount)||pageCount<=0?null:pageCount},getFormFieldsWithoutPhotobookTheme=formFields=>Array.isArray(formFields)?formFields.filter(field=>field?.name!==PHOTOBOOK_THEME_FIELD_NAME):[],registerPlugin=()=>window.__customPrintessFormFieldsPluginRegistered?!0:typeof window.registerPrintessPlugin!="function"?!1:(window.registerPrintessPlugin({getFormFieldsAsync(context,formFields){const nextFormFields=getFormFieldsWithoutPhotobookTheme(formFields),photobookTheme=getPhotobookTheme(context);return photobookTheme&&nextFormFields.push({name:PHOTOBOOK_THEME_FIELD_NAME,value:photobookTheme}),Promise.resolve(nextFormFields)},getAttachParametersAsync(context){console.log("[CUSTOM_PRINTESS_FORM_FIELDS] getAttachParametersAsync called",{contextType:context?.type,contextVariantId:context?.variant?.getId?.()??null});const pageCount=getPageCount(context);if(!pageCount){const attachParameters2={};return console.log("[CUSTOM_PRINTESS_FORM_FIELDS] getAttachParametersAsync return",attachParameters2),Promise.resolve(attachParameters2)}const attachParameters={bookSettings:{[INITIAL_PAGE_COUNT_PARAM_NAME]:pageCount}};return console.log("[CUSTOM_PRINTESS_FORM_FIELDS] getAttachParametersAsync return",attachParameters),Promise.resolve(attachParameters)}}),window.__customPrintessFormFieldsPluginRegistered=!0,!0);(()=>{if(registerPlugin())return;const startedAt=Date.now(),retryTimer=window.setInterval(()=>{if(registerPlugin()){window.clearInterval(retryTimer);return}Date.now()-startedAt>=REGISTER_TIMEOUT_MS&&(window.clearInterval(retryTimer),console.warn("[CUSTOM_PRINTESS_FORM_FIELDS] registerPrintessPlugin is not available"))},REGISTER_RETRY_INTERVAL_MS)})()})();
2//# sourceMappingURL=/cdn/shop/t/54/assets/momery-printess-form-fields.js.map?v=2628257343667941411790770303

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.