MDL-69166 core_payment: show cost on the modal
[moodle.git] / payment / amd / build / modal_gateways.min.js
CommitLineData
11b2d9e9 1define ("core_payment/modal_gateways",["exports","jquery","core/custom_interaction_events","core/modal","core/modal_events","core_payment/events","core/modal_registry"],function(a,b,c,d,f,g,h){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=i(b);c=i(c);d=i(d);f=i(f);g=i(g);h=i(h);function i(a){return a&&a.__esModule?a:{default:a}}function j(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){j=function(a){return typeof a}}else{j=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return j(a)}function k(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function l(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function m(a,b,c){if(b)l(a.prototype,b);if(c)l(a,c);return a}function n(a,b,c){if("undefined"!=typeof Reflect&&Reflect.get){n=Reflect.get}else{n=function(a,b,c){var d=o(a,b);if(!d)return;var e=Object.getOwnPropertyDescriptor(d,b);if(e.get){return e.get.call(c)}return e.value}}return n(a,b,c||a)}function o(a,b){while(!Object.prototype.hasOwnProperty.call(a,b)){a=v(a);if(null===a)break}return a}function p(a,b){if("function"!=typeof b&&null!==b){throw new TypeError("Super expression must either be null or a function")}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}});if(b)q(a,b)}function q(a,b){q=Object.setPrototypeOf||function(a,b){a.__proto__=b;return a};return q(a,b)}function r(a){return function(){var b=v(a),c;if(u()){var d=v(this).constructor;c=Reflect.construct(b,arguments,d)}else{c=b.apply(this,arguments)}return s(this,c)}}function s(a,b){if(b&&("object"===j(b)||"function"==typeof b)){return b}return t(a)}function t(a){if(void 0===a){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return a}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return!0}catch(a){return!1}}function v(a){v=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)};return v(a)}var w=!1,x={PROCEED_BUTTON:"[data-action=\"proceed\"]",CANCEL_BUTTON:"[data-action=\"cancel\"]"},y=function(a){p(d,a);var e=r(d);function d(a){k(this,d);return e.call(this,a)}m(d,[{key:"registerEventListeners",value:function registerEventListeners(){var a=this;n(v(d.prototype),"registerEventListeners",this).call(this);this.getModal().on(c.default.events.activate,x.PROCEED_BUTTON,function(c,d){var e=b.default.Event(g.default.proceed);a.getRoot().trigger(e,a);if(!e.isDefaultPrevented()){a.hide();d.originalEvent.preventDefault()}});this.getModal().on(c.default.events.activate,x.CANCEL_BUTTON,function(c,d){var e=b.default.Event(f.default.cancel);a.getRoot().trigger(e,a);if(!e.isDefaultPrevented()){a.hide();d.originalEvent.preventDefault()}})}}]);return d}(d.default);a.default=y;y.TYPE="core_payment-modal_gateways";if(!w){h.default.register(y.TYPE,y,"core_payment/modal_gateways");w=!0}return a.default});
b23dcc37 2//# sourceMappingURL=modal_gateways.min.js.map