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JbhE,KAAK6B,OAASA,EACd7B,KAAK4D,KAAOA,EACZ5D,KAAK4G,SAAW,GAEhB5G,KAAKoG,YEWNxD,SAASC,iBAAiB,SAnC3B,SAAiCgF,GAChC,IAAMC,EAASD,EAAMC,OACrB,GAAKA,EAAOC,QAAQ,6BAApB,CAIA,IACMC,EADSF,EACYG,QAAQ,8BAC9BD,GAIcA,EAAYE,iBAAiB,0BAGrCC,SAAQ,SAACC,GACnB,IAAMC,EAAgBD,EAChBd,EAAce,EAAcjL,MAC5BkL,EAAaD,EAAclD,GAC3BtD,EAASyG,EAAarM,SAASqM,EAAWZ,MAAM,KAAK,IAAM,KAC3DlF,EAAU8F,EAAarM,SAASqM,EAAWZ,MAAM,KAAK,IAAM,KAGtD,OAAX7F,GACY,OAAZW,GAtCH,SACCX,EACAW,EACA8E,GAEA,IACMc,EADQzG,OAAO,iBAAUE,EAAM,YAAIW,IAClBU,KACtB,wCAAiCoE,EAAW,OAG7C,OAAOc,EAAStF,GAAG,cAAgBsF,EAASvC,SAAS,gBA6BnD0C,CAAyB1G,EAAQW,EAAS8E,KAE1CO,EAAMW,iBACNH,EAAc5E,SAAU,W","sources":["webpack://gp-inventory/./node_modules/lodash.debounce/index.js","webpack://gp-inventory/webpack/bootstrap","webpack://gp-inventory/webpack/runtime/compat get default export","webpack://gp-inventory/webpack/runtime/define property getters","webpack://gp-inventory/webpack/runtime/global","webpack://gp-inventory/webpack/runtime/hasOwnProperty shorthand","webpack://gp-inventory/./js/src/frontend/GPIProperties.ts","webpack://gp-inventory/./js/src/frontend/GPIConditionalLogic.ts","webpack://gp-inventory/./js/src/frontend/index.ts","webpack://gp-inventory/./js/src/frontend/GPICheckboxHandler.ts"],"sourcesContent":["/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        result = wait - timeSinceLastCall;\n\n    return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = value.replace(reTrim, '');\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","/* eslint-disable jsdoc/no-undefined-types */\ntype JQueryInput = JQuery<\n\tHTMLInputElement | HTMLSelectElement | HTMLTextAreaElement\n>;\n\nimport debounce from 'lodash.debounce';\n\nconst $ = window.jQuery;\n\nexport default class GPIProperties {\n\tpublic ajaxUrl: string;\n\tpublic formId: number;\n\tpublic targetFieldId: number;\n\tpublic triggerFieldIds: number[];\n\tpublic ajaxRefreshNonce: string;\n\n\tpublic $form: JQuery<HTMLFormElement>;\n\tpublic $targetField: JQueryInput;\n\n\tconstructor({\n\t\tajaxUrl,\n\t\tformId,\n\t\ttargetFieldId,\n\t\ttriggerFieldIds,\n\t\tajaxRefreshNonce,\n\t}: Pick<\n\t\tGPIProperties,\n\t\t| 'ajaxUrl'\n\t\t| 'formId'\n\t\t| 'targetFieldId'\n\t\t| 'triggerFieldIds'\n\t\t| 'ajaxRefreshNonce'\n\t>) {\n\t\tthis.ajaxUrl = ajaxUrl;\n\t\tthis.formId = formId;\n\t\tthis.targetFieldId = targetFieldId;\n\t\tthis.triggerFieldIds = triggerFieldIds;\n\t\tthis.ajaxRefreshNonce = ajaxRefreshNonce;\n\n\t\tthis.$form = $(`form#gform_${this.formId}`);\n\t\tthis.$targetField = $(`#field_${this.formId}_${this.targetFieldId}`);\n\n\t\twindow.gform.addAction(\n\t\t\t'gform_input_change',\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-shadow\n\t\t\t(elem: JQueryInput, formId: string, fieldId: string) => {\n\t\t\t\tif ($.inArray(parseInt(fieldId), this.triggerFieldIds) !== -1) {\n\t\t\t\t\tthis.refresh({\n\t\t\t\t\t\ttargetFieldId: this.targetFieldId,\n\t\t\t\t\t\ttriggerFieldId: parseInt(fieldId),\n\t\t\t\t\t\t$targetField: this.$targetField,\n\t\t\t\t\t\t$triggerField: elem,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\t// Trigger refresh on conversational next navigation.\n\t\t// See https://secure.helpscout.net/conversation/2717443844/71873#thread-8212574593\n\t\tdocument.addEventListener('gfcf/conversational/navigate/next', () => {\n\t\t\tfor (const fieldId of this.triggerFieldIds) {\n\t\t\t\tif ($(`#field_${formId}_${fieldId}`).is(':visible')) {\n\t\t\t\t\twindow.gf_input_change(\n\t\t\t\t\t\t$(`#input_${formId}_${fieldId}`),\n\t\t\t\t\t\tformId,\n\t\t\t\t\t\tfieldId\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\trefresh = debounce(\n\t\t(args: {\n\t\t\ttargetFieldId: number;\n\t\t\ttriggerFieldId?: number;\n\t\t\t$targetField: JQueryInput;\n\t\t\t$triggerField?: JQueryInput;\n\t\t\tinitialLoad?: boolean;\n\t\t}) => {\n\t\t\tthis.refreshCallback(args);\n\t\t},\n\t\t50\n\t);\n\n\trefreshCallback(args: {\n\t\ttargetFieldId: number;\n\t\ttriggerFieldId?: number;\n\t\t$targetField: JQueryInput;\n\t\t$triggerField?: JQueryInput;\n\t\tinitialLoad?: boolean;\n\t}) {\n\t\tif (args.initialLoad && this.$targetField.is('.gfield_error')) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst formData: { [input: string]: any } = {};\n\n\t\tthis.$form.find('input, select, textarea').each(function() {\n\t\t\tlet name = $(this).attr('name');\n\n\t\t\tif (!name) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst isArrayField = name.match(/\\[]$/);\n\n\t\t\tif (isArrayField) {\n\t\t\t\tname = name.replace(/\\[]$/, '');\n\n\t\t\t\tif (typeof formData[name] === 'undefined') {\n\t\t\t\t\tformData[name] = [];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst input = this as HTMLInputElement;\n\n\t\t\tif (\n\t\t\t\t['radio', 'checkbox'].indexOf(input.type) !== -1 &&\n\t\t\t\t!input.checked\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!isArrayField) {\n\t\t\t\tformData[name] = $(this).val();\n\t\t\t} else {\n\t\t\t\tformData[name].push($(this).val());\n\t\t\t}\n\t\t});\n\n\t\tconst data: {\n\t\t\taction: string;\n\t\t\tsecurity: string;\n\t\t\tform_id: number;\n\t\t\ttarget_field_id: number;\n\t\t\ttrigger_field_id?: number;\n\t\t\t[input: string]: any;\n\t\t} = {\n\t\t\t...formData,\n\t\t\taction: 'gpi_refresh_field',\n\t\t\tsecurity: this.ajaxRefreshNonce,\n\t\t\tform_id: this.formId,\n\t\t\ttarget_field_id: args.targetFieldId,\n\t\t\ttrigger_field_id: args.triggerFieldId,\n\t\t\tgpi_initial_property_refresh: args.initialLoad,\n\t\t};\n\n\t\t// Prevent AJAX-enabled forms from intercepting our AJAX request.\n\t\tdelete data.gform_ajax;\n\n\t\t// GF WooCommerce Product Add-ons Support\n\t\tif (typeof data['add-to-cart'] !== 'undefined') {\n\t\t\tdata.gform_submit = data.gform_old_submit;\n\n\t\t\tdelete data['add-to-cart'];\n\t\t\tdelete data.gform_old_submit;\n\t\t\tdelete data.wc_gforms_product_type;\n\t\t\tdelete data.product_id;\n\t\t\tdelete data.wc_gforms_form_id;\n\t\t\tdelete data.wc_gforms_next_page;\n\t\t\tdelete data.wc_gforms_previous_page;\n\t\t}\n\n\t\tthis.$targetField.addClass('gpi-refreshing-field');\n\n\t\t$.post(this.ajaxUrl, data).done((response) => {\n\t\t\tthis.$targetField.removeClass('gpi-refreshing-field');\n\n\t\t\t/**\n\t\t\t * Filter to enable/disable preserving values if something gets checked prior to the AJAX request resolving\n\t\t\t * that way inputs don't lose their values or get unchecked.\n\t\t\t *\n\t\t\t * @since 1.0-beta-3.12\n\t\t\t *\n\t\t\t * @param {boolean} preserveValues Whether values should be preserved.\n\t\t\t * @param {JQuery}  $targetField   Field with inventory that was refreshed.\n\t\t\t * @param {JQuery}  $triggerField  Property field that caused the field with inventory to be refreshed.\n\t\t\t * @param {boolean} initialLoad    Whether the field was refreshed on the initial load of the form.\n\t\t\t * @param {Object}  requestData    Payload used to initiate the `gpi_refresh_field` request.\n\t\t\t * @param {Object}  response       AJAX response from `gpi_refresh_field` admin-ajax.php action.\n\t\t\t */\n\t\t\tconst preserveValuesOnRefresh = window.gform.applyFilters(\n\t\t\t\t'gpi_preserve_values_on_refresh',\n\t\t\t\ttrue,\n\t\t\t\tthis.$targetField,\n\t\t\t\targs.$triggerField,\n\t\t\t\targs.initialLoad,\n\t\t\t\tdata,\n\t\t\t\tresponse\n\t\t\t);\n\n\t\t\tconst previousValues: { [id: string]: any } = {};\n\n\t\t\tif (preserveValuesOnRefresh) {\n\t\t\t\t// @ts-ignore\n\t\t\t\tthis.$targetField?.find(':input:enabled').each(function() {\n\t\t\t\t\tconst id = $(this).prop('id');\n\n\t\t\t\t\tif (!id) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst value = $(this).val();\n\n\t\t\t\t\tif ($(this).is(':radio') || $(this).is(':checkbox')) {\n\t\t\t\t\t\tif ($(this).is(':checked')) {\n\t\t\t\t\t\t\tpreviousValues[id] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpreviousValues[id] = value;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (response.success) {\n\t\t\t\t/*\n\t\t\t\t * Preserve field footers when used with Conversational Forms otherwise a JS error will occur.\n\t\t\t\t */\n\t\t\t\tconst conversationalFooter = this.$targetField.find(\n\t\t\t\t\t'.gform-conversational__field-footer'\n\t\t\t\t);\n\n\t\t\t\tthis.$targetField.html(response.data.content);\n\n\t\t\t\t// Append Conversational Forms field footer if found.\n\t\t\t\tif (conversationalFooter.length) {\n\t\t\t\t\tthis.$targetField.append(conversationalFooter);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (preserveValuesOnRefresh) {\n\t\t\t\tfor (const [id, value] of Object.entries(previousValues)) {\n\t\t\t\t\tconst $inputs = this.$targetField.find(`#${id}`);\n\n\t\t\t\t\tif ($inputs) {\n\t\t\t\t\t\tif ($inputs.is(':radio') || $inputs.is(':checkbox')) {\n\t\t\t\t\t\t\t$inputs.prop('checked', false);\n\t\t\t\t\t\t\t$inputs\n\t\t\t\t\t\t\t\t.filter(`[value=\"${value}\"]`)\n\t\t\t\t\t\t\t\t.filter(':enabled')\n\t\t\t\t\t\t\t\t.prop('checked', true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$inputs.filter(':enabled').val(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Support JetSloth's Image Choices plugin\n\t\t\t * https://jetsloth.com/support/gravity-forms-image-choices/\n\t\t\t */\n\t\t\tif (this.$targetField.hasClass('image-choices-field')) {\n\t\t\t\tif (\n\t\t\t\t\ttypeof (window as any).imageChoices_SetUpFields ===\n\t\t\t\t\t'function'\n\t\t\t\t) {\n\t\t\t\t\t(window as any).imageChoices_SetUpFields(this.formId);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Recalculate prices if the target field is a price field. This ensures that prices are re-added to labels. */\n\t\t\tif (\n\t\t\t\tthis.$targetField.hasClass('gfield_price') &&\n\t\t\t\ttypeof window.gformCalculateTotalPrice === 'function'\n\t\t\t) {\n\t\t\t\twindow.gformCalculateTotalPrice(data.form_id);\n\t\t\t}\n\n\t\t\t// Trigger change events on inputs inside the refreshed field. This is mostly for Populate Anything.\n\t\t\tthis.$targetField.find(':input').trigger('change');\n\n\t\t\t/**\n\t\t\t * Action fired after a field with inventory dependent on a property is refreshed.\n\t\t\t *\n\t\t\t * @since 1.0-beta-1.3\n\t\t\t * @since 1.0-beta-3.0 Added requestData and response params.\n\t\t\t *\n\t\t\t * @param {JQuery}  $targetField  Field with inventory that was refreshed.\n\t\t\t * @param {JQuery}  $triggerField Property field that caused the field with inventory to be refreshed.\n\t\t\t * @param {boolean} initialLoad   Whether the field was refreshed on the initial load of the form.\n\t\t\t * @param {Object}  requestData   Payload used to initiate the `gpi_refresh_field` request.\n\t\t\t * @param {Object}  response      AJAX response from `gpi_refresh_field` admin-ajax.php action.\n\t\t\t */\n\t\t\twindow.gform.doAction(\n\t\t\t\t'gpi_field_refreshed',\n\t\t\t\tthis.$targetField,\n\t\t\t\targs.$triggerField,\n\t\t\t\targs.initialLoad,\n\t\t\t\tdata,\n\t\t\t\tresponse\n\t\t\t);\n\t\t});\n\t}\n}\n","/* eslint-disable jsdoc/no-undefined-types */\nconst $ = window.jQuery;\n\ninterface GPIFieldData {\n\tisExhausted: boolean;\n}\n\ninterface GPIChoiceBasedFieldData extends GPIFieldData {\n\tchoices: {\n\t\tlabel: string;\n\t\tvalue: string;\n\t\tavailable: number;\n\t}[];\n\tisExhausted: boolean;\n}\n\ninterface GPINonChoiceFieldData extends GPIFieldData {\n\tavailable: number;\n}\n\ninterface GPIConditionalLogicData {\n\t[fieldId: number | string]: GPIChoiceBasedFieldData | GPINonChoiceFieldData;\n}\n\nexport default class GPIConditionalLogic {\n\tpublic formId: number;\n\n\tpublic data: GPIConditionalLogicData;\n\n\tprivate choiceId: string;\n\n\tconstructor({\n\t\tformId,\n\t\tdata,\n\t}: Pick<GPIConditionalLogic, 'formId' | 'data'>) {\n\t\tthis.formId = formId;\n\t\tthis.data = data;\n\t\tthis.choiceId = '';\n\n\t\tthis.addHooks();\n\t}\n\n\taddHooks = () => {\n\t\twindow.gform.addFilter('gform_is_value_match', this.isValueMatch);\n\t\twindow.gform.addAction('gpi_field_refreshed', this.onFieldRefresh);\n\t};\n\n\tisValueMatch = (\n\t\tisMatch: boolean,\n\t\tformId: GFFormID,\n\t\trule: GravityFormsConditionalLogicRule\n\t) => {\n\t\tif (rule.value === '__return_true') {\n\t\t\treturn true;\n\t\t} else if (rule.value === '__return_false') {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!isNaN(parseInt(rule.fieldId))) {\n\t\t\treturn isMatch;\n\t\t}\n\n\t\tconst regex = /(gpi_available)_([0-9]+)(?:_([0-9]+))?/;\n\t\tconst match = regex.exec(rule.fieldId);\n\n\t\tif (!match) {\n\t\t\treturn isMatch;\n\t\t}\n\n\t\tconst fieldId = match[2];\n\t\t// store the 'choiceId' for checkbox fields\n\t\tthis.choiceId = match[3]\n\t\t\t? match[2] + '_' + (parseInt(match[3]) + 1)\n\t\t\t: '';\n\n\t\tlet limit = this.getFieldAvailability(formId, fieldId);\n\n\t\tif (limit === undefined && this.isFieldExhausted(formId, fieldId)) {\n\t\t\tlimit = 0;\n\t\t}\n\n\t\treturn window.gf_matches_operation(\n\t\t\tlimit + '',\n\t\t\trule.value,\n\t\t\trule.operator\n\t\t);\n\t};\n\n\tisFieldExhausted = (formId: GFFormID, fieldId: GFFieldID) => {\n\t\treturn this.data[fieldId]?.isExhausted;\n\t};\n\n\tgetFieldAvailability = (formId: GFFormID, fieldId: GFFieldID) => {\n\t\tconst data = this.data[fieldId];\n\n\t\tif ((data as GPIChoiceBasedFieldData)?.choices) {\n\t\t\treturn this.getChoiceAvailability(formId, fieldId);\n\t\t}\n\n\t\treturn (data as GPINonChoiceFieldData)?.available;\n\t};\n\n\tgetChoiceAvailability = (\n\t\tformId: GFFormID,\n\t\tfieldId: GFFieldID,\n\t\tchoiceValue?: any\n\t) => {\n\t\tconst data = this.data[fieldId] as GPIChoiceBasedFieldData;\n\t\tconst choices = data.choices;\n\n\t\tif (typeof choiceValue === 'undefined') {\n\t\t\tchoiceValue = this.getChoiceValue(formId, fieldId);\n\t\t}\n\n\t\tfor (const choice of choices) {\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif (choice.value == choiceValue) {\n\t\t\t\treturn Math.max(choice.available, 0);\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\tgetChoiceValue = (formId: GFFormID, fieldId: GFFieldID) => {\n\t\tconst $input = $('#input_' + formId + '_' + fieldId);\n\t\tlet choiceValue: any;\n\n\t\t// radio\n\t\tif ($input.is('.gfield_radio')) {\n\t\t\tchoiceValue = $input.find('input:checked').val();\n\t\t}\n\t\t// checkbox\n\t\telse if ($input.is('.gfield_checkbox')) {\n\t\t\tconst choice = '#choice_' + formId + '_' + this.choiceId;\n\t\t\t$input.find('input:checked').each(function() {\n\t\t\t\tif ($(this).val() === $(choice).val()) {\n\t\t\t\t\tchoiceValue = $(this).val();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t// select\n\t\telse {\n\t\t\tchoiceValue = $input.val();\n\t\t}\n\n\t\t// split up product-based values (i.e. \"value|price\") to get just the \"value\"\n\t\tif (typeof choiceValue === 'string' && choiceValue) {\n\t\t\tchoiceValue = choiceValue.split('|')[0];\n\t\t}\n\n\t\treturn choiceValue;\n\t};\n\n\t/**\n\t * Update conditional logic data for field when it gets refreshed and re-trigger conditional logic accordingly.\n\t *\n\t * @param {JQuery}  $targetField  Field with inventory that was refreshed.\n\t * @param {JQuery}  $triggerField Property field that caused the field with inventory to be refreshed.\n\t * @param {boolean} initialLoad   Whether the field was refreshed on the initial load of the form.\n\t * @param {Object}  requestData   Payload used to initiate the `gpi_refresh_field` request.\n\t * @param {Object}  response      AJAX response from `gpi_refresh_field` admin-ajax.php action.\n\t */\n\tonFieldRefresh = (\n\t\t$targetField: JQuery,\n\t\t$triggerField: JQuery,\n\t\tinitialLoad: boolean,\n\t\trequestData: any,\n\t\tresponse: any\n\t) => {\n\t\t// eslint-disable-next-line eqeqeq\n\t\tif (requestData.form_id != this.formId) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!response.data.conditional_logic_data) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.data[requestData.target_field_id] =\n\t\t\tresponse.data.conditional_logic_data;\n\n\t\t// Re-trigger change now that the data is updated.\n\t\twindow.gform.doAction(\n\t\t\t'gform_input_change',\n\t\t\t$targetField,\n\t\t\trequestData.form_id,\n\t\t\trequestData.target_field_id\n\t\t);\n\t};\n}\n","import GPIProperties from './GPIProperties';\nimport GPIConditionalLogic from './GPIConditionalLogic';\nimport { initCheckboxHandler } from './GPICheckboxHandler';\n\nwindow.GPIProperties = GPIProperties;\nwindow.GPIConditionalLogic = GPIConditionalLogic;\n\n// Initialize the event listener for checkbox handling.\n// Tackles the issue of disabled checkboxes being selected/deselected.\ninitCheckboxHandler();\n","// Function to check if a checkbox choice is disabled\nfunction isCheckboxChoiceDisabled(\n\tformId: string | number,\n\tfieldId: string | number,\n\tchoiceValue: string\n): boolean {\n\tconst field = jQuery(`#input_${formId}_${fieldId}`);\n\tconst checkbox = field.find(\n\t\t`input[type=\"checkbox\"][value=\"${choiceValue}\"]`\n\t);\n\n\treturn checkbox.is(':disabled') && checkbox.hasClass('gpi-disabled');\n}\n\n// Function to handle the \"Select All\" checkbox logic\nfunction handleCheckboxChoiceAll(event: Event): void {\n\tconst target = event.target as Element;\n\tif (!target.matches('.gfield_choice_all_toggle')) {\n\t\treturn;\n\t}\n\n\tconst button = target;\n\tconst checkboxDiv = button.closest('.ginput_container_checkbox');\n\tif (!checkboxDiv) {\n\t\treturn;\n\t}\n\n\tconst checkboxes = checkboxDiv.querySelectorAll('input[type=\"checkbox\"]');\n\n\t// Iterate over the checkboxes and ensure disabled choice isn't selected/deselected.\n\tcheckboxes.forEach((checkbox) => {\n\t\tconst inputCheckbox = checkbox as HTMLInputElement;\n\t\tconst choiceValue = inputCheckbox.value;\n\t\tconst checkboxId = inputCheckbox.id;\n\t\tconst formId = checkboxId ? parseInt(checkboxId.split('_')[1]) : null;\n\t\tconst fieldId = checkboxId ? parseInt(checkboxId.split('_')[2]) : null;\n\n\t\tif (\n\t\t\tformId !== null &&\n\t\t\tfieldId !== null &&\n\t\t\tisCheckboxChoiceDisabled(formId, fieldId, choiceValue)\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\tinputCheckbox.checked = false;\n\t\t}\n\t});\n}\n\n// Function to initialize the event listener\nexport function initCheckboxHandler(): void {\n\tdocument.addEventListener('click', handleCheckboxChoiceAll);\n}\n"],"names":["reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","freeGlobal","g","Object","freeSelf","self","root","Function","objectToString","prototype","toString","nativeMax","Math","max","nativeMin","min","now","Date","isObject","value","type","toNumber","isObjectLike","call","isSymbol","other","valueOf","replace","isBinary","test","slice","module","exports","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","undefined","apply","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","remainingWait","debounced","isInvoking","arguments","this","cancel","clearTimeout","flush","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","defineProperty","enumerable","get","globalThis","e","window","obj","prop","hasOwnProperty","$","jQuery","ajaxUrl","formId","targetFieldId","triggerFieldIds","ajaxRefreshNonce","refresh","refreshCallback","$form","$targetField","gform","addAction","elem","fieldId","inArray","triggerFieldId","$triggerField","document","addEventListener","is","gf_input_change","initialLoad","formData","find","each","name","attr","isArrayField","match","indexOf","checked","push","val","data","action","security","form_id","target_field_id","trigger_field_id","gpi_initial_property_refresh","gform_ajax","gform_submit","gform_old_submit","wc_gforms_product_type","product_id","wc_gforms_form_id","wc_gforms_next_page","wc_gforms_previous_page","addClass","post","done","response","removeClass","preserveValuesOnRefresh","applyFilters","previousValues","id","success","conversationalFooter","html","content","length","append","entries","$inputs","filter","hasClass","imageChoices_SetUpFields","gformCalculateTotalPrice","trigger","doAction","GPIProperties","GPIConditionalLogic","addHooks","addFilter","isValueMatch","onFieldRefresh","isMatch","rule","isNaN","exec","choiceId","limit","getFieldAvailability","isFieldExhausted","gf_matches_operation","operator","isExhausted","choices","getChoiceAvailability","available","choiceValue","getChoiceValue","choice","$input","split","requestData","conditional_logic_data","event","target","matches","checkboxDiv","closest","querySelectorAll","forEach","checkbox","inputCheckbox","checkboxId","isCheckboxChoiceDisabled","preventDefault"],"sourceRoot":""}