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nG,IAGvB,OAAOiX,CACT,C,gCCbe,SAASkD,EAAQ1J,GAG9B,OAAO0J,EAAU,mBAAqBhB,QAAU,iBAAmBA,OAAOC,SAAW,SAAU3I,GAC7F,cAAcA,CAChB,EAAI,SAAUA,GACZ,OAAOA,GAAO,mBAAqB0I,QAAU1I,EAAIuI,cAAgBG,QAAU1I,IAAQ0I,OAAOzB,UAAY,gBAAkBjH,CAC1H,EAAG0J,EAAQ1J,EACb,CCNe,SAAS2J,EAA2BzY,EAAMoW,GACvD,GAAIA,IAA2B,WAAlBoC,EAAQpC,IAAsC,mBAATA,GAChD,OAAOA,EACF,QAAa,IAATA,EACT,MAAM,IAAIhB,UAAU,4DAGtB,OCTa,SAAgCpV,GAC7C,QAAa,IAATA,EACF,MAAM,IAAI0Y,eAAe,6DAG3B,OAAO1Y,CACT,CDGS,CAAsBA,EAC/B,C,iQENe,SAAS2Y,EAAe/D,EAAKE,GAC1C,OAAO,OAAeF,KAAQ,OAAqBA,EAAKE,KAAM,OAA2BF,EAAKE,KAAM,QACtG,C,qFCLe,SAAS8D,EAA4B/B,EAAGgC,GACrD,GAAKhC,EAAL,CACA,GAAiB,iBAANA,EAAgB,OAAO,OAAiBA,EAAGgC,GACtD,IAAIC,EAAI9T,OAAO+Q,UAAUgD,SAAS3C,KAAKS,GAAGmC,MAAM,GAAI,GAEpD,MADU,WAANF,GAAkBjC,EAAEQ,cAAayB,EAAIjC,EAAEQ,YAAY7L,MAC7C,QAANsN,GAAqB,QAANA,EAAoBpN,MAAMuN,KAAKpC,GACxC,cAANiC,GAAqB,2CAA2CI,KAAKJ,IAAW,OAAiBjC,EAAGgC,QAAxG,CALc,CAMhB,C","sources":["webpack://wcPPCP/./assets/js/paylater-message/base.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://wcPPCP/./assets/js/paylater-message/cart.js","webpack://wcPPCP/./assets/js/paylater-message/checkout.js","webpack://wcPPCP/./assets/js/paylater-message/minicart.js","webpack://wcPPCP/./assets/js/paylater-message/product.js","webpack://wcPPCP/./assets/js/paylater-message/shop.js","webpack://wcPPCP/./assets/js/payments/classes/class-base-gateway.js","webpack://wcPPCP/./assets/js/payments/classes/class-checkout-gateway.js","webpack://wcPPCP/./assets/js/payments/classes/class-cart-gateway.js","webpack://wcPPCP/./assets/js/payments/classes/class-product-gateway.js","webpack://wcPPCP/./assets/js/payments/classes/class-minicart-gateway.js","webpack://wcPPCP/./assets/js/ppcp/paypal-cart.js","webpack://wcPPCP/./assets/js/ppcp/paypal-checkout.js","webpack://wcPPCP/./assets/js/ppcp/paypal-express-checkout.js","webpack://wcPPCP/./assets/js/ppcp/paypal-minicart.js","webpack://wcPPCP/./assets/js/ppcp/paypal-product.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/superPropBase.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/get.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"],"sourcesContent":["import $ from 'jquery';\nimport {getPaymentMethod, getSetting, loadPayPalSdk} from \"@ppcp/utils\";\nimport {defaultHooks} from \"@wordpress/hooks\";\n\nclass PayLaterBaseMessage {\n\n    constructor(context, {queryParams}) {\n        this.context = context;\n        this.queryParams = queryParams;\n        defaultHooks.addAction('paypalInstanceCreated', 'wcPPCP', this.paypalInstanceCreated.bind(this));\n    }\n\n    paypalInstanceCreated(paypal, queryParams) {\n        if (this.paypal !== paypal) {\n            this.paypal = paypal;\n            this.queryParams = queryParams;\n            this.createMessage();\n        }\n    }\n\n    isCheckoutFlow() {\n        return this.queryParams?.vault !== 'true';\n    }\n\n    initialize() {\n        this.createMessage();\n    }\n\n    createMessage() {\n        const container = this.getMessageContainer();\n        if (container) {\n            if (this.isCheckoutFlow() && this.isActive()) {\n                this.showContainer(container);\n                const params = {\n                    amount: this.getTotal(),\n                    currency: this.getCurrency(),\n                    placement: this.getPlacement(),\n                    style: this.getStyleOptions(this.context),\n                    onRender: () => {\n                        this.onRender(container);\n                    }\n                };\n                this.paypal.Messages(params).render(container);\n            } else {\n                this.hideMessage(container);\n            }\n        }\n    }\n\n    showContainer(container) {\n        $(container).closest('.wc-ppcp-paylater-msg__container').show();\n    }\n\n    hideMessage(container) {\n        $(container).closest('.wc-ppcp-paylater-msg__container').hide();\n    }\n\n    getMessageContainer() {\n\n    }\n\n    getStyleOptions(context) {\n        return getSetting('payLaterMessage')?.[context]?.style;\n    }\n\n    getSetting(key) {\n        return getSetting('payLaterMessage')?.[key];\n    }\n\n    getTotal() {\n        return 0;\n    }\n\n    getPlacement() {\n        return '';\n    }\n\n    getCurrency() {\n        return this.queryParams?.currency;\n    }\n\n    isActive() {\n        return getSetting('payLaterMessage').enabled;\n    }\n\n    onRender(container) {\n        const show = () => {\n            const iframe = container.querySelector('[name^=\"__zoid__paypal_message\"]');\n            if (iframe) {\n                iframe.style.width = '100%';\n                iframe.style.opacity = '1';\n            }\n        }\n        show();\n        setTimeout(show, 1000);\n    }\n}\n\nexport default PayLaterBaseMessage;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n  try {\n    var info = gen[key](arg);\n    var value = info.value;\n  } catch (error) {\n    reject(error);\n    return;\n  }\n\n  if (info.done) {\n    resolve(value);\n  } else {\n    Promise.resolve(value).then(_next, _throw);\n  }\n}\n\nexport default function _asyncToGenerator(fn) {\n  return function () {\n    var self = this,\n        args = arguments;\n    return new Promise(function (resolve, reject) {\n      var gen = fn.apply(self, args);\n\n      function _next(value) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n      }\n\n      function _throw(err) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n      }\n\n      _next(undefined);\n    });\n  };\n}","import $ from 'jquery';\nimport PayLaterBaseMessage from \"./base\";\nimport cart from '@ppcp/cart';\nimport {loadPayPalSdk, getPayPalQueryParams} from \"@ppcp/utils\";\n\nclass PayLaterMessageCart extends PayLaterBaseMessage {\n    constructor(paypal, cart, props) {\n        super('cart', props);\n        this.paypal = paypal;\n        this.cart = cart;\n        this.initialize();\n    }\n\n    initialize() {\n        super.initialize();\n        this.cart.on('cartUpdated', this.refreshMessage.bind(this));\n    }\n\n    async refreshMessage() {\n        this.createMessage();\n    }\n\n    getTotal() {\n        return this.cart.getTotal();\n    }\n\n    getMessageContainer() {\n        const location = this.getSetting('cartLocation');\n        let el = document.getElementById('wc-ppcp-paylater-msg-cart');\n        if (el && this.getSetting('isShortcode')) {\n            return el;\n        }\n        switch (location) {\n            case 'shop_table':\n                el = document.getElementById('wc-ppcp-paylater-msg-cart');\n                break;\n            case 'above_button':\n                el = document.getElementById('wc-ppcp-cart-button-container');\n                if (el) {\n                    if (!$(el).find('#wc-ppcp-paylater-msg-cart')?.length) {\n                        $(el).prepend('<div id=\"wc-ppcp-paylater-msg-cart\"></div>');\n                    }\n                    el = document.getElementById('wc-ppcp-paylater-msg-cart');\n                }\n        }\n        return el;\n    }\n\n    getPlacement() {\n        return 'cart';\n    }\n}\n\nconst queryParams = getPayPalQueryParams();\n\nloadPayPalSdk(queryParams).then(paypal => {\n    new PayLaterMessageCart(paypal, cart, {queryParams});\n}).catch(error => {\n});\n\nexport {PayLaterMessageCart}","import $ from 'jquery';\nimport PayLaterBaseMessage from \"./base\";\nimport {getSetting, getPayPalQueryParams, loadPayPalSdk} from \"@ppcp/utils\";\nimport cart from '@ppcp/cart';\n\nclass PayLaterMessageCheckout extends PayLaterBaseMessage {\n    constructor(paypal, cart, props) {\n        super('checkout', props);\n        this.paypal = paypal;\n        this.cart = cart;\n        this.initialize();\n    }\n\n    initialize() {\n        this.cart.on('updatedCheckout', this.createMessage.bind(this), 20);\n        super.initialize();\n    }\n\n    getMessageContainer() {\n        const fk = this.getSetting('checkoutLocation');\n        let el;\n        switch (fk) {\n            case 'shop_table':\n                el = document.getElementById('wc-ppcp-paylater-msg-checkout');\n                break;\n            case 'above_button':\n                el = document.querySelector('.wc-ppcp-checkout-container');\n                if (el) {\n                    $(el).prepend('<div id=\"wc-ppcp-paylater-msg-checkout\"></div>');\n                    el = document.getElementById('wc-ppcp-paylater-msg-checkout');\n                } else {\n                    setTimeout(this.createMessage.bind(this), 500);\n                }\n        }\n        return el;\n    }\n\n    getPlacement() {\n        return 'payment';\n    }\n\n    getTotal() {\n        return this.cart.getTotal();\n    }\n}\n\nlet params = null;\nconst paypalGatewayData = getSetting('ppcp_data');\n\nif (paypalGatewayData && paypalGatewayData.placeOrderEnabled) {\n    params = getPayPalQueryParams();\n}\n\nloadPayPalSdk(params).then(paypal => {\n    new PayLaterMessageCheckout(paypal, cart, {queryParams: getPayPalQueryParams()});\n})\n\nexport default PayLaterMessageCheckout;\n\nexport {PayLaterMessageCheckout}\n","import $ from 'jquery';\nimport PayLaterBaseMessage from \"./base\";\nimport cart from '@ppcp/cart';\nimport {loadPayPalSdk, getPayPalQueryParams} from \"@ppcp/utils\";\n\nclass PayLaterMessageMiniCart extends PayLaterBaseMessage {\n\n    constructor(paypal, cart, props) {\n        super('minicart', props);\n        this.paypal = paypal;\n        this.cart = cart;\n        this.initialize();\n    }\n\n    initialize() {\n        super.initialize();\n        this.cart.on('fragmentsChanged', this.createMessage.bind(this));\n    }\n\n    getMessageContainer() {\n        let el = null;\n        $('#wc-ppcp-minicart-msg').remove();\n        switch (this.getSetting('miniCartLocation')) {\n            case 'cart_total':\n                el = document.querySelector('.woocommerce-mini-cart__total');\n                $(el).after('<p class=\"wc-ppcp-minicart-msg__container\"><span id=\"wc-ppcp-minicart-msg\"></span></p>');\n                break;\n            case 'checkout':\n                el = document.querySelector('.woocommerce-mini-cart__buttons .checkout');\n                $(el).after('<span id=\"wc-ppcp-minicart-msg\"></span>');\n                break;\n\n        }\n        if (el) {\n            return document.getElementById('wc-ppcp-minicart-msg');\n        }\n        return document.querySelector('.woocommerce-mini-cart__total');\n    }\n\n    showContainer(container) {\n        $(container).show();\n    }\n\n    hideMessage(container) {\n        $(container).hide();\n    }\n\n    getTotal() {\n        return this.cart.getTotal();\n    }\n\n    getPlacement() {\n        return 'cart';\n    }\n}\n\nconst queryParams = getPayPalQueryParams();\n\nloadPayPalSdk(queryParams).then(paypal => {\n    new PayLaterMessageMiniCart(paypal, cart, {queryParams});\n}).catch(error => {\n});","import $ from 'jquery';\nimport PayLaterBaseMessage from \"./base\";\nimport Product from '@ppcp/product';\nimport {loadPayPalSdk, getPayPalQueryParams} from \"@ppcp/utils\";\n\nclass PayLaterMessageProduct extends PayLaterBaseMessage {\n\n    constructor(paypal, product, props) {\n        super('product', props);\n        this.paypal = paypal;\n        this.product = product;\n        this.initialize();\n    }\n\n    initialize() {\n        this.product.on('quantityChange', this.onQuantityChange.bind(this));\n        this.product.on('foundVariation', this.onFoundVariation.bind(this));\n        this.product.on('resetVariation', this.onResetVariation.bind(this));\n        super.initialize();\n    }\n\n    onQuantityChange(qty) {\n        this.createMessage();\n    }\n\n    onFoundVariation(changed) {\n        this.createMessage();\n    }\n\n    onResetVariation(product) {\n        this.createMessage();\n    }\n\n    getMessageContainer() {\n        const el = document.getElementById('wc-ppcp-paylater-msg-product');\n        if (!el) {\n            $('form.checkout .shop_table').after('<div id=\"wc-ppcp-paylater-msg-product\"></div>');\n        }\n        return document.getElementById('wc-ppcp-paylater-msg-product');\n    }\n\n    getTotal() {\n        return this.product.getTotal();\n    }\n\n    getPlacement() {\n        return 'product';\n    }\n}\n\nconst queryParams = getPayPalQueryParams();\nloadPayPalSdk(queryParams).then(paypal => {\n    new PayLaterMessageProduct(paypal, new Product(), {queryParams});\n}).catch(error => {\n\n})\n\nexport default PayLaterMessageProduct;\nexport {PayLaterMessageProduct};","import $ from 'jquery';\nimport {loadPayPalSdk, getPayPalQueryParams, getSetting} from \"@ppcp/utils\";\nimport PayLaterBaseMessage from \"./base\";\n\n\nclass PayLaterMessageShop extends PayLaterBaseMessage {\n\n    constructor() {\n        super('shop', {queryParams: getPayPalQueryParams()});\n        this.data = getSetting('payLaterMessage');\n        this.initialize();\n    }\n\n    initialize() {\n        loadPayPalSdk(getPayPalQueryParams());\n    }\n\n    getValidProductTypes() {\n        return this.data.shop.product_types;\n    }\n\n    isSupportedProduct(type) {\n        return this.getValidProductTypes().includes(type);\n    }\n\n    createMessage() {\n        for (const product of this.data.shop.products) {\n            if (this.isSupportedProduct(product.product_type)) {\n                this.currentProduct = product;\n                super.createMessage();\n            }\n        }\n    }\n\n    getMessageContainer() {\n        const el = document.getElementById(`wc-ppcp-paylater-msg-${this.currentProduct.id}`);\n        if (!el) {\n            if (this.isBelowPrice()) {\n                $(`.post-${this.currentProduct.id} .price`).after(`<div class=\"wc-ppcp-paylater-msg-shop-container\" id=\"wc-ppcp-paylater-msg-${this.currentProduct.id}\"></div>`);\n            } else {\n                $(`.post-${this.currentProduct.id} a.button`).after(`<div class=\"wc-ppcp-paylater-msg-shop-container\" id=\"wc-ppcp-paylater-msg-${this.currentProduct.id}\"></div>`);\n            }\n        }\n        return document.getElementById(`wc-ppcp-paylater-msg-${this.currentProduct.id}`);\n    }\n\n    getTotal() {\n        return this.currentProduct.total;\n    }\n\n    getPlacement() {\n        return 'category';\n    }\n\n    isBelowPrice() {\n        return this.data.shop.msgLocation === 'below_price';\n    }\n\n    showContainer(container) {\n        $(container).show();\n    }\n\n    hideMessage(container) {\n        $(container).hide();\n    }\n\n}\n\nnew PayLaterMessageShop();\n\n","import $ from 'jquery';\nimport apiFetch from \"@wordpress/api-fetch\";\nimport {defaultHooks} from \"@wordpress/hooks\";\nimport {\n    loadPayPalSdk,\n    getFieldValue,\n    isValidAddress,\n    extractShippingMethod,\n    getRestRoute,\n    getRestPath,\n    convertPayPalAddressToCart,\n    fieldsToJson,\n    extractFullName,\n    getSetting,\n    setFieldValue,\n    isValid,\n    isValidFieldValue,\n    getPayPalQueryParams,\n    getErrorMessage\n} from \"@ppcp/utils\";\nimport {isEmpty} from \"lodash\";\n\nclass BaseGateway {\n\n    constructor({id, context, container = null}) {\n        this.id = id;\n        this.buttons = {};\n        this.actions = {};\n        this.context = context;\n        this.settings = getSetting(`${id}_data`);\n        this.container = container ? container : `li.payment_method_${id}`;\n        this.order_field_key = `${this.id}_paypal_order_id`;\n        this.billing_token_key = `${this.id}_billing_token`;\n    }\n\n    initialize() {\n        //load the paypal script\n        this.loadPayPalScript().then(() => {\n            // setup required events;\n            this.initializeEvents();\n            // render the button\n            this.createButton();\n        });\n    }\n\n    initializeEvents() {\n\n    }\n\n    isActive() {\n        return this.getData() !== null;\n    }\n\n    /**\n     * Loads the PayPal JS SDK\n     */\n    loadPayPalScript() {\n        return new Promise((resolve, reject) => {\n            loadPayPalSdk(this.getPayPalSDKArgs()).then(paypal => {\n                this.paypal = paypal;\n                resolve();\n            }).catch(error => {\n                console.log(error);\n                if (error?.code) {\n                    this.submitError(getErrorMessage(error));\n                }\n                reject();\n            })\n        })\n    }\n\n    /**\n     * Returns params used to laod the PayPal SDK\n     * @returns {{}}\n     */\n    getPayPalSDKArgs() {\n        return getPayPalQueryParams();\n    }\n\n    getClientId() {\n        let {clientId = null, environment} = getSetting('generalData');\n        if (!clientId && environment == 'sandbox') {\n            clientId = 'sb';\n        }\n        return clientId;\n    }\n\n    getData() {\n        let data = $(`${this.container}`).find('.wc-ppcp-payment-method-data').data('payment-method-data');\n        if (!data) {\n            return null;\n        }\n        return data;\n    }\n\n    setData(data) {\n        $(`${this.container}`).find('.wc-ppcp-payment-method-data').data('payment-method-data', data);\n    }\n\n    setOption(key, value) {\n        const data = this.getData();\n        if (data) {\n            data[key] = value;\n            this.setData(data);\n        }\n    }\n\n    setVariable(key, value) {\n        const data = getSetting(`${this.id}_data`);\n        data[key] = value;\n    }\n\n    getVariable(key, defaultValue = null) {\n        const data = getSetting(`${this.id}_data`);\n        if (data.hasOwnProperty(key)) {\n            return data[key];\n        }\n        if (defaultValue) {\n            this.setVariable(key, defaultValue);\n        }\n        return defaultValue;\n    }\n\n    /**\n     * Fetches an option from the payment method data object.\n     * @param key\n     * @param defaultValue\n     * @returns {null|*}\n     */\n    getOption(key, defaultValue = null) {\n        const data = this.getData();\n        if (data.hasOwnProperty(key)) {\n            return data[key];\n        } else {\n            if (defaultValue) {\n                this.setOption(key, defaultValue);\n            }\n        }\n        return defaultValue;\n    }\n\n    createButton() {\n        const container = this.getButtonContainer();\n        if (container && !$(container).find('.paypal-buttons').length) {\n            this.getSortedFunding(this.getFunding()).forEach(source => {\n                const button = this.paypal.Buttons(this.getButtonOptions(source));\n                this.buttons[source] = button;\n                if (button.isEligible()) {\n                    if (container instanceof NodeList) {\n                        for (const node of container) {\n                            button.render(node);\n                        }\n                    } else {\n                        button.render(container);\n                    }\n                }\n            });\n            this.$button = $(container);\n            defaultHooks.doAction('wcPPCPButtonCreated', this);\n        }\n    }\n\n    getButton() {\n        return this.$button;\n    }\n\n    destroyButtons() {\n        Object.keys(this.buttons).forEach(key => {\n            if (this.buttons[key]['close']) {\n                this.buttons[key].close();\n            }\n        })\n    }\n\n    disableButtons() {\n        Object.keys(this.actions).forEach(key => {\n            this.actions[key].disable();\n        });\n    }\n\n    enableButtons() {\n        Object.keys(this.actions).forEach(key => {\n            this.actions[key].enable();\n        });\n    }\n\n    getFunding() {\n        const funding = [];\n        const settings = this.settings?.funding || [];\n        if (this.settings?.paypal_sections?.includes(this.getPage())) {\n            funding.push(paypal.FUNDING.PAYPAL);\n        }\n        if (settings.includes('paylater') && this.settings?.paylater_sections?.includes(this.getPage())) {\n            if (this.isCheckoutFlow()) {\n                funding.push(paypal.FUNDING.PAYLATER);\n            }\n        }\n        if (settings.includes('card') && this.settings?.credit_card_sections?.includes(this.getPage())) {\n            funding.push(paypal.FUNDING.CARD);\n        }\n        return funding;\n    }\n\n    isFundingActive(type) {\n        return this.settings?.funding?.includes(type);\n    }\n\n    isSectionEnabled(type, section) {\n        const key = `${type}_sections`;\n        return this.settings?.[key]?.includes(section);\n    }\n\n    getSortedFunding(funding) {\n        const sortOrder = this.settings.buttons_order || [];\n        funding.sort((a, b) => {\n            const indexA = sortOrder.indexOf(a);\n            const indexB = sortOrder.indexOf(b);\n            return indexA < indexB ? -1 : 1;\n        });\n        return funding;\n    }\n\n    getButtonContainer() {\n        return null;\n    }\n\n    getButtonOptions(source) {\n        const options = {\n            fundingSource: source,\n            style: this.getButtonStyle(source),\n            onInit: (...args) => {\n                this.onInit(source, ...args);\n                $(document.body).triggerHandler('wc_ppcp_on_init', [this, source]);\n            },\n            onClick: (...args) => {\n                this.onClick(...args);\n                $(document.body).triggerHandler('wc_ppcp_on_click', [this, source]);\n            },\n            onApprove: (data, actions) => {\n                this.onApprove(data, actions);\n                $(document.body).triggerHandler('wc_ppcp_on_approve', [this, source]);\n            },\n            onCancel: (data) => {\n                this.orderId = data.orderID;\n                $(document.body).triggerHandler('wc_ppcp_on_cancel', [this, source, data]);\n            },\n            onError: (error) => {\n                if (this.currentError) {\n                    this.submitError(this.currentError);\n                    this.currentError = null;\n                } else {\n                    this.submitError(error);\n                }\n                $(document.body).triggerHandler('wc_ppcp_on_error', [this, source, error]);\n            },\n            onDestroy: () => {\n                $(document.body).triggerHandler('wc_ppcp_on_destroy', [this, source]);\n            }\n        };\n        if (this.isCheckoutFlow()) {\n            options.createOrder = (data, actions) => {\n                return this.createOrder(data, actions);\n            }\n            if (this.needsShipping() && source !== paypal.FUNDING.VENMO) {\n                options.onShippingChange = (...args) => {\n                    return this.onShippingChange(...args);\n                }\n            }\n        } else {\n            options.createBillingAgreement = (...args) => {\n                return this.createBillingAgreement(...args);\n            }\n        }\n        return options;\n    }\n\n    needsShipping() {\n        return this.getOption('needsShipping', false);\n    }\n\n    isCheckoutFlow() {\n        return getPayPalQueryParams()?.vault !== 'true';\n    }\n\n    getTotal() {\n        return this.getOption('total', 0);\n    }\n\n    getButtonStyle(source) {\n        let style = null;\n        switch (source) {\n            case paypal.FUNDING.PAYPAL:\n                style = this.settings?.buttons?.paypal;\n                break;\n            case paypal.FUNDING.PAYLATER:\n                style = this.settings?.buttons?.paylater;\n                break;\n            case paypal.FUNDING.CARD:\n                style = {...this.settings?.buttons?.card};\n                if (style.tagline) {\n                    delete style.tagline;\n                    style.layout = 'vertical';\n                } else {\n                    style.layout = 'horizontal';\n                }\n                break;\n            case paypal.FUNDING.VENMO:\n                const {color = '', label = '', ...venmoStyle} = this.settings?.buttons?.paypal;\n                style = venmoStyle;\n                break;\n        }\n        if (style?.height) {\n            style.height = parseInt(style.height);\n        }\n        return style;\n    }\n\n    onApprove(data, actions) {\n        setFieldValue(this.order_field_key, data.orderID, '');\n        if (data.billingToken) {\n            setFieldValue(this.billing_token_key, data.billingToken, '');\n            return this.fetchBillingToken(data.billingToken).then(response => {\n                this.handleBillingToken(response, data);\n            }).catch(error => {\n                return this.submitError(error?.message);\n            });\n        } else {\n            actions.order.get().then((res) => {\n                this.handleOnApproveResponse(data, res);\n            }).catch(error => this.submitError(error));\n        }\n    }\n\n    handleOnApproveResponse(data, response) {\n        this.populateCheckoutFields(response);\n        this.processCartCheckout();\n    }\n\n    fetchBillingToken(token) {\n        return apiFetch({\n            method: 'GET',\n            path: `/wc-ppcp/v1/billing-agreement/token/${token}`\n        });\n    }\n\n    handleBillingToken(token, data) {\n        if (!isEmpty(token.payer_info.billing_address)) {\n            this.populateBillingAddressFields(convertPayPalAddressToCart(token.payer_info.billing_address));\n        }\n        if (token?.payer_info?.first_name) {\n            if (!isValid('billing_first_name')) {\n                setFieldValue('first_name', token.payer_info.first_name, 'billing');\n            }\n        }\n        if (token?.payer_info?.last_name) {\n            if (!isValid('billing_last_name')) {\n                setFieldValue('last_name', token.payer_info.last_name, 'billing');\n            }\n        }\n        if (token?.payer_info?.email) {\n            if (!isValid('billing_email')) {\n                setFieldValue('billing_email', token.payer_info.email);\n            }\n        }\n        if (token?.payer_info?.phone) {\n            if (!isValid('billing_phone')) {\n                setFieldValue('billing_phone', token.payer_info.phone);\n            }\n        }\n        if (this.needsShipping() && token.shipping_address) {\n            if (!isEmpty(token.shipping_address)) {\n                let address = convertPayPalAddressToCart(token.shipping_address);\n                this.populateNameFields(extractFullName(token.shipping_address.recipient_name), 'shipping');\n                this.populateShippingAddressFields(address);\n                if (!isValidAddress(this.getCartFullAddress('billing'), ['phone', 'email'])) {\n                    if (!isValidFieldValue(getFieldValue('billing_first_name')) && !isValidFieldValue(getFieldValue('billing_last_name'))) {\n                        this.populateNameFields(token.shipping_address.recipient_name, 'billing');\n                    }\n                    this.populateBillingAddressFields(address);\n                }\n            }\n        }\n    }\n\n    createOrder(data, actions) {\n        return actions.order.create(args);\n    }\n\n    createBillingAgreement(data, actions, extraData = null) {\n        return apiFetch({\n            method: 'POST',\n            url: getRestPath('/wc-ppcp/v1/billing-agreement/token'),\n            data: {\n                payment_method: this.id,\n                context: this.getPage(),\n                ...extraData\n            }\n        }).then(token => {\n            return token;\n        }).catch(error => {\n            this.currentError = error;\n        })\n    }\n\n    onShippingChange(data, actions, extraData = {}) {\n        const address = convertPayPalAddressToCart(data?.shipping_address || {}, true);\n        const shipping_method = extractShippingMethod(data?.selected_shipping_option?.id || '');\n        return apiFetch({\n            method: 'POST',\n            url: getRestRoute('cart/shipping'),\n            data: {\n                order_id: data.orderID,\n                address,\n                shipping_method,\n                payment_method: this.id,\n                ...extraData\n            }\n        }).then(response => {\n            if (response.code) {\n                return actions.reject();\n            } else {\n                return actions.resolve();\n            }\n        }).catch(error => {\n            return actions.reject();\n        })\n    }\n\n    submitError(error) {\n\n    }\n\n    getShippingPrefix() {\n        return 'shipping';\n    }\n\n    getCartAddress(type) {\n        return {\n            address_1: getFieldValue('address_1', type),\n            address_2: getFieldValue('address_2', type),\n            state: getFieldValue('state', type),\n            city: getFieldValue('city', type),\n            postcode: getFieldValue('postcode', type),\n            country: getFieldValue('country', type)\n        }\n    }\n\n    getCartFullAddress(type) {\n        return {\n            first_name: getFieldValue('first_name', type),\n            last_name: getFieldValue('last_name', type),\n            address_1: getFieldValue('address_1', type),\n            address_2: getFieldValue('address_2', type),\n            state: getFieldValue('state', type),\n            city: getFieldValue('city', type),\n            postcode: getFieldValue('postcode', type),\n            country: getFieldValue('country', type)\n        }\n    }\n\n    onInit(source, data, actions) {\n        this.actions[source] = actions;\n    }\n\n    onClick(data, actions) {\n\n    }\n\n    isPage(page) {\n        return this.getPage() === page;\n    }\n\n    getPage() {\n        let page = getSetting('generalData')?.page;\n        if (page == 'cart' && $(document.body).is('.woocommerce-checkout')) {\n            page = 'checkout';\n        }\n        return page;\n    }\n\n    populateShippingAddressFields(address) {\n        for (let key in address) {\n            setFieldValue(key, address[key], 'shipping');\n        }\n    }\n\n    populateBillingAddressFields(address) {\n        for (let key in address) {\n            setFieldValue(key, address[key], 'billing');\n        }\n    }\n\n    populateNameFields(name, prefix = '') {\n        let first_name, last_name;\n        if (Array.isArray(name)) {\n            [first_name, last_name] = name;\n        } else {\n            ({given_name: first_name, surname: last_name} = name);\n        }\n        setFieldValue('first_name', first_name, prefix);\n        setFieldValue('last_name', last_name, prefix);\n    }\n\n    populateCheckoutFields(response) {\n        if (!isEmpty(response?.payer?.address)) {\n            let address = convertPayPalAddressToCart(response.payer.address);\n            this.populateBillingAddressFields(address);\n        }\n        if (response?.payer?.name) {\n            this.populateNameFields(response.payer.name, 'billing');\n        }\n        if (response?.payer?.email_address) {\n            setFieldValue('billing_email', response.payer.email_address);\n        }\n        if (response?.payer?.phone?.phone_number?.national_number) {\n            setFieldValue('billing_phone', response.payer.phone.phone_number.national_number);\n            setFieldValue('shipping_phone', response.payer.phone.phone_number.national_number);\n        }\n        if (this.needsShipping() && response?.purchase_units?.[0]?.shipping) {\n            const address = convertPayPalAddressToCart(response.purchase_units[0].shipping.address)\n            this.populateShippingAddressFields(address);\n            if (response.purchase_units[0].shipping?.name?.full_name) {\n                const name = extractFullName(response.purchase_units[0].shipping.name.full_name);\n                this.populateNameFields(name, 'shipping');\n            }\n            // add billing address if possible\n            if (!isValidAddress(this.getCartFullAddress('billing'), ['phone', 'email'])) {\n                this.populateBillingAddressFields(address);\n            }\n        }\n    }\n\n    processCartCheckout() {\n        this.showProcessing();\n        return apiFetch({\n            method: 'POST',\n            url: getRestRoute('cart/checkout'),\n            data: this.getCartCheckoutData()\n        }).then(response => {\n            if (response.result && 'success' == response.result) {\n                window.location = response.redirect;\n            } else {\n                if (response.messages) {\n                    return this.submitError(response.messages);\n                }\n            }\n        }).catch(error => {\n            if (error.code) {\n                this.submitError(error.message);\n            }\n        });\n    }\n\n    getCartCheckoutData() {\n        return {payment_method: this.id, context: this.getPage(), ...fieldsToJson()};\n    }\n\n    getProcessingSelector() {\n        return 'body';\n    }\n\n    showProcessing() {\n        $(this.getProcessingSelector())?.block({\n            message: this.getProcessingMessage(),\n            overlayCSS: {\n                background: '#fff',\n                opacity: 0.6\n            }\n        });\n    }\n\n    hideProcessing() {\n        $(this.getProcessingSelector())?.unblock();\n    }\n\n    getProcessingMessage() {\n        return `<div class=\"wc-ppcp-loader\">\n                        <div></div>\n                        <div></div>\n                        <div></div>\n                      </div>`;\n    }\n\n    getFullName(prefix) {\n        const names = [\n            getFieldValue('first_name', prefix),\n            getFieldValue('last_name', prefix)\n        ].filter(Boolean);\n        if (names.length == 0) {\n            return null;\n        } else if (names.length == 1) {\n            return names[0];\n        }\n        return `${names[0]} ${names[1]}`\n    }\n}\n\nexport {BaseGateway};\nexport default BaseGateway;","import $ from 'jquery';\nimport BaseGateway from './class-base-gateway';\nimport {\n    getFieldValue,\n    submitErrorMessage,\n    setFieldValue,\n    convertPayPalAddressToCart,\n    extractFullName,\n    isValidAddress,\n    isValid,\n    extractShippingMethod,\n    getPage\n} from \"@ppcp/utils\";\nimport {isEmpty, isEqual} from 'lodash';\n\nclass CheckoutGateway extends BaseGateway {\n\n    constructor(cart, props) {\n        super(props);\n        this.cart = cart;\n        this.initialize();\n    }\n\n\n    initialize() {\n        super.initialize();\n        this.setVariable('readyToCheckout', false);\n        this.actions = {};\n        this.cart.on('updatedCheckout', this.updatedCheckout.bind(this));\n        $(document.body).on('payment_method_selected', this.paymentMethodSelected.bind(this));\n        $(document.body).on(`checkout_place_order_${this.id}`, this.validateCheckoutFields.bind(this));\n        $(document.body).on('click', '.wc-ppcp-cancel__payment', this.cancelPayment.bind(this));\n        $(document.body).on('change', '[name=\"terms\"]', this.handleTermsClick.bind(this));\n        $(document.body).on('change', '[type=\"checkbox\"]', this.handleCheckboxChange.bind(this));\n        window.addEventListener('hashchange', this.handleHashError.bind(this));\n        this.handleOrderPay();\n    }\n\n    needsShipping() {\n        return getPage() !== 'order_pay' && this.cart.needsShipping();\n    }\n\n    getFunding() {\n        const funding = super.getFunding();\n        if (this.isFundingActive('venmo') && this.isSectionEnabled('venmo', 'checkout')) {\n            funding.push(paypal.FUNDING.VENMO);\n        }\n        return funding;\n    }\n\n    updatedCheckout() {\n        super.initialize();\n        this.paymentMethodSelected();\n        if (this.isOrderReview()) {\n            this.displayPaymentReadyMessage();\n        } else if (this.isReadyToCheckout()) {\n            this.displayPaymentReadyMessage();\n        }\n    }\n\n    /**\n     * Method that is called when a payment method is selected\n     */\n    paymentMethodSelected() {\n        if (this.isPaymentGatewaySelected() && !this.isReadyToCheckout()) {\n            this.displayPaymentButton();\n        } else {\n            this.hidePaymentButton();\n        }\n    }\n\n    handleHashError(e) {\n        var match = e.newURL.match(/ppcp_error=(.*)/);\n        if (match) {\n            const {1: error} = match;\n            if (error == 'true') {\n                this.displayPaymentButton();\n                history.pushState({}, '', window.location.pathname + window.location.search);\n            }\n        }\n    }\n\n    isOrderReview() {\n        let match = window?.location?.search?.match(/_ppcp_order_review=(.*)/);\n        return match?.length > 0;\n    }\n\n    handleOrderPay() {\n        if (this.isOrderReview()) {\n            try {\n                let match = window?.location?.search?.match(/_ppcp_order_review=(.*)/);\n                const {1: obj} = match;\n                const {payment_method, paypal_order, fields} = JSON.parse(atob(decodeURIComponent(obj)));\n                setFieldValue(this.order_field_key, paypal_order, '');\n                if (!isEmpty(fields)) {\n                    for (let key in fields) {\n                        setFieldValue(key, fields[key], '');\n                    }\n                }\n                this.setVariable('readyToCheckout', true);\n                this.hidePaymentButton();\n                if (this.needsShipping() && $('[name=\"ship_to_different_address\"]')?.length) {\n                    const bool = !isEqual(this.getCartAddress('billing'), this.getCartAddress('shipping'))\n                    $('[name=\"ship_to_different_address\"]').prop('checked', bool).trigger('change');\n                }\n            } catch (error) {\n                console.log(error);\n            }\n        }\n    }\n\n    createOrder(data, actions) {\n        if (this.isPage('checkout')) {\n            const formData = {...this.convertFormToData(), context: this.getPaymentType()};\n            return this.cart.createOrder(formData);\n        } else {\n            return this.cart.doOrderPay(this.id);\n        }\n    }\n\n    createBillingAgreement(data, actions, extraData = null) {\n        if (this.isPage('checkout')) {\n            extraData = {...this.convertFormToData(), context: this.getPaymentType()};\n        }\n        return super.createBillingAgreement(data, actions, extraData);\n    }\n\n    createButton() {\n        super.createButton();\n        this.paymentMethodSelected();\n    }\n\n    displayPaymentButton() {\n        this.getButton()?.show();\n        this.hidePlaceOrderButton();\n    }\n\n    hidePaymentButton() {\n        this.getButton()?.hide();\n        this.displayPlaceOrderButton();\n    }\n\n    displayPlaceOrderButton() {\n        this.getPlaceOrderButton()?.removeClass('wc-ppcp-hide-button');\n    }\n\n    hidePlaceOrderButton() {\n        this.getPlaceOrderButton()?.addClass('wc-ppcp-hide-button');\n    }\n\n    getPlaceOrderButton() {\n        let $button = $('#place_order');\n        if (!$button.length) {\n            $button = $('[name=\"woocommerce_checkout_place_order\"]');\n        }\n        if (!$button.length) {\n            $button = $('form.checkout button[type=\"submit\"]');\n        }\n        if (!$button.length) {\n            $button = $('form[id=\"order_review\"] button[type=\"submit\"]');\n        }\n        return $button;\n    }\n\n    getButtonPlacement() {\n        return this.settings?.buttonPlacement || 'place_order';\n    }\n\n    isPlaceOrderPlacement() {\n        return this.getButtonPlacement() == 'place_order';\n    }\n\n    getButtonContainer() {\n        let $parent = null;\n        switch (this.getButtonPlacement()) {\n            case 'place_order':\n                let $checkoutContainer = $('.wc-ppcp-checkout-container');\n                if (!$checkoutContainer.length) {\n                    this.getPlaceOrderButton().after('<div class=\"wc-ppcp-checkout-container\"></div>');\n                }\n                break;\n            case 'payment_method':\n                $parent = $(`div.payment_method_${this.id}`);\n                $('.wc-ppcp-payment-method__container').append('<div class=\"wc-ppcp-checkout-container\"></div>');\n                break;\n        }\n        // add container to parent;\n        return document.querySelector('.wc-ppcp-checkout-container');\n    }\n\n    isPaymentGatewaySelected() {\n        return $('[name=\"payment_method\"]:checked')?.val() === this.id;\n    }\n\n    submitError(error) {\n        if (error?.code === 'validation_errors') {\n            return submitErrorMessage(error.data.messages, this.getForm(), 'checkout');\n        }\n        return submitErrorMessage(error, this.getForm(), 'checkout');\n    }\n\n    getShippingPrefix() {\n        if ($('[name=\"ship_to_different_address\"]')?.length) {\n            if ($('[name=\"ship_to_different_address\"]').is(':checked')) {\n                return 'shipping';\n            }\n        }\n        return 'billing';\n    }\n\n    handleOnApproveResponse(data, response) {\n        this.populateCheckoutFields(response);\n        this.processCheckout(data, response);\n    }\n\n    processCheckout(data, response) {\n        this.hidePaymentButton();\n        this.setVariable('readyToCheckout', true);\n        if (this.update_required) {\n            $(document.body).one('updated_checkout', () => {\n                if (data.billingToken && this.needsShipping()) {\n                    // show message that they can click place order\n                    this.displayPaymentReadyMessage();\n                } else {\n                    this.submitCheckoutForm(response);\n                }\n            });\n            $('[name=\"billing_country\"],[name=\"billing_state\"]').trigger('change');\n            if (this.shipToDifferentAddressChecked()) {\n                $('[name=\"shipping_country\"],[name=\"shipping_state\"]').trigger('change');\n            }\n            $(document.body).trigger('update_checkout', {update_shipping_method: false});\n        } else {\n            this.submitCheckoutForm(response);\n        }\n    }\n\n    handleBillingToken(token, data) {\n        this.update_required = this.isCheckoutReviewRequired(token);\n        super.handleBillingToken(token);\n        this.maybeShipToDifferentAddress();\n        this.processCheckout(data);\n    }\n\n    isCheckoutReviewRequired(token) {\n        if (this.needsShipping() && !this.isPayPalAddressDisabled()) {\n            // if the address changed, then an update is required\n            if (!isEmpty(token.shipping_address)) {\n                if (!isEqual(\n                    {\n                        city: token.shipping_address.city,\n                        state: token.shipping_address.state,\n                        postal_code: token.shipping_address.postal_code,\n                        country_code: token.shipping_address.country_code\n                    },\n                    {\n                        city: getFieldValue('shipping_city'),\n                        state: getFieldValue('shipping_state'),\n                        postal_code: getFieldValue('shipping_postcode'),\n                        country_code: getFieldValue('shipping_country')\n                    }\n                )) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n\n    populateCheckoutFields(response) {\n        if (!isEmpty(response?.payer?.address)) {\n            let address = convertPayPalAddressToCart(response.payer.address);\n            if (isValidAddress(address, ['first_name', 'last_name']) && !isEqual(this.getCartAddress('billing'), address)) {\n                this.populateBillingAddressFields(address);\n            }\n        }\n        if (response?.payer?.name) {\n            if (!isValid('billing_first_name')) {\n                this.populateNameFields(response.payer.name, 'billing');\n            }\n        }\n        // only overwrite billing email if the field is blank\n        if (response?.payer?.email_address && !isValid('billing_email')) {\n            setFieldValue('billing_email', response.payer.email_address);\n        }\n        if (response?.payer?.phone?.phone_number?.national_number) {\n            setFieldValue('billing_phone', response.payer.phone.phone_number.national_number);\n            if (this.needsShipping()) {\n                setFieldValue('shipping_phone', response.payer.phone.phone_number.national_number);\n            }\n        }\n        // update the shipping address if one is included\n        if (this.needsShipping()) {\n            if (!isEmpty(response?.purchase_units?.[0]?.shipping?.address)) {\n                let address = convertPayPalAddressToCart(response.purchase_units[0].shipping.address);\n                let name = '';\n                if (!isEqual(this.cartAddress, address)) {\n                    this.update_required = true;\n                    this.cartAddress = address;\n                    this.populateShippingAddressFields(address);\n                    $(document.body).one('updated_checkout', () => this.populateShippingAddressFields(address));\n                }\n                if (response.purchase_units[0].shipping?.name?.full_name) {\n                    name = extractFullName(response.purchase_units[0].shipping.name.full_name);\n                    this.populateNameFields(name, 'shipping');\n                }\n                // add billing address if possible\n                if (!isValidAddress(this.getCartFullAddress('billing'), ['phone', 'email'])) {\n                    if (name && !isValid('billing_first_name') && !isValid('billing_last_name')) {\n                        this.populateNameFields(name, 'billing');\n                    }\n                    this.populateBillingAddressFields(address);\n                }\n            }\n            this.maybeShipToDifferentAddress();\n        }\n    }\n\n    maybeShipToDifferentAddress() {\n        // compare billing and shipping address. If not equal, then select ship to different address\n        if ($('[name=\"ship_to_different_address\"]')?.length) {\n            const bool = !isEqual({\n                ...this.getCartAddress('billing'),\n                name: this.getFullName('billing')\n            }, {...this.getCartAddress('shipping'), name: this.getFullName('shipping')})\n            $('[name=\"ship_to_different_address\"]').prop('checked', bool).trigger('change');\n        }\n    }\n\n    getForm() {\n        if (this.isPage('checkout')) {\n            return $(this.container).closest('form.checkout');\n        } else {\n            return $(this.container).closest('form');\n        }\n    }\n\n    validateTerms() {\n        if ($('[name=\"terms\"]').length) {\n            return $('[name=\"terms\"]').is(':checked');\n        }\n        return true;\n    }\n\n    validateCheckoutFields() {\n        if (!this.validateTerms()) {\n            this.submitError({code: 'terms'});\n            return false;\n        }\n        return true;\n    }\n\n    handleTermsClick() {\n        if (this.isPlaceOrderPlacement()) {\n            if ($('[name=\"terms\"]').length) {\n                const checked = $('[name=\"terms\"]').is(':checked');\n                if (checked) {\n                    this.enableButtons();\n                } else {\n                    this.disableButtons();\n                }\n            }\n        }\n    }\n\n    handleCheckboxChange() {\n        setTimeout(this.handleTermsClick.bind(this), 250);\n    }\n\n    onInit(source, data, actions) {\n        super.onInit(source, data, actions);\n        this.handleTermsClick();\n    }\n\n    onClick(data, actions) {\n        if (this.isPlaceOrderPlacement() && !this.validateTerms()) {\n            this.submitError({code: 'terms'});\n        }\n    }\n\n    onShippingChange(data, actions) {\n        let shippingMethod;\n        if (data?.selected_shipping_option?.id) {\n            shippingMethod = extractShippingMethod(data.selected_shipping_option.id);\n            for (let index of Object.keys(shippingMethod)) {\n                const method = shippingMethod[index];\n                const el = $(`[name=\"shipping_method[${index}]\"][value=\"${method}\"]`);\n                if (el.length) {\n                    el.prop('checked', true);\n                }\n            }\n        }\n        this.cart.trigger('checkout_on_shipping_change', data, shippingMethod, this);\n        return super.onShippingChange(data, actions, this.convertFormToData());\n    }\n\n    shipToDifferentAddressChecked() {\n        if ($('[name=\"ship_to_different_address\"]')?.length) {\n            return $('[name=\"ship_to_different_address\"]').is(':checked');\n        }\n        return false;\n    }\n\n    displayPaymentReadyMessage() {\n        $('.wc-ppcp-popup__container').hide();\n        $('.wc-ppcp-order-review-message__container').show();\n        const txt = $('.wc-ppcp-order-review__message').text().replace('%s', $('#place_order').text());\n        $('.wc-ppcp-order-review__message').text(txt);\n    }\n\n    hidePaymentReadyMessage() {\n        $('.wc-ppcp-popup__container').show();\n        $('.wc-ppcp-order-review-message__container').hide();\n    }\n\n    /**\n     * Cancels an existing payment method\n     */\n    cancelPayment(e) {\n        e.preventDefault();\n        this.setVariable('readyToCheckout', false);\n        this.hidePaymentReadyMessage();\n        this.displayPaymentButton();\n    }\n\n    getProcessingSelector() {\n        return this.container;\n    }\n\n    getProcessingMessage() {\n        return null;\n    }\n\n    fetchBillingToken(token) {\n        this.showProcessing();\n        return super.fetchBillingToken(token).then(response => {\n            this.hideProcessing();\n            return response;\n        });\n    }\n\n    isReadyToCheckout() {\n        return this.getVariable('readyToCheckout', false);\n    }\n\n    convertFormToData() {\n        return $('form.checkout').serializeArray().reduce((prev, current) => ({...prev, [current.name]: current.value}), {});\n    }\n\n    submitCheckoutForm(order) {\n        if (this.cart.applyFilters('checkout_submit_form', true, order, this)) {\n            this.getForm().submit();\n        }\n    }\n\n    getPaymentType() {\n        return 'checkout';\n    }\n\n    isPayPalAddressDisabled() {\n        return this.settings.paypalAddressDisabled;\n    }\n}\n\nexport {\n    CheckoutGateway\n}","import $ from 'jquery';\nimport BaseGateway from \"./class-base-gateway\";\nimport {\n    submitErrorMessage\n} from \"@ppcp/utils\";\n\nclass CartGateway extends BaseGateway {\n\n    constructor(cart, props) {\n        super(props);\n        this.cart = cart;\n        this.initialize();\n    }\n\n    initialize() {\n        this.cart.on('cartUpdated', this.onCartUpdated.bind(this));\n        $(window).on('resize', this.doCartHtml.bind(this));\n        super.initialize();\n        this.doCartHtml();\n    }\n\n    onInit(...params) {\n        super.onInit(...params);\n        this.cart.trigger('cartButtonOnInit');\n    }\n\n    needsShipping() {\n        return this.cart.needsShipping();\n    }\n\n    getButtonContainer() {\n        return document.getElementById('wc-ppcp-cart-button-container');\n    }\n\n    onCartUpdated() {\n        super.initialize();\n        this.doCartHtml();\n    }\n\n    submitError(error) {\n        this.hideProcessing();\n        submitErrorMessage(error, 'div.woocommerce-notices-wrapper', 'checkout');\n    }\n\n    handleBillingToken(response) {\n        super.handleBillingToken(response);\n        this.processCartCheckout();\n    }\n\n    createOrder(data, actions) {\n        return this.cart.createOrder({payment_method: this.id}).catch(error => {\n            this.currentError = error;\n            return error;\n        });\n    }\n\n    doCartHtml() {\n        const $button = $('.checkout-button');\n        const width = $button.outerWidth();\n        if (width && $('.wc-ppcp-cart-payments__container').length) {\n            $('.wc-ppcp-cart-payments__container').width(width);\n        }\n        if ($button.css('float') !== 'none') {\n            $('.wc-ppcp-cart-payments__container ').css('float', $button.css('float'));\n        }\n    }\n}\n\nexport {CartGateway};","import $ from 'jquery';\nimport {submitErrorMessage} from \"@ppcp/utils\";\nimport BaseGateway from \"./class-base-gateway\";\n\nclass ProductGateway extends BaseGateway {\n\n    constructor(product, cart, props) {\n        super(props);\n        this.product = product;\n        this.cart = cart;\n        this.initialize();\n    }\n\n    initialize() {\n        this.product.on('foundVariation', this.onFoundVariation.bind(this));\n        this.product.on('resetVariation', this.onResetVariation.bind(this));\n        this.setMaxWidth();\n        super.initialize();\n    }\n\n    onInit(...params) {\n        super.onInit(...params);\n        this.cart.trigger('productButtonOnInit');\n        if (this.product.isVariableProduct() && !this.product.isVariationSelected()) {\n            this.disableButtons();\n        }\n    }\n\n    setOptions(options) {\n        for (let key in options) {\n            this.setOption(key, options[key]);\n        }\n    }\n\n    needsShipping() {\n        return this.product.needsShipping();\n    }\n\n    getButtonContainer() {\n        const container = document.querySelectorAll('.wc-ppcp-product-button-container');\n        if (container && container.length > 0) {\n            return container;\n        }\n        return document.getElementById('wc-ppcp-product-button-container');\n    }\n\n    setMaxWidth() {\n        if (this.settings?.product?.button_width == 'add_to_cart') {\n            this.buttonWidth = $('form.cart div.quantity').outerWidth(true) + $('.single_add_to_cart_button').outerWidth();\n            var marginLeft = $('.single_add_to_cart_button').css('marginLeft');\n            if (marginLeft) {\n                this.buttonWidth += parseInt(marginLeft.replace('px', ''));\n            }\n            $(this.container).css('max-width', this.buttonWidth + 'px');\n        }\n    }\n\n    submitError(error) {\n        this.hideProcessing();\n        submitErrorMessage(error, 'div.woocommerce-notices-wrapper');\n    }\n\n    getFunding() {\n        const funding = [];\n        const settings = this.settings?.funding || [];\n        if (settings.includes('paypal')) {\n            funding.push(paypal.FUNDING.PAYPAL);\n        }\n        if (settings.includes('paylater')) {\n            funding.push(paypal.FUNDING.PAYLATER);\n        }\n        if (settings.includes('card')) {\n            funding.push(paypal.FUNDING.CARD);\n        }\n        return this.getSortedFunding(funding);\n    }\n\n    addToCart() {\n        return this.cart.addToCart({\n            payment_method: this.id,\n            product_id: this.product.getId(),\n            variation_id: this.product.getVariationId(),\n            qty: this.product.getQuantity(),\n            variation: this.product.getVariationData()\n        }).then(response => {\n            if (response.code) {\n                this.currentError = response;\n            }\n            return response;\n        }).catch(err => {\n            this.currentError = err;\n            return this.submitError(err);\n        })\n    }\n\n    createOrder(data, actions) {\n        return this.addToCart();\n    }\n\n    createBillingAgreement(data, actions) {\n        return this.addToCart().then(() => {\n            return super.createBillingAgreement(data, actions);\n        });\n    }\n\n    handleBillingToken(response) {\n        super.handleBillingToken(response);\n        this.processCartCheckout();\n    }\n\n    onFoundVariation(hasChanged, product) {\n        if (this.hasChanged) {\n            this.destroyButtons();\n            this.createButton();\n        } else {\n            this.enableButtons();\n        }\n    }\n\n    onResetVariation() {\n        this.disableButtons();\n    }\n\n    enableButtons() {\n        this?.$button?.removeClass('disabled');\n        super.enableButtons();\n    }\n\n    disableButtons() {\n        this?.$button?.addClass('disabled');\n        super.disableButtons();\n    }\n}\n\nexport {ProductGateway};","import $ from 'jquery';\nimport BaseGateway from \"./class-base-gateway\";\n\nclass MiniCartGateway extends BaseGateway {\n\n    constructor(cart, props) {\n        super(props);\n        this.cart = cart;\n        this.retryCount = 0;\n        this.initialize();\n    }\n\n    initialize() {\n        this.cart.on('fragmentsChanged', super.initialize.bind(this));\n        $(document.body).on('wc_ppcp_on_destroy', this.createButton.bind(this));\n        super.initialize();\n    }\n\n    needsShipping() {\n        return this.cart.needsShipping();\n    }\n\n    createButton() {\n        const container = this.getButtonContainer();\n        if (!container && this.retryCount < 10) {\n            this.retryCount += 1;\n            return setTimeout(this.createButton.bind(this), 500);\n        }\n        super.createButton();\n    }\n\n    getButtonContainer() {\n        const el = document.querySelectorAll(`.wc-ppcp-minicart-${this.id}`);\n        if (el && el.length > 0) {\n            return el;\n        }\n        $('.woocommerce-mini-cart__buttons').append(`<a id=\"wc-ppcp-minicart-${this.id}\"></a>`);\n        return document.getElementById(`wc-ppcp-minicart-${this.id}`);\n    }\n\n    getPage() {\n        return 'minicart';\n    }\n\n    handleBillingToken(response) {\n        super.handleBillingToken(response);\n        this.processCartCheckout();\n    }\n\n    createOrder(data, actions) {\n        return this.cart.createOrder({payment_method: this.id}).then(orderId => {\n            return orderId;\n        });\n    }\n}\n\nexport {MiniCartGateway}","import {CartGateway} from '../payments/classes';\nimport cart from '@ppcp/cart';\n\nnew CartGateway(cart, {id: 'ppcp', context: 'cart'});\n","import {CheckoutGateway} from '../payments/classes';\nimport cart from '@ppcp/cart';\nimport {isPluginConnected} from '@ppcp/utils';\n\nif (isPluginConnected()) {\n    new CheckoutGateway(cart, {id: 'ppcp', context: 'checkout'});\n}","import {CheckoutGateway, BaseGateway} from '../payments/classes';\nimport $ from 'jquery';\nimport cart from '@ppcp/cart';\n\nclass PayPalExpressCheckoutGateway extends CheckoutGateway {\n\n    updatedCheckout() {\n        BaseGateway.prototype.initialize.apply(this, arguments);\n        this.paymentMethodSelected();\n    }\n\n    paymentMethodSelected() {\n\n    }\n\n    hidePaymentButton() {\n        this.displayPlaceOrderButton();\n        this.displayPaymentReadyMessage();\n        const container = super.getButtonContainer();\n        if (container) {\n            $(container).hide();\n        }\n    }\n\n    getButtonContainer() {\n        if (this.settings?.expressElement) {\n            const container = document.querySelector(this.settings.expressElement);\n            if (container) {\n                return container;\n            }\n        }\n        return document.getElementById('wc-ppcp-express-button');\n    }\n\n    onInit(source, data, actions) {\n        this.cart.trigger('expressCheckoutButtonOnInit');\n    }\n\n    onClick(data, actions) {\n        $('[name=\"terms\"]').prop('checked', true).trigger('change');\n        $(`[name=\"payment_method\"][value=\"${this.id}\"]`).prop(\"checked\", true).trigger('click');\n    }\n\n    getFunding() {\n        const funding = [];\n        if (this.isFundingActive('paypal') && this.isSectionEnabled('paypal', 'express_checkout')) {\n            funding.push(paypal.FUNDING.PAYPAL);\n        }\n        if (this.isFundingActive('paylater') && this.isSectionEnabled('paylater', 'express_checkout')) {\n            funding.push(paypal.FUNDING.PAYLATER);\n        }\n        if (this.isFundingActive('venmo') && this.isSectionEnabled('venmo', 'express_checkout')) {\n            funding.push(paypal.FUNDING.VENMO);\n        }\n        if (this.isFundingActive('card') && this.isSectionEnabled('credit_card', 'express_checkout')) {\n            funding.push(paypal.FUNDING.CARD);\n        }\n        return funding;\n    }\n\n    createButton() {\n        super.createButton();\n        this.$button?.show();\n        this.addExpressClasses();\n    }\n\n    addExpressClasses() {\n        if (this.$button) {\n            const count = Object.keys(this.buttons).length;\n            this.$button.addClass(`button-count_${count}`);\n        }\n    }\n\n    getPaymentType() {\n        return 'express';\n    }\n\n    isCheckoutReviewRequired(token) {\n        return true;\n    }\n}\n\nnew PayPalExpressCheckoutGateway(cart, {id: 'ppcp', context: 'checkout'});","import {MiniCartGateway} from \"../payments/classes\";\nimport cart from '@ppcp/cart';\n\nclass PaypalMinicart extends MiniCartGateway {\n\n}\n\nnew PaypalMinicart(cart, {id: 'ppcp', context: 'cart'});","import {ProductGateway} from \"../payments/classes\";\nimport Product from '@ppcp/product';\nimport cart from '@ppcp/cart';\n\nnew ProductGateway(new Product(), cart, {id: 'ppcp', context: 'product'});","export default function _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) {\n    arr2[i] = arr[i];\n  }\n\n  return arr2;\n}","export default function _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}","export default function _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}","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\nexport default function _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}","export default 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}","import getPrototypeOf from \"./getPrototypeOf.js\";\nexport default function _superPropBase(object, property) {\n  while (!Object.prototype.hasOwnProperty.call(object, property)) {\n    object = getPrototypeOf(object);\n    if (object === null) break;\n  }\n\n  return object;\n}","import superPropBase from \"./superPropBase.js\";\nexport default function _get() {\n  if (typeof Reflect !== \"undefined\" && Reflect.get) {\n    _get = Reflect.get.bind();\n  } else {\n    _get = function _get(target, property, receiver) {\n      var base = superPropBase(target, property);\n      if (!base) return;\n      var desc = Object.getOwnPropertyDescriptor(base, property);\n\n      if (desc.get) {\n        return desc.get.call(arguments.length < 3 ? target : receiver);\n      }\n\n      return desc.value;\n    };\n  }\n\n  return _get.apply(this, arguments);\n}","export default function _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  Object.defineProperty(subClass, \"prototype\", {\n    writable: false\n  });\n  if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _iterableToArrayLimit(arr, i) {\n  var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n  if (_i == null) return;\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n\n  var _s, _e;\n\n  try {\n    for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n\n  return _arr;\n}","export default function _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n  var target = objectWithoutPropertiesLoose(source, excluded);\n  var key, i;\n\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n\n  return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}","export default function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, _typeof(obj);\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  } else if (call !== void 0) {\n    throw new TypeError(\"Derived constructors may only return object or undefined\");\n  }\n\n  return assertThisInitialized(self);\n}","export default 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}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}"],"names":["PayLaterBaseMessage","context","queryParams","this","defaultHooks","paypalInstanceCreated","bind","paypal","createMessage","vault","container","getMessageContainer","isCheckoutFlow","isActive","showContainer","params","amount","getTotal","currency","getCurrency","placement","getPlacement","style","getStyleOptions","onRender","Messages","render","hideMessage","$","closest","show","hide","getSetting","key","enabled","iframe","querySelector","width","opacity","setTimeout","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","value","error","done","Promise","then","PayLaterMessageCart","fn","cart","props","initialize","on","refreshMessage","self","args","arguments","apply","err","undefined","location","el","document","getElementById","find","length","prepend","getPayPalQueryParams","loadPayPalSdk","catch","PayLaterMessageCheckout","paypalGatewayData","placeOrderEnabled","PayLaterMessageMiniCart","remove","after","PayLaterMessageProduct","product","onQuantityChange","onFoundVariation","onResetVariation","qty","changed","Product","PayLaterMessageShop","data","shop","product_types","type","getValidProductTypes","includes","products","isSupportedProduct","product_type","currentProduct","id","isBelowPrice","total","msgLocation","BaseGateway","buttons","actions","settings","order_field_key","billing_token_key","loadPayPalScript","initializeEvents","createButton","getData","getPayPalSDKArgs","console","log","code","submitError","getErrorMessage","clientId","environment","setData","defaultValue","hasOwnProperty","setVariable","setOption","getButtonContainer","getSortedFunding","getFunding","forEach","source","button","Buttons","getButtonOptions","isEligible","NodeList","node","$button","Object","keys","close","disable","enable","funding","paypal_sections","getPage","push","FUNDING","PAYPAL","paylater_sections","PAYLATER","credit_card_sections","CARD","section","sortOrder","buttons_order","sort","a","b","indexOf","options","fundingSource","getButtonStyle","onInit","body","triggerHandler","onClick","onApprove","onCancel","orderId","orderID","onError","currentError","onDestroy","createOrder","needsShipping","VENMO","onShippingChange","createBillingAgreement","getOption","paylater","card","tagline","layout","color","label","height","parseInt","setFieldValue","billingToken","fetchBillingToken","response","handleBillingToken","message","order","get","res","handleOnApproveResponse","populateCheckoutFields","processCartCheckout","token","apiFetch","method","path","isEmpty","payer_info","billing_address","populateBillingAddressFields","convertPayPalAddressToCart","first_name","isValid","last_name","email","phone","shipping_address","address","populateNameFields","extractFullName","recipient_name","populateShippingAddressFields","isValidAddress","getCartFullAddress","isValidFieldValue","getFieldValue","create","extraData","url","getRestPath","payment_method","shipping_method","extractShippingMethod","selected_shipping_option","getRestRoute","order_id","address_1","address_2","state","city","postcode","country","page","is","name","prefix","Array","isArray","given_name","surname","payer","email_address","phone_number","national_number","purchase_units","shipping","full_name","showProcessing","getCartCheckoutData","result","window","redirect","messages","fieldsToJson","getProcessingSelector","block","getProcessingMessage","overlayCSS","background","unblock","names","filter","Boolean","CheckoutGateway","updatedCheckout","paymentMethodSelected","validateCheckoutFields","cancelPayment","handleTermsClick","handleCheckboxChange","addEventListener","handleHashError","handleOrderPay","isFundingActive","isSectionEnabled","isOrderReview","isReadyToCheckout","displayPaymentReadyMessage","isPaymentGatewaySelected","displayPaymentButton","hidePaymentButton","e","match","newURL","history","pushState","pathname","search","obj","JSON","parse","atob","decodeURIComponent","paypal_order","fields","bool","isEqual","getCartAddress","prop","trigger","isPage","formData","convertFormToData","getPaymentType","doOrderPay","getButton","hidePlaceOrderButton","displayPlaceOrderButton","getPlaceOrderButton","removeClass","addClass","buttonPlacement","getButtonPlacement","append","val","submitErrorMessage","getForm","processCheckout","update_required","one","submitCheckoutForm","shipToDifferentAddressChecked","update_shipping_method","isCheckoutReviewRequired","maybeShipToDifferentAddress","isPayPalAddressDisabled","postal_code","country_code","cartAddress","getFullName","validateTerms","isPlaceOrderPlacement","enableButtons","disableButtons","shippingMethod","index","txt","text","replace","preventDefault","hidePaymentReadyMessage","hideProcessing","getVariable","serializeArray","reduce","prev","current","applyFilters","submit","paypalAddressDisabled","CartGateway","onCartUpdated","doCartHtml","outerWidth","css","ProductGateway","setMaxWidth","isVariableProduct","isVariationSelected","querySelectorAll","button_width","buttonWidth","marginLeft","addToCart","product_id","getId","variation_id","getVariationId","getQuantity","variation","getVariationData","hasChanged","destroyButtons","MiniCartGateway","retryCount","isPluginConnected","PayPalExpressCheckoutGateway","expressElement","addExpressClasses","count","PaypalMinicart","_arrayLikeToArray","arr","len","i","arr2","_arrayWithHoles","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","descriptor","enumerable","configurable","writable","defineProperty","_createClass","protoProps","staticProps","prototype","_defineProperty","_superPropBase","object","property","call","getPrototypeOf","_get","Reflect","receiver","base","desc","getOwnPropertyDescriptor","_getPrototypeOf","o","setPrototypeOf","__proto__","_setPrototypeOf","p","_inherits","subClass","superClass","constructor","_iterableToArrayLimit","_i","Symbol","iterator","_s","_e","_arr","_n","_d","next","_nonIterableRest","_objectWithoutProperties","excluded","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_objectWithoutPropertiesLoose","sourceKeys","_typeof","_possibleConstructorReturn","ReferenceError","_slicedToArray","_unsupportedIterableToArray","minLen","n","toString","slice","from","test"],"sourceRoot":""}