PageSourceSearch

https://acadianarehabilitation.com/_/js/c/15f8e9526c12fa42c03c9f6e…?_n=m6a8c4066c54410.41021728

js acadianarehabilitation.com collected 2026-09-30 05:12:52 UTC 65,994 bytes, 1,053 lines download raw bytes

1
2/* cached asset-dumpb94d83196a657ae62f4d8f261538645c9f5c63fc: */
3function _calculateScrollbarWidth() {
4    document.documentElement.style.setProperty('--scrollbar-width', (window.innerWidth - document.documentElement.clientWidth) + "px");
5}
6
7// recalculate on resize
8window.addEventListener('resize', _calculateScrollbarWidth, false);
9
10// recalculate on dom load
11document.addEventListener('DOMContentLoaded', _calculateScrollbarWidth, false); 
12
13// recalculate on load (assets loaded as well)
14window.addEventListener('load', _calculateScrollbarWidth);
15/* cached asset-dump98e6a8b281a9cba7430393cd9c2d0c670ee2c0fd: */
16var forge = forge || {};
17forge.blockCallback = function(block, action, callbackFunc) {
18    var obj = {
19        id: block.id,
20        action: action,
21        uri: block.callbackUri + "/" + action,
22        requestPath:  window.location.pathname
23    };
24    return callbackFunc.apply(obj);
25};
26forge.requestData = function(data) {
27    data = data || {};
28    data.userId      = forge.user ? forge.user.id : null;
29    data.pageId      = forge.page ? forge.page.id : null;
30    data.requestPath = window.location.pathname;
31    return data;
32};
33/* cached asset-dumpd79c428037ec4972ce0c907e203ffc6b3f23cb4b: */
34"use strict";
35
36function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
37function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
38function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
39function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
40function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
41function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } }
vendor: 14,395 bytes, lines 41-50
41 }; }
42function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
43function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
44function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
45function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
46function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
47function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
48function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
49function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
50function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
51function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
52(function () {
53  var __data_block_id = 25736399;
54  var __block_id = "f3YxN";
55  var foundBlockNode = document.getElementsByClassName("f_" + __block_id).length > 0;
56  if (!foundBlockNode) {
57    var templates = document.querySelectorAll('template');
58    for (var i = 0; i < templates.length; i++) {
59      if (templates[i].content.querySelector('.f_' + __block_id)) {
60        foundBlockNode = true;
61        break;
62      }
63    }
64  }
65  if (foundBlockNode) {
66    var ready = function ready(counter) {
67      if (!('__forgePageBlockData' in window) || !(__data_block_id in __forgePageBlockData)) {
68        if (counter == 10) {
69          throw Error("Giving up waiting for block data");
70          return;
71        }
72        return setTimeout(function () {
73          ready(counter + 1);
74        }, 250);
75      }
76      if (typeof __forgePageBlockData[__data_block_id] == 'number') {
77        __forgePageBlockData[__data_block_id] = __forgePageBlockData[__forgePageBlockData[__data_block_id]] || {};
78      }
79      var useCaptcha = __forgePageBlockData[__data_block_id].useCaptcha;
80      var objectModelMap = __forgePageBlockData[__data_block_id].objectModelMap;
81      var form = __forgePageBlockData[__data_block_id].form;
82      var form_id = __forgePageBlockData[__data_block_id].form_id;
83      var form_settings = __forgePageBlockData[__data_block_id].form_settings;
84      var form_fields = __forgePageBlockData[__data_block_id].form_fields;
85      var form_structure = __forgePageBlockData[__data_block_id].form_structure;
86      var form_google_maps_enabled = __forgePageBlockData[__data_block_id].form_google_maps_enabled;
87      var form_has_google_maps_api_key = __forgePageBlockData[__data_block_id].form_has_google_maps_api_key;
88      var conversion_meta = __forgePageBlockData[__data_block_id].conversion_meta;
89      var button = __forgePageBlockData[__data_block_id].button;
90      var centerButtons = __forgePageBlockData[__data_block_id].centerButtons;
91      var buttonColumnSpan = __forgePageBlockData[__data_block_id].buttonColumnSpan;
92      var prevPageButton = __forgePageBlockData[__data_block_id].prevPageButton;
93      var nextPageButton = __forgePageBlockData[__data_block_id].nextPageButton;
94      var showLabels = __forgePageBlockData[__data_block_id].showLabels;
95      var showPlaceholders = __forgePageBlockData[__data_block_id].showPlaceholders;
96      var showPageNumbers = __forgePageBlockData[__data_block_id].showPageNumbers;
97      var _block = __forgePageBlockData[__data_block_id]._block;
98      var _page = __forgePageBlockData[__data_block_id]._page;
99      var _ts = __forgePageBlockData[__data_block_id]._ts;
100      var _elements = __forgePageBlockData[__data_block_id]._elements;
101      var block = {
102        id: "25736399",
103        callbackUri: "/_/b/25736399"
104      };
105      var call = function call(action, callbackFunc) {
106        return forge.blockCallback(block, action, callbackFunc);
107      };
108      var callback = function callback(action, data) {
109        return call(action, function () {
110          data = withData(data || {});
111
112          // check if any of the formData is a File or Blob
113          var isFile = false;
114          for (var key in data) {
115            if (!isFile && data[key]) {
116              var arr = Array.isArray(data[key]) ? data[key] : [data[key]];
117              for (var i = 0; i < arr.length; i++) {
118                if (arr[i] === Object(arr[i]) && (arr[i].constructor == File || arr[i].constructor === Blob)) {
119                  isFile = true;
120                  break;
121                }
122              }
123            }
124          }
125          if (isFile) {
126            var formData = new FormData();
127            for (var key in data) {
128              if (data[key] && (Array.isArray(data[key]) || data[key] === Object(data[key])) && data[key].constructor !== File && data[key].constructor !== Blob) {
129                for (var idx in data[key]) {
130                  formData.append(key + '[' + idx + ']', data[key][idx]);
131                }
132              } else {
133                formData.append(key, data[key]);
134              }
135            }
136            return axios.post(this.uri, formData, {
137              headers: {
138                'Content-Type': 'multipart/form-data',
139                'X-Lazy-Load': 'off'
140              }
141            });
142          } else {
143            return axios.post(this.uri, data, {
144              headers: {
145                'X-Lazy-Load': 'off'
146              }
147            });
148          }
149        });
150      };
151      var withData = function withData(data) {
152        return forge.requestData(data);
153      };
154
155      /**
156       * This script relies on the BladeScript functionality which is scoped automatically (providing form_id, form_fields and optionally conversion_meta)
157       */
158
159      //window.forgeForms = window.forgeForms || {}
160
161      // Wrap in IIFE to handle both pre-Alpine and post-Alpine loading scenarios
162      (function () {
163        var form = function form() {
164          return {
165            formInitilized: new Date().getTime(),
166            timeoutCounter: 0,
167            autocompleteTimeoutCounter: 0,
168            input: form_fields,
169            successMessage: "",
170            successRedirect: "",
171            errorMessage: "",
172            sending: false,
173            recaptchaWidgetId: null,
174            currentPage: 1,
175            numberOfPages: _typeof(form_settings) === 'object' && form_settings && 'pages' in form_settings ? form_settings.pages : 1,
176            formStructure: typeof form_structure !== 'undefined' ? form_structure : {},
177            init: function init() {
178              var _this = this;
179              this.$nextTick(function () {
180                _this.initializeAddressFields();
181                _this.initializeGoogleAutocomplete();
182                setTimeout(function () {
183                  if (_this.$refs.captchaButton) {
184                    if (!_this.recaptchaScriptExists()) {
185                      _this.loadRecaptcha();
186                    }
187                    _this.initRecaptcha();
188                  }
189                }, 3000);
190              });
191            },
192            initializeAddressFields: function initializeAddressFields() {
193              var _this2 = this;
194              if (!this.formStructure) return;
195              Object.entries(this.formStructure).forEach(function (_ref) {
196                var _ref2 = _slicedToArray(_ref, 2),
197                  slug = _ref2[0],
198                  type = _ref2[1];
199                if (type === 'address') {
200                  if (!_this2.input[slug] || _typeof(_this2.input[slug]) !== 'object') {
201                    _this2.input[slug] = {
202                      line1: '',
203                      line2: '',
204                      city: '',
205                      state: '',
206                      postalCode: '',
207                      country: '',
208                      fullAddress: ''
209                    };
210                  } else {
211                    // Ensure fullAddress is present if object exists but incomplete
212                    if (!('fullAddress' in _this2.input[slug])) {
213                      _this2.input[slug].fullAddress = '';
214                    }
215                  }
216                }
217              });
218            },
219            initializeGoogleAutocomplete: function initializeGoogleAutocomplete() {
220              var _this3 = this,
221                _this$$refs$addressAu,
222                _this$$refs$addressAu2,
223                _this$$refs$addressAu3;
224              this.autocompleteTimeoutCounter++;
225
226              // Give up after 120 attempts (60 seconds at 500ms intervals)
227              if (this.autocompleteTimeoutCounter > 120) {
228                console.warn('Google Maps API not available for address autocomplete');
229                return;
230              }
231
232              // Check if Google Maps API is loaded
233              if (typeof google === 'undefined' || typeof google.maps === 'undefined' || typeof google.maps.places === 'undefined') {
234                setTimeout(function () {
235                  _this3.initializeGoogleAutocomplete();
236                }, 500);
237                return;
238              }
239
240              // Find all address input fields in this form
241              var addressInputs = this.$el.querySelectorAll('input[data-address="true"]');
242
243              // Capture the Alpine component context
244              var alpineComponent = this;
245
246              // Get style templates
247              var dropdownStyles = ((_this$$refs$addressAu = this.$refs.addressAutocompleteDropdownStyles) === null || _this$$refs$addressAu === void 0 ? void 0 : _this$$refs$addressAu.classList) || null;
248              var itemStyles = ((_this$$refs$addressAu2 = this.$refs.addressAutocompleteItemStyles) === null || _this$$refs$addressAu2 === void 0 ? void 0 : _this$$refs$addressAu2.classList) || null;
249              var itemSelectedStyles = ((_this$$refs$addressAu3 = this.$refs.addressAutocompleteItemSelectedStyles) === null || _this$$refs$addressAu3 === void 0 ? void 0 : _this$$refs$addressAu3.classList) || null;
250              addressInputs.forEach(function (input) {
251                var slug = input.dataset.slug;
252                if (!slug) return;
253
254                // Create dropdown container for suggestions
255                var dropdown = document.createElement('div');
256                // Apply classes from template or fallback to defaults
257                if (dropdownStyles) {
258                  dropdown.className = Array.from(dropdownStyles).join(' ') + ' hidden';
259                } else {
260                  dropdown.className = 'absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-auto hidden';
261                }
262                dropdown.setAttribute('role', 'listbox');
263
264                // Position dropdown relative to input's parent
265                var parent = input.parentElement;
266                if (parent && window.getComputedStyle(parent).position === 'static') {
267                  parent.style.position = 'relative';
268                }
269                parent.appendChild(dropdown);
270                var debounceTimer;
271                var currentSuggestions = [];
272                var selectedIndex = -1;
273
274                // Handle input changes
275                input.addEventListener('input', /*#__PURE__*/function () {
276                  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
277                    var value;
278                    return _regeneratorRuntime().wrap(function _callee3$(_context3) {
279                      while (1) {
280                        switch (_context3.prev = _context3.next) {
281                          case 0:
282                            value = e.target.value; // Clear previous timer
283                            clearTimeout(debounceTimer);
284                            if (!(!value || value.length < 3)) {
285                              _context3.next = 7;
286                              break;
287                            }
288                            dropdown.classList.add('hidden');
289                            currentSuggestions = [];
290                            selectedIndex = -1;
291                            return _context3.abrupt("return");
292                          case 7:
293                            // Debounce the API call
294                            debounceTimer = setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
295                              var request, _yield$google$maps$pl, suggestions;
296                              return _regeneratorRuntime().wrap(function _callee2$(_context2) {
297                                while (1) {
298                                  switch (_context2.prev = _context2.next) {
299                                    case 0:
300                                      _context2.prev = 0;
301                                      request = {
302                                        input: value,
303                                        includedPrimaryTypes: ['geocode'],
304                                        language: 'en'
305                                      };
306                                      _context2.next = 4;
307                                      return google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions(request);
308                                    case 4:
309                                      _yield$google$maps$pl = _context2.sent;
310                                      suggestions = _yield$google$maps$pl.suggestions;
311                                      currentSuggestions = suggestions || [];
312                                      selectedIndex = -1;
313                                      if (currentSuggestions.length) {
314                                        _context2.next = 11;
315                                        break;
316                                      }
317                                      dropdown.classList.add('hidden');
318                                      return _context2.abrupt("return");
319                                    case 11:
320                                      // Build dropdown UI with classes from templates
321                                      dropdown.innerHTML = '';
322                                      currentSuggestions.forEach(function (suggestion, index) {
323                                        var item = document.createElement('div');
324                                        // Apply classes from template or fallback to defaults
325                                        if (itemStyles) {
326                                          item.className = Array.from(itemStyles).join(' ');
327                                        } else {
328                                          item.className = 'px-4 py-3 cursor-pointer hover:bg-gray-100 border-b border-gray-100 last:border-b-0';
329                                        }
330                                        item.setAttribute('role', 'option');
331                                        item.setAttribute('data-index', index);
332                                        item.textContent = suggestion.placePrediction.text.toString();
333
334                                        // Handle click selection
335                                        item.addEventListener('click', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
336                                          return _regeneratorRuntime().wrap(function _callee$(_context) {
337                                            while (1) {
338                                              switch (_context.prev = _context.next) {
339                                                case 0:
340                                                  _context.next = 2;
341                                                  return handlePlaceSelection(suggestion.placePrediction);
342                                                case 2:
343                                                case "end":
344                                                  return _context.stop();
345                                              }
346                                            }
347                                          }, _callee);
348                                        })));
349                                        dropdown.appendChild(item);
350                                      });
351                                      dropdown.classList.remove('hidden');
352                                      _context2.next = 20;
353                                      break;
354                                    case 16:
355                                      _context2.prev = 16;
356                                      _context2.t0 = _context2["catch"](0);
357                                      console.error('Error fetching autocomplete suggestions:', _context2.t0);
358                                      dropdown.classList.add('hidden');
359                                    case 20:
360                                    case "end":
361                                      return _context2.stop();
362                                  }
363                                }
364                              }, _callee2, null, [[0, 16]]);
365                            })), 300);
366                          case 8:
367                          case "end":
368                            return _context3.stop();
369                        }
370                      }
371                    }, _callee3);
372                  }));
373                  return function (_x2) {
374                    return _ref3.apply(this, arguments);
375                  };
376                }());
377
378                // Handle keyboard navigation
379                input.addEventListener('keydown', /*#__PURE__*/function () {
380                  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(e) {
381                    var items;
382                    return _regeneratorRuntime().wrap(function _callee4$(_context4) {
383                      while (1) {
384                        switch (_context4.prev = _context4.next) {
385                          case 0:
386                            items = dropdown.querySelectorAll('[role="option"]');
387                            if (!(e.key === 'ArrowDown')) {
388                              _context4.next = 7;
389                              break;
390                            }
391                            e.preventDefault();
392                            selectedIndex = Math.min(selectedIndex + 1, currentSuggestions.length - 1);
393                            updateSelectedItem(items, selectedIndex);
394                            _context4.next = 21;
395                            break;
396                          case 7:
397                            if (!(e.key === 'ArrowUp')) {
398                              _context4.next = 13;
399                              break;
400                            }
401                            e.preventDefault();
402                            selectedIndex = Math.max(selectedIndex - 1, -1);
403                            updateSelectedItem(items, selectedIndex);
404                            _context4.next = 21;
405                            break;
406                          case 13:
407                            if (!(e.key === 'Enter' && selectedIndex >= 0)) {
408                              _context4.next = 20;
409                              break;
410                            }
411                            e.preventDefault();
412                            if (!currentSuggestions[selectedIndex]) {
413                              _context4.next = 18;
414                              break;
415                            }
416                            _context4.next = 18;
417                            return handlePlaceSelection(currentSuggestions[selectedIndex].placePrediction);
418                          case 18:
419                            _context4.next = 21;
420                            break;
421                          case 20:
422                            if (e.key === 'Escape') {
423                              dropdown.classList.add('hidden');
424                              selectedIndex = -1;
425                            }
426                          case 21:
427                          case "end":
428                            return _context4.stop();
429                        }
430                      }
431                    }, _callee4);
432                  }));
433                  return function (_x3) {
434                    return _ref6.apply(this, arguments);
435                  };
436                }());
437
438                // Update visual selection
439                var updateSelectedItem = function updateSelectedItem(items, index) {
440                  items.forEach(function (item, i) {
441                    if (i === index) {
442                      // Apply selected state classes from template
443                      if (itemSelectedStyles) {
444                        item.className = Array.from(itemSelectedStyles).join(' ');
445                      } else {
446                        // Fallback: just add bg-gray-100 to existing classes
447                        item.classList.add('bg-gray-100');
448                      }
449                      item.scrollIntoView({
450                        block: 'nearest'
451                      });
452                    } else {
453                      // Apply normal state classes from template
454                      if (itemStyles) {
455                        item.className = Array.from(itemStyles).join(' ');
456                      } else {
457                        // Fallback: remove bg-gray-100
458                        item.classList.remove('bg-gray-100');
459                      }
460                    }
461                  });
462                };
463
464                // Handle place selection
465                var handlePlaceSelection = /*#__PURE__*/function () {
466                  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(placePrediction) {
467                    var place, addressComponents, addressData;
468                    return _regeneratorRuntime().wrap(function _callee5$(_context5) {
469                      while (1) {
470                        switch (_context5.prev = _context5.next) {
471                          case 0:
472                            _context5.prev = 0;
473                            // Convert prediction to Place object
474                            place = placePrediction.toPlace(); // Fetch place details including address components
475                            _context5.next = 4;
476                            return place.fetchFields({
477                              fields: ['addressComponents', 'formattedAddress']
478                            });
479                          case 4:
480                            addressComponents = place.addressComponents;
481                            if (addressComponents) {
482                              _context5.next = 7;
483                              break;
484                            }
485                            return _context5.abrupt("return");
486                          case 7:
487                            // Parse address components
488                            addressData = {
489                              line1: '',
490                              line2: '',
491                              city: '',
492                              state: '',
493                              postalCode: '',
494                              country: '',
495                              fullAddress: place.formattedAddress || ''
496                            }; // Extract address components
497                            addressComponents.forEach(function (component) {
498                              var types = component.types;
499                              if (types.includes('street_number')) {
500                                addressData.line1 = component.longText + ' ' + addressData.line1;
501                              } else if (types.includes('route')) {
502                                addressData.line1 += component.longText;
503                              } else if (types.includes('locality')) {
504                                addressData.city = component.longText;
505                              } else if (types.includes('administrative_area_level_1')) {
506                                addressData.state = component.shortText;
507                              } else if (types.includes('postal_code')) {
508                                addressData.postalCode = component.longText;
509                              } else if (types.includes('country')) {
510                                addressData.country = component.longText;
511                              }
512                            });
513
514                            // Trim line1
515                            addressData.line1 = addressData.line1.trim();
516
517                            // Update the input field display with full address
518                            input.value = addressData.fullAddress;
519
520                            // Update the Alpine data
521                            alpineComponent.input[slug].line1 = addressData.line1;
522                            alpineComponent.input[slug].line2 = addressData.line2;
523                            alpineComponent.input[slug].city = addressData.city;
524                            alpineComponent.input[slug].state = addressData.state;
525                            alpineComponent.input[slug].postalCode = addressData.postalCode;
526                            alpineComponent.input[slug].country = addressData.country;
527                            alpineComponent.input[slug].fullAddress = addressData.fullAddress;
528
529                            // Hide dropdown
530                            dropdown.classList.add('hidden');
531                            currentSuggestions = [];
532                            selectedIndex = -1;
533                            _context5.next = 26;
534                            break;
535                          case 23:
536                            _context5.prev = 23;
537                            _context5.t0 = _context5["catch"](0);
538                            console.error('Error fetching place details:', _context5.t0);
539                          case 26:
540                          case "end":
541                            return _context5.stop();
542                        }
543                      }
544                    }, _callee5, null, [[0, 23]]);
545                  }));
546                  return function handlePlaceSelection(_x4) {
547                    return _ref7.apply(this, arguments);
548                  };
549                }();
550
551                // Hide dropdown when clicking outside
552                document.addEventListener('click', function (e) {
553                  if (!input.contains(e.target) && !dropdown.contains(e.target)) {
554                    dropdown.classList.add('hidden');
555                    selectedIndex = -1;
556                  }
557                });
558              });
559            },
560            prevPage: function prevPage() {
561              this.currentPage--;
562              if (typeof gtag !== "undefined") {
563                gtag("event", "form_prev_page", {
564                  'page': this.currentPage,
565                  'form': form_id
566                });
567              }
568            },
569            nextPage: function nextPage() {
570              this.currentPage++;
571              if (typeof gtag !== "undefined") {
572                gtag("event", "form_next_page", {
573                  'page': this.currentPage,
574                  'form': form_id
575                });
576              }
577            },
578            recaptchaScriptExists: function recaptchaScriptExists() {
579              var url = "https://www.google.com/recaptcha/api.js?render=explicit";
580              var scripts = document.getElementsByTagName("script");
581              for (var i = scripts.length; i--;) {
582                if (scripts[i].src == url) {
583                  return true;
584                }
585              }
586              return false;
587            },
588            getNextSibling: function getNextSibling(elem, selector) {
589              // Get the next sibling element
590              try {
591                var sibling = elem.nextElementSibling;
592                if (!sibling) return;
593                // If there's no selector, return the first sibling
594                if (!selector) return sibling;
595                // If the sibling matches our selector, use it
596                // If not, jump to the next sibling and continue the loop
597                while (sibling) {
598                  if (sibling.matches(selector)) return sibling;
599                  sibling = sibling.nextElementSibling;
600                }
601                return sibling;
602              } catch (error) {}
603            },
604            loadRecaptcha: function loadRecaptcha() {
605              // Only init recaptcha if we have a recaptcha button ref
606              if (!this.$refs.captchaButton) {
607                return;
608              }
609              var recaptchaScript = document.createElement("script");
610              recaptchaScript.async = true;
611              recaptchaScript.type = "text/javascript";
612              recaptchaScript.setAttribute("src", "https://www.google.com/recaptcha/api.js?render=explicit");
613              document.head.appendChild(recaptchaScript);
614            },
615            initRecaptcha: function initRecaptcha() {
616              var _this4 = this;
617              // Only init recaptcha if we have a recaptcha button ref
618              if (!this.$refs.captchaButton) {
619                return;
620              }
621              this.timeoutCounter++;
622              if (this.timeoutCounter === 120) {
623                console.log("Giving up on recaptcha");
624                return;
625              }
626              var submitBtn = this.$refs.captchaButton;
627              try {
628                setTimeout(function () {
629                  if (typeof grecaptcha === "undefined" || typeof grecaptcha.render === "undefined") {
630                    _this4.initRecaptcha();
631                  } else {
632                    var _this4$$refs$captchaB;
633                    _this4.recaptchaWidgetId = grecaptcha.render(submitBtn.getAttribute("id"), {
634                      sitekey: (_this4$$refs$captchaB = _this4.$refs.captchaButton.dataset.sitekey) !== null && _this4$$refs$captchaB !== void 0 ? _this4$$refs$captchaB : "",
635                      badge: "bottomleft",
636                      size: "invisible",
637                      callback: _this4.recaptchaPassed.bind(_this4),
638                      errorCallback: console.error,
639                      expiredCallback: console.error
640                    });
641                  }
642                }, 500);
643                var checkForBadge = setInterval(function () {
644                  var badge = document.querySelector(".grecaptcha-badge");
645                  if (badge) {
646                    document.body.append(badge);
647                    clearInterval(checkForBadge);
648                  }
649                }, 50);
650              } catch (error) {}
651            },
652            usingRecaptcha: function usingRecaptcha() {
653              return this.$refs.captchaButton || typeof this.input["g-recaptcha-response"] !== "undefined";
654            },
655            recaptchaPassed: function recaptchaPassed(code) {
656              this.input["g-recaptcha-response"] = code;
657              grecaptcha.reset(this.recaptchaWidgetId);
658              this.submit();
659            },
660            submit: function submit(cb, skip) {
661              var _this5 = this;
662              // Manually update the inputs from the form itself in case the user used auto-fill and
663              // the browser didn't behave correctly or something.
664              if (!skip) {
665                var inputs = document.querySelectorAll("[x-data='".concat(form_id, "'] [x-model]"));
666                var foundAutofill = false;
667                for (var i = 0; i < inputs.length; i++) {
668                  // Wrap this in a try/catch because non webkit browsers will log errors on this pseudo element
669                  try {
670                    if (inputs[i].matches(':-webkit-autofill')) {
671                      inputs[i].dispatchEvent(new Event("input"));
672                      foundAutofill = true;
673                    }
674                  } catch (error) {}
675                }
676                if (foundAutofill) {
677                  // Wait a beat to let alpine catch the change events
678                  setTimeout(function () {
679                    _this5.submit(cb, true);
680                  }, 100);
681                  return false;
682                }
683              }
684
685              // If captcha is required (ref exists) and didn't pass
686              if (this.usingRecaptcha() && !this.input["g-recaptcha-response"]) {
687                // get outta here
688                console.log('Recaptcha required. Double check you have both a x-ref="captchaButton" and a field named "g-recaptcha-response" in your PHP.');
689                alert("Oops, it looks like the form isn't quite ready yet. Please wait a few seconds and try again.");
690                cb && typeof cb === "function" && cb(false);
691                return false;
692              }
693
694              // Update form state
695              this.sending = true;
696              this.input.form_submitted_in = new Date().getTime() - this.formInitilized;
697              // Submit the submit callback
698              callback("submit", this.input).then(function (res) {
699                console.log("Form submitted at " + new Date().getTime());
700                try {
701                  setTimeout(function () {
702                    var node = document.getElementById(form_id);
703                    if (node && 'scrollIntoView' in node) {
704                      console.log("Form scrolling to Success Message at " + new Date().getTime());
705                      node.scrollIntoView({
706                        block: "start",
707                        behavior: "smooth"
708                      });
709                    }
710                  }, 100);
711
712                  // If we don't get a success message back, something went from (even if it's a 200 code)
713                  if (!res.data || !res.data.message && !res.data.redirect) {
714                    // Show error and reset form
715                    _this5.successMessage = null;
716                    _this5.errorMessage = "An unknown error occurred. Please use another method to get in touch and report this issue.";
717                    _this5.sending = false;
718                    cb && typeof cb === "function" && cb(false);
719                    return; // get out of here
720                  }
721
722                  // SUCCESS
723                  console.log("Form conversion recorded at " + new Date().getTime());
724                  _this5.recordConversion();
725                  if (res.data.redirect) {
726                    // wait a second to let the conversion fire
727                    setTimeout(function () {
728                      window.location.href = res.data.redirect;
729                    }, 1000);
730                  } else {
731                    _this5.successMessage = res.data.message;
732                  }
733
734                  // Reset form state
735                  _this5.errorMessage = null;
736                  _this5.sending = false;
737                  cb && typeof cb === "function" && cb(true);
738                } catch (e) {
739                  console.log(e);
740                }
741              })["catch"](function (_ref8) {
742                var response = _ref8.response;
743                var node = document.getElementById(form_id);
744                if (node && 'scrollIntoView' in node) {
745                  node.scrollIntoView({
746                    block: "start",
747                    behavior: "smooth"
748                  });
749                }
750
751                // Reset form fields and error message
752                var message = "";
753                var invalids = _this5.$el.getElementsByClassName("is-invalid");
754                var _iterator = _createForOfIteratorHelper(invalids),
755                  _step;
756                try {
757                  for (_iterator.s(); !(_step = _iterator.n()).done;) {
758                    var element = _step.value;
759                    element.classList.remove("is-invalid");
760                  }
761
762                  // If errors weren't sent, something else went wrong but we want to give some feedback
763                } catch (err) {
764                  _iterator.e(err);
765                } finally {
766                  _iterator.f();
767                }
768                if (!response.data || !response.data.errors) {
769                  message = "An unknown error occurred. Please use another method to get in touch and report this issue.";
770                  // We have errors
771                } else {
772                  // If a string
773                  if (typeof response.data.errors === "string") {
774                    // Single error (likely not field related) set message to error
775                    message = response.data.errors;
776                    // If it's an array
777                  } else {
778                    // Append each to the message
779                    for (var _i2 = 0, _Object$entries = Object.entries(response.data.errors); _i2 < _Object$entries.length; _i2++) {
780                      var _this5$getNextSibling;
781                      var _Object$entries$_i = _slicedToArray(_Object$entries[_i2], 2),
782                        field = _Object$entries$_i[0],
783                        msg = _Object$entries$_i[1];
784                      var input = _this5.$el.querySelector(".input\\:" + field);
785                      var feedback = (_this5$getNextSibling = _this5.getNextSibling(input, ".invalid-feedback")) !== null && _this5$getNextSibling !== void 0 ? _this5$getNextSibling : null;
786
787                      // If we have a feedback div specifically for this input
788                      if (input && feedback) {
789                        // Send message there
790                        feedback.innerHTML = msg;
791                      } else {
792                        var m = Array.isArray(msg) ? msg.join("<br>") : msg;
793                        //  Otherwise send to the primary error message area
794                        message += message !== "" ? "<br>" + m : m;
795                      }
796                      if (input) {
797                        // Also mark field invalid
798                        input.classList.add("is-invalid");
799                      }
800                    }
801                  }
802                }
803                // Reset form state
804                _this5.successMessage = null;
805                _this5.currentPage = 1;
806                _this5.errorMessage = message;
807                _this5.sending = false;
808                cb && typeof cb === "function" && cb(false);
809              });
810            },
811            recordConversion: function recordConversion() {
812              if ('disableConversions' in window) {
813                return;
814              }
815              var cm = typeof conversion_meta !== "undefined" ? conversion_meta : false;
816              var eventAction = cm && cm.action ? cm.action : "submit";
817              var eventCategory = cm && cm.category ? cm.category : "form";
818              var eventLabel = cm && cm.label ? cm.label : location.pathname;
819              var includeInAnalytics = cm && cm.includeInAnalytics ? cm.includeInAnalytics : [];
820              var analyticsData = {};
821              var _iterator2 = _createForOfIteratorHelper(includeInAnalytics),
822                _step2;
823              try {
824                for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
825                  var aKey = _step2.value;
826                  analyticsData[aKey] = aKey in this.input ? this.input[aKey] : null;
827                }
828
829                // Analytics is configured
830              } catch (err) {
831                _iterator2.e(err);
832              } finally {
833                _iterator2.f();
834              }
835              if (typeof gtag !== "undefined") {
836                var eventDetails = _objectSpread({
837                  event_category: eventCategory,
838                  event_label: eventLabel
839                }, analyticsData);
840                // Send event
841                gtag("event", eventAction, eventDetails);
842                console.log("Conversion event sent to Google Tag Manager", {
843                  eventAction: eventAction,
844                  eventDetails: eventDetails
845                });
846              }
847              window.dataLayer = window.dataLayer || [];
848              window.dataLayer.push({
849                'event': 'generate_lead',
850                'form_submission': eventLabel,
851                'form_data': analyticsData
852              });
853              try {
854                window.dispatchEvent(new CustomEvent('generate_lead', {
855                  detail: {
856                    action_type: eventAction || 'Form Submission',
857                    category: eventCategory || 'Form',
858                    label: eventLabel || window.location.href,
859                    form_id: form_id,
860                    page_url: window.location.href
861                  }
862                }));
863              } catch (error) {
864                // just in case :)
865                console.error('Error dispatching generate_lead event', error);
866              }
867            }
868          };
869        };
870
871        // Track registered forms globally
872        if (!window.__registeredForms) {
873          window.__registeredForms = {};
874        }
875
876        // Register component - must happen before Alpine walks the DOM
877        function registerComponent() {
878          if (!window.__registeredForms[form_id]) {
879            Alpine.data(form_id, form);
880            window.__registeredForms[form_id] = true;
881
882            // Only register "mosaicForm" once for backwards compatibility
883            // This will point to the FIRST form on the page
884            if (!window.__registeredForms['mosaicForm']) {
885              Alpine.data("mosaicForm", form);
886              window.__registeredForms['mosaicForm'] = true;
887            }
888          }
889        }
890
891        // Use alpine:init to ensure we register before Alpine processes the DOM
892        document.addEventListener('alpine:init', function () {
893          registerComponent();
894        });
895
896        // Also register immediately if Alpine has already initialized
897        // This handles the case where scripts load after Alpine has started
898        if (window.Alpine && window.Alpine.version) {
899          registerComponent();
900
901          // If Alpine has already processed the DOM, manually initialize this form
902          // Use requestAnimationFrame to ensure DOM is ready
903          requestAnimationFrame(function () {
904            var formElement = document.querySelector("[x-data=\"".concat(form_id, "\"]"));
905            if (formElement && !formElement._x_dataStack) {
906              // Element exists but hasn't been initialized by Alpine yet
907              try {
908                Alpine.initTree(formElement);
909              } catch (e) {
910                console.warn('Failed to initialize form', form_id, e);
911              }
912            }
913          });
914        }
915      })();
916    };
917    ready(0);
918  }
919})();
920
921/* cached asset-dumpf82c80f125e9c8fc630066507322e7b87f812eb5: */
922"use strict";
923
924(function () {
925  var __data_block_id = 3793402;
926  var __block_id = "cz6AV";
927  var foundBlockNode = document.getElementsByClassName("f_" + __block_id).length > 0;
928  if (!foundBlockNode) {
929    var templates = document.querySelectorAll('template');
930    for (var i = 0; i < templates.length; i++) {
931      if (templates[i].content.querySelector('.f_' + __block_id)) {
932        foundBlockNode = true;
933        break;
934      }
935    }
936  }
937  if (foundBlockNode) {
938    var ready = function ready(counter) {
939      if (!('__forgePageBlockData' in window) || !(__data_block_id in __forgePageBlockData)) {
940        if (counter == 10) {
941          throw Error("Giving up waiting for block data");
942          return;
943        }
944        return setTimeout(function () {
945          ready(counter + 1);
946        }, 250);
947      }
948      if (typeof __forgePageBlockData[__data_block_id] == 'number') {
949        __forgePageBlockData[__data_block_id] = __forgePageBlockData[__forgePageBlockData[__data_block_id]] || {};
950      }
951      var id = __forgePageBlockData[__data_block_id].id;
952      var config = __forgePageBlockData[__data_block_id].config;
953      var showLabels = __forgePageBlockData[__data_block_id].showLabels;
954      var labels = __forgePageBlockData[__data_block_id].labels;
955      var labelPosition = __forgePageBlockData[__data_block_id].labelPosition;
956      var arrowsColor = __forgePageBlockData[__data_block_id].arrowsColor;
957      var arrowsSize = __forgePageBlockData[__data_block_id].arrowsSize;
958      var dotsColor = __forgePageBlockData[__data_block_id].dotsColor;
959      var arrowsPosition = __forgePageBlockData[__data_block_id].arrowsPosition;
960      var dotsPosition = __forgePageBlockData[__data_block_id].dotsPosition;
961      var wrapTilesInSliderMarkup = __forgePageBlockData[__data_block_id].wrapTilesInSliderMarkup;
962      var _block = __forgePageBlockData[__data_block_id]._block;
963      var _page = __forgePageBlockData[__data_block_id]._page;
964      var _ts = __forgePageBlockData[__data_block_id]._ts;
965      var _elements = __forgePageBlockData[__data_block_id]._elements;
966      var block = {
967        id: "3793402",
968        callbackUri: "/_/b/3793402"
969      };
970      var call = function call(action, callbackFunc) {
971        return forge.blockCallback(block, action, callbackFunc);
972      };
973      var callback = function callback(action, data) {
974        return call(action, function () {
975          data = withData(data || {});
976
977          // check if any of the formData is a File or Blob
978          var isFile = false;
979          for (var key in data) {
980            if (!isFile && data[key]) {
981              var arr = Array.isArray(data[key]) ? data[key] : [data[key]];
982              for (var i = 0; i < arr.length; i++) {
983                if (arr[i] === Object(arr[i]) && (arr[i].constructor == File || arr[i].constructor === Blob)) {
984                  isFile = true;
985                  break;
986                }
987              }
988            }
989          }
990          if (isFile) {
991            var formData = new FormData();
992            for (var key in data) {
993              if (data[key] && (Array.isArray(data[key]) || data[key] === Object(data[key])) && data[key].constructor !== File && data[key].constructor !== Blob) {
994                for (var idx in data[key]) {
995                  formData.append(key + '[' + idx + ']', data[key][idx]);
996                }
997              } else {
998                formData.append(key, data[key]);
999              }
1000            }
1001            return axios.post(this.uri, formData, {
1002              headers: {
1003                'Content-Type': 'multipart/form-data',
1004                'X-Lazy-Load': 'off'
1005              }
1006            });
1007          } else {
1008            return axios.post(this.uri, data, {
1009              headers: {
1010                'X-Lazy-Load': 'off'
1011              }
1012            });
1013          }
1014        });
1015      };
1016      var withData = function withData(data) {
1017        return forge.requestData(data);
1018      };
1019      if (config.pagination === true) {
1020        config.pagination = {
1021          el: ".swiper-".concat(id, ".swiper-pagination"),
1022          clickable: true,
1023          clickableClass: 'cursor-pointer'
1024        };
1025      }
1026      if (config.navigation === true) {
1027        config.navigation = {
1028          nextEl: ".swiper-".concat(id, ".swiper-button-next"),
1029          prevEl: ".swiper-".concat(id, ".swiper-button-prev")
1030        };
1031      }
1032      var swiper = new Swiper("#swiper-".concat(id), config);
1033      window["go".concat(id)] = function (index) {
1034        swiper.slideTo(index);
1035      };
1036      window["updateHeight".concat(id)] = function (duration) {
1037        swiper.updateAutoHeight(duration);
1038      };
1039      var labelClasses = document.querySelector("[data-slider-id=\"".concat(id, "\"][data-label]"));
1040      labelClasses = labelClasses ? labelClasses.classList : null;
1041      var activeLabelClasses = document.querySelector("[data-slider-id=\"".concat(id, "\"][data-active-label]"));
1042      activeLabelClasses = activeLabelClasses ? activeLabelClasses.classList : null;
1043      swiper.on('activeIndexChange', function () {
1044        var _this = this;
1045        var labels = document.querySelectorAll("[data-slider-id=\"".concat(id, "\"][data-sli
1045de-index]"));
1046        labels.forEach(function (label) {
1047          label.classList = label.dataset.slideIndex.split(",").includes(String(_this.activeIndex)) ? activeLabelClasses : labelClasses;
1048        });
1049      });
1050    };
1051    ready(0);
1052  }
1053})();

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.