PageSourceSearch

https://linkedall.com/_/js/c/00d75ccd12dc93b282b5b7c563c091a3bbe7fbb4.js?_n=m6abff84488d5c9.36661392

js linkedall.com collected 2026-10-07 15:34:42 UTC 133,348 bytes, 2,178 lines download raw bytes

1
2/* cached asset-dump98e6a8b281a9cba7430393cd9c2d0c670ee2c0fd: */
3var forge = forge || {};
4forge.blockCallback = function(block, action, callbackFunc) {
5    var obj = {
6        id: block.id,
7        action: action,
8        uri: block.callbackUri + "/" + action,
9        requestPath:  window.location.pathname
10    };
11    return callbackFunc.apply(obj);
12};
13forge.requestData = function(data) {
14    data = data || {};
15    data.userId      = forge.user ? forge.user.id : null;
16    data.pageId      = forge.page ? forge.page.id : null;
17    data.requestPath = window.location.pathname;
18    return data;
19};
20/* cached asset-dump55ffbe1ab28648ed46213ff9de5cbe6eca0e2b13: */
21"use strict";
22
23function 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; }
24function _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; }
25function _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; }
26function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
27function _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); }
28function _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 28-37
28 }; }
29function _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; }
30function 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); } }
31function _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); }); }; }
32function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
33function _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."); }
34function _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); }
35function _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; }
36function _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; } }
37function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
38function _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); }
39(function () {
40  var __data_block_id = 3777236;
41  var __block_id = "cz1Cw";
42  var foundBlockNode = document.getElementsByClassName("f_" + __block_id).length > 0;
43  if (!foundBlockNode) {
44    var templates = document.querySelectorAll('template');
45    for (var i = 0; i < templates.length; i++) {
46      if (templates[i].content.querySelector('.f_' + __block_id)) {
47        foundBlockNode = true;
48        break;
49      }
50    }
51  }
52  if (foundBlockNode) {
53    var ready = function ready(counter) {
54      if (!('__forgePageBlockData' in window) || !(__data_block_id in __forgePageBlockData)) {
55        if (counter == 10) {
56          throw Error("Giving up waiting for block data");
57          return;
58        }
59        return setTimeout(function () {
60          ready(counter + 1);
61        }, 250);
62      }
63      if (typeof __forgePageBlockData[__data_block_id] == 'number') {
64        __forgePageBlockData[__data_block_id] = __forgePageBlockData[__forgePageBlockData[__data_block_id]] || {};
65      }
66      var useCaptcha = __forgePageBlockData[__data_block_id].useCaptcha;
67      var objectModelMap = __forgePageBlockData[__data_block_id].objectModelMap;
68      var form = __forgePageBlockData[__data_block_id].form;
69      var form_id = __forgePageBlockData[__data_block_id].form_id;
70      var form_settings = __forgePageBlockData[__data_block_id].form_settings;
71      var form_fields = __forgePageBlockData[__data_block_id].form_fields;
72      var form_structure = __forgePageBlockData[__data_block_id].form_structure;
73      var form_google_maps_enabled = __forgePageBlockData[__data_block_id].form_google_maps_enabled;
74      var form_has_google_maps_api_key = __forgePageBlockData[__data_block_id].form_has_google_maps_api_key;
75      var conversion_meta = __forgePageBlockData[__data_block_id].conversion_meta;
76      var button = __forgePageBlockData[__data_block_id].button;
77      var centerButtons = __forgePageBlockData[__data_block_id].centerButtons;
78      var buttonColumnSpan = __forgePageBlockData[__data_block_id].buttonColumnSpan;
79      var prevPageButton = __forgePageBlockData[__data_block_id].prevPageButton;
80      var nextPageButton = __forgePageBlockData[__data_block_id].nextPageButton;
81      var showLabels = __forgePageBlockData[__data_block_id].showLabels;
82      var showPlaceholders = __forgePageBlockData[__data_block_id].showPlaceholders;
83      var showPageNumbers = __forgePageBlockData[__data_block_id].showPageNumbers;
84      var _block = __forgePageBlockData[__data_block_id]._block;
85      var _page = __forgePageBlockData[__data_block_id]._page;
86      var _ts = __forgePageBlockData[__data_block_id]._ts;
87      var _elements = __forgePageBlockData[__data_block_id]._elements;
88      var block = {
89        id: "3777236",
90        callbackUri: "/_/b/3777236"
91      };
92      var call = function call(action, callbackFunc) {
93        return forge.blockCallback(block, action, callbackFunc);
94      };
95      var callback = function callback(action, data) {
96        return call(action, function () {
97          data = withData(data || {});
98
99          // check if any of the formData is a File or Blob
100          var isFile = false;
101          for (var key in data) {
102            if (!isFile && data[key]) {
103              var arr = Array.isArray(data[key]) ? data[key] : [data[key]];
104              for (var i = 0; i < arr.length; i++) {
105                if (arr[i] === Object(arr[i]) && (arr[i].constructor == File || arr[i].constructor === Blob)) {
106                  isFile = true;
107                  break;
108                }
109              }
110            }
111          }
112          if (isFile) {
113            var formData = new FormData();
114            for (var key in data) {
115              if (data[key] && (Array.isArray(data[key]) || data[key] === Object(data[key])) && data[key].constructor !== File && data[key].constructor !== Blob) {
116                for (var idx in data[key]) {
117                  formData.append(key + '[' + idx + ']', data[key][idx]);
118                }
119              } else {
120                formData.append(key, data[key]);
121              }
122            }
123            return axios.post(this.uri, formData, {
124              headers: {
125                'Content-Type': 'multipart/form-data',
126                'X-Lazy-Load': 'off'
127              }
128            });
129          } else {
130            return axios.post(this.uri, data, {
131              headers: {
132                'X-Lazy-Load': 'off'
133              }
134            });
135          }
136        });
137      };
138      var withData = function withData(data) {
139        return forge.requestData(data);
140      };
141
142      /**
143       * This script relies on the BladeScript functionality which is scoped automatically (providing form_id, form_fields and optionally conversion_meta)
144       */
145
146      //window.forgeForms = window.forgeForms || {}
147
148      // Wrap in IIFE to handle both pre-Alpine and post-Alpine loading scenarios
149      (function () {
150        var form = function form() {
151          return {
152            formInitilized: new Date().getTime(),
153            timeoutCounter: 0,
154            autocompleteTimeoutCounter: 0,
155            input: form_fields,
156            successMessage: "",
157            successRedirect: "",
158            errorMessage: "",
159            sending: false,
160            recaptchaWidgetId: null,
161            currentPage: 1,
162            numberOfPages: _typeof(form_settings) === 'object' && form_settings && 'pages' in form_settings ? form_settings.pages : 1,
163            formStructure: typeof form_structure !== 'undefined' ? form_structure : {},
164            init: function init() {
165              var _this = this;
166              this.$nextTick(function () {
167                _this.initializeAddressFields();
168                _this.initializeGoogleAutocomplete();
169                setTimeout(function () {
170                  if (_this.$refs.captchaButton) {
171                    if (!_this.recaptchaScriptExists()) {
172                      _this.loadRecaptcha();
173                    }
174                    _this.initRecaptcha();
175                  }
176                }, 3000);
177              });
178            },
179            initializeAddressFields: function initializeAddressFields() {
180              var _this2 = this;
181              if (!this.formStructure) return;
182              Object.entries(this.formStructure).forEach(function (_ref) {
183                var _ref2 = _slicedToArray(_ref, 2),
184                  slug = _ref2[0],
185                  type = _ref2[1];
186                if (type === 'address') {
187                  if (!_this2.input[slug] || _typeof(_this2.input[slug]) !== 'object') {
188                    _this2.input[slug] = {
189                      line1: '',
190                      line2: '',
191                      city: '',
192                      state: '',
193                      postalCode: '',
194                      country: '',
195                      fullAddress: ''
196                    };
197                  } else {
198                    // Ensure fullAddress is present if object exists but incomplete
199                    if (!('fullAddress' in _this2.input[slug])) {
200                      _this2.input[slug].fullAddress = '';
201                    }
202                  }
203                }
204              });
205            },
206            initializeGoogleAutocomplete: function initializeGoogleAutocomplete() {
207              var _this3 = this,
208                _this$$refs$addressAu,
209                _this$$refs$addressAu2,
210                _this$$refs$addressAu3;
211              this.autocompleteTimeoutCounter++;
212
213              // Give up after 120 attempts (60 seconds at 500ms intervals)
214              if (this.autocompleteTimeoutCounter > 120) {
215                console.warn('Google Maps API not available for address autocomplete');
216                return;
217              }
218
219              // Check if Google Maps API is loaded
220              if (typeof google === 'undefined' || typeof google.maps === 'undefined' || typeof google.maps.places === 'undefined') {
221                setTimeout(function () {
222                  _this3.initializeGoogleAutocomplete();
223                }, 500);
224                return;
225              }
226
227              // Find all address input fields in this form
228              var addressInputs = this.$el.querySelectorAll('input[data-address="true"]');
229
230              // Capture the Alpine component context
231              var alpineComponent = this;
232
233              // Get style templates
234              var dropdownStyles = ((_this$$refs$addressAu = this.$refs.addressAutocompleteDropdownStyles) === null || _this$$refs$addressAu === void 0 ? void 0 : _this$$refs$addressAu.classList) || null;
235              var itemStyles = ((_this$$refs$addressAu2 = this.$refs.addressAutocompleteItemStyles) === null || _this$$refs$addressAu2 === void 0 ? void 0 : _this$$refs$addressAu2.classList) || null;
236              var itemSelectedStyles = ((_this$$refs$addressAu3 = this.$refs.addressAutocompleteItemSelectedStyles) === null || _this$$refs$addressAu3 === void 0 ? void 0 : _this$$refs$addressAu3.classList) || null;
237              addressInputs.forEach(function (input) {
238                var slug = input.dataset.slug;
239                if (!slug) return;
240
241                // Create dropdown container for suggestions
242                var dropdown = document.createElement('div');
243                // Apply classes from template or fallback to defaults
244                if (dropdownStyles) {
245                  dropdown.className = Array.from(dropdownStyles).join(' ') + ' hidden';
246                } else {
247                  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';
248                }
249                dropdown.setAttribute('role', 'listbox');
250
251                // Position dropdown relative to input's parent
252                var parent = input.parentElement;
253                if (parent && window.getComputedStyle(parent).position === 'static') {
254                  parent.style.position = 'relative';
255                }
256                parent.appendChild(dropdown);
257                var debounceTimer;
258                var currentSuggestions = [];
259                var selectedIndex = -1;
260
261                // Handle input changes
262                input.addEventListener('input', /*#__PURE__*/function () {
263                  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
264                    var value;
265                    return _regeneratorRuntime().wrap(function _callee3$(_context3) {
266                      while (1) {
267                        switch (_context3.prev = _context3.next) {
268                          case 0:
269                            value = e.target.value; // Clear previous timer
270                            clearTimeout(debounceTimer);
271                            if (!(!value || value.length < 3)) {
272                              _context3.next = 7;
273                              break;
274                            }
275                            dropdown.classList.add('hidden');
276                            currentSuggestions = [];
277                            selectedIndex = -1;
278                            return _context3.abrupt("return");
279                          case 7:
280                            // Debounce the API call
281                            debounceTimer = setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
282                              var request, _yield$google$maps$pl, suggestions;
283                              return _regeneratorRuntime().wrap(function _callee2$(_context2) {
284                                while (1) {
285                                  switch (_context2.prev = _context2.next) {
286                                    case 0:
287                                      _context2.prev = 0;
288                                      request = {
289                                        input: value,
290                                        includedPrimaryTypes: ['geocode'],
291                                        language: 'en'
292                                      };
293                                      _context2.next = 4;
294                                      return google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions(request);
295                                    case 4:
296                                      _yield$google$maps$pl = _context2.sent;
297                                      suggestions = _yield$google$maps$pl.suggestions;
298                                      currentSuggestions = suggestions || [];
299                                      selectedIndex = -1;
300                                      if (currentSuggestions.length) {
301                                        _context2.next = 11;
302                                        break;
303                                      }
304                                      dropdown.classList.add('hidden');
305                                      return _context2.abrupt("return");
306                                    case 11:
307                                      // Build dropdown UI with classes from templates
308                                      dropdown.innerHTML = '';
309                                      currentSuggestions.forEach(function (suggestion, index) {
310                                        var item = document.createElement('div');
311                                        // Apply classes from template or fallback to defaults
312                                        if (itemStyles) {
313                                          item.className = Array.from(itemStyles).join(' ');
314                                        } else {
315                                          item.className = 'px-4 py-3 cursor-pointer hover:bg-gray-100 border-b border-gray-100 last:border-b-0';
316                                        }
317                                        item.setAttribute('role', 'option');
318                                        item.setAttribute('data-index', index);
319                                        item.textContent = suggestion.placePrediction.text.toString();
320
321                                        // Handle click selection
322                                        item.addEventListener('click', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
323                                          return _regeneratorRuntime().wrap(function _callee$(_context) {
324                                            while (1) {
325                                              switch (_context.prev = _context.next) {
326                                                case 0:
327                                                  _context.next = 2;
328                                                  return handlePlaceSelection(suggestion.placePrediction);
329                                                case 2:
330                                                case "end":
331                                                  return _context.stop();
332                                              }
333                                            }
334                                          }, _callee);
335                                        })));
336                                        dropdown.appendChild(item);
337                                      });
338                                      dropdown.classList.remove('hidden');
339                                      _context2.next = 20;
340                                      break;
341                                    case 16:
342                                      _context2.prev = 16;
343                                      _context2.t0 = _context2["catch"](0);
344                                      console.error('Error fetching autocomplete suggestions:', _context2.t0);
345                                      dropdown.classList.add('hidden');
346                                    case 20:
347                                    case "end":
348                                      return _context2.stop();
349                                  }
350                                }
351                              }, _callee2, null, [[0, 16]]);
352                            })), 300);
353                          case 8:
354                          case "end":
355                            return _context3.stop();
356                        }
357                      }
358                    }, _callee3);
359                  }));
360                  return function (_x2) {
361                    return _ref3.apply(this, arguments);
362                  };
363                }());
364
365                // Handle keyboard navigation
366                input.addEventListener('keydown', /*#__PURE__*/function () {
367                  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(e) {
368                    var items;
369                    return _regeneratorRuntime().wrap(function _callee4$(_context4) {
370                      while (1) {
371                        switch (_context4.prev = _context4.next) {
372                          case 0:
373                            items = dropdown.querySelectorAll('[role="option"]');
374                            if (!(e.key === 'ArrowDown')) {
375                              _context4.next = 7;
376                              break;
377                            }
378                            e.preventDefault();
379                            selectedIndex = Math.min(selectedIndex + 1, currentSuggestions.length - 1);
380                            updateSelectedItem(items, selectedIndex);
381                            _context4.next = 21;
382                            break;
383                          case 7:
384                            if (!(e.key === 'ArrowUp')) {
385                              _context4.next = 13;
386                              break;
387                            }
388                            e.preventDefault();
389                            selectedIndex = Math.max(selectedIndex - 1, -1);
390                            updateSelectedItem(items, selectedIndex);
391                            _context4.next = 21;
392                            break;
393                          case 13:
394                            if (!(e.key === 'Enter' && selectedIndex >= 0)) {
395                              _context4.next = 20;
396                              break;
397                            }
398                            e.preventDefault();
399                            if (!currentSuggestions[selectedIndex]) {
400                              _context4.next = 18;
401                              break;
402                            }
403                            _context4.next = 18;
404                            return handlePlaceSelection(currentSuggestions[selectedIndex].placePrediction);
405                          case 18:
406                            _context4.next = 21;
407                            break;
408                          case 20:
409                            if (e.key === 'Escape') {
410                              dropdown.classList.add('hidden');
411                              selectedIndex = -1;
412                            }
413                          case 21:
414                          case "end":
415                            return _context4.stop();
416                        }
417                      }
418                    }, _callee4);
419                  }));
420                  return function (_x3) {
421                    return _ref6.apply(this, arguments);
422                  };
423                }());
424
425                // Update visual selection
426                var updateSelectedItem = function updateSelectedItem(items, index) {
427                  items.forEach(function (item, i) {
428                    if (i === index) {
429                      // Apply selected state classes from template
430                      if (itemSelectedStyles) {
431                        item.className = Array.from(itemSelectedStyles).join(' ');
432                      } else {
433                        // Fallback: just add bg-gray-100 to existing classes
434                        item.classList.add('bg-gray-100');
435                      }
436                      item.scrollIntoView({
437                        block: 'nearest'
438                      });
439                    } else {
440                      // Apply normal state classes from template
441                      if (itemStyles) {
442                        item.className = Array.from(itemStyles).join(' ');
443                      } else {
444                        // Fallback: remove bg-gray-100
445                        item.classList.remove('bg-gray-100');
446                      }
447                    }
448                  });
449                };
450
451                // Handle place selection
452                var handlePlaceSelection = /*#__PURE__*/function () {
453                  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(placePrediction) {
454                    var place, addressComponents, addressData;
455                    return _regeneratorRuntime().wrap(function _callee5$(_context5) {
456                      while (1) {
457                        switch (_context5.prev = _context5.next) {
458                          case 0:
459                            _context5.prev = 0;
460                            // Convert prediction to Place object
461                            place = placePrediction.toPlace(); // Fetch place details including address components
462                            _context5.next = 4;
463                            return place.fetchFields({
464                              fields: ['addressComponents', 'formattedAddress']
465                            });
466                          case 4:
467                            addressComponents = place.addressComponents;
468                            if (addressComponents) {
469                              _context5.next = 7;
470                              break;
471                            }
472                            return _context5.abrupt("return");
473                          case 7:
474                            // Parse address components
475                            addressData = {
476                              line1: '',
477                              line2: '',
478                              city: '',
479                              state: '',
480                              postalCode: '',
481                              country: '',
482                              fullAddress: place.formattedAddress || ''
483                            }; // Extract address components
484                            addressComponents.forEach(function (component) {
485                              var types = component.types;
486                              if (types.includes('street_number')) {
487                                addressData.line1 = component.longText + ' ' + addressData.line1;
488                              } else if (types.includes('route')) {
489                                addressData.line1 += component.longText;
490                              } else if (types.includes('locality')) {
491                                addressData.city = component.longText;
492                              } else if (types.includes('administrative_area_level_1')) {
493                                addressData.state = component.shortText;
494                              } else if (types.includes('postal_code')) {
495                                addressData.postalCode = component.longText;
496                              } else if (types.includes('country')) {
497                                addressData.country = component.longText;
498                              }
499                            });
500
501                            // Trim line1
502                            addressData.line1 = addressData.line1.trim();
503
504                            // Update the input field display with full address
505                            input.value = addressData.fullAddress;
506
507                            // Update the Alpine data
508                            alpineComponent.input[slug].line1 = addressData.line1;
509                            alpineComponent.input[slug].line2 = addressData.line2;
510                            alpineComponent.input[slug].city = addressData.city;
511                            alpineComponent.input[slug].state = addressData.state;
512                            alpineComponent.input[slug].postalCode = addressData.postalCode;
513                            alpineComponent.input[slug].country = addressData.country;
514                            alpineComponent.input[slug].fullAddress = addressData.fullAddress;
515
516                            // Hide dropdown
517                            dropdown.classList.add('hidden');
518                            currentSuggestions = [];
519                            selectedIndex = -1;
520                            _context5.next = 26;
521                            break;
522                          case 23:
523                            _context5.prev = 23;
524                            _context5.t0 = _context5["catch"](0);
525                            console.error('Error fetching place details:', _context5.t0);
526                          case 26:
527                          case "end":
528                            return _context5.stop();
529                        }
530                      }
531                    }, _callee5, null, [[0, 23]]);
532                  }));
533                  return function handlePlaceSelection(_x4) {
534                    return _ref7.apply(this, arguments);
535                  };
536                }();
537
538                // Hide dropdown when clicking outside
539                document.addEventListener('click', function (e) {
540                  if (!input.contains(e.target) && !dropdown.contains(e.target)) {
541                    dropdown.classList.add('hidden');
542                    selectedIndex = -1;
543                  }
544                });
545              });
546            },
547            prevPage: function prevPage() {
548              this.currentPage--;
549              if (typeof gtag !== "undefined") {
550                gtag("event", "form_prev_page", {
551                  'page': this.currentPage,
552                  'form': form_id
553                });
554              }
555            },
556            nextPage: function nextPage() {
557              this.currentPage++;
558              if (typeof gtag !== "undefined") {
559                gtag("event", "form_next_page", {
560                  'page': this.currentPage,
561                  'form': form_id
562                });
563              }
564            },
565            recaptchaScriptExists: function recaptchaScriptExists() {
566              var url = "https://www.google.com/recaptcha/api.js?render=explicit";
567              var scripts = document.getElementsByTagName("script");
568              for (var i = scripts.length; i--;) {
569                if (scripts[i].src == url) {
570                  return true;
571                }
572              }
573              return false;
574            },
575            getNextSibling: function getNextSibling(elem, selector) {
576              // Get the next sibling element
577              try {
578                var sibling = elem.nextElementSibling;
579                if (!sibling) return;
580                // If there's no selector, return the first sibling
581                if (!selector) return sibling;
582                // If the sibling matches our selector, use it
583                // If not, jump to the next sibling and continue the loop
584                while (sibling) {
585                  if (sibling.matches(selector)) return sibling;
586                  sibling = sibling.nextElementSibling;
587                }
588                return sibling;
589              } catch (error) {}
590            },
591            loadRecaptcha: function loadRecaptcha() {
592              // Only init recaptcha if we have a recaptcha button ref
593              if (!this.$refs.captchaButton) {
594                return;
595              }
596              var recaptchaScript = document.createElement("script");
597              recaptchaScript.async = true;
598              recaptchaScript.type = "text/javascript";
599              recaptchaScript.setAttribute("src", "https://www.google.com/recaptcha/api.js?render=explicit");
600              document.head.appendChild(recaptchaScript);
601            },
602            initRecaptcha: function initRecaptcha() {
603              var _this4 = this;
604              // Only init recaptcha if we have a recaptcha button ref
605              if (!this.$refs.captchaButton) {
606                return;
607              }
608              this.timeoutCounter++;
609              if (this.timeoutCounter === 120) {
610                console.log("Giving up on recaptcha");
611                return;
612              }
613              var submitBtn = this.$refs.captchaButton;
614              try {
615                setTimeout(function () {
616                  if (typeof grecaptcha === "undefined" || typeof grecaptcha.render === "undefined") {
617                    _this4.initRecaptcha();
618                  } else {
619                    var _this4$$refs$captchaB;
620                    _this4.recaptchaWidgetId = grecaptcha.render(submitBtn.getAttribute("id"), {
621                      sitekey: (_this4$$refs$captchaB = _this4.$refs.captchaButton.dataset.sitekey) !== null && _this4$$refs$captchaB !== void 0 ? _this4$$refs$captchaB : "",
622                      badge: "bottomleft",
623                      size: "invisible",
624                      callback: _this4.recaptchaPassed.bind(_this4),
625                      errorCallback: console.error,
626                      expiredCallback: console.error
627                    });
628                  }
629                }, 500);
630                var checkForBadge = setInterval(function () {
631                  var badge = document.querySelector(".grecaptcha-badge");
632                  if (badge) {
633                    document.body.append(badge);
634                    clearInterval(checkForBadge);
635                  }
636                }, 50);
637              } catch (error) {}
638            },
639            usingRecaptcha: function usingRecaptcha() {
640              return this.$refs.captchaButton || typeof this.input["g-recaptcha-response"] !== "undefined";
641            },
642            recaptchaPassed: function recaptchaPassed(code) {
643              this.input["g-recaptcha-response"] = code;
644              grecaptcha.reset(this.recaptchaWidgetId);
645              this.submit();
646            },
647            submit: function submit(cb, skip) {
648              var _this5 = this;
649              // Manually update the inputs from the form itself in case the user used auto-fill and
650              // the browser didn't behave correctly or something.
651              if (!skip) {
652                var inputs = document.querySelectorAll("[x-data='".concat(form_id, "'] [x-model]"));
653                var foundAutofill = false;
654                for (var i = 0; i < inputs.length; i++) {
655                  // Wrap this in a try/catch because non webkit browsers will log errors on this pseudo element
656                  try {
657                    if (inputs[i].matches(':-webkit-autofill')) {
658                      inputs[i].dispatchEvent(new Event("input"));
659                      foundAutofill = true;
660                    }
661                  } catch (error) {}
662                }
663                if (foundAutofill) {
664                  // Wait a beat to let alpine catch the change events
665                  setTimeout(function () {
666                    _this5.submit(cb, true);
667                  }, 100);
668                  return false;
669                }
670              }
671
672              // If captcha is required (ref exists) and didn't pass
673              if (this.usingRecaptcha() && !this.input["g-recaptcha-response"]) {
674                // get outta here
675                console.log('Recaptcha required. Double check you have both a x-ref="captchaButton" and a field named "g-recaptcha-response" in your PHP.');
676                alert("Oops, it looks like the form isn't quite ready yet. Please wait a few seconds and try again.");
677                cb && typeof cb === "function" && cb(false);
678                return false;
679              }
680
681              // Update form state
682              this.sending = true;
683              this.input.form_submitted_in = new Date().getTime() - this.formInitilized;
684              // Submit the submit callback
685              callback("submit", this.input).then(function (res) {
686                console.log("Form submitted at " + new Date().getTime());
687                try {
688                  setTimeout(function () {
689                    var node = document.getElementById(form_id);
690                    if (node && 'scrollIntoView' in node) {
691                      console.log("Form scrolling to Success Message at " + new Date().getTime());
692                      node.scrollIntoView({
693                        block: "start",
694                        behavior: "smooth"
695                      });
696                    }
697                  }, 100);
698
699                  // If we don't get a success message back, something went from (even if it's a 200 code)
700                  if (!res.data || !res.data.message && !res.data.redirect) {
701                    // Show error and reset form
702                    _this5.successMessage = null;
703                    _this5.errorMessage = "An unknown error occurred. Please use another method to get in touch and report this issue.";
704                    _this5.sending = false;
705                    cb && typeof cb === "function" && cb(false);
706                    return; // get out of here
707                  }
708
709                  // SUCCESS
710                  console.log("Form conversion recorded at " + new Date().getTime());
711                  _this5.recordConversion();
712                  if (res.data.redirect) {
713                    // wait a second to let the conversion fire
714                    setTimeout(function () {
715                      window.location.href = res.data.redirect;
716                    }, 1000);
717                  } else {
718                    _this5.successMessage = res.data.message;
719                  }
720
721                  // Reset form state
722                  _this5.errorMessage = null;
723                  _this5.sending = false;
724                  cb && typeof cb === "function" && cb(true);
725                } catch (e) {
726                  console.log(e);
727                }
728              })["catch"](function (_ref8) {
729                var response = _ref8.response;
730                var node = document.getElementById(form_id);
731                if (node && 'scrollIntoView' in node) {
732                  node.scrollIntoView({
733                    block: "start",
734                    behavior: "smooth"
735                  });
736                }
737
738                // Reset form fields and error message
739                var message = "";
740                var invalids = _this5.$el.getElementsByClassName("is-invalid");
741                var _iterator = _createForOfIteratorHelper(invalids),
742                  _step;
743                try {
744                  for (_iterator.s(); !(_step = _iterator.n()).done;) {
745                    var element = _step.value;
746                    element.classList.remove("is-invalid");
747                  }
748
749                  // If errors weren't sent, something else went wrong but we want to give some feedback
750                } catch (err) {
751                  _iterator.e(err);
752                } finally {
753                  _iterator.f();
754                }
755                if (!response.data || !response.data.errors) {
756                  message = "An unknown error occurred. Please use another method to get in touch and report this issue.";
757                  // We have errors
758                } else {
759                  // If a string
760                  if (typeof response.data.errors === "string") {
761                    // Single error (likely not field related) set message to error
762                    message = response.data.errors;
763                    // If it's an array
764                  } else {
765                    // Append each to the message
766                    for (var _i2 = 0, _Object$entries = Object.entries(response.data.errors); _i2 < _Object$entries.length; _i2++) {
767                      var _this5$getNextSibling;
768                      var _Object$entries$_i = _slicedToArray(_Object$entries[_i2], 2),
769                        field = _Object$entries$_i[0],
770                        msg = _Object$entries$_i[1];
771                      var input = _this5.$el.querySelector(".input\\:" + field);
772                      var feedback = (_this5$getNextSibling = _this5.getNextSibling(input, ".invalid-feedback")) !== null && _this5$getNextSibling !== void 0 ? _this5$getNextSibling : null;
773
774                      // If we have a feedback div specifically for this input
775                      if (input && feedback) {
776                        // Send message there
777                        feedback.innerHTML = msg;
778                      } else {
779                        var m = Array.isArray(msg) ? msg.join("<br>") : msg;
780                        //  Otherwise send to the primary error message area
781                        message += message !== "" ? "<br>" + m : m;
782                      }
783                      if (input) {
784                        // Also mark field invalid
785                        input.classList.add("is-invalid");
786                      }
787                    }
788                  }
789                }
790                // Reset form state
791                _this5.successMessage = null;
792                _this5.currentPage = 1;
793                _this5.errorMessage = message;
794                _this5.sending = false;
795                cb && typeof cb === "function" && cb(false);
796              });
797            },
798            recordConversion: function recordConversion() {
799              if ('disableConversions' in window) {
800                return;
801              }
802              var cm = typeof conversion_meta !== "undefined" ? conversion_meta : false;
803              var eventAction = cm && cm.action ? cm.action : "submit";
804              var eventCategory = cm && cm.category ? cm.category : "form";
805              var eventLabel = cm && cm.label ? cm.label : location.pathname;
806              var includeInAnalytics = cm && cm.includeInAnalytics ? cm.includeInAnalytics : [];
807              var analyticsData = {};
808              var _iterator2 = _createForOfIteratorHelper(includeInAnalytics),
809                _step2;
810              try {
811                for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
812                  var aKey = _step2.value;
813                  analyticsData[aKey] = aKey in this.input ? this.input[aKey] : null;
814                }
815
816                // Analytics is configured
817              } catch (err) {
818                _iterator2.e(err);
819              } finally {
820                _iterator2.f();
821              }
822              if (typeof gtag !== "undefined") {
823                var eventDetails = _objectSpread({
824                  event_category: eventCategory,
825                  event_label: eventLabel
826                }, analyticsData);
827                // Send event
828                gtag("event", eventAction, eventDetails);
829                console.log("Conversion event sent to Google Tag Manager", {
830                  eventAction: eventAction,
831                  eventDetails: eventDetails
832                });
833              }
834              window.dataLayer = window.dataLayer || [];
835              window.dataLayer.push({
836                'event': 'generate_lead',
837                'form_submission': eventLabel,
838                'form_data': analyticsData
839              });
840              try {
841                window.dispatchEvent(new CustomEvent('generate_lead', {
842                  detail: {
843                    action_type: eventAction || 'Form Submission',
844                    category: eventCategory || 'Form',
845                    label: eventLabel || window.location.href,
846                    form_id: form_id,
847                    page_url: window.location.href
848                  }
849                }));
850              } catch (error) {
851                // just in case :)
852                console.error('Error dispatching generate_lead event', error);
853              }
854            }
855          };
856        };
857
858        // Track registered forms globally
859        if (!window.__registeredForms) {
860          window.__registeredForms = {};
861        }
862
863        // Register component - must happen before Alpine walks the DOM
864        function registerComponent() {
865          if (!window.__registeredForms[form_id]) {
866            Alpine.data(form_id, form);
867            window.__registeredForms[form_id] = true;
868
869            // Only register "mosaicForm" once for backwards compatibility
870            // This will point to the FIRST form on the page
871            if (!window.__registeredForms['mosaicForm']) {
872              Alpine.data("mosaicForm", form);
873              window.__registeredForms['mosaicForm'] = true;
874            }
875          }
876        }
877
878        // Use alpine:init to ensure we register before Alpine processes the DOM
879        document.addEventListener('alpine:init', function () {
880          registerComponent();
881        });
882
883        // Also register immediately if Alpine has already initialized
884        // This handles the case where scripts load after Alpine has started
885        if (window.Alpine && window.Alpine.version) {
886          registerComponent();
887
888          // If Alpine has already processed the DOM, manually initialize this form
889          // Use requestAnimationFrame to ensure DOM is ready
890          requestAnimationFrame(function () {
891            var formElement = document.querySelector("[x-data=\"".concat(form_id, "\"]"));
892            if (formElement && !formElement._x_dataStack) {
893              // Element exists but hasn't been initialized by Alpine yet
894              try {
895                Alpine.initTree(formElement);
896              } catch (e) {
897                console.warn('Failed to initialize form', form_id, e);
898              }
899            }
900          });
901        }
902      })();
903    };
904    ready(0);
905  }
906})();
907
908/* cached asset-dump002cf09d2725bf2c5300857b244c9d544f7c71ae: */
909(function() {
910    var __data_block_id = 3541941;
911    var __block_id = "cykmx";
912
913    let foundBlockNode = document.getElementsByClassName("f_" + __block_id).length > 0;
914    if (!foundBlockNode) {
915        const templates = document.querySelectorAll('template');
916        for (let i = 0; i < templates.length; i++) {
917            if (templates[i].content.querySelector('.f_' + __block_id)) {
918                foundBlockNode = true;
919                break;
920            }
921        }
922    }
923
924    if (foundBlockNode) {
925    var ready = function(counter) {
926                    
927            if (!('__forgePageBlockData' in window) || !(__data_block_id in __forgePageBlockData)) {
928                if (counter == 10) {
929                    throw Error("Giving up waiting for block data");
930                    return;
931                }
932                return setTimeout(function() { ready(counter+1); }, 250);
933            }
934        
935        if (typeof __forgePageBlockData[__data_block_id] == 'number') {
936            __forgePageBlockData[__data_block_id] = __forgePageBlockData[__forgePageBlockData[__data_block_id]] || {};
937        }
938
939                    var video = __forgePageBlockData[__data_block_id].video;
940                    var videoWidth = __forgePageBlockData[__data_block_id].videoWidth;
941                    var videoHeight = __forgePageBlockData[__data_block_id].videoHeight;
942                    var showBackgroundVideoOnMobile = __forgePageBlockData[__data_block_id].showBackgroundVideoOnMobile;
943                const mediaQuery = window.matchMedia('(min-width: 768px)');
944
945function throttle(callback, limit) {
946    var waiting = false;                      // Initially, we're not waiting
947    return function () {                      // We return a throttled function
948        if (!waiting) {                       // If we're not waiting
949            callback.apply(this, arguments);  // Execute users function
950            waiting = true;                   // Prevent future invocations
951            setTimeout(function () {          // After a period of time
952                waiting = false;              // And allow future invocations
953            }, limit);
954        }
955    }
956}
957
958var resize = throttle(function() {
959    var vidRatio = videoWidth/videoHeight;
960    var vidRatioInverted = videoHeight/videoWidth;
961    var containerW = container.clientWidth;
962    var containerH = container.clientHeight;
963    var containerRatio = containerW/containerH;
964    // If container is wider ratio than video
965    if (containerRatio > vidRatio) {
966        // Then make full-width but maintain aspect ratio
967        video.setAttribute('width', containerW);
968        video.setAttribute('height', containerW * vidRatioInverted);
969        // If video is wider ratio than container
970    } else{
971        // Then make full height
972        video.setAttribute('width', containerH * vidRatio);
973        video.setAttribute('height', containerH);
974    }
975    // Ensure parent is not default position value
976    if('static' === container.classList.contains('position')){
977        container.classList.add('relative');
978    }
979}, 250);
980
981var wrapper = document.querySelector('[m-media="' + __block_id + '"]');
982var container = wrapper ? wrapper.parentElement : null;
983var video = wrapper ? wrapper.getElementsByTagName('iframe')[0] : null;
984
985(function () {
986    if (!wrapper || !video) {
987        return;
988    }
989
990    if (!(showBackgroundVideoOnMobile || mediaQuery.matches)) {
991        video.setAttribute('src', '');
992        return;
993    }
994
995    var existingSrc = video.getAttribute('src');
996    if (existingSrc) {
997        video.classList.remove('opacity-0');
998        video.classList.add('opacity-100');
999        return;
1000    }
1001
1002    function loadVideo() {
1003        if (video.getAttribute('src')) {
1004            return;
1005        }
1006        video.onload = function () {
1007            resize();
1008            video.classList.remove('opacity-0');
1009            video.classList.add('opacity-100');
1010        };
1011        video.setAttribute('src', video.getAttribute('data-src'));
1012    }
1013
1014    function setupObserver() {
1015        if (typeof IntersectionObserver === 'undefined') {
1016            loadVideo();
1017            return;
1018        }
1019        var observer = new IntersectionObserver(function (entries) {
1020            if (entries[0].isIntersecting) {
1021                observer.disconnect();
1022                loadVideo();
1023            }
1024        }, { rootMargin: '200px' });
1025        observer.observe(wrapper);
1026    }
1027
1028    function deferUntilIdle() {
1029        if (typeof window.requestIdleCallback === 'function') {
1030            window.requestIdleCallback(setupObserver, { timeout: 2000 });
1031        } else {
1032            setTimeout(setupObserver, 200);
1033        }
1034    }
1035
1036    if (document.readyState === 'complete') {
1037        deferUntilIdle();
1038    } else {
1039        window.addEventListener('load', deferUntilIdle, { once: true });
1040    }
1041})();
1042
1043    };
1044    ready(0);
1045    }
1046})();
1047
1048/* cached asset-dump5dfee8e8ef3ef3ea78c7bcf75351203ce35c8b3a: */
1049"use strict";
1050
1051function 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; }
1052function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {};
vendor: 2,123 bytes, lines 1052-1056
1052 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; }
1053function _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; }
1054function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1055function _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); }
1056function _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: 8,926 bytes, lines 1056-1057
1056; }
1057function _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.forEac
vendor: 5,467 bytes, lines 1057-1065
1057h(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; }
1058function 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); } }
1059function _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); }); }; }
1060function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1061function _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."); }
1062function _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); }
1063function _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; }
1064function _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; } }
1065function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1066function _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); }
1067(function () {
1068  var __data_block_id = 4378698;
1069  var __block_id = "c2FJt";
1070  var foundBlockNode = document.getElementsByClassName("f_" + __block_id).length > 0;
1071  if (!foundBlockNode) {
1072    var templates = document.querySelectorAll('template');
1073    for (var i = 0; i < templates.length; i++) {
1074      if (templates[i].content.querySelector('.f_' + __block_id)) {
1075        foundBlockNode = true;
1076        break;
1077      }
1078    }
1079  }
1080  if (foundBlockNode) {
1081    var ready = function ready(counter) {
1082      if (!('__forgePageBlockData' in window) || !(__data_block_id in __forgePageBlockData)) {
1083        if (counter == 10) {
1084          throw Error("Giving up waiting for block data");
1085          return;
1086        }
1087        return setTimeout(function () {
1088          ready(counter + 1);
1089        }, 250);
1090      }
1091      if (typeof __forgePageBlockData[__data_block_id] == 'number') {
1092        __forgePageBlockData[__data_block_id] = __forgePageBlockData[__forgePageBlockData[__data_block_id]] || {};
1093      }
1094      var useCaptcha = __forgePageBlockData[__data_block_id].useCaptcha;
1095      var objectModelMap = __forgePageBlockData[__data_block_id].objectModelMap;
1096      var form = __forgePageBlockData[__data_block_id].form;
1097      var form_id = __forgePageBlockData[__data_block_id].form_id;
1098      var form_settings = __forgePageBlockData[__data_block_id].form_settings;
1099      var form_fields = __forgePageBlockData[__data_block_id].form_fields;
1100      var form_structure = __forgePageBlockData[__data_block_id].form_structure;
1101      var form_google_maps_enabled = __forgePageBlockData[__data_block_id].form_google_maps_enabled;
1102      var form_has_google_maps_api_key = __forgePageBlockData[__data_block_id].form_has_google_maps_api_key;
1103      var conversion_meta = __forgePageBlockData[__data_block_id].conversion_meta;
1104      var button = __forgePageBlockData[__data_block_id].button;
1105      var centerButtons = __forgePageBlockData[__data_block_id].centerButtons;
1106      var buttonColumnSpan = __forgePageBlockData[__data_block_id].buttonColumnSpan;
1107      var prevPageButton = __forgePageBlockData[__data_block_id].prevPageButton;
1108      var nextPageButton = __forgePageBlockData[__data_block_id].nextPageButton;
1109      var showLabels = __forgePageBlockData[__data_block_id].showLabels;
1110      var showPlaceholders = __forgePageBlockData[__data_block_id].showPlaceholders;
1111      var showPageNumbers = __forgePageBlockData[__data_block_id].showPageNumbers;
1112      var _block = __forgePageBlockData[__data_block_id]._block;
1113      var _page = __forgePageBlockData[__data_block_id]._page;
1114      var _ts = __forgePageBlockData[__data_block_id]._ts;
1115      var _elements = __forgePageBlockData[__data_block_id]._elements;
1116      var block = {
1117        id: "4378698",
1118        callbackUri: "/_/b/4378698"
1119      };
1120      var call = function call(action, callbackFunc) {
1121        return forge.blockCallback(block, action, callbackFunc);
1122      };
1123      var callback = function callback(action, data) {
1124        return call(action, function () {
1125          data = withData(data || {});
1126
1127          // check if any of the formData is a File or Blob
1128          var isFile = false;
1129          for (var key in data) {
1130            if (!isFile && data[key]) {
1131              var arr = Array.isArray(data[key]) ? data[key] : [data[key]];
1132              for (var i = 0; i < arr.length; i++) {
1133                if (arr[i] === Object(arr[i]) && (arr[i].constructor == File || arr[i].constructor === Blob)) {
1134                  isFile = true;
1135                  break;
1136                }
1137              }
1138            }
1139          }
1140          if (isFile) {
1141            var formData = new FormData();
1142            for (var key in data) {
1143              if (data[key] && (Array.isArray(data[key]) || data[key] === Object(data[key])) && data[key].constructor !== File && data[key].constructor !== Blob) {
1144                for (var idx in data[key]) {
1145                  formData.append(key + '[' + idx + ']', data[key][idx]);
1146                }
1147              } else {
1148                formData.append(key, data[key]);
1149              }
1150            }
1151            return axios.post(this.uri, formData, {
1152              headers: {
1153                'Content-Type': 'multipart/form-data',
1154                'X-Lazy-Load': 'off'
1155              }
1156            });
1157          } else {
1158            return axios.post(this.uri, data, {
1159              headers: {
1160                'X-Lazy-Load': 'off'
1161              }
1162            });
1163          }
1164        });
1165      };
1166      var withData = function withData(data) {
1167        return forge.requestData(data);
1168      };
1169
1170      /**
1171       * This script relies on the BladeScript functionality which is scoped automatically (providing form_id, form_fields and optionally conversion_meta)
1172       */
1173
1174      //window.forgeForms = window.forgeForms || {}
1175
1176      // Wrap in IIFE to handle both pre-Alpine and post-Alpine loading scenarios
1177      (function () {
1178        var form = function form() {
1179          return {
1180            formInitilized: new Date().getTime(),
1181            timeoutCounter: 0,
1182            autocompleteTimeoutCounter: 0,
1183            input: form_fields,
1184            successMessage: "",
1185            successRedirect: "",
1186            errorMessage: "",
1187            sending: false,
1188            recaptchaWidgetId: null,
1189            currentPage: 1,
1190            numberOfPages: _typeof(form_settings) === 'object' && form_settings && 'pages' in form_settings ? form_settings.pages : 1,
1191            formStructure: typeof form_structure !== 'undefined' ? form_structure : {},
1192            init: function init() {
1193              var _this = this;
1194              this.$nextTick(function () {
1195                _this.initializeAddressFields();
1196                _this.initializeGoogleAutocomplete();
1197                setTimeout(function () {
1198                  if (_this.$refs.captchaButton) {
1199                    if (!_this.recaptchaScriptExists()) {
1200                      _this.loadRecaptcha();
1201                    }
1202                    _this.initRecaptcha();
1203                  }
1204                }, 3000);
1205              });
1206            },
1207            initializeAddressFields: function initializeAddressFields() {
1208              var _this2 = this;
1209              if (!this.formStructure) return;
1210              Object.entries(this.formStructure).forEach(function (_ref) {
1211                var _ref2 = _slicedToArray(_ref, 2),
1212                  slug = _ref2[0],
1213                  type = _ref2[1];
1214                if (type === 'address') {
1215                  if (!_this2.input[slug] || _typeof(_this2.input[slug]) !== 'object') {
1216                    _this2.input[slug] = {
1217                      line1: '',
1218                      line2: '',
1219                      city: '',
1220                      state: '',
1221                      postalCode: '',
1222                      country: '',
1223                      fullAddress: ''
1224                    };
1225                  } else {
1226                    // Ensure fullAddress is present if object exists but incomplete
1227                    if (!('fullAddress' in _this2.input[slug])) {
1228                      _this2.input[slug].fullAddress = '';
1229                    }
1230                  }
1231                }
1232              });
1233            },
1234            initializeGoogleAutocomplete: function initializeGoogleAutocomplete() {
1235              var _this3 = this,
1236                _this$$refs$addressAu,
1237                _this$$refs$addressAu2,
1238                _this$$refs$addressAu3;
1239              this.autocompleteTimeoutCounter++;
1240
1241              // Give up after 120 attempts (60 seconds at 500ms intervals)
1242              if (this.autocompleteTimeoutCounter > 120) {
1243                console.warn('Google Maps API not available for address autocomplete');
1244                return;
1245              }
1246
1247              // Check if Google Maps API is loaded
1248              if (typeof google === 'undefined' || typeof google.maps === 'undefined' || typeof google.maps.places === 'undefined') {
1249                setTimeout(function () {
1250                  _this3.initializeGoogleAutocomplete();
1251                }, 500);
1252                return;
1253              }
1254
1255              // Find all address input fields in this form
1256              var addressInputs = this.$el.querySelectorAll('input[data-address="true"]');
1257
1258              // Capture the Alpine component context
1259              var alpineComponent = this;
1260
1261              // Get style templates
1262              var dropdownStyles = ((_this$$refs$addressAu = this.$refs.addressAutocompleteDropdownStyles) === null || _this$$refs$addressAu === void 0 ? void 0 : _this$$refs$addressAu.classList) || null;
1263              var itemStyles = ((_this$$refs$addressAu2 = this.$refs.addressAutocompleteItemStyles) === null || _this$$refs$addressAu2 === void 0 ? void 0 : _this$$refs$addressAu2.classList) || null;
1264              var itemSelectedStyles = ((_this$$refs$addressAu3 = this.$refs.addressAutocompleteItemSelectedStyles) === null || _this$$refs$addressAu3 === void 0 ? void 0 : _this$$refs$addressAu3.classList) || null;
1265              addressInputs.forEach(function (input) {
1266                var slug = input.dataset.slug;
1267                if (!slug) return;
1268
1269                // Create dropdown container for suggestions
1270                var dropdown = document.createElement('div');
1271                // Apply classes from template or fallback to defaults
1272                if (dropdownStyles) {
1273                  dropdown.className = Array.from(dropdownStyles).join(' ') + ' hidden';
1274                } else {
1275                  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';
1276                }
1277                dropdown.setAttribute('role', 'listbox');
1278
1279                // Position dropdown relative to input's parent
1280                var parent = input.parentElement;
1281                if (parent && window.getComputedStyle(parent).position === 'static') {
1282                  parent.style.position = 'relative';
1283                }
1284                parent.appendChild(dropdown);
1285                var debounceTimer;
1286                var currentSuggestions = [];
1287                var selectedIndex = -1;
1288
1289                // Handle input changes
1290                input.addEventListener('input', /*#__PURE__*/function () {
1291                  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
1292                    var value;
1293                    return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1294                      while (1) {
1295                        switch (_context3.prev = _context3.next) {
1296                          case 0:
1297                            value = e.target.value; // Clear previous timer
1298                            clearTimeout(debounceTimer);
1299                            if (!(!value || value.length < 3)) {
1300                              _context3.next = 7;
1301                              break;
1302                            }
1303                            dropdown.classList.add('hidden');
1304                            currentSuggestions = [];
1305                            selectedIndex = -1;
1306                            return _context3.abrupt("return");
1307                          case 7:
1308                            // Debounce the API call
1309                            debounceTimer = setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1310                              var request, _yield$google$maps$pl, suggestions;
1311                              return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1312                                while (1) {
1313                                  switch (_context2.prev = _context2.next) {
1314                                    case 0:
1315                                      _context2.prev = 0;
1316                                      request = {
1317                                        input: value,
1318                                        includedPrimaryTypes: ['geocode'],
1319                                        language: 'en'
1320                                      };
1321                                      _context2.next = 4;
1322                                      return google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions(request);
1323                                    case 4:
1324                                      _yield$google$maps$pl = _context2.sent;
1325                                      suggestions = _yield$google$maps$pl.suggestions;
1326                                      currentSuggestions = suggestions || [];
1327                                      selectedIndex = -1;
1328                                      if (currentSuggestions.length) {
1329                                        _context2.next = 11;
1330                                        break;
1331                                      }
1332                                      dropdown.classList.add('hidden');
1333                                      return _context2.abrupt("return");
1334                                    case 11:
1335                                      // Build dropdown UI with classes from templates
1336                                      dropdown.innerHTML = '';
1337                                      currentSuggestions.forEach(function (suggestion, index) {
1338                                        var item = document.createElement('div');
1339                                        // Apply classes from template or fallback to defaults
1340                                        if (itemStyles) {
1341                                          item.className = Array.from(itemStyles).join(' ');
1342                                        } else {
1343                                          item.className = 'px-4 py-3 cursor-pointer hover:bg-gray-100 border-b border-gray-100 last:border-b-0';
1344                                        }
1345                                        item.setAttribute('role', 'option');
1346                                        item.setAttribute('data-index', index);
1347                                        item.textContent = suggestion.placePrediction.text.toString();
1348
1349                                        // Handle click selection
1350                                        item.addEventListener('click', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1351                                          return _regeneratorRuntime().wrap(function _callee$(_context) {
1352                                            while (1) {
1353                                              switch (_context.prev = _context.next) {
1354                                                case 0:
1355                                                  _context.next = 2;
1356                                                  return handlePlaceSelection(suggestion.placePrediction);
1357                                                case 2:
1358                                                case "end":
1359                                                  return _context.stop();
1360                                              }
1361                                            }
1362                                          }, _callee);
1363                                        })));
1364                                        dropdown.appendChild(item);
1365                                      });
1366                                      dropdown.classList.remove('hidden');
1367                                      _context2.next = 20;
1368                                      break;
1369                                    case 16:
1370                                      _context2.prev = 16;
1371                                      _context2.t0 = _context2["catch"](0);
1372                                      console.error('Error fetching autocomplete suggestions:', _context2.t0);
1373                                      dropdown.classList.add('hidden');
1374                                    case 20:
1375                                    case "end":
1376                                      return _context2.stop();
1377                                  }
1378                                }
1379                              }, _callee2, null, [[0, 16]]);
1380                            })), 300);
1381                          case 8:
1382                          case "end":
1383                            return _context3.stop();
1384                        }
1385                      }
1386                    }, _callee3);
1387                  }));
1388                  return function (_x2) {
1389                    return _ref3.apply(this, arguments);
1390                  };
1391                }());
1392
1393                // Handle keyboard navigation
1394                input.addEventListener('keydown', /*#__PURE__*/function () {
1395                  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(e) {
1396                    var items;
1397                    return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1398                      while (1) {
1399                        switch (_context4.prev = _context4.next) {
1400                          case 0:
1401                            items = dropdown.querySelectorAll('[role="option"]');
1402                            if (!(e.key === 'ArrowDown')) {
1403                              _context4.next = 7;
1404                              break;
1405                            }
1406                            e.preventDefault();
1407                            selectedIndex = Math.min(selectedIndex + 1, currentSuggestions.length - 1);
1408                            updateSelectedItem(items, selectedIndex);
1409                            _context4.next = 21;
1410                            break;
1411                          case 7:
1412                            if (!(e.key === 'ArrowUp')) {
1413                              _context4.next = 13;
1414                              break;
1415                            }
1416                            e.preventDefault();
1417                            selectedIndex = Math.max(selectedIndex - 1, -1);
1418                            updateSelectedItem(items, selectedIndex);
1419                            _context4.next = 21;
1420                            break;
1421                          case 13:
1422                            if (!(e.key === 'Enter' && selectedIndex >= 0)) {
1423                              _context4.next = 20;
1424                              break;
1425                            }
1426                            e.preventDefault();
1427                            if (!currentSuggestions[selectedIndex]) {
1428                              _context4.next = 18;
1429                              break;
1430                            }
1431                            _context4.next = 18;
1432                            return handlePlaceSelection(currentSuggestions[selectedIndex].placePrediction);
1433                          case 18:
1434                            _context4.next = 21;
1435                            break;
1436                          case 20:
1437                            if (e.key === 'Escape') {
1438                              dropdown.classList.add('hidden');
1439                              selectedIndex = -1;
1440                            }
1441                          case 21:
1442                          case "end":
1443                            return _context4.stop();
1444                        }
1445                      }
1446                    }, _callee4);
1447                  }));
1448                  return function (_x3) {
1449                    return _ref6.apply(this, arguments);
1450                  };
1451                }());
1452
1453                // Update visual selection
1454                var updateSelectedItem = function updateSelectedItem(items, index) {
1455                  items.forEach(function (item, i) {
1456                    if (i === index) {
1457                      // Apply selected state classes from template
1458                      if (itemSelectedStyles) {
1459                        item.className = Array.from(itemSelectedStyles).join(' ');
1460                      } else {
1461                        // Fallback: just add bg-gray-100 to existing classes
1462                        item.classList.add('bg-gray-100');
1463                      }
1464                      item.scrollIntoView({
1465                        block: 'nearest'
1466                      });
1467                    } else {
1468                      // Apply normal state classes from template
1469                      if (itemStyles) {
1470                        item.className = Array.from(itemStyles).join(' ');
1471                      } else {
1472                        // Fallback: remove bg-gray-100
1473                        item.classList.remove('bg-gray-100');
1474                      }
1475                    }
1476                  });
1477                };
1478
1479                // Handle place selection
1480                var handlePlaceSelection = /*#__PURE__*/function () {
1481                  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(placePrediction) {
1482                    var place, addressComponents, addressData;
1483                    return _regeneratorRuntime().wrap(function _callee5$(_context5) {
1484                      while (1) {
1485                        switch (_context5.prev = _context5.next) {
1486                          case 0:
1487                            _context5.prev = 0;
1488                            // Convert prediction to Place object
1489                            place = placePrediction.toPlace(); // Fetch place details including address components
1490                            _context5.next = 4;
1491                            return place.fetchFields({
1492                              fields: ['addressComponents', 'formattedAddress']
1493                            });
1494                          case 4:
1495                            addressComponents = place.addressComponents;
1496                            if (addressComponents) {
1497                              _context5.next = 7;
1498                              break;
1499                            }
1500                            return _context5.abrupt("return");
1501                          case 7:
1502                            // Parse address components
1503                            addressData = {
1504                              line1: '',
1505                              line2: '',
1506                              city: '',
1507                              state: '',
1508                              postalCode: '',
1509                              country: '',
1510                              fullAddress: place.formattedAddress || ''
1511                            }; // Extract address components
1512                            addressComponents.forEach(function (component) {
1513                              var types = component.types;
1514                              if (types.includes('street_number')) {
1515                                addressData.line1 = component.longText + ' ' + addressData.line1;
1516                              } else if (types.includes('route')) {
1517                                addressData.line1 += component.longText;
1518                              } else if (types.includes('locality')) {
1519                                addressData.city = component.longText;
1520                              } else if (types.includes('administrative_area_level_1')) {
1521                                addressData.state = component.shortText;
1522                              } else if (types.includes('postal_code')) {
1523                                addressData.postalCode = component.longText;
1524                              } else if (types.includes('country')) {
1525                                addressData.country = component.longText;
1526                              }
1527                            });
1528
1529                            // Trim line1
1530                            addressData.line1 = addressData.line1.trim();
1531
1532                            // Update the input field display with full address
1533                            input.value = addressData.fullAddress;
1534
1535                            // Update the Alpine data
1536                            alpineComponent.input[slug].line1 = addressData.line1;
1537                            alpineComponent.input[slug].line2 = addressData.line2;
1538                            alpineComponent.input[slug].city = addressData.city;
1539                            alpineComponent.input[slug].state = addressData.state;
1540                            alpineComponent.input[slug].postalCode = addressData.postalCode;
1541                            alpineComponent.input[slug].country = addressData.country;
1542                            alpineComponent.input[slug].fullAddress = addressData.fullAddress;
1543
1544                            // Hide dropdown
1545                            dropdown.classList.add('hidden');
1546                            currentSuggestions = [];
1547                            selectedIndex = -1;
1548                            _context5.next = 26;
1549                            break;
1550                          case 23:
1551                            _context5.prev = 23;
1552                            _context5.t0 = _context5["catch"](0);
1553                            console.error('Error fetching place details:', _context5.t0);
1554                          case 26:
1555                          case "end":
1556                            return _context5.stop();
1557                        }
1558                      }
1559                    }, _callee5, null, [[0, 23]]);
1560                  }));
1561                  return function handlePlaceSelection(_x4) {
1562                    return _ref7.apply(this, arguments);
1563                  };
1564                }();
1565
1566                // Hide dropdown when clicking outside
1567                document.addEventListener('click', function (e) {
1568                  if (!input.contains(e.target) && !dropdown.contains(e.target)) {
1569                    dropdown.classList.add('hidden');
1570                    selectedIndex = -1;
1571                  }
1572                });
1573              });
1574            },
1575            prevPage: function prevPage() {
1576              this.currentPage--;
1577              if (typeof gtag !== "undefined") {
1578                gtag("event", "form_prev_page", {
1579                  'page': this.currentPage,
1580                  'form': form_id
1581                });
1582              }
1583            },
1584            nextPage: function nextPage() {
1585              this.currentPage++;
1586              if (typeof gtag !== "undefined") {
1587                gtag("event", "form_next_page", {
1588                  'page': this.currentPage,
1589                  'form': form_id
1590                });
1591              }
1592            },
1593            recaptchaScriptExists: function recaptchaScriptExists() {
1594              var url = "https://www.google.com/recaptcha/api.js?render=explicit";
1595              var scripts = document.getElementsByTagName("script");
1596              for (var i = scripts.length; i--;) {
1597                if (scripts[i].src == url) {
1598                  return true;
1599                }
1600              }
1601              return false;
1602            },
1603            getNextSibling: function getNextSibling(elem, selector) {
1604              // Get the next sibling element
1605              try {
1606                var sibling = elem.nextElementSibling;
1607                if (!sibling) return;
1608                // If there's no selector, return the first sibling
1609                if (!selector) return sibling;
1610                // If the sibling matches our selector, use it
1611                // If not, jump to the next sibling and continue the loop
1612                while (sibling) {
1613                  if (sibling.matches(selector)) return sibling;
1614                  sibling = sibling.nextElementSibling;
1615                }
1616                return sibling;
1617              } catch (error) {}
1618            },
1619            loadRecaptcha: function loadRecaptcha() {
1620              // Only init recaptcha if we have a recaptcha button ref
1621              if (!this.$refs.captchaButton) {
1622                return;
1623              }
1624              var recaptchaScript = document.createElement("script");
1625              recaptchaScript.async = true;
1626              recaptchaScript.type = "text/javascript";
1627              recaptchaScript.setAttribute("src", "https://www.google.com/recaptcha/api.js?render=explicit");
1628              document.head.appendChild(recaptchaScript);
1629            },
1630            initRecaptcha: function initRecaptcha() {
1631              var _this4 = this;
1632              // Only init recaptcha if we have a recaptcha button ref
1633              if (!this.$refs.captchaButton) {
1634                return;
1635              }
1636              this.timeoutCounter++;
1637              if (this.timeoutCounter === 120) {
1638                console.log("Giving up on recaptcha");
1639                return;
1640              }
1641              var submitBtn = this.$refs.captchaButton;
1642              try {
1643                setTimeout(function () {
1644                  if (typeof grecaptcha === "undefined" || typeof grecaptcha.render === "undefined") {
1645                    _this4.initRecaptcha();
1646                  } else {
1647                    var _this4$$refs$captchaB;
1648                    _this4.recaptchaWidgetId = grecaptcha.render(submitBtn.getAttribute("id"), {
1649                      sitekey: (_this4$$refs$captchaB = _this4.$refs.captchaButton.dataset.sitekey) !== null && _this4$$refs$captchaB !== void 0 ? _this4$$refs$captchaB : "",
1650                      badge: "bottomleft",
1651                      size: "invisible",
1652                      callback: _this4.recaptchaPassed.bind(_this4),
1653                      errorCallback: console.error,
1654                      expiredCallback: console.error
1655                    });
1656                  }
1657                }, 500);
1658                var checkForBadge = setInterval(function () {
1659                  var badge = document.querySelector(".grecaptcha-badge");
1660                  if (badge) {
1661                    document.body.append(badge);
1662                    clearInterval(checkForBadge);
1663                  }
1664                }, 50);
1665              } catch (error) {}
1666            },
1667            usingRecaptcha: function usingRecaptcha() {
1668              return this.$refs.captchaButton || typeof this.input["g-recaptcha-response"] !== "undefined";
1669            },
1670            recaptchaPassed: function recaptchaPassed(code) {
1671              this.input["g-recaptcha-response"] = code;
1672              grecaptcha.reset(this.recaptchaWidgetId);
1673              this.submit();
1674            },
1675            submit: function submit(cb, skip) {
1676              var _this5 = this;
1677              // Manually update the inputs from the form itself in case the user used auto-fill and
1678              // the browser didn't behave correctly or something.
1679              if (!skip) {
1680                var inputs = document.querySelectorAll("[x-data='".concat(form_id, "'] [x-model]"));
1681                var foundAutofill = false;
1682                for (var i = 0; i < inputs.length; i++) {
1683                  // Wrap this in a try/catch because non webkit browsers will log errors on this pseudo element
1684                  try {
1685                    if (inputs[i].matches(':-webkit-autofill')) {
1686                      inputs[i].dispatchEvent(new Event("input"));
1687                      foundAutofill = true;
1688                    }
1689                  } catch (error) {}
1690                }
1691                if (foundAutofill) {
1692                  // Wait a beat to let alpine catch the change events
1693                  setTimeout(function () {
1694                    _this5.submit(cb, true);
1695                  }, 100);
1696                  return false;
1697                }
1698              }
1699
1700              // If captcha is required (ref exists) and didn't pass
1701              if (this.usingRecaptcha() && !this.input["g-recaptcha-response"]) {
1702                // get outta here
1703                console.log('Recaptcha required. Double check you have both a x-ref="captchaButton" and a field named "g-recaptcha-response" in your PHP.');
1704                alert("Oops, it looks like the form isn't quite ready yet. Please wait a few seconds and try again.");
1705                cb && typeof cb === "function" && cb(false);
1706                return false;
1707              }
1708
1709              // Update form state
1710              this.sending = true;
1711              this.input.form_submitted_in = new Date().getTime() - this.formInitilized;
1712              // Submit the submit callback
1713              callback("submit", this.input).then(function (res) {
1714                console.log("Form submitted at " + new Date().getTime());
1715                try {
1716                  setTimeout(function () {
1717                    var node = document.getElementById(form_id);
1718                    if (node && 'scrollIntoView' in node) {
1719                      console.log("Form scrolling to Success Message at " + new Date().getTime());
1720                      node.scrollIntoView({
1721                        block: "start",
1722                        behavior: "smooth"
1723                      });
1724                    }
1725                  }, 100);
1726
1727                  // If we don't get a success message back, something went from (even if it's a 200 code)
1728                  if (!res.data || !res.data.message && !res.data.redirect) {
1729                    // Show error and reset form
1730                    _this5.successMessage = null;
1731                    _this5.errorMessage = "An unknown error occurred. Please use another method to get in touch and report this issue.";
1732                    _this5.sending = false;
1733                    cb && typeof cb === "function" && cb(false);
1734                    return; // get out of here
1735                  }
1736
1737                  // SUCCESS
1738                  console.log("Form conversion recorded at " + new Date().getTime());
1739                  _this5.recordConversion();
1740                  if (res.data.redirect) {
1741                    // wait a second to let the conversion fire
1742                    setTimeout(function () {
1743                      window.location.href = res.data.redirect;
1744                    }, 1000);
1745                  } else {
1746                    _this5.successMessage = res.data.message;
1747                  }
1748
1749                  // Reset form state
1750                  _this5.errorMessage = null;
1751                  _this5.sending = false;
1752                  cb && typeof cb === "function" && cb(true);
1753                } catch (e) {
1754                  console.log(e);
1755                }
1756              })["catch"](function (_ref8) {
1757                var response = _ref8.response;
1758                var node = document.getElementById(form_id);
1759                if (node && 'scrollIntoView' in node) {
1760                  node.scrollIntoView({
1761                    block: "start",
1762                    behavior: "smooth"
1763                  });
1764                }
1765
1766                // Reset form fields and error message
1767                var message = "";
1768                var invalids = _this5.$el.getElementsByClassName("is-invalid");
1769                var _iterator = _createForOfIteratorHelper(invalids),
1770                  _step;
1771                try {
1772                  for (_iterator.s(); !(_step = _iterator.n()).done;) {
1773                    var element = _step.value;
1774                    element.classList.remove("is-invalid");
1775                  }
1776
1777                  // If errors weren't sent, something else went wrong but we want to give some feedback
1778                } catch (err) {
1779                  _iterator.e(err);
1780                } finally {
1781                  _iterator.f();
1782                }
1783                if (!response.data || !response.data.errors) {
1784                  message = "An unknown error occurred. Please use another method to get in touch and report this issue.";
1785                  // We have errors
1786                } else {
1787                  // If a string
1788                  if (typeof response.data.errors === "string") {
1789                    // Single error (likely not field related) set message to error
1790                    message = response.data.errors;
1791                    // If it's an array
1792                  } else {
1793                    // Append each to the message
1794                    for (var _i2 = 0, _Object$entries = Object.entries(response.data.errors); _i2 < _Object$entries.length; _i2++) {
1795                      var _this5$getNextSibling;
1796                      var _Object$entries$_i = _slicedToArray(_Object$entries[_i2], 2),
1797                        field = _Object$entries$_i[0],
1798                        msg = _Object$entries$_i[1];
1799                      var input = _this5.$el.querySelector(".input\\:" + field);
1800                      var feedback = (_this5$getNextSibling = _this5.getNextSibling(input, ".invalid-feedback")) !== null && _this5$getNextSibling !== void 0 ? _this5$getNextSibling : null;
1801
1802                      // If we have a feedback div specifically for this input
1803                      if (input && feedback) {
1804                        // Send message there
1805                        feedback.innerHTML = msg;
1806                      } else {
1807                        var m = Array.isArray(msg) ? msg.join("<br>") : msg;
1808                        //  Otherwise send to the primary error message area
1809                        message += message !== "" ? "<br>" + m : m;
1810                      }
1811                      if (input) {
1812                        // Also mark field invalid
1813                        input.classList.add("is-invalid");
1814                      }
1815                    }
1816                  }
1817                }
1818                // Reset form state
1819                _this5.successMessage = null;
1820                _this5.currentPage = 1;
1821                _this5.errorMessage = message;
1822                _this5.sending = false;
1823                cb && typeof cb === "function" && cb(false);
1824              });
1825            },
1826            recordConversion: function recordConversion() {
1827              if ('disableConversions' in window) {
1828                return;
1829              }
1830              var cm = typeof conversion_meta !== "undefined" ? conversion_meta : false;
1831              var eventAction = cm && cm.action ? cm.action : "submit";
1832              var eventCategory = cm && cm.category ? cm.category : "form";
1833              var eventLabel = cm && cm.label ? cm.label : location.pathname;
1834              var includeInAnalytics = cm && cm.includeInAnalytics ? cm.includeInAnalytics : [];
1835              var analyticsData = {};
1836              var _iterator2 = _createForOfIteratorHelper(includeInAnalytics),
1837                _step2;
1838              try {
1839                for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1840                  var aKey = _step2.value;
1841                  analyticsData[aKey] = aKey in this.input ? this.input[aKey] : null;
1842                }
1843
1844                // Analytics is configured
1845              } catch (err) {
1846                _iterator2.e(err);
1847              } finally {
1848                _iterator2.f();
1849              }
1850              if (typeof gtag !== "undefined") {
1851                var eventDetails = _objectSpread({
1852                  event_category: eventCategory,
1853                  event_label: eventLabel
1854                }, analyticsData);
1855                // Send event
1856                gtag("event", eventAction, eventDetails);
1857                console.log("Conversion event sent to Google Tag Manager", {
1858                  eventAction: eventAction,
1859                  eventDetails: eventDetails
1860                });
1861              }
1862              window.dataLayer = window.dataLayer || [];
1863              window.dataLayer.push({
1864                'event': 'generate_lead',
1865                'form_submission': eventLabel,
1866                'form_data': analyticsData
1867              });
1868              try {
1869                window.dispatchEvent(new CustomEvent('generate_lead', {
1870                  detail: {
1871                    action_type: eventAction || 'Form Submission',
1872                    category: eventCategory || 'Form',
1873                    label: eventLabel || window.location.href,
1874                    form_id: form_id,
1875                    page_url: window.location.href
1876                  }
1877                }));
1878              } catch (error) {
1879                // just in case :)
1880                console.error('Error dispatching generate_lead event', error);
1881              }
1882            }
1883          };
1884        };
1885
1886        // Track registered forms globally
1887        if (!window.__registeredForms) {
1888          window.__registeredForms = {};
1889        }
1890
1891        // Register component - must happen before Alpine walks the DOM
1892        function registerComponent() {
1893          if (!window.__registeredForms[form_id]) {
1894            Alpine.data(form_id, form);
1895            window.__registeredForms[form_id] = true;
1896
1897            // Only register "mosaicForm" once for backwards compatibility
1898            // This will point to the FIRST form on the page
1899            if (!window.__registeredForms['mosaicForm']) {
1900              Alpine.data("mosaicForm", form);
1901              window.__registeredForms['mosaicForm'] = true;
1902            }
1903          }
1904        }
1905
1906        // Use alpine:init to ensure we register before Alpine processes the DOM
1907        document.addEventListener('alpine:init', function () {
1908          registerComponent();
1909        });
1910
1911        // Also register immediately if Alpine has already initialized
1912        // This handles the case where scripts load after Alpine has started
1913        if (window.Alpine && window.Alpine.version) {
1914          registerComponent();
1915
1916          // If Alpine has already processed the DOM, manually initialize this form
1917          // Use requestAnimationFrame to ensure DOM is ready
1918          requestAnimationFrame(function () {
1919            var formElement = document.querySelector("[x-data=\"".concat(form_id, "\"]"));
1920            if (formElement && !formElement._x_dataStack) {
1921              // Element exists but hasn't been initialized by Alpine yet
1922              try {
1923                Alpine.initTree(formElement);
1924              } catch (e) {
1925                console.warn('Failed to initialize form', form_id, e);
1926              }
1927            }
1928          });
1929        }
1930      })();
1931    };
1932    ready(0);
1933  }
1934})();
1935
1936/* cached asset-dumpb67c41d11d223eda3fc43bb0c29e88a2c3f79bc9: */
1937"use strict";
1938
1939(function () {
1940  var __data_block_id = 3579684;
1941  var __block_id = "cyxN6";
1942  var foundBlockNode = document.getElementsByClassName("f_" + __block_id).length > 0;
1943  if (!foundBlockNode) {
1944    var templates = document.querySelectorAll('template');
1945    for (var i = 0; i < templates.length; i++) {
1946      if (templates[i].content.querySelector('.f_' + __block_id)) {
1947        foundBlockNode = true;
1948        break;
1949      }
1950    }
1951  }
1952  if (foundBlockNode) {
1953    var ready = function ready(counter) {
1954      if (!('__forgePageBlockData' in window) || !(__data_block_id in __forgePageBlockData)) {
1955        if (counter == 10) {
1956          throw Error("Giving up waiting for block data");
1957          return;
1958        }
1959        return setTimeout(function () {
1960          ready(counter + 1);
1961        }, 250);
1962      }
1963      if (typeof __forgePageBlockData[__data_block_id] == 'number') {
1964        __forgePageBlockData[__data_block_id] = __forgePageBlockData[__forgePageBlockData[__data_block_id]] || {};
1965      }
1966      var id = __forgePageBlockData[__data_block_id].id;
1967      var config = __forgePageBlockData[__data_block_id].config;
1968      var showLabels = __forgePageBlockData[__data_block_id].showLabels;
1969      var labels = __forgePageBlockData[__data_block_id].labels;
1970      var labelPosition = __forgePageBlockData[__data_block_id].labelPosition;
1971      var arrowsColor = __forgePageBlockData[__data_block_id].arrowsColor;
1972      var arrowsSize = __forgePageBlockData[__data_block_id].arrowsSize;
1973      var dotsColor = __forgePageBlockData[__data_block_id].dotsColor;
1974      var arrowsPosition = __forgePageBlockData[__data_block_id].arrowsPosition;
1975      var dotsPosition = __forgePageBlockData[__data_block_id].dotsPosition;
1976      var wrapTilesInSliderMarkup = __forgePageBlockData[__data_block_id].wrapTilesInSliderMarkup;
1977      var _block = __forgePageBlockData[__data_block_id]._block;
1978      var _page = __forgePageBlockData[__data_block_id]._page;
1979      var _ts = __forgePageBlockData[__data_block_id]._ts;
1980      var _elements = __forgePageBlockData[__data_block_id]._elements;
1981      var block = {
1982        id: "3579684",
1983        callbackUri: "/_/b/3579684"
1984      };
1985      var call = function call(action, callbackFunc) {
1986        return forge.blockCallback(block, action, callbackFunc);
1987      };
1988      var callback = function callback(action, data) {
1989        return call(action, function () {
1990          data = withData(data || {});
1991
1992          // check if any of the formData is a File or Blob
1993          var isFile = false;
1994          for (var key in data) {
1995            if (!isFile && data[key]) {
1996              var arr = Array.isArray(data[key]) ? data[key] : [data[key]];
1997              for (var i = 0; i < arr.length; i++) {
1998                if (arr[i] === Object(arr[i]) && (arr[i].constructor == File || arr[i].constructor === Blob)) {
1999                  isFile = true;
2000                  break;
2001                }
2002              }
2003            }
2004          }
2005          if (isFile) {
2006            var formData = new FormData();
2007            for (var key in data) {
2008              if (data[key] && (Array.isArray(data[key]) || data[key] === Object(data[key])) && data[key].constructor !== File && data[key].constructor !== Blob) {
2009                for (var idx in data[key]) {
2010                  formData.append(key + '[' + idx + ']', data[key][idx]);
2011                }
2012              } else {
2013                formData.append(key, data[key]);
2014              }
2015            }
2016            return axios.post(this.uri, formData, {
2017              headers: {
2018                'Content-Type': 'multipart/form-data',
2019                'X-Lazy-Load': 'off'
2020              }
2021            });
2022          } else {
2023            return axios.post(this.uri, data, {
2024              headers: {
2025                'X-Lazy-Load': 'off'
2026              }
2027            });
2028          }
2029        });
2030      };
2031      var withData = function withData(data) {
2032        return forge.requestData(data);
2033      };
2034      if (config.pagination === true) {
2035        config.pagination = {
2036          el: ".swiper-".concat(id, ".swiper-pagination"),
2037          clickable: true,
2038          clickableClass: 'cursor-pointer'
2039        };
2040      }
2041      if (config.navigation === true) {
2042        config.navigation = {
2043          nextEl: ".swiper-".concat(id, ".swiper-button-next"),
2044          prevEl: ".swiper-".concat(id, ".swiper-button-prev")
2045        };
2046      }
2047      var swiper = new Swiper("#swiper-".concat(id), config);
2048      window["go".concat(id)] = function (index) {
2049        swiper.slideTo(index);
2050      };
2051      window["updateHeight".concat(id)] = function (duration) {
2052        swiper.updateAutoHeight(duration);
2053      };
2054      var labelClasses = document.querySelector("[data-slider-id=\"".concat(id, "\"][data-label]"));
2055      labelClasses = labelClasses ? labelClasses.classList : null;
2056      var activeLabelClasses = document.querySelector("[data-slider-id=\"".concat(id, "\"][data-active-label]"));
2057      activeLabelClasses = activeLabelClasses ? activeLabelClasses.classList : null;
2058      swiper.on('activeIndexChange', function () {
2059        var _this = this;
2060        var labels = document.querySelectorAll("[data-slider-id=\"".concat(id, "\"][data-sli
2060de-index]"));
2061        labels.forEach(function (label) {
2062          label.classList = label.dataset.slideIndex.split(",").includes(String(_this.activeIndex)) ? activeLabelClasses : labelClasses;
2063        });
2064      });
2065    };
2066    ready(0);
2067  }
2068})();
2069
2070/* cached asset-dump49ed62100bbf9c9ec39d77c6b84647277d8053c5: */
2071"use strict";
2072
2073(function () {
2074  var __data_block_id = 3898175;
2075  var __block_id = "c0dPd";
2076  var foundBlockNode = document.getElementsByClassName("f_" + __block_id).length > 0;
2077  if (!foundBlockNode) {
2078    var templates = document.querySelectorAll('template');
2079    for (var i = 0; i < templates.length; i++) {
2080      if (templates[i].content.querySelector('.f_' + __block_id)) {
2081        foundBlockNode = true;
2082        break;
2083      }
2084    }
2085  }
2086  if (foundBlockNode) {
2087    var ready = function ready(counter) {
2088      if (!('__forgePageBlockData' in window) || !(__data_block_id in __forgePageBlockData)) {
2089        if (counter == 10) {
2090          throw Error("Giving up waiting for block data");
2091          return;
2092        }
2093        return setTimeout(function () {
2094          ready(counter + 1);
2095        }, 250);
2096      }
2097      if (typeof __forgePageBlockData[__data_block_id] == 'number') {
2098        __forgePageBlockData[__data_block_id] = __forgePageBlockData[__forgePageBlockData[__data_block_id]] || {};
2099      }
2100      var id = __forgePageBlockData[__data_block_id].id;
2101      var gap = __forgePageBlockData[__data_block_id].gap;
2102      var block = {
2103        id: "3898175",
2104        callbackUri: "/_/b/3898175"
2105      };
2106      var call = function call(action, callbackFunc) {
2107        return forge.blockCallback(block, action, callbackFunc);
2108      };
2109      var callback = function callback(action, data) {
2110        return call(action, function () {
2111          data = withData(data || {});
2112
2113          // check if any of the formData is a File or Blob
2114          var isFile = false;
2115          for (var key in data) {
2116            if (!isFile && data[key]) {
2117              var arr = Array.isArray(data[key]) ? data[key] : [data[key]];
2118              for (var i = 0; i < arr.length; i++) {
2119                if (arr[i] === Object(arr[i]) && (arr[i].constructor == File || arr[i].constructor === Blob)) {
2120                  isFile = true;
2121                  break;
2122                }
2123              }
2124            }
2125          }
2126          if (isFile) {
2127            var formData = new FormData();
2128            for (var key in data) {
2129              if (data[key] && (Array.isArray(data[key]) || data[key] === Object(data[key])) && data[key].constructor !== File && data[key].constructor !== Blob) {
2130                for (var idx in data[key]) {
2131                  formData.append(key + '[' + idx + ']', data[key][idx]);
2132                }
2133              } else {
2134                formData.append(key, data[key]);
2135              }
2136            }
2137            return axios.post(this.uri, formData, {
2138              headers: {
2139                'Content-Type': 'multipart/form-data',
2140                'X-Lazy-Load': 'off'
2141              }
2142            });
2143          } else {
2144            return axios.post(this.uri, data, {
2145              headers: {
2146                'X-Lazy-Load': 'off'
2147              }
2148            });
2149          }
2150        });
2151      };
2152      var withData = function withData(data) {
2153        return forge.requestData(data);
2154      };
2155      var config = {
2156        slidesPerView: "auto",
2157        centeredSlides: true,
2158        loop: true,
2159        speed: 5000,
2160        spaceBetween: gap,
2161        observer: true,
2162        observeParents: true,
2163        autoplay: {
2164          delay: 1,
2165          waitForTransition: true,
2166          stopOnLastSlide: false,
2167          pauseOnMouseEnter: false,
2168          disableOnInteraction: false
2169        }
2170      };
2171      var swiper = new Swiper("#swiper-".concat(id), config);
2172      setTimeout(function () {
2173        swiper.update();
2174      }, 3000);
2175    };
2176    ready(0);
2177  }
2178})();

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.