PageSourceSearch

https://muaythaiontario.org/wp-content/plugins/pymntpl-paypal-wooc…/build/js/cart.js?ver=dde3eb0ae4824cca0723

js muaythaiontario.org collected 2026-10-04 05:24:10 UTC 15,130 bytes, 3 lines download raw bytes

vendor: 4,121 bytes, lines 1-2
1/*! For license information please see cart.js.LICENSE.txt */
2(()=>{"use strict";var t={n:e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{default:()=>P});const r=window.jQuery;var n=t.n(r);const o=window.wcPPCP.utils,i=window.wp.apiFetch;var a=t.n(i);const c=window.wp.hooks;function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p(){p=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function d(){}function y(){}var v={};c(v,o,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(_([])));w&&w!==e&&r.call(w,o)&&(v=w);var m=y.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==s(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function O(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=f(r,t.iterator,e.arg);
vendor: 6,365 bytes, line 2
2if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=y,c(m,"constructor",y),c(y,"constructor",d),d.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(P.prototype),c(P.prototype,i,(function(){return this})),t.AsyncIterator=P,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new P(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function d(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function y(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){d(i,n,o,a,c,"next",t)}function c(t){d(i,n,o,a,c,"throw",t)}a(void 0)}))}}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}function w(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}const P=new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}(k,t);var e,r,i,c,u,s,f,h,d,P,O=(d=k,P=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=b(d);if(P){var r=b(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return w(this,t)});function k(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,k),(t=O.call(this)).data=(0,o.getSetting)("cart"),t.page=(0,o.getSetting)("generalData").page,t.processing=!1,n()(document.body).on("updated_wc_div",t.onCartUpdated.bind(m(t))),n()(document.body).on("updated_cart_totals",t.onCartUpdated.bind(m(t))),n()(document.body).on("updated_checkout",t.onUpdatedCheckout.bind(m(t))),n()(document.body).on("wc_fragments_refreshed wc_fragments_loaded",t.onCartFragmentsC
2hanged.bind(m(t))),t}return e=k,r=[{key:"onCartUpdated",value:(h=y(p().mark((function t(e){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!window.wcPPCPCartData){t.next=5;break}return t.next=3,this.refreshData(window.wcPPCPCartData);case 3:t.next=7;break;case 5:return t.next=7,this.refreshData(null);case 7:(0,o.setSetting)("queryParams",this.data.queryParams),this.trigger("cartUpdated",this);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"onUpdatedCheckout",value:(f=y(p().mark((function t(e){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.refreshData(window.wcPPCPCartData?window.wcPPCPCartData:null);case 2:(0,o.setSetting)("queryParams",this.data.queryParams),this.trigger("updatedCheckout",this);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)})},{key:"onCartFragmentsChanged",value:function(){var t=this;setTimeout((function(){window.wcPPCPMiniCartUpdate&&(t.data=l(l({},t.data),wcPPCPMiniCartUpdate)),t.trigger("fragmentsChanged",t)}),250)}},{key:"getData",value:function(){return(0,o.getSetting)("cart")}},{key:"needsShipping",value:function(){var t;return null===(t=this.data)||void 0===t?void 0:t.needsShipping}},{key:"isEmpty",value:function(){var t;return null===(t=this.data)||void 0===t?void 0:t.isEmpty}},{key:"refreshData",value:(s=y(p().mark((function t(){var e,r,n=arguments;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=n.length>0&&void 0!==n[0]?n[0]:null)){t.next=5;break}this.data=l(l({},this.data),e),t.next=21;break;case 5:if(this.processing){t.next=21;break}return t.prev=6,this.processing=!0,t.next=10,a()({method:"POST",url:(0,o.getRestRoute)("cart/refresh"),data:{page:this.page}});case 10:r=t.sent,this.data=l(l({},this.data),r.cart),this.data.queryParams=r.queryParams,t.next=18;break;case 15:t.prev=15,t.t0=t.catch(6),console.log(t.t0);case 18:return t.prev=18,this.processing=!1,t.finish(18);case 21:case"end":return t.stop()}}),t,this,[[6,15,18,21]])}))),function(){return s.apply(this,arguments)})},{key:"addToCart",value:(u=y(p().mark((function t(e){var r=this;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",a()({method:"POST",url:(0,o.getRestRoute)("cart/item"),data:this.applyFilters("addToCartData",e,this)}).then((function(t){return r.sanitizeResponse(t)}
2)).catch((function(t){throw t})));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"createOrder",value:(c=y(p().mark((function t(e){var r=this;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",a()({method:"POST",url:(0,o.getRestRoute)("cart/order"),data:e}).then((function(t){return r.sanitizeResponse(t)})));case 1:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)})},{key:"doOrderPay",value:(i=y(p().mark((function t(e){var r,n,i=this,c=arguments;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=c.length>1&&void 0!==c[1]?c[1]:{},n=(0,o.getSetting)("order"),t.abrupt("return",a()({method:"POST",url:(0,o.getRestRoute)("order/pay"),data:l(l({payment_method:e},r),n)}).then((function(t){return i.sanitizeResponse(t)})));case 3:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"getTotal",value:function(){var t;return null===(t=this.data)||void 0===t?void 0:t.total}},{key:"sanitizeResponse",value:function(t){return"string"==typeof t?t=t.replace(/<[^>]*>/g,""):Array.isArray(t)&&(t=this.sanitizeResponse(t[0])),t}}],r&&v(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),k}(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.hooks=(0,c.createHooks)()}var e,r;return e=t,r=[{key:"on",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;this.hooks.addAction(t,"wcPPCP",e,r)}},{key:"trigger",value:function(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(e=this.hooks).doAction.apply(e,[t].concat(n))}},{key:"addFilter",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;this.hooks.addFilter(t,"wcPPCP",e,r)}},{key:"applyFilters",value:function(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return(e=this.hooks).applyFilters.apply(e,[t].concat(n))}}],r&&u(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()));(this.wcPPCP=this.wcPPCP||{}).cart=e})();
3//# sourceMappingURL=cart.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.