| Server IP : 146.59.209.152 / Your IP : 216.73.216.25 Web Server : Apache System : Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : monpetu ( 144298) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/monpetu/www/ipprint/wp-content/plugins/woocommerce-payments/dist/ |
Upload File : |
/*! For license information please see cart-block.js.LICENSE.txt */
(()=>{var e={2694(e,t,r){"use strict";var n=r(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,i){if(i!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},5556(e,t,r){e.exports=r(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1020(e,t,r){"use strict";var n=r(1609),o=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var n,s={},l=null,u=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,n)&&!c.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===s[n]&&(s[n]=t[n]);return{$$typeof:o,type:e,key:l,ref:u,props:s,_owner:i.current}}},4848(e,t,r){"use strict";e.exports=r(1020)},1609(e){"use strict";e.exports=window.React}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.p=window.wcpayAssets.url,(()=>{"use strict";const e=window.wp.plugins;var t=r(1609),n=r(5556);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var u=function(e,r,n){var o=!!n,a=t.useRef(n);t.useEffect(function(){a.current=n},[n]),t.useEffect(function(){if(!o||!e)return function(){};var t=function(){a.current&&a.current.apply(a,arguments)};return e.on(r,t),function(){e.off(r,t)}},[o,r,e,a])},p=function(e){var r=t.useRef(e);return t.useEffect(function(){r.current=e},[e]),r.current},h=function(e){return null!==e&&"object"===i(e)},d="[object Object]",f=function e(t,r){if(!h(t)||!h(r))return t===r;var n=Array.isArray(t);if(n!==Array.isArray(r))return!1;var o=Object.prototype.toString.call(t)===d;if(o!==(Object.prototype.toString.call(r)===d))return!1;if(!o&&!n)return t===r;var a=Object.keys(t),i=Object.keys(r);if(a.length!==i.length)return!1;for(var c={},s=0;s<a.length;s+=1)c[a[s]]=!0;for(var l=0;l<i.length;l+=1)c[i[l]]=!0;var u=Object.keys(c);if(u.length!==a.length)return!1;var p=t,f=r;return u.every(function(t){return e(p[t],f[t])})},m=function(e,t,r){return h(e)?Object.keys(e).reduce(function(n,o){var i=!h(t)||!f(e[o],t[o]);return r.includes(o)?(i&&console.warn("Unsupported prop change: options.".concat(o," is not a mutable property.")),n):i?a(a({},n||{}),{},c({},o,e[o])):n},null):null},b="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",g=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;if(null===e||h(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;throw new Error(r)},y=t.createContext(null);y.displayName="ElementsContext";var w=function(e){var r=e.stripe,n=e.options,o=e.children,a=t.useMemo(function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;if(function(e){return h(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(function(e){return g(e,t)})};var r=g(e,t);return null===r?{tag:"empty"}:{tag:"sync",stripe:r}}(r)},[r]),i=s(t.useState(function(){return{stripe:"sync"===a.tag?a.stripe:null,elements:"sync"===a.tag?a.stripe.elements(n):null}}),2),c=i[0],l=i[1];t.useEffect(function(){var e=!0,t=function(e){l(function(t){return t.stripe?t:{stripe:e,elements:e.elements(n)}})};return"async"!==a.tag||c.stripe?"sync"!==a.tag||c.stripe||t(a.stripe):a.stripePromise.then(function(r){r&&e&&t(r)}),function(){e=!1}},[a,c,n]);var u=p(r);t.useEffect(function(){null!==u&&u!==r&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[u,r]);var d=p(n);return t.useEffect(function(){if(c.elements){var e=m(n,d,["clientSecret","fonts"]);e&&c.elements.update(e)}},[n,d,c.elements]),t.useEffect(function(){var e;(e=c.stripe)&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"6.3.0"}),e.registerAppInfo({name:"react-stripe-js",version:"6.3.0",url:"https://stripe.com/docs/stripe-js/react"}))},[c.stripe]),t.createElement(y.Provider,{value:c},o)};w.propTypes={stripe:n.any,options:n.object},n.func.isRequired;var k=t.createContext(null);k.displayName="CheckoutContext";var _=function(e){var r=t.useContext(k),n=t.useContext(y);if(r){if(n)throw new Error("You cannot wrap the part of your app that ".concat(e," in both a checkout provider and <Elements> provider."));return r}return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(n,e)},v=["mode"],S=function(e,r,o){var a,i="".concat((a=e).charAt(0).toUpperCase()+a.slice(1),"Element"),c=r?function(e){_("mounts <".concat(i,">"));var r=e.id,n=e.className;return t.createElement("div",{id:r,className:n})}:function(r){var n,o=r.id,a=r.className,c=r.options,l=void 0===c?{}:c,h=r.onBlur,d=r.onFocus,f=r.onReady,b=r.onChange,g=r.onEscape,y=r.onClick,w=r.onLoadError,k=r.onLoaderStart,S=r.onNetworksChange,x=r.onConfirm,C=r.onCancel,T=r.onShippingAddressChange,A=r.onShippingRateChange,M=r.onSavedPaymentMethodRemove,I=r.onSavedPaymentMethodUpdate,E=_("mounts <".concat(i,">")),L="elements"in E?E.elements:null,R="checkoutState"in E?E.checkoutState:null,O="success"===(null==R?void 0:R.type)||"loading"===(null==R?void 0:R.type)?R.sdk:null,P=s(t.useState(null),2),j=P[0],F=P[1],q=t.useRef(null),N=t.useRef(null);u(j,"blur",h),u(j,"focus",d),u(j,"escape",g),u(j,"click",y),u(j,"loaderror",w),u(j,"loaderstart",k),u(j,"networkschange",S),u(j,"confirm",x),u(j,"cancel",C),u(j,"shippingaddresschange",T),u(j,"shippingratechange",A),u(j,"savedpaymentmethodremove",M),u(j,"savedpaymentmethodupdate",I),u(j,"change",b),f&&(n="expressCheckout"===e?f:function(){f(j)}),u(j,"ready",n),t.useLayoutEffect(function(){if(null===q.current&&null!==N.current&&(L||O)){var t=null;if(O){var r=O,n=O;switch(e){case"paymentForm":t=n.createForm(l);break;case"payment":t=r.createPaymentElement(l);break;case"address":if(!("mode"in l))throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");var o=l.mode,a=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(l,v);if("shipping"===o)t=r.createShippingAddressElement(a);else{if("billing"!==o)throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.");t=r.createBillingAddressElement(a)}break;case"expressCheckout":t=r.createExpressCheckoutElement(l);break;case"currencySelector":t=O.createCurrencySelectorElement();break;case"taxId":t=r.createTaxIdElement(l);break;case"contactDetails":t=r.createContactDetailsElement();break;default:throw new Error("<".concat(i,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}}else L&&(t=L.create(e,l));q.current=t,F(t),t&&t.mount(N.current)}},[L,O,l]);var H=p(l);return t.useEffect(function(){if(q.current){var e=m(l,H,["paymentRequest"]);e&&"update"in q.current&&q.current.update(e)}},[l,H]),t.useLayoutEffect(function(){return function(){if(q.current&&"function"==typeof q.current.destroy)try{q.current.destroy(),q.current=null}catch(e){}}},[]),t.createElement("div",{id:o,className:a,ref:N})};return c.propTypes={id:n.string,className:n.string,onChange:n.func,onBlur:n.func,onFocus:n.func,onReady:n.func,onEscape:n.func,onClick:n.func,onLoadError:n.func,onLoaderStart:n.func,onNetworksChange:n.func,onConfirm:n.func,onCancel:n.func,onShippingAddressChange:n.func,onShippingRateChange:n.func,onSavedPaymentMethodRemove:n.func,onSavedPaymentMethodUpdate:n.func,options:n.object},c.displayName=i,c.__elementType=e,c},x="undefined"==typeof window;t.createContext(null).displayName="EmbeddedCheckoutProviderContext",S("auBankAccount",x),S("card",x),S("cardNumber",x),S("cardExpiry",x),S("cardCvc",x),S("iban",x),S("payment",x),S("expressCheckout",x),S("paymentRequestButton",x),S("linkAuthentication",x),S("contactDetails",x),S("address",x),S("shippingAddress",x);var C=S("paymentMethodMessaging",x);S("taxId",x),S("issuingCardNumberDisplay",x),S("issuingCardCvcDisplay",x),S("issuingCardExpiryDisplay",x),S("issuingCardPinDisplay",x),S("issuingCardCopyButton",x);const T=window.wp.data,A=window.wc.blocksCheckout;function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}var I=/^\s+/,E=/\s+$/;function L(e,t){if(t=t||{},(e=e||"")instanceof L)return e;if(!(this instanceof L))return new L(e,t);var r=function(e){var t,r,n,o={r:0,g:0,b:0},a=1,i=null,c=null,s=null,l=!1,u=!1;return"string"==typeof e&&(e=function(e){e=e.replace(I,"").replace(E,"").toLowerCase();var t,r=!1;if(J[e])e=J[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=ce.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=ce.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=ce.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=ce.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=ce.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=ce.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=ce.hex8.exec(e))?{r:Q(t[1]),g:Q(t[2]),b:Q(t[3]),a:ne(t[4]),format:r?"name":"hex8"}:(t=ce.hex6.exec(e))?{r:Q(t[1]),g:Q(t[2]),b:Q(t[3]),format:r?"name":"hex"}:(t=ce.hex4.exec(e))?{r:Q(t[1]+""+t[1]),g:Q(t[2]+""+t[2]),b:Q(t[3]+""+t[3]),a:ne(t[4]+""+t[4]),format:r?"name":"hex8"}:!!(t=ce.hex3.exec(e))&&{r:Q(t[1]+""+t[1]),g:Q(t[2]+""+t[2]),b:Q(t[3]+""+t[3]),format:r?"name":"hex"}}(e)),"object"==M(e)&&(se(e.r)&&se(e.g)&&se(e.b)?(t=e.r,r=e.g,n=e.b,o={r:255*X(t,255),g:255*X(r,255),b:255*X(n,255)},l=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):se(e.h)&&se(e.s)&&se(e.v)?(i=te(e.s),c=te(e.v),o=function(e,t,r){e=6*X(e,360),t=X(t,100),r=X(r,100);var n=Math.floor(e),o=e-n,a=r*(1-t),i=r*(1-o*t),c=r*(1-(1-o)*t),s=n%6;return{r:255*[r,i,a,a,c,r][s],g:255*[c,r,r,i,a,a][s],b:255*[a,a,c,r,r,i][s]}}(e.h,i,c),l=!0,u="hsv"):se(e.h)&&se(e.s)&&se(e.l)&&(i=te(e.s),s=te(e.l),o=function(e,t,r){var n,o,a;function i(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=X(e,360),t=X(t,100),r=X(r,100),0===t)n=o=a=r;else{var c=r<.5?r*(1+t):r+t-r*t,s=2*r-c;n=i(s,c,e+1/3),o=i(s,c,e),a=i(s,c,e-1/3)}return{r:255*n,g:255*o,b:255*a}}(e.h,i,s),l=!0,u="hsl"),e.hasOwnProperty("a")&&(a=e.a)),a=G(a),{ok:l,format:e.format||u,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}function R(e,t,r){e=X(e,255),t=X(t,255),r=X(r,255);var n,o,a=Math.max(e,t,r),i=Math.min(e,t,r),c=(a+i)/2;if(a==i)n=o=0;else{var s=a-i;switch(o=c>.5?s/(2-a-i):s/(a+i),a){case e:n=(t-r)/s+(t<r?6:0);break;case t:n=(r-e)/s+2;break;case r:n=(e-t)/s+4}n/=6}return{h:n,s:o,l:c}}function O(e,t,r){e=X(e,255),t=X(t,255),r=X(r,255);var n,o,a=Math.max(e,t,r),i=Math.min(e,t,r),c=a,s=a-i;if(o=0===a?0:s/a,a==i)n=0;else{switch(a){case e:n=(t-r)/s+(t<r?6:0);break;case t:n=(r-e)/s+2;break;case r:n=(e-t)/s+4}n/=6}return{h:n,s:o,v:c}}function P(e,t,r,n){var o=[ee(Math.round(e).toString(16)),ee(Math.round(t).toString(16)),ee(Math.round(r).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function j(e,t,r,n){return[ee(re(n)),ee(Math.round(e).toString(16)),ee(Math.round(t).toString(16)),ee(Math.round(r).toString(16))].join("")}function F(e,t){t=0===t?0:t||10;var r=L(e).toHsl();return r.s-=t/100,r.s=Z(r.s),L(r)}function q(e,t){t=0===t?0:t||10;var r=L(e).toHsl();return r.s+=t/100,r.s=Z(r.s),L(r)}function N(e){return L(e).desaturate(100)}function H(e,t){t=0===t?0:t||10;var r=L(e).toHsl();return r.l+=t/100,r.l=Z(r.l),L(r)}function B(e,t){t=0===t?0:t||10;var r=L(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-t/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-t/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-t/100*255))),L(r)}function D(e,t){t=0===t?0:t||10;var r=L(e).toHsl();return r.l-=t/100,r.l=Z(r.l),L(r)}function U(e,t){var r=L(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,L(r)}function $(e){var t=L(e).toHsl();return t.h=(t.h+180)%360,L(t)}function W(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=L(e).toHsl(),n=[L(e)],o=360/t,a=1;a<t;a++)n.push(L({h:(r.h+a*o)%360,s:r.s,l:r.l}));return n}function V(e){var t=L(e).toHsl(),r=t.h;return[L(e),L({h:(r+72)%360,s:t.s,l:t.l}),L({h:(r+216)%360,s:t.s,l:t.l})]}function z(e,t,r){t=t||6,r=r||30;var n=L(e).toHsl(),o=360/r,a=[L(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,a.push(L(n));return a}function Y(e,t){t=t||6;for(var r=L(e).toHsv(),n=r.h,o=r.s,a=r.v,i=[],c=1/t;t--;)i.push(L({h:n,s:o,v:a})),a=(a+c)%1;return i}L.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=G(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=O(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=O(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=R(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=R(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return P(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,o){var a=[ee(Math.round(e).toString(16)),ee(Math.round(t).toString(16)),ee(Math.round(r).toString(16)),ee(re(n))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*X(this._r,255))+"%",g:Math.round(100*X(this._g,255))+"%",b:Math.round(100*X(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*X(this._r,255))+"%, "+Math.round(100*X(this._g,255))+"%, "+Math.round(100*X(this._b,255))+"%)":"rgba("+Math.round(100*X(this._r,255))+"%, "+Math.round(100*X(this._g,255))+"%, "+Math.round(100*X(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(K[P(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+j(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=L(e);r="#"+j(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return L(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(H,arguments)},brighten:function(){return this._applyModification(B,arguments)},darken:function(){return this._applyModification(D,arguments)},desaturate:function(){return this._applyModification(F,arguments)},saturate:function(){return this._applyModification(q,arguments)},greyscale:function(){return this._applyModification(N,arguments)},spin:function(){return this._applyModification(U,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(z,arguments)},complement:function(){return this._applyCombination($,arguments)},monochromatic:function(){return this._applyCombination(Y,arguments)},splitcomplement:function(){return this._applyCombination(V,arguments)},triad:function(){return this._applyCombination(W,[3])},tetrad:function(){return this._applyCombination(W,[4])}},L.fromRatio=function(e,t){if("object"==M(e)){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:te(e[n]));e=r}return L(e,t)},L.equals=function(e,t){return!(!e||!t)&&L(e).toRgbString()==L(t).toRgbString()},L.random=function(){return L.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},L.mix=function(e,t,r){r=0===r?0:r||50;var n=L(e).toRgb(),o=L(t).toRgb(),a=r/100;return L({r:(o.r-n.r)*a+n.r,g:(o.g-n.g)*a+n.g,b:(o.b-n.b)*a+n.b,a:(o.a-n.a)*a+n.a})},L.readability=function(e,t){var r=L(e),n=L(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},L.isReadable=function(e,t,r){var n,o,a,i,c,s=L.readability(e,t);switch(o=!1,(a=r,"AA"!==(i=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(c=(a.size||"small").toLowerCase())&&"large"!==c&&(c="small"),n={level:i,size:c}).level+n.size){case"AAsmall":case"AAAlarge":o=s>=4.5;break;case"AAlarge":o=s>=3;break;case"AAAsmall":o=s>=7}return o},L.mostReadable=function(e,t,r){var n,o,a,i,c=null,s=0;o=(r=r||{}).includeFallbackColors,a=r.level,i=r.size;for(var l=0;l<t.length;l++)(n=L.readability(e,t[l]))>s&&(s=n,c=L(t[l]));return L.isReadable(e,c,{level:a,size:i})||!o?c:(r.includeFallbackColors=!1,L.mostReadable(e,["#fff","#000"],r))};var J=L.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},K=L.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(J);function G(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function X(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Z(e){return Math.min(1,Math.max(0,e))}function Q(e){return parseInt(e,16)}function ee(e){return 1==e.length?"0"+e:""+e}function te(e){return e<=1&&(e=100*e+"%"),e}function re(e){return Math.round(255*parseFloat(e)).toString(16)}function ne(e){return Q(e)/255}var oe,ae,ie,ce=(ae="[\\s|\\(]+("+(oe="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")\\s*\\)?",ie="[\\s|\\(]+("+oe+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")\\s*\\)?",{CSS_UNIT:new RegExp(oe),rgb:new RegExp("rgb"+ae),rgba:new RegExp("rgba"+ie),hsl:new RegExp("hsl"+ae),hsla:new RegExp("hsla"+ie),hsv:new RegExp("hsv"+ae),hsva:new RegExp("hsva"+ie),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function se(e){return!!ce.CSS_UNIT.exec(e)}const le=["color","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"],ue=["fontFamily","fontSize","lineHeight","letterSpacing","fontWeight","fontVariation","textDecoration","textShadow","textTransform","-webkit-font-smoothing","-moz-osx-font-smoothing","transition"],pe=["backgroundColor","border","borderTop","borderRight","borderBottom","borderLeft","borderRadius","borderWidth","borderColor","borderStyle","borderTopWidth","borderTopColor","borderTopStyle","borderRightWidth","borderRightColor","borderRightStyle","borderBottomWidth","borderBottomColor","borderBottomStyle","borderLeftWidth","borderLeftColor","borderLeftStyle","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","outline","outlineOffset","boxShadow"],he={".Label":[...le,...ue],".Text":[...le,...ue],".Input":[...le,...ue,...pe],".Error":[...le,...ue,...pe],".Tab":[...le,...ue,...pe],".TabIcon":[...le],".TabLabel":[...le,...ue],".Block":[...le.slice(1),...pe.slice(1)],".Container":[...pe],".Header":[...le,...pe,...ue],".Footer":[...le,...pe,...ue]},de={".Label":he[".Label"],".Label--floating":[...he[".Label"],"transform"],".Input":[...he[".Input"],"outlineColor","outlineWidth","outlineStyle"],".Error":he[".Error"],".Tab":["backgroundColor","color","fontFamily"],".Tab--selected":["outlineColor","outlineWidth","outlineStyle","backgroundColor","color",...pe],".TabIcon":he[".TabIcon"],".TabIcon--selected":["color"],".TabLabel":he[".TabLabel"],".Block":he[".Block"],".Container":he[".Container"],".Header":he[".Header"],".Footer":he[".Footer"],".Footer--link":he[".Text"],".Text":he[".Text"],".Text--redirect":he[".Text"]},fe=(e,t=document)=>{let r=null,n=0;for(;!r&&n<e.length;){let o;try{o=t.querySelector(e[n])}catch(e){n++;continue}if(!o){n++;continue}const a=(t.defaultView||window).getComputedStyle(o).backgroundColor;a&&L(a).getAlpha()>=.5&&(r=a),n++}return r||"#ffffff"},me=e=>{const t=L(e),r=t.getAlpha();if(r<1){const e=t.toRgb();return L({r:Math.round(e.r*r+255*(1-r)),g:Math.round(e.g*r+255*(1-r)),b:Math.round(e.b*r+255*(1-r))}).getBrightness()>125}return t.getBrightness()>125},be={default:{hiddenContainer:"#wcpay-hidden-div",hiddenInput:"#wcpay-hidden-input",hiddenInvalidInput:"#wcpay-hidden-invalid-input",hiddenValidActiveLabel:"#wcpay-hidden-valid-active-label"},classicCheckout:{appendTarget:".woocommerce-billing-fields__field-wrapper",upeThemeInputSelector:"#billing_first_name",upeThemeLabelSelector:".woocommerce-checkout .form-row label",upeThemeTextSelectors:["#payment .payment_methods li .payment_box fieldset",".woocommerce-checkout .form-row"],rowElement:"p",validClasses:["form-row"],invalidClasses:["form-row","woocommerce-invalid","woocommerce-invalid-required-field"],alternateSelectors:{appendTarget:"form.checkout",upeThemeInputSelector:'form.checkout input[type="text"]',upeThemeLabelSelector:"form.checkout label",upeThemeTextSelectors:["form.checkout",".woocommerce"]},backgroundSelectors:["li.wc_payment_method .wc-payment-form","li.wc_payment_method .payment_box","#payment","#order_review","form.checkout","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:["#place_order"]},blocksCheckout:{appendTarget:".wc-block-checkout__contact-fields",upeThemeInputSelector:".wc-block-components-text-input #email",upeThemeLabelSelector:".wc-block-components-text-input label",upeThemeTextSelectors:[".wc-block-components-checkout-step__description",".wc-block-components-text-input",".wc-block-components-radio-control__label",".wc-block-checkout__terms"],rowElement:"div",validClasses:["wc-block-components-text-input","is-active"],invalidClasses:["wc-block-components-text-input","has-error"],alternateSelectors:{appendTarget:"#billing.wc-block-components-address-form",upeThemeInputSelector:"#billing-first_name",upeThemeLabelSelector:".wc-block-components-checkout-step__description"},backgroundSelectors:["#payment-method .wc-block-components-radio-control-accordion-option","#payment-method","form.wc-block-checkout__form",".wc-block-checkout","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".wc-block-components-checkout-place-order-button"],containerSelectors:[".wp-block-woocommerce-checkout-order-summary-block"]},bnplProductPage:{appendTarget:".product .cart .quantity",upeThemeInputSelector:".product .cart .quantity .qty",upeThemeLabelSelector:".product .cart .quantity label",upeThemeTextSelectors:[".product .cart .quantity"],rowElement:"div",validClasses:["input-text"],invalidClasses:["input-text","has-error"],backgroundSelectors:["#payment-method-message","#main > .product > div.summary.entry-summary","#main > .product","#main","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".single_add_to_cart_button"]},bnplClassicCart:{appendTarget:".cart .quantity",upeThemeInputSelector:".cart .quantity .qty",upeThemeLabelSelector:".cart .quantity label",upeThemeTextSelectors:[".cart .quantity"],rowElement:"div",validClasses:["input-text"],invalidClasses:["input-text","has-error"],backgroundSelectors:["#payment-method-message","#main .entry-content .cart_totals","#main .entry-content","#main","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".checkout-button"],containerSelectors:[".shop_table"]},bnplCartBlock:{appendTarget:".wc-block-cart .wc-block-components-quantity-selector",upeThemeInputSelector:".wc-block-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__input",upeThemeLabelSelector:".wc-block-components-text-input",upeThemeTextSelectors:[".wc-block-components-text-input"],rowElement:"div",validClasses:["wc-block-components-text-input"],invalidClasses:["wc-block-components-text-input","has-error"],backgroundSelectors:[".wc-block-components-bnpl-wrapper",".wc-block-components-order-meta",".wc-block-components-totals-wrapper",".wp-block-woocommerce-cart-order-summary-block",".wp-block-woocommerce-cart-totals-block",".wp-block-woocommerce-cart .wc-block-cart",".wp-block-woocommerce-cart","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".wc-block-cart__submit-button"],containerSelectors:[".wp-block-woocommerce-cart-line-items-block"]},wooPayClassicCheckout:{appendTarget:".woocommerce-billing-fields__field-wrapper",upeThemeInputSelector:"#billing_first_name",upeThemeLabelSelector:".woocommerce-checkout .form-row label",upeThemeTextSelectors:[".woocommerce-checkout .form-row"],rowElement:"p",validClasses:["form-row"],invalidClasses:["form-row","woocommerce-invalid","woocommerce-invalid-required-field"],alternateSelectors:{appendTarget:"form.checkout",upeThemeInputSelector:'form.checkout input[type="text"]',upeThemeLabelSelector:"form.checkout label",upeThemeTextSelectors:["form.checkout",".woocommerce"]},backgroundSelectors:["#customer_details","#order_review","form.checkout","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:["#place_order"],linkSelectors:["form.checkout a",".woocommerce a","main a",".entry-content a",".site-content a","#content a","#primary a","a"],containerSelectors:[".woocommerce-checkout-review-order-table"],headerSelectors:["header > div:has(nav)","header > div:has(.site-logo)","header > div:has(.custom-logo)",".site-header","#masthead","header > div:last-of-type","header"],footerSelectors:[".site-footer","#colophon","footer > div","footer"],footerLink:[".site-footer a","footer a"]},wooPayBlocksCheckout:{appendTarget:".wc-block-checkout__contact-fields",upeThemeInputSelector:".wc-block-components-text-input #email",upeThemeLabelSelector:".wc-block-components-text-input label",upeThemeTextSelectors:[".wc-block-components-checkout-step__description",".wc-block-components-text-input",".wc-block-components-radio-control__label",".wc-block-checkout__terms"],rowElement:"div",validClasses:["wc-block-components-text-input","is-active"],invalidClasses:["wc-block-components-text-input","has-error"],alternateSelectors:{appendTarget:"#billing.wc-block-components-address-form",upeThemeInputSelector:"#billing-first_name",upeThemeLabelSelector:".wc-block-components-checkout-step__description"},backgroundSelectors:["#payment-method .wc-block-components-radio-control-accordion-option","#payment-method","form.wc-block-checkout__form",".wc-block-checkout","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".wc-block-components-checkout-place-order-button"],linkSelectors:[".wc-block-checkout a",".wc-block-components-main a","main a",".entry-content a",".site-content a","#content a","#primary a","a"],containerSelectors:[".wp-block-woocommerce-checkout-order-summary-block"],headerSelectors:["header > div:has(nav)","header > div:has(.site-logo)","header > div:has(.custom-logo)",".site-header","#masthead","header > div:last-of-type","header"],footerSelectors:[".site-footer","#colophon","footer > div","footer"],footerLink:[".site-footer a","footer a"]},updateSelectors:function(e,t){return e.hasOwnProperty("alternateSelectors")&&(Object.entries(e.alternateSelectors).forEach(r=>{const[n,o]=r,a=e[n];if(Array.isArray(a))a.some(e=>{try{return t.querySelector(e)}catch(e){return!1}})||(e[n]=o);else try{t.querySelector(e[n])||(e[n]=o)}catch(t){e[n]=o}}),delete e.alternateSelectors),e},getSelectors:function(e,t){let r=this.blocksCheckout;switch(e){case"blocks_checkout":r=this.blocksCheckout;break;case"shortcode_checkout":r=this.classicCheckout;break;case"bnpl_product_page":r=this.bnplProductPage;break;case"bnpl_classic_cart":r=this.bnplClassicCart;break;case"bnpl_cart_block":r=this.bnplCartBlock;break;case"woopay_shortcode_checkout":r=this.wooPayClassicCheckout;break;case"woopay_blocks_checkout":r=this.wooPayBlocksCheckout}return{...this.default,...this.updateSelectors(r,t)}}},ge={getHiddenContainer:function(e,t){const r=t.createElement("div");return r.setAttribute("id",this.getIDFromSelector(e)),r.style.border=0,r.style.clip="rect(0 0 0 0)",r.style.height="1px",r.style.margin="-1px",r.style.overflow="hidden",r.style.padding="0",r.style.position="absolute",r.style.width="1px",r},createRow:function(e,t=[],r){const n=r.createElement(e);return t.length&&n.classList.add(...t),n},appendClone:function(e,t,r,n){const o=n.querySelector(t);if(o){const t=o.cloneNode(!0);t.id=this.getIDFromSelector(r),t.value="",e.appendChild(t)}},getIDFromSelector:function(e){return e.startsWith("#")||e.startsWith(".")?e.slice(1):e},init:function(e,t){const r=be.getSelectors(e),n=t.querySelector(r.appendTarget),o=t.querySelector(r.upeThemeInputSelector);if(!n||!o)return;t.querySelector(r.hiddenContainer)&&this.cleanup(t);const a=this.getHiddenContainer(r.hiddenContainer,t);n.appendChild(a);const i=this.createRow(r.rowElement,r.validClasses,t);a.appendChild(i);const c=this.createRow(r.rowElement,r.invalidClasses,t);a.appendChild(c),this.appendClone(i,r.upeThemeInputSelector,r.hiddenInput,t),this.appendClone(i,r.upeThemeLabelSelector,r.hiddenValidActiveLabel,t),this.appendClone(c,r.upeThemeInputSelector,r.hiddenInvalidInput,t),this.appendClone(c,r.upeThemeLabelSelector,r.hiddenInvalidInput,t),t.querySelector(r.hiddenInput).style.transition="none"},cleanup:function(e){const t=e.querySelector(be.default.hiddenContainer);t&&t.remove()}},ye=(e,t,r=null,n)=>{const o=(Array.isArray(e)?e:[e]).map(e=>{try{return n.querySelector(e)}catch(e){return null}}).filter(Boolean);if(!o.length)return{};const a=n.defaultView||window,i=de[t],c=o[0],s=a.getComputedStyle(c),l={};if(i.forEach(e=>{const t=e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),r=s.getPropertyValue(t);if(r)if("color"!==e)if("lineHeight"!==e||"0"!==r&&"0px"!==r)l[e]=r;else for(let t=1;t<o.length;t++){const r=a.getComputedStyle(o[t]).getPropertyValue("line-height");if("0"!==r&&"0px"!==r){l[e]=r;break}}else l[e]=(e=>{const t=e.match(/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0?(\.\d+)?|1?(\.0+)?)\s*\)$/);if(t){const r=t[4]||1;e=`rgb(${t.slice(1,4).map(e=>Math.round(e*r+255*(1-r))).join(", ")})`}return e})(r)}),".Input"===t||".Tab--selected"===t){const e=((e,t="solid",r)=>e&&r?[e,t,r].join(" "):"")(l.outlineWidth,l.outlineStyle,l.outlineColor);""!==e&&(l.outline=e),delete l.outlineWidth,delete l.outlineColor,delete l.outlineStyle}const u=s.getPropertyValue("text-indent");return"0px"!==u&&"0px"===l.paddingLeft&&"0px"===l.paddingRight&&(l.paddingLeft=u,l.paddingRight=u),".Block"===t&&(l.backgroundColor=r),l},we={blocks_checkout:"woopay_blocks_checkout",shortcode_checkout:"woopay_shortcode_checkout"},ke=(e,t=!1,r=document)=>{const n=t?we[e]??e:e,o=be.getSelectors(n,r);ge.init(n,r);const a=ye(o.hiddenInput,".Input",null,r),i=ye(o.hiddenInvalidInput,".Input",null,r),c=ye(o.upeThemeLabelSelector,".Label",null,r),s={fontSize:c.fontSize},l=ye(o.upeThemeTextSelectors,".Text",null,r),u=ye(o.upeThemeInputSelector,".Tab",null,r),p=ye(o.hiddenInput,".Tab--selected",null,r),h=(e=>{const t=Object.assign({},e);if(!e.backgroundColor||!e.color)return e;const r=((e,t)=>{const r={backgroundColor:e,color:t},n=L(e),o=L(t);if(!n.isValid()||!o.isValid())return{backgroundColor:"",color:""};const a=n.getBrightness()>50?L(n).darken(7):L(n).lighten(7),i=L.mostReadable(a,[o],{includeFallbackColors:!0});return r.backgroundColor=a.toRgbString(),r.color=i.toRgbString(),r})(e.backgroundColor,e.color);return t.backgroundColor=r.backgroundColor,t.color=r.color,t})(u),d={color:h.color},f={color:p.color},m=fe(o.backgroundSelectors,r),b=ye(o.upeThemeLabelSelector,".Block",m,r),g={colorBackground:m,colorText:l.color,fontFamily:l.fontFamily,fontSizeBase:l.fontSize},y=("blocks_checkout"===e||"woopay_blocks_checkout"===n)&&((e,t=document)=>{let r;try{r=t.querySelector(e)}catch(e){return!0}if(!r)return!0;const n=(t.defaultView||window).getComputedStyle(r).getPropertyValue("position");return!n||"absolute"===n||"fixed"===n})(o.hiddenValidActiveLabel,r);let w={variables:g,theme:me(m)?"stripe":"night",labels:y?"floating":"above",rules:JSON.parse(JSON.stringify({".Input":a,".Input--invalid":i,".Label":c,".Label--resting":s,".Block":b,".Tab":u,".Tab:hover":h,".Tab--selected":p,".TabIcon:hover":d,".TabIcon--selected":f,".Text":l,".Text--redirect":l}))};if(y&&(w=((e,t)=>{if(e.rules[".Label--floating"]=t,e.rules[".Label--floating"].transform&&"none"!==e.rules[".Label--floating"].transform){const t=e.rules[".Label--floating"].transform.match(/matrix\((.+)\)/);if(t&&t[1]){const r=t[1].split(", "),n=(parseFloat(r[0])+parseFloat(r[3]))/2,o=parseFloat(e.rules[".Label--floating"].lineHeight),a=Math.floor(o*n);e.rules[".Label--floating"].lineHeight=`${a}px`,e.rules[".Label--floating"].fontSize=`${a}px`}delete e.rules[".Label--floating"].transform}if(e.rules[".Input"].paddingTop&&(e.rules[".Input"].paddingTop=`calc(${e.rules[".Input"].paddingTop} - ${e.rules[".Label--floating"].lineHeight} - 4px - 1px)`),e.rules[".Input"].paddingBottom){const t=parseFloat(e.rules[".Input"].paddingBottom);e.rules[".Input"].paddingBottom=t-1+"px";const r=e.rules[".Label"].marginTop??"0";e.rules[".Label"].marginTop=`${Math.floor((t-1)/3)}px`,e.rules[".Label--floating"].marginTop=r}return e})(w,ye(o.hiddenValidActiveLabel,".Label--floating",null,r))),t){const e=ye(o.headerSelectors,".Header",null,r),t=ye(o.footerSelectors,".Footer",null,r);(!e.backgroundColor||L(e.backgroundColor).getAlpha()<.5)&&(e.backgroundColor=fe([...o.headerSelectors??[],"body"],r)),(!t.backgroundColor||L(t.backgroundColor).getAlpha()<.5)&&(t.backgroundColor=fe([...o.footerSelectors??[],"body"],r)),w.rules={...w.rules,".Heading":ye(o.headingSelectors,".Label",null,r),".Header":e,".Footer":t,".Footer-link":ye(o.footerLink,".Footer--link",null,r),".Button":ye(o.buttonSelectors,".Input",null,r),".Link":ye(o.linkSelectors,".Label",null,r),".Container":ye(o.containerSelectors,".Container",null,r)}}return ge.cleanup(r),w};function _e(e){return"wcpay_appearance_"+e}const ve=e=>"undefined"!=typeof wcpayConfig&&void 0!==wcpayConfig[e]?wcpayConfig[e]:Se(e),Se=e=>{let t=null;if("undefined"!=typeof wcpay_upe_config)t=wcpay_upe_config;else{if("object"!=typeof wc||void 0===wc.wcSettings)return null;t=wc.wcSettings.getSetting("woocommerce_payments_data")||{}}return t[e]||null};function xe(e,t="",r){for(const n in e){const o=e[n],a=t?t+"["+n+"]":n;"string"==typeof o||"number"==typeof o?r.append(a,o):"object"==typeof o&&xe(o,a,r)}return r}var Ce=r(4848);const Te=new class{constructor(e,t){this.options=e,this.stripe=null,this.stripePlatform=null,this.request=t}createStripe(e,t,r="",n=[]){const o={locale:t};return r&&(o.stripeAccount=r),n&&(o.betas=n),new Stripe(e,o)}async getStripeForUPE(e){return this.options.forceNetworkSavedCards=Se("paymentMethodsConfig")[e].forceNetworkSavedCards,this.getStripe()}async getStripe(e=!1){let t=0;for(;!window.Stripe;)if(await new Promise(e=>setTimeout(e,100)),t+=100,t>6e5)throw new Error("Stripe object not found");return this.__getStripe(e)}__getStripe(e=!1){const{publishableKey:t,accountId:r,forceNetworkSavedCards:n,locale:o,isStripeLinkEnabled:a}=this.options;if(n&&!e)return this.stripePlatform||(this.stripePlatform=this.createStripe(t,o)),this.stripePlatform;if(!this.stripe){let e=["card_country_event_beta_1"];a&&(e=e.concat(["link_autofill_modal_beta_1"])),this.stripe=this.createStripe(t,o,r,e)}return this.stripe}async loadStripeForExpressCheckout(){try{return this.getStripe(!0)}catch(e){return{error:e}}}confirmIntent(e,t=!1){const r=e.match(/#wcpay-confirm-(pi|si):([^:]+):([^:]+):([^:]+)(?::(.+))?$/);if(!r)return!0;const n="si"===r[1];let o=r[2];const a=r[3],i=r[4],c=r[5]||null,s=e.indexOf("order-pay"),l=s>-1&&e.substring(s).match(/\d+/);return l&&(o=l[0]),(async()=>{const{locale:e,publishableKey:t}=this.options,r=ve("accountIdForIntentConfirmation");if(n){const e=await this.getStripe(!0);return c?e.confirmSetup({clientSecret:a,confirmParams:{confirmation_token:c},redirect:"if_required"}):e.handleNextAction({clientSecret:a})}return r?this.createStripe(t,e,r).confirmCardPayment(a):(await this.getStripe(!0)).handleNextAction({clientSecret:a})})().then(e=>{let r=null;e.paymentIntent?.last_payment_error&&(r={message:e.paymentIntent.last_payment_error.message}),"requires_action"===e.paymentIntent?.status&&(r={message:"Payment requires additional action."});const n=e.paymentIntent&&e.paymentIntent.id||e.setupIntent&&e.setupIntent.id||e.error&&e.error.payment_intent&&e.error.payment_intent.id||e.error.setup_intent&&e.error.setup_intent.id,a=(c="ajax_url",("object"==typeof wcpayExpressCheckoutParams&&wcpayExpressCheckoutParams.hasOwnProperty(c)?wcpayExpressCheckoutParams[c]:null)??ve("ajaxUrl"));var c;const s=ve("isChangingPayment");return[this.request(a,{action:"update_order_status",order_id:o,_ajax_nonce:i,intent_id:n,should_save_payment_method:t?"true":"false",is_changing_payment:s?"true":"false"}),r,e.error]}).then(([e,t,r])=>{if(r)throw r;return e.then(e=>{const r="string"==typeof e?JSON.parse(e):e;if(r.error)throw r.error;if(t)throw t;return r.return_url})})}async setupIntent(e,t=""){const r=await this.request(ve("ajaxUrl"),{action:"create_setup_intent","wcpay-payment-method":e,_ajax_nonce:ve("createSetupIntentNonce"),"wcpay-fraud-prevention-token":window.wcpayFraudPreventionToken??"","wcpay-fingerprint":t});if(!r.success)throw r.data.error;if("succeeded"===r.data.status)return r.data;const n=await this.getStripe(),o=await n.confirmCardSetup(r.data.client_secret),{setupIntent:a,error:i}=o;if(i)throw i;return a}expressCheckoutAddToCart(e){const t=ve("wcAjaxUrl"),r=ve("addToCartNonce");return this.request(((e,t,r="wcpay_")=>e.toString().replace("%%endpoint%%",r+t))(t,"add_to_cart"),{security:r,...e})}}({publishableKey:Se("publishableKey"),accountId:Se("accountId"),forceNetworkSavedCards:Se("forceNetworkSavedCards"),locale:Se("locale")},async function(e,t,r){const n=xe(t,"",new FormData),o=await fetch(e,{method:"POST",body:n,...r});return await o.json()}),Ae=({cart:e,context:r})=>{const[n,o]=(0,t.useState)(()=>function(e,t){try{const r=localStorage.getItem(_e(e));if(!r)return null;const n=JSON.parse(r);if(n?.version===t)return n.appearance}catch{}return null}("bnpl_cart_block",Se("stylesCacheVersion"))),[a]=(0,t.useState)(((e=document)=>{const t=[],r=e.styleSheets,n=["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","fonts.bunny.net","fonts.wp.com"];for(let e=0;e<r.length;e++){if(!r[e].href)continue;const o=new URL(r[e].href);-1!==n.indexOf(o.hostname)&&t.push({cssSrc:r[e].href})}return t})());(0,t.useEffect)(()=>{if(!n){const e=ke("bnpl_cart_block");!function(e){document.dispatchEvent(new CustomEvent("wcpay_elements_appearance",{detail:{appearance:e,elementsLocation:"bnpl_cart_block"}}))}(e),function(e,t,r){try{localStorage.setItem(_e("bnpl_cart_block"),JSON.stringify({version:t,appearance:r}))}catch{}}(0,Se("stylesCacheVersion"),e),o(e)}},[n]);const i=function(e,r=!1){const[n,o]=(0,t.useState)(null);return(0,t.useEffect)(()=>{(async()=>{const t=await e.getStripe(r);o(t)})()},[e,r]),n}(Te);if(!i)return null;if(0===Object.keys(n).length)return null;if("woocommerce/cart"!==r)return null;const c=((e,t=2)=>e*Math.pow(10,2-t))(e.cartTotals.total_price,wcSettings.currency.precision);if(!window.wcpayStripeSiteMessaging)return null;const{country:s,paymentMethods:l,currencyCode:u,shouldInitializePMME:p}=window.wcpayStripeSiteMessaging;if(!p)return null;const h={amount:parseInt(c,10)||0,currency:u||"USD",paymentMethodTypes:l||[],countryCode:s};return(0,Ce.jsx)("div",{className:"wc-block-components-bnpl-wrapper",children:(0,Ce.jsx)(w,{stripe:i,options:{appearance:n,fonts:a},children:(0,Ce.jsx)(C,{options:h})})})};(0,e.registerPlugin)("bnpl-site-messaging",{render:()=>(0,T.select)("core/editor")?null:(0,Ce.jsx)(A.ExperimentalOrderMeta,{children:(0,Ce.jsx)(Ae,{})}),scope:"woocommerce-checkout"})})()})();