{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js/packages/utils/src/number.js","webpack:///./js/packages/utils/src/api-request.js","webpack:///./js/packages/cart/src/line-item.js","webpack:///./js/packages/cart/src/cart.js","webpack:///./js/frontend/payment-forms/stripe-checkout/cart/line-item.js","webpack:///./js/frontend/payment-forms/stripe-checkout/cart/index.js","webpack:///./js/frontend/payments/customer.js","webpack:///./js/frontend/payments/session.js","webpack:///./js/frontend/payment-forms/stripe-checkout/submit.js","webpack:///./js/frontend/payment-forms/stripe-checkout/index.js","webpack:///./js/frontend/payment-forms/stripe-checkout/setup.js","webpack:///./js/packages/cart/src/index.js","webpack:///./js/frontend/payment-forms/index.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/defineProperty.js","webpack:///external \"jQuery\"","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/classCallCheck.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/createClass.js","webpack:///./js/frontend/index.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/typeof.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/validateNamespace.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/validateHookName.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createAddHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createRemoveHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createHasHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createRunHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createCurrentHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createDoingHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createDidHook.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/createHooks.js","webpack:///./js/packages/hooks/node_modules/@wordpress/hooks/build-module/index.js","webpack:///./js/packages/hooks/src/index.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/regenerator/index.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/form-serialize/index.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/inherits.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack:///./js/packages/utils/src/index.js","webpack:////Users/spencerfinnell/dev/wpsimplepay/wp-content/plugins/wp-simple-pay-pro/node_modules/regenerator-runtime/runtime.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Number","isInteger","isFinite","Math","floor","isSafeInteger","abs","MAX_SAFE_INTEGER","apiRequest","route","data","a","jQuery","ajax","method","url","wpApiSettings","root","beforeSend","xhr","setRequestHeader","nonce","responseJSON","LineItem","args","cart","this","id","title","amount","quantity","subscription","message","update","remainingItems","getLineItems","filter","items","tax","taxDecimal","getTaxDecimal","getQuantity","subtotal","getSubtotal","round","Cart","currency","taxPercent","coupon","isNonDecimalCurrency","isNaN","parseFloat","filteredItems","length","item","lineitem","push","unitPrice","getUnitPrice","BaseLineItem","forEach","getCoupon","percentOff","percent_off","amountOff","amount_off","discount","getDiscount","BaseCart","spFormElem","formData","form_values","serialize","hash","form_data","form_id","formId","window","simpayApp","enableForm","disableForm","triggerBrowserValidation","checkValidity","trigger","isValid","customer_id","hasCustomerFields","createCustomer","createSession","session","stripeInstance","redirectToCheckout","sessionId","then","error","onPaymentFormError","setup","e","submitBtn","find","spShared","debugLog","getPaymentFormType","convertToCents","spGeneral","booleans","isZeroDecimal","stripeParams","isSubscription","isTrial","planInterval","planIntervalCount","feePercent","feeAmount","setupFee","interval","intervalCount","singleAmount","convertFormDataToCartData","addLineItem","addEventListener","preventDefault","simpayGoogleRecaptcha","siteKey","grecaptcha","ready","execute","action","token","append","getPaymentForms","submit","onError","undefined","formDisplayType","stripeCheckout","showError","stripeErrorMessages","code","obj","configurable","writable","instance","Constructor","TypeError","_defineProperties","target","props","descriptor","protoProps","staticProps","$","body","formCount","spFormElList","spFormData","spFormElems","init","document","setupPaymentForm","on","each","setupCoreForm","isStripeCheckoutForm","attr","localizedFormData","simplePayForms","formInstance","stripe","strings","bools","form","integers","i18n","config","elementsLocale","Stripe","locale","setCoreFinalAmount","finalAmount","getTotal","setSubmitButtonAsLoading","loadingText","paymentButtonLoadingText","addClass","checkoutButtonLoadingText","prop","html","buttonText","paymentButtonText","removeClass","checkoutButtonText","embeddedHtml","createElement","innerHTML","convertToDollars","formatted","formatCurrency","replace","errorMessage","type","style","display","appendTo","click","remove","wpsp","hooks","_setPrototypeOf","setPrototypeOf","__proto__","self","ReferenceError","_typeof","iterator","constructor","namespace","console","test","hookName","callback","priority","arguments","handler","handlers","splice","__current","hookInfo","currentIndex","runs","doAction","removeAll","handlersRemoved","_loop","some","hook","returnFirstArg","_len","Array","_key","result","apply","pop","actions","filters","addAction","addFilter","removeAction","removeFilter","hasAction","hasFilter","removeAllActions","removeAllFilters","applyFilters","currentAction","currentFilter","doingAction","doingFilter","didAction","didFilter","_createHooks","createHooks","_getPrototypeOf","getPrototypeOf","k_r_submitter","k_r_success_contrls","brackets","hash_serializer","match","hash_assign","keys","shift","between","isArray","_values","string","index","children","RegExp","exec","parse_keys","existing","str_serialize","encodeURIComponent","options","serializer","elements","radio_store","element","disabled","nodeName","val","checked","empty","selectOptions","isSelectedOptions","j","option","allowedEmpty","hasValue","selected","slice","subClass","superClass","assertThisInitialized","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","done","Promise","fn","err","runtime","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","NativeIteratorPrototype","values","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","invoke","__await","unwrapped","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","displayName","isGeneratorFunction","genFun","ctor","mark","awrap","async","iter","toString","reverse","skipTempReset","prev","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,C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AG,CACpD,IAAIiZ,EAAQvV,KAAK4V,WAAWtZ,GAC5B,GAAIiZ,EAAMC,SAAWA,EAAQ,CAC3B,IAAIxB,EAASuB,EAAMO,WACnB,GAAoB,UAAhB9B,EAAOlJ,KAAkB,CAC3B,IAAI6M,EAAS3D,EAAOnC,IACpBgE,EAAcN,GAEhB,OAAOoC,GAMX,MAAM,IAAIrE,MAAM,0BAGlBsE,cAAe,SAAS5B,EAAUd,EAAYE,GAa5C,OAZApV,KAAKwT,SAAW,CACd5H,SAAU4I,EAAOwB,GACjBd,WAAYA,EACZE,QAASA,GAGS,SAAhBpV,KAAKZ,SAGPY,KAAK6R,SA1qBPlL,GA6qBOgN,IAQJvX,EA1rBK,CAisBiBC,EAAOD,SAGtC,IACEyb,mBAAqB1F,EACrB,MAAO2F,GAUPC,SAAS,IAAK,yBAAdA,CAAwC5F","file":"simpay-public.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 327);\n","// @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger#Polyfill\nNumber.isInteger = Number.isInteger || function( value ) {\n\treturn typeof value === 'number' &&\n\t\tisFinite( value ) &&\n\t\tMath.floor( value ) === value;\n};\n\n// @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger#Polyfill\nNumber.isSafeInteger = Number.isSafeInteger || function( value ) {\n\treturn Number.isInteger( value ) && Math.abs( value ) <= Number.MAX_SAFE_INTEGER;\n};\n\n// @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER#Polyfill\nif ( ! Number.MAX_SAFE_INTEGER ) {\n\tNumber.MAX_SAFE_INTEGER = 9007199254740991; // Math.pow(2, 53) - 1;\n}\n","/* global jQuery, wpApiSettings */\n\n/**\n * Make an API request to the REST API.\n *\n * @param {string} route REST route.\n * @param {Object} data Data to send to the request.\n * @return {Promise} jQuery promise.\n */\nexport async function apiRequest( route, data ) {\n\ttry {\n\t\treturn await jQuery.ajax( {\n\t\t\tdata,\n\t\t\tmethod: 'POST',\n\t\t\turl: `${ wpApiSettings.root }wpsp/${ route }`,\n\t\t\tbeforeSend: ( xhr ) => {\n\t\t\t\txhr.setRequestHeader( 'X-WP-Nonce', wpApiSettings.nonce );\n\t\t\t},\n\t\t} );\n\t} catch ( { responseJSON } ) {\n\t\tthrow responseJSON;\n\t}\n}\n","/**\n * Internal dependencies\n */\nimport { Cart } from './cart.js';\n\n/**\n * LineItem\n */\nexport const LineItem = class LineItem {\n\t/**\n\t * Create a line item.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @param {Object} args Line item arguments.\n\t * @param {string} args.id Cart line item ID.\n\t * @param {string} args.title Cart line item title.\n\t * @param {number} args.amount Cart line item amount.\n\t * @param {number} args.quantity Cart line item quantity.\n\t * @param {boolean|Object} args.subscription Cart line item subscription data.\n\t * @param {boolean} args.subscription.isTrial Cart line item subscription trial designation.\n\t * @param {number} args.subscription.intervalCount Cart line item subscription interval count.\n\t * @param {number} args.subscription.interval Cart line item subscription interval.\n\t * @param {Cart} cart Cart this line item is attached to.\n\t * @return {LineItem} LineItem\n\t */\n\tconstructor( args, cart ) {\n\t\t// Set defaults.\n\t\t// @todo add support for classProperties.\n\t\tthis.cart = null;\n\t\tthis.id = null;\n\t\tthis.title = null;\n\t\tthis.amount = 0;\n\t\tthis.quantity = 1;\n\t\tthis.subscription = false;\n\n\t\tif ( 'object' !== typeof cart ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item-cart',\n\t\t\t\tmessage: 'Item must have an cart.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.cart = cart;\n\t\t}\n\n\t\tthis.update( args );\n\t}\n\n\t/**\n\t * Updates a line item.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @param {Object} args Cart line item arguments.\n\t * @param {string} args.id Cart line item ID.\n\t * @param {string} args.title Cart line item title.\n\t * @param {number} args.amount Cart line item amount.\n\t * @param {number} args.quantity Cart line item quantity.\n\t * @param {boolean|Object} args.subscription Cart line item subscription data.\n\t * @param {boolean} args.subscription.isTrial Cart line item subscription trial designation.\n\t * @param {number} args.subscription.intervalCount Cart line item subscription interval count.\n\t * @param {number} args.subscription.interval Cart line item subscription interval.\n\t * @return {LineItem} Line item.\n\t */\n\tupdate( args ) {\n\t\t// Parse and retrieve specific arguments.\n\t\tconst {\n\t\t\tid,\n\t\t\ttitle,\n\t\t\tamount,\n\t\t\tquantity,\n\t\t\tsubscription,\n\t\t} = {\n\t\t\t...this,\n\t\t\t...args,\n\t\t};\n\n\t\t// ID must be a string.\n\t\tif ( 'string' !== typeof id ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item-id',\n\t\t\t\tmessage: 'Item ID must be a string.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.id = id;\n\t\t}\n\n\t\t// Title must be a string.\n\t\t// Not currently shown in any UI, but may be in the future.\n\t\tif ( 'string' !== typeof title ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item-title',\n\t\t\t\tmessage: 'Item title must be a string.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.title = title;\n\t\t}\n\n\t\t// Amount must be a number.\n\t\tif ( ! Number.isSafeInteger( amount ) ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item-amount',\n\t\t\t\tmessage: 'Item amount must be an integer.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.amount = amount;\n\t\t}\n\n\t\t// Quantity must be a number.\n\t\tif ( ! Number.isSafeInteger( quantity ) ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item-quantity',\n\t\t\t\tmessage: 'Item quantity must be an integer.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.quantity = quantity;\n\t\t}\n\n\t\t// Subscription must be false or contain subscription data.\n\t\t// @todo Validate subscription data.\n\t\tif ( ! ( false === subscription || 'object' === typeof subscription ) ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item-subscription',\n\t\t\t\tmessage: 'Item subscription data must be a false or contain subscription data.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.subscription = subscription;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes the line item from the cart.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {LineItem} Removed line item.\n\t */\n\tremove() {\n\t\tconst allItems = this.cart.getLineItems();\n\t\tconst remainingItems = allItems.filter( ( { id } ) => ( this.id !== id ) );\n\n\t\tthis.cart.items = remainingItems;\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Retrieves a cart line item's unit price.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart line item unit price.\n\t */\n\tgetUnitPrice() {\n\t\treturn this.amount;\n\t}\n\n\t/**\n\t * Retrieves the cart line item's quantity.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart line item quantity.\n\t */\n\tgetQuantity() {\n\t\treturn this.quantity;\n\t}\n\t\n\t/**\n\t * Retrieves a cart line item's tax.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart line item tax.\n\t */\n\tgetTax() {\n\t\tlet tax = 0;\n\t\tlet i = 0;\n\n\t\tconst taxDecimal = this.cart.getTaxDecimal();\n\t\tconst quantity = this.getQuantity();\n\t\tconst subtotal = this.getSubtotal();\n\n\t\tfor ( i = 0; i < quantity; i++ ) {\n\t\t\ttax += Math.round( subtotal * taxDecimal );\n\t\t}\n\n\t\treturn tax;\n\t}\n};\n\nexport default LineItem;\n","/**\n * Internal dependencies\n */\nimport LineItem from './line-item.js';\n\n/**\n * Cart\n */\nexport const Cart = class Cart {\n\t/**\n\t * Creates a cart.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @see `update()`\n\t *\n\t * @param {Object} args Cart arguments.\n\t * @return {Cart} Cart.\n\t */\n\tconstructor( args ) {\n\t\t// Set defaults.\n\t\t// @todo add support for classProperties.\n\t\tthis.items = [];\n\t\tthis.currency = 'usd';\n\t\tthis.taxPercent = 0;\n\t\tthis.coupon = false;\n\t\tthis.isNonDecimalCurrency = false;\n\n\t\tthis.update( args );\n\t}\n\n\t/**\n\t * Updates the cart.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @param {Object} args Cart arguments.\n\t * @param {number} args.taxPercent Tax percentage.\n\t * @param {false|Object} args.coupon Stripe Coupon.\n\t * @param {boolean} args.isNonDecimalCurrency If the currency is non-decimal based.\n\t * @return {Cart} Cart.\n\t */\n\tupdate( args ) {\n\t\t// Parse and retrieve specific arguments.\n\t\tconst {\n\t\t\tcurrency,\n\t\t\ttaxPercent,\n\t\t\tcoupon,\n\t\t\tisNonDecimalCurrency,\n\t\t} = {\n\t\t\t...this,\n\t\t\t...args,\n\t\t};\n\n\t\t// Set currency.\n\t\tif ( 'string' !== typeof currency ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-currency',\n\t\t\t\tmessage: 'Currency must be a string.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.currency = currency;\n\t\t}\n\n\t\t// Set fees.\n\t\tif ( isNaN( taxPercent ) ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-tax-percent',\n\t\t\t\tmessage: 'Tax percentage must be a number.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.taxPercent = parseFloat( taxPercent );\n\t\t}\n\n\t\t// Set coupon.\n\t\t// @todo Validate coupon data.\n\t\tif ( ! ( false === coupon || 'object' === typeof coupon ) ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-coupon',\n\t\t\t\tmessage: 'Coupon must be a false or contain coupon data.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.coupon = coupon;\n\t\t}\n\n\t\tif ( 'boolean' !== typeof isNonDecimalCurrency ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-non-decimal-currency',\n\t\t\t\tmessage: 'Declaring a non-decimal currency must be a boolean.',\n\t\t\t};\n\t\t} else {\n\t\t\tthis.isNonDecimalCurrency = isNonDecimalCurrency;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Resets the cart.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {Cart} Cart.\n\t */\n\treset() {\n\t\treturn new Cart;\n\t}\n\n\t/**\n\t * Retrieves coupon information.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {Object} Stripe Coupon.\n\t */\n\tgetCoupon() {\n\t\treturn this.coupon;\n\t}\n\n\t/**\n\t * Retrieves the cart's tax percent amount.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number}\n\t */\n\tgetTaxPercent() {\n\t\treturn this.taxPercent;\n\t}\n\n\t/**\n\t * Retrieves the cart's tax decimal amount for calculations.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number}\n\t */\n\tgetTaxDecimal() {\n\t\treturn ( this.taxPercent / 100 );\n\t}\n\n\t/**\n\t * Retrieves the items in the cart.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {Array} List of cart items.\n\t */\n\tgetLineItems() {\n\t\treturn this.items;\n\t}\n\n\t/**\n\t * Retrieves an item.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @param {string} id Cart line item ID.\n\t * @return {LineItem} Cart line item.\n\t */\n\tgetLineItem( id ) {\n\t\tconst items = this.getLineItems();\n\n\t\t// Can't use `find` because it is not supported in IE.\n\t\tconst filteredItems = items.filter( ( { id: itemId } ) => ( itemId === id ) );\n\n\t\tif ( 0 === filteredItems.length ) {\n\t\t\tthrow {\n\t\t\t\tid: 'invalid-line-item',\n\t\t\t\tmessage: `Unable to retrieve line item \"${ id }\"`,\n\t\t\t};\n\t\t}\n\n\t\treturn filteredItems[ 0 ];\n\t}\n\n\t/**\n\t * Adds a line item to the cart.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @param {Object|LineItem} item Cart line item or arguments to create one.\n\t * @return {LineItem} Added line item.\n\t */\n\taddLineItem( item ) {\n\t\tlet lineitem;\n\n\t\tif ( true === item instanceof LineItem ) {\n\t\t\tlineitem = item;\n\t\t} else {\n\t\t\tlineitem = new this.LineItem( item, this );\n\t\t}\n\n\t\tthis.items.push( lineitem );\n\n\t\treturn lineitem;\n\t}\n};\n","/**\n * Internal dependencies\n */\nimport { LineItem as BaseLineItem } from '@wpsimplepay/cart';\n\n/**\n * LineItem\n */\nclass LineItem extends BaseLineItem {\n\t/**\n\t * Retrieves a cart line item's subtotal.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart line item subtotal.\n\t */\n\tgetSubtotal() {\n\t\tlet subtotal = 0;\n\t\tlet i = 0;\n\n\t\tconst taxDecimal = this.cart.getTaxDecimal();\n\n\t\t// Calculate tax for each unit and create a sum.\n\t\tfor ( i = 0; i < this.getQuantity(); i++ ) {\n\t\t\tconst unitPrice = this.getUnitPrice();\n\t\t\tconst unitPriceTaxAmount = Math.round( unitPrice * taxDecimal );\n\n\t\t\tsubtotal += unitPrice + unitPriceTaxAmount;\n\t\t}\n\n\t\treturn subtotal;\n\t}\n\n\t/**\n\t * Retrieves a cart line item's total.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart line item total.\n\t */\n\tgetTotal() {\n\t\treturn Math.round( this.getSubtotal() );\n\t}\n}\n\nexport default LineItem;\n","/**\n * Internal dependencies\n */\nimport { Cart as BaseCart } from '@wpsimplepay/cart';\nimport LineItem from './line-item.js';\n\n/**\n * Cart for Stripe Checkout form types.\n *\n * @since 3.7.0\n */\nexport const Cart = class Cart extends BaseCart {\n\t/**\n\t * @since 3.7.0\n\t *\n\t * @param {Object} args Cart arguments.\n\t */\n\tconstructor( args ) {\n\t\tsuper( args );\n\n\t\t// Define the type of line item to use.\n\t\tthis.LineItem = LineItem;\n\t}\n\n\t/**\n\t * Retrieves subtotal.\n\t *\n\t * Taxes are added to each line item amount to create a subtotal.\n\t * This is done because Stripe Checkout Sessions do not support\n\t * `tax_percent` or `tax_rates`.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart subtotal.\n\t */\n\tgetSubtotal() {\n\t\tlet subtotal = 0;\n\n\t\tthis.getLineItems().forEach( ( item ) => {\n\t\t\tsubtotal += item.getSubtotal();\n\t\t} );\n\n\t\treturn subtotal;\n\t}\n\n\t/**\n\t * Retrieves the total discount amount.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart discount amount.\n\t */\n\tgetDiscount() {\n\t\tconst coupon = this.getCoupon();\n\n\t\tconst {\n\t\t\tpercent_off: percentOff,\n\t\t\tamount_off: amountOff,\n\t\t} = coupon;\n\n\t\tlet discount = 0;\n\n\t\tif ( false === coupon ) {\n\t\t\treturn discount;\n\t\t}\n\n\t\tif ( percentOff ) {\n\t\t\tdiscount += Math.round( this.getSubtotal() * ( percentOff / 100 ) );\n\t\t} else if ( amountOff ) {\n\t\t\tdiscount += amountOff;\n\t\t}\n\n\t\treturn discount;\n\t}\n\n\t/**\n\t * Retrieves the total tax amount.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart tax.\n\t */\n\tgetTax() {\n\t\tlet tax = 0;\n\t\tlet i = 0;\n\n\t\tconst taxDecimal = this.getTaxDecimal();\n\t\tconst lineItems = this.getLineItems();\n\n\t\tlineItems.forEach( ( item ) => {\n\t\t\tfor ( i = 0; i < item.getQuantity(); i++ ) {\n\t\t\t\ttax += Math.round( item.getUnitPrice() * taxDecimal );\n\t\t\t}\n\t\t} );\n\n\t\treturn tax;\n\t}\n\n\t/**\n\t * Retrieves the total.\n\t *\n\t * @since 3.7.0\n\t *\n\t * @return {number} Cart total.\n\t */\n\tgetTotal() {\n\t\tconst subtotal = this.getSubtotal();\n\t\tconst discount = this.getDiscount();\n\n\t\treturn Math.round( subtotal - discount );\n\t}\n};\n","/**\n * External dependencies.\n */\nimport serialize from 'form-serialize';\n\n/**\n * Internal dependencies.\n */\nimport { apiRequest } from '@wpsimplepay/utils';\n\n/**\n * Create a Customer object based on current formData.\n *\n * @param {Object} data Data to pass to REST endpoint.\n * @param {jQuery} spFormElem Form element jQuery object.\n * @param {Object} formData Configured form data.\n * @return {Promise} AJAX promise.\n */\nexport function create( data = {}, spFormElem, formData ) {\n\treturn apiRequest( 'v2/customer', {\n\t\tform_values: serialize( spFormElem[ 0 ], { hash: true } ),\n\t\tform_data: formData,\n\t\tform_id: formData.formId,\n\t\t...data,\n\t} );\n}\n","/**\n * External dependencies.\n */\nimport serialize from 'form-serialize';\n\n/**\n * Internal dependencies.\n */\nimport { apiRequest } from '@wpsimplepay/utils';\n\n/**\n * Create a Customer object based on current formData.\n *\n * @param {Object} data Data to pass to REST endpoint.\n * @param {jQuery} spFormElem Form element jQuery object.\n * @param {Object} formData Configured form data.\n * @return {Promise} AJAX promise.\n */\nexport function create( data = {}, spFormElem, formData ) {\n\treturn apiRequest( 'v2/checkout-session', {\n\t\tform_values: serialize( spFormElem[ 0 ], { hash: true } ),\n\t\tform_data: formData,\n\t\tform_id: formData.formId,\n\t\t...data,\n\t} );\n}\n","/* global _ */\n\n/**\n * External dependencies.\n */\nimport serialize from 'form-serialize';\n\n/**\n * Internal dependencies.\n */\nimport { onPaymentFormError } from '@wpsimplepay/core/frontend/payment-forms';\nimport { create as createCustomer } from '@wpsimplepay/core/frontend/payments/customer.js';\nimport { create as createSession } from '@wpsimplepay/core/frontend/payments/session.js';\n\n/**\n * Submit Stripe Checkout Payment Form.\n *\n * @todo DRY presubmission validation checks?\n *\n * @since 3.8.0\n *\n * @param {Element} cardElementInstance Stripe Elements card.\n * @param {jQuery} spFormElem Form element jQuery object.\n * @param {Object} formData Configured form data.\n */\nexport async function submit( spFormElem, formData ) {\n\tconst {\n\t\tenableForm,\n\t\tdisableForm,\n\t\ttriggerBrowserValidation,\n\t} = window.simpayApp;\n\n\t// Disable form while processing.\n\tdisableForm( spFormElem, formData, true );\n\n\t// HTML5 validation check.\n\tif ( ! spFormElem[ 0 ].checkValidity() ) {\n\t\ttriggerBrowserValidation( spFormElem, formData );\n\t\tenableForm( spFormElem, formData );\n\n\t\treturn;\n\t}\n\n\t// Allow further validation.\n\t//\n\t// jQuery( document.body ).on( 'simpayBeforeStripePayment', function( e, spFormElem, formData ) {\n\t// formData.isValid = false;\n\t// } );\n\tspFormElem.trigger( 'simpayBeforeStripePayment', [ spFormElem, formData ] );\n\n\tif ( ! formData.isValid ) {\n\t\tenableForm( spFormElem, formData );\n\n\t\treturn;\n\t}\n\n\ttry {\n\n\t\t// @todo Implement as a \"Stripe Checkout\" Payment Method?\n\n\t\tlet customer_id = null;\n\t\tconst { hasCustomerFields } = formData;\n\n\t\t// Only generate a custom Customer if we need to map on-page form fields.\n\t\tif ( hasCustomerFields ) {\n\t\t\tconst { id } = await createCustomer( {}, spFormElem, formData );\n\t\t\tcustomer_id = id;\n\t\t}\n\n\t\t// Generate a Checkout Session.\n\t\tconst session = await createSession(\n\t\t\t{\n\t\t\t\tcustomer_id,\n\t\t\t},\n\t\t\tspFormElem,\n\t\t\tformData\n\t\t);\n\n\t\t// Redirect to Stripe.\n\t\tspFormElem.stripeInstance\n\t\t\t.redirectToCheckout( {\n\t\t\t\tsessionId: session.sessionId,\n\t\t\t} )\n\t\t\t.then( ( { error } ) => {\n\t\t\t\tif ( error ) {\n\t\t\t\t\tonPaymentFormError( error, spFormElem, formData );\n\t\t\t\t}\n\t\t\t} );\n\n\t} catch ( error ) {\n\t\tonPaymentFormError( error, spFormElem, formData );\n\t}\n}\n","/**\n * Internal dependencies\n */\nimport { setup } from './setup.js';\nimport { submit } from './submit.js';\nimport { onPaymentFormError as onError } from '@wpsimplepay/core/frontend/payment-forms';\n\nexport default {\n\tsetup,\n\tsubmit,\n\tonError,\n};\n","/**\n * Internal dependencies\n */\nimport { convertFormDataToCartData } from '@wpsimplepay/cart';\nimport { Cart } from '@wpsimplepay/core/frontend/payment-forms/stripe-checkout/cart';\nimport { onPaymentFormError, getPaymentFormType, getPaymentForms } from '@wpsimplepay/core/frontend/payment-forms';\n\n/**\n * Bind events for Stripe Checkout.\n *\n * @param {Event} e simpayBindCoreFormEventsAndTriggers Event.\n * @param {jQuery} spFormElem Form element jQuery object.\n * @param {Object} formData Configured form data.\n */\nexport function setup( e, spFormElem, formData ) {\n\tconst submitBtn = spFormElem.find( '.simpay-payment-btn' )[0];\n\n\tconst { enableForm, disableForm } = window.simpayApp;\n\tconst { debugLog } = window.spShared;\n\n\t// Don't continue if this form is not using Stripe Checkout.\n\t// We need to check here due to legacy implementation of form setups.\n\tif ( 'stripe-checkout' !== getPaymentFormType( spFormElem, formData ) ) {\n\t\treturn;\n\t}\n\n\t// Disable Payment Form during setup.\n\tdisableForm( spFormElem, formData, true );\n\n\ttry {\n\t\t// Convert legacay data in to Cart data.\n\t\tconst {\n\t\t\titems,\n\t\t\tcurrency,\n\t\t\ttaxPercent,\n\t\t\tisNonDecimalCurrency,\n\t\t} = convertFormDataToCartData( formData );\n\n\t\t// Create a cart.\n\t\tconst cart = new Cart( {\n\t\t\tcurrency,\n\t\t\ttaxPercent,\n\t\t\tisNonDecimalCurrency,\n\t\t} );\n\n\t\t// Add items to the Cart.\n\t\tif ( items.length > 0 ) {\n\t\t\titems.forEach( ( item ) => {\n\t\t\t\tcart.addLineItem( item );\n\t\t\t} );\n\t\t}\n\n\t\t// Attach cart to the Payment Form instance.\n\t\tspFormElem.cart = cart;\n\n\t\t// Reenable form.\n\t\tenableForm( spFormElem, formData );\n\n\t\t// Attach submission handler.\n\t\tsubmitBtn.addEventListener( 'click', ( e ) => {\n\t\t\te.preventDefault();\n\n\t\t\tif ( window.simpayGoogleRecaptcha ) {\n\t\t\t\tconst { siteKey } = simpayGoogleRecaptcha;\n\n\t\t\t\t// @todo Complete syncronously inside of separate reCAPTCHA script.\n\t\t\t\t//\n\t\t\t\t// This is a temporary measure to ensure reCAPTCHA tokens are generated\n\t\t\t\t// at the time of submission to avoid them being invalidated after 120 seconds.\n\t\t\t\tgrecaptcha.ready( () => {\n\t\t\t\t\tgrecaptcha.execute( siteKey, {\n\t\t\t\t\t\taction: `simple_pay_form_${ formData.formId }_customer`,\n\t\t\t\t\t} )\n\t\t\t\t\t\t.then( ( token ) => {\n\t\t\t\t\t\t\tspFormElem.append( '' );\n\n\t\t\t\t\t\t\tgrecaptcha.execute( siteKey, {\n\t\t\t\t\t\t\t\taction: `simple_pay_form_${ formData.formId }_payment`,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t.then( ( token ) => {\n\t\t\t\t\t\t\t\t\tspFormElem.append( '' );\n\n\t\t\t\t\t\t\t\t\t// Find and submit the Payment Form.\n\t\t\t\t\t\t\t\t\tgetPaymentForms()[ getPaymentFormType( spFormElem, formData ) ]\n\t\t\t\t\t\t\t\t\t\t.submit( spFormElem, formData );\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tgetPaymentForms()[ getPaymentFormType( spFormElem, formData ) ]\n\t\t\t\t\t.submit( spFormElem, formData );\n\t\t\t}\n\t\t} );\n\t} catch ( error ) {\n\t\tonPaymentFormError( error, spFormElem, formData );\n\t}\n}\n","export * from './cart.js';\nexport * from './line-item.js';\n\n/**\n * Converts current `formData` to a structured cart.\n *\n * @since 3.7.0\n *\n * @param {Object} formData Legacy form data.\n * @return {Object} data Cart data.\n */\nexport function convertFormDataToCartData( formData ) {\n\tconst {\n\t\tdebugLog,\n\t\tconvertToCents,\n\t} = window.spShared;\n\n\tconst {\n\t\tbooleans: {\n\t\t\tisZeroDecimal: isNonDecimalCurrency,\n\t\t},\n\t} = window.spGeneral;\n\n\tconst {\n\t\tstripeParams: {\n\t\t\tcurrency,\n\t\t},\n\n\t\t// Items.\n\t\tamount,\n\t\tisSubscription,\n\t\tquantity,\n\t\tisTrial,\n\t\tplanInterval,\n\t\tplanIntervalCount,\n\n\t\t// Fees.\n\t\tfeePercent,\n\t\tfeeAmount,\n\t\ttaxPercent,\n\t\tsetupFee,\n\t} = formData;\n\n\tconst data = {\n\t\tcurrency,\n\t\titems: [],\n\t\ttaxPercent: 0,\n\t\tisNonDecimalCurrency,\n\t};\n\n\t//\n\t// Add items.\n\t//\n\n\t// Initial Setup Fee.\n\tif ( ! isNaN( setupFee ) ) {\n\t\tdata.items.push( {\n\t\t\tid: 'setup-fee',\n\t\t\ttitle: 'Initial Setup Fee',\n\t\t\tamount: convertToCents( setupFee ),\n\t\t\tquantity: 1,\n\t\t\tsubscription: false,\n\t\t} );\n\t}\n\n\t// Plan Setup Fee.\n\tdata.items.push( {\n\t\tid: 'plan-setup-fee',\n\t\ttitle: 'Plan Setup Fee',\n\t\tamount: 0,\n\t\tquantity: 1,\n\t\tsubscription: false,\n\t} );\n\n\t// Base item.\n\tif ( isSubscription ) {\n\t\tdata.items.push( {\n\t\t\tid: 'base',\n\t\t\ttitle: 'Subscription',\n\t\t\tamount: convertToCents( amount ),\n\t\t\tquantity,\n\t\t\tsubscription: {\n\t\t\t\tisTrial,\n\t\t\t\tinterval: planInterval,\n\t\t\t\tintervalCount: planIntervalCount,\n\t\t\t},\n\t\t} );\n\t} else {\n\t\tlet singleAmount = amount;\n\n\t\tif ( ! isNaN( feeAmount ) && feeAmount > 0 ) {\n\t\t\tsingleAmount += feeAmount;\n\n\t\t\tdebugLog( 'feeAmount:', 'Arbitrary fee amounts should be added to the base amount directly.' );\n\t\t}\n\n\t\tdata.items.push( {\n\t\t\tid: 'base',\n\t\t\ttitle: 'One-time amount',\n\t\t\tamount: convertToCents( singleAmount ),\n\t\t\tquantity,\n\t\t\tsubscription: false,\n\t\t} );\n\t}\n\n\t// Tax.\n\tif ( ! isNaN( taxPercent ) ) {\n\t\tdata.taxPercent = taxPercent;\n\t}\n\n\t// Add any arbitrary fee percentage to tax percentage.\n\t// @link https://github.com/wpsimplepay/wp-simple-pay-pro/issues/1161\n\tif ( ! isNaN( feePercent ) && feePercent > 0 ) {\n\t\tdata.taxPercent = data.taxPercent + feePercent;\n\t\tdebugLog( 'feePercent:', 'Arbitrary fee percentages should be added to the taxPercent directly.' );\n\t};\n\n\treturn data;\n}\n","/* global _ */\n\n/**\n * Internal dependencies\n */\nimport { default as stripeCheckout } from './stripe-checkout';\n\n/**\n * Returns the current form type.\n *\n * @since 3.8.0\n *\n * @param {jQuery} spFormElem Form element jQuery object.\n * @param {Object} formData Configured form data.\n * @return {string} Form type. Currently supports `stripe-checkout` or `stripe-elements`.\n */\nexport function getPaymentFormType( spFormElem, formData ) {\n\tif (\n\t\tundefined === formData.formDisplayType ||\n\t\t'stripe_checkout' === formData.formDisplayType\n\t) {\n\t\treturn 'stripe-checkout';\n\t} else {\n\t\treturn 'stripe-elements';\n\t}\n};\n\n/**\n * Returns available Payment Forms.\n *\n * @todo Create a registry/datastore.\n *\n * @since 3.8.0\n *\n * @return {Object} List of available Payment Forms.\n */\nexport const getPaymentForms = () => ( {\n\t'stripe-checkout': stripeCheckout,\n} );\n\n/**\n * Handles an error on submission.\n *\n * @since 3.8.0\n *\n * @param {Object} error Error data.\n * @param {jQuery} spFormElem Form element jQuery object.\n * @param {Object} formData Configured form data.\n */\nexport function onPaymentFormError( error = {}, spFormElem, formData ) {\n\tconst { showError, enableForm } = window.simpayApp;\n\tconst { debugLog } = window.spShared;\n\n\tconst { stripeErrorMessages } = formData;\n\tlet message = error.message || '';\n\n\t// Use localized message if code exists.\n\tif ( error.code && stripeErrorMessages[ error.code ] ) {\n\t\tmessage = stripeErrorMessages[ error.code ];\n\t}\n\n\tshowError( spFormElem, formData, message );\n\tenableForm( spFormElem, formData );\n}\n","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","module.exports = jQuery;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","/* global simplePayForms, spGeneral, jQuery */\n\n/**\n * Internal dependencies.\n */\nimport hooks from '@wpsimplepay/hooks';\nimport { getPaymentForms } from '@wpsimplepay/core/frontend/payment-forms';\n\nlet simpayApp;\n\n( function( $ ) {\n\t'use strict';\n\n\tlet body;\n\n\tsimpayApp = {\n\n\t\tformCount: 0,\n\n\t\t// Collection of DOM elements of all payment forms.\n\t\tspFormElList: {},\n\n\t\t// Internal organized collection of all form data.\n\t\tspFormData: {},\n\t\tspFormElems: {},\n\n\t\t/**\n\t\t *\n\t\t */\n\t\tinit() {\n\t\t\tbody = $( document.body );\n\n\t\t\t// Skip \"Update Payment Method Forms\"\n\t\t\t// We need to keep .simpay-checkout-form so styles are applied.\n\t\t\tsimpayApp.spFormElList = body.find( '.simpay-checkout-form:not(.simpay-update-payment-method)' );\n\n\t\t\tconst stripeCheckout = getPaymentForms()['stripe-checkout'];\n\t\t\tconst { setup: setupPaymentForm } = stripeCheckout;\n\n\t\t\t// Setup Stripe Checkout when formData is available.\n\t\t\tbody.on( 'simpayCoreFormVarsInitialized', setupPaymentForm );\n\n\t\t\tsimpayApp.spFormElList.each( function( i ) {\n\t\t\t\tconst spFormElem = $( this );\n\n\t\t\t\tsimpayApp.setupCoreForm( spFormElem );\n\t\t\t\tsimpayApp.formCount++;\n\n\t\t\t\tbody.trigger( 'simpaySetupCoreForm', [ spFormElem ] );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Does this payment form use the Stripe Checkout overlay?\n\t\t *\n\t\t * @param {Object} formData Configured form data.\n\t\t */\n\t\tisStripeCheckoutForm( formData ) {\n\t\t\treturn ( undefined === formData.formDisplayType ) || ( 'stripe_checkout' === formData.formDisplayType );\n\t\t},\n\n\t\t/**\n\t\t * Setup form object properties and additional data.\n\t\t *\n\t\t * @param {jQuery} spFormElem Form element jQuery object.\n\t\t */\n\t\tsetupCoreForm( spFormElem ) {\n\t\t\t// Add a unique identifier to the form for unique selectors.\n\t\t\tspFormElem.attr( 'data-simpay-form-instance', simpayApp.formCount );\n\n\t\t\tconst formId = spFormElem.data( 'simpay-form-id' );\n\n\t\t\t// Grab the localized data for this form ID.\n\t\t\tconst localizedFormData = simplePayForms[ formId ];\n\n\t\t\t// Merge form data from bootstrapped data (separated based on type... for some reason).\n\t\t\tconst formData = {\n\t\t\t\tformId,\n\t\t\t\tformInstance: simpayApp.formCount,\n\t\t\t\tquantity: 1,\n\t\t\t\tisValid: true,\n\t\t\t\tstripeParams: {\n\t\t\t\t\t...localizedFormData.stripe.strings,\n\t\t\t\t\t...localizedFormData.stripe.bools,\n\t\t\t\t},\n\t\t\t\t...localizedFormData.form.bools,\n\t\t\t\t...localizedFormData.form.integers,\n\t\t\t\t...localizedFormData.form.i18n,\n\t\t\t\t...localizedFormData.form.strings,\n\t\t\t\t...localizedFormData.form.config,\n\t\t\t};\n\n\t\t\tconst {\n\t\t\t\tstripeParams: {\n\t\t\t\t\tkey,\n\t\t\t\t\telementsLocale,\n\t\t\t\t}\n\t\t\t} = formData;\n\n\t\t\t// Attach Stripe instance to spFormElem to avoid tampering when adjusting formData.\n\t\t\tspFormElem.stripeInstance = Stripe( key, {\n\t\t\t\tlocale: elementsLocale || 'auto',\n\t\t\t} );\n\n\t\t\t// Track in global namespace.\n\t\t\twindow.simpayApp.spFormData[ formId ] = formData;\n\t\t\twindow.simpayApp.spFormElems[ formId ] = spFormElem;\n\n\t\t\tbody.trigger( 'simpayCoreFormVarsInitialized', [ spFormElem, formData ] );\n\t\t\tbody.trigger( 'simpayBindCoreFormEventsAndTriggers', [ spFormElem, formData ] );\n\t\t},\n\n\t\t/**\n\t\t * Set the final amount for the Payment Form.\n\t\t *\n\t\t * @param {jQuery} spFormElem Form element jQuery object.\n\t\t * @param {Object} formData Configured form data.\n\t\t */\n\t\tsetCoreFinalAmount( spFormElem, formData ) {\n\t\t\t// Backwards compat.\n\t\t\tformData.finalAmount = spFormElem.cart.getTotal();\n\n\t\t\tbody.trigger( 'simpayFinalizeCoreAmount', [ spFormElem, formData ] );\n\t\t},\n\n\t\t/**\n\t\t * Disable Payment Form.\n\t\t *\n\t\t * @param {jQuery} spFormElem Form element jQuery object.\n\t\t * @param {Object} formData Configured form data.\n\t\t * @param {bool} setSubmitAsLoading Adjust button text to Processing text state.\n\t\t */\n\t\tdisableForm( spFormElem, formData, setSubmitButtonAsLoading ) {\n\t\t\tlet submitBtn = spFormElem.find( '.simpay-payment-btn' );\n\t\t\tlet loadingText = formData.paymentButtonLoadingText;\n\n\t\t\tspFormElem.addClass( 'simpay-checkout-form--loading' );\n\n\t\t\tif ( ! window.simpayApp.isStripeCheckoutForm( formData ) ) {\n\t\t\t\tsubmitBtn = spFormElem.find( '.simpay-checkout-btn' );\n\t\t\t\tloadingText = formData.checkoutButtonLoadingText;\n\t\t\t}\n\n\t\t\t// Disable the form submit button upon initial form load or form submission.\n\t\t\tsubmitBtn\n\t\t\t\t.prop( 'disabled', true );\n\n\t\t\tif ( true === setSubmitButtonAsLoading ) {\n\t\t\t\tsubmitBtn\n\t\t\t\t\t.addClass( 'simpay-disabled' )\n\t\t\t\t\t.find( 'span' )\n\t\t\t\t\t.html( loadingText );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Enable Payment Form.\n\t\t *\n\t\t * @param {jQuery} spFormElem Form element jQuery object.\n\t\t * @param {Object} formData Configured form data.\n\t\t */\n\t\tenableForm( spFormElem, formData ) {\n\t\t\tconst { cart } = spFormElem;\n\n\t\t\t// Do nothing if Cart is unavailable.\n\t\t\tif ( undefined === cart ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet submitBtn = spFormElem.find( '.simpay-payment-btn' );\n\t\t\tlet loadingText = formData.paymentButtonLoadingText;\n\t\t\tlet buttonText = formData.paymentButtonText;\n\n\t\t\tspFormElem.removeClass( 'simpay-checkout-form--loading' );\n\n\t\t\tif ( ! window.simpayApp.isStripeCheckoutForm( formData ) ) {\n\t\t\t\tsubmitBtn = spFormElem.find( '.simpay-checkout-btn' );\n\t\t\t\tloadingText = formData.checkoutButtonLoadingText;\n\t\t\t\tbuttonText = formData.checkoutButtonText;\n\t\t\t}\n\n\t\t\t// Re-enable button.\n\t\t\tsubmitBtn\n\t\t\t\t.prop( 'disabled', false )\n\t\t\t\t.removeClass( 'simpay-disabled' );\n\n\t\t\t// Embed in to an arbitrary node to retrieve parsed entities.\n\t\t\tconst embeddedHtml = document.createElement( 'div' );\n\t\t\tembeddedHtml.innerHTML = loadingText;\n\n\t\t\t// Reset button text back to original if needed during validation.\n\t\t\tif ( $( embeddedHtml ).html() === submitBtn.find( 'span' ).html() ) {\n\t\t\t\tconst {\n\t\t\t\t\tconvertToDollars,\n\t\t\t\t\tformatCurrency,\n\t\t\t\t} = window.spShared;\n\n\t\t\t\tconst total = convertToDollars( cart.getTotal() );\n\t\t\t\tconst formatted = formatCurrency( total, true );\n\t\t\t\tconst amount = `${ formatted }`;\n\n\t\t\t\tbuttonText = buttonText\n\t\t\t\t\t.replace( '{{amount}}', amount );\n\n\t\t\t\treturn submitBtn\n\t\t\t\t\t.find( 'span' )\n\t\t\t\t\t.html( buttonText );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Show an error.\n\t\t *\n\t\t * @param {jQuery} spFormElem Form element jQuery object.\n\t\t * @param {Object} formData Configured form data.\n\t\t * @param {string} errorMessage Message to show.\n\t\t */\n\t\tshowError( spFormElem, formData, errorMessage ) {\n\t\t\treturn spFormElem\n\t\t\t\t.find( '.simpay-errors' )\n\t\t\t\t.html( errorMessage );\n\t\t},\n\n\t\t/**\n\t\t * Ref triggerBrowserValidation in https://stripe.github.io/elements-examples/\n\t\t *\n\t\t * @param {jQuery} spFormElem Form element jQuery object.\n\t\t * @param {Object} formData Configured form data.\n\t\t */\n\t\ttriggerBrowserValidation( spFormElem, formData ) {\n\t\t\treturn $( '' )\n\t\t\t\t.attr( {\n\t\t\t\t\ttype: 'submit',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t} )\n\t\t\t\t.appendTo( spFormElem )\n\t\t\t\t.click()\n\t\t\t\t.remove();\n\t\t},\n\t};\n\n\t// Initialize form.\n\t$( document ).ready( () => simpayApp.init() );\n}( jQuery ) );\n\nwindow.simpayApp = simpayApp;\n\n/**\n * Globally accessible object of WP Simple Pay-related functionality.\n */\nwindow.wpsp = {\n\thooks,\n};\n","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","/**\n * Validate a namespace string.\n *\n * @param {string} namespace The namespace to validate - should take the form\n * `vendor/plugin/function`.\n *\n * @return {boolean} Whether the namespace is valid.\n */\nfunction validateNamespace(namespace) {\n if ('string' !== typeof namespace || '' === namespace) {\n // eslint-disable-next-line no-console\n console.error('The namespace must be a non-empty string.');\n return false;\n }\n\n if (!/^[a-zA-Z][a-zA-Z0-9_.\\-\\/]*$/.test(namespace)) {\n // eslint-disable-next-line no-console\n console.error('The namespace can only contain numbers, letters, dashes, periods, underscores and slashes.');\n return false;\n }\n\n return true;\n}\n\nexport default validateNamespace;\n//# sourceMappingURL=validateNamespace.js.map","/**\n * Validate a hookName string.\n *\n * @param {string} hookName The hook name to validate. Should be a non empty string containing\n * only numbers, letters, dashes, periods and underscores. Also,\n * the hook name cannot begin with `__`.\n *\n * @return {boolean} Whether the hook name is valid.\n */\nfunction validateHookName(hookName) {\n if ('string' !== typeof hookName || '' === hookName) {\n // eslint-disable-next-line no-console\n console.error('The hook name must be a non-empty string.');\n return false;\n }\n\n if (/^__/.test(hookName)) {\n // eslint-disable-next-line no-console\n console.error('The hook name cannot begin with `__`.');\n return false;\n }\n\n if (!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(hookName)) {\n // eslint-disable-next-line no-console\n console.error('The hook name can only contain numbers, letters, dashes, periods and underscores.');\n return false;\n }\n\n return true;\n}\n\nexport default validateHookName;\n//# sourceMappingURL=validateHookName.js.map","/**\n * Internal dependencies\n */\nimport validateNamespace from './validateNamespace.js';\nimport validateHookName from './validateHookName.js';\nimport { doAction } from './';\n/**\n * Returns a function which, when invoked, will add a hook.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that adds a new hook.\n */\n\nfunction createAddHook(hooks) {\n /**\n * Adds the hook to the appropriate hooks container.\n *\n * @param {string} hookName Name of hook to add\n * @param {string} namespace The unique namespace identifying the callback in the form `vendor/plugin/function`.\n * @param {Function} callback Function to call when the hook is run\n * @param {?number} priority Priority of this hook (default=10)\n */\n return function addHook(hookName, namespace, callback) {\n var priority = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 10;\n\n if (!validateHookName(hookName)) {\n return;\n }\n\n if (!validateNamespace(namespace)) {\n return;\n }\n\n if ('function' !== typeof callback) {\n // eslint-disable-next-line no-console\n console.error('The hook callback must be a function.');\n return;\n } // Validate numeric priority\n\n\n if ('number' !== typeof priority) {\n // eslint-disable-next-line no-console\n console.error('If specified, the hook priority must be a number.');\n return;\n }\n\n var handler = {\n callback: callback,\n priority: priority,\n namespace: namespace\n };\n\n if (hooks[hookName]) {\n // Find the correct insert index of the new hook.\n var handlers = hooks[hookName].handlers;\n var i;\n\n for (i = handlers.length; i > 0; i--) {\n if (priority >= handlers[i - 1].priority) {\n break;\n }\n }\n\n if (i === handlers.length) {\n // If append, operate via direct assignment.\n handlers[i] = handler;\n } else {\n // Otherwise, insert before index via splice.\n handlers.splice(i, 0, handler);\n } // We may also be currently executing this hook. If the callback\n // we're adding would come after the current callback, there's no\n // problem; otherwise we need to increase the execution index of\n // any other runs by 1 to account for the added element.\n\n\n (hooks.__current || []).forEach(function (hookInfo) {\n if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {\n hookInfo.currentIndex++;\n }\n });\n } else {\n // This is the first hook of its type.\n hooks[hookName] = {\n handlers: [handler],\n runs: 0\n };\n }\n\n if (hookName !== 'hookAdded') {\n doAction('hookAdded', hookName, namespace, callback, priority);\n }\n };\n}\n\nexport default createAddHook;\n//# sourceMappingURL=createAddHook.js.map","/**\n * Internal dependencies\n */\nimport validateNamespace from './validateNamespace.js';\nimport validateHookName from './validateHookName.js';\nimport { doAction } from './';\n/**\n * Returns a function which, when invoked, will remove a specified hook or all\n * hooks by the given name.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n * @param {boolean} removeAll Whether to remove all callbacks for a hookName, without regard to namespace. Used to create `removeAll*` functions.\n *\n * @return {Function} Function that removes hooks.\n */\n\nfunction createRemoveHook(hooks, removeAll) {\n /**\n * Removes the specified callback (or all callbacks) from the hook with a\n * given hookName and namespace.\n *\n * @param {string} hookName The name of the hook to modify.\n * @param {string} namespace The unique namespace identifying the callback in the form `vendor/plugin/function`.\n *\n * @return {number} The number of callbacks removed.\n */\n return function removeHook(hookName, namespace) {\n if (!validateHookName(hookName)) {\n return;\n }\n\n if (!removeAll && !validateNamespace(namespace)) {\n return;\n } // Bail if no hooks exist by this name\n\n\n if (!hooks[hookName]) {\n return 0;\n }\n\n var handlersRemoved = 0;\n\n if (removeAll) {\n handlersRemoved = hooks[hookName].handlers.length;\n hooks[hookName] = {\n runs: hooks[hookName].runs,\n handlers: []\n };\n } else {\n // Try to find the specified callback to remove.\n var handlers = hooks[hookName].handlers;\n\n var _loop = function _loop(i) {\n if (handlers[i].namespace === namespace) {\n handlers.splice(i, 1);\n handlersRemoved++; // This callback may also be part of a hook that is\n // currently executing. If the callback we're removing\n // comes after the current callback, there's no problem;\n // otherwise we need to decrease the execution index of any\n // other runs by 1 to account for the removed element.\n\n (hooks.__current || []).forEach(function (hookInfo) {\n if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {\n hookInfo.currentIndex--;\n }\n });\n }\n };\n\n for (var i = handlers.length - 1; i >= 0; i--) {\n _loop(i);\n }\n }\n\n if (hookName !== 'hookRemoved') {\n doAction('hookRemoved', hookName, namespace);\n }\n\n return handlersRemoved;\n };\n}\n\nexport default createRemoveHook;\n//# sourceMappingURL=createRemoveHook.js.map","/**\n * Returns a function which, when invoked, will return whether any handlers are\n * attached to a particular hook.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that returns whether any handlers are\n * attached to a particular hook and optional namespace.\n */\nfunction createHasHook(hooks) {\n /**\n * Returns whether any handlers are attached for the given hookName and optional namespace.\n *\n * @param {string} hookName The name of the hook to check for.\n * @param {?string} namespace Optional. The unique namespace identifying the callback\n * in the form `vendor/plugin/function`.\n *\n * @return {boolean} Whether there are handlers that are attached to the given hook.\n */\n return function hasHook(hookName, namespace) {\n // Use the namespace if provided.\n if ('undefined' !== typeof namespace) {\n return hookName in hooks && hooks[hookName].handlers.some(function (hook) {\n return hook.namespace === namespace;\n });\n }\n\n return hookName in hooks;\n };\n}\n\nexport default createHasHook;\n//# sourceMappingURL=createHasHook.js.map","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\n\n/**\n * Returns a function which, when invoked, will execute all callbacks\n * registered to a hook of the specified type, optionally returning the final\n * value of the call chain.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n * @param {?boolean} returnFirstArg Whether each hook callback is expected to\n * return its first argument.\n *\n * @return {Function} Function that runs hook callbacks.\n */\nfunction createRunHook(hooks, returnFirstArg) {\n /**\n * Runs all callbacks for the specified hook.\n *\n * @param {string} hookName The name of the hook to run.\n * @param {...*} args Arguments to pass to the hook callbacks.\n *\n * @return {*} Return value of runner, if applicable.\n */\n return function runHooks(hookName) {\n if (!hooks[hookName]) {\n hooks[hookName] = {\n handlers: [],\n runs: 0\n };\n }\n\n hooks[hookName].runs++;\n var handlers = hooks[hookName].handlers; // The following code is stripped from production builds.\n\n if ('production' !== process.env.NODE_ENV) {\n // Handle any 'all' hooks registered.\n if ('hookAdded' !== hookName && hooks.all) {\n handlers.push.apply(handlers, _toConsumableArray(hooks.all.handlers));\n }\n }\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (!handlers || !handlers.length) {\n return returnFirstArg ? args[0] : undefined;\n }\n\n var hookInfo = {\n name: hookName,\n currentIndex: 0\n };\n\n hooks.__current.push(hookInfo);\n\n while (hookInfo.currentIndex < handlers.length) {\n var handler = handlers[hookInfo.currentIndex];\n var result = handler.callback.apply(null, args);\n\n if (returnFirstArg) {\n args[0] = result;\n }\n\n hookInfo.currentIndex++;\n }\n\n hooks.__current.pop();\n\n if (returnFirstArg) {\n return args[0];\n }\n };\n}\n\nexport default createRunHook;\n//# sourceMappingURL=createRunHook.js.map","/**\n * Returns a function which, when invoked, will return the name of the\n * currently running hook, or `null` if no hook of the given type is currently\n * running.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that returns the current hook.\n */\nfunction createCurrentHook(hooks) {\n /**\n * Returns the name of the currently running hook, or `null` if no hook of\n * the given type is currently running.\n *\n * @return {?string} The name of the currently running hook, or\n * `null` if no hook is currently running.\n */\n return function currentHook() {\n if (!hooks.__current || !hooks.__current.length) {\n return null;\n }\n\n return hooks.__current[hooks.__current.length - 1].name;\n };\n}\n\nexport default createCurrentHook;\n//# sourceMappingURL=createCurrentHook.js.map","/**\n * Returns a function which, when invoked, will return whether a hook is\n * currently being executed.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that returns whether a hook is currently\n * being executed.\n */\nfunction createDoingHook(hooks) {\n /**\n * Returns whether a hook is currently being executed.\n *\n * @param {?string} hookName The name of the hook to check for. If\n * omitted, will check for any hook being executed.\n *\n * @return {boolean} Whether the hook is being executed.\n */\n return function doingHook(hookName) {\n // If the hookName was not passed, check for any current hook.\n if ('undefined' === typeof hookName) {\n return 'undefined' !== typeof hooks.__current[0];\n } // Return the __current hook.\n\n\n return hooks.__current[0] ? hookName === hooks.__current[0].name : false;\n };\n}\n\nexport default createDoingHook;\n//# sourceMappingURL=createDoingHook.js.map","/**\n * Internal dependencies\n */\nimport validateHookName from './validateHookName.js';\n/**\n * Returns a function which, when invoked, will return the number of times a\n * hook has been called.\n *\n * @param {Object} hooks Stored hooks, keyed by hook name.\n *\n * @return {Function} Function that returns a hook's call count.\n */\n\nfunction createDidHook(hooks) {\n /**\n * Returns the number of times an action has been fired.\n *\n * @param {string} hookName The hook name to check.\n *\n * @return {number} The number of times the hook has run.\n */\n return function didHook(hookName) {\n if (!validateHookName(hookName)) {\n return;\n }\n\n return hooks[hookName] && hooks[hookName].runs ? hooks[hookName].runs : 0;\n };\n}\n\nexport default createDidHook;\n//# sourceMappingURL=createDidHook.js.map","/**\n * Internal dependencies\n */\nimport createAddHook from './createAddHook';\nimport createRemoveHook from './createRemoveHook';\nimport createHasHook from './createHasHook';\nimport createRunHook from './createRunHook';\nimport createCurrentHook from './createCurrentHook';\nimport createDoingHook from './createDoingHook';\nimport createDidHook from './createDidHook';\n/**\n * Returns an instance of the hooks object.\n *\n * @return {Object} Object that contains all hooks.\n */\n\nfunction createHooks() {\n var actions = Object.create(null);\n var filters = Object.create(null);\n actions.__current = [];\n filters.__current = [];\n return {\n addAction: createAddHook(actions),\n addFilter: createAddHook(filters),\n removeAction: createRemoveHook(actions),\n removeFilter: createRemoveHook(filters),\n hasAction: createHasHook(actions),\n hasFilter: createHasHook(filters),\n removeAllActions: createRemoveHook(actions, true),\n removeAllFilters: createRemoveHook(filters, true),\n doAction: createRunHook(actions),\n applyFilters: createRunHook(filters, true),\n currentAction: createCurrentHook(actions),\n currentFilter: createCurrentHook(filters),\n doingAction: createDoingHook(actions),\n doingFilter: createDoingHook(filters),\n didAction: createDidHook(actions),\n didFilter: createDidHook(filters),\n actions: actions,\n filters: filters\n };\n}\n\nexport default createHooks;\n//# sourceMappingURL=createHooks.js.map","/**\n * Internal dependencies\n */\nimport createHooks from './createHooks';\n\nvar _createHooks = createHooks(),\n addAction = _createHooks.addAction,\n addFilter = _createHooks.addFilter,\n removeAction = _createHooks.removeAction,\n removeFilter = _createHooks.removeFilter,\n hasAction = _createHooks.hasAction,\n hasFilter = _createHooks.hasFilter,\n removeAllActions = _createHooks.removeAllActions,\n removeAllFilters = _createHooks.removeAllFilters,\n doAction = _createHooks.doAction,\n applyFilters = _createHooks.applyFilters,\n currentAction = _createHooks.currentAction,\n currentFilter = _createHooks.currentFilter,\n doingAction = _createHooks.doingAction,\n doingFilter = _createHooks.doingFilter,\n didAction = _createHooks.didAction,\n didFilter = _createHooks.didFilter,\n actions = _createHooks.actions,\n filters = _createHooks.filters;\n\nexport { createHooks, addAction, addFilter, removeAction, removeFilter, hasAction, hasFilter, removeAllActions, removeAllFilters, doAction, applyFilters, currentAction, currentFilter, doingAction, doingFilter, didAction, didFilter, actions, filters };\n//# sourceMappingURL=index.js.map","/**\n * WordPress dependencies\n */\nimport { createHooks } from '@wordpress/hooks';\n\nexport default createHooks();\n","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","module.exports = require(\"regenerator-runtime\");\n","// get successful control from form and assemble into object\n// http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2\n\n// types which indicate a submit action and are not successful controls\n// these will be ignored\nvar k_r_submitter = /^(?:submit|button|image|reset|file)$/i;\n\n// node names which could be successful controls\nvar k_r_success_contrls = /^(?:input|select|textarea|keygen)/i;\n\n// Matches bracket notation.\nvar brackets = /(\\[[^\\[\\]]*\\])/g;\n\n// serializes form fields\n// @param form MUST be an HTMLForm element\n// @param options is an optional argument to configure the serialization. Default output\n// with no options specified is a url encoded string\n// - hash: [true | false] Configure the output type. If true, the output will\n// be a js object.\n// - serializer: [function] Optional serializer function to override the default one.\n// The function takes 3 arguments (result, key, value) and should return new result\n// hash and url encoded str serializers are provided with this module\n// - disabled: [true | false]. If true serialize disabled fields.\n// - empty: [true | false]. If true serialize empty fields\nfunction serialize(form, options) {\n if (typeof options != 'object') {\n options = { hash: !!options };\n }\n else if (options.hash === undefined) {\n options.hash = true;\n }\n\n var result = (options.hash) ? {} : '';\n var serializer = options.serializer || ((options.hash) ? hash_serializer : str_serialize);\n\n var elements = form && form.elements ? form.elements : [];\n\n //Object store each radio and set if it's empty or not\n var radio_store = Object.create(null);\n\n for (var i=0 ; i result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n"],"sourceRoot":""}