File "invoice-fee.min.js.map"

Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/swedbank-pay-checkout/assets/js/invoice-fee.min.js.map
File size: 4.22 KB
MIME-type: application/json
Charset: utf-8

{"version":3,"file":"invoice-fee.min.js","names":["jQuery","$","window","sb_invoice_fee","init","document","body","on","event","name","instrument","console","log","block","apply_fee","remove_fee","done","unblock","update_checkout","ajax","type","url","WC_Gateway_Swedbank_Pay_Checkout_Invoice","ajax_url","data","action","nonce","dataType","trigger","wc_sb_checkout","onUpdatedCheckout","message","overlayCSS","background","opacity","ready"],"sources":["invoice-fee.js"],"sourcesContent":["/* global wc_checkout_params */\njQuery(function ($) {\n    'use strict';\n\n    window.sb_invoice_fee = {\n        init: function () {\n            $(document.body).on('sb_payment_menu_instrument_selected', function (event, name, instrument) {\n                console.log(name);\n\n                sb_invoice_fee.block();\n\n                var xhr;\n                if (instrument === 'Invoice') {\n                    xhr = sb_invoice_fee.apply_fee( true );\n                } else {\n                    xhr = sb_invoice_fee.remove_fee( true );\n                }\n\n                xhr.done( function () {\n                    sb_invoice_fee.unblock();\n                } );\n            });\n        },\n\n        apply_fee: function ( update_checkout ) {\n            console.log('Apply invoice fee');\n\n            return $.ajax({\n                type: 'POST',\n                url: WC_Gateway_Swedbank_Pay_Checkout_Invoice.ajax_url,\n                data: {\n                    action: 'sb_invoice_apply_fee',\n                    nonce: WC_Gateway_Swedbank_Pay_Checkout_Invoice.nonce\n                },\n                dataType: 'json'\n            }).done(function () {\n                // Update checkout\n                if ( update_checkout ) {\n                    sb_invoice_fee.update_checkout();\n                }\n            });\n        },\n\n        remove_fee: function ( update_checkout ) {\n            console.log('Remove invoice fee');\n\n            return $.ajax({\n                type: 'POST',\n                url: WC_Gateway_Swedbank_Pay_Checkout_Invoice.ajax_url,\n                data: {\n                    action: 'sb_invoice_unset_fee',\n                    nonce: WC_Gateway_Swedbank_Pay_Checkout_Invoice.nonce\n                },\n                dataType: 'json'\n            }).done(function () {\n                // Update checkout\n                if ( update_checkout ) {\n                    sb_invoice_fee.update_checkout();\n                }\n            });\n        },\n\n        update_checkout: function () {\n            $(document.body).trigger('update_checkout');\n            wc_sb_checkout.onUpdatedCheckout();\n        },\n\n        block: function () {\n            let form_data = $(\"form.checkout, form#order_review, form#add_payment_method\").data();\n            if (1 !== form_data['blockUI.isBlocked']) {\n                $(\"form.checkout, form#order_review, form#add_payment_method\").block({\n                    message: null,\n                    overlayCSS: {\n                        background: '#fff',\n                        opacity: 0.6\n                    }\n                });\n            }\n        },\n\n        unblock: function () {\n            $(\"form.checkout, form#order_review, form#add_payment_method\").unblock();\n        },\n    };\n\n    $(document).ready(function () {\n        window.sb_invoice_fee.init();\n    });\n});\n\n"],"mappings":"AACAA,QAAO,SAAUC,GACb,aAEAC,OAAOC,eAAiB,CACpBC,KAAM,WACFH,EAAEI,SAASC,MAAMC,GAAG,uCAAuC,SAAUC,EAAOC,EAAMC,GAC9EC,QAAQC,IAAIH,GAEZN,eAAeU,SAGI,YAAfH,EACMP,eAAeW,WAAW,GAE1BX,eAAeY,YAAY,IAGjCC,MAAM,WACNb,eAAec,SACnB,GACJ,GACJ,EAEAH,UAAW,SAAWI,GAGlB,OAFAP,QAAQC,IAAI,qBAELX,EAAEkB,KAAK,CACVC,KAAM,OACNC,IAAKC,yCAAyCC,SAC9CC,KAAM,CACFC,OAAQ,uBACRC,MAAOJ,yCAAyCI,OAEpDC,SAAU,SACXX,MAAK,WAECE,GACDf,eAAee,iBAEvB,GACJ,EAEAH,WAAY,SAAWG,GAGnB,OAFAP,QAAQC,IAAI,sBAELX,EAAEkB,KAAK,CACVC,KAAM,OACNC,IAAKC,yCAAyCC,SAC9CC,KAAM,CACFC,OAAQ,uBACRC,MAAOJ,yCAAyCI,OAEpDC,SAAU,SACXX,MAAK,WAECE,GACDf,eAAee,iBAEvB,GACJ,EAEAA,gBAAiB,WACbjB,EAAEI,SAASC,MAAMsB,QAAQ,mBACzBC,eAAeC,mBACnB,EAEAjB,MAAO,WAEC,IADYZ,EAAE,6DAA6DuB,OAC3D,sBAChBvB,EAAE,6DAA6DY,MAAM,CACjEkB,QAAS,KACTC,WAAY,CACRC,WAAY,OACZC,QAAS,KAIzB,EAEAjB,QAAS,WACLhB,EAAE,6DAA6DgB,SACnE,GAGJhB,EAAEI,UAAU8B,OAAM,WACdjC,OAAOC,eAAeC,MAC1B,GACJ"}