/*! For license information please see vendors.js.LICENSE.txt */
"use strict";(self.webpackChunkwoo_payment_gateway=self.webpackChunkwoo_payment_gateway||[]).push([[216],{345:function(t,e,r){function n(t,e){void 0===e&&(e={});var r=document.createElement("script");return r.src=t,Object.keys(e).forEach((function(t){r.setAttribute(t,e[t]),"data-csp-nonce"===t&&r.setAttribute("nonce",e["data-csp-nonce"])})),r}function o(t,e){if(void 0===e&&(e=Promise),i(t,e),"undefined"==typeof document)return e.resolve(null);var r=function(t){var e="https://www.paypal.com/sdk/js";t.sdkBaseUrl&&(e=t.sdkBaseUrl,delete t.sdkBaseUrl);var r,n,o=t,a=Object.keys(o).filter((function(t){return void 0!==o[t]&&null!==o[t]&&""!==o[t]})).reduce((function(t,e){var r,n=o[e].toString();return r=function(t,e){return(e?"-":"")+t.toLowerCase()},"data"===(e=e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,r)).substring(0,4)||"crossorigin"===e?t.attributes[e]=n:t.queryParams[e]=n,t}),{queryParams:{},attributes:{}}),u=a.queryParams,i=a.attributes;return u["merchant-id"]&&-1!==u["merchant-id"].indexOf(",")&&(i["data-merchant-id"]=u["merchant-id"],u["merchant-id"]="*"),{url:"".concat(e,"?").concat((r=u,n="",Object.keys(r).forEach((function(t){0!==n.length&&(n+="&"),n+=t+"="+r[t]})),n)),attributes:i}}(t),o=r.url,c=r.attributes,s=c["data-namespace"]||"paypal",d=u(s);return c["data-js-sdk-library"]||(c["data-js-sdk-library"]="paypal-js"),function(t,e){var r=document.querySelector('script[src="'.concat(t,'"]'));if(null===r)return null;var o=n(t,e),a=r.cloneNode();if(delete a.dataset.uidAuto,Object.keys(a.dataset).length!==Object.keys(o.dataset).length)return null;var u=!0;return Object.keys(a.dataset).forEach((function(t){a.dataset[t]!==o.dataset[t]&&(u=!1)})),u?r:null}(o,c)&&d?e.resolve(d):a({url:o,attributes:c},e).then((function(){var t=u(s);if(t)return t;throw new Error("The window.".concat(s," global variable is not available."))}))}function a(t,e){void 0===e&&(e=Promise),i(t,e);var r=t.url,o=t.attributes;if("string"!=typeof r||0===r.length)throw new Error("Invalid url.");if(void 0!==o&&"object"!=typeof o)throw new Error("Expected attributes to be an object.");return new e((function(t,e){if("undefined"==typeof document)return t();var a,u,i,c;a={url:r,attributes:o,onSuccess:function(){return t()},onError:function(){var t=new Error('The script "'.concat(r,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return e(t)}},u=a.onSuccess,i=a.onError,(c=n(a.url,a.attributes)).onerror=i,c.onload=u,document.head.insertBefore(c,document.head.firstElementChild)}))}function u(t){return window[t]}function i(t,e){if("object"!=typeof t||null===t)throw new Error("Expected an options object.");if(void 0!==e&&"function"!=typeof e)throw new Error("Expected PromisePonyfill to be a function.")}r.r(e),r.d(e,{loadCustomScript:function(){return a},loadScript:function(){return o},version:function(){return c}});var c="8.0.5"}}]);
//# sourceMappingURL=vendors.js.map