1 line
3.2 KiB
JavaScript
1 line
3.2 KiB
JavaScript
|
"use strict";(self.webpackChunkwebpackWcBlocksJsonp=self.webpackChunkwebpackWcBlocksJsonp||[]).push([[458],{93611:(e,o,t)=>{t.d(o,{F:()=>i});var n=t(89814),l=t.n(n),r=t(57884),s=t(42646),c=t(11473),a=t(92661);const i=e=>{const o=(e=>{const o=(0,r.Kn)(e)?e:{style:{}};let t=o.style;return(0,s.H)(t)&&(t=JSON.parse(t)||{}),(0,r.Kn)(t)||(t={}),{...o,style:t}})(e),t=(0,a.vc)(o),n=(0,a.l8)(o),i=(0,a.su)(o),u=(0,c.f)(o);return{className:l()(u.className,t.className,n.className,i.className),style:{...u.style,...t.style,...n.style,...i.style}}}},11473:(e,o,t)=>{t.d(o,{f:()=>r});var n=t(57884),l=t(42646);const r=e=>{const o=(0,n.Kn)(e.style.typography)?e.style.typography:{},t=(0,l.H)(o.fontFamily)?o.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:t,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:o.fontSize,fontStyle:o.fontStyle,fontWeight:o.fontWeight,letterSpacing:o.letterSpacing,lineHeight:o.lineHeight,textDecoration:o.textDecoration,textTransform:o.textTransform}}}},92661:(e,o,t)=>{t.d(o,{l8:()=>d,su:()=>v,vc:()=>u});var n=t(89814),l=t.n(n),r=t(98448),s=t(92289),c=t(57884);function a(e={}){const o={};return(0,s.getCSSRules)(e,{selector:""}).forEach((e=>{o[e.key]=e.value})),o}function i(e,o){return e&&o?`has-${(0,r.o)(o)}-${e}`:""}function u(e){var o,t,n,r,s,u,d;const{backgroundColor:v,textColor:f,gradient:y,style:h}=e,k=i("background-color",v),m=i("color",f),p=function(e){if(e)return`has-${e}-gradient-background`}(y),g=p||(null==h||null===(o=h.color)||void 0===o?void 0:o.gradient);return{className:l()(m,p,{[k]:!g&&!!k,"has-text-color":f||(null==h||null===(t=h.color)||void 0===t?void 0:t.text),"has-background":v||(null==h||null===(n=h.color)||void 0===n?void 0:n.background)||y||(null==h||null===(r=h.color)||void 0===r?void 0:r.gradient),"has-link-color":(0,c.Kn)(null==h||null===(s=h.elements)||void 0===s?void 0:s.link)?null==h||null===(u=h.elements)||void 0===u||null===(d=u.link)||void 0===d?void 0:d.color:void 0}),style:a({color:(null==h?void 0:h.color)||{}})}}function d(e){var o;const t=(null===(o=e.style)||void 0===o?void 0:o.border)||{};return{className:function(e){var o;const{borderColor:t,style:n}=e,r=t?i("border-color",t):"";return l()({"has-border-color":!!t||!(null==n||null===(o=n.border)||void 0===o||!o.color),[r]:!!r})}(e),style:a({border:t})}}function v(e){var o;return{className:void 0,style:a({spacing:(null===(o=e.style)||void 0===o?void 0:o.spacing)||{}})}}},45405:(e,o,t)=>{t.r(o),t.d(o,{default:()=>k});var n=t(99196),l=t(75271),r=t(34877),s=t(89814),c=t.n(s),a=t(93611),i=t(69307);const u=(0,i.createContext)({onProceedToCheckout:()=>()=>{},dispatchOnProceedToCheckout:()=>new Promise((()=>{}))});var d=t(57884);let v=function(e){return e.SUCCESS="success",e.FAIL="failure",e.ERROR="error",e}({});const f=e=>((e,o)=>(0,d.Kn)(e)&&"type"in e&&e.type===o)(e,v.ERROR);var y=t(61296),h=t(39214);const k=({className:e,checkoutButtonLabel:o,style:t})=>{const s=(0,a.F)({style:t}),{dispatchOnProceedToCheckout:d}=(0,i.useContext)(u);return l.sE?(0,n.createElement)(r.Z,{className:c()(e,s.className,"wc-block-mini-cart__footer-checkout"),variant:(0,h.b)(e,"contained"),style:s.style,href:l.sE,onClick:e=>{d().then((o=>{o.some(f)&&e.preventDefault()}))}},o||y.k):null}}}]);
|