window.Codex = function() { let overrides = JSON.parse(localStorage.getItem('codex-overrides')) || {} let init = function() { if(!window.codex) { window.codex = { api: 'https://roe-reformer.codexfit.com', translations: 'https://roe-reformer.codexfit.com/api/v1/customer/translations', stripe_key: 'pk_live_51S3ECVCsq3efJjCwcMcJrGvqYVPB8UC5l1QOP3pf4RJXkX7fOpo0rrLvNfFnIxHcK4HuOzn9g61z72wvKFwslXrE00HAwWfo3n', timezone: 'Europe/London', components: {}, stageIds: ['codex-app'], locale: 'en-GB', currency: 'GBP', currencyDecimals: 2, app_id: 'roe-reformer', delimiters: ['{{','}}'], routerConfig: { mode: 'hash' }, scriptUrl: 'https://codexfit-api-assets.s3.amazonaws.com/production/7508697/main.js', styleUrl: 'https://api-v3.codexfit.com/styles/all.css', 'auto_configure': { modals: { 'codex-cart': { modalProps: { 'v-slot': '{open, close}', 'x-position': 'right', 'y-position': 'bottom', }, props: { 'v-on:updated': 'open', 'v-on:open': 'open', 'v-on:close': 'close', } }, 'codex-login': { modalProps: { 'v-slot': '{close}', ':delay-close': 3000, }, props: { 'v-on:close': 'close' } }, 'codex-register': { modalProps: { 'v-slot': '{close}', ':delay-close': 3000, }, props: { 'v-on:close': 'close' } }, 'codex-password-recover': { modalProps: { 'v-slot': '{close}', ':delay-close': 3000, }, props: { 'v-on:close': 'close' } }, 'codex-password-reset': { modalProps: { 'v-slot': '{close}', ':delay-close': 3000, }, props: { 'v-on:close': 'close' } }, 'codex-verify-sms': { modalProps: { 'v-slot': '{close}', ':delay-close': 3000, ':show-close-button': false }, props: { 'v-on:close': 'close' } }, 'codex-waitlist-confirmation': { modalProps: { 'v-slot': '{close, open}', ':delay-close': 3000 }, props: { 'v-on:close': 'close', 'v-on:open': 'open' } } } }, registration_fields: {"first_name":{"type":"text","group":"","handle":"first_name","title":"","required":true,"placeholder":"First Name","validation":"","label_translation":"register_fields.first_name","placeholder_translation":"register_fields.first_name_placeholder","columnspan":"1"},"last_name":{"type":"text","group":"","handle":"last_name","title":"","required":true,"placeholder":"Last Name","validation":"","label_translation":"register_fields.last_name","placeholder_translation":"register_fields.last_name_placeholder","columnspan":"1"},"email":{"type":"email","group":"","handle":"email","title":"","required":true,"placeholder":"Email","validation":"","label_translation":"register_fields.email","placeholder_translation":"register_fields.email_placeholder","columnspan":"1"},"password":{"type":"password","group":"","handle":"password","title":"","required":true,"placeholder":"Password","validation":"","label_translation":"register_fields.password","placeholder_translation":"register_fields.password_placeholder","columnspan":"1"},"password_confirmation":{"type":"password","group":"","handle":"password_confirmation","title":"","required":true,"placeholder":"Confirm password Placeholder","validation":"","label_translation":"register_fields.password_confirmation","placeholder_translation":"register_fields.password_confirmation_placeholder","columnspan":"1"},"dob":{"type":"date","group":"","handle":"dob","title":"","required":true,"placeholder":"Enter your date of birth","validation":"","label_translation":"register_fields.dob","placeholder_translation":"register_fields.dob_placeholder","columnspan":""},"telephone":{"type":"telephone","group":"","handle":"telephone","title":"","required":true,"placeholder":"Mobile number","validation":"","label_translation":"register_fields.telephone","placeholder_translation":"register_fields.telephone_placeholder","columnspan":"1"},"policy_liability-waver":{"type":"policy","group":"metafields","handle":"policy_liability-waver","title":"","required":true,"placeholder":"I agree to the Liability Waiver","validation":"","label_translation":"register_fields.policy_liability-waver","placeholder_translation":"register_fields.policy_liability-waver_placeholder","policy":{"id":1,"title":"Liability Waiver","handle":"liability-waver","content":"
In checking the box below I agree that Roe Reformer is not responsible for the safekeeping of my personal belongings while I attend class.<\/p>
I understand that classes at Roe Reformer may be physically strenuous and I voluntarily participate in them with full knowledge that there is a risk of personal injury, property loss or death. I agree that neither I, my heirs, assigns or legal representatives will sue or make any other claims of any kind whatsoever against Roe Reformer or its members for any personal injury, property damage\/loss where malpractice or negligence of the studio is not the cause of such loss.<\/p>
I agree that exercise comes with risk and I will not hold Roe Reformer, its teachers, contractors or representative responsible for injuries sustained during the class.<\/p>
I agree that i will disclose all medical conditions to the studio prior to taking every class and will keep them informed at all times if my health condition changes.<\/p>
I accept that I am of good health and I confirm that I have not been advised not to take part in group exercise. <\/p>
I agree that I am at least 16 years of age. <\/p>","requires_consent":1,"metafields":null,"created_at":"2025-09-07T22:45:47.000000Z","updated_at":"2025-09-07T23:29:00.000000Z","deleted_at":null},"default":false,"use_policy_checkbox":false,"columnspan":"1"},"policy_terms-and-conditions":{"type":"policy","group":"metafields","handle":"policy_terms-and-conditions","title":"","required":true,"placeholder":"I agree to the Terms and Conditions","validation":"","label_translation":"register_fields.policy_terms-and-conditions","placeholder_translation":"register_fields.policy_terms-and-conditions_placeholder","policy":{"id":2,"title":"Terms and Conditions","handle":"terms-and-conditions","content":"
By joining Roe Reformer, members automatically accept and agree to be bound by these conditions of membership. Management reserves the right to alter, amend or change the Terms & Conditions from time to time. The version on this website being the most up to date available.<\/p>
Booking Classes<\/strong><\/p> 1.0) All members must book sessions via our online booking system on the website in advance of attending<\/p> 1.1) Payment is required at the time of booking<\/p> 1.2) Should you book a class and not attend, your class credit will be deducted from your account<\/p> 1.3) Class credits must be used within their expiry period and are non-transferrable<\/p> Cancellations and Refunds<\/strong><\/p> 2.0) Cancellations should be made at least 12 hours before the class <\/p> 2.1) Late cancellations or no-shows will result in the loss of the class credit<\/p> 2.2) Refunds are not provided, but classes can be rescheduled within your package validity period<\/p> Responsibility for your personal belongings<\/strong><\/p> 3.1) Roe Reformer will not be held responsible for lost or stolen items<\/p> 3.2) Bikes and cars are parked at your own responsibility<\/p> Members responsibility<\/strong><\/p> 4.1) Please do not attend the gym if you are displaying symptoms of Covid 19\/Cold or Flu<\/p> 4.2) Please do not attend the gym if you have family member or somebody in close contact displaying Covid 19 Symptoms<\/p> 4.3) you are responsible for your own behaviour , rude or aggressive behaviour will not be tolerated and you will be asked to leave the studio<\/p> 4.4) Please act responsibly when using equipment within the studio, misusing or tampering with equipment will lead to expulsion from the studio and may incur financial costs to replace equipment<\/p> 4.5) Group classes are not suitable for those that are pregnant or those that suffer with osteoporosis<\/p> Arrival and Etiquette<\/strong><\/p> 5.0) Please arrive 5\u201310 minutes<\/strong> before class to get settled.<\/p> 5.1) Late arrivals may not be admitted for safety reasons.<\/p> 5.2) Grip socks are essential to participate in the class for safety and hygiene reasons. <\/p> 5.3) Phones should be on silent, and we ask everyone to respect the quiet, focused studio environment.<\/p> 5.4) Please wipe down your reformer and any props after class<\/p>
<\/p>","requires_consent":1,"metafields":null,"created_at":"2025-09-08T00:11:32.000000Z","updated_at":"2025-09-14T16:59:43.000000Z","deleted_at":null},"default":false,"use_policy_checkbox":false,"columnspan":"1"}},
registration_fields_layout: 1,
update_fields: {"first_name":{"type":"text","group":"","handle":"first_name","title":"","required":true,"placeholder":"First Name","validation":"","label_translation":"update_fields.first_name","placeholder_translation":"update_fields.first_name_placeholder","columnspan":"2"},"last_name":{"type":"text","group":"","handle":"last_name","title":"","required":true,"placeholder":"Last Name","validation":"","label_translation":"update_fields.last_name","placeholder_translation":"update_fields.last_name_placeholder","columnspan":"2"},"email":{"type":"email","group":"","handle":"email","title":"","required":true,"placeholder":"Email","validation":"","label_translation":"update_fields.email","placeholder_translation":"update_fields.email_placeholder","columnspan":"2"},"password":{"type":"password","group":"","handle":"password","title":"","required":true,"placeholder":"Password","validation":"","label_translation":"update_fields.password","placeholder_translation":"update_fields.password_placeholder","columnspan":"2"},"password_confirmation":{"type":"password","group":"","handle":"password_confirmation","title":"","required":true,"placeholder":"Confirm password Placeholder","validation":"","label_translation":"update_fields.password_confirmation","placeholder_translation":"update_fields.password_confirmation_placeholder","columnspan":"2"},"dob":{"type":"date","group":"","handle":"dob","title":"","required":true,"placeholder":"Enter your date of birth","validation":"","label_translation":"update_fields.dob","placeholder_translation":"update_fields.dob_placeholder","columnspan":""},"telephone":{"type":"telephone","group":"","handle":"telephone","title":"","required":true,"placeholder":"Mobile number","validation":"","label_translation":"update_fields.telephone","placeholder_translation":"update_fields.telephone_placeholder","columnspan":"2"}},
update_fields_layout: 2,
urls: {"buy_url":"https:\/\/roe-reformer.com\/buy","account_url":"https:\/\/roe-reformer.com\/my-account","booking_url":"https:\/\/roe-reformer.com\/book","website_url":"https:\/\/roe-reformer.com"}
}
Object.keys(overrides).map(x => {
window.codex[x] = overrides[x]
})
var observer = new MutationObserver(function() {
if (document.body) {
if(window.codex.translations) {
let translations = document.createElement("script")
translations.type = "text/javascript"
translations.src = window.codex.translations
translations.addEventListener('load', function() {
console.log('%cCodex |%c Translations loaded', 'font-weight: bold', 'font-weight: normal')
document.dispatchEvent(new Event('codex-initialise'))
})
document.head.appendChild(translations)
console.log('%cCodex |%c Added translations', 'font-weight: bold', 'font-weight: normal')
}
if(window.codex.scriptUrl) {
loadScript = function() {
let cs = document.createElement("script")
cs.type = window.codex.scriptType ?? "text/javascript"
cs.src = window.codex.scriptUrl
cs.module =
cs.defer = true
if(window.codex.momentLocaleUrl) {
cs.addEventListener("load", function() {
let mls = document.createElement("script")
mls.type = "text/javascript"
mls.src = window.codex.momentLocaleUrl
mls.defer = true
document.body.appendChild(mls)
console.log('%cCodex |%c Added moment locale script', 'font-weight: bold', 'font-weight: normal')
})
}
document.body.appendChild(cs)
console.log('%cCodex |%c Added app script', 'font-weight: bold', 'font-weight: normal')
}
if(document.readyState === "complete") {
loadScript()
} else {
document.addEventListener("DOMContentLoaded", loadScript)
}
}
if(window.codex.styleUrl) {
let css = document.createElement("link")
css.media = "all"
css.type = "text/css"
css.rel = "stylesheet"
css.href = window.codex.styleUrl
document.head.appendChild(css)
console.log('%cCodex |%c Added default styles', 'font-weight: bold', 'font-weight: normal')
}
if(window.codex?.auto_configure?.modals) {
// Create a single container for all modals
const modalContainer = document.createElement("div")
modalContainer.id = "codex-modal-container"
modalContainer.dataset.codex = ""
// Create modals within the single container
Object.entries(window.codex.auto_configure.modals).forEach(([component, attrs]) => {
const modal = document.createElement("codex-modal")
modal.setAttribute('modal-name', component)
Object.entries(attrs.modalProps ?? {}).forEach(([key, value]) => {
modal.setAttribute(key, value)
})
const vueComponent = document.createElement(component)
Object.entries(attrs.props ?? {}).forEach(([key, value]) => {
vueComponent.setAttribute(key, value)
})
modal.appendChild(vueComponent)
modalContainer.appendChild(modal)
})
// Append the single container to body instead of head
document.body.appendChild(modalContainer)
document.addEventListener("click", (event) => {
if(event.target?.dataset.codexModalOpen) {
event.stopPropagation()
document.dispatchEvent(new Event('codex.modal.open.' + event.target.dataset.codexModalOpen))
}
if(event.target?.dataset.codexModalClose) {
event.stopPropagation()
document.dispatchEvent(new Event('codex.modal.close.' + event.target.dataset.codexModalClose))
}
if(event.target?.dataset.codexModalToggle) {
event.stopPropagation()
document.dispatchEvent(new Event('codex.modal.toggle.' + event.target.dataset.codexModalToggle))
}
})
console.log('%cCodex |%c Added default modals', 'font-weight: bold', 'font-weight: normal')
}
observer.disconnect();
}
})
observer.observe(document.documentElement, {childList: true});
console.log(`%cCodex | %cConfiguring...`, 'font-weight: bold', 'font-weight: normal' )
if(localStorage.getItem('codex-overrides')) {
console.log('%cCodex | %cWarning! Using custom overrides %o', 'font-weight: bold', 'color: rgb(217,31,38)', overrides)
// Object.keys(overrides).map(x => {
// console.log('%c ' + x + ': ' + overrides[x], 'display: block; color: red')
// })
}
// if(localStorage.getItem('codex-script-url')) {
// console.log(`%cWarning: Using custom script URL: ` + localStorage.getItem('codex-script-url'), 'display: block; font-size: 16px;color: red);')
// }
}
}
let addStage = function(id) {
window.codex.stageIds.push(id)
}
let store = function(key, value) {
window.codex[key] = value
overrides[key] = value
localStorage.setItem('codex-overrides', JSON.stringify(overrides))
}
let set = function(key, value) {
window.codex[key] = value
}
let unset = function(key) {
delete window.codex[key]
delete overrides[key]
localStorage.setItem('codex-overrides', JSON.stringify(overrides))
}
return {
addStage,
store,
set,
unset,
init,
}
}
Codex().init();