geno/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/mini-cart-contents-block/title-frontend.js
2024-02-01 11:54:18 +00:00

2 lines
No EOL
4.8 KiB
JavaScript

"use strict";(self.webpackChunkwebpackWcBlocksJsonp=self.webpackChunkwebpackWcBlocksJsonp||[]).push([[3271,1114,262],{3611:(e,t,n)=>{n.d(t,{F:()=>i});var r=n(4184),l=n.n(r),o=n(7884),s=n(2646),a=n(1473),c=n(2661);const i=e=>{const t=(e=>{const t=(0,o.Kn)(e)?e:{style:{}};let n=t.style;return(0,s.H)(n)&&(n=JSON.parse(n)||{}),(0,o.Kn)(n)||(n={}),{...t,style:n}})(e),n=(0,c.vc)(t),r=(0,c.l8)(t),i=(0,c.su)(t),u=(0,a.f)(t);return{className:l()(u.className,n.className,r.className,i.className),style:{...u.style,...n.style,...r.style,...i.style}}}},1473:(e,t,n)=>{n.d(t,{f:()=>o});var r=n(7884),l=n(2646);const o=e=>{const t=(0,r.Kn)(e.style.typography)?e.style.typography:{},n=(0,l.H)(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:n,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}}},2661:(e,t,n)=>{n.d(t,{l8:()=>d,su:()=>f,vc:()=>u});var r=n(4184),l=n.n(r),o=n(9784),s=n(2289),a=n(7884);function c(e={}){const t={};return(0,s.getCSSRules)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function i(e,t){return e&&t?`has-${(0,o.o)(t)}-${e}`:""}function u(e){var t,n,r,o,s,u,d;const{backgroundColor:f,textColor:v,gradient:p,style:m}=e,y=i("background-color",f),g=i("color",v),b=function(e){if(e)return`has-${e}-gradient-background`}(p),h=b||(null==m||null===(t=m.color)||void 0===t?void 0:t.gradient);return{className:l()(g,b,{[y]:!h&&!!y,"has-text-color":v||(null==m||null===(n=m.color)||void 0===n?void 0:n.text),"has-background":f||(null==m||null===(r=m.color)||void 0===r?void 0:r.background)||p||(null==m||null===(o=m.color)||void 0===o?void 0:o.gradient),"has-link-color":(0,a.Kn)(null==m||null===(s=m.elements)||void 0===s?void 0:s.link)?null==m||null===(u=m.elements)||void 0===u||null===(d=u.link)||void 0===d?void 0:d.color:void 0}),style:c({color:(null==m?void 0:m.color)||{}})}}function d(e){var t;const n=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:function(e){var t;const{borderColor:n,style:r}=e,o=n?i("border-color",n):"";return l()({"has-border-color":!!n||!(null==r||null===(t=r.border)||void 0===t||!t.color),[o]:!!o})}(e),style:c({border:n})}}function f(e){var t;return{className:void 0,style:c({spacing:(null===(t=e.style)||void 0===t?void 0:t.spacing)||{}})}}},3792:(e,t,n)=>{n.r(t),n.d(t,{default:()=>u});var r=n(9196),l=n(4055),o=n(4184),s=n.n(o),a=n(2368),c=n(7407),i=n(9214);const u=({children:e,className:t})=>{const{cartIsLoading:n}=(0,l.b)();if(n)return null;const o=(0,i.g)(e);return(0,r.createElement)("h2",{className:s()(t,"wc-block-mini-cart__title")},o?e:(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.default,null),(0,r.createElement)(a.default,null)))}},2368:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var r=n(9196),l=n(4055),o=n(4184),s=n.n(o),a=n(5736),c=n(3611);const i=e=>{const{cartItemsCount:t}=(0,l.b)(),n=(0,c.F)(e);return(0,r.createElement)("span",{className:s()(e.className,n.className),style:n.style},(0,a.sprintf)(/* translators: %d is the count of items in the cart. */
(0,a._n)("(%d item)","(%d items)",t,"woocommerce"),t))}},7407:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var r=n(9196),l=n(3611),o=n(4184),s=n.n(o);const a=(0,n(5736).__)("Your cart","woocommerce"),c=e=>{const t=(0,l.F)(e);return(0,r.createElement)("span",{className:s()(e.className,t.className),style:t.style},e.label||a)}},9214:(e,t,n)=>{n.d(t,{b:()=>l,g:()=>o});var r=n(7884);const l=(e="",t)=>e.includes("is-style-outline")?"outlined":e.includes("is-style-fill")?"contained":t,o=e=>e.some((e=>Array.isArray(e)?o(e):(0,r.Kn)(e)&&null!==e.key))},1290:(e,t,n)=>{n.d(t,{$:()=>o});var r=n(7582),l=n(307);function o(e,t){return void 0===t&&(t={}),(0,l.B)(e,(0,r.pi)({delimiter:"."},t))}},9562:(e,t,n)=>{function r(e){return e.toLowerCase()}n.d(t,{U:()=>r})},307:(e,t,n)=>{n.d(t,{B:()=>s});var r=n(9562),l=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],o=/[^A-Z0-9]+/gi;function s(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,s=void 0===n?l:n,c=t.stripRegexp,i=void 0===c?o:c,u=t.transform,d=void 0===u?r.U:u,f=t.delimiter,v=void 0===f?" ":f,p=a(a(e,s,"$1\0$2"),i,"\0"),m=0,y=p.length;"\0"===p.charAt(m);)m++;for(;"\0"===p.charAt(y-1);)y--;return p.slice(m,y).split("\0").map(d).join(v)}function a(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}},9784:(e,t,n)=>{n.d(t,{o:()=>o});var r=n(7582),l=n(1290);function o(e,t){return void 0===t&&(t={}),(0,l.$)(e,(0,r.pi)({delimiter:"-"},t))}},7582:(e,t,n)=>{n.d(t,{pi:()=>r});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var l in t=arguments[n])Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l]);return e},r.apply(this,arguments)};Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError}}]);