1 line
5.6 KiB
JavaScript
1 line
5.6 KiB
JavaScript
|
(()=>{var e,t={5890:(e,t,r)=>{"use strict";r.r(t);const o=window.wp.blocks,l=window.wc.wcSettings;var a,i,c,n,s,p,u,m,g,d;const v=(0,l.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),w=v.pluginUrl+"images/",k=(v.pluginUrl,v.buildPhase),b=(null===(a=l.STORE_PAGES.shop)||void 0===a||a.permalink,null===(i=l.STORE_PAGES.checkout)||void 0===i||i.id,null===(c=l.STORE_PAGES.checkout)||void 0===c||c.permalink,null===(n=l.STORE_PAGES.privacy)||void 0===n||n.permalink,null===(s=l.STORE_PAGES.privacy)||void 0===s||s.title,null===(p=l.STORE_PAGES.terms)||void 0===p||p.permalink,null===(u=l.STORE_PAGES.terms)||void 0===u||u.title,null===(m=l.STORE_PAGES.cart)||void 0===m||m.id,null===(g=l.STORE_PAGES.cart)||void 0===g||g.permalink,null!==(d=l.STORE_PAGES.myaccount)&&void 0!==d&&d.permalink?l.STORE_PAGES.myaccount.permalink:(0,l.getSetting)("wpLoginUrl","/wp-login.php"),(0,l.getSetting)("localPickupEnabled",!1),(0,l.getSetting)("countries",{})),f=(0,l.getSetting)("countryData",{});Object.fromEntries(Object.keys(f).filter((e=>!0===f[e].allowBilling)).map((e=>[e,b[e]||""]))),Object.fromEntries(Object.keys(f).filter((e=>!0===f[e].allowBilling)).map((e=>[e,f[e].states||[]]))),Object.fromEntries(Object.keys(f).filter((e=>!0===f[e].allowShipping)).map((e=>[e,b[e]||""]))),Object.fromEntries(Object.keys(f).filter((e=>!0===f[e].allowShipping)).map((e=>[e,f[e].states||[]]))),Object.fromEntries(Object.keys(f).map((e=>[e,f[e].locale||[]])));var y=r(9196);const S=window.wp.blockEditor;var E=r(9307),O=r(4184),h=r.n(O);const P=JSON.parse('{"name":"woocommerce/product-gallery-large-image-next-previous"}'),C=JSON.parse('{"name":"woocommerce/product-gallery-pager"}');r(922);const _=(0,E.memo)((()=>(0,y.createElement)("div",{className:"wc-block-product-gallery-large-image wc-block-editor-product-gallery-large-image"},(0,y.createElement)("img",{src:`${w}block-placeholders/product-image-gallery.svg`,alt:"Placeholder"})))),j=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"woocommerce/product-gallery-large-image","version":"1.0.0","title":"Large Image","description":"Display the Large Image of a product.","category":"woocommerce","keywords":["WooCommerce"],"usesContext":["nextPreviousButtonsPosition","postId","hoverZoom","fullScreenOnClick","cropImages"],"supports":{"interactivity":true},"textdomain":"woocommerce","ancestor":["woocommerce/product-gallery"]}');k>2&&(0,o.registerBlockType)(j,{icon:()=>(0,y.createElement)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,y.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.22448 1.5L1.5 6.81504V11.7072L5.12953 9.06066C5.38061 8.87758 5.71858 8.86829 5.97934 9.0373L8.90601 10.9342L12.4772 7.46225C12.7683 7.17925 13.2317 7.17925 13.5228 7.46225L16.5 10.3568V2C16.5 1.72386 16.2761 1.5 16 1.5H6.22448ZM1.5 13.5636V16C1.5 16.2761 1.72386 16.5 2 16.5H16C16.2761 16.5 16.5 16.2761 16.5 16V12.4032L16.4772 12.4266L13 9.04603L9.52279 12.4266C9.27191 12.6706 8.88569 12.7086 8.59206 12.5183L5.59643 10.5766L1.5 13.5636ZM0 2C0 0.89543 0.895431 0 2 0H16C17.1046 0 18 0.895431 18 2V16C18 17.1046 17.1046 18 16 18H2C0.89543 18 0 17.1046 0 16V2Z",fill:"currentColor"})),edit:({context:e})=>{const t=(0,S.useInnerBlocksProps)({className:"wc-block-product-gallery-large-image__inner-blocks"},{template:[[P.name],[C.name]],templateInsertUpdatesSelection:!0}),r=(0,E.useMemo)((()=>{switch(e.nextPreviousButtonsPosition){case"insideTheImage":return{className:"inside-image"};case"outsideTheImage":return{className:"outside-image"};default:return{className:"off"}}}),[e.nextPreviousButtonsPosition]),o=(0,S.useBlockProps)({className:h()("wc-block-product-gallery-large-image","wc-block-editor-product-gallery-large-image",`wc-block-editor-product-gallery-large-image-next-previous--${null==r?void 0:r.className}`)});return(0,y.createElement)("div",{...o},(0,y.createElement)(_,null),(0,y.createElement)("div",{...t}))},save:()=>{const e=S.useBlockProps.save({className
|