HEX
Server: Apache
System: Linux host17.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
User: shrsglobal (7178)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /home/shrsglobal/www/wp-content/plugins/woocommerce/assets/client/blocks/handpicked-products.js
(()=>{var e,t,r,s={4073:(e,t,r)=>{"use strict";const s=window.wp.blocks,o=window.wc.wcSettings;var i=r(4530),c=r(3106);r(9202);const n=JSON.parse('{"name":"woocommerce/handpicked-products","title":"Hand-picked Products","category":"woocommerce","keywords":["Handpicked Products","WooCommerce"],"description":"Display a selection of hand-picked products in a grid.","supports":{"interactivity":{"clientNavigation":false},"align":["wide","full"],"html":false,"inserter":false},"attributes":{"align":{"type":"string"},"columns":{"type":"number","default":3},"contentVisibility":{"type":"object","default":{"image":true,"title":true,"price":true,"rating":true,"button":true},"properties":{"image":{"type":"boolean","image":true},"title":{"type":"boolean","title":true},"price":{"type":"boolean","price":true},"rating":{"type":"boolean","rating":true},"button":{"type":"boolean","button":true}}},"orderby":{"type":"string","enum":["date","popularity","price_asc","price_desc","rating","title","menu_order"],"default":"date"},"products":{"type":"array","default":[]},"alignButtons":{"type":"boolean","default":false},"isPreview":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),l=window.wp.blockEditor,a=window.wp.components;var d=r(6087),h=r(7723),m=r(790);const u=({onChange:e,settings:t})=>{const{image:r,button:s,price:o,rating:i,title:c}=t,n=!1!==r;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(a.ToggleControl,{label:(0,h.__)("Product image","woocommerce"),checked:n,onChange:()=>e({...t,image:!n})}),(0,m.jsx)(a.ToggleControl,{label:(0,h.__)("Product title","woocommerce"),checked:c,onChange:()=>e({...t,title:!c})}),(0,m.jsx)(a.ToggleControl,{label:(0,h.__)("Product price","woocommerce"),checked:o,onChange:()=>e({...t,price:!o})}),(0,m.jsx)(a.ToggleControl,{label:(0,h.__)("Product rating","woocommerce"),checked:i,onChange:()=>e({...t,rating:!i})}),(0,m.jsx)(a.ToggleControl,{label:(0,h.__)("Add to Cart button","woocommerce"),checked:s,onChange:()=>e({...t,button:!s})})]})},x=({value:e,setAttributes:t})=>(0,m.jsx)(a.SelectControl,{label:(0,h.__)("Order products by","woocommerce"),value:e,options:[{label:(0,h.__)("Newness - newest first","woocommerce"),value:"date"},{label:(0,h.__)("Price - low to high","woocommerce"),value:"price_asc"},{label:(0,h.__)("Price - high to low","woocommerce"),value:"price_desc"},{label:(0,h.__)("Rating - highest first","woocommerce"),value:"rating"},{label:(0,h.__)("Sales - most first","woocommerce"),value:"popularity"},{label:(0,h.__)("Title - alphabetical","woocommerce"),value:"title"},{label:(0,h.__)("Menu Order","woocommerce"),value:"menu_order"}],onChange:e=>t({orderby:e})});var p=r(2624),g=r(4921),w=r(9491);const E={clear:(0,h.__)("Clear all selected items","woocommerce"),noItems:(0,h.__)("No items found.","woocommerce"),
/* Translators: %s search term */
noResults:(0,h.__)("No results for %s","woocommerce"),search:(0,h.__)("Search for items","woocommerce"),selected:e=>(0,h.sprintf)(/* translators: Number of items selected from list. */ /* translators: Number of items selected from list. */
(0,h._n)("%d item selected","%d items selected",e,"woocommerce"),e),updated:(0,h.__)("Search results updated.","woocommerce")},_=(e,t=e)=>{const r=e.reduce(((e,t)=>{const r=t.parent||0;return e[r]||(e[r]=[]),e[r].push(t),e}),{}),s=t.reduce(((e,t)=>(e[String(t.id)]=t,e)),{});const o=["0"],i=(e={})=>e.parent?[...i(s[e.parent]),e.name]:e.name?[e.name]:[],c=e=>e.map((e=>{const t=r[e.id];return o.push(""+e.id),{...e,breadcrumbs:i(s[e.parent]),children:t&&t.length?c(t):[]}})),n=c(r[0]||[]);return Object.entries(r).forEach((([e,t])=>{o.includes(e)||n.push(...c(t||[]))})),n},j=(e,t)=>{if(!t)return e;const r=new RegExp(`(${t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")})`,"ig");return e.split(r).map(((e,t)=>r.test(e)?(0,m.jsx)("strong",{children:e},t):(0,m.jsx)(d.Fragment,{children:e},t)))};function f(e,t,r){const s=new Set(t.map((e=>e[r])));return e.filter((e=>!s.has(e[r])))}const b=window.wp.htmlEntities,y=({label:e})=>(0,m.jsx)("span",{className:"woocommerce-search-list__item-count",children:e}),v=e=>{const{item:t,search:r}=e,s=t.breadcrumbs&&t.breadcrumbs.length;return(0,m.jsxs)("span",{className:"woocommerce-search-list__item-label",children:[s?(0,m.jsx)("span",{className:"woocommerce-search-list__item-prefix",children:(o=t.breadcrumbs,1===o.length?o.slice(0,1).toString():2===o.length?o.slice(0,1).toString()+" › "+o.slice(-1).toString():o.slice(0,1).toString()+" … "+o.slice(-1).toString())}):null,(0,m.jsx)("span",{className:"woocommerce-search-list__item-name",children:j((0,b.decodeEntities)(t.name),r)})]});var o},S=({countLabel:e,className:t,depth:r=0,controlId:s="",item:o,isSelected:i,isSingle:c,onSelect:n,search:l="",selected:h,useExpandedPanelId:u,...x})=>{const[p,w]=u,E=null!=e&&void 0!==o.count&&null!==o.count,_=!!o.breadcrumbs?.length,S=!!o.children?.length,k=p===o.id,C=(0,g.A)(["woocommerce-search-list__item",`depth-${r}`,t],{"has-breadcrumbs":_,"has-children":S,"has-count":E,"is-expanded":k,"is-radio-button":c});(0,d.useEffect)((()=>{S&&i&&w(o.id)}),[o,S,i,w]);const P=x.name||`search-list-item-${s}`,O=`${P}-${o.id}`,N=(0,d.useCallback)((()=>{w(k?-1:Number(o.id))}),[k,o.id,w]);return S?(0,m.jsx)("div",{className:C,onClick:N,onKeyDown:e=>"Enter"===e.key||" "===e.key?N():null,role:"treeitem",tabIndex:0,children:c?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("input",{type:"radio",id:O,name:P,value:o.value,onChange:n(o),onClick:e=>e.stopPropagation(),checked:i,className:"woocommerce-search-list__item-input",...x}),(0,m.jsx)(v,{item:o,search:l}),E?(0,m.jsx)(y,{label:e||o.count}):null]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(a.CheckboxControl,{className:"woocommerce-search-list__item-input",checked:i,...!i&&o.children.some((e=>h.find((t=>t.id===e.id))))?{indeterminate:!0}:{},label:j((0,b.decodeEntities)(o.name),l),onChange:()=>{i?n(f(h,o.children,"id"))():n(function(e,t){const r=f(t,e,"id");return[...e,...r]}(h,o.children))()},onClick:e=>e.stopPropagation()}),E?(0,m.jsx)(y,{label:e||o.count}):null]})}):(0,m.jsxs)("label",{htmlFor:O,className:C,children:[c?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("input",{...x,type:"radio",id:O,name:P,value:o.value,onChange:n(o),checked:i,className:"woocommerce-search-list__item-input"}),(0,m.jsx)(v,{item:o,search:l})]}):(0,m.jsx)(a.CheckboxControl,{...x,id:O,name:P,className:"woocommerce-search-list__item-input",value:(0,b.decodeEntities)(o.value),label:j((0,b.decodeEntities)(o.name),l),onChange:n(o),checked:i}),E?(0,m.jsx)(y,{label:e||o.count}):null]})};var k=r(3028);r(5022);const C=({id:e,label:t,popoverContents:r,remove:s,screenReaderLabel:o,className:c=""})=>{const[n,l]=(0,d.useState)(!1),u=(0,w.useInstanceId)(C);if(o=o||t,!t)return null;t=(0,b.decodeEntities)(t);const x=(0,g.A)("woocommerce-tag",c,{"has-remove":!!s}),p=`woocommerce-tag__label-${u}`,E=(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:"screen-reader-text",children:o}),(0,m.jsx)("span",{"aria-hidden":"true",children:t})]});return(0,m.jsxs)("span",{className:x,children:[r?(0,m.jsx)(a.Button,{className:"woocommerce-tag__text",id:p,onClick:()=>l(!0),children:E}):(0,m.jsx)("span",{className:"woocommerce-tag__text",id:p,children:E}),r&&n&&(0,m.jsx)(a.Popover,{onClose:()=>l(!1),children:r}),s&&(0,m.jsx)(a.Button,{className:"woocommerce-tag__remove",onClick:s(e),label:(0,h.sprintf)(
// Translators: %s label.
// Translators: %s label.
(0,h.__)("Remove %s","woocommerce"),t),"aria-describedby":p,children:(0,m.jsx)(i.A,{icon:k.A,size:20,className:"clear-icon",role:"img"})})]})},P=C;r(1939);const O=e=>(0,m.jsx)(S,{...e}),N=e=>{const{list:t,selected:r,renderItem:s,depth:o=0,loadMoreChildrenText:i,onLoadMoreChildren:c,totalChildren:n,onSelect:l,instanceId:a,isSingle:u,search:x,useExpandedPanelId:p}=e,[g]=p;return t?(0,m.jsx)(m.Fragment,{children:t.map((t=>{var w;const E=null!==(w=t.children?.length)&&void 0!==w?w:0,_=E&&!u?t.children?.every((({id:e})=>r.find((t=>t.id===e)))):!!r.find((({id:e})=>e===t.id)),j=E&&g===t.id,f=n?.[t.id],b="number"==typeof f&&E<f;return(0,m.jsxs)(d.Fragment,{children:[(0,m.jsx)("li",{children:s({item:t,isSelected:_,onSelect:l,isSingle:u,selected:r,search:x,depth:o,useExpandedPanelId:p,controlId:a})}),j?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(N,{...e,list:t.children,depth:o+1}),c&&b?(0,m.jsx)("li",{children:(0,m.jsx)("button",{type:"button",className:"woocommerce-search-list__item woocommerce-search-list__item-load-more",onClick:()=>c(),children:i||(0,h.__)("Load more","woocommerce")})}):null]}):null]},t.id)}))}):null},A=({isLoading:e,isSingle:t,selected:r,messages:s,onChange:o,onRemove:i})=>{if(e||t||!r)return null;const c=r.length;return(0,m.jsxs)("div",{className:"woocommerce-search-list__selected",children:[(0,m.jsxs)("div",{className:"woocommerce-search-list__selected-header",children:[(0,m.jsx)("strong",{children:s.selected(c)}),c>0?(0,m.jsx)(a.Button,{variant:"link",isDestructive:!0,onClick:()=>o([]),"aria-label":s.clear,children:(0,h.__)("Clear all","woocommerce")}):null]}),c>0?(0,m.jsx)("ul",{children:r.map(((e,t)=>(0,m.jsx)("li",{children:(0,m.jsx)(P,{label:e.name,id:e.id,remove:i})},t)))}):null]})},T=({filteredList:e,search:t,onSelect:r,instanceId:s,useExpandedPanelId:o,...c})=>{const{messages:n,renderItem:l,selected:a,isSingle:d,loadMoreChildrenText:u,onLoadMoreChildren:x,totalChildren:g}=c,w=l||O;return 0===e.length?(0,m.jsxs)("div",{className:"woocommerce-search-list__list is-not-found",children:[(0,m.jsx)("span",{className:"woocommerce-search-list__not-found-icon",children:(0,m.jsx)(i.A,{icon:p.A,role:"img"})}),(0,m.jsx)("span",{className:"woocommerce-search-list__not-found-text",children:t?(0,h.sprintf)(n.noResults,t):n.noItems})]}):(0,m.jsx)("ul",{className:"woocommerce-search-list__list",children:(0,m.jsx)(N,{useExpandedPanelId:o,list:e,selected:a,renderItem:w,loadMoreChildrenText:u,onLoadMoreChildren:x,totalChildren:g,onSelect:r,instanceId:s,isSingle:d,search:t})})},I=e=>{const{className:t="",isCompact:r,isHierarchical:s,isLoading:o,isSingle:i,list:c,messages:n=E,onChange:l,onSearch:u,selected:x,type:p="text",debouncedSpeak:j}=e,[f,b]=(0,d.useState)(""),y=(0,d.useState)(-1),v=(0,w.useInstanceId)(I),S=(0,d.useMemo)((()=>({...E,...n})),[n]),k=(0,d.useMemo)((()=>((e,t,r)=>{if(!t)return r?_(e):e;const s=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),o=e.map((e=>!!s.test(e.name)&&e)).filter(Boolean);return r?_(o,e):o})(c,f,s)),[c,f,s]);(0,d.useEffect)((()=>{j&&j(S.updated)}),[j,S]),(0,d.useEffect)((()=>{"function"==typeof u&&u(f)}),[f,u]);const C=(0,d.useCallback)((e=>()=>{i&&l([]);const t=x.findIndex((({id:t})=>t===e));l([...x.slice(0,t),...x.slice(t+1)])}),[i,x,l]),P=(0,d.useCallback)((e=>()=>{Array.isArray(e)?l(e):-1===x.findIndex((({id:t})=>t===e.id))?l(i?[e]:[...x,e]):C(e.id)()}),[i,C,l,x]),O=(0,d.useCallback)((e=>{const[t]=x.filter((t=>!e.find((e=>t.id===e.id))));C(t.id)()}),[C,x]);return(0,m.jsxs)("div",{className:(0,g.A)("woocommerce-search-list",t,{"is-compact":r,"is-loading":o,"is-token":"token"===p}),children:["text"===p&&(0,m.jsx)(A,{...e,onRemove:C,messages:S}),(0,m.jsx)("div",{className:"woocommerce-search-list__search",children:"text"===p?(0,m.jsx)(a.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:S.search,type:"search",value:f,onChange:e=>b(e)}):(0,m.jsx)(a.FormTokenField,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:o,label:S.search,onChange:O,onInputChange:e=>b(e),suggestions:[],__experimentalValidateInput:()=>!1,value:o?[(0,h.__)("Loading…","woocommerce")]:x.map((e=>({...e,value:e.name}))),__experimentalShowHowTo:!1})}),o?(0,m.jsx)("div",{className:"woocommerce-search-list__list",children:(0,m.jsx)(a.Spinner,{})}):(0,m.jsx)(T,{...e,search:f,filteredList:k,messages:S,onSelect:P,instanceId:v,useExpandedPanelId:y})]})},B=((0,a.withSpokenMessages)(I),(0,o.getSetting)("wcBlocksConfig",{pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"})),R=(B.pluginUrl,B.pluginUrl,o.STORE_PAGES.shop,o.STORE_PAGES.checkout,o.STORE_PAGES.checkout,o.STORE_PAGES.privacy,o.STORE_PAGES.privacy,o.STORE_PAGES.terms,o.STORE_PAGES.terms,o.STORE_PAGES.cart,o.STORE_PAGES.cart,o.STORE_PAGES.myaccount?.permalink?o.STORE_PAGES.myaccount.permalink:(0,o.getSetting)("wpLoginUrl","/wp-login.php"),(0,o.getSetting)("localPickupEnabled",!1),(0,o.getSetting)("shippingMethodsExist",!1),(0,o.getSetting)("shippingEnabled",!0),(0,o.getSetting)("countries",{})),M=(0,o.getSetting)("countryData",{}),L={...Object.fromEntries(Object.keys(M).filter((e=>!0===M[e].allowBilling)).map((e=>[e,R[e]||""]))),...Object.fromEntries(Object.keys(M).filter((e=>!0===M[e].allowShipping)).map((e=>[e,R[e]||""])))},F=(Object.fromEntries(Object.keys(L).map((e=>[e,M[e].states||{}]))),Object.fromEntries(Object.keys(L).map((e=>[e,M[e].locale||{}]))),{address:["first_name","last_name","company","address_1","address_2","city","postcode","country","state","phone"],contact:["email"],order:[]}),G=((0,o.getSetting)("addressFieldsLocations",F).address,(0,o.getSetting)("addressFieldsLocations",F).contact,(0,o.getSetting)("addressFieldsLocations",F).order,(0,o.getSetting)("additionalOrderFields",{}),(0,o.getSetting)("additionalContactFields",{}),(0,o.getSetting)("additionalAddressFields",{}),window.wp.url),$=window.wp.apiFetch;var H=r.n($);const D=({selected:e=[],search:t="",queryArgs:r={}})=>{const s=(({selected:e=[],search:t="",queryArgs:r={}})=>{const s=B.productCount>100&&e.length>0,o=[(0,G.addQueryArgs)("/wc/store/v1/products",{per_page:100,catalog_visibility:"any",search:t,orderby:"title",order:"asc",exclude:s?e:[],...r})];if(s){const t=Math.ceil(e.length/100);for(let r=1;r<=t;r++)o.push((0,G.addQueryArgs)("/wc/store/v1/products",{catalog_visibility:"any",include:e,per_page:100,page:r}))}return o})({selected:e,search:t,queryArgs:r});return Promise.all(s.map((e=>H()({path:e})))).then((e=>[...new Map(e.flatMap((e=>e.map((e=>[e.id,{...e,parent:0}]))))).values()]))};var V=r(4347);const J=window.wp.escapeHtml,U=({message:e,type:t})=>e?"general"===t?(0,m.jsxs)("span",{children:[(0,h.__)("The following error was returned","woocommerce"),(0,m.jsx)("br",{}),(0,m.jsx)("code",{children:(0,J.escapeHTML)(e)})]}):"api"===t?(0,m.jsxs)("span",{children:[(0,h.__)("The following error was returned from the API","woocommerce"),(0,m.jsx)("br",{}),(0,m.jsx)("code",{children:(0,J.escapeHTML)(e)})]}):e:(0,h.__)("An error has prevented the block from being updated.","woocommerce"),q=({error:e})=>(0,m.jsx)("div",{className:"wc-block-error-message",children:U(e)}),z=(K=({error:e,onChange:t,onSearch:r,selected:s=[],products:o=[],isLoading:i=!0,isCompact:c=!1})=>{const n={clear:(0,h.__)("Clear all products","woocommerce"),list:(0,h.__)("Products","woocommerce"),noItems:(0,h.__)("Your store doesn't have any products.","woocommerce"),search:(0,h.__)("Search for products to display","woocommerce"),selected:e=>(0,h.sprintf)(/* translators: %d is the number of selected products. */ /* translators: %d is the number of selected products. */
(0,h._n)("%d product selected","%d products selected",e,"woocommerce"),e),updated:(0,h.__)("Product search results updated.","woocommerce")};return e?(0,m.jsx)(q,{error:e}):(0,m.jsx)(I,{className:"woocommerce-products",list:o.map((e=>{const t=e.sku?" ("+e.sku+")":"";return{...e,name:`${(0,b.decodeEntities)(e.name)}${t}`}})),isCompact:c,isLoading:i,selected:o.filter((({id:e})=>s.includes(e))),onSearch:r,onChange:t,messages:n})},({selected:e,...t})=>{const[r,s]=(0,d.useState)(!0),[o,i]=(0,d.useState)(null),[c,n]=(0,d.useState)([]),l=B.productCount>100,a=async e=>{const t=await(async e=>{if(!("json"in e))return{code:e.code||"",message:e.message,type:e.type||"general"};try{const t=await e.json();return{code:t.code||"",message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}})(e);i(t),s(!1)},h=(0,d.useRef)(e);(0,d.useEffect)((()=>{D({selected:h.current}).then((e=>{n(e),s(!1)})).catch(a)}),[h]);const u=(0,V.YQ)((t=>{D({selected:e,search:t}).then((e=>{n(e),s(!1)})).catch(a)}),400),x=(0,d.useCallback)((e=>{s(!0),u(e)}),[s,u]);return(0,m.jsx)(K,{...t,selected:e,error:o,products:c,isLoading:r,onSearch:l?x:null})}),Q=e=>{const{attributes:t,setAttributes:r}=e,{columns:s,contentVisibility:i,orderby:c,alignButtons:n}=t;return(0,m.jsxs)(l.InspectorControls,{children:[(0,m.jsxs)(a.PanelBody,{title:(0,h.__)("Layout","woocommerce"),initialOpen:!0,children:[(0,m.jsx)(a.RangeControl,{label:(0,h.__)("Columns","woocommerce"),value:s,onChange:e=>r({columns:e}),min:(0,o.getSetting)("minColumns",1),max:(0,o.getSetting)("maxColumns",6)}),(0,m.jsx)(a.ToggleControl,{label:(0,h.__)("Align Buttons","woocommerce"),help:n?(0,h.__)("Buttons are aligned vertically.","woocommerce"):(0,h.__)("Buttons follow content.","woocommerce"),checked:n,onChange:()=>r({alignButtons:!n})})]}),(0,m.jsx)(a.PanelBody,{title:(0,h.__)("Content","woocommerce"),initialOpen:!0,children:(0,m.jsx)(u,{settings:i,onChange:e=>r({contentVisibility:e})})}),(0,m.jsx)(a.PanelBody,{title:(0,h.__)("Order By","woocommerce"),initialOpen:!1,children:(0,m.jsx)(x,{setAttributes:r,value:c})}),(0,m.jsx)(a.PanelBody,{title:(0,h.__)("Products","woocommerce"),initialOpen:!1,children:(0,m.jsx)(z,{selected:t.products,onChange:(e=[])=>{const t=e.map((({id:e})=>e));r({products:t})},isCompact:!0})})]},"inspector")},W=e=>{const{attributes:t,setAttributes:r,debouncedSpeak:s,isEditing:o,setIsEditing:n}=e;return(0,m.jsxs)(a.Placeholder,{icon:(0,m.jsx)(i.A,{icon:c.A}),label:(0,h.__)("Hand-picked Products","woocommerce"),className:"wc-block-products-grid wc-block-handpicked-products",children:[(0,h.__)("Display a selection of hand-picked products in a grid.","woocommerce"),(0,m.jsxs)("div",{className:"wc-block-handpicked-products__selection",children:[(0,m.jsx)(z,{selected:t.products,onChange:(e=[])=>{const t=e.map((({id:e})=>e));r({products:t})}}),(0,m.jsx)(a.Button,{variant:"primary",onClick:()=>{n(!o),s((0,h.__)("Now displaying a preview of the Hand-picked Products block.","woocommerce"))},children:(0,h.__)("Done","woocommerce")})]})]})},Y=window.wp.serverSideRender;var K,X=r.n(Y);const Z=(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"},children:[(0,m.jsx)("title",{children:"Grid Block Preview"}),(0,m.jsx)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),(0,m.jsx)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),(0,m.jsx)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),(0,m.jsx)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),(0,m.jsx)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),(0,m.jsx)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),(0,m.jsx)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),(0,m.jsx)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),(0,m.jsx)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),(0,m.jsx)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),(0,m.jsx)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),(0,m.jsx)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,m.jsx)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"})]}),ee=e=>{const{attributes:t,name:r}=e;return t.isPreview?Z:(0,m.jsx)(X(),{block:r,attributes:t})},te=(0,a.withSpokenMessages)((e=>{const t=(0,l.useBlockProps)(),{attributes:{products:r}}=e,[s,o]=(0,d.useState)(!r.length);return(0,m.jsxs)("div",{...t,children:[(0,m.jsx)(l.BlockControls,{children:(0,m.jsx)(a.ToolbarGroup,{controls:[{icon:"edit",title:(0,h.__)("Edit selected products","woocommerce"),onClick:()=>o(!s),isActive:s}]})}),(0,m.jsx)(Q,{...e}),s?(0,m.jsx)(W,{isEditing:s,setIsEditing:o,...e}):(0,m.jsx)(a.Disabled,{children:(0,m.jsx)(ee,{...e})})]})}));(0,s.registerBlockType)(n,{icon:{src:(0,m.jsx)(i.A,{icon:c.A,className:"wc-block-editor-components-block-icon"})},attributes:{...n.attributes,columns:{type:"number",default:(0,o.getSetting)("defaultColumns",3)}},edit:te,save:()=>null})},9202:()=>{},1939:()=>{},5022:()=>{},1609:e=>{"use strict";e.exports=window.React},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},9491:e=>{"use strict";e.exports=window.wp.compose},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},5573:e=>{"use strict";e.exports=window.wp.primitives}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return s[e](r,r.exports,i),r.exports}i.m=s,e=[],i.O=(t,r,s,o)=>{if(!r){var c=1/0;for(d=0;d<e.length;d++){for(var[r,s,o]=e[d],n=!0,l=0;l<r.length;l++)(!1&o||c>=o)&&Object.keys(i.O).every((e=>i.O[e](r[l])))?r.splice(l--,1):(n=!1,o<c&&(c=o));if(n){e.splice(d--,1);var a=s();void 0!==a&&(t=a)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[r,s,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,s){if(1&s&&(e=this(e)),8&s)return e;if("object"==typeof e&&e){if(4&s&&e.__esModule)return e;if(16&s&&"function"==typeof e.then)return e}var o=Object.create(null);i.r(o);var c={};t=t||[null,r({}),r([]),r(r)];for(var n=2&s&&e;"object"==typeof n&&!~t.indexOf(n);n=r(n))Object.getOwnPropertyNames(n).forEach((t=>c[t]=()=>e[t]));return c.default=()=>e,i.d(o,c),o},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=6461,(()=>{var e={6461:0};i.O.j=t=>0===e[t];var t=(t,r)=>{var s,o,[c,n,l]=r,a=0;if(c.some((t=>0!==e[t]))){for(s in n)i.o(n,s)&&(i.m[s]=n[s]);if(l)var d=l(i)}for(t&&t(r);a<c.length;a++)o=c[a],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(d)},r=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var c=i.O(void 0,[94],(()=>i(4073)));c=i.O(c),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["handpicked-products"]=c})();