4001'tilda-step-form-1.1.min.js',4002].includes(path);40034004if (!isAllowed) {4005throw new Error(4006`${path} is not allowed. Make sure the file is included in form export dependencies and then add it to the white list.`4007);4008}4009}40104011/**4012* create label for checkboxes, radio or img-select
* * @param {'checkbox' | 'radio' | 'img-select'} type * @param {Object} labelStyles * @param {formObj | false} formObj * @returns {HTMLLabelElement} */function t_zeroForms__createLabel(type, labelStyles, formObj) { var label = document.createElement('label'); label.classList.add('t-' + type + '__control'); if (labelStyles && labelStyles.fontSize) label.style.fontSize = labelStyles.fontSize + 'px'; if (labelStyles) label.style.fontWeight = labelStyles.fontWeight; const labelColor = formObj && formObj.togglelabelcolor; if (labelColor) label.style.color = labelColor; const fontFamily = formObj && formObj.togglefontfamily; if (fontFamily) { label.style.fontFamily = fontFamily; if (!label.style.fontFamily) label.style.fontFamily = '"' + fontFamily + '"'; } const size = formObj.togglesize; if (size) { label.style.setProperty('--size', `${size}px`); } const borderSize = formObj.togglebordersize; if (borderSize) { label.style.setProperty('--border-width', `${borderSize}px`); } const checkboxBorderRadius = formObj.checkboxborderradius; if (type === 'checkbox' && checkboxBorderRadius) { label.style.setProperty('--border-radius', `${checkboxBorderRadius}px`); } return label;}/** * create indicator for radio, checkbox and img-select fields * * @param {'checkbox' | 'radio' | 'img-select'} type * @param {string | undefined | false} colorStyle * @param {{ratio: string, img: string, size: string, borderSize: string, checkboxBorderRadius: string} | false} options * @returns {HTMLDivElement} */function t_zeroForms__createIndicator(type, colorStyle, options) { var indicator = document.createElement('div'); indicator.classList.add('t-' + type + '__indicator'); if (colorStyle) indicator.style.borderColor = colorStyle; if (type === 'img-select') { indicator.classList.add('t-bgimg'); indicator.classList.add(options.ratio); indicator.setAttribute('data-original', options.img); indicator.style.backgroundImage = options.img; } return indicator;}/** * create hidden input to contain checked checkboxes values * * @param {Object} inputPreferences * @param {HTMLDivElement} wrapper * @param {'img-select' | 'checkboxes'} type * @returns {HTMLInputElement} */function t_zeroForms__createNameFieldForCheckbox(inputPreferences, wrapper, type) { var hiddenInput = document.createElement('input'); t_zeroForms__appendMainSettingToField(hiddenInput, inputPreferences, 'hidden', 't-' + type + '__hiddeninput'); hiddenInput.tabIndex = -1; if (inputPreferences.require) hiddenInput.setAttribute('data-tilda-req', '1'); return hiddenInput;}/** * create hidden input * * @param {string} value * @param {string} name * @param {string} fieldClass * @returns {HTMLInputElement} */function t_zeroForms__createHiddenField(value, name, fieldClass) { var input = document.createElement('input'); input.type = 'hidden';