Submit
Path:
~
/
home
/
getwphos
/
public_html
/
seasons-newtheme
/
wp-content
/
plugins
/
woocommerce
/
assets
/
client
/
blocks
/
File Content:
checkout.js
(()=>{var e,t,o,r={6304:(e,t,o)=>{"use strict";o.r(t);var r=o(1609),n=o(851),c=o(5573);const s=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},(0,r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M5 3.75h14c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H5c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),(0,r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.4 10.75c0-.47.38-.85.85-.85h9.5c.47 0 .85.38.85.85v1.5c0 .47-.38.85-.85.85h-9.5a.85.85 0 01-.85-.85v-1.5zm1.2.35v.8h8.8v-.8H7.6zM12.4 15.25c0-.47.38-.85.85-.85h3.5c.47 0 .85.38.85.85v1.5c0 .47-.38.85-.85.85h-3.5a.85.85 0 01-.85-.85v-1.5zm1.2.35v.8h2.8v-.8h-2.8zM6.5 15.9a.6.6 0 01.6-.6h2.8a.6.6 0 010 1.2H7.1a.6.6 0 01-.6-.6zM6.5 7.9a.6.6 0 01.6-.6h9.8a.6.6 0 110 1.2H7.1a.6.6 0 01-.6-.6z",clipRule:"evenodd"}));var a=o(7104);const i=window.wp.blocks,l=window.wp.blockEditor;var m=o(6087),d=o(9491);const u=(0,m.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),p=()=>(0,m.useContext)(u),h=({children:e,className:t=""})=>{const[o,c]=(()=>{const[e,{width:t}]=(0,d.useResizeObserver)();let o="";return t>700?o="is-large":t>520?o="is-medium":t>400?o="is-small":t&&(o="is-mobile"),[e,o]})(),s={hasContainerWidth:""!==c,containerClassName:c,isMobile:"is-mobile"===c,isSmall:"is-small"===c,isMedium:"is-medium"===c,isLarge:"is-large"===c};return(0,r.createElement)(u.Provider,{value:s},(0,r.createElement)("div",{className:(0,n.A)(t,c)},o,e))};o(1221);const g=({children:e,className:t})=>(0,r.createElement)(h,{className:(0,n.A)("wc-block-components-sidebar-layout",t)},e),_=window.wp.data,k=(0,m.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>({})}),E=()=>(0,m.useContext)(k),b=({children:e,currentPostId:t=0,previewData:o={},currentView:n="",isPreview:c=!1})=>{const s=(0,_.useSelect)((e=>t||e("core/editor").getCurrentPostId()),[t]),a=(0,m.useCallback)(((e,t={})=>o&&e in o?o[e]:t),[o]),i={isEditor:!0,currentPostId:s,currentView:n,previewData:o,getPreviewData:a,isPreview:c};return(0,r.createElement)(k.Provider,{value:i},e)},w=window.wp.plugins,v=window.wc.wcSettings;var y,f,C,S,P,N,A,T,x,R,I=o(2294),M=o(7723);const B=(0,v.getSetting)("wcBlocksConfig",{pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),O=B.pluginUrl+"assets/images/",D=(B.pluginUrl,null===(y=v.STORE_PAGES.shop)||void 0===y||y.permalink,null===(f=v.STORE_PAGES.checkout)||void 0===f?void 0:f.id),L=(null===(C=v.STORE_PAGES.checkout)||void 0===C||C.permalink,null===(S=v.STORE_PAGES.privacy)||void 0===S?void 0:S.permalink),F=(null===(P=v.STORE_PAGES.privacy)||void 0===P||P.title,null===(N=v.STORE_PAGES.terms)||void 0===N?void 0:N.permalink),j=(null===(A=v.STORE_PAGES.terms)||void 0===A||A.title,null===(T=v.STORE_PAGES.cart)||void 0===T?void 0:T.id),U=null===(x=v.STORE_PAGES.cart)||void 0===x?void 0:x.permalink,H=(null!==(R=v.STORE_PAGES.myaccount)&&void 0!==R&&R.permalink?v.STORE_PAGES.myaccount.permalink:(0,v.getSetting)("wpLoginUrl","/wp-login.php"),(0,v.getSetting)("localPickupEnabled",!1)),Y=((0,v.getSetting)("shippingMethodsExist",!1),(0,v.getSetting)("countries",{})),V=(0,v.getSetting)("countryData",{}),K=Object.fromEntries(Object.keys(V).filter((e=>!0===V[e].allowBilling)).map((e=>[e,Y[e]||""]))),$=Object.fromEntries(Object.keys(V).filter((e=>!0===V[e].allowBilling)).map((e=>[e,V[e].states||[]]))),z=Object.fromEntries(Object.keys(V).filter((e=>!0===V[e].allowShipping)).map((e=>[e,Y[e]||""]))),q=Object.fromEntries(Object.keys(V).filter((e=>!0===V[e].allowShipping)).map((e=>[e,V[e].states||[]]))),W=Object.fromEntries(Object.keys(V).map((e=>[e,V[e].locale||[]]))),G={address:["first_name","last_name","company","address_1","address_2","city","postcode","country","state","phone"],contact:["email"],order:[]},Z=(0,v.getSetting)("addressFieldsLocations",G).address,J=(0,v.getSetting)("addressFieldsLocations",G).contact,X=(0,v.getSetting)("addressFieldsLocations",G).order,Q=((0,v.getSetting)("additionalOrderFields",{}),(0,v.getSetting)("additionalContactFields",{}),(0,v.getSetting)("additionalAddressFields",{}),({imageUrl:e=`${O}/block-error.svg`,header:t=(0,M.__)("Oops!","woocommerce"),text:o=(0,M.__)("There was an error loading the content.","woocommerce"),errorMessage:n,errorMessagePrefix:c=(0,M.__)("Error:","woocommerce"),button:s,showErrorBlock:a=!0})=>a?(0,r.createElement)("div",{className:"wc-block-error wc-block-components-error"},e&&(0,r.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:e,alt:""}),(0,r.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},t&&(0,r.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},t),o&&(0,r.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},o),n&&(0,r.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},c?c+" ":"",n),s&&(0,r.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},s))):null);o(9407);class ee extends m.Component{constructor(...e){super(...e),(0,I.A)(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:o=!0,showErrorBlock:n=!0,text:c,errorMessagePrefix:s,renderError:a,button:i}=this.props,{errorMessage:l,hasError:m}=this.state;return m?"function"==typeof a?a({errorMessage:l}):(0,r.createElement)(Q,{showErrorBlock:n,errorMessage:o?l:null,header:e,imageUrl:t,text:c,errorMessagePrefix:s,button:i}):this.props.children}}const te=ee,oe=window.wc.wcBlocksData;var re=o(4040),ne=o.n(re);let ce=function(e){return e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback",e}({});const se={},ae=(e=se,{type:t,eventType:o,id:r,callback:n,priority:c})=>{const s=e.hasOwnProperty(o)?new Map(e[o]):new Map;switch(t){case ce.ADD_EVENT_CALLBACK:return s.set(r,{priority:c,callback:n}),{...e,[o]:s};case ce.REMOVE_EVENT_CALLBACK:return s.delete(r),{...e,[o]:s}}},ie=(e,t)=>(o,r=10)=>{const n=((e,t,o=10)=>({id:Math.floor(Math.random()*Date.now()).toString(),type:ce.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:o}))(e,o,r);return t(n),()=>{var o;t((o=e,{id:n.id,type:ce.REMOVE_EVENT_CALLBACK,eventType:o}))}},le=(0,m.createContext)({onPaymentProcessing:()=>()=>()=>{},onPaymentSetup:()=>()=>()=>{}}),me=({children:e})=>{const{isProcessing:t,isIdle:o,isCalculating:n,hasError:c}=(0,_.useSelect)((e=>{const t=e(oe.CHECKOUT_STORE_KEY);return{isProcessing:t.isProcessing(),isIdle:t.isIdle(),hasError:t.hasError(),isCalculating:t.isCalculating()}})),{isPaymentReady:s}=(0,_.useSelect)((e=>{const t=e(oe.PAYMENT_STORE_KEY);return{isPaymentProcessing:t.isPaymentProcessing(),isPaymentReady:t.isPaymentReady()}})),{setValidationErrors:a}=(0,_.useDispatch)(oe.validationStore),[i,l]=(0,m.useReducer)(ae,{}),{onPaymentSetup:d}=(e=>(0,m.useMemo)((()=>({onPaymentSetup:ie("payment_setup",e)})),[e]))(l),u=(0,m.useRef)(i);(0,m.useEffect)((()=>{u.current=i}),[i]);const{__internalSetPaymentProcessing:p,__internalSetPaymentIdle:h,__internalEmitPaymentProcessingEvent:g}=(0,_.useDispatch)(oe.PAYMENT_STORE_KEY);(0,m.useEffect)((()=>{!t||c||n||(p(),g(u.current,a))}),[t,c,n,p,g,a]),(0,m.useEffect)((()=>{o&&!s&&h()}),[o,s,h]),(0,m.useEffect)((()=>{c&&s&&h()}),[c,s,h]);const k={onPaymentProcessing:(0,m.useMemo)((()=>function(...e){return ne()("onPaymentProcessing",{alternative:"onPaymentSetup",plugin:"WooCommerce Blocks"}),d(...e)}),[d]),onPaymentSetup:d};return(0,r.createElement)(le.Provider,{value:k},e)},de={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},ue={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},pe={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:e=>e,shippingErrorTypes:de,onShippingRateSuccess:()=>()=>{},onShippingRateFail:()=>()=>{},onShippingRateSelectSuccess:()=>()=>{},onShippingRateSelectFail:()=>()=>{}},he=(e,{type:t})=>Object.values(de).includes(t)?t:e,ge="shipping_rates_success",_e="shipping_rates_fail",ke="shipping_rate_select_success",Ee="shipping_rate_select_fail",be=e=>({onSuccess:ie(ge,e),onFail:ie(_e,e),onSelectSuccess:ie(ke,e),onSelectFail:ie(Ee,e)}),we=window.wc.wcTypes;let ve=function(e){return e.SUCCESS="success",e.FAIL="failure",e.ERROR="error",e}({}),ye=function(e){return e.CART="wc/cart",e.CHECKOUT="wc/checkout",e.PAYMENTS="wc/checkout/payments",e.EXPRESS_PAYMENTS="wc/checkout/express-payments",e.CONTACT_INFORMATION="wc/checkout/contact-information",e.SHIPPING_ADDRESS="wc/checkout/shipping-address",e.BILLING_ADDRESS="wc/checkout/billing-address",e.SHIPPING_METHODS="wc/checkout/shipping-methods",e.CHECKOUT_ACTIONS="wc/checkout/checkout-actions",e.ORDER_INFORMATION="wc/checkout/additional-information",e}({});const fe=async(e,t,o)=>{const r=((e,t)=>e[t]?Array.from(e[t].values()).sort(((e,t)=>e.priority-t.priority)):[])(e,t),n=[];for(const e of r)try{const t=await Promise.resolve(e.callback(o));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n};var Ce=o(458),Se=o.n(Ce);const Pe=window.wp.htmlEntities,Ne=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=(0,M.sprintf)(/* translators: %s Field label. */ /* translators: %s Field label. */ (0,M.__)("%s (optional)","woocommerce"),e.label)),e.priority&&((0,we.isNumber)(e.priority)&&(t.index=e.priority),(0,we.isString)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},Ae=Object.entries(W).map((([e,t])=>[e,Object.entries(t).map((([e,t])=>[e,Ne(t)])).reduce(((e,[t,o])=>(e[t]=o,e)),{})])).reduce(((e,[t,o])=>(e[t]=o,e)),{}),Te=(e,t,o="")=>{const r=o&&void 0!==Ae[o]?Ae[o]:{};return e.map((e=>({key:e,...t[e]||{},...r[e]||{}}))).sort(((e,t)=>e.index-t.index))},xe=window.wp.url,Re=(e,t)=>e in t,Ie=e=>{const t=Te(Z,v.defaultFields,e.country),o=Object.assign({},e);return t.forEach((({key:t="",hidden:r=!1})=>{r&&Re(t,e)&&(o[t]="")})),o},Me=(e,t=[])=>{if(!e.country)return!1;const o=Te(Z,v.defaultFields,e.country);return(t.length>0?Object.values(o).filter((({key:e})=>t.includes(e))):o).every((({key:t="",hidden:o=!1,required:r=!1})=>!(!o&&r)||Re(t,e)&&""!==e[t]))},Be=window.CustomEvent||null,Oe=(e,t,o=!1,r=!1)=>{if("function"!=typeof jQuery)return()=>{};const n=()=>{((e,{bubbles:t=!1,cancelable:o=!1,element:r,detail:n={}})=>{if(!Be)return;r||(r=document.body);const c=new Be(e,{bubbles:t,cancelable:o,detail:n});r.dispatchEvent(c)})(t,{bubbles:o,cancelable:r})};return jQuery(document).on(e,n),()=>jQuery(document).off(e,n)},De=e=>{const t=null==e?void 0:e.detail;t&&t.preserveCartData||(0,_.dispatch)(oe.CART_STORE_KEY).invalidateResolutionForStore()},Le=e=>{(null!=e&&e.persisted||"back_forward"===(window.performance&&window.performance.getEntriesByType("navigation").length?window.performance.getEntriesByType("navigation")[0].type:""))&&(0,_.dispatch)(oe.CART_STORE_KEY).invalidateResolutionForStore()},Fe=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},je={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},Ue={...je,email:""},He={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:oe.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},Ye=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(0,Pe.decodeEntities)(t)]))),Ve={cartCoupons:oe.EMPTY_CART_COUPONS,cartItems:oe.EMPTY_CART_ITEMS,cartFees:oe.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,crossSellsProducts:oe.EMPTY_CART_CROSS_SELLS,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:oe.EMPTY_CART_ITEM_ERRORS,cartTotals:He,cartIsLoading:!0,cartErrors:oe.EMPTY_CART_ERRORS,billingData:Ue,billingAddress:Ue,shippingAddress:je,shippingRates:oe.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentMethods:oe.EMPTY_PAYMENT_METHODS,paymentRequirements:oe.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},receiveCartContents:()=>{},extensions:oe.EMPTY_EXTENSIONS},Ke=(e={shouldSelect:!0})=>{const{shouldSelect:t}=e,{isEditor:o,previewData:r}=E(),n=null==r?void 0:r.previewCart,c=(0,m.useRef)(),s=(0,m.useRef)(Ue),a=(0,m.useRef)(je);(0,m.useEffect)((()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),(null===(e=window.wcBlocksStoreCartListeners)||void 0===e?void 0:e.count)>0)return void window.wcBlocksStoreCartListeners.count++;var e;document.body.addEventListener("wc-blocks_added_to_cart",De),document.body.addEventListener("wc-blocks_removed_from_cart",De),window.addEventListener("pageshow",Le);const t=Oe("added_to_cart","wc-blocks_added_to_cart"),o=Oe("removed_from_cart","wc-blocks_removed_from_cart");window.wcBlocksStoreCartListeners.count=1,window.wcBlocksStoreCartListeners.remove=()=>{document.body.removeEventListener("wc-blocks_added_to_cart",De),document.body.removeEventListener("wc-blocks_removed_from_cart",De),window.removeEventListener("pageshow",Le),t(),o()}})(),Fe)),[]);const i=(0,_.useSelect)(((e,{dispatch:r})=>{if(!t)return Ve;if(o)return{...Ve,cartCoupons:n.coupons,cartItems:n.items,crossSellsProducts:n.cross_sells,cartFees:n.fees,cartItemsCount:n.items_count,cartItemsWeight:n.items_weight,cartNeedsPayment:n.needs_payment,cartNeedsShipping:n.needs_shipping,cartTotals:n.totals,shippingRates:n.shipping_rates,cartHasCalculatedShipping:n.has_calculated_shipping,paymentMethods:n.payment_methods,paymentRequirements:n.payment_requirements,cartIsLoading:!1,receiveCart:"function"==typeof(null==n?void 0:n.receiveCart)?n.receiveCart:()=>{},receiveCartContents:"function"==typeof(null==n?void 0:n.receiveCartContents)?n.receiveCartContents:()=>{}};const c=e(oe.CART_STORE_KEY),i=c.getCartData(),l=c.getCartErrors(),m=c.getCartTotals(),d=!c.hasFinishedResolution("getCartData"),u=c.isCustomerDataUpdating(),{receiveCart:p,receiveCartContents:h}=r(oe.CART_STORE_KEY),g=i.fees.length>0?i.fees.map((e=>Ye(e))):oe.EMPTY_CART_FEES,_=i.coupons.length>0?i.coupons.map((e=>({...e,label:e.code}))):oe.EMPTY_CART_COUPONS,k=Ie(Ye(i.billingAddress)),E=i.needsShipping?Ie(Ye(i.shippingAddress)):k;return Se()(k,s.current)||(s.current=k),Se()(E,a.current)||(a.current=E),{cartCoupons:_,cartItems:i.items,crossSellsProducts:i.crossSells,cartFees:g,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors,cartTotals:m,cartIsLoading:d,cartErrors:l,billingData:s.current,billingAddress:s.current,shippingAddress:a.current,extensions:i.extensions,shippingRates:i.shippingRates,isLoadingRates:u,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements,receiveCart:p,receiveCartContents:h}}),[t,o]);return c.current&&Se()(c.current,i)||(c.current=i),c.current},$e=e=>e.length,ze=(0,v.getSetting)("collectableMethodIds",[]),qe=e=>ze.includes(e.method_id),We=e=>!!H&&(Array.isArray(e)?!!e.find((e=>ze.includes(e))):ze.includes(e)),Ge=e=>e.some((e=>!!e.shipping_rates.length)),Ze=e=>Object.fromEntries(e.map((({package_id:e,shipping_rates:t})=>{var o;return[e,(null===(o=t.find((e=>e.selected)))||void 0===o?void 0:o.rate_id)||""]})));var Je=o(923),Xe=o.n(Je);const Qe={currency_code:v.SITE_CURRENCY.code,currency_symbol:v.SITE_CURRENCY.symbol,currency_minor_unit:v.SITE_CURRENCY.minorUnit,currency_decimal_separator:v.SITE_CURRENCY.decimalSeparator,currency_thousand_separator:v.SITE_CURRENCY.thousandSeparator,currency_prefix:v.SITE_CURRENCY.prefix,currency_suffix:v.SITE_CURRENCY.suffix},et=e=>{const t=v.SITE_CURRENCY.minorUnit;if(2===t)return e;const o=Math.pow(10,t);return(Math.round(parseInt(e,10)/Math.pow(10,2))*o).toString()},tt=[{destination:{address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},package_id:0,name:(0,M.__)("Shipping","woocommerce"),items:[{key:"33e75ff09dd601bbe69f351039152189",name:(0,M._x)("Beanie with Logo","example product in Cart Block","woocommerce"),quantity:2},{key:"6512bd43d9caa6e02c990b0a82652dca",name:(0,M._x)("Beanie","example product in Cart Block","woocommerce"),quantity:1}],shipping_rates:[{...Qe,name:(0,M.__)("Flat rate shipping","woocommerce"),description:"",delivery_time:"",price:et("500"),taxes:"0",rate_id:"flat_rate:0",instance_id:0,meta_data:[],method_id:"flat_rate",selected:!1},{...Qe,name:(0,M.__)("Free shipping","woocommerce"),description:"",delivery_time:"",price:"0",taxes:"0",rate_id:"free_shipping:1",instance_id:0,meta_data:[],method_id:"flat_rate",selected:!0},{...Qe,name:(0,M.__)("Local pickup #1","woocommerce"),description:"",delivery_time:"",price:"0",taxes:"0",rate_id:"pickup_location:1",instance_id:1,meta_data:[{key:"pickup_location",value:"New York"},{key:"pickup_address",value:"123 Easy Street, New York, 12345"}],method_id:"pickup_location",selected:!1},{...Qe,name:(0,M.__)("Local pickup #2","woocommerce"),description:"",delivery_time:"",price:"0",taxes:"0",rate_id:"pickup_location:2",instance_id:1,meta_data:[{key:"pickup_location",value:"Los Angeles"},{key:"pickup_address",value:"123 Easy Street, Los Angeles, California, 90210"}],method_id:"pickup_location",selected:!1}]}],ot=(0,v.getSetting)("displayCartPricesIncludingTax",!1),rt={coupons:[],shipping_rates:(0,v.getSetting)("shippingMethodsExist",!1)||(0,v.getSetting)("localPickupEnabled",!1)?tt:[],items:[{key:"1",id:1,type:"simple",quantity:2,catalog_visibility:"visible",name:(0,M.__)("Beanie","woocommerce"),summary:(0,M.__)("Beanie","woocommerce"),short_description:(0,M.__)("Warm hat for winter","woocommerce"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-beanie",permalink:"https://example.org",low_stock_remaining:2,backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,quantity_limits:{minimum:1,maximum:99,multiple_of:1,editable:!0},images:[{id:10,src:O+"previews/beanie.jpg",thumbnail:O+"previews/beanie.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:(0,M.__)("Color","woocommerce"),value:(0,M.__)("Yellow","woocommerce")},{attribute:(0,M.__)("Size","woocommerce"),value:(0,M.__)("Small","woocommerce")}],prices:{...Qe,price:et(ot?"12000":"10000"),regular_price:et(ot?"120":"100"),sale_price:et(ot?"12000":"10000"),price_range:null,raw_prices:{precision:6,price:ot?"12000000":"10000000",regular_price:ot?"12000000":"10000000",sale_price:ot?"12000000":"10000000"}},totals:{...Qe,line_subtotal:et("2000"),line_subtotal_tax:et("400"),line_total:et("2000"),line_total_tax:et("400")},extensions:{},item_data:[]},{key:"2",id:2,type:"simple",quantity:1,catalog_visibility:"visible",name:(0,M.__)("Cap","woocommerce"),summary:(0,M.__)("Cap","woocommerce"),short_description:(0,M.__)("Lightweight baseball cap","woocommerce"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-cap",low_stock_remaining:null,permalink:"https://example.org",backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,quantity_limits:{minimum:1,maximum:99,multiple_of:1,editable:!0},images:[{id:11,src:O+"previews/cap.jpg",thumbnail:O+"previews/cap.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:(0,M.__)("Color","woocommerce"),value:(0,M.__)("Orange","woocommerce")}],prices:{...Qe,price:et(ot?"2400":"2000"),regular_price:et(ot?"2400":"2000"),sale_price:et(ot?"2400":"2000"),price_range:null,raw_prices:{precision:6,price:ot?"24000000":"20000000",regular_price:ot?"24000000":"20000000",sale_price:ot?"24000000":"20000000"}},totals:{...Qe,line_subtotal:et("2000"),line_subtotal_tax:et("400"),line_total:et("2000"),line_total_tax:et("400")},extensions:{},item_data:[]}],cross_sells:[{id:1,name:(0,M.__)("Polo","woocommerce"),slug:"polo",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-polo",short_description:(0,M.__)("Polo","woocommerce"),description:(0,M.__)("Polo","woocommerce"),on_sale:!1,prices:{...Qe,price:et(ot?"24000":"20000"),regular_price:et(ot?"24000":"20000"),sale_price:et(ot?"12000":"10000"),price_range:null},price_html:"",average_rating:"4.5",review_count:2,images:[{id:17,src:O+"previews/polo.jpg",thumbnail:O+"previews/polo.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:2,name:(0,M.__)("Long Sleeve Tee","woocommerce"),slug:"long-sleeve-tee",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-long-sleeve-tee",short_description:(0,M.__)("Long Sleeve Tee","woocommerce"),description:(0,M.__)("Long Sleeve Tee","woocommerce"),on_sale:!1,prices:{...Qe,price:et(ot?"30000":"25000"),regular_price:et(ot?"30000":"25000"),sale_price:et(ot?"30000":"25000"),price_range:null},price_html:"",average_rating:"4",review_count:2,images:[{id:17,src:O+"previews/long-sleeve-tee.jpg",thumbnail:O+"previews/long-sleeve-tee.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:3,name:(0,M.__)("Hoodie with Zipper","woocommerce"),slug:"hoodie-with-zipper",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-hoodie-with-zipper",short_description:(0,M.__)("Hoodie with Zipper","woocommerce"),description:(0,M.__)("Hoodie with Zipper","woocommerce"),on_sale:!0,prices:{...Qe,price:et(ot?"15000":"12500"),regular_price:et(ot?"30000":"25000"),sale_price:et(ot?"15000":"12500"),price_range:null},price_html:"",average_rating:"1",review_count:2,images:[{id:17,src:O+"previews/hoodie-with-zipper.jpg",thumbnail:O+"previews/hoodie-with-zipper.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:4,name:(0,M.__)("Hoodie with Logo","woocommerce"),slug:"hoodie-with-logo",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-hoodie-with-logo",short_description:(0,M.__)("Polo","woocommerce"),description:(0,M.__)("Polo","woocommerce"),on_sale:!1,prices:{...Qe,price:et(ot?"4500":"4250"),regular_price:et(ot?"4500":"4250"),sale_price:et(ot?"4500":"4250"),price_range:null},price_html:"",average_rating:"5",review_count:2,images:[{id:17,src:O+"previews/hoodie-with-logo.jpg",thumbnail:O+"previews/hoodie-with-logo.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:5,name:(0,M.__)("Hoodie with Pocket","woocommerce"),slug:"hoodie-with-pocket",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-hoodie-with-pocket",short_description:(0,M.__)("Hoodie with Pocket","woocommerce"),description:(0,M.__)("Hoodie with Pocket","woocommerce"),on_sale:!0,prices:{...Qe,price:et(ot?"3500":"3250"),regular_price:et(ot?"4500":"4250"),sale_price:et(ot?"3500":"3250"),price_range:null},price_html:"",average_rating:"3.75",review_count:4,images:[{id:17,src:O+"previews/hoodie-with-pocket.jpg",thumbnail:O+"previews/hoodie-with-pocket.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:6,name:(0,M.__)("T-Shirt","woocommerce"),slug:"t-shirt",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-t-shirt",short_description:(0,M.__)("T-Shirt","woocommerce"),description:(0,M.__)("T-Shirt","woocommerce"),on_sale:!1,prices:{...Qe,price:et(ot?"1800":"1500"),regular_price:et(ot?"1800":"1500"),sale_price:et(ot?"1800":"1500"),price_range:null},price_html:"",average_rating:"3",review_count:2,images:[{id:17,src:O+"previews/tshirt.jpg",thumbnail:O+"previews/tshirt.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}}],fees:[{id:"fee",name:(0,M.__)("Fee","woocommerce"),totals:{...Qe,total:et("100"),total_tax:et("20")}}],items_count:3,items_weight:0,needs_payment:!0,needs_shipping:(0,v.getSetting)("shippingEnabled",!0),has_calculated_shipping:!0,shipping_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},billing_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},totals:{...Qe,total_items:et("4000"),total_items_tax:et("800"),total_fees:et("100"),total_fees_tax:et("20"),total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:et("820"),total_price:et("4920"),tax_lines:[{name:(0,M.__)("Sales tax","woocommerce"),rate:"20%",price:et("820")}]},errors:[],payment_methods:["cod","bacs","cheque"],payment_requirements:["products"],extensions:{}},nt=window.wp.hooks,ct=()=>({dispatchStoreEvent:(0,m.useCallback)(((e,t={})=>{try{(0,nt.doAction)(`experimental__woocommerce_blocks-${e}`,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:(0,m.useCallback)(((e,t={})=>{try{(0,nt.doAction)(`experimental__woocommerce_blocks-checkout-${e}`,{...t,storeCart:(0,_.select)("wc/store/cart").getCartData()})}catch(e){console.error(e)}}),[])}),st=()=>{const{isEditor:e}=E(),{shippingRates:t,needsShipping:o,hasCalculatedShipping:r,isLoadingRates:n,isCollectable:c,isSelectingRate:s}=(0,_.useSelect)((t=>{const o=t(oe.CART_STORE_KEY),r=e?rt.shipping_rates:o.getShippingRates();return{shippingRates:r,needsShipping:e?rt.needs_shipping:o.getNeedsShipping(),hasCalculatedShipping:e?rt.has_calculated_shipping:o.getHasCalculatedShipping(),isLoadingRates:!e&&o.isCustomerDataUpdating(),isCollectable:r.every((({shipping_rates:e})=>e.find((({method_id:e})=>We(e))))),isSelectingRate:!e&&o.isShippingRateBeingSelected()}}),[e]),a=(0,m.useRef)({});(0,m.useEffect)((()=>{const e=Ze(t);(0,we.isObject)(e)&&!Xe()(a.current,e)&&(a.current=e)}),[t]);const{selectShippingRate:i}=(0,_.useDispatch)(oe.CART_STORE_KEY),l=We(Object.values(a.current).map((e=>e.split(":")[0]))),{dispatchCheckoutEvent:d}=ct(),u=(0,m.useCallback)(((e,t)=>{let o;void 0!==e&&(o=We(e.split(":")[0])?i(e,null):i(e,t),o.then((()=>{d("set-selected-shipping-rate",{shippingRateId:e})})).catch((e=>{(0,oe.processErrorResponse)(e)})))}),[i,d]);return{isSelectingRate:s,selectedRates:a.current,selectShippingRate:u,shippingRates:t,needsShipping:o,hasCalculatedShipping:r,isLoadingRates:n,isCollectable:c,hasSelectedLocalPickup:l}},{NONE:at,INVALID_ADDRESS:it,UNKNOWN:lt}=de,mt=(0,m.createContext)(pe),dt=()=>(0,m.useContext)(mt),ut=({children:e})=>{const{__internalIncrementCalculating:t,__internalDecrementCalculating:o}=(0,_.useDispatch)(oe.CHECKOUT_STORE_KEY),{shippingRates:n,isLoadingRates:c,cartErrors:s}=Ke(),{selectedRates:a,isSelectingRate:i}=st(),[l,d]=(0,m.useReducer)(he,at),[u,p]=(0,m.useReducer)(ae,{}),h=(0,m.useRef)(u),g=(0,m.useMemo)((()=>({onShippingRateSuccess:be(p).onSuccess,onShippingRateFail:be(p).onFail,onShippingRateSelectSuccess:be(p).onSelectSuccess,onShippingRateSelectFail:be(p).onSelectFail})),[p]);(0,m.useEffect)((()=>{h.current=u}),[u]),(0,m.useEffect)((()=>{c?t():o()}),[c,t,o]),(0,m.useEffect)((()=>{i?t():o()}),[t,o,i]),(0,m.useEffect)((()=>{s.length>0&&s.some((e=>!(!e.code||!Object.values(ue).includes(e.code))))?d({type:it}):d({type:at})}),[s]);const k=(0,m.useMemo)((()=>({isPristine:l===at,isValid:l===at,hasInvalidAddress:l===it,hasError:l===lt||l===it})),[l]);(0,m.useEffect)((()=>{c||0!==n.length&&!k.hasError||fe(h.current,_e,{hasInvalidAddress:k.hasInvalidAddress,hasError:k.hasError})}),[n,c,k.hasError,k.hasInvalidAddress]),(0,m.useEffect)((()=>{!c&&n.length>0&&!k.hasError&&fe(h.current,ge,n)}),[n,c,k.hasError]),(0,m.useEffect)((()=>{i||(k.hasError?fe(h.current,Ee,{hasError:k.hasError,hasInvalidAddress:k.hasInvalidAddress}):fe(h.current,ke,a.current))}),[a,i,k.hasError,k.hasInvalidAddress]);const E={shippingErrorStatus:k,dispatchErrorStatus:d,shippingErrorTypes:de,...g};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(mt.Provider,{value:E},e))};function pt(e,t){const o=(0,m.useRef)();return(0,m.useEffect)((()=>{o.current===e||t&&!t(e,o.current)||(o.current=e)}),[e,t]),o.current}const ht={},gt={},_t=()=>ht,kt=()=>gt,Et=(0,m.createContext)({onSubmit:()=>{},onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},onCheckoutSuccess:()=>()=>{},onCheckoutFail:()=>()=>{},onCheckoutValidation:()=>()=>{}}),bt=()=>(0,m.useContext)(Et),wt=({children:e,redirectUrl:t})=>{const o=_t(),n=kt(),{isEditor:c}=E(),{__internalUpdateAvailablePaymentMethods:s}=(0,_.useDispatch)(oe.PAYMENT_STORE_KEY);(0,m.useEffect)((()=>{(c||0!==Object.keys(o).length||0!==Object.keys(n).length)&&s()}),[c,o,n,s]);const{__internalSetRedirectUrl:a,__internalEmitValidateEvent:i,__internalEmitAfterProcessingEvents:l,__internalSetBeforeProcessing:d}=(0,_.useDispatch)(oe.CHECKOUT_STORE_KEY),{checkoutRedirectUrl:u,checkoutStatus:p,isCheckoutBeforeProcessing:h,isCheckoutAfterProcessing:g,checkoutHasError:k,checkoutOrderId:b,checkoutOrderNotes:w,checkoutCustomerId:v}=(0,_.useSelect)((e=>{const t=e(oe.CHECKOUT_STORE_KEY);return{checkoutRedirectUrl:t.getRedirectUrl(),checkoutStatus:t.getCheckoutStatus(),isCheckoutBeforeProcessing:t.isBeforeProcessing(),isCheckoutAfterProcessing:t.isAfterProcessing(),checkoutHasError:t.hasError(),checkoutOrderId:t.getOrderId(),checkoutOrderNotes:t.getOrderNotes(),checkoutCustomerId:t.getCustomerId()}}));t&&t!==u&&a(t);const{setValidationErrors:y}=(0,_.useDispatch)(oe.validationStore),{dispatchCheckoutEvent:f}=ct(),C=Object.values(ye).filter((e=>e!==ye.PAYMENTS&&e!==ye.EXPRESS_PAYMENTS)),S=(0,_.useSelect)((e=>{const{getNotices:t}=e("core/notices");return C.reduce(((e,o)=>[...e,...t(o)]),[])}),[C]),{paymentNotices:P,expressPaymentNotices:N}=(0,_.useSelect)((e=>{const{getNotices:t}=e("core/notices");return{paymentNotices:t(ye.PAYMENTS),expressPaymentNotices:t(ye.EXPRESS_PAYMENTS)}}),[]),[A,T]=(0,m.useReducer)(ae,{}),x=(0,m.useRef)(A),{onCheckoutValidation:R,onCheckoutSuccess:I,onCheckoutFail:M}=(e=>(0,m.useMemo)((()=>({onCheckoutSuccess:ie("checkout_success",e),onCheckoutFail:ie("checkout_fail",e),onCheckoutValidation:ie("checkout_validation",e)})),[e]))(T);(0,m.useEffect)((()=>{x.current=A}),[A]);const B=(0,m.useMemo)((()=>function(...e){return ne()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidation",plugin:"WooCommerce Blocks"}),R(...e)}),[R]),O=(0,m.useMemo)((()=>function(...e){return ne()("onCheckoutValidationBeforeProcessing",{since:"9.7.0",alternative:"onCheckoutValidation",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8381"}),R(...e)}),[R]),D=(0,m.useMemo)((()=>function(...e){return ne()("onCheckoutAfterProcessingWithSuccess",{since:"9.7.0",alternative:"onCheckoutSuccess",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8381"}),I(...e)}),[I]),L=(0,m.useMemo)((()=>function(...e){return ne()("onCheckoutAfterProcessingWithError",{since:"9.7.0",alternative:"onCheckoutFail",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8381"}),M(...e)}),[M]);(0,m.useEffect)((()=>{h&&i({observers:x.current,setValidationErrors:y})}),[h,y,i]);const F=pt(p),j=pt(k);(0,m.useEffect)((()=>{p===F&&k===j||g&&l({observers:x.current,notices:{checkoutNotices:S,paymentNotices:P,expressPaymentNotices:N}})}),[p,k,u,b,v,w,g,h,F,j,S,N,P,i,l]);const U={onSubmit:(0,m.useCallback)((()=>{f("submit"),d()}),[f,d]),onCheckoutBeforeProcessing:B,onCheckoutValidationBeforeProcessing:O,onCheckoutAfterProcessingWithSuccess:D,onCheckoutAfterProcessingWithError:L,onCheckoutSuccess:I,onCheckoutFail:M,onCheckoutValidation:R};return(0,r.createElement)(Et.Provider,{value:U},e)},vt=window.wp.apiFetch;var yt=o.n(vt);(0,M.__)("Something went wrong. Please contact us to get assistance.","woocommerce");const ft=window.wc.wcBlocksRegistry,Ct=(e,t,o)=>{const r=Object.keys(e).map((t=>({key:t,value:e[t]})),[]),n=`wc-${o}-new-payment-method`;return r.push({key:n,value:t}),r},St=e=>{if(!e)return;const{__internalSetCustomerId:t}=(0,_.dispatch)(oe.CHECKOUT_STORE_KEY);yt().setNonce&&"function"==typeof yt().setNonce&&yt().setNonce(e),yt().setCartHash&&"function"==typeof yt().setCartHash&&yt().setCartHash(e),null!=e&&e.get("User-ID")&&t(parseInt(e.get("User-ID")||"0",10))},Pt=()=>{const{onCheckoutValidation:e}=bt(),{additionalFields:t,customerId:o,customerPassword:r,extensionData:n,hasError:c,isBeforeProcessing:s,isComplete:a,isProcessing:i,orderNotes:l,redirectUrl:d,shouldCreateAccount:u}=(0,_.useSelect)((e=>{const t=e(oe.CHECKOUT_STORE_KEY);return{additionalFields:t.getAdditionalFields(),customerId:t.getCustomerId(),customerPassword:t.getCustomerPassword(),extensionData:t.getExtensionData(),hasError:t.hasError(),isBeforeProcessing:t.isBeforeProcessing(),isComplete:t.isComplete(),isProcessing:t.isProcessing(),orderNotes:t.getOrderNotes(),redirectUrl:t.getRedirectUrl(),shouldCreateAccount:t.getShouldCreateAccount()}})),{__internalSetHasError:p,__internalProcessCheckoutResponse:h}=(0,_.useDispatch)(oe.CHECKOUT_STORE_KEY),g=(0,_.useSelect)((e=>e(oe.validationStore).hasValidationErrors)),{shippingErrorStatus:k}=dt(),{billingAddress:E,shippingAddress:b}=(0,_.useSelect)((e=>e(oe.CART_STORE_KEY).getCustomerData())),{cartNeedsPayment:w,cartNeedsShipping:v,receiveCartContents:y}=Ke(),{activePaymentMethod:f,paymentMethodData:C,isExpressPaymentMethodActive:S,hasPaymentError:P,isPaymentReady:N,shouldSavePayment:A}=(0,_.useSelect)((e=>{const t=e(oe.PAYMENT_STORE_KEY);return{activePaymentMethod:t.getActivePaymentMethod(),paymentMethodData:t.getPaymentMethodData(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive(),hasPaymentError:t.hasPaymentError(),isPaymentReady:t.isPaymentReady(),shouldSavePayment:t.getShouldSavePaymentMethod()}}),[]),T=(0,ft.getPaymentMethods)(),x=(0,ft.getExpressPaymentMethods)(),R=(0,m.useRef)(E),I=(0,m.useRef)(b),B=(0,m.useRef)(d),[O,D]=(0,m.useState)(!1),L=(0,m.useMemo)((()=>{var e;const t={...x,...T};return null==t||null===(e=t[f])||void 0===e?void 0:e.paymentMethodId}),[f,x,T]),F=g()&&!S||P||k.hasError,j=!c&&!F&&(N||!w)&&i;(0,m.useEffect)((()=>{F===c||!i&&!s||S||p(F)}),[F,c,i,s,S,p]),(0,m.useEffect)((()=>{R.current=E,I.current=b,B.current=d}),[E,b,d]);const U=(0,m.useCallback)((()=>g()?void 0!==(0,_.select)(oe.validationStore).getValidationError("shipping-rates-error")&&{errorMessage:(0,M.__)("Sorry, this order requires a shipping option.","woocommerce")}:P?{errorMessage:(0,M.__)("There was a problem with your payment option.","woocommerce"),context:"wc/checkout/payments"}:!k.hasError||{errorMessage:(0,M.__)("There was a problem with your shipping option.","woocommerce"),context:"wc/checkout/shipping-methods"}),[g,P,k.hasError]);(0,m.useEffect)((()=>{let t;return S||(t=e(U,0)),()=>{S||"function"!=typeof t||t()}}),[e,U,S]),(0,m.useEffect)((()=>{window.localStorage.removeItem("WOOCOMMERCE_CHECKOUT_IS_CUSTOMER_DATA_DIRTY"),B.current&&(window.location.href=B.current)}),[a]);const H=(0,m.useCallback)((async()=>{if(O)return;D(!0),(()=>{const e=(0,_.select)("wc/store/store-notices").getRegisteredContainers(),{removeNotice:t}=(0,_.dispatch)("core/notices"),{getNotices:o}=(0,_.select)("core/notices");e.forEach((e=>{o(e).forEach((o=>{t(o.id,e)}))}))})();const e=w?{payment_method:L,payment_data:Ct(C,A,f)}:{},c={additional_fields:t,billing_address:Ie(R.current),create_account:u,customer_note:l,customer_password:r,extensions:{...n},shipping_address:v?Ie(I.current):void 0,...e};yt()({path:"/wc/store/v1/checkout",method:"POST",data:c,cache:"no-store",parse:!1}).then((e=>{if((0,we.assertResponseIsValid)(e),St(e.headers),!e.ok)throw e;return e.json()})).then((e=>{h(e),D(!1)})).catch((e=>{St(null==e?void 0:e.headers);try{e.json().then((e=>e)).then((e=>{var t;null!==(t=e.data)&&void 0!==t&&t.cart&&y(e.data.cart),(0,oe.processErrorResponse)(e),h(e)}))}catch{let e=(0,M.__)("Something went wrong when placing the order. Check your email for order updates before retrying.","woocommerce");0!==o&&(e=(0,M.__)("Something went wrong when placing the order. Check your account's order history or your email for order updates before retrying.","woocommerce")),(0,oe.processErrorResponse)({code:"unknown_error",message:e,data:null})}p(!0),D(!1)}))}),[O,w,L,C,A,f,l,u,o,r,n,t,v,y,p,h]);return(0,m.useEffect)((()=>{j&&!O&&H()}),[H,j,O]),null},Nt=({children:e,redirectUrl:t})=>(0,r.createElement)(wt,{redirectUrl:t},(0,r.createElement)(ut,null,(0,r.createElement)(me,null,e,(0,r.createElement)(te,{renderError:v.CURRENT_USER_IS_ADMIN?null:()=>null},(0,r.createElement)(w.PluginArea,{scope:"woocommerce-checkout"})),(0,r.createElement)(Pt,null)))),At={cc:[{method:{gateway:"credit-card",last4:"5678",brand:"Visa"},expires:"12/20",is_default:!1,tokenId:"1"}]},Tt=window.wc.blocksCheckout,xt=window.wp.coreData;var Rt=o(2172);const It=(0,m.forwardRef)((({children:e,className:t=""},o)=>(0,r.createElement)("div",{ref:o,className:(0,n.A)("wc-block-components-main",t)},e))),Mt={showOrderNotes:!0,showPolicyLinks:!0,showReturnToCart:!0,cartPageId:0,showRateAfterTaxName:!1,showFormStepNumbers:!1,defaultFields:v.defaultFields},Bt=(0,m.createContext)(Mt),Ot=()=>{const e=(0,m.useContext)(Bt);return{...Mt,...e}},Dt=["core/paragraph","core/image","core/separator"],Lt=e=>{const t=(0,Tt.applyCheckoutFilter)({filterName:"additionalCartCheckoutInnerBlockTypes",defaultValue:[],extensions:(0,_.select)(oe.CART_STORE_KEY).getCartData().extensions,arg:{block:e},validation:e=>{if(Array.isArray(e)&&e.every((e=>"string"==typeof e)))return!0;throw new Error("allowedBlockTypes filters must return an array of strings.")}});return Array.from(new Set([...(0,i.getBlockTypes)().filter((t=>((null==t?void 0:t.parent)||[]).includes(e))).map((({name:e})=>e)),...Dt,...t]))},Ft=({clientId:e,registeredBlocks:t,defaultTemplate:o=[]})=>{const r=(0,m.useRef)(t),n=(0,m.useRef)(o),c=(0,_.useRegistry)(),{isPreview:s}=E();(0,m.useEffect)((()=>{let t=!1;if(s)return;const{replaceInnerBlocks:o}=(0,_.dispatch)("core/block-editor");return c.subscribe((()=>{if(!c.select("core/block-editor").getBlock(e))return;const s=c.select("core/block-editor").getBlocks(e);if(0===s.length&&n.current.length>0&&!t){const r=(0,i.createBlocksFromInnerBlocksTemplate)(n.current);if(0!==r.length)return t=!0,void o(e,r)}const a=r.current.map((e=>(0,i.getBlockType)(e))),l=((e,t)=>{const o=t.filter((e=>e&&(({attributes:e})=>{var t,o,r;return Boolean((null===(t=e.lock)||void 0===t?void 0:t.remove)||(null===(o=e.lock)||void 0===o||null===(r=o.default)||void 0===r?void 0:r.remove))})(e))),r=[];return o.forEach((t=>{if(void 0===t)return;const o=e.find((e=>e.name===t.name));o||r.push(t)})),r})(s,a);if(0===l.length)return;let m=-1;const d=l.map((e=>{const t=n.current.findIndex((([t])=>t===e.name)),o=(0,i.createBlock)(e.name);return-1===m&&(m=(({defaultTemplatePosition:e,innerBlocks:t,currentDefaultTemplate:o})=>{switch(e){case-1:return t.length;case 0:return 0;default:const r=o.current[e-1],n=t.findIndex((({name:e})=>e===r[0]));return-1===n?e:n+1}})({defaultTemplatePosition:t,innerBlocks:s,currentDefaultTemplate:n})),o}));c.batch((()=>{c.dispatch("core/block-editor").insertBlocks(d,m,e)}))}),"core/block-editor")}),[e,s,c])};o(6619);const jt=window.wp.components,Ut=()=>{const{defaultFields:e}=Ot(),t=(e,t)=>{["phone","company","address_2"].includes(e)&&["optional","required","hidden"].includes(t)&&(0,_.dispatch)(xt.store).editEntityRecord("root","site",void 0,{[`woocommerce_checkout_${e}_field`]:t})},o=[{label:(0,M.__)("Optional","woocommerce"),value:"false"},{label:(0,M.__)("Required","woocommerce"),value:"true"}];return(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Address Fields","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("Show or hide fields in the checkout address forms.","woocommerce")),(0,r.createElement)(jt.ToggleControl,{label:(0,M.__)("Company","woocommerce"),checked:!e.company.hidden,onChange:()=>{e.company.hidden?t("company","optional"):t("company","hidden")}}),!e.company.hidden&&(0,r.createElement)(jt.RadioControl,{selected:e.company.required?"true":"false",options:o,onChange:e=>{t("company","true"===e?"required":"optional")},className:"components-base-control--nested wc-block-components-require-company-field"}),(0,r.createElement)(jt.ToggleControl,{label:(0,M.__)("Address line 2","woocommerce"),checked:!e.address_2.hidden,onChange:()=>{e.address_2.hidden?t("address_2","optional"):t("address_2","hidden")}}),!e.address_2.hidden&&(0,r.createElement)(jt.RadioControl,{selected:e.address_2.required?"true":"false",options:o,onChange:e=>{t("address_2","true"===e?"required":"optional")},className:"components-base-control--nested wc-block-components-require-address_2-field"}),(0,r.createElement)(jt.ToggleControl,{label:(0,M.__)("Phone","woocommerce"),checked:!e.phone.hidden,onChange:()=>{e.phone.hidden?t("phone","optional"):t("phone","hidden")}}),!e.phone.hidden&&(0,r.createElement)(jt.RadioControl,{selected:e.phone.required?"true":"false",options:o,onChange:e=>{t("phone","true"===e?"required":"optional")},className:"components-base-control--nested wc-block-components-require-phone-field"})))};(0,i.registerBlockType)("woocommerce/checkout-fields-block",{icon:{src:(0,r.createElement)(a.A,{icon:Rt.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e,attributes:t})=>{const o=(0,l.useBlockProps)({className:(0,n.A)("wc-block-checkout__main",null==t?void 0:t.className)}),c=Lt(Tt.innerBlockAreas.CHECKOUT_FIELDS),{showFormStepNumbers:s}=Ot(),a=[["woocommerce/checkout-express-payment-block",{},[]],["woocommerce/checkout-contact-information-block",{},[]],["woocommerce/checkout-shipping-method-block",{},[]],["woocommerce/checkout-pickup-options-block",{},[]],["woocommerce/checkout-shipping-address-block",{},[]],["woocommerce/checkout-billing-address-block",{},[]],["woocommerce/checkout-shipping-methods-block",{},[]],["woocommerce/checkout-payment-block",{},[]],["woocommerce/checkout-additional-information-block",{},[]],["woocommerce/checkout-order-note-block",{},[]],["woocommerce/checkout-terms-block",{},[]],["woocommerce/checkout-actions-block",{},[]]].filter(Boolean);return Ft({clientId:e,registeredBlocks:c,defaultTemplate:a}),(0,r.createElement)(It,{...o},(0,r.createElement)(Ut,null),(0,r.createElement)("form",{className:(0,n.A)("wc-block-components-form wc-block-checkout__form",{"wc-block-checkout__form--with-step-numbers":s})},(0,r.createElement)(l.InnerBlocks,{allowedBlocks:c,templateLock:!1,template:a,renderAppender:l.InnerBlocks.ButtonBlockAppender})))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(l.InnerBlocks.Content,null))});const Ht=(0,m.forwardRef)((({children:e,className:t=""},o)=>(0,r.createElement)("div",{ref:o,className:(0,n.A)("wc-block-components-sidebar",t)},e)));o(7765),(0,i.registerBlockType)("woocommerce/checkout-totals-block",{icon:{src:(0,r.createElement)(a.A,{icon:Rt.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e,attributes:t})=>{const o=(0,l.useBlockProps)({className:(0,n.A)("wc-block-checkout__sidebar",null==t?void 0:t.className)}),c=Lt(Tt.innerBlockAreas.CHECKOUT_TOTALS),s=[["woocommerce/checkout-order-summary-block",{},[]]];return Ft({clientId:e,registeredBlocks:c,defaultTemplate:s}),(0,r.createElement)(Ht,{...o},(0,r.createElement)(l.InnerBlocks,{allowedBlocks:c,templateLock:!1,template:s,renderAppender:l.InnerBlocks.ButtonBlockAppender}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(l.InnerBlocks.Content,null))});var Yt=o(601);const Vt=()=>{const{customerData:e,isInitialized:t}=(0,_.useSelect)((e=>{const t=e(oe.CART_STORE_KEY);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}})),{setShippingAddress:o,setBillingAddress:r}=(0,_.useDispatch)(oe.CART_STORE_KEY);return{isInitialized:t,billingAddress:e.billingAddress,shippingAddress:e.shippingAddress,setBillingAddress:r,setShippingAddress:o}},Kt=()=>{const{isEditor:e,getPreviewData:t}=E(),{needsShipping:o}=st(),{useShippingAsBilling:r,prefersCollection:n,editingBillingAddress:c,editingShippingAddress:s}=(0,_.useSelect)((e=>({useShippingAsBilling:e(oe.CHECKOUT_STORE_KEY).getUseShippingAsBilling(),prefersCollection:e(oe.CHECKOUT_STORE_KEY).prefersCollection(),editingBillingAddress:e(oe.CHECKOUT_STORE_KEY).getEditingBillingAddress(),editingShippingAddress:e(oe.CHECKOUT_STORE_KEY).getEditingShippingAddress()}))),{__internalSetUseShippingAsBilling:a,setEditingBillingAddress:i,setEditingShippingAddress:l}=(0,_.useDispatch)(oe.CHECKOUT_STORE_KEY),{billingAddress:d,setBillingAddress:u,shippingAddress:p,setShippingAddress:h}=Vt(),g=(0,m.useCallback)((e=>{u({email:e})}),[u]),k=(0,v.getSetting)("forcedBillingAddress",!1);return{shippingAddress:p,billingAddress:d,setShippingAddress:h,setBillingAddress:u,setEmail:g,defaultFields:e?t("defaultFields",v.defaultFields):v.defaultFields,useShippingAsBilling:r,setUseShippingAsBilling:a,editingBillingAddress:c,editingShippingAddress:s,setEditingBillingAddress:i,setEditingShippingAddress:l,needsShipping:o,showShippingFields:!k&&o&&!n,showShippingMethods:o&&!n,showBillingFields:!o||!r||!!n,forcedBillingAddress:k,useBillingAsShipping:k||!!n}},$t=window.wc.blocksComponents,zt=({children:e,stepHeadingContent:t})=>(0,r.createElement)("div",{className:"wc-block-components-checkout-step__heading"},(0,r.createElement)($t.Title,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},e),!!t&&(0,r.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},t)),qt=({attributes:e,setAttributes:t,className:o="",children:c})=>{const{showFormStepNumbers:s}=Ot(),{title:a="",description:i=""}=e,m=(0,l.useBlockProps)({className:(0,n.A)("wc-block-components-checkout-step",o,{"wc-block-components-checkout-step--with-step-number":s})});return(0,r.createElement)("div",{...m},(0,r.createElement)(zt,null,(0,r.createElement)(l.PlainText,{className:"",value:a,onChange:e=>t({title:e}),style:{backgroundColor:"transparent"}})),(0,r.createElement)("div",{className:"wc-block-components-checkout-step__container"},(0,r.createElement)("p",{className:"wc-block-components-checkout-step__description"},(0,r.createElement)(l.PlainText,{className:i?"":"wc-block-components-checkout-step__description-placeholder",value:i,placeholder:(0,M.__)("Optional text for this form step.","woocommerce"),onChange:e=>t({description:e}),style:{backgroundColor:"transparent"}})),(0,r.createElement)("div",{className:"wc-block-components-checkout-step__content"},c)))};o(6664);const Wt=({block:e})=>{const{"data-block":t}=(0,l.useBlockProps)(),o=Lt(e);return Ft({clientId:t,registeredBlocks:o}),(0,r.createElement)("div",{className:"wc-block-checkout__additional_fields"},(0,r.createElement)(l.InnerBlocks,{allowedBlocks:o}))},Gt=()=>(0,r.createElement)(l.InnerBlocks.Content,null);var Zt=o(4375),Jt=o(8107),Xt=o(4717);const Qt=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"],eo=({children:e,style:t={},...o})=>{const n=(0,m.useRef)(null),c=()=>{n.current&&Jt.focus.focusable.find(n.current).forEach((e=>{Qt.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")}))},s=(0,Xt.YQ)(c,0,{leading:!0});return(0,m.useLayoutEffect)((()=>{let e;return c(),n.current&&(e=new window.MutationObserver(s),e.observe(n.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),s.cancel()}}),[s]),(0,r.createElement)("div",{ref:n,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...t},...o},e)};o(2931);var to=o(224);o(5452);const oo=e=>{var t,o;const{onChange:c,options:s,label:i,value:l="",className:d,size:u,errorId:p,required:h,errorMessage:g=(0,M.__)("Please select a valid option","woocommerce"),placeholder:k,...E}=e,b=(0,m.useCallback)((e=>{c(e.target.value)}),[c]),w=(0,M.getLocaleData)(),v=["de","de_AT","de_CH"].includes(null!==(t=null==w||null===(o=w[""])||void 0===o?void 0:o.lang)&&void 0!==t?t:"en"),y=(0,m.useMemo)((()=>({value:"",label:null!=k?k:(0,M.sprintf)( // translators: %s will be label of the field. For example "country/region". // translators: %s will be label of the field. For example "country/region". (0,M.__)("Select a %s","woocommerce"),v?i:null==i?void 0:i.toLowerCase()),disabled:!!h})),[i,k,h,v]),f=(0,m.useId)(),C=E.id||`wc-blocks-components-select-${f}`,S=p||C,P=(0,m.useMemo)((()=>h&&l?s:[y].concat(s)),[h,l,y,s]),{setValidationErrors:N,clearValidationError:A}=(0,_.useDispatch)(oe.validationStore),{error:T,validationErrorId:x}=(0,_.useSelect)((e=>{const t=e(oe.validationStore);return{error:t.getValidationError(S),validationErrorId:t.getValidationErrorId(S)}}));(0,m.useEffect)((()=>(!h||l?A(S):N({[S]:{message:g,hidden:!0}}),()=>{A(S)})),[A,l,S,g,h,N]);const R=(0,_.useSelect)((e=>e(oe.validationStore).getValidationError(S||"")||{hidden:!0}));return(0,r.createElement)("div",{className:(0,n.A)(d,{"has-error":!R.hidden})},(0,r.createElement)("div",{className:"wc-blocks-components-select"},(0,r.createElement)("div",{className:"wc-blocks-components-select__container"},(0,r.createElement)("label",{htmlFor:C,className:"wc-blocks-components-select__label"},i),(0,r.createElement)("select",{className:"wc-blocks-components-select__select",id:C,size:void 0!==u?u:1,onChange:b,value:l,"aria-invalid":!(null==T||!T.message||null!=T&&T.hidden),"aria-errormessage":x,...E},P.map((e=>(0,r.createElement)("option",{key:e.value,value:e.value,"data-alternate-values":`[${e.label}]`,disabled:void 0!==e.disabled&&e.disabled},e.label)))),(0,r.createElement)(a.A,{className:"wc-blocks-components-select__expand",icon:to.A}))),(0,r.createElement)($t.ValidationInputError,{propertyName:S}))},ro=({className:e,countries:t,id:o,label:c,onChange:s,value:a="",autoComplete:i="off",required:l=!1})=>{const d=(0,m.useMemo)((()=>Object.entries(t).map((([e,t])=>({value:e,label:(0,Pe.decodeEntities)(t)})))),[t]);return(0,r.createElement)(oo,{className:(0,n.A)(e,"wc-block-components-country-input"),id:o,label:c||"",onChange:s,options:d,value:a,required:l,autoComplete:i})},no=e=>{const{...t}=e;return(0,r.createElement)(ro,{countries:K,...t})},co=e=>(0,r.createElement)(ro,{countries:z,...e});o(8824);const so=(e,t)=>{const o=t.find((t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase()));return o?o.value:""},ao=({className:e,id:t,states:o,country:c,label:s,onChange:a,autoComplete:i="off",value:l="",required:d=!1})=>{const u=o[c],p=(0,m.useMemo)((()=>u&&Object.keys(u).length>0?Object.keys(u).map((e=>({value:e,label:(0,Pe.decodeEntities)(u[e])}))):[]),[u]),h=(0,m.useCallback)((e=>{const t=p.length>0?so(e,p):e;t!==l&&a(t)}),[a,p,l]),g=(0,m.useRef)(l);return(0,m.useEffect)((()=>{g.current!==l&&(g.current=l)}),[l]),(0,m.useEffect)((()=>{if(p.length>0&&g.current){const e=so(g.current,p);e!==g.current&&h(e)}}),[p,h]),p.length>0?(0,r.createElement)(oo,{className:(0,n.$)(e,"wc-block-components-state-input"),options:p,label:s||"",id:t,onChange:h,value:l,autoComplete:i,required:d}):(0,r.createElement)($t.ValidatedTextInput,{className:e,id:t,label:s,onChange:h,autoComplete:i,value:l,required:d})},io=e=>{const{...t}=e;return(0,r.createElement)(ao,{states:$,...t})},lo=e=>(0,r.createElement)(ao,{states:q,...e});function mo(e){const t=(0,m.useRef)(e);return Xe()(e,t.current)||(t.current=e),t.current}var uo=o(1777);o(5684);const po=({field:e,props:t,onChange:o,value:n})=>{var c,s,a;const i=null!==(c=null==e?void 0:e.required)&&void 0!==c&&c,l=pt(i),[d,u]=(0,m.useState)((()=>Boolean(n)||i)),p=(0,M.getLocaleData)(),h=["de","de_AT","de_CH"].includes(null!==(s=null==p||null===(a=p[""])||void 0===a?void 0:a.lang)&&void 0!==s?s:"en");(0,m.useEffect)((()=>{l!==i&&u(Boolean(n)||i)}),[n,l,i]);const g=(0,m.useCallback)((t=>{o(e.key,t),u(!0)}),[e.key,o]);return(0,r.createElement)(m.Fragment,null,d?(0,r.createElement)($t.ValidatedTextInput,{...t,type:e.type,label:i?e.label:e.optionalLabel,className:`wc-block-components-address-form__${e.key}`,value:n,onChange:t=>o(e.key,t)}):(0,r.createElement)(m.Fragment,null,(0,r.createElement)(uo.$,{render:(0,r.createElement)("span",null),className:"wc-block-components-address-form__address_2-toggle",onClick:()=>u(!0)},(0,M.sprintf)( // translators: %s: address 2 field label. // translators: %s: address 2 field label. (0,M.__)("+ Add %s","woocommerce"),h?e.label:e.label.toLowerCase())),(0,r.createElement)("input",{type:"text",tabIndex:-1,className:"wc-block-components-address-form__address_2-hidden-input","aria-hidden":"true","aria-label":e.label,autoComplete:e.autocomplete,id:null==t?void 0:t.id,value:n,onChange:e=>g(e.target.value)})))},ho=(e,t,o)=>({id:`${t}-${null==e?void 0:e.key}`.replaceAll("/","-"),errorId:`${o}_${null==e?void 0:e.key}`,label:(null!=e&&e.required?null==e?void 0:e.label:null==e?void 0:e.optionalLabel)||"",autoCapitalize:null==e?void 0:e.autocapitalize,autoComplete:null==e?void 0:e.autocomplete,errorMessage:null==e?void 0:e.errorMessage,required:null==e?void 0:e.required,placeholder:null==e?void 0:e.placeholder,className:`wc-block-components-address-form__${null==e?void 0:e.key}`.replaceAll("/","-"),...null==e?void 0:e.attributes}),go=(e,t,o)=>({field:t.find((t=>t.key===e)),value:(0,we.objectHasProp)(o,e)?o[e]:void 0}),_o=({formId:e,address1:t,address2:o,addressType:n,onChange:c})=>{var s,a,i,l;const m=t?ho(t.field,e,n):void 0,d=o?ho(o.field,e,n):void 0;return(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)($t.ValidatedTextInput,{...m,type:null===(s=t.field)||void 0===s?void 0:s.type,label:null===(a=t.field)||void 0===a?void 0:a.label,className:`wc-block-components-address-form__${null===(i=t.field)||void 0===i?void 0:i.key}`,value:t.value,onChange:e=>{var o;return c(null===(o=t.field)||void 0===o?void 0:o.key,e)}}),(null==o?void 0:o.field)&&!(null!=o&&null!==(l=o.field)&&void 0!==l&&l.hidden)&&(0,r.createElement)(po,{field:o.field,props:d,onChange:c,value:null==o?void 0:o.value}))};function ko(e){let t=e;return function(e){const o=t;return t=e,o}}const Eo=ko(),bo=ko(),wo=({id:e="",fields:t,onChange:o,addressType:c="shipping",values:s,children:a,isEditing:i,ariaDescribedBy:l})=>{const u=(0,d.useInstanceId)(wo),p=(0,m.useRef)(!0),{defaultFields:h}=Kt(),g=mo(t),k=mo((0,we.objectHasProp)(s,"country")?s.country:""),E=Te(g,h,k),b=pt(E),w=pt(i),v=pt(s),y=(0,m.useRef)({});return(0,m.useEffect)((()=>{var e,t;null===(e=y.current)||void 0===e||null===(t=e.postcode)||void 0===t||t.revalidate()}),[k]),(0,m.useEffect)((()=>{let t;if(!p.current&&i&&y.current&&w!==i){const o=E.find((e=>!1===e.hidden));if(!o)return;const{id:r}=ho(o,e||`${u}`,c),n=document.getElementById(r);n&&(t=setTimeout((()=>{n.focus()}),300))}return p.current=!1,()=>{clearTimeout(t)}}),[i,E,e,u,c,w]),(0,m.useEffect)((()=>{if(Se()(b,E))return;const e={...s,...Object.fromEntries(E.filter((e=>e.hidden)).map((e=>[e.key,""])))};Xe()(s,e)||o(e)}),[o,E,b,s]),(0,m.useEffect)((()=>{if((!Se()(b,E)||!Se()(v,s))&&((0,we.objectHasProp)(s,"country")&&((e,t)=>{const o=`${e}_country`,r=(0,_.select)(oe.validationStore).getValidationError(o);!t.country&&(t.city||t.state||t.postcode)&&(r?(0,_.dispatch)(oe.validationStore).showValidationError(o):(0,_.dispatch)(oe.validationStore).setValidationErrors({[o]:{message:(0,M.__)("Please select your country","woocommerce"),hidden:!1}})),r&&t.country&&(0,_.dispatch)(oe.validationStore).clearValidationError(o)})(c,s),(0,we.objectHasProp)(s,"state"))){const e=E.find((e=>"state"===e.key));e&&((e,t,o)=>{const r=`${e}_state`,n=(0,_.select)(oe.validationStore).getValidationError(r),c=o.required,s="shipping"===e?Eo(t):bo(t),a=!!s&&!Xe()(s,t);n?!c||t.state?(0,_.dispatch)(oe.validationStore).clearValidationError(r):a||(0,_.dispatch)(oe.validationStore).showValidationError(r):!n&&c&&!t.state&&t.country&&(0,_.dispatch)(oe.validationStore).setValidationErrors({[r]:{message:(0,M.sprintf)(/* translators: %s will be the state field label in lowercase e.g. "state" */ /* translators: %s will be the state field label in lowercase e.g. "state" */ (0,M.__)("Please select a %s","woocommerce"),o.label.toLowerCase()),hidden:!0}})})(c,s,e)}}),[s,v,c,E,b]),e=e||`${u}`,(0,r.createElement)("div",{id:e,className:"wc-block-components-address-form"},E.map((t=>{if(t.hidden)return null;const a=ho(t,e,c),i=(e=>{const{errorId:t,errorMessage:o,autoCapitalize:r,autoComplete:n,placeholder:c,...s}=e;return s})(a);if("email"===t.key&&(a.id="email",a.errorId="billing_email"),"checkbox"===t.type)return(0,r.createElement)($t.CheckboxControl,{key:t.key,checked:Boolean(s[t.key]),onChange:e=>{o({...s,[t.key]:e})},...i});if("address_1"===t.key){const n=go("address_1",E,s),a=go("address_2",E,s);return(0,r.createElement)(_o,{address1:n,address2:a,addressType:c,formId:e,key:t.key,onChange:(e,t)=>{o({...s,[e]:t})}})}if("address_2"===t.key)return null;if("country"===t.key&&(0,we.objectHasProp)(s,"country")){const e="shipping"===c?co:no;return(0,r.createElement)(e,{key:t.key,...a,value:s.country,onChange:e=>{o({...s,country:e,state:"",postcode:""})}})}if("state"===t.key&&(0,we.objectHasProp)(s,"state")){const e="shipping"===c?lo:io;return(0,r.createElement)(e,{key:t.key,...a,country:s.country,value:s.state,onChange:e=>o({...s,state:e})})}return"select"===t.type?void 0===t.options?null:(0,r.createElement)(oo,{key:t.key,...a,label:a.label||"",className:(0,n.A)("wc-block-components-select-input",`wc-block-components-select-input-${t.key}`.replaceAll("/","-")),value:s[t.key]||"",onChange:e=>{o({...s,[t.key]:e})},options:t.options,required:t.required,errorMessage:a.errorMessage||void 0}):(0,r.createElement)($t.ValidatedTextInput,{key:t.key,ref:e=>y.current[t.key]=e,...a,type:t.type,ariaDescribedBy:l,value:s[t.key]||"",onChange:e=>o({...s,[t.key]:e}),customFormatter:e=>"postcode"===t.key?e.trimStart().toUpperCase():e,customValidation:e=>((e,t,o)=>!((e.required||e.value)&&("postcode"===t&&o&&!(0,Tt.isPostcode)({postcode:e.value,country:o})?(e.setCustomValidity((0,M.__)("Please enter a valid postcode","woocommerce")),1):"email"===t&&!(0,xe.isEmail)(e.value)&&(e.setCustomValidity((0,M.__)("Please enter a valid email address","woocommerce")),1))))(e,t.key,(0,we.objectHasProp)(s,"country")?s.country:"")})})),a)},vo=wo;o(7259);const yo=({isEditing:e=!1,addressCard:t,addressForm:o})=>{const c=(0,n.A)("wc-block-components-address-address-wrapper",{"is-editing":e});return(0,r.createElement)("div",{className:c},(0,r.createElement)("div",{className:"wc-block-components-address-card-wrapper"},t()),(0,r.createElement)("div",{className:"wc-block-components-address-form-wrapper"},o()))},fo=e=>(0,we.isObject)($[e.country])&&(0,we.isString)($[e.country][e.state])?(0,Pe.decodeEntities)($[e.country][e.state]):e.state,Co=e=>(0,we.isString)(K[e.country])?(0,Pe.decodeEntities)(K[e.country]):e.country;o(1094);const So=({address:e,onEdit:t,target:o,isExpanded:n})=>{const c=(0,v.getSetting)("countryData",{});let s=(0,v.getSetting)("defaultAddressFormat","{name}\n{company}\n{address_1}\n{address_2}\n{city}\n{state}\n{postcode}\n{country}");(0,we.objectHasProp)(c,null==e?void 0:e.country)&&(0,we.objectHasProp)(c[e.country],"format")&&(0,we.isString)(c[e.country].format)&&(s=c[e.country].format);const{name:a,address:i}=((e,t)=>{const o=(e=>["{name}","{name_upper}","{first_name} {last_name}","{last_name} {first_name}","{first_name_upper} {last_name_upper}","{last_name_upper} {first_name_upper}","{first_name} {last_name_upper}","{first_name_upper} {last_name}","{last_name} {first_name_upper}","{last_name_upper} {first_name}"].find((t=>e.indexOf(t)>=0))||"")(t),r=t.replace(`${o}\n`,""),n=[["{company}",(null==e?void 0:e.company)||""],["{address_1}",(null==e?void 0:e.address_1)||""],["{address_2}",(null==e?void 0:e.address_2)||""],["{city}",(null==e?void 0:e.city)||""],["{state}",fo(e)],["{postcode}",(null==e?void 0:e.postcode)||""],["{country}",Co(e)],["{company_upper}",((null==e?void 0:e.company)||"").toUpperCase()],["{address_1_upper}",((null==e?void 0:e.address_1)||"").toUpperCase()],["{address_2_upper}",((null==e?void 0:e.address_2)||"").toUpperCase()],["{city_upper}",((null==e?void 0:e.city)||"").toUpperCase()],["{state_upper}",fo(e).toUpperCase()],["{state_code}",(null==e?void 0:e.state)||""],["{postcode_upper}",((null==e?void 0:e.postcode)||"").toUpperCase()],["{country_upper}",Co(e).toUpperCase()]],c=[["{name}",(null==e?void 0:e.first_name)+(null!=e&&e.first_name&&null!=e&&e.last_name?" ":"")+(null==e?void 0:e.last_name)],["{name_upper}",((null==e?void 0:e.first_name)+(null!=e&&e.first_name&&null!=e&&e.last_name?" ":"")+(null==e?void 0:e.last_name)).toUpperCase()],["{first_name}",(null==e?void 0:e.first_name)||""],["{last_name}",(null==e?void 0:e.last_name)||""],["{first_name_upper}",((null==e?void 0:e.first_name)||"").toUpperCase()],["{last_name_upper}",((null==e?void 0:e.last_name)||"").toUpperCase()]];let s=o;c.forEach((([e,t])=>{s=s.replace(e,t)}));let a=r;n.forEach((([e,t])=>{a=a.replace(e,t)}));const i=a.replace(/^,\s|,\s$/g,"").replace(/\n{2,}/,"\n").split("\n").filter(Boolean);return{name:s,address:i}})(e,s),l="shipping"===o?(0,M.__)("Edit shipping address","woocommerce"):(0,M.__)("Edit billing address","woocommerce");return(0,r.createElement)("div",{className:"wc-block-components-address-card"},(0,r.createElement)("address",null,(0,r.createElement)("span",{className:"wc-block-components-address-card__address-section"},a),(0,r.createElement)("div",{className:"wc-block-components-address-card__address-section"},i.filter((e=>!!e)).map(((e,t)=>(0,r.createElement)("span",{key:"address-"+t},e)))),e.phone?(0,r.createElement)("div",{key:"address-phone",className:"wc-block-components-address-card__address-section"},e.phone):""),t&&(0,r.createElement)(uo.$,{render:(0,r.createElement)("span",null),className:"wc-block-components-address-card__edit","aria-controls":o,"aria-expanded":n,"aria-label":l,onClick:e=>{e.preventDefault(),t()},type:"button"},(0,M.__)("Edit","woocommerce")))},Po=()=>{const{shippingAddress:e,setShippingAddress:t,setBillingAddress:o,useShippingAsBilling:n,editingShippingAddress:c,setEditingShippingAddress:s}=Kt(),{dispatchCheckoutEvent:a}=ct(),{hasValidationErrors:i,invalidProps:l}=(0,_.useSelect)((t=>{const o=t(oe.validationStore);return{hasValidationErrors:o.hasValidationErrors(),invalidProps:Object.keys(e).filter((e=>void 0!==o.getValidationError("shipping_"+e))).filter(Boolean)}}));(0,m.useEffect)((()=>{l.length>0&&!1===c&&s(!0)}),[c,i,l.length,s]);const d=(0,m.useCallback)((e=>{t(e),n&&(o(e),a("set-billing-address")),a("set-shipping-address")}),[a,o,t,n]),u=(0,m.useCallback)((()=>(0,r.createElement)(So,{address:e,target:"shipping",onEdit:()=>{s(!0)},isExpanded:c})),[e,c,s]),p=(0,m.useCallback)((()=>(0,r.createElement)(vo,{id:"shipping",addressType:"shipping",onChange:d,values:e,fields:Z,isEditing:c})),[d,e,c]);return(0,r.createElement)(yo,{isEditing:c,addressCard:u,addressForm:p})},No=()=>{const{defaultFields:e,setBillingAddress:t,shippingAddress:o,billingAddress:n,useShippingAsBilling:c,setUseShippingAsBilling:s,setEditingBillingAddress:a}=Kt(),{isEditor:i}=E(),l=0===(0,v.getSetting)("currentUserId"),d=()=>{var r,n;const c={...o};null!=e&&null!==(r=e.phone)&&void 0!==r&&r.hidden&&delete c.phone,null!=e&&null!==(n=e.company)&&void 0!==n&&n.hidden&&delete c.company,t(c)};(0,Zt.Su)((()=>{c&&d()}));const u=i?eo:m.Fragment,p=c?[ye.SHIPPING_ADDRESS,ye.BILLING_ADDRESS]:[ye.SHIPPING_ADDRESS],{cartDataLoaded:h}=(0,_.useSelect)((e=>({cartDataLoaded:e(oe.CART_STORE_KEY).hasFinishedResolution("getCartData")})));return(0,r.createElement)(m.Fragment,null,(0,r.createElement)($t.StoreNoticesContainer,{context:p}),(0,r.createElement)(u,null,h?(0,r.createElement)(Po,null):null),(0,r.createElement)($t.CheckboxControl,{className:"wc-block-checkout__use-address-for-billing",label:(0,M.__)("Use same address for billing","woocommerce"),checked:c,onChange:e=>{s(e),e?d():(a(!0),(e=>{if(!e||!l)return;const o=(e=>{const t=Te(Z,v.defaultFields,e.country),o=Object.assign({},e);return t.forEach((({key:t=""})=>{"country"!==t&&"state"!==t&&Re(t,e)&&(o[t]="")})),o})(e);t(o)})(n))}}))},Ao=({defaultTitle:e=(0,M.__)("Step","woocommerce"),defaultDescription:t=(0,M.__)("Step description text.","woocommerce"),defaultShowStepNumber:o=!0})=>({title:{type:"string",default:e},description:{type:"string",default:t},showStepNumber:{type:"boolean",default:o}}),To={...Ao({defaultTitle:(0,M.__)("Shipping address","woocommerce"),defaultDescription:(0,M.__)("Enter the address where you want your order delivered.","woocommerce")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};(0,i.registerBlockType)("woocommerce/checkout-shipping-address-block",{icon:{src:(0,r.createElement)(a.A,{icon:Yt.A,className:"wc-block-editor-components-block-icon"})},attributes:To,edit:({attributes:e,setAttributes:t})=>{const{showShippingFields:o}=Kt();return o?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Ut,null),(0,r.createElement)(qt,{setAttributes:t,attributes:e,className:(0,n.A)("wc-block-checkout__shipping-fields",null==e?void 0:e.className)},(0,r.createElement)(No,null),(0,r.createElement)(Wt,{block:Tt.innerBlockAreas.SHIPPING_ADDRESS}))):null},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(Gt,null))});var xo=o(3813);o(8845);const Ro=F?`<a href="${F}" target="_blank">${(0,M.__)("Terms and Conditions","woocommerce")}</a>`:(0,M.__)("Terms and Conditions","woocommerce"),Io=L?`<a href="${L}" target="_blank">${(0,M.__)("Privacy Policy","woocommerce")}</a>`:(0,M.__)("Privacy Policy","woocommerce"),Mo=(0,M.sprintf)(/* translators: %1$s terms page link, %2$s privacy page link. */ /* translators: %1$s terms page link, %2$s privacy page link. */ (0,M.__)("By proceeding with your purchase you agree to our %1$s and %2$s","woocommerce"),Ro,Io),Bo=(0,M.sprintf)(/* translators: %1$s terms page link, %2$s privacy page link. */ /* translators: %1$s terms page link, %2$s privacy page link. */ (0,M.__)("You must accept our %1$s and %2$s to continue with your purchase.","woocommerce"),Ro,Io);o(5609),(0,i.registerBlockType)("woocommerce/checkout-terms-block",{icon:{src:(0,r.createElement)(a.A,{icon:xo.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:{checkbox:e,text:t,showSeparator:o},setAttributes:c})=>{const s=(0,l.useBlockProps)(),a=t||(e?Bo:Mo);return(0,r.createElement)("div",{...s},(0,r.createElement)(l.InspectorControls,null,(!F||!L)&&(0,r.createElement)(jt.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1},(0,M.__)("Link to your store's Terms and Conditions and Privacy Policy pages by creating pages for them.","woocommerce"),(0,r.createElement)("br",null),!F&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("br",null),(0,r.createElement)(jt.ExternalLink,{href:`${v.ADMIN_URL}admin.php?page=wc-settings&tab=advanced`},(0,M.__)("Setup a Terms and Conditions page","woocommerce"))),!L&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("br",null),(0,r.createElement)(jt.ExternalLink,{href:`${v.ADMIN_URL}options-privacy.php`},(0,M.__)("Setup a Privacy Policy page","woocommerce")))),F&&L&&!(a.includes(F)&&a.includes(L))&&(0,r.createElement)(jt.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1,actions:Mo!==t?[{label:(0,M.__)("Restore default text","woocommerce"),onClick:()=>c({text:""})}]:[]},(0,r.createElement)("p",null,(0,M.__)("Ensure you add links to your policy pages in this section.","woocommerce"))),(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Display options","woocommerce")},(0,r.createElement)(jt.ToggleControl,{label:(0,M.__)("Require checkbox","woocommerce"),checked:e,onChange:()=>c({checkbox:!e})}),(0,r.createElement)(jt.ToggleControl,{label:(0,M.__)("Show separator","woocommerce"),checked:o,onChange:()=>c({showSeparator:!o})}))),(0,r.createElement)("div",{className:(0,n.A)("wc-block-checkout__terms",{"wc-block-checkout__terms--with-separator":o})},e?(0,r.createElement)(r.Fragment,null,(0,r.createElement)($t.CheckboxControl,{id:"terms-condition",checked:!1}),(0,r.createElement)(l.RichText,{value:a,onChange:e=>c({text:e})})):(0,r.createElement)(l.RichText,{tagName:"span",value:a,onChange:e=>c({text:e})})))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});var Oo=o(2596),Do=o(3876);o(3091);const Lo=[(0,M.__)("Too weak","woocommerce"),(0,M.__)("Weak","woocommerce"),(0,M.__)("Medium","woocommerce"),(0,M.__)("Strong","woocommerce"),(0,M.__)("Very strong","woocommerce")],Fo=({password:e="",onChange:t})=>{var o;const c=(0,d.useInstanceId)(Fo,"woocommerce-password-strength-meter");let s=-1;e.length>0&&(s=(e=>void 0===window.zxcvbn?(0,Do.Bi)(e,[{id:0,value:Lo[0],minDiversity:0,minLength:0},{id:1,value:Lo[1],minDiversity:1,minLength:4},{id:2,value:Lo[2],minDiversity:2,minLength:8},{id:3,value:Lo[3],minDiversity:4,minLength:12},{id:4,value:Lo[4],minDiversity:4,minLength:20}]).id:window.zxcvbn(e).score)(e));const a=pt(s);return(0,m.useEffect)((()=>{s!==a&&t&&t(s)}),[s,a,t]),(0,r.createElement)("div",{id:c,className:(0,n.A)("wc-block-components-password-strength",{hidden:-1===s})},(0,r.createElement)("label",{htmlFor:c+"-meter",className:"screen-reader-text"},(0,M.__)("Password strength","woocommerce")),(0,r.createElement)("meter",{id:c+"-meter",className:"wc-block-components-password-strength__meter",min:0,max:4,value:s>-1?s:0},null!==(o=Lo[s])&&void 0!==o?o:""),!!Lo[s]&&(0,r.createElement)("div",{id:c+"-result",className:"wc-block-components-password-strength__result"},(0,r.createElement)("span",{className:"screen-reader-text","aria-live":"polite"},(0,M.sprintf)(/* translators: %s: Password strength */ /* translators: %s: Password strength */ (0,M.__)("Password strength: %1$s (%2$d characters long)","woocommerce"),Lo[s],e.length))," ",(0,r.createElement)("span",{"aria-hidden":!0},Lo[s])))},jo=Fo,Uo=()=>{const[e,t]=(0,m.useState)(0),{customerPassword:o}=(0,_.useSelect)((e=>({customerPassword:e(oe.CHECKOUT_STORE_KEY).getCustomerPassword()}))),{__internalSetCustomerPassword:n}=(0,_.useDispatch)(oe.CHECKOUT_STORE_KEY);return(0,r.createElement)($t.ValidatedTextInput,{type:"password",label:(0,M.__)("Create a password","woocommerce"),className:"wc-block-components-address-form__password",value:o,required:!0,errorId:"account-password",customValidityMessage:e=>{if(e.valueMissing||e.badInput||e.typeMismatch)return(0,M.__)("Please enter a valid password","woocommerce")},customValidation:t=>!(e<2&&(t.setCustomValidity((0,M.__)("Please create a stronger password","woocommerce")),1)),onChange:e=>n(e),feedback:(0,r.createElement)(jo,{password:o,onChange:e=>t(e)})})},Ho="wc-guest-checkout-notice",Yo=()=>{const{shouldCreateAccount:e}=(0,_.useSelect)((e=>({shouldCreateAccount:e(oe.CHECKOUT_STORE_KEY).getShouldCreateAccount()}))),{__internalSetShouldCreateAccount:t,__internalSetCustomerPassword:o}=(0,_.useDispatch)(oe.CHECKOUT_STORE_KEY),n=(0,v.getSetting)("checkoutAllowsGuest",!1),c=(0,v.getSetting)("checkoutAllowsSignup",!1),s=n&&c,a=!(0,v.getSetting)("generatePassword",!1)&&(s&&e||!n);return n||s||a?(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)("p",{id:Ho,className:"wc-block-checkout__guest-checkout-notice"},(0,M.__)("You are currently checking out as a guest.","woocommerce")),s&&(0,r.createElement)($t.CheckboxControl,{className:"wc-block-checkout__create-account",label:(0,M.sprintf)(/* translators: Store name */ /* translators: Store name */ (0,M.__)("Create an account with %s","woocommerce"),(0,v.getSetting)("siteTitle","")),checked:e,onChange:e=>{t(e),o("")}}),a&&(0,r.createElement)(Uo,null)):null},Vo=()=>{const{additionalFields:e,customerId:t}=(0,_.useSelect)((e=>{const t=e(oe.CHECKOUT_STORE_KEY);return{additionalFields:t.getAdditionalFields(),customerId:t.getCustomerId()}})),{setAdditionalFields:o}=(0,_.useDispatch)(oe.CHECKOUT_STORE_KEY),{billingAddress:n,setEmail:c}=Kt(),{dispatchCheckoutEvent:s}=ct(),a={email:n.email,...e};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)($t.StoreNoticesContainer,{context:ye.CONTACT_INFORMATION}),(0,r.createElement)(vo,{id:"contact",addressType:"contact",ariaDescribedBy:Ho,onChange:e=>{const{email:t,...r}=e;c(t),s("set-email-address"),o(r)},values:a,fields:J},!t&&(0,r.createElement)(Yo,null)))},Ko={...Ao({defaultTitle:(0,M.__)("Contact information","woocommerce"),defaultDescription:(0,M.__)("We'll use this email to send you details and updates about your order.","woocommerce")}),className:{type:"string",default:""},lock:{type:"object",default:{remove:!0,move:!0}}};(0,i.registerBlockType)("woocommerce/checkout-contact-information-block",{icon:{src:(0,r.createElement)(a.A,{icon:Oo.A,className:"wc-block-editor-components-block-icon"})},attributes:Ko,edit:({attributes:e,setAttributes:t})=>(0,r.createElement)(qt,{attributes:e,setAttributes:t,className:(0,n.A)("wc-block-checkout__contact-fields",null==e?void 0:e.className)},(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Account creation and guest checkout","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("Account creation and guest checkout settings can be managed in your store settings.","woocommerce")),(0,r.createElement)(jt.ExternalLink,{href:`${v.ADMIN_URL}admin.php?page=wc-settings&tab=account`},(0,M.__)("Manage account settings","woocommerce")))),(0,r.createElement)(eo,null,(0,r.createElement)(Vo,null)),(0,r.createElement)(Wt,{block:Tt.innerBlockAreas.CONTACT_INFORMATION})),save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(Gt,null))});const $o=()=>{const{billingAddress:e,setShippingAddress:t,setBillingAddress:o,useBillingAsShipping:n,editingBillingAddress:c,setEditingBillingAddress:s}=Kt(),{dispatchCheckoutEvent:a}=ct(),{hasValidationErrors:i,invalidProps:l}=(0,_.useSelect)((t=>{const o=t(oe.validationStore);return{hasValidationErrors:o.hasValidationErrors(),invalidProps:Object.keys(e).filter((e=>"email"!==e&&void 0!==o.getValidationError("billing_"+e))).filter(Boolean)}}));(0,m.useEffect)((()=>{l.length>0&&!1===c&&s(!0)}),[c,i,l.length,s]);const d=(0,m.useCallback)((e=>{o(e),n&&(t(e),a("set-shipping-address")),a("set-billing-address")}),[a,o,t,n]),u=(0,m.useCallback)((()=>(0,r.createElement)(So,{address:e,target:"billing",onEdit:()=>{s(!0)},isExpanded:c})),[e,c,s]),p=(0,m.useCallback)((()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(vo,{id:"billing",addressType:"billing",onChange:d,values:e,fields:Z,isEditing:c}))),[e,d,c]);return(0,r.createElement)(yo,{isEditing:c,addressCard:u,addressForm:p})},zo=()=>{const{defaultFields:e,billingAddress:t,setShippingAddress:o,useBillingAsShipping:n}=Kt(),{isEditor:c}=E();(0,Zt.Su)((()=>{if(n){var r,c;const{email:n,...s}=t,a={...s};null!=e&&null!==(r=e.phone)&&void 0!==r&&r.hidden&&delete a.phone,null!=e&&null!==(c=e.company)&&void 0!==c&&c.hidden&&delete a.company,o(a)}}));const s=c?eo:m.Fragment,a=n?[ye.BILLING_ADDRESS,ye.SHIPPING_ADDRESS]:[ye.BILLING_ADDRESS],{cartDataLoaded:i}=(0,_.useSelect)((e=>({cartDataLoaded:e(oe.CART_STORE_KEY).hasFinishedResolution("getCartData")})));return(0,r.createElement)(m.Fragment,null,(0,r.createElement)($t.StoreNoticesContainer,{context:a}),(0,r.createElement)(s,null,i?(0,r.createElement)($o,null):null))},qo=(0,M.__)("Billing address","woocommerce"),Wo=(0,M.__)("Enter the billing address that matches your payment method.","woocommerce"),Go=(0,M.__)("Billing and shipping address","woocommerce"),Zo=(0,M.__)("Enter the billing and shipping address that matches your payment method.","woocommerce"),Jo={...Ao({defaultTitle:qo,defaultDescription:Wo}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};(0,i.registerBlockType)("woocommerce/checkout-billing-address-block",{icon:{src:(0,r.createElement)(a.A,{icon:Yt.A,className:"wc-block-editor-components-block-icon"})},attributes:Jo,edit:({attributes:e,setAttributes:t})=>{const{showBillingFields:o,forcedBillingAddress:c,useBillingAsShipping:s}=Kt();return o||s?(e.title=((e,t)=>t?e===qo?Go:e:e===Go?qo:e)(e.title,c),e.description=((e,t)=>t?e===Wo?Zo:e:e===Zo?Wo:e)(e.description,c),(0,r.createElement)(qt,{setAttributes:t,attributes:e,className:(0,n.A)("wc-block-checkout__billing-fields",null==e?void 0:e.className)},(0,r.createElement)(Ut,null),(0,r.createElement)(zo,null),(0,r.createElement)(Wt,{block:Tt.innerBlockAreas.BILLING_ADDRESS}))):null},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(Gt,null))});var Xo=o(498);const Qo=(0,M.__)("Place Order","woocommerce"),er=(0,M.__)("Return to Cart","woocommerce"),tr={placeOrderButtonLabel:{type:"string",default:Qo},returnToCartButtonLabel:{type:"string",default:er}},or=(e,t)=>{if(!e.title.raw)return e.slug;const o=1===t.filter((t=>t.title.raw===e.title.raw)).length;return e.title.raw+(o?"":` - ${e.slug}`)},rr=({setPageId:e,pageId:t,labels:o})=>{const n=(0,_.useSelect)((e=>e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100})),[])||null;return n?(0,r.createElement)(jt.PanelBody,{title:o.title},(0,r.createElement)(jt.SelectControl,{label:(0,M.__)("Link to","woocommerce"),value:t,options:[{label:o.default,value:0},...n.map((e=>({label:or(e,n),value:parseInt(e.id,10)})))],onChange:t=>e(parseInt(t,10))})):null};var nr=o(1387);o(718);const cr=({href:e,children:t})=>{const o=e||U;return o?(0,r.createElement)("a",{href:o,className:"wc-block-components-checkout-return-to-cart-button"},(0,r.createElement)(a.A,{icon:nr.A}),t):null};o(2080),o(7791);const sr=()=>(0,r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"}),ar=(0,m.forwardRef)(((e,t)=>{"showSpinner"in e&&ne()("showSpinner prop",{version:"8.9.0",alternative:"Render a spinner in the button children instead.",plugin:"WooCommerce"});const{className:o,showSpinner:c=!1,children:s,variant:a="contained",removeTextWrap:i=!1,...l}=e,m=(0,n.A)("wc-block-components-button","wp-element-button",o,a,{"wc-block-components-button--loading":c});if("href"in e)return(0,r.createElement)(uo.$,{render:(0,r.createElement)("a",{ref:t,href:e.href},c&&(0,r.createElement)(sr,null),(0,r.createElement)("span",{className:"wc-block-components-button__text"},s)),className:m,...l});const d=i?e.children:(0,r.createElement)("span",{className:"wc-block-components-button__text"},e.children);return(0,r.createElement)(uo.$,{ref:t,className:m,...l},c&&(0,r.createElement)(sr,null),d)})),ir=({onChange:e,placeholder:t,value:o,children:n,...c})=>(0,r.createElement)(ar,{...c},(0,r.createElement)(l.RichText,{multiline:!1,allowedFormats:[],value:o,placeholder:t,onChange:e}),n),lr=window.wc.priceFormat;o(149);const mr=JSON.parse('{"uK":{"lock":{"type":"object","default":{"remove":true,"move":true}},"cartPageId":{"type":"number","default":0},"showReturnToCart":{"type":"boolean","default":true},"className":{"type":"string","default":""},"priceSeparator":{"type":"string","default":"·"}}}');o(5089);const dr={example:{attributes:{showPrice:!0,placeOrderButtonLabel:(0,M.__)("Place Order","woocommerce"),showReturnToCart:!1}},icon:{src:(0,r.createElement)(a.A,{icon:Xo.A,className:"wc-block-editor-components-block-icon"})},attributes:{...tr,...mr.uK},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()}),edit:({attributes:e,setAttributes:t})=>{const o=(0,l.useBlockProps)(),{cartPageId:c=0,showReturnToCart:s=!1,placeOrderButtonLabel:a,returnToCartButtonLabel:i}=e,{cartTotals:d}=Ke(),u=(0,lr.getCurrencyFromPriceResponse)(d),{current:p}=(0,m.useRef)(c),h=(0,_.useSelect)((e=>p||e("core/editor").getCurrentPostId()),[p]),g=o.className.includes("is-style-with-price");return(0,r.createElement)("div",{...o},(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Options","woocommerce")},(0,r.createElement)(jt.ToggleControl,{label:(0,M.__)('Show a "Return to Cart" link',"woocommerce"),help:(0,M.__)("Recommended to enable only if there is no Cart link in the header.","woocommerce"),checked:s,onChange:()=>t({showReturnToCart:!s})}),g&&(0,r.createElement)(jt.TextControl,{label:(0,M.__)("Price separator","woocommerce"),id:"price-separator",value:e.priceSeparator,onChange:e=>{t({priceSeparator:e})}})),s&&!(h===D&&0===p)&&(0,r.createElement)(rr,{pageId:c,setPageId:e=>t({cartPageId:e}),labels:{title:(0,M.__)("Return to Cart button","woocommerce"),default:(0,M.__)("WooCommerce Cart Page","woocommerce")}})),(0,r.createElement)("div",{className:"wc-block-checkout__actions"},(0,r.createElement)("div",{className:"wc-block-checkout__actions_row"},s&&(0,r.createElement)(cr,{href:"#cart-page-placeholder"},(0,r.createElement)(l.RichText,{multiline:!1,allowedFormats:[],value:i,placeholder:er,onChange:e=>{t({returnToCartButtonLabel:e})}})),(0,r.createElement)(ir,{className:(0,n.A)("wc-block-cart__submit-button","wc-block-components-checkout-place-order-button",{"wc-block-components-checkout-place-order-button--full-width":!s}),value:a,placeholder:Qo,onChange:e=>{t({placeOrderButtonLabel:e})}},g&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("style",null,`.wp-block-woocommerce-checkout-actions-block {\n\t\t\t\t\t\t\t\t\t\t.wc-block-components-checkout-place-order-button__separator {\n\t\t\t\t\t\t\t\t\t\t\t&::after {\n\t\t\t\t\t\t\t\t\t\t\t\tcontent: "${e.priceSeparator}";\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}`),(0,r.createElement)("div",{className:"wc-block-components-checkout-place-order-button__separator"}),(0,r.createElement)("div",{className:"wc-block-components-checkout-place-order-button__price"},(0,r.createElement)($t.FormattedMonetaryAmount,{value:d.total_price,currency:u})))))))}};(0,i.registerBlockType)("woocommerce/checkout-actions-block",dr);const ur=()=>{const{additionalFields:e}=(0,_.useSelect)((e=>({additionalFields:e(oe.CHECKOUT_STORE_KEY).getAdditionalFields()}))),{setAdditionalFields:t}=(0,_.useDispatch)(oe.CHECKOUT_STORE_KEY),o={...e};return 0===X.length?null:(0,r.createElement)(r.Fragment,null,(0,r.createElement)($t.StoreNoticesContainer,{context:ye.ORDER_INFORMATION}),(0,r.createElement)(vo,{id:"additional-information",addressType:"additional-information",onChange:e=>{t(e)},values:o,fields:X}))},pr={...Ao({defaultTitle:(0,M.__)("Additional order information","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!1,remove:!0}}};(0,i.registerBlockType)("woocommerce/checkout-additional-information-block",{attributes:pr,icon:{src:(0,r.createElement)(a.A,{icon:xo.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:t})=>0===X.length?null:(0,r.createElement)(qt,{setAttributes:t,attributes:e,className:(0,n.A)("wc-block-checkout__additional-information-fields",null==e?void 0:e.className)},(0,r.createElement)(ur,null)),save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});var hr=o(6465);const gr=({disabled:e,onChange:t,placeholder:o,value:n})=>{const[c,s]=(0,m.useState)(!1),[a,i]=(0,m.useState)("");return(0,r.createElement)("div",{className:"wc-block-checkout__add-note"},(0,r.createElement)($t.CheckboxControl,{disabled:e,label:(0,M.__)("Add a note to your order","woocommerce"),checked:c,onChange:e=>{s(e),e?n!==a&&t(a):(t(""),i(n))}}),c&&(0,r.createElement)($t.Textarea,{disabled:e,onTextChange:t,placeholder:o,value:n}))},_r=({className:e})=>{const{needsShipping:t}=st(),{isProcessing:o,orderNotes:c}=(0,_.useSelect)((e=>{const t=e(oe.CHECKOUT_STORE_KEY);return{isProcessing:t.isProcessing(),orderNotes:t.getOrderNotes()}})),{__internalSetOrderNotes:s}=(0,_.useDispatch)(oe.CHECKOUT_STORE_KEY);return(0,r.createElement)($t.FormStep,{id:"order-notes",showStepNumber:!1,className:(0,n.A)("wc-block-checkout__order-notes",e),disabled:o},(0,r.createElement)(gr,{disabled:o,onChange:s,placeholder:t?(0,M.__)("Notes about your order, e.g. special notes for delivery.","woocommerce"):(0,M.__)("Notes about your order.","woocommerce"),value:c}))};o(377),o(7797),(0,i.registerBlockType)("woocommerce/checkout-order-note-block",{icon:{src:(0,r.createElement)(a.A,{icon:hr.A,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,l.useBlockProps)();return(0,r.createElement)("div",{...e},(0,r.createElement)(eo,null,(0,r.createElement)(_r,null)))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});const kr=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},(0,r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M6 3.75h12c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H6c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),(0,r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.9 7.5A1.1 1.1 0 018 6.4h8a1.1 1.1 0 011.1 1.1v2a1.1 1.1 0 01-1.1 1.1H8a1.1 1.1 0 01-1.1-1.1v-2zm1.2.1v1.8h7.8V7.6H8.1z",clipRule:"evenodd"}),(0,r.createElement)("path",{fill:"currentColor",d:"M8.5 12h1v1h-1v-1zM8.5 14h1v1h-1v-1zM8.5 16h1v1h-1v-1zM11.5 12h1v1h-1v-1zM11.5 14h1v1h-1v-1zM11.5 16h1v1h-1v-1zM14.5 12h1v1h-1v-1zM14.5 14h1v1h-1v-1zM14.5 16h1v1h-1v-1z"}));o(8375);const Er=({children:e,className:t,screenReaderLabel:o,showSpinner:c=!1,isLoading:s=!0})=>(0,r.createElement)("div",{className:(0,n.A)(t,{"wc-block-components-loading-mask":s})},s&&c&&(0,r.createElement)($t.Spinner,null),(0,r.createElement)("div",{className:(0,n.A)({"wc-block-components-loading-mask__children":s}),"aria-hidden":s},e),s&&(0,r.createElement)("span",{className:"screen-reader-text"},o||(0,M.__)("Loading…","woocommerce")));o(3048);const br=({instanceId:e,isLoading:t=!1,onSubmit:o,displayCouponForm:n=!1})=>{const[c,s]=(0,m.useState)(""),[a,i]=(0,m.useState)(n),l=`wc-block-components-totals-coupon__input-${e}`,{validationErrorId:d}=(0,_.useSelect)((t=>({validationErrorId:t(oe.validationStore).getValidationErrorId(e)}))),u=(0,m.useRef)(null);return(0,r.createElement)($t.Panel,{className:"wc-block-components-totals-coupon",initialOpen:a,hasBorder:!1,headingLevel:2,title:(0,M.__)("Add a coupon","woocommerce"),state:[a,i]},(0,r.createElement)(Er,{screenReaderLabel:(0,M.__)("Applying coupon…","woocommerce"),isLoading:t,showSpinner:!1},(0,r.createElement)("div",{className:"wc-block-components-totals-coupon__content"},(0,r.createElement)("form",{className:"wc-block-components-totals-coupon__form",id:"wc-block-components-totals-coupon__form"},(0,r.createElement)($t.ValidatedTextInput,{id:l,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:(0,M.__)("Enter code","woocommerce"),value:c,ariaDescribedBy:d,onChange:e=>{s(e)},focusOnMount:!0,validateOnMount:!1,showError:!1,ref:u}),(0,r.createElement)(ar,{className:"wc-block-components-totals-coupon__button",disabled:t||!c,showSpinner:t,onClick:e=>{var t;e.preventDefault(),void 0!==o?null===(t=o(c))||void 0===t||t.then((e=>{var t;e?(s(""),i(!1)):null!==(t=u.current)&&void 0!==t&&t.focus&&u.current.focus()})):(s(""),i(!0))},type:"submit"},(0,M.__)("Apply","woocommerce"))),(0,r.createElement)($t.ValidationInputError,{propertyName:"coupon",elementId:e}))))};o(265);const wr={context:"summary"},vr=({cartCoupons:e=[],currency:t,isRemovingCoupon:o,removeCoupon:n,values:c})=>{const{total_discount:s,total_discount_tax:a}=c,i=parseInt(s,10),l=(0,Tt.applyCheckoutFilter)({arg:wr,filterName:"coupons",defaultValue:e});if(!i&&0===l.length)return null;const m=parseInt(a,10),d=(0,v.getSetting)("displayCartPricesIncludingTax",!1)?i+m:i;return(0,r.createElement)($t.TotalsItem,{className:"wc-block-components-totals-discount",currency:t,description:0!==l.length&&(0,r.createElement)(Er,{screenReaderLabel:(0,M.__)("Removing coupon…","woocommerce"),isLoading:o,showSpinner:!1},(0,r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},l.map((e=>(0,r.createElement)($t.RemovableChip,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:(0,M.sprintf)(/* translators: %s Coupon code. */ /* translators: %s Coupon code. */ (0,M.__)("Coupon: %s","woocommerce"),e.label),disabled:o,onRemove:()=>{n(e.code)},radius:"large",ariaLabel:(0,M.sprintf)(/* translators: %s is a coupon code. */ /* translators: %s is a coupon code. */ (0,M.__)('Remove coupon "%s"',"woocommerce"),e.label)}))))),label:d?(0,M.__)("Discount","woocommerce"):(0,M.__)("Coupons","woocommerce"),value:d?-1*d:"-"})};o(7919);const yr=({currency:e,values:t,className:o})=>{const c=(0,v.getSetting)("taxesEnabled",!0)&&(0,v.getSetting)("displayCartPricesIncludingTax",!1),{total_price:s,total_tax:a,tax_lines:i}=t,{receiveCart:l,...d}=Ke(),u=(0,Tt.applyCheckoutFilter)({filterName:"totalLabel",defaultValue:(0,M.__)("Total","woocommerce"),extensions:d.extensions,arg:{cart:d}}),p=(0,Tt.applyCheckoutFilter)({filterName:"totalValue",defaultValue:"<price/>",extensions:d.extensions,arg:{cart:d},validation:Tt.productPriceValidation}),h=(0,r.createElement)($t.FormattedMonetaryAmount,{className:"wc-block-components-totals-footer-item-tax-value",currency:e,value:parseInt(s,10)}),g=(0,m.createInterpolateElement)(p,{price:h}),_=parseInt(a,10),k=i&&i.length>0?(0,M.sprintf)(/* translators: %s is a list of tax rates */ /* translators: %s is a list of tax rates */ (0,M.__)("Including %s","woocommerce"),i.map((({name:t,price:o})=>`${(0,lr.formatPrice)(o,e)} ${t}`)).join(", ")):(0,M.__)("Including <TaxAmount/> in taxes","woocommerce");return(0,r.createElement)($t.TotalsItem,{className:(0,n.A)("wc-block-components-totals-footer-item",o),currency:e,label:u,value:g,description:c&&0!==_&&(0,r.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},(0,m.createInterpolateElement)(k,{TaxAmount:(0,r.createElement)($t.FormattedMonetaryAmount,{className:"wc-block-components-totals-footer-item-tax-value",currency:e,value:_})}))})},fr=()=>{const{shippingRates:e}=Ke(),t=(e=>e.flatMap((e=>e.shipping_rates.filter((e=>e.selected)).flatMap((e=>e.name)))))(e);return t?(0,r.createElement)("div",{className:"wc-block-components-totals-shipping__via"},(0,Pe.decodeEntities)(t.filter(((e,o)=>t.indexOf(e)===o)).join(", "))):null};let Cr=null;o(7051);const Sr=({address:e,onUpdate:t,onCancel:o,addressFields:n})=>{const[c,s]=(0,m.useState)(e),{showAllValidationErrors:a}=(0,_.useDispatch)(oe.validationStore),i=function(e){const t=(0,m.useRef)(null),o=(0,m.useRef)(null),r=(0,m.useRef)(e);return(0,m.useEffect)((()=>{r.current=e}),[e]),(0,m.useCallback)((e=>{if(e)t.current=e,o.current=e.ownerDocument.activeElement;else if(o.current){var n,c,s;const e=null===(n=t.current)||void 0===n?void 0:n.contains(null===(c=t.current)||void 0===c?void 0:c.ownerDocument.activeElement);var a;if(null!==(s=t.current)&&void 0!==s&&s.isConnected&&!e&&(null!==(a=Cr)&&void 0!==a||(Cr=o.current)),r.current)r.current();else{var i;const e=o.current;null===(i=null!=e&&e.isConnected?e:Cr)||void 0===i||i.focus()}Cr=null}}),[])}(),{hasValidationErrors:l,isCustomerDataUpdating:d}=(0,_.useSelect)((e=>({hasValidationErrors:e(oe.validationStore).hasValidationErrors,isCustomerDataUpdating:e(oe.CART_STORE_KEY).isCustomerDataUpdating()})));return(0,r.createElement)("form",{className:"wc-block-components-shipping-calculator-address",ref:i},(0,r.createElement)(vo,{fields:n,onChange:s,values:c}),(0,r.createElement)(ar,{className:"wc-block-components-shipping-calculator-address__button",disabled:d,variant:"outlined",onClick:r=>{if(r.preventDefault(),Xe()(c,e))return o();if(a(),!l()){const e={};return n.forEach((t=>{void 0!==c[t]&&(e[t]=c[t])})),t(e)}},type:"submit"},(0,M.__)("Check delivery options","woocommerce")))},Pr=(0,m.createContext)({shippingCalculatorID:"",showCalculator:!1,isShippingCalculatorOpen:!1,setIsShippingCalculatorOpen:()=>{}}),Nr=({onUpdate:e=(()=>{}),onCancel:t=(()=>{}),addressFields:o=["country","state","city","postcode"]})=>{const{shippingCalculatorID:n,showCalculator:c,setIsShippingCalculatorOpen:s}=(0,m.useContext)(Pr),{shippingAddress:a}=Vt(),i="wc/cart/shipping-calculator",l=(0,m.useCallback)((()=>{s(!1),t()}),[s,t]),d=(0,m.useCallback)((t=>{(0,_.dispatch)(oe.CART_STORE_KEY).updateCustomerData({shipping_address:t},!1).then((()=>{(e=>{const{removeNotice:t}=(0,_.dispatch)("core/notices"),{getNotices:o}=(0,_.select)("core/notices");o(e).forEach((o=>{t(o.id,e)}))})(i),s(!1),e(t)})).catch((e=>{(0,oe.processErrorResponse)(e,i)}))}),[e,s]);return c?(0,r.createElement)("div",{className:"wc-block-components-shipping-calculator",id:n},(0,r.createElement)($t.StoreNoticesContainer,{context:i}),(0,r.createElement)(Sr,{address:a,addressFields:o,onCancel:l,onUpdate:d})):null},Ar=({title:e})=>{const{isShippingCalculatorOpen:t,setIsShippingCalculatorOpen:o}=(0,m.useContext)(Pr);return(0,r.createElement)($t.Panel,{className:"wc-block-components-totals-shipping-panel",initialOpen:!1,hasBorder:!1,title:e,state:[t,o]},(0,r.createElement)(Nr,null))},Tr=e=>{const t=(e=>(0,v.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.total_shipping,10)+parseInt(e.total_shipping_tax,10):parseInt(e.total_shipping,10))(e);return 0===t?(0,r.createElement)("strong",null,(0,M.__)("Free","woocommerce")):t},xr=()=>{const{shippingRates:e,shippingAddress:t}=Ke(),o=(0,_.useSelect)((e=>e(oe.CHECKOUT_STORE_KEY).prefersCollection())),n=Ge(e),{showCalculator:c}=(0,m.useContext)(Pr),s=o?(e=>{const t=(e||[]).flatMap((e=>e.shipping_rates)).find((e=>e.selected&&qe(e)));if((0,we.isObject)(t)&&(0,we.objectHasProp)(t,"meta_data")){const e=t.meta_data.find((e=>"pickup_address"===e.key));if((0,we.isObject)(e)&&(0,we.objectHasProp)(e,"value")&&e.value)return e.value}return""})(e):(e=>{if(0===Object.values(e).length)return null;const t=(0,we.isString)(z[e.country])?(0,Pe.decodeEntities)(z[e.country]):"",o=(0,we.isObject)(q[e.country])&&(0,we.isString)(q[e.country][e.state])?(0,Pe.decodeEntities)(q[e.country][e.state]):e.state,r=[];return r.push(e.postcode.toUpperCase()),r.push(e.city),r.push(o),r.push(t),r.filter(Boolean).join(", ")||null})(t),a=n? // Translators: <address/> is the formatted shipping address. // Translators: <address/> is the formatted shipping address. (0,M.__)("Delivers to <address/>","woocommerce"): // Translators: <address/> is the formatted shipping address. // Translators: <address/> is the formatted shipping address. (0,M.__)("No delivery options available for <address/>","woocommerce"),i=o? // Translators: <address/> is the pickup location. // Translators: <address/> is the pickup location. (0,M.__)("Collection from <address/>","woocommerce"):a,l=(0,r.createElement)("p",{className:"wc-block-components-totals-shipping-address-summary"},s?(0,m.createInterpolateElement)(i,{address:(0,r.createElement)("strong",null,s)}):(0,r.createElement)(r.Fragment,null,(0,M.__)("Enter address to check delivery options","woocommerce")));return(0,r.createElement)("div",{className:"wc-block-components-shipping-address"},c&&(0,r.createElement)(Ar,{title:l}))};o(780);const Rr=({label:e=(0,M.__)("Shipping","woocommerce"),placeholder:t=null,collaterals:o=null})=>{const{cartTotals:n,shippingRates:c}=Ke(),s=Ge(c);return(0,r.createElement)("div",{className:"wc-block-components-totals-shipping"},(0,r.createElement)($t.TotalsItem,{label:e,value:s?Tr(n):t,description:(0,r.createElement)(r.Fragment,null,!!s&&(0,r.createElement)(fr,null),(0,r.createElement)(xr,null),o&&(0,r.createElement)("div",{className:"wc-block-components-totals-shipping__collaterals"},o)),currency:(0,lr.getCurrencyFromPriceResponse)(n)}))};var Ir=o(9813);const Mr=()=>{const{extensions:e,receiveCart:t,...o}=Ke(),n={extensions:e,cart:o,context:"woocommerce/checkout"};return(0,r.createElement)(Tt.ExperimentalOrderMeta.Slot,{...n})},{Fill:Br,Slot:Or}=(0,Tt.createSlotFill)("checkoutOrderSummaryActionArea"),Dr=JSON.parse('{"xY":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"uK":{"lock":{"type":"object","default":{"remove":true}}}}'),Lr=[{attributes:Dr.uK,save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(l.InnerBlocks.Content,null)),supports:Dr.xY,migrate:({attributes:e})=>[e,[(0,i.createBlock)("woocommerce/checkout-order-summary-cart-items-block",{},[]),(0,i.createBlock)("woocommerce/checkout-order-summary-coupon-form-block",{},[]),(0,i.createBlock)("woocommerce/checkout-order-summary-totals-block",{},[(0,i.createBlock)("woocommerce/checkout-order-summary-subtotal-block",{},[]),(0,i.createBlock)("woocommerce/checkout-order-summary-fee-block",{},[]),(0,i.createBlock)("woocommerce/checkout-order-summary-discount-block",{},[]),(0,i.createBlock)("woocommerce/checkout-order-summary-shipping-block",{},[]),(0,i.createBlock)("woocommerce/checkout-order-summary-taxes-block",{},[])])]],isEligible:(e,t)=>!t.some((e=>"woocommerce/checkout-order-summary-totals-block"===e.name))}],Fr=Lr;o(1407),(0,i.registerBlockType)("woocommerce/checkout-order-summary-block",{icon:{src:(0,r.createElement)(a.A,{icon:kr,className:"wc-block-editor-components-block-icon"})},attributes:{className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},edit:({clientId:e})=>{const t=(0,l.useBlockProps)(),{cartTotals:o}=Ke(),c=(0,lr.getCurrencyFromPriceResponse)(o),s=parseInt(o.total_price,10),a=Lt(Tt.innerBlockAreas.CHECKOUT_ORDER_SUMMARY),{isLarge:i}=p(),[d,u]=(0,m.useState)(!1),h=(0,m.useId)(),g=i?{}:{role:"button",onClick:()=>u(!d),"aria-expanded":d,"aria-controls":h,tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||u(!d)}},_=[["woocommerce/checkout-order-summary-cart-items-block",{},[]],["woocommerce/checkout-order-summary-coupon-form-block",{},[]],["woocommerce/checkout-order-summary-totals-block",{},[]]];return Ft({clientId:e,registeredBlocks:a,defaultTemplate:_}),(0,r.createElement)("div",{...t},(0,r.createElement)("div",{className:"wc-block-components-checkout-order-summary__title",...g},(0,r.createElement)("p",{className:"wc-block-components-checkout-order-summary__title-text",role:"heading"},(0,M.__)("Order summary","woocommerce")),!i&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)($t.FormattedMonetaryAmount,{currency:c,value:s}),(0,r.createElement)(jt.Icon,{icon:d?Ir.A:to.A}))),(0,r.createElement)("div",{className:(0,n.A)("wc-block-components-checkout-order-summary__content",{"is-open":d}),id:h},(0,r.createElement)(l.InnerBlocks,{allowedBlocks:a,template:_}),(0,r.createElement)("div",{className:"wc-block-components-totals-wrapper"},(0,r.createElement)(yr,{currency:c,values:o})),(0,r.createElement)(Mr,null)))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(l.InnerBlocks.Content,null)),deprecated:Fr});var jr=o(8994),Ur=o(4133),Hr=o(7674),Yr=o.n(Hr);const Vr=["a","b","em","i","strong","p","br"],Kr=["target","href","rel","name","download"],$r=(e,t)=>{const o=(null==t?void 0:t.tags)||Vr,r=(null==t?void 0:t.attr)||Kr;return Yr().sanitize(e,{ALLOWED_TAGS:o,ALLOWED_ATTR:r})},zr={warning:"#F0B849",error:"#CC1818",success:"#46B450",info:"#0073AA"},qr=({status:e="warning",...t})=>(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},(0,r.createElement)("path",{d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z",stroke:zr[e],strokeWidth:"1.5"}),(0,r.createElement)("path",{d:"M13 7H11V13H13V7Z",fill:zr[e]}),(0,r.createElement)("path",{d:"M13 15H11V17H13V15Z",fill:zr[e]}));o(9705);const Wr=({href:e,title:t,description:o,warning:n})=>(0,r.createElement)("a",{href:e,className:"wc-block-editor-components-external-link-card",target:"_blank",rel:"noreferrer"},(0,r.createElement)("span",{className:"wc-block-editor-components-external-link-card__content"},(0,r.createElement)("strong",{className:"wc-block-editor-components-external-link-card__title"},t),o&&(0,r.createElement)("span",{className:"wc-block-editor-components-external-link-card__description",dangerouslySetInnerHTML:{__html:$r(o)}}),n?(0,r.createElement)("span",{className:"wc-block-editor-components-external-link-card__warning"},(0,r.createElement)(a.A,{icon:(0,r.createElement)(qr,{status:"error"})}),(0,r.createElement)("span",null,n)):null),(0,r.createElement)(jt.VisuallyHidden,{as:"span"},/* translators: accessibility text */ /* translators: accessibility text */ (0,M.__)("(opens in a new tab)","woocommerce")),(0,r.createElement)(a.A,{icon:Ur.A,className:"wc-block-editor-components-external-link-card__icon"})),Gr=window.wp.autop,Zr=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),Jr=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,Xr=(e,t,o="…",r=!0)=>{const n=Zr(e),c=n.split(" ").splice(0,t).join(" ");return c===n?r?(0,Gr.autop)(n):n:r?(0,Gr.autop)(Jr(c,o)):Jr(c,o)},Qr=(e,t,o=!0,r="…",n=!0)=>{const c=Zr(e),s=c.slice(0,t);if(s===c)return n?(0,Gr.autop)(c):c;if(o)return(0,Gr.autop)(Jr(s,r));const a=s.match(/([\s]+)/g),i=a?a.length:0,l=c.slice(0,t+i);return n?(0,Gr.autop)(Jr(l,r)):Jr(l,r)};var en=o(1208),tn=(o(9345),o(2900)),on=o(2478),rn=o(8306);const nn=e=>{switch(e){case"success":case"warning":case"info":case"default":return"polite";default:return"assertive"}},cn=e=>{switch(e){case"success":return tn.A;case"warning":case"info":case"error":return on.A;default:return rn.A}};var sn=o(195);const an=({className:e,status:t="default",children:o,spokenMessage:c=o,onRemove:s=(()=>{}),isDismissible:i=!0,politeness:l=nn(t),summary:d})=>(((e,t)=>{const o="string"==typeof e?e:(0,m.renderToString)(e);(0,m.useEffect)((()=>{o&&(0,sn.speak)(o,t)}),[o,t])})(c,l),(0,r.createElement)("div",{className:(0,n.A)(e,"wc-block-components-notice-banner","is-"+t,{"is-dismissible":i})},(0,r.createElement)(a.A,{icon:cn(t)}),(0,r.createElement)("div",{className:"wc-block-components-notice-banner__content"},d&&(0,r.createElement)("p",{className:"wc-block-components-notice-banner__summary"},d),o),!!i&&(0,r.createElement)(ar,{className:"wc-block-components-notice-banner__dismiss","aria-label":(0,M.__)("Dismiss this notice","woocommerce"),onClick:e=>{"function"==typeof(null==e?void 0:e.preventDefault)&&e.preventDefault&&e.preventDefault(),s()},removeTextWrap:!0},(0,r.createElement)(a.A,{icon:en.A}))));o(1637);const ln=()=>(0,r.createElement)(an,{isDismissible:!1,className:"wc-block-checkout__no-payment-methods-notice",status:"error"},(0,M.__)("There are no payment methods available. This may be an error on our side. Please contact us if you need any help placing your order.","woocommerce")),mn=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)("g",{fill:"none",fillRule:"evenodd"},(0,r.createElement)("path",{d:"M0 0h24v24H0z"}),(0,r.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),(0,r.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"})));var dn=o(4166),un=o(3576);o(777);const pn={bank:dn.A,bill:un.A,card:jr.A,checkPayment:mn},hn=({icon:e="",text:t=""})=>{const o=!!e,c=(0,m.useCallback)((e=>o&&(0,we.isString)(e)&&(0,we.objectHasProp)(pn,e)),[o]),s=(0,n.A)("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":o});return(0,r.createElement)("span",{className:s},c(e)?(0,r.createElement)(a.A,{icon:pn[e]}):e,t)},gn=e=>`wc-block-components-payment-method-icon wc-block-components-payment-method-icon--${e}`,kn=({id:e,src:t=null,alt:o=""})=>t?(0,r.createElement)("img",{className:gn(e),src:t,alt:o}):null,En=[{id:"alipay",alt:"Alipay",src:O+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:O+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:O+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:O+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:O+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:O+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:O+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:O+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:O+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:O+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:O+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:O+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:O+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:O+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:O+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:O+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:O+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:O+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:O+"payment-methods/wechat.svg"}];o(4957);const bn=({icons:e=[],align:t="center",className:o})=>{const c=(e=>{const t={};return e.forEach((e=>{let o={};"string"==typeof e&&(o={id:e,alt:e,src:null}),"object"==typeof e&&(o={id:e.id||"",alt:e.alt||"",src:e.src||null}),o.id&&(0,we.isString)(o.id)&&!t[o.id]&&(t[o.id]=o)})),Object.values(t)})(e);if(0===c.length)return null;const s=(0,n.A)("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===t,"wc-block-components-payment-method-icons--align-right":"right"===t},o);return(0,r.createElement)("div",{className:s},c.map((e=>{const t={...e,...(o=e.id,En.find((e=>e.id===o))||{})};var o;return(0,r.createElement)(kn,{key:"payment-method-icon-"+e.id,...t})})))},wn=(e="")=>{const{cartCoupons:t,cartIsLoading:o}=Ke(),{createErrorNotice:r}=(0,_.useDispatch)("core/notices"),{createNotice:n}=(0,_.useDispatch)("core/notices"),{setValidationErrors:c}=(0,_.useDispatch)(oe.validationStore),{isApplyingCoupon:s,isRemovingCoupon:a}=(0,_.useSelect)((e=>{const t=e(oe.CART_STORE_KEY);return{isApplyingCoupon:t.isApplyingCoupon(),isRemovingCoupon:t.isRemovingCoupon()}})),{applyCoupon:i,removeCoupon:l}=(0,_.useDispatch)(oe.CART_STORE_KEY),m=(0,_.useSelect)((e=>e(oe.CHECKOUT_STORE_KEY).getOrderId()));return{appliedCoupons:t,isLoading:o,applyCoupon:t=>i(t).then((()=>((0,Tt.applyCheckoutFilter)({filterName:"showApplyCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&n("info",(0,M.sprintf)(/* translators: %s coupon code. */ /* translators: %s coupon code. */ (0,M.__)('Coupon code "%s" has been applied to your cart.',"woocommerce"),t),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0)))).catch((e=>{const t=(e=>{var t,o,r,n;return m&&m>0&&null!=e&&null!==(t=e.data)&&void 0!==t&&null!==(o=t.details)&&void 0!==o&&o.checkout?e.data.details.checkout:null!=e&&null!==(r=e.data)&&void 0!==r&&null!==(n=r.details)&&void 0!==n&&n.cart?e.data.details.cart:e.message})(e);return c({coupon:{message:(0,Pe.decodeEntities)(t),hidden:!1}}),Promise.resolve(!1)})),removeCoupon:t=>l(t).then((()=>((0,Tt.applyCheckoutFilter)({filterName:"showRemoveCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&n("info",(0,M.sprintf)(/* translators: %s coupon code. */ /* translators: %s coupon code. */ (0,M.__)('Coupon code "%s" has been removed from your cart.',"woocommerce"),t),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0)))).catch((t=>(r(t.message,{id:"coupon-form",context:e}),Promise.resolve(!1)))),isApplyingCoupon:s,isRemovingCoupon:a}},vn=(e,t)=>{const o=[],r=(t,o)=>{const r=o+"_tax",n=(0,we.objectHasProp)(e,o)&&(0,we.isString)(e[o])?parseInt(e[o],10):0;return{key:o,label:t,value:n,valueWithTax:n+((0,we.objectHasProp)(e,r)&&(0,we.isString)(e[r])?parseInt(e[r],10):0)}};return o.push(r((0,M.__)("Subtotal:","woocommerce"),"total_items")),o.push(r((0,M.__)("Fees:","woocommerce"),"total_fees")),o.push(r((0,M.__)("Discount:","woocommerce"),"total_discount")),o.push({key:"total_tax",label:(0,M.__)("Taxes:","woocommerce"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&o.push(r((0,M.__)("Shipping:","woocommerce"),"total_shipping")),o},yn=()=>{const{onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onCheckoutAfterProcessingWithSuccess:o,onCheckoutAfterProcessingWithError:r,onSubmit:n,onCheckoutSuccess:c,onCheckoutFail:s,onCheckoutValidation:a}=bt(),{isCalculating:i,isComplete:l,isIdle:d,isProcessing:u,customerId:p}=(0,_.useSelect)((e=>{const t=e(oe.CHECKOUT_STORE_KEY);return{isComplete:t.isComplete(),isIdle:t.isIdle(),isProcessing:t.isProcessing(),customerId:t.getCustomerId(),isCalculating:t.isCalculating()}})),{paymentStatus:h,activePaymentMethod:g,shouldSavePayment:k}=(0,_.useSelect)((e=>{const t=e(oe.PAYMENT_STORE_KEY);return{paymentStatus:{get isPristine(){return ne()("isPristine",{since:"9.6.0",alternative:"isIdle",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8110"}),t.isPaymentIdle()},isIdle:t.isPaymentIdle(),isStarted:t.isExpressPaymentStarted(),isProcessing:t.isPaymentProcessing(),get isFinished(){return ne()("isFinished",{since:"9.6.0",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8110"}),t.hasPaymentError()||t.isPaymentReady()},hasError:t.hasPaymentError(),get hasFailed(){return ne()("hasFailed",{since:"9.6.0",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8110"}),t.hasPaymentError()},get isSuccessful(){return ne()("isSuccessful",{since:"9.6.0",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8110"}),t.isPaymentReady()},isReady:t.isPaymentReady(),isDoingExpressPayment:t.isExpressPaymentMethodActive()},activePaymentMethod:t.getActivePaymentMethod(),shouldSavePayment:t.getShouldSavePaymentMethod()}})),{__internalSetExpressPaymentError:E}=(0,_.useDispatch)(oe.PAYMENT_STORE_KEY),{onPaymentProcessing:b,onPaymentSetup:w}=(0,m.useContext)(le),{shippingErrorStatus:y,shippingErrorTypes:f,onShippingRateSuccess:C,onShippingRateFail:S,onShippingRateSelectSuccess:P,onShippingRateSelectFail:N}=dt(),{shippingRates:A,isLoadingRates:T,selectedRates:x,isSelectingRate:R,selectShippingRate:I,needsShipping:B}=st(),{billingAddress:O,shippingAddress:D}=(0,_.useSelect)((e=>e(oe.CART_STORE_KEY).getCustomerData())),{setShippingAddress:L}=(0,_.useDispatch)(oe.CART_STORE_KEY),{cartItems:F,cartFees:j,cartTotals:U,extensions:H}=Ke(),{appliedCoupons:Y}=wn(),V=(0,m.useRef)(vn(U,B)),K=(0,m.useRef)({label:(0,M.__)("Total","woocommerce"),value:parseInt(U.total_price,10)});(0,m.useEffect)((()=>{V.current=vn(U,B),K.current={label:(0,M.__)("Total","woocommerce"),value:parseInt(U.total_price,10)}}),[U,B]);const $=(0,m.useCallback)(((e="")=>{ne()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),E(e)}),[E]);return{activePaymentMethod:g,billing:{appliedCoupons:Y,billingAddress:O,billingData:O,cartTotal:K.current,cartTotalItems:V.current,currency:(0,lr.getCurrencyFromPriceResponse)(U),customerId:p,displayPricesIncludingTax:(0,v.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:F,cartFees:j,extensions:H},checkoutStatus:{isCalculating:i,isComplete:l,isIdle:d,isProcessing:u},components:{LoadingMask:Er,PaymentMethodIcons:bn,PaymentMethodLabel:hn,ValidationInputError:$t.ValidationInputError},emitResponse:{noticeContexts:ye,responseTypes:ve},eventRegistration:{onCheckoutAfterProcessingWithError:r,onCheckoutAfterProcessingWithSuccess:o,onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onCheckoutSuccess:c,onCheckoutFail:s,onCheckoutValidation:a,onPaymentProcessing:b,onPaymentSetup:w,onShippingRateFail:S,onShippingRateSelectFail:N,onShippingRateSelectSuccess:P,onShippingRateSuccess:C},onSubmit:n,paymentStatus:h,setExpressPaymentError:$,shippingData:{isSelectingRate:R,needsShipping:B,selectedRates:x,setSelectedRates:I,setShippingAddress:L,shippingAddress:D,shippingRates:A,shippingRatesLoading:T},shippingStatus:{shippingErrorStatus:y,shippingErrorTypes:f},shouldSavePayment:k}};class fn extends m.Component{constructor(...e){super(...e),(0,I.A)(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:o}=this.props;if(e){let e=(0,M.__)("We are experiencing difficulties with this payment method. Please contact us for assistance.","woocommerce");(o||v.CURRENT_USER_IS_ADMIN)&&(e=t||(0,M.__)("There was an error with this payment method. Please verify it's configured correctly.","woocommerce"));const n=[{id:"0",content:e,isDismissible:!1,status:"error"}];return(0,r.createElement)($t.StoreNoticesContainer,{additionalNotices:n,context:ye.PAYMENTS})}return this.props.children}}const Cn=fn,Sn=({children:e,showSaveOption:t})=>{const{isEditor:o}=E(),{shouldSavePaymentMethod:n,customerId:c}=(0,_.useSelect)((e=>{const t=e(oe.PAYMENT_STORE_KEY),o=e(oe.CHECKOUT_STORE_KEY);return{shouldSavePaymentMethod:t.getShouldSavePaymentMethod(),customerId:o.getCustomerId()}})),{__internalSetShouldSavePaymentMethod:s}=(0,_.useDispatch)(oe.PAYMENT_STORE_KEY);return(0,r.createElement)(Cn,{isEditor:o},e,c>0&&t&&(0,r.createElement)($t.CheckboxControl,{className:"wc-block-components-payment-methods__save-card-info",label:(0,M.__)("Save payment information to my account for future purchases.","woocommerce"),checked:n,onChange:()=>s(!n)}))},Pn="wc/store/payment",Nn=()=>{const{activeSavedToken:e,activePaymentMethod:t,isExpressPaymentMethodActive:o,savedPaymentMethods:c,availablePaymentMethods:s}=(0,_.useSelect)((e=>{const t=e(Pn);return{activeSavedToken:t.getActiveSavedToken(),activePaymentMethod:t.getActivePaymentMethod(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive(),savedPaymentMethods:t.getSavedPaymentMethods(),availablePaymentMethods:t.getAvailablePaymentMethods()}})),{__internalSetActivePaymentMethod:a}=(0,_.useDispatch)(Pn),i=(0,ft.getPaymentMethods)(),{...l}=yn(),{removeNotice:d}=(0,_.useDispatch)("core/notices"),{dispatchCheckoutEvent:u}=ct(),{isEditor:p}=E(),h=Object.keys(s).map((e=>{const{edit:t,content:o,label:n,supports:c}=i[e],s=p?t:o;return{value:e,label:"string"==typeof n?n:(0,m.cloneElement)(n,{components:l.components}),name:`wc-saved-payment-method-token-${e}`,content:(0,r.createElement)(Sn,{showSaveOption:c.showSaveOption},(0,m.cloneElement)(s,{__internalSetActivePaymentMethod:a,...l}))}})),g=(0,m.useCallback)((e=>{a(e),d("wc-payment-error",ye.PAYMENTS),u("set-active-payment-method",{paymentMethodSlug:e})}),[u,d,a]),k=0===Object.keys(c).length&&1===Object.keys(i).length,b=(0,n.A)({"disable-radio-control":k});return o?null:(0,r.createElement)($t.RadioControlAccordion,{highlightChecked:!0,id:"wc-payment-method-options",className:b,selected:e?null:t,onChange:g,options:h})},An="wc/store/cart",Tn=((0,M.__)("Unable to get cart data from the API.","woocommerce"),[]),xn=[],Rn={},In={};Object.keys(v.defaultFields).forEach((e=>{In[e]=""})),delete In.email;const Mn={};Object.keys(v.defaultFields).forEach((e=>{Mn[e]=""}));const Bn={cartItemsPendingQuantity:[],cartItemsPendingDelete:[],cartData:{coupons:[],shippingRates:[],shippingAddress:In,billingAddress:Mn,items:[],itemsCount:0,itemsWeight:0,crossSells:[],needsShipping:!0,needsPayment:!1,hasCalculatedShipping:!0,fees:[],totals:{currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"",currency_suffix:"",total_items:"0",total_items_tax:"0",total_fees:"0",total_fees_tax:"0",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_price:"0",total_tax:"0",tax_lines:[]},errors:Tn,paymentMethods:[],paymentRequirements:[],extensions:Rn},metaData:{updatingCustomerData:!1,updatingSelectedRate:!1,applyingCoupon:"",removingCoupon:"",isCartDataStale:!1},errors:xn},On=({method:e,expires:t})=>{var o,r,n;return(0,M.sprintf)(/* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */ /* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */ (0,M.__)("%1$s ending in %2$s (expires %3$s)","woocommerce"),null!==(o=null!==(r=null==e?void 0:e.display_brand)&&void 0!==r?r:null==e||null===(n=e.networks)||void 0===n?void 0:n.preferred)&&void 0!==o?o:e.brand,e.last4,t)},Dn=({method:e})=>e.brand&&e.last4?(0,M.sprintf)(/* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card. */ /* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card. */ (0,M.__)("%1$s ending in %2$s","woocommerce"),e.brand,e.last4):(0,M.sprintf)(/* translators: %s is the name of the payment method gateway. */ /* translators: %s is the name of the payment method gateway. */ (0,M.__)("Saved token for %s","woocommerce"),e.gateway),Ln=()=>{var e;const{activeSavedToken:t,activePaymentMethod:o,savedPaymentMethods:n}=(0,_.useSelect)((e=>{const t=e(oe.PAYMENT_STORE_KEY);return{activeSavedToken:t.getActiveSavedToken(),activePaymentMethod:t.getActivePaymentMethod(),savedPaymentMethods:t.getSavedPaymentMethods()}})),{__internalSetActivePaymentMethod:c}=(0,_.useDispatch)(oe.PAYMENT_STORE_KEY),s=(()=>{let e;if((0,_.select)("core/editor")){const t={cartCoupons:rt.coupons,cartItems:rt.items,crossSellsProducts:rt.cross_sells,cartFees:rt.fees,cartItemsCount:rt.items_count,cartItemsWeight:rt.items_weight,cartNeedsPayment:rt.needs_payment,cartNeedsShipping:rt.needs_shipping,cartItemErrors:Tn,cartTotals:rt.totals,cartIsLoading:!1,cartErrors:xn,billingData:Bn.cartData.billingAddress,billingAddress:Bn.cartData.billingAddress,shippingAddress:Bn.cartData.shippingAddress,extensions:Rn,shippingRates:rt.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:rt.has_calculated_shipping,paymentRequirements:rt.payment_requirements,receiveCart:()=>{}};e={cart:t,cartTotals:t.cartTotals,cartNeedsShipping:t.cartNeedsShipping,billingData:t.billingAddress,billingAddress:t.billingAddress,shippingAddress:t.shippingAddress,selectedShippingMethods:Ze(t.shippingRates),paymentMethods:rt.payment_methods,paymentRequirements:t.paymentRequirements}}else{const t=(0,_.select)(An),o=t.getCartData(),r=t.getCartErrors(),n=t.getCartTotals(),c=!t.hasFinishedResolution("getCartData"),s=t.isCustomerDataUpdating(),a=Ze(o.shippingRates);e={cart:{cartCoupons:o.coupons,cartItems:o.items,crossSellsProducts:o.crossSells,cartFees:o.fees,cartItemsCount:o.itemsCount,cartItemsWeight:o.itemsWeight,cartNeedsPayment:o.needsPayment,cartNeedsShipping:o.needsShipping,cartItemErrors:o.errors,cartTotals:n,cartIsLoading:c,cartErrors:r,billingData:Ie(o.billingAddress),billingAddress:Ie(o.billingAddress),shippingAddress:Ie(o.shippingAddress),extensions:o.extensions,shippingRates:o.shippingRates,isLoadingRates:s,cartHasCalculatedShipping:o.hasCalculatedShipping,paymentRequirements:o.paymentRequirements,receiveCart:(0,_.dispatch)(An).receiveCart},cartTotals:o.totals,cartNeedsShipping:o.needsShipping,billingData:o.billingAddress,billingAddress:o.billingAddress,shippingAddress:o.shippingAddress,selectedShippingMethods:a,paymentMethods:o.paymentMethods,paymentRequirements:o.paymentRequirements}}return e})(),a=(0,ft.getPaymentMethods)(),i=yn(),{removeNotice:l}=(0,_.useDispatch)("core/notices"),{dispatchCheckoutEvent:d}=ct(),u=(0,m.useMemo)((()=>{const e=Object.keys(n),t=new Set(e.flatMap((e=>n[e].map((e=>e.method.gateway))))),o=Array.from(t).filter((e=>{var t;return null===(t=a[e])||void 0===t?void 0:t.canMakePayment(s)}));return e.flatMap((e=>n[e].map((t=>{if(!o.includes(t.method.gateway))return;const r="cc"===e||"echeck"===e,n=t.method.gateway;return{name:`wc-saved-payment-method-token-${n}`,label:r?On(t):Dn(t),value:t.tokenId.toString(),onChange:e=>{c(n,{token:e,payment_method:n,[`wc-${n}-payment-token`]:e.toString(),isSavedToken:!0}),l("wc-payment-error",ye.PAYMENTS),d("set-active-payment-method",{paymentMethodSlug:n})}}})))).filter((e=>void 0!==e))}),[n,a,c,l,d,s]),p=t&&a[o]&&void 0!==(null===(e=a[o])||void 0===e?void 0:e.savedTokenComponent)&&!(0,we.isNull)(a[o].savedTokenComponent)?(0,m.cloneElement)(a[o].savedTokenComponent,{token:t,...i}):null;return u.length>0?(0,r.createElement)(r.Fragment,null,(0,r.createElement)($t.RadioControl,{highlightChecked:!0,id:"wc-payment-method-saved-tokens",selected:t,options:u,onChange:()=>{}}),p):null};o(181);const Fn=({noPaymentMethods:e=(0,r.createElement)(ln,null)})=>{const{paymentMethodsInitialized:t,availablePaymentMethods:o,savedPaymentMethods:n}=(0,_.useSelect)((e=>{const t=e(oe.PAYMENT_STORE_KEY);return{paymentMethodsInitialized:t.paymentMethodsInitialized(),availablePaymentMethods:t.getAvailablePaymentMethods(),savedPaymentMethods:t.getSavedPaymentMethods()}}));return t&&0===Object.keys(o).length?e:(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Ln,null),Object.keys(n).length>0&&(0,r.createElement)($t.Label,{label:(0,M.__)("Use another payment method.","woocommerce"),screenReaderLabel:(0,M.__)("Other available payment methods","woocommerce"),wrapperElement:"p",wrapperProps:{className:["wc-block-components-checkout-step__description wc-block-components-checkout-step__description-payments-aligned"]}}),(0,r.createElement)(Nn,null))},jn=({noPaymentMethods:e})=>(0,r.createElement)(Fn,{noPaymentMethods:e});var Un=o(433),Hn=o(4400);const Yn=({label:e,description:t,buttonLabel:o,buttonHref:n,icon:c=Un.A})=>(0,r.createElement)(jt.Placeholder,{icon:(0,r.createElement)(a.A,{icon:c}),label:e,className:"wc-block-checkout__configure-placeholder"},(0,r.createElement)("span",{className:"wc-block-checkout__configure-placeholder-description"},t),(0,r.createElement)(jt.Button,{variant:"primary",href:n,target:"_blank",rel:"noopener noreferrer",style:{backgroundColor:Hn.T.fN2,color:Hn.T.cai,pointerEvents:"all"}},o)),Vn={...Ao({defaultTitle:(0,M.__)("Payment options","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};(0,i.registerBlockType)("woocommerce/checkout-payment-block",{icon:{src:(0,r.createElement)(a.A,{icon:jr.A,className:"wc-block-editor-components-block-icon"})},attributes:Vn,edit:({attributes:e,setAttributes:t})=>{const o=(0,v.getSetting)("globalPaymentMethods"),c=(0,_.select)(oe.PAYMENT_STORE_KEY).getIncompatiblePaymentMethods(),s=(0,M.__)("Incompatible with block-based checkout","woocommerce"),a=B.wordCountType;return(0,r.createElement)(qt,{attributes:e,setAttributes:t,className:(0,n.A)("wc-block-checkout__payment-method",null==e?void 0:e.className)},(0,r.createElement)(l.InspectorControls,null,o.length>0&&(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Methods","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("You currently have the following payment integrations active.","woocommerce")),o.map((e=>{const t=!!c[e.id];let o;return o="words"===a?Xr(e.description,30,void 0,!1):Qr(e.description,30,"characters_including_spaces"===a,void 0,!1),(0,r.createElement)(Wr,{key:e.id,href:`${v.ADMIN_URL}admin.php?page=wc-settings&tab=checkout§ion=${e.id}`,title:e.title,description:o,...t?{warning:s}:{}})})),(0,r.createElement)(jt.ExternalLink,{href:`${v.ADMIN_URL}admin.php?page=wc-settings&tab=checkout`},(0,M.__)("Manage payment methods","woocommerce")))),(0,r.createElement)(eo,null,(0,r.createElement)(jn,{noPaymentMethods:(0,r.createElement)(Yn,{icon:jr.A,label:(0,M.__)("Payment options","woocommerce"),description:(0,M.__)("Your store does not have any payment methods that support the Checkout block. Once you have configured a compatible payment method it will be displayed here.","woocommerce"),buttonLabel:(0,M.__)("Configure Payment Options","woocommerce"),buttonHref:`${v.ADMIN_URL}admin.php?page=wc-settings&tab=checkout`})})),(0,r.createElement)(Wt,{block:Tt.innerBlockAreas.PAYMENT_METHODS}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(Gt,null))});const Kn=(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},(0,r.createElement)("path",{stroke:"#1E1E1E",strokeLinejoin:"round",strokeWidth:"1.5",d:"M18.25 12a6.25 6.25 0 1 1-12.5 0 6.25 6.25 0 0 1 12.5 0Z"}),(0,r.createElement)("path",{fill:"#1E1E1E",d:"M10 3h4v3h-4z"}),(0,r.createElement)("rect",{width:"1.5",height:"5",x:"11.25",y:"8",fill:"#1E1E1E",rx:".75"}),(0,r.createElement)("path",{fill:"#1E1E1E",d:"m15.7 4.816 1.66 1.078-1.114 1.718-1.661-1.078z"})),$n=()=>((e=!1)=>{const{paymentMethodsInitialized:t,expressPaymentMethodsInitialized:o,availablePaymentMethods:r,availableExpressPaymentMethods:n}=(0,_.useSelect)((e=>{const t=e(oe.PAYMENT_STORE_KEY);return{paymentMethodsInitialized:t.paymentMethodsInitialized(),expressPaymentMethodsInitialized:t.expressPaymentMethodsInitialized(),availableExpressPaymentMethods:t.getAvailableExpressPaymentMethods(),availablePaymentMethods:t.getAvailablePaymentMethods()}})),c=Object.values(r).map((({name:e})=>e)),s=Object.values(n).map((({name:e})=>e)),a=(0,ft.getPaymentMethods)(),i=(0,ft.getExpressPaymentMethods)(),l=Object.keys(a).reduce(((e,t)=>(c.includes(t)&&(e[t]=a[t]),e)),{}),m=Object.keys(i).reduce(((e,t)=>(s.includes(t)&&(e[t]=i[t]),e)),{}),d=mo(l),u=mo(m);return{paymentMethods:e?u:d,isInitialized:e?o:t}})(!0),zn=["height","borderRadius"],qn=e=>{const t=(0,_.select)(oe.PAYMENT_STORE_KEY).getAvailableExpressPaymentMethods();return Object.values(t).reduce(((t,o)=>t||(null==o?void 0:o.supportsStyle.some((t=>e.includes(t))))),!1)},Wn=({attributes:e,setAttributes:t})=>{const{buttonHeight:o,buttonBorderRadius:n}=e;return(0,r.createElement)(r.Fragment,null,qn(["height"])&&(0,r.createElement)(jt.RadioControl,{label:(0,M.__)("Button height","woocommerce"),selected:o,options:[{label:(0,M.__)("Small (40px)","woocommerce"),value:"40"},{label:(0,M.__)("Medium (48px)","woocommerce"),value:"48"},{label:(0,M.__)("Large (55px)","woocommerce"),value:"55"}],onChange:e=>t({buttonHeight:e})}),qn(["borderRadius"])&&(0,r.createElement)("div",{className:"border-radius-control-container"},(0,r.createElement)(l.HeightControl,{label:(0,M.__)("Button border radius","woocommerce"),value:n,onChange:e=>{const o=e.replace("px","");t({buttonBorderRadius:o})}})))},Gn=({attributes:e,setAttributes:t})=>e.showButtonStyles?(0,r.createElement)(Wn,{attributes:e,setAttributes:t}):null,Zn=()=>{const e=(0,_.select)(oe.PAYMENT_STORE_KEY).getAvailableExpressPaymentMethods();return Object.entries(e).length<1?(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("You currently have no express payment integrations active.","woocommerce")):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("You currently have the following express payment integrations active.","woocommerce")),Object.values(e).map((e=>(0,r.createElement)(Wr,{key:e.name,href:`${v.ADMIN_URL}admin.php?page=wc-settings&tab=checkout§ion=${encodeURIComponent(e.gatewayId)}`,title:e.title,description:e.description}))))},Jn=(0,r.createElement)(r.Fragment,null,(0,M.__)("Apply uniform styles","woocommerce")," ",(0,r.createElement)("span",{className:"express-payment-styles-beta-badge"},"Beta")),Xn=({attributes:e,setAttributes:t})=>(0,r.createElement)(l.InspectorControls,null,qn(zn)&&(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Button Settings","woocommerce"),className:"express-payment-button-settings"},(0,r.createElement)(jt.ToggleControl,{label:Jn,checked:e.showButtonStyles,onChange:()=>t({showButtonStyles:!e.showButtonStyles}),help:(0,M.__)("Sets a consistent style for express payment buttons.","woocommerce")}),(0,r.createElement)(jt.Notice,{status:"warning",isDismissible:!1,className:"wc-block-checkout__notice express-payment-styles-notice"},(0,r.createElement)("strong",null,(0,M.__)("Note","woocommerce"),":")," ",(0,M.__)("Some payment methods might not yet support all style controls","woocommerce")),(0,r.createElement)(Gn,{attributes:e,setAttributes:t})),(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Express Payment Methods","woocommerce")},(0,r.createElement)(Zn,null))),Qn=(0,m.createContext)({showButtonStyles:!1,buttonHeight:"48",buttonBorderRadius:"4"}),ec=()=>{const{isEditor:e}=E(),{showButtonStyles:t,buttonHeight:o,buttonBorderRadius:n}=(0,m.useContext)(Qn),c=t?{height:o,borderRadius:n}:void 0,{activePaymentMethod:s,paymentMethodData:a}=(0,_.useSelect)((e=>{const t=e(Pn);return{activePaymentMethod:t.getActivePaymentMethod(),paymentMethodData:t.getPaymentMethodData()}})),{__internalSetActivePaymentMethod:i,__internalSetExpressPaymentStarted:l,__internalSetPaymentIdle:d,__internalSetPaymentError:u,__internalSetPaymentMethodData:p,__internalSetExpressPaymentError:h}=(0,_.useDispatch)(Pn),{paymentMethods:g}=$n(),k=yn(),b=(0,m.useRef)(s),w=(0,m.useRef)(a),v=(0,m.useCallback)((e=>()=>{b.current=s,w.current=a,l(),i(e)}),[s,a,i,l]),y=(0,m.useCallback)((()=>{d(),i(b.current,w.current)}),[i,d]),f=(0,m.useCallback)((e=>{u(),p(e),h(e),i(b.current,w.current)}),[i,u,p,h]),C=(0,m.useCallback)(((e="")=>{ne()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?f(e):h("")}),[h,f]),S=Object.entries(g),P=S.length>0?S.map((([t,o])=>{const n=e?o.edit:o.content;return(0,m.isValidElement)(n)?(0,r.createElement)("li",{key:t,id:`express-payment-method-${t}`},(0,m.cloneElement)(n,{...k,onClick:v(t),onClose:y,onError:f,setExpressPaymentError:C,buttonAttributes:c})):null})):(0,r.createElement)("li",{key:"noneRegistered"},(0,M.__)("No registered Payment Methods","woocommerce"));return(0,r.createElement)(Cn,{isEditor:e},(0,r.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},P))};o(9569);const tc=()=>{const{isCalculating:e,isProcessing:t,isAfterProcessing:o,isBeforeProcessing:n,isComplete:c,hasError:s}=(0,_.useSelect)((e=>{const t=e(oe.CHECKOUT_STORE_KEY);return{isCalculating:t.isCalculating(),isProcessing:t.isProcessing(),isAfterProcessing:t.isAfterProcessing(),isBeforeProcessing:t.isBeforeProcessing(),isComplete:t.isComplete(),hasError:t.hasError()}})),{availableExpressPaymentMethods:a,expressPaymentMethodsInitialized:i,isExpressPaymentMethodActive:l}=(0,_.useSelect)((e=>{const t=e(oe.PAYMENT_STORE_KEY);return{availableExpressPaymentMethods:t.getAvailableExpressPaymentMethods(),expressPaymentMethodsInitialized:t.expressPaymentMethodsInitialized(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive()}})),{isEditor:m}=E();if(!i||i&&0===Object.keys(a).length)return m||v.CURRENT_USER_IS_ADMIN?(0,r.createElement)($t.StoreNoticesContainer,{context:ye.EXPRESS_PAYMENTS}):null;const d=t||o||n||c&&!s;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Er,{isLoading:e||d||l},(0,r.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--checkout"},(0,r.createElement)("div",{className:"wc-block-components-express-payment__title-container"},(0,r.createElement)($t.Title,{className:"wc-block-components-express-payment__title",headingLevel:"2"},(0,M.__)("Express Checkout","woocommerce"))),(0,r.createElement)("div",{className:"wc-block-components-express-payment__content"},(0,r.createElement)($t.StoreNoticesContainer,{context:ye.EXPRESS_PAYMENTS}),(0,r.createElement)(ec,null)))),(0,r.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},(0,M.__)("Or continue below","woocommerce")))},oc=({className:e})=>{const{cartNeedsPayment:t}=Ke();return t?(0,r.createElement)("div",{className:e},(0,r.createElement)(tc,null)):null};o(9865),(0,i.registerBlockType)("woocommerce/checkout-express-payment-block",{icon:{src:(0,r.createElement)(a.A,{style:{fill:"none"},icon:Kn,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:t})=>{const{paymentMethods:o,isInitialized:c}=$n(),s=Object.keys(o).length>0,a=(0,l.useBlockProps)({className:(0,n.A)({"wp-block-woocommerce-checkout-express-payment-block--has-express-payment-methods":s},null==e?void 0:e.className),attributes:e});if(!c||!s)return null;const{buttonHeight:i,buttonBorderRadius:m,showButtonStyles:d}=e;return(0,r.createElement)("div",{...a},(0,r.createElement)(Xn,{attributes:e,setAttributes:t}),(0,r.createElement)(Qn.Provider,{value:{showButtonStyles:d,buttonHeight:i,buttonBorderRadius:m}},(0,r.createElement)(oc,null)))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});var rc=o(1176),nc=o(3705);const cc=({minRate:e,maxRate:t,multiple:o=!1})=>{if(void 0===e||void 0===t)return null;const n=(0,v.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10),c=(0,v.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(t.price,10)+parseInt(t.taxes,10):parseInt(t.price,10),s=0===n?(0,r.createElement)("em",null,(0,M.__)("free","woocommerce")):(0,r.createElement)($t.FormattedMonetaryAmount,{currency:(0,lr.getCurrencyFromPriceResponse)(e),value:n});return(0,r.createElement)("span",{className:"wc-block-checkout__shipping-method-option-price"},n!==c||o?(0,m.createInterpolateElement)(0===n&&0===c?"<price />":(0,M.__)("from <price />","woocommerce"),{price:s}):s)};function sc(e){return e?{min:e.reduce(((e,t)=>We(t.method_id)?e:void 0===e||parseInt(t.price,10)<parseInt(e.price,10)?t:e),void 0),max:e.reduce(((e,t)=>We(t.method_id)?e:void 0===e||parseInt(t.price,10)>parseInt(e.price,10)?t:e),void 0)}:{min:void 0,max:void 0}}function ac(e){return e?{min:e.reduce(((e,t)=>We(t.method_id)&&(void 0===e||t.price<e.price)?t:e),void 0),max:e.reduce(((e,t)=>We(t.method_id)&&(void 0===e||t.price>e.price)?t:e),void 0)}:{min:void 0,max:void 0}}o(7694);const ic=(0,M.__)("Pickup","woocommerce"),lc=(0,M.__)("Ship","woocommerce"),mc=({checked:e,rate:t,showPrice:o,showIcon:c,toggleText:s,setAttributes:i,onClick:m})=>(0,r.createElement)(uo.$,{render:(0,r.createElement)("div",null),className:(0,n.A)("wc-block-checkout__shipping-method-option",{"wc-block-checkout__shipping-method-option--selected":"pickup"===e}),onClick:m},!0===c&&(0,r.createElement)(a.A,{icon:nc.A,size:28,className:"wc-block-checkout__shipping-method-option-icon"}),(0,r.createElement)(l.RichText,{value:s,placeholder:ic,tagName:"span",className:"wc-block-checkout__shipping-method-option-title",onChange:e=>i({localPickupText:e}),__unstableDisableFormats:!0,preserveWhiteSpace:!0}),!0===o&&(0,r.createElement)(cc,{minRate:t.min,maxRate:t.max})),dc=({checked:e,rate:t,showPrice:o,showIcon:c,toggleText:s,setAttributes:i,onClick:m})=>{const d=void 0===t.min?(0,r.createElement)("span",{className:"wc-block-checkout__shipping-method-option-price"},(0,M.__)("calculated with an address","woocommerce")):(0,r.createElement)(cc,{minRate:t.min,maxRate:t.max});return(0,r.createElement)(uo.$,{render:(0,r.createElement)("div",null),className:(0,n.A)("wc-block-checkout__shipping-method-option",{"wc-block-checkout__shipping-method-option--selected":"shipping"===e}),onClick:m},!0===c&&(0,r.createElement)(a.A,{icon:rc.A,size:28,className:"wc-block-checkout__shipping-method-option-icon"}),(0,r.createElement)(l.RichText,{value:s,placeholder:lc,tagName:"span",className:"wc-block-checkout__shipping-method-option-title",onChange:e=>i({shippingText:e}),__unstableDisableFormats:!0,preserveWhiteSpace:!0}),!0===o&&d)},uc={...Ao({defaultTitle:(0,M.__)("Delivery","woocommerce"),defaultDescription:(0,M.__)("Select how you would like to receive your order.","woocommerce")}),className:{type:"string",default:""},showIcon:{type:"boolean",default:!0},showPrice:{type:"boolean",default:!1},localPickupText:{type:"string",default:ic},shippingText:{type:"string",default:lc},lock:{type:"object",default:{move:!0,remove:!0}}};(0,i.registerBlockType)("woocommerce/checkout-shipping-method-block",{icon:{src:(0,r.createElement)(a.A,{icon:rc.A,className:"wc-block-editor-components-block-icon"})},attributes:uc,edit:({attributes:e,setAttributes:t})=>{var o,c;(0,m.useEffect)((()=>{const o=(0,v.getSetting)("localPickupText",e.localPickupText);t({localPickupText:o})}),[t]);const{setPrefersCollection:s}=(0,_.useDispatch)(oe.CHECKOUT_STORE_KEY),{prefersCollection:a}=(0,_.useSelect)((e=>({prefersCollection:e(oe.CHECKOUT_STORE_KEY).prefersCollection()}))),{showPrice:i,showIcon:d,className:u,localPickupText:p,shippingText:h}=e,{shippingRates:g,needsShipping:k,hasCalculatedShipping:E,isCollectable:b}=st();if(!(k&&E&&g&&b&&H))return null;const w=e=>{s("pickup"===e)};return(0,r.createElement)(qt,{attributes:e,setAttributes:t,className:(0,n.A)("wc-block-checkout__shipping-method",u)},(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Appearance","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("Choose how this block is displayed to your customers.","woocommerce")),(0,r.createElement)(jt.ToggleControl,{label:(0,M.__)("Show icon","woocommerce"),checked:d,onChange:()=>t({showIcon:!d})}),(0,r.createElement)(jt.ToggleControl,{label:(0,M.__)("Show costs","woocommerce"),checked:i,onChange:()=>t({showPrice:!i})})),(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Shipping Methods","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("Methods can be made managed in your store settings.","woocommerce")),(0,r.createElement)(Wr,{key:"shipping_methods",href:`${v.ADMIN_URL}admin.php?page=wc-settings&tab=shipping`,title:(0,M.__)("Shipping","woocommerce"),description:(0,M.__)("Manage your shipping zones, methods, and rates.","woocommerce")}),(0,r.createElement)(Wr,{key:"pickup_location",href:`${v.ADMIN_URL}admin.php?page=wc-settings&tab=shipping§ion=pickup_location`,title:(0,M.__)("Pickup","woocommerce"),description:(0,M.__)("Allow customers to choose a local pickup location during checkout.","woocommerce")}))),(0,r.createElement)("div",{id:"shipping-method",className:"wc-block-checkout__shipping-method-container",role:"radiogroup"},(0,r.createElement)(dc,{checked:a?"pickup":"shipping",rate:sc(null===(o=g[0])||void 0===o?void 0:o.shipping_rates),onClick:()=>{w("shipping")},showPrice:i,showIcon:d,setAttributes:t,toggleText:h}),(0,r.createElement)(mc,{checked:a?"pickup":"shipping",rate:ac(null===(c=g[0])||void 0===c?void 0:c.shipping_rates),showPrice:i,onClick:()=>{w("pickup")},showIcon:d,setAttributes:t,toggleText:p})),(0,r.createElement)(Wt,{block:Tt.innerBlockAreas.SHIPPING_METHOD}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(Gt,null))});const pc=e=>{const t=(0,v.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);let o=(0,r.createElement)(r.Fragment,null,Number.isFinite(t)&&(0,r.createElement)($t.FormattedMonetaryAmount,{currency:(0,lr.getCurrencyFromPriceResponse)(e),value:t}),(0,r.createElement)("span",{className:"wc-block-components-shipping-rates-control__package__delivery_time"},Number.isFinite(t)&&e.delivery_time?" — ":null,(0,Pe.decodeEntities)(e.delivery_time)));return 0===t&&(o=(0,r.createElement)("span",{className:"wc-block-components-shipping-rates-control__package__description--free"},(0,M.__)("Free","woocommerce"),(0,r.createElement)("span",{className:"wc-block-components-shipping-rates-control__package__delivery_time"},e.delivery_time&&" — "+(0,Pe.decodeEntities)(e.delivery_time)))),{label:(0,Pe.decodeEntities)(e.name),value:e.rate_id,description:o}},hc=({className:e="",noResultsMessage:t,onSelectRate:o,rates:n,renderOption:c=pc,selectedRate:s,disabled:a=!1,highlightChecked:i=!1})=>{const l=(null==s?void 0:s.rate_id)||"",d=pt(l),[u,p]=(0,m.useState)(null!=l?l:"");return(0,m.useEffect)((()=>{l&&l!==d&&l!==u&&p(l)}),[l,u,d]),(0,m.useEffect)((()=>{!u&&n.length>0&&(p(n[0].rate_id),o(n[0].rate_id))}),[o,n,u]),0===n.length?t:(0,r.createElement)($t.RadioControl,{className:e,onChange:e=>{p(e),o(e)},highlightChecked:i,disabled:a,selected:u,options:n.map(c)})},gc=({packageData:e})=>(0,r.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(e.items).map((e=>{const t=(0,Pe.decodeEntities)(e.name),o=e.quantity;return(0,r.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},(0,r.createElement)($t.Label,{label:o>1?`${t} × ${o}`:`${t}`,allowHTML:!0,screenReaderLabel:(0,M.sprintf)(/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ /* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ (0,M._n)("%1$s (%2$d unit)","%1$s (%2$d units)",o,"woocommerce"),t,o)}))})));o(2867);const _c=({packageId:e,className:t="",noResultsMessage:o,renderOption:c,packageData:s,collapsible:a,showItems:i,highlightChecked:l=!1})=>{var d;const{selectShippingRate:u,isSelectingRate:p}=st(),h=(0,_.useSelect)((e=>{var t,o,r;return null===(t=e(oe.CART_STORE_KEY))||void 0===t||null===(o=t.getCartData())||void 0===o||null===(r=o.shippingRates)||void 0===r?void 0:r.length})),[g,k]=(0,m.useState)(0),E=h>1||g>1;(0,m.useEffect)((()=>{const e=()=>{k(document.querySelectorAll(".wc-block-components-shipping-rates-control__package").length)};e();const t=new MutationObserver(e);return t.observe(document.body,{childList:!0,subtree:!0}),()=>{t.disconnect()}}),[]);const b=null!=i?i:E,w=null!=a?a:E,{selectedOptionNumber:v,selectedOption:y}=(0,m.useMemo)((()=>{var e,t;return{selectedOptionNumber:null==s||null===(e=s.shipping_rates)||void 0===e?void 0:e.findIndex((e=>null==e?void 0:e.selected)),selectedOption:null==s||null===(t=s.shipping_rates)||void 0===t?void 0:t.find((e=>null==e?void 0:e.selected))}}),[null==s?void 0:s.shipping_rates]),f=w||b?(0,r.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-header"},(0,r.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title",dangerouslySetInnerHTML:{__html:$r(s.name)}}),w&&(0,r.createElement)("div",{className:"wc-block-components-totals-shipping__via"},(0,Pe.decodeEntities)(null==y?void 0:y.name)),b&&(0,r.createElement)(gc,{packageData:s})):null,C=(0,m.useCallback)((t=>{u(t,e)}),[e,u]),S={className:t,noResultsMessage:o,rates:s.shipping_rates,onSelectRate:C,selectedRate:s.shipping_rates.find((e=>e.selected)),renderOption:c,disabled:p,highlightChecked:l};return w?(0,r.createElement)($t.Panel,{className:(0,n.A)("wc-block-components-shipping-rates-control__package",t,{"wc-block-components-shipping-rates-control__package--disabled":p}),initialOpen:!1,title:f},(0,r.createElement)(hc,{...S})):(0,r.createElement)("div",{className:(0,n.A)("wc-block-components-shipping-rates-control__package",t,{"wc-block-components-shipping-rates-control__package--disabled":p,"wc-block-components-shipping-rates-control__package--first-selected":!p&&0===v,"wc-block-components-shipping-rates-control__package--last-selected":!p&&v===(null==s||null===(d=s.shipping_rates)||void 0===d?void 0:d.length)-1})},f,(0,r.createElement)(hc,{...S}))},kc=({packages:e,showItems:t,collapsible:o,noResultsMessage:n,renderOption:c,context:s=""})=>e.length?(0,r.createElement)(r.Fragment,null,e.map((({package_id:e,...a})=>(0,r.createElement)(_c,{highlightChecked:"woocommerce/cart"!==s,key:e,packageId:e,packageData:a,collapsible:o,showItems:t,noResultsMessage:n,renderOption:c})))):null,Ec=({shippingRates:e,isLoadingRates:t,className:o,collapsible:n,showItems:c,noResultsMessage:s=(0,r.createElement)(r.Fragment,null),renderOption:a,context:i})=>{const l=(e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0))(e),d=$e(e),u=pt(l),p=pt(d);(0,m.useEffect)((()=>{var e,o;t||u===l&&p===d||(o=l,1===(e=d)?(0,sn.speak)((0,M.sprintf)(/* translators: %d number of shipping options found. */ /* translators: %d number of shipping options found. */ (0,M._n)("%d shipping option was found.","%d shipping options were found.",o,"woocommerce"),o)):(0,sn.speak)((0,M.sprintf)(/* translators: %d number of shipping packages packages. */ /* translators: %d number of shipping packages packages. */ (0,M._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woocommerce"),e)+" "+(0,M.sprintf)(/* translators: %d number of shipping options available. */ /* translators: %d number of shipping options available. */ (0,M._n)("%d shipping option was found","%d shipping options were found",o,"woocommerce"),o)))}),[t,l,d,u,p]);const{extensions:h,receiveCart:g,..._}=Ke(),k={className:o,collapsible:n,showItems:c,noResultsMessage:s,renderOption:a,extensions:h,cart:_,components:{ShippingRatesControlPackage:_c},context:i},{isEditor:b}=E(),{hasSelectedLocalPickup:w,selectedRates:v}=st(),y=(0,we.isObject)(v)?Object.values(v):[],f=y.every((e=>e===y[0]));return(0,r.createElement)(Er,{isLoading:t,screenReaderLabel:(0,M.__)("Loading shipping rates…","woocommerce"),showSpinner:!0},w&&"woocommerce/cart"===i&&e.length>1&&!f&&!b&&(0,r.createElement)(an,{className:"wc-block-components-notice",isDismissible:!1,status:"warning"},(0,M.__)("Multiple shipments must have the same pickup location","woocommerce")),(0,r.createElement)(Tt.ExperimentalOrderShippingPackages.Slot,{...k}),(0,r.createElement)(Tt.ExperimentalOrderShippingPackages,null,(0,r.createElement)(kc,{packages:e,noResultsMessage:s,renderOption:a})))},bc=e=>{const t=(0,v.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10),o=0===t?(0,r.createElement)("span",{className:"wc-block-checkout__shipping-option--free"},(0,M.__)("Free","woocommerce")):(0,r.createElement)($t.FormattedMonetaryAmount,{currency:(0,lr.getCurrencyFromPriceResponse)(e),value:t});return{label:(0,Pe.decodeEntities)(e.name),value:e.rate_id,description:(0,Pe.decodeEntities)(e.description),secondaryLabel:o,secondaryDescription:(0,Pe.decodeEntities)(e.delivery_time)}},wc=()=>(0,r.createElement)("p",{role:"status","aria-live":"polite",className:"wc-block-components-shipping-rates-control__no-shipping-address-message"},(0,M.__)("Enter a shipping address to view shipping options.","woocommerce")),vc=({noShippingPlaceholder:e=null})=>{const{isEditor:t}=E(),{shippingRates:o,needsShipping:n,isLoadingRates:c,hasCalculatedShipping:s,isCollectable:a}=st(),{shippingAddress:i}=Vt(),l=(0,m.useMemo)((()=>a?o.map((e=>({...e,shipping_rates:e.shipping_rates.filter((e=>!We(e.method_id)))}))):o),[o,a]);if(!n)return null;const d=$e(o);if(!s&&!d)return(0,r.createElement)(wc,null);const u=Me(i);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)($t.StoreNoticesContainer,{context:ye.SHIPPING_METHODS}),t&&!d?e:(0,r.createElement)(Ec,{noResultsMessage:(0,r.createElement)(r.Fragment,null,u?(0,r.createElement)(an,{isDismissible:!1,className:"wc-block-components-shipping-rates-control__no-results-notice",status:"warning"},(0,M.__)("No shipping options are available for this address. Please verify the address is correct or try a different address.","woocommerce")):(0,r.createElement)(wc,null)),renderOption:bc,collapsible:!1,shippingRates:l,isLoadingRates:c,context:"woocommerce/checkout"}))};o(2255);const yc={...Ao({defaultTitle:(0,M.__)("Shipping options","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};o(1299),(0,i.registerBlockType)("woocommerce/checkout-shipping-methods-block",{icon:{src:(0,r.createElement)(a.A,{icon:rc.A,className:"wc-block-editor-components-block-icon"})},attributes:yc,edit:({attributes:e,setAttributes:t})=>{const o=(0,v.getSetting)("globalShippingMethods"),c=(0,v.getSetting)("activeShippingZones"),{showShippingMethods:s}=Kt();return s?(0,r.createElement)(qt,{attributes:e,setAttributes:t,className:(0,n.A)("wc-block-checkout__shipping-option",null==e?void 0:e.className)},(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Shipping Calculations","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("Options that control shipping can be managed in your store settings.","woocommerce")),(0,r.createElement)(jt.ExternalLink,{href:`${v.ADMIN_URL}admin.php?page=wc-settings&tab=shipping§ion=options`},(0,M.__)("Manage shipping options","woocommerce"))," "),o.length>0&&(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Methods","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("The following shipping integrations are active on your store.","woocommerce")),o.map((e=>(0,r.createElement)(Wr,{key:e.id,href:`${v.ADMIN_URL}admin.php?page=wc-settings&tab=shipping§ion=${e.id}`,title:e.title,description:e.description}))),(0,r.createElement)(jt.ExternalLink,{href:`${v.ADMIN_URL}admin.php?page=wc-settings&tab=shipping`},(0,M.__)("Manage shipping methods","woocommerce"))),c.length&&(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Shipping Zones","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("Shipping Zones can be made managed in your store settings.","woocommerce")),c.map((e=>(0,r.createElement)(Wr,{key:e.id,href:`${v.ADMIN_URL}admin.php?page=wc-settings&tab=shipping&zone_id=${e.id}`,title:e.title,description:e.description}))))),(0,r.createElement)(eo,null,(0,r.createElement)(vc,{noShippingPlaceholder:(0,r.createElement)(Yn,{icon:rc.A,label:(0,M.__)("Shipping options","woocommerce"),description:(0,M.__)("Your store does not have any Shipping Options configured. Once you have added your Shipping Options they will appear here.","woocommerce"),buttonLabel:(0,M.__)("Configure Shipping Options","woocommerce"),buttonHref:`${v.ADMIN_URL}admin.php?page=wc-settings&tab=shipping`})})),(0,r.createElement)(Wt,{block:Tt.innerBlockAreas.SHIPPING_METHODS})):null},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(Gt,null))});const fc=({title:e,setSelectedOption:t,selectedOption:o,pickupLocations:n,onSelectRate:c,renderPickupLocation:s,packageCount:a})=>{const i=(0,_.useSelect)((e=>{var t,o,r;return null===(t=e(oe.CART_STORE_KEY))||void 0===t||null===(o=t.getCartData())||void 0===o||null===(r=o.shippingRates)||void 0===r?void 0:r.length}))>1||document.querySelectorAll(".wc-block-components-local-pickup-select .wc-block-components-radio-control").length>1;return(0,r.createElement)("div",{className:"wc-block-components-local-pickup-select"},!(!i||!e)&&(0,r.createElement)("div",null,e),(0,r.createElement)($t.RadioControl,{onChange:e=>{t(e),c(e)},highlightChecked:!0,selected:o,options:n.map((e=>s(e,a)))}))};function Cc(e){let t,o,r,n=[];for(let c=0;c<e.length;c++)t=e.substring(c),o=t.match(/^&[a-z0-9#]+;/),o?(r=o[0],n.push(r),c+=r.length-1):n.push(e[c]);return n}const Sc=(e,t,o="...")=>{const r=function(e,t){const o=(t=t||{}).limit||100,r=void 0===t.preserveTags||t.preserveTags,n=void 0!==t.wordBreak&&t.wordBreak,c=t.suffix||"...",s=t.moreLink||"",a=t.moreText||"»",i=t.preserveWhiteSpace||!1,l=e.replace(/</g,"\n<").replace(/>/g,">\n").replace(/\n\n/g,"\n").replace(/^\n/g,"").replace(/\n$/g,"").split("\n");let m,d,u,p,h,g,_=0,k=[],E=!1;for(let e=0;e<l.length;e++){if(m=l[e],p=i?m:m.replace(/[ ]+/g," "),!m.length)continue;const t=Cc(p);if("<"!==m[0])if(_>=o)m="";else if(_+t.length>=o){if(d=o-_," "===t[d-1])for(;d&&(d-=1," "===t[d-1]););else u=t.slice(d).indexOf(" "),n||(-1!==u?d+=u:d=m.length);if(m=t.slice(0,d).join("")+c,s){const e=document.createElement("a");e.href=s,e.style.display="inline",e.textContent=a,m+=e.outerHTML}_=o,E=!0}else _+=t.length;else if(r){if(_>=o)if(h=m.match(/[a-zA-Z]+/),g=h?h[0]:"",g)if("</"!==m.substring(0,2))k.push(g),m="";else{for(;k[k.length-1]!==g&&k.length;)k.pop();k.length&&(m=""),k.pop()}else m=""}else m="";l[e]=m}return{html:l.join("\n").replace(/\n/g,""),more:E}}(e,{suffix:o,limit:t});return r.html},Pc=(e,t,o)=>(t<=o?e.start=e.middle+1:e.end=e.middle-1,e),Nc=(e,t,o,r)=>{const n=((e,t,o)=>{let r={start:0,middle:0,end:e.length};for(;r.start<=r.end;)r.middle=Math.floor((r.start+r.end)/2),t.innerHTML=Sc(e,r.middle),r=Pc(r,t.clientHeight,o);return r.middle})(e,t,o);return Sc(e,n-r.length,r)},Ac={className:"read-more-content",ellipsis:"…",lessText:(0,M.__)("Read less","woocommerce"),maxLines:3,moreText:(0,M.__)("Read more","woocommerce")};class Tc extends m.Component{constructor(e){super(e),(0,I.A)(this,"reviewSummary",void 0),(0,I.A)(this,"reviewContent",void 0),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewContent=(0,m.createRef)(),this.reviewSummary=(0,m.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){this.setSummary()}componentDidUpdate(e){e.maxLines===this.props.maxLines&&e.children===this.props.children||this.setState({clampEnabled:null,summary:"."},this.setSummary)}setSummary(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props;if(!this.reviewSummary.current||!this.reviewContent.current)return;const o=(this.reviewSummary.current.clientHeight+1)*e+1,r=this.reviewContent.current.clientHeight+1>o;this.setState({clampEnabled:r}),r&&this.setState({summary:Nc(this.reviewContent.current.innerHTML,this.reviewSummary.current,o,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:o,moreText:n}=this.props,c=e?o:n;if(c)return(0,r.createElement)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:o,clampEnabled:n,isExpanded:c}=this.state;return t?!1===n?(0,r.createElement)("div",{className:e},(0,r.createElement)("div",{ref:this.reviewContent},t)):(0,r.createElement)("div",{className:e},(!c||null===n)&&(0,r.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:o}}),(c||null===n)&&(0,r.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},t),this.getButton()):null}}(0,I.A)(Tc,"defaultProps",Ac);const xc=Tc,Rc=(e,t)=>{const o=(0,v.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):e.price,n=(e=>{if(null!=e&&e.meta_data){const t=e.meta_data.find((e=>"pickup_location"===e.key));return t?t.value:""}return""})(e),c=(e=>{if(null!=e&&e.meta_data){const t=e.meta_data.find((e=>"pickup_address"===e.key));return t?t.value:""}return""})(e),s=(e=>{if(null!=e&&e.meta_data){const t=e.meta_data.find((e=>"pickup_details"===e.key));return t?t.value:""}return""})(e);let i=(0,r.createElement)("em",null,(0,M.__)("free","woocommerce"));return parseInt(o,10)>0&&(i=1===t?(0,r.createElement)($t.FormattedMonetaryAmount,{currency:(0,lr.getCurrencyFromPriceResponse)(e),value:o}):(0,m.createInterpolateElement)(/* translators: <price/> is the price of the package, <packageCount/> is the number of packages. These must appear in the translated string. */ /* translators: <price/> is the price of the package, <packageCount/> is the number of packages. These must appear in the translated string. */ (0,M._n)("<price/> x <packageCount/> package","<price/> x <packageCount/> packages",t,"woocommerce"),{price:(0,r.createElement)($t.FormattedMonetaryAmount,{currency:(0,lr.getCurrencyFromPriceResponse)(e),value:o}),packageCount:(0,r.createElement)(r.Fragment,null,t)})),{value:e.rate_id,label:n?(0,Pe.decodeEntities)(n):(0,Pe.decodeEntities)(e.name),secondaryLabel:i,description:c?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.A,{icon:Yt.A,className:"wc-block-editor-components-block-icon"}),(0,Pe.decodeEntities)(c)):void 0,secondaryDescription:s?(0,r.createElement)(xc,{maxLines:2},(0,Pe.decodeEntities)(s)):void 0}},Ic=()=>{const{shippingRates:e,selectShippingRate:t}=st(),o=(0,m.useMemo)((()=>{var t;return((null===(t=e[0])||void 0===t?void 0:t.shipping_rates)||[]).filter(qe)}),[e]),[n,c]=(0,m.useState)((()=>{var e;return(null===(e=o.find((e=>e.selected)))||void 0===e?void 0:e.rate_id)||""})),s=(0,m.useCallback)((e=>{t(e)}),[t]),{extensions:a,receiveCart:i,...l}=Ke(),d={extensions:a,cart:l,components:{ShippingRatesControlPackage:_c,LocalPickupSelect:fc},renderPickupLocation:Rc};(0,m.useEffect)((()=>{!n&&o[0]&&n!==o[0].rate_id&&(c(o[0].rate_id),s(o[0].rate_id))}),[o,n]);const u=$e(e);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Tt.ExperimentalOrderLocalPickupPackages.Slot,{...d}),(0,r.createElement)(Tt.ExperimentalOrderLocalPickupPackages,null,(0,r.createElement)(fc,{title:e[0].name,setSelectedOption:c,onSelectRate:s,selectedOption:n,renderPickupLocation:Rc,pickupLocations:o,packageCount:u})))},Mc={...Ao({defaultTitle:(0,M.__)("Pickup locations","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};o(3425),(0,i.registerBlockType)("woocommerce/checkout-pickup-options-block",{icon:{src:(0,r.createElement)(a.A,{icon:nc.A,className:"wc-block-editor-components-block-icon"})},attributes:Mc,edit:({attributes:e,setAttributes:t})=>{const{prefersCollection:o}=(0,_.useSelect)((e=>({prefersCollection:e(oe.CHECKOUT_STORE_KEY).prefersCollection()}))),{className:c}=e;return o&&H?(0,r.createElement)(qt,{attributes:e,setAttributes:t,className:(0,n.A)("wc-block-checkout__shipping-method",c)},(0,r.createElement)(Ic,null),(0,r.createElement)(Wt,{block:Tt.innerBlockAreas.PICKUP_LOCATION})):null},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(Gt,null))});const Bc=({className:e=""})=>{const{cartTotals:t}=Ke(),o=(0,lr.getCurrencyFromPriceResponse)(t);return(0,r.createElement)($t.TotalsWrapper,{className:e},(0,r.createElement)($t.Subtotal,{currency:o,values:t}))};(0,i.registerBlockType)("woocommerce/checkout-order-summary-subtotal-block",{icon:{src:(0,r.createElement)(a.A,{icon:kr,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,o=(0,l.useBlockProps)();return(0,r.createElement)("div",{...o},(0,r.createElement)(Bc,{className:t}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});const Oc=({className:e=""})=>{const{cartFees:t,cartTotals:o}=Ke(),n=(0,lr.getCurrencyFromPriceResponse)(o);return(0,r.createElement)($t.TotalsWrapper,{className:e},(0,r.createElement)($t.TotalsFees,{currency:n,cartFees:t}))};(0,i.registerBlockType)("woocommerce/checkout-order-summary-fee-block",{icon:{src:(0,r.createElement)(a.A,{icon:kr,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,o=(0,l.useBlockProps)();return(0,r.createElement)("div",{...o},(0,r.createElement)(Oc,{className:t}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});const Dc=()=>{const{extensions:e,receiveCart:t,...o}=Ke(),n={extensions:e,cart:o,context:"woocommerce/checkout"};return(0,r.createElement)(Tt.ExperimentalDiscountsMeta.Slot,{...n})},Lc=({className:e=""})=>{const{cartTotals:t,cartCoupons:o}=Ke(),{removeCoupon:n,isRemovingCoupon:c}=wn("wc/checkout"),s=(0,lr.getCurrencyFromPriceResponse)(t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)($t.TotalsWrapper,{className:e},(0,r.createElement)(vr,{cartCoupons:o,currency:s,isRemovingCoupon:c,removeCoupon:n,values:t})),(0,r.createElement)(Dc,null))};(0,i.registerBlockType)("woocommerce/checkout-order-summary-discount-block",{icon:{src:(0,r.createElement)(a.A,{icon:kr,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,o=(0,l.useBlockProps)();return(0,r.createElement)("div",{...o},(0,r.createElement)(Lc,{className:t}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});const Fc=({className:e=""})=>{const{cartNeedsShipping:t,shippingRates:o,shippingAddress:n}=Ke(),c=(0,_.useSelect)((e=>e(oe.CHECKOUT_STORE_KEY).prefersCollection()));if(!t)return null;const s=(e=>!!Ge(e)&&e.every((e=>e.shipping_rates.every((e=>!e.selected||qe(e))))))(((e,t)=>e.map((e=>({...e,shipping_rates:e.shipping_rates.filter((e=>{const o=We(e.method_id);return t?o:!o}))}))))(o,null!=c&&c)),a=Me(n,["state","country","postcode","city"]);return(0,r.createElement)(Tt.TotalsWrapper,{className:e},(0,r.createElement)(Rr,{label:s?(0,M.__)("Collection","woocommerce"):(0,M.__)("Delivery","woocommerce"),placeholder:(0,r.createElement)("span",{className:"wc-block-components-shipping-placeholder__value"},a?(0,M.__)("No available delivery option","woocommerce"):(0,M.__)("Enter address to calculate","woocommerce"))}))};(0,i.registerBlockType)("woocommerce/checkout-order-summary-shipping-block",{icon:{src:(0,r.createElement)(a.A,{icon:kr,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,o=(0,l.useBlockProps)();return(0,r.createElement)("div",{...o},(0,r.createElement)(eo,null,(0,r.createElement)(Fc,{className:t})))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});var jc=o(8848);const Uc=({className:e=""})=>{const t=(0,v.getSetting)("couponsEnabled",!0),{applyCoupon:o,isApplyingCoupon:n}=wn("wc/checkout");return t?(0,r.createElement)($t.TotalsWrapper,{className:e},(0,r.createElement)(br,{onSubmit:o,isLoading:n,instanceId:"coupon"})):null};(0,i.registerBlockType)("woocommerce/checkout-order-summary-coupon-form-block",{icon:{src:(0,r.createElement)(a.A,{icon:jc.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,o=(0,l.useBlockProps)();return(0,r.createElement)("div",{...o},(0,r.createElement)(eo,null,(0,r.createElement)(Uc,{className:t})))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});const Hc=({className:e,showRateAfterTaxName:t})=>{const{cartTotals:o}=Ke();if((0,v.getSetting)("displayCartPricesIncludingTax",!1)||parseInt(o.total_tax,10)<=0)return null;const n=(0,lr.getCurrencyFromPriceResponse)(o);return(0,r.createElement)($t.TotalsWrapper,{className:e},(0,r.createElement)($t.TotalsTaxes,{showRateAfterTaxName:t,currency:n,values:o}))},Yc={showRateAfterTaxName:{type:"boolean",default:(0,v.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{remove:!0,move:!0}}};(0,i.registerBlockType)("woocommerce/checkout-order-summary-taxes-block",{icon:{src:(0,r.createElement)(a.A,{icon:kr,className:"wc-block-editor-components-block-icon"})},attributes:Yc,edit:({attributes:e,setAttributes:t})=>{const{className:o,showRateAfterTaxName:n}=e,c=(0,l.useBlockProps)(),s=(0,v.getSetting)("taxesEnabled"),a=(0,v.getSetting)("displayItemizedTaxes",!1),i=(0,v.getSetting)("displayCartPricesIncludingTax",!1);return(0,r.createElement)("div",{...c},(0,r.createElement)(l.InspectorControls,null,s&&a&&!i&&(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Taxes","woocommerce")},(0,r.createElement)(jt.ToggleControl,{label:(0,M.__)("Show rate after tax name","woocommerce"),help:(0,M.__)("Show the percentage rate alongside each tax line in the summary.","woocommerce"),checked:n,onChange:()=>t({showRateAfterTaxName:!n})}))),(0,r.createElement)(Hc,{className:o,showRateAfterTaxName:n}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});const Vc=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));o(4567);const Kc=({currency:e,maxPrice:t,minPrice:o,priceClassName:c,priceStyle:s={}})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"screen-reader-text"},(0,M.sprintf)(/* translators: %1$s min price, %2$s max price */ /* translators: %1$s min price, %2$s max price */ (0,M.__)("Price between %1$s and %2$s","woocommerce"),(0,lr.formatPrice)(o),(0,lr.formatPrice)(t))),(0,r.createElement)("span",{"aria-hidden":!0},(0,r.createElement)($t.FormattedMonetaryAmount,{className:(0,n.A)("wc-block-components-product-price__value",c),currency:e,value:o,style:s})," — ",(0,r.createElement)($t.FormattedMonetaryAmount,{className:(0,n.A)("wc-block-components-product-price__value",c),currency:e,value:t,style:s}))),$c=({currency:e,regularPriceClassName:t,regularPriceStyle:o,regularPrice:c,priceClassName:s,priceStyle:a,price:i})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"screen-reader-text"},(0,M.__)("Previous price:","woocommerce")),(0,r.createElement)($t.FormattedMonetaryAmount,{currency:e,renderText:e=>(0,r.createElement)("del",{className:(0,n.A)("wc-block-components-product-price__regular",t),style:o},e),value:c}),(0,r.createElement)("span",{className:"screen-reader-text"},(0,M.__)("Discounted price:","woocommerce")),(0,r.createElement)($t.FormattedMonetaryAmount,{currency:e,renderText:e=>(0,r.createElement)("ins",{className:(0,n.A)("wc-block-components-product-price__value","is-discounted",s),style:a},e),value:i})),zc=({align:e,className:t,currency:o,format:c="<price/>",maxPrice:s,minPrice:a,price:i,priceClassName:l,priceStyle:d,regularPrice:u,regularPriceClassName:p,regularPriceStyle:h,style:g})=>{const _=(0,n.A)(t,"price","wc-block-components-product-price",{[`wc-block-components-product-price--align-${e}`]:e});c.includes("<price/>")||(c="<price/>",console.error("Price formats need to include the `<price/>` tag."));const k=u&&i&&i<u;let E=(0,r.createElement)("span",{className:(0,n.A)("wc-block-components-product-price__value",l)});return k?E=(0,r.createElement)($c,{currency:o,price:i,priceClassName:l,priceStyle:d,regularPrice:u,regularPriceClassName:p,regularPriceStyle:h}):void 0!==a&&void 0!==s?E=(0,r.createElement)(Kc,{currency:o,maxPrice:s,minPrice:a,priceClassName:l,priceStyle:d}):i&&(E=(0,r.createElement)($t.FormattedMonetaryAmount,{className:(0,n.A)("wc-block-components-product-price__value",l),currency:o,value:i,style:d})),(0,r.createElement)("span",{className:_,style:g},(0,m.createInterpolateElement)(c,{price:E}))};o(6625);const qc=({className:e="",disabled:t=!1,name:o,permalink:c="",target:s,rel:a,style:i,onClick:l,disabledTagName:m="span",...d})=>{const u=(0,n.A)("wc-block-components-product-name",e),p=m;if(t){const e=d;return(0,r.createElement)(p,{className:u,...e,dangerouslySetInnerHTML:{__html:o}})}return(0,r.createElement)("a",{className:u,href:c,target:s,...d,dangerouslySetInnerHTML:{__html:o},style:i})};var Wc=o(131);o(9507);const Gc=({children:e,className:t})=>(0,r.createElement)("div",{className:(0,n.A)("wc-block-components-product-badge",t)},e),Zc=()=>(0,r.createElement)(Gc,{className:"wc-block-components-product-backorder-badge"},(0,M.__)("Available on backorder","woocommerce")),Jc=({image:e={},fallbackAlt:t=""})=>{const o=e.thumbnail?{src:e.thumbnail,alt:(0,Pe.decodeEntities)(e.alt)||t||"Product Image"}:{src:v.PLACEHOLDER_IMG_SRC,alt:""};return(0,r.createElement)("img",{...o,alt:o.alt})},Xc=({lowStockRemaining:e})=>e?(0,r.createElement)(Gc,{className:"wc-block-components-product-low-stock-badge"},(0,M.sprintf)(/* translators: %d stock amount (number of items in stock for product) */ /* translators: %d stock amount (number of items in stock for product) */ (0,M.__)("%d left in stock","woocommerce"),e)):null;var Qc=o(1194);o(4982);const es=({details:e=[]})=>{if(!Array.isArray(e))return null;if(0===(e=e.filter((e=>!e.hidden))).length)return null;let t="ul",o="li";return 1===e.length&&(t="div",o="div"),(0,r.createElement)(t,{className:"wc-block-components-product-details"},e.map((e=>{const t=(null==e?void 0:e.key)||e.name||"",n=(null==e?void 0:e.className)||(t?`wc-block-components-product-details__${(0,Qc.c)(t)}`:"");return(0,r.createElement)(o,{key:t+(e.display||e.value),className:n},t&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"wc-block-components-product-details__name"},(0,Pe.decodeEntities)(t),":")," "),(0,r.createElement)("span",{className:"wc-block-components-product-details__value"},(0,Pe.decodeEntities)(e.display||e.value)))})))},ts=window.wp.wordcount,os=["a","b","em","i","strong","p","br","ul","ol","li","h1","h2","h3","h4","h5","h6","pre","blockquote","img"],rs=["target","href","rel","name","download","src","class","alt","style"],ns=({source:e,maxLength:t=15,countType:o="words",className:n="",style:c={}})=>{const s=(0,m.useMemo)((()=>((e,t=15,o="words")=>{const r=(0,Gr.autop)(e);if((0,ts.count)(r,o)<=t)return r;const n=(e=>{const t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)})(r);return(0,ts.count)(n,o)<=t?n:"words"===o?Xr(n,t):Qr(n,t,"characters_including_spaces"===o)})(e,t,o)),[e,t,o]);return(0,r.createElement)(m.RawHTML,{style:c,className:n},$r(s,{tags:os,attr:rs}))},cs=({className:e,shortDescription:t="",fullDescription:o=""})=>{const n=t||o;return n?(0,r.createElement)(ns,{className:e,source:n,maxLength:15,countType:B.wordCountType||"words"}):null};o(401);const ss=({shortDescription:e="",fullDescription:t="",itemData:o=[],variation:n=[]})=>(0,r.createElement)("div",{className:"wc-block-components-product-metadata"},(0,r.createElement)(cs,{className:"wc-block-components-product-metadata__description",shortDescription:e,fullDescription:t}),(0,r.createElement)(es,{details:o}),(0,r.createElement)(es,{details:n.map((({attribute:e="",value:t})=>({key:e,value:t})))})),as=({cartItem:e,disableProductDescriptions:t})=>{const{images:o,low_stock_remaining:c,show_backorder_badge:s,name:a,permalink:i,prices:l,quantity:d,short_description:u,description:p,item_data:h,variation:g,totals:_,extensions:k}=e,{receiveCart:E,...b}=Ke(),w=(0,m.useMemo)((()=>({context:"summary",cartItem:e,cart:b})),[e,b]),y=(0,lr.getCurrencyFromPriceResponse)(l),f=(0,Tt.applyCheckoutFilter)({filterName:"itemName",defaultValue:a,extensions:k,arg:w}),C=(0,Wc.A)({amount:parseInt(l.raw_prices.regular_price,10),precision:(0,we.isString)(l.raw_prices.precision)?parseInt(l.raw_prices.precision,10):l.raw_prices.precision}).convertPrecision(y.minorUnit).getAmount(),S=(0,Wc.A)({amount:parseInt(l.raw_prices.price,10),precision:(0,we.isString)(l.raw_prices.precision)?parseInt(l.raw_prices.precision,10):l.raw_prices.precision}).convertPrecision(y.minorUnit).getAmount(),P=(0,lr.getCurrencyFromPriceResponse)(_);let N=parseInt(_.line_subtotal,10);(0,v.getSetting)("displayCartPricesIncludingTax",!1)&&(N+=parseInt(_.line_subtotal_tax,10));const A=(0,Wc.A)({amount:N,precision:P.minorUnit}).getAmount(),T=(0,Tt.applyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"<price/>",extensions:k,arg:w,validation:Tt.productPriceValidation}),x=(0,Tt.applyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"<price/>",extensions:k,arg:w,validation:Tt.productPriceValidation}),R=(0,Tt.applyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:k,arg:w}),I=t?{itemData:h,variation:g}:{itemData:h,variation:g,shortDescription:u,fullDescription:p};return(0,r.createElement)("div",{className:(0,n.A)("wc-block-components-order-summary-item",R)},(0,r.createElement)("div",{className:"wc-block-components-order-summary-item__image"},(0,r.createElement)("div",{className:"wc-block-components-order-summary-item__quantity"},(0,r.createElement)($t.Label,{label:d.toString(),screenReaderLabel:(0,M.sprintf)(/* translators: %d number of products of the same type in the cart */ /* translators: %d number of products of the same type in the cart */ (0,M._n)("%d item","%d items",d,"woocommerce"),d)})),(0,r.createElement)(Jc,{image:o.length?o[0]:{},fallbackAlt:f})),(0,r.createElement)("div",{className:"wc-block-components-order-summary-item__description"},(0,r.createElement)(qc,{disabled:!0,name:f,permalink:i,disabledTagName:"h3"}),(0,r.createElement)(zc,{currency:y,price:S,regularPrice:C,className:"wc-block-components-order-summary-item__individual-prices",priceClassName:"wc-block-components-order-summary-item__individual-price",regularPriceClassName:"wc-block-components-order-summary-item__regular-individual-price",format:T}),s?(0,r.createElement)(Zc,null):!!c&&(0,r.createElement)(Xc,{lowStockRemaining:c}),(0,r.createElement)(ss,{...I})),(0,r.createElement)("span",{className:"screen-reader-text"},(0,M.sprintf)(/* translators: %1$d is the number of items, %2$s is the item name and %3$s is the total price including the currency symbol. */ /* translators: %1$d is the number of items, %2$s is the item name and %3$s is the total price including the currency symbol. */ (0,M._n)("Total price for %1$d %2$s item: %3$s","Total price for %1$d %2$s items: %3$s",d,"woocommerce"),d,f,(0,lr.formatPrice)(A,P))),(0,r.createElement)("div",{className:"wc-block-components-order-summary-item__total-price","aria-hidden":"true"},(0,r.createElement)(zc,{currency:P,format:x,price:A})))};o(5415);const is=({cartItems:e=[],disableProductDescriptions:t=!1})=>{const{isLarge:o,hasContainerWidth:c}=p();return c?(0,r.createElement)("div",{className:(0,n.A)("wc-block-components-order-summary",{"is-large":o})},(0,r.createElement)("div",{className:"wc-block-components-order-summary__content"},e.map((e=>(0,r.createElement)(as,{disableProductDescriptions:t,key:e.key,cartItem:e}))))):null},ls=({className:e="",disableProductDescriptions:t=!1})=>{const{cartItems:o}=Ke();return(0,r.createElement)($t.TotalsWrapper,{className:e},(0,r.createElement)(is,{cartItems:o,disableProductDescriptions:t}))};(0,i.registerBlockType)("woocommerce/checkout-order-summary-cart-items-block",{icon:{src:(0,r.createElement)(a.A,{icon:Vc,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:t})=>{const{className:o,disableProductDescriptions:n}=e,c=(0,l.useBlockProps)();return(0,r.createElement)("div",{...c},(()=>{const{experimentalBlocksEnabled:e}=(0,v.getSetting)("wcBlocksConfig",{experimentalBlocksEnabled:!1});return e})()&&(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Settings","woocommerce")},(0,r.createElement)(jt.ToggleControl,{label:(0,M.__)("Disable product descriptions","woocommerce"),help:(0,M.__)("Disable display of product descriptions.","woocommerce"),checked:n,onChange:()=>t({disableProductDescriptions:!n})}))),(0,r.createElement)(ls,{disableProductDescriptions:n,className:o}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})}),o(5681),(0,i.registerBlockType)("woocommerce/checkout-order-summary-totals-block",{icon:{src:(0,r.createElement)(a.A,{icon:kr,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e})=>{const t=(0,l.useBlockProps)(),o=Lt(Tt.innerBlockAreas.CHECKOUT_ORDER_SUMMARY_TOTALS),n=[["woocommerce/checkout-order-summary-subtotal-block",{},[]],["woocommerce/checkout-order-summary-fee-block",{},[]],["woocommerce/checkout-order-summary-discount-block",{},[]],["woocommerce/checkout-order-summary-shipping-block",{},[]],["woocommerce/checkout-order-summary-taxes-block",{},[]]];return Ft({clientId:e,registeredBlocks:o,defaultTemplate:n}),(0,r.createElement)("div",{...t},(0,r.createElement)(l.InnerBlocks,{allowedBlocks:o,template:n}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(l.InnerBlocks.Content,null))}),o(6201);var ms=o(8558);const ds=(e,t=!0)=>{t?window.document.body.classList.add(e):window.document.body.classList.remove(e)},us=({attributes:e,setAttributes:t})=>{const{hasDarkControls:o,showFormStepNumbers:n}=e;return(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(jt.PanelBody,{title:(0,M.__)("Style","woocommerce")},(0,r.createElement)(jt.ToggleControl,{label:(0,M.__)("Show form step numbers","woocommerce"),checked:n,onChange:()=>t({showFormStepNumbers:!n})}),(0,r.createElement)(jt.ToggleControl,{label:(0,M.__)("Dark mode inputs","woocommerce"),help:(0,M.__)("Inputs styled specifically for use on dark background colors.","woocommerce"),checked:o,onChange:()=>t({hasDarkControls:!o})})))},ps=window.wp.editor;function hs({block:e}){const t="checkout"===e?D:j,o="checkout"===e?"woocommerce_checkout_page_id":"woocommerce_cart_page_id",{saveEntityRecord:n}=(0,_.useDispatch)(xt.store),{editPost:c,savePost:s}=(0,_.useDispatch)(ps.store),{slug:a,postPublished:i,currentPostId:l}=(0,_.useSelect)((o=>{var r;const{getEntityRecord:n}=o(xt.store),{isCurrentPostPublished:c,getCurrentPostId:s}=o(ps.store);return{slug:(null===(r=n("postType","page",t))||void 0===r?void 0:r.slug)||e,postPublished:c(),currentPostId:s()}}),[]),[d,u]=(0,m.useState)("pristine"),p=(0,m.useCallback)((()=>{u("updating"),Promise.resolve().then((()=>yt()({path:`/wc/v3/settings/advanced/${o}`,method:"GET"}))).catch((e=>{"rest_setting_setting_invalid"===e.code&&u("error")})).then((()=>{if(!i)return c({status:"publish"}),s()})).then((()=>yt()({path:`/wc/v3/settings/advanced/${o}`,method:"POST",data:{value:l.toString()}}))).then((()=>{if(0!==t)return n("postType","page",{id:t,slug:`${a}-2`})})).then((()=>c({slug:a}))).then((()=>s())).then((()=>u("updated")))}),[i,c,s,o,l,t,n,a]);let h;return h="checkout"===e?(0,m.createInterpolateElement)((0,M.__)("If you would like to use this block as your default checkout, <a>update your page settings</a>.","woocommerce"),{a:(0,r.createElement)("a",{href:"#",onClick:p},(0,M.__)("update your page settings","woocommerce"))}):(0,m.createInterpolateElement)((0,M.__)("If you would like to use this block as your default cart, <a>update your page settings</a>.","woocommerce"),{a:(0,r.createElement)("a",{href:"#",onClick:p},(0,M.__)("update your page settings","woocommerce"))}),"string"==typeof pagenow&&"site-editor"===pagenow||l===t||"dismissed"===d?null:(0,r.createElement)(jt.Notice,{className:"wc-default-page-notice",status:"updated"===d?"success":"info",onRemove:()=>u("dismissed"),spokenMessage:"updated"===d?(0,M.__)("Page settings updated","woocommerce"):h},"updated"===d?(0,M.__)("Page settings updated","woocommerce"):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,h)))}o(4688);const gs=[],_s=e=>{const[t,o,r]=(()=>{const e={};(0,v.getSetting)("incompatibleExtensions")&&(0,v.getSetting)("incompatibleExtensions").forEach((t=>{e[t.id]=t.title}));const t=Object.keys(e),o=t.length;return[e,t,o]})(),[n,c,s]=(()=>{const{incompatiblePaymentMethods:e}=(0,_.useSelect)((e=>{const{getIncompatiblePaymentMethods:t}=e(Pn);return{incompatiblePaymentMethods:t()}}),[]),t=Object.keys(e);return[e,t,t.length]})(),a={...t,...n},i=[...o,...c],l=r+s,[d,u]=((e,t)=>{const[o,r]=(0,m.useState)((()=>{const o=window.localStorage.getItem(e);if(o)try{return JSON.parse(o)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t}));return(0,m.useEffect)((()=>{try{window.localStorage.setItem(e,JSON.stringify(o))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}}),[e,o]),[o,r]})("wc-blocks_dismissed_incompatible_extensions_notices",gs),[p,h]=(0,m.useState)(!1),g=d.some((t=>{return Object.keys(t).includes(e)&&(o=t[e],r=i,o.length===r.length&&new Set([...o,...r]).size===o.length);var o,r})),k=0===l||g;return(0,m.useEffect)((()=>{h(!k),k||g||u((t=>t.reduce(((t,o)=>(Object.keys(o).includes(e)||t.push(o),t)),[])))}),[k,g,u,e]),[p,()=>{const t=new Set(d);t.add({[e]:i}),u([...t])},(E=a,Object.fromEntries(Object.entries(E).sort((([,e],[,t])=>e.localeCompare(t))))),l];var E},ks=window.wp.notices;var Es=o(4922),bs=o.n(Es);const ws=!1;bs()("wc-admin:tracks:stats");const vs=bs()("wc-admin:tracks");function ys(e,t){return vs("recordevent %s %o","wcadmin_"+e,t,{_tqk:window._tkq,shouldRecord:!(ws||!window._tkq||!window.wcTracks||!window.wcTracks.isEnabled)}),!(!window.wcTracks||"function"!=typeof window.wcTracks.recordEvent)&&(ws?(window.wcTracks.validateEvent(e,t),!1):void window.wcTracks.recordEvent(e,t))}const fs=({blocks:e,findCondition:t})=>{for(const o of e){if(t(o))return o;if(o.innerBlocks){const e=fs({blocks:o.innerBlocks,findCondition:t});if(e)return e}}},Cs=({blockType:e="woocommerce/cart"})=>"woocommerce/cart"===e?(0,r.createElement)("p",null,(0,M.__)("If you continue, the cart block will be replaced with the classic experience powered by shortcodes. This means that you may lose customizations that you made to the cart block.","woocommerce")):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,(0,M.__)("If you continue, the checkout block will be replaced with the classic experience powered by shortcodes. This means that you may lose:","woocommerce")),(0,r.createElement)("ul",{className:"cross-list"},(0,r.createElement)("li",null,(0,M.__)("Customizations and updates to the block","woocommerce")),(0,r.createElement)("li",null,(0,M.__)("Additional local pickup options created for the new checkout","woocommerce"))));function Ss({block:e,clientId:t,type:o}){const{createInfoNotice:n}=(0,_.useDispatch)(ks.store),{replaceBlock:c,selectBlock:s}=(0,_.useDispatch)(l.store),[a,d]=(0,m.useState)(!1),u=()=>d(!1),{undo:p}=(0,_.useDispatch)(xt.store),[,,h,g]=_s(e),k="woocommerce/cart"===e,E=k?(0,M.__)("Switch to classic cart","woocommerce"):(0,M.__)("Switch to classic checkout","woocommerce"),b=k?(0,M.__)("Switched to classic cart.","woocommerce"):(0,M.__)("Switched to classic checkout.","woocommerce"),w=k?"cart":"checkout",v={shortcode:w,notice:"incompatible"===o?"incompatible_notice":"generic_notice",incompatible_extensions_count:g,incompatible_extensions_names:JSON.stringify(h)},{getBlocks:y}=(0,_.useSelect)((e=>({getBlocks:e(l.store).getBlocks})),[]),f=()=>{p(),ys("switch_to_classic_shortcode_undo",v)};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(jt.Button,{variant:"secondary",onClick:()=>{ys("switch_to_classic_shortcode_click",v),d(!0)}},E),a&&(0,r.createElement)(jt.Modal,{size:"medium",title:E,onRequestClose:u,className:"wc-blocks-switch-to-classic-shortcode-modal-content"},(0,r.createElement)(Cs,{blockType:e}),(0,r.createElement)(jt.TabbableContainer,{className:"wc-blocks-switch-to-classic-shortcode-modal-actions"},(0,r.createElement)(jt.Button,{variant:"primary",isDestructive:!0,onClick:()=>{c(t,(0,i.createBlock)("woocommerce/classic-shortcode",{shortcode:w})),ys("switch_to_classic_shortcode_confirm",v),(()=>{const e=fs({blocks:y(),findCondition:e=>"woocommerce/classic-shortcode"===e.name});e&&s(e.clientId)})(),n(b,{actions:[{label:(0,M.__)("Undo","woocommerce"),onClick:f}],type:"snackbar"}),u()}},(0,M.__)("Switch","woocommerce"))," ",(0,r.createElement)(jt.Button,{variant:"secondary",onClick:()=>{ys("switch_to_classic_shortcode_cancel",v),u()}},(0,M.__)("Cancel","woocommerce")))))}function Ps({block:e,clientId:t}){const[o,n,c,s]=_s(e);if(!o)return null;const i=(0,r.createElement)(r.Fragment,null,s>1?(0,m.createInterpolateElement)((0,M.__)("Some active extensions do not yet support this block. This may impact the shopper experience. <a>Learn more</a>","woocommerce"),{a:(0,r.createElement)(jt.ExternalLink,{href:"https://woocommerce.com/document/woocommerce-store-editing/customizing-cart-and-checkout/#incompatible-extensions/"})}):(0,m.createInterpolateElement)((0,M.sprintf)( // translators: %s is the name of the extension. // translators: %s is the name of the extension. (0,M.__)("<strong>%s</strong> does not yet support this block. This may impact the shopper experience. <a>Learn more</a>","woocommerce"),Object.values(c)[0]),{strong:(0,r.createElement)("strong",null),a:(0,r.createElement)(jt.ExternalLink,{href:"https://woocommerce.com/document/woocommerce-store-editing/customizing-cart-and-checkout/#incompatible-extensions/"})})),l=Object.entries(c),d=l.length-2;return(0,r.createElement)(jt.Notice,{className:"wc-blocks-incompatible-extensions-notice",status:"warning",onRemove:n,spokenMessage:i},(0,r.createElement)("div",{className:"wc-blocks-incompatible-extensions-notice__content"},(0,r.createElement)(a.A,{className:"wc-blocks-incompatible-extensions-notice__warning-icon",icon:(0,r.createElement)(qr,null)}),(0,r.createElement)("div",null,(0,r.createElement)("p",null,i),s>1&&(0,r.createElement)("ul",null,l.slice(0,2).map((([e,t])=>(0,r.createElement)("li",{key:e,className:"wc-blocks-incompatible-extensions-notice__element"},t)))),l.length>2&&(0,r.createElement)("details",null,(0,r.createElement)("summary",null,(0,r.createElement)("span",null,(0,M.sprintf)( // translators: %s is the number of incompatible extensions. // translators: %s is the number of incompatible extensions. (0,M._n)("%s more incompatibility","%s more incompatibilities",d,"woocommerce"),d)),(0,r.createElement)(a.A,{icon:to.A})),(0,r.createElement)("ul",null,l.slice(2).map((([e,t])=>(0,r.createElement)("li",{key:e,className:"wc-blocks-incompatible-extensions-notice__element"},t))))),(0,r.createElement)(Ss,{block:e,clientId:t,type:"incompatible"}))))}o(7840),o(1212);var Ns=o(361);o(1598);const As=({text:e,title:t=(0,M.__)("Feedback?","woocommerce"),url:o})=>{const[n,c]=(0,m.useState)(!1);return(0,m.useEffect)((()=>{c(!0)}),[]),(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)("div",{className:"wc-block-feedback-prompt"},(0,r.createElement)(a.A,{icon:Ns.A}),(0,r.createElement)("h2",{className:"wc-block-feedback-prompt__title"},t),(0,r.createElement)("p",{className:"wc-block-feedback-prompt__text"},e),(0,r.createElement)("a",{href:o,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},(0,M.__)("Give us your feedback.","woocommerce"),(0,r.createElement)(a.A,{icon:Ur.A,size:16}))))},Ts=()=>(0,r.createElement)(As,{text:(0,M.__)("We are currently working on improving our cart and checkout blocks to provide merchants with the tools and customization options they need.","woocommerce"),url:"https://github.com/woocommerce/woocommerce/discussions/new?category=checkout-flow&labels=type%3A+product%20feedback"}),xs=(0,d.createHigherOrderComponent)((e=>t=>{const{clientId:o,name:n,isSelected:c}=t,{isCart:s,isCheckout:a,parentId:i}=(0,_.useSelect)((e=>{const{getBlockParentsByBlockName:t,getBlockName:r}=e(l.store),n=t(o,["woocommerce/cart","woocommerce/checkout"]).reduce(((e,t)=>(e[r(t)]=t,e)),{}),c=r(o),s=Object.keys(n).includes("woocommerce/cart"),a=Object.keys(n).includes("woocommerce/checkout"),i="woocommerce/cart"===c||s,m=i?"woocommerce/cart":"woocommerce/checkout";return{isCart:i,isCheckout:"woocommerce/checkout"===c||a,parentId:c===m?o:n[m]}}));return n.startsWith("woocommerce/")&&c&&(s||a)?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(Ps,{block:s?"woocommerce/cart":"woocommerce/checkout",clientId:i}),(0,r.createElement)(hs,{block:a?"checkout":"cart"}),(0,r.createElement)(Ts,null)),(0,r.createElement)(e,{key:"edit",...t})):(0,r.createElement)(e,{key:"edit",...t})}),"withSidebarNotices");(0,nt.hasFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice")||(0,nt.addFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice",xs,11),(0,nt.hasFilter)("blocks.registerBlockType","core/lock/addAttribute")||(0,_.subscribe)((()=>{var e,t,o,r;const n=(0,_.select)(l.store);if(!n)return;const c=n.getSelectedBlock();c&&(ds("wc-lock-selected-block--remove",!(null==c||null===(e=c.attributes)||void 0===e||null===(t=e.lock)||void 0===t||!t.remove)),ds("wc-lock-selected-block--move",!(null==c||null===(o=c.attributes)||void 0===o||null===(r=o.lock)||void 0===r||!r.move)))}));const Rs=["woocommerce/checkout-fields-block","woocommerce/checkout-totals-block"],Is={hasDarkControls:{type:"boolean",default:(0,v.getSetting)("hasDarkEditorStyleSupport",!1)},showRateAfterTaxName:{type:"boolean",default:(0,v.getSetting)("displayCartPricesIncludingTax",!1)}},Ms={showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0},showCompanyField:{type:"boolean",default:!1},requireCompanyField:{type:"boolean",default:!1},showApartmentField:{type:"boolean",default:!0},requireApartmentField:{type:"boolean",default:!1},showPhoneField:{type:"boolean",default:!0},requirePhoneField:{type:"boolean",default:!1}},Bs=JSON.parse('{"name":"woocommerce/checkout","version":"1.0.0","title":"Checkout","description":"Display a checkout form so your customers can submit orders.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"align":["wide"],"html":false,"multiple":false},"example":{"attributes":{"isPreview":true},"viewportWidth":800},"attributes":{"isPreview":{"type":"boolean","default":false,"save":false},"align":{"type":"string","default":"wide"},"showFormStepNumbers":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),Os={icon:{src:(0,r.createElement)(a.A,{icon:s,className:"wc-block-editor-components-block-icon"})},attributes:{...Bs.attributes,...Is,...Ms},edit:({clientId:e,attributes:t,setAttributes:o})=>{const{showOrderNotes:c,showPolicyLinks:s,showReturnToCart:a,showRateAfterTaxName:d,cartPageId:u,isPreview:p=!1,showFormStepNumbers:h=!1,hasDarkControls:k=!1}=t,E=(0,_.useSelect)((e=>{const t=e(xt.store).getEditedEntityRecord("root","site");return{...v.defaultFields,...Object.fromEntries(Object.entries({phone:"optional",company:"hidden",address_2:"optional"}).map((([e,o])=>{const r=t[`woocommerce_checkout_${e}_field`]||o;return[e,{...v.defaultFields[e],required:"required"===r,hidden:"hidden"===r}]})))}})),w=(0,m.useRef)((0,xe.getQueryArg)(window.location.href,"focus"));(0,m.useEffect)((()=>{"checkout"!==w.current||(0,_.select)("core/block-editor").hasSelectedBlock()||((0,_.dispatch)("core/block-editor").selectBlock(e),(0,_.dispatch)("core/interface").enableComplementaryArea("core/edit-site","edit-site/block-inspector"))}),[e]);const y=((e={})=>{const t=(0,m.useRef)(),o=(0,l.useBlockProps)({ref:t,...e});return(({ref:e})=>{const t=(0,nt.hasFilter)("blocks.registerBlockType","core/lock/addAttribute"),o=e.current;(0,m.useEffect)((()=>{if(o&&!t)return o.addEventListener("keydown",e,{capture:!0,passive:!1}),()=>{o.removeEventListener("keydown",e,{capture:!0})};function e(e){const{keyCode:t,target:o}=e;if(!(o instanceof HTMLElement))return;if(t!==ms.BACKSPACE&&t!==ms.DELETE)return;if((0,Jt.isTextField)(o))return;const r=o;if(void 0===r.dataset.block)return;const n=(e=>{var t,o,r,n,c;if(!e)return!1;const{getBlock:s}=(0,_.select)(l.store),a=s(e);if("boolean"==typeof(null==a||null===(t=a.attributes)||void 0===t||null===(o=t.lock)||void 0===o?void 0:o.remove))return a.attributes.lock.remove;const m=(0,i.getBlockType)(a.name);var d,u,p;return"boolean"==typeof(null==m||null===(r=m.attributes)||void 0===r||null===(n=r.lock)||void 0===n||null===(c=n.default)||void 0===c?void 0:c.remove)&&(null==m||null===(d=m.attributes)||void 0===d||null===(u=d.lock)||void 0===u||null===(p=u.default)||void 0===p?void 0:p.remove)})(r.dataset.block);n&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}}),[o,t])})({ref:t}),o})();return(0,r.createElement)("div",{...y},(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(us,{attributes:t,setAttributes:o})),(0,r.createElement)(b,{isPreview:!!p,previewData:{previewCart:rt,previewSavedPaymentMethods:At,defaultFields:E}},(0,r.createElement)(Tt.SlotFillProvider,null,(0,r.createElement)(Nt,null,(0,r.createElement)(g,{className:(0,n.A)("wc-block-checkout",{"has-dark-controls":k})},(0,r.createElement)(Bt.Provider,{value:{showOrderNotes:c,showPolicyLinks:s,showReturnToCart:a,cartPageId:u,showRateAfterTaxName:d,showFormStepNumbers:h,defaultFields:E}},(0,r.createElement)(l.InnerBlocks,{allowedBlocks:Rs,template:[["woocommerce/checkout-totals-block",{},[]],["woocommerce/checkout-fields-block",{},[]]],templateLock:"insert"})))))))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save({className:"wc-block-checkout is-loading"})},(0,r.createElement)(l.InnerBlocks.Content,null)),transforms:{to:[{type:"block",blocks:["woocommerce/classic-shortcode"],transform:e=>(0,i.createBlock)("woocommerce/classic-shortcode",{shortcode:"checkout",align:e.align},[])}]},deprecated:[{attributes:{...Bs.attributes,...Is,...Ms},save:({attributes:e})=>(0,r.createElement)("div",{className:(0,n.A)("is-loading",e.className)}),migrate:e=>{const{showOrderNotes:t,showPolicyLinks:o,showReturnToCart:r,cartPageId:n}=e;return[e,[(0,i.createBlock)("woocommerce/checkout-fields-block",{},[(0,i.createBlock)("woocommerce/checkout-express-payment-block",{},[]),(0,i.createBlock)("woocommerce/checkout-contact-information-block",{},[]),(0,i.createBlock)("woocommerce/checkout-shipping-address-block",{},[]),(0,i.createBlock)("woocommerce/checkout-billing-address-block",{},[]),(0,i.createBlock)("woocommerce/checkout-shipping-methods-block",{},[]),(0,i.createBlock)("woocommerce/checkout-payment-block",{},[]),(0,i.createBlock)("woocommerce/checkout-additional-information-block",{},[]),!!t&&(0,i.createBlock)("woocommerce/checkout-order-note-block",{},[]),!!o&&(0,i.createBlock)("woocommerce/checkout-terms-block",{},[]),(0,i.createBlock)("woocommerce/checkout-actions-block",{showReturnToCart:r,cartPageId:n},[])].filter(Boolean)),(0,i.createBlock)("woocommerce/checkout-totals-block",{})]]},isEligible:(e,t)=>!t.some((e=>"woocommerce/checkout-fields-block"===e.name))},{save:({attributes:e})=>(0,r.createElement)("div",{className:(0,n.A)("is-loading",e.className)}),isEligible:(e,t)=>{const o=t.find((e=>"woocommerce/checkout-fields-block"===e.name));return!!o&&!o.innerBlocks.some((e=>"woocommerce/checkout-additional-information-block"===e.name))},migrate:(e,t)=>{const o=t.findIndex((e=>"woocommerce/checkout-fields-block"===e.name));if(-1===o)return!1;const r=t[o],n=r.innerBlocks.findIndex((e=>"wp-block-woocommerce-checkout-payment-block"===e.name));return-1!==n&&(t[o]=r.innerBlocks.slice(0,n).concat((0,i.createBlock)("woocommerce/checkout-additional-information-block",{},[])).concat(t.slice(n+1,t.length)),[e,t])}}]};(0,i.registerBlockType)(Bs,Os)},9407:()=>{},2080:()=>{},5684:()=>{},5415:()=>{},3091:()=>{},4957:()=>{},777:()=>{},9507:()=>{},4982:()=>{},401:()=>{},718:()=>{},7051:()=>{},2867:()=>{},3048:()=>{},265:()=>{},7919:()=>{},780:()=>{},2931:()=>{},8375:()=>{},9345:()=>{},6625:()=>{},4567:()=>{},5452:()=>{},1221:()=>{},8824:()=>{},9569:()=>{},1637:()=>{},181:()=>{},1094:()=>{},7259:()=>{},6664:()=>{},149:()=>{},5089:()=>{},9865:()=>{},6619:()=>{},377:()=>{},7797:()=>{},1407:()=>{},5681:()=>{},3425:()=>{},7694:()=>{},2255:()=>{},1299:()=>{},8845:()=>{},5609:()=>{},7765:()=>{},6201:()=>{},4688:()=>{},9705:()=>{},1598:()=>{},1212:()=>{},7840:()=>{},7791:()=>{},1609:e=>{"use strict";e.exports=window.React},195:e=>{"use strict";e.exports=window.wp.a11y},9491:e=>{"use strict";e.exports=window.wp.compose},4040:e=>{"use strict";e.exports=window.wp.deprecated},8107:e=>{"use strict";e.exports=window.wp.dom},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},923:e=>{"use strict";e.exports=window.wp.isShallowEqual},8558:e=>{"use strict";e.exports=window.wp.keycodes},5573:e=>{"use strict";e.exports=window.wp.primitives}},n={};function c(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e].call(o.exports,o,o.exports,c),o.exports}c.m=r,e=[],c.O=(t,o,r,n)=>{if(!o){var s=1/0;for(m=0;m<e.length;m++){for(var[o,r,n]=e[m],a=!0,i=0;i<o.length;i++)(!1&n||s>=n)&&Object.keys(c.O).every((e=>c.O[e](o[i])))?o.splice(i--,1):(a=!1,n<s&&(s=n));if(a){e.splice(m--,1);var l=r();void 0!==l&&(t=l)}}return t}n=n||0;for(var m=e.length;m>0&&e[m-1][2]>n;m--)e[m]=e[m-1];e[m]=[o,r,n]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var n=Object.create(null);c.r(n);var s={};t=t||[null,o({}),o([]),o(o)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=o(a))Object.getOwnPropertyNames(a).forEach((t=>s[t]=()=>e[t]));return s.default=()=>e,c.d(n,s),n},c.d=(e,t)=>{for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.j=251,(()=>{var e={251:0};c.O.j=t=>0===e[t];var t=(t,o)=>{var r,n,[s,a,i]=o,l=0;if(s.some((t=>0!==e[t]))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(i)var m=i(c)}for(t&&t(o);l<s.length;l++)n=s[l],c.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return c.O(m)},o=self.webpackChunkwebpackWcBlocksMainJsonp=self.webpackChunkwebpackWcBlocksMainJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var s=c.O(void 0,[94],(()=>c(6304)));s=c.O(s),((this.wc=this.wc||{}).blocks=this.wc.blocks||{}).checkout=s})();
Submit
FILE
FOLDER
Name
Size
Permission
Action
active-filters
---
0755
add-to-cart-form
---
0755
add-to-cart-with-options
---
0755
add-to-cart-with-options-quantity-selector
---
0755
add-to-cart-with-options-variation-selector
---
0755
all-products
---
0755
attribute-filter
---
0755
breadcrumbs
---
0755
cart-blocks
---
0755
cart-link
---
0755
catalog-sorting
---
0755
checkout
---
0755
checkout-blocks
---
0755
classic-shortcode
---
0755
coming-soon
---
0755
customer-account
---
0755
featured-category
---
0755
featured-product
---
0755
filter-wrapper
---
0755
handpicked-products
---
0755
inner-blocks
---
0755
mini-cart
---
0755
mini-cart-contents-block
---
0755
order-confirmation-additional-fields
---
0755
order-confirmation-additional-fields-wrapper
---
0755
order-confirmation-additional-information
---
0755
order-confirmation-billing-address
---
0755
order-confirmation-billing-wrapper
---
0755
order-confirmation-create-account
---
0755
order-confirmation-downloads
---
0755
order-confirmation-downloads-wrapper
---
0755
order-confirmation-shipping-address
---
0755
order-confirmation-shipping-wrapper
---
0755
order-confirmation-status
---
0755
order-confirmation-summary
---
0755
order-confirmation-totals
---
0755
order-confirmation-totals-wrapper
---
0755
page-content-wrapper
---
0755
price-filter
---
0755
product-average-rating
---
0755
product-best-sellers
---
0755
product-button
---
0755
product-categories
---
0755
product-category
---
0755
product-collection
---
0755
product-collection-no-results
---
0755
product-details
---
0755
product-filter-active
---
0755
product-filter-attribute
---
0755
product-filter-checkbox-list
---
0755
product-filter-chips
---
0755
product-filter-clear-button
---
0755
product-filter-price
---
0755
product-filter-price-slider
---
0755
product-filter-rating
---
0755
product-filter-removable-chips
---
0755
product-filter-status
---
0755
product-filters
---
0755
product-gallery
---
0755
product-gallery-large-image
---
0755
product-gallery-large-image-next-previous
---
0755
product-gallery-pager
---
0755
product-gallery-thumbnails
---
0755
product-image
---
0755
product-image-gallery
---
0755
product-meta
---
0755
product-new
---
0755
product-price
---
0755
product-rating
---
0755
product-rating-counter
---
0755
product-rating-stars
---
0755
product-results-count
---
0755
product-reviews
---
0755
product-sale-badge
---
0755
product-summary
---
0755
product-tag
---
0755
product-template
---
0755
product-top-rated
---
0755
products-by-attribute
---
0755
rating-filter
---
0755
related-products
---
0755
single-product
---
0755
stock-filter
---
0755
store-notices
---
0755
2727-style.js.LICENSE.txt
188 bytes
0644
3671-style.js.LICENSE.txt
121 bytes
0644
active-filters-frontend.asset.php
336 bytes
0644
active-filters-frontend.js
18768 bytes
0644
active-filters-rtl.css
10302 bytes
0644
active-filters-style.asset.php
369 bytes
0644
active-filters-wrapper-frontend.js
15044 bytes
0644
active-filters-wrapper-rtl.css
9558 bytes
0644
active-filters-wrapper.css
9558 bytes
0644
active-filters.asset.php
369 bytes
0644
active-filters.css
10300 bytes
0644
active-filters.js
17385 bytes
0644
add-to-cart-form-frontend.asset.php
147 bytes
0644
add-to-cart-form-frontend.js
1067 bytes
0644
add-to-cart-form-rtl.css
7888 bytes
0644
add-to-cart-form-style.asset.php
310 bytes
0644
add-to-cart-form.asset.php
290 bytes
0644
add-to-cart-form.css
7884 bytes
0644
add-to-cart-form.js
20581 bytes
0644
add-to-cart-with-options-frontend.asset.php
147 bytes
0644
add-to-cart-with-options-frontend.js
370 bytes
0644
add-to-cart-with-options-quantity-selector-frontend.asset.php
147 bytes
0644
add-to-cart-with-options-quantity-selector-frontend.js
1101 bytes
0644
add-to-cart-with-options-quantity-selector-rtl.css
4237 bytes
0644
add-to-cart-with-options-quantity-selector-style.asset.php
310 bytes
0644
add-to-cart-with-options-quantity-selector.asset.php
290 bytes
0644
add-to-cart-with-options-quantity-selector.css
4233 bytes
0644
add-to-cart-with-options-quantity-selector.js
17771 bytes
0644
add-to-cart-with-options-rtl.css
212 bytes
0644
add-to-cart-with-options-style.asset.php
310 bytes
0644
add-to-cart-with-options-variation-selector-frontend.asset.php
147 bytes
0644
add-to-cart-with-options-variation-selector-frontend.js
389 bytes
0644
add-to-cart-with-options-variation-selector-rtl.css
519 bytes
0644
add-to-cart-with-options-variation-selector-style.asset.php
310 bytes
0644
add-to-cart-with-options-variation-selector.asset.php
290 bytes
0644
add-to-cart-with-options-variation-selector.css
515 bytes
0644
add-to-cart-with-options-variation-selector.js
16539 bytes
0644
add-to-cart-with-options.asset.php
290 bytes
0644
add-to-cart-with-options.css
210 bytes
0644
add-to-cart-with-options.js
14354 bytes
0644
all-products-frontend.asset.php
531 bytes
0644
all-products-frontend.js
31017 bytes
0644
all-products-rtl.css
32674 bytes
0644
all-products-style.asset.php
548 bytes
0644
all-products-style.js.LICENSE.txt
188 bytes
0644
all-products.asset.php
548 bytes
0644
all-products.css
32632 bytes
0644
all-products.js
140646 bytes
0644
all-reviews-rtl.css
10828 bytes
0644
all-reviews-style.asset.php
313 bytes
0644
all-reviews-style.js.LICENSE.txt
188 bytes
0644
all-reviews.asset.php
313 bytes
0644
all-reviews.css
10817 bytes
0644
all-reviews.js
27115 bytes
0644
attribute-filter-frontend.asset.php
408 bytes
0644
attribute-filter-frontend.js
22743 bytes
0644
attribute-filter-rtl.css
31009 bytes
0644
attribute-filter-style.asset.php
427 bytes
0644
attribute-filter-style.js.LICENSE.txt
121 bytes
0644
attribute-filter-wrapper-frontend.js
19208 bytes
0644
attribute-filter-wrapper-rtl.css
9320 bytes
0644
attribute-filter-wrapper.css
9314 bytes
0644
attribute-filter.asset.php
427 bytes
0644
attribute-filter.css
30987 bytes
0644
attribute-filter.js
34970 bytes
0644
base-components-stock-filter-wrapper~attribute-filter-wrapper~rating-filter-wrapper-style.scss-rtl.css
20945 bytes
0644
base-components-stock-filter-wrapper~attribute-filter-wrapper~rating-filter-wrapper-style.scss.css
20931 bytes
0644
blocks-checkout.asset.php
421 bytes
0644
blocks-checkout.js
2552 bytes
0644
blocks-components.asset.php
338 bytes
0644
blocks-components.js
2371 bytes
0644
blocks-json.php
136727 bytes
0644
breadcrumbs-rtl.css
366 bytes
0644
breadcrumbs-style.asset.php
197 bytes
0644
breadcrumbs.asset.php
197 bytes
0644
breadcrumbs.css
364 bytes
0644
breadcrumbs.js
3941 bytes
0644
cart-frontend.asset.php
602 bytes
0644
cart-frontend.js
22782 bytes
0644
cart-link-rtl.css
1444 bytes
0644
cart-link-style.asset.php
197 bytes
0644
cart-link.asset.php
197 bytes
0644
cart-link.css
1438 bytes
0644
cart-link.js
9025 bytes
0644
cart-rtl.css
82481 bytes
0644
cart-style.asset.php
651 bytes
0644
cart-style.js.LICENSE.txt
438 bytes
0644
cart.asset.php
651 bytes
0644
cart.css
82403 bytes
0644
cart.js
165793 bytes
0644
catalog-sorting-rtl.css
568 bytes
0644
catalog-sorting-style.asset.php
197 bytes
0644
catalog-sorting.asset.php
197 bytes
0644
catalog-sorting.css
567 bytes
0644
catalog-sorting.js
4806 bytes
0644
checkout-frontend.asset.php
564 bytes
0644
checkout-frontend.js
31832 bytes
0644
checkout-rtl.css
95718 bytes
0644
checkout-style.asset.php
604 bytes
0644
checkout-style.js.LICENSE.txt
438 bytes
0644
checkout.asset.php
579 bytes
0644
checkout.css
95605 bytes
0644
checkout.js
199260 bytes
0644
classic-shortcode-rtl.css
325 bytes
0644
classic-shortcode-style.asset.php
222 bytes
0644
classic-shortcode.asset.php
222 bytes
0644
classic-shortcode.css
323 bytes
0644
classic-shortcode.js
14585 bytes
0644
coming-soon-rtl.css
7898 bytes
0644
coming-soon-style.asset.php
219 bytes
0644
coming-soon.asset.php
219 bytes
0644
coming-soon.css
7892 bytes
0644
coming-soon.js
7182 bytes
0644
customer-account-rtl.css
917 bytes
0644
customer-account-style.asset.php
212 bytes
0644
customer-account.asset.php
212 bytes
0644
customer-account.css
915 bytes
0644
customer-account.js
9307 bytes
0644
featured-category-rtl.css
5137 bytes
0644
featured-category-style.asset.php
355 bytes
0644
featured-category.asset.php
355 bytes
0644
featured-category.css
5135 bytes
0644
featured-category.js
45716 bytes
0644
featured-product-rtl.css
5553 bytes
0644
featured-product-style.asset.php
355 bytes
0644
featured-product.asset.php
355 bytes
0644
featured-product.css
5551 bytes
0644
featured-product.js
46167 bytes
0644
filter-wrapper-frontend.asset.php
490 bytes
0644
filter-wrapper-frontend.js
13883 bytes
0644
filter-wrapper-rtl.css
744 bytes
0644
filter-wrapper-style.asset.php
492 bytes
0644
filter-wrapper.asset.php
180 bytes
0644
filter-wrapper.css
742 bytes
0644
filter-wrapper.js
6931 bytes
0644
handpicked-products-style.asset.php
315 bytes
0644
handpicked-products.asset.php
315 bytes
0644
handpicked-products.js
26737 bytes
0644
legacy-template-rtl.css
323 bytes
0644
legacy-template-style.asset.php
253 bytes
0644
legacy-template.asset.php
253 bytes
0644
legacy-template.css
321 bytes
0644
legacy-template.js
27302 bytes
0644
mini-cart-component-frontend.asset.php
519 bytes
0644
mini-cart-component-frontend.js
20518 bytes
0644
mini-cart-contents-rtl.css
22537 bytes
0644
mini-cart-contents-style.asset.php
525 bytes
0644
mini-cart-contents-style.js.LICENSE.txt
438 bytes
0644
mini-cart-contents.asset.php
492 bytes
0644
mini-cart-contents.css
22518 bytes
0644
mini-cart-contents.js
62108 bytes
0644
mini-cart-frontend.asset.php
242 bytes
0644
mini-cart-frontend.js
5814 bytes
0644
mini-cart-rtl.css
13165 bytes
0644
mini-cart-style.asset.php
353 bytes
0644
mini-cart-style.js.LICENSE.txt
249 bytes
0644
mini-cart.asset.php
276 bytes
0644
mini-cart.css
13154 bytes
0644
mini-cart.js
19546 bytes
0644
order-confirmation-additional-fields-rtl.css
2436 bytes
0644
order-confirmation-additional-fields-style.asset.php
195 bytes
0644
order-confirmation-additional-fields-wrapper-rtl.css
291 bytes
0644
order-confirmation-additional-fields-wrapper-style.asset.php
195 bytes
0644
order-confirmation-additional-fields-wrapper.asset.php
195 bytes
0644
order-confirmation-additional-fields-wrapper.css
289 bytes
0644
order-confirmation-additional-fields-wrapper.js
5498 bytes
0644
order-confirmation-additional-fields.asset.php
195 bytes
0644
order-confirmation-additional-fields.css
2432 bytes
0644
order-confirmation-additional-fields.js
5698 bytes
0644
order-confirmation-additional-information-rtl.css
383 bytes
0644
order-confirmation-additional-information-style.asset.php
180 bytes
0644
order-confirmation-additional-information.asset.php
180 bytes
0644
order-confirmation-additional-information.css
381 bytes
0644
order-confirmation-additional-information.js
3512 bytes
0644
order-confirmation-billing-address-rtl.css
2039 bytes
0644
order-confirmation-billing-address-style.asset.php
195 bytes
0644
order-confirmation-billing-address.asset.php
195 bytes
0644
order-confirmation-billing-address.css
2035 bytes
0644
order-confirmation-billing-address.js
6232 bytes
0644
order-confirmation-billing-wrapper-style.asset.php
180 bytes
0644
order-confirmation-billing-wrapper.asset.php
180 bytes
0644
order-confirmation-billing-wrapper.js
3352 bytes
0644
order-confirmation-create-account-frontend.asset.php
266 bytes
0644
order-confirmation-create-account-frontend.js
13342 bytes
0644
order-confirmation-create-account-rtl.css
10266 bytes
0644
order-confirmation-create-account-style.asset.php
302 bytes
0644
order-confirmation-create-account-style.js.LICENSE.txt
249 bytes
0644
order-confirmation-create-account.asset.php
302 bytes
0644
order-confirmation-create-account.css
10254 bytes
0644
order-confirmation-create-account.js
13714 bytes
0644
order-confirmation-downloads-rtl.css
1772 bytes
0644
order-confirmation-downloads-style.asset.php
197 bytes
0644
order-confirmation-downloads-wrapper-style.asset.php
195 bytes
0644
order-confirmation-downloads-wrapper.asset.php
195 bytes
0644
order-confirmation-downloads-wrapper.js
3556 bytes
0644
order-confirmation-downloads.asset.php
197 bytes
0644
order-confirmation-downloads.css
1770 bytes
0644
order-confirmation-downloads.js
5551 bytes
0644
order-confirmation-shipping-address-rtl.css
2609 bytes
0644
order-confirmation-shipping-address-style.asset.php
195 bytes
0644
order-confirmation-shipping-address.asset.php
195 bytes
0644
order-confirmation-shipping-address.css
2605 bytes
0644
order-confirmation-shipping-address.js
6235 bytes
0644
order-confirmation-shipping-wrapper-style.asset.php
180 bytes
0644
order-confirmation-shipping-wrapper.asset.php
180 bytes
0644
order-confirmation-shipping-wrapper.js
3379 bytes
0644
order-confirmation-status-rtl.css
1035 bytes
0644
order-confirmation-status-style.asset.php
180 bytes
0644
order-confirmation-status.asset.php
180 bytes
0644
order-confirmation-status.css
1034 bytes
0644
order-confirmation-status.js
3733 bytes
0644
order-confirmation-summary-rtl.css
1124 bytes
0644
order-confirmation-summary-style.asset.php
242 bytes
0644
order-confirmation-summary.asset.php
242 bytes
0644
order-confirmation-summary.css
1122 bytes
0644
order-confirmation-summary.js
5589 bytes
0644
order-confirmation-totals-rtl.css
2207 bytes
0644
order-confirmation-totals-style.asset.php
216 bytes
0644
order-confirmation-totals-wrapper-style.asset.php
180 bytes
0644
order-confirmation-totals-wrapper.asset.php
180 bytes
0644
order-confirmation-totals-wrapper.js
4061 bytes
0644
order-confirmation-totals.asset.php
216 bytes
0644
order-confirmation-totals.css
2204 bytes
0644
order-confirmation-totals.js
6420 bytes
0644
packages-style-rtl.css
49765 bytes
0644
packages-style-style.asset.php
377 bytes
0644
packages-style-style.js.LICENSE.txt
1948 bytes
0644
packages-style.css
49715 bytes
0644
page-content-wrapper-style.asset.php
195 bytes
0644
page-content-wrapper.asset.php
195 bytes
0644
page-content-wrapper.js
5412 bytes
0644
price-filter-frontend.asset.php
299 bytes
0644
price-filter-frontend.js
21743 bytes
0644
price-filter-rtl.css
19219 bytes
0644
price-filter-style.asset.php
349 bytes
0644
price-filter-wrapper-frontend.js
17809 bytes
0644
price-filter-wrapper-rtl.css
18475 bytes
0644
price-filter-wrapper.css
18450 bytes
0644
price-filter.asset.php
349 bytes
0644
price-filter.css
19192 bytes
0644
price-filter.js
23501 bytes
0644
price-format.asset.php
132 bytes
0644
price-format.js
1669 bytes
0644
product-average-rating-frontend.js
2768 bytes
0644
product-average-rating.js
2947 bytes
0644
product-best-sellers-style.asset.php
315 bytes
0644
product-best-sellers.asset.php
315 bytes
0644
product-best-sellers.js
26158 bytes
0644
product-button-frontend.js
10902 bytes
0644
product-button-interactivity-frontend.asset.php
281 bytes
0644
product-button-interactivity-frontend.js
18794 bytes
0644
product-button-rtl.css
5137 bytes
0644
product-button.css
5135 bytes
0644
product-button.js
12323 bytes
0644
product-categories-rtl.css
1968 bytes
0644
product-categories-style.asset.php
233 bytes
0644
product-categories.asset.php
233 bytes
0644
product-categories.css
1966 bytes
0644
product-categories.js
7588 bytes
0644
product-category-style.asset.php
315 bytes
0644
product-category.asset.php
315 bytes
0644
product-category.js
30236 bytes
0644
product-collection-frontend.asset.php
147 bytes
0644
product-collection-frontend.js
3048 bytes
0644
product-collection-no-results-style.asset.php
166 bytes
0644
product-collection-no-results.asset.php
166 bytes
0644
product-collection-no-results.js
3793 bytes
0644
product-collection-rtl.css
1125 bytes
0644
product-collection-style.asset.php
466 bytes
0644
product-collection.asset.php
446 bytes
0644
product-collection.css
1119 bytes
0644
product-collection.js
89664 bytes
0644
product-details-rtl.css
2424 bytes
0644
product-details-style.asset.php
220 bytes
0644
product-details.css
2420 bytes
0644
product-filter-active-frontend.asset.php
147 bytes
0644
product-filter-active-frontend.js
1079 bytes
0644
product-filter-active-rtl.css
727 bytes
0644
product-filter-active-style.asset.php
243 bytes
0644
product-filter-active.asset.php
223 bytes
0644
product-filter-active.css
725 bytes
0644
product-filter-active.js
4496 bytes
0644
product-filter-attribute-frontend.asset.php
147 bytes
0644
product-filter-attribute-frontend.js
1771 bytes
0644
product-filter-attribute-rtl.css
1610 bytes
0644
product-filter-attribute-style.asset.php
302 bytes
0644
product-filter-attribute.asset.php
282 bytes
0644
product-filter-attribute.css
1605 bytes
0644
product-filter-attribute.js
19085 bytes
0644
product-filter-checkbox-list-frontend.asset.php
147 bytes
0644
product-filter-checkbox-list-frontend.js
427 bytes
0644
product-filter-checkbox-list-rtl.css
2041 bytes
0644
product-filter-checkbox-list-style.asset.php
232 bytes
0644
product-filter-checkbox-list.asset.php
212 bytes
0644
product-filter-checkbox-list.css
2037 bytes
0644
product-filter-checkbox-list.js
7832 bytes
0644
product-filter-chips-frontend.asset.php
147 bytes
0644
product-filter-chips-frontend.js
411 bytes
0644
product-filter-chips-rtl.css
1779 bytes
0644
product-filter-chips-style.asset.php
215 bytes
0644
product-filter-chips.asset.php
195 bytes
0644
product-filter-chips.css
1777 bytes
0644
product-filter-chips.js
8230 bytes
0644
product-filter-clear-button-style.asset.php
181 bytes
0644
product-filter-clear-button.asset.php
181 bytes
0644
product-filter-clear-button.js
3775 bytes
0644
product-filter-price-frontend.asset.php
166 bytes
0644
product-filter-price-frontend.js
2497 bytes
0644
product-filter-price-rtl.css
727 bytes
0644
product-filter-price-slider-frontend.asset.php
147 bytes
0644
product-filter-price-slider-frontend.js
1224 bytes
0644
product-filter-price-slider-rtl.css
6813 bytes
0644
product-filter-price-slider-style.asset.php
222 bytes
0644
product-filter-price-slider.asset.php
202 bytes
0644
product-filter-price-slider.css
6798 bytes
0644
product-filter-price-slider.js
6939 bytes
0644
product-filter-price-style.asset.php
321 bytes
0644
product-filter-price.asset.php
301 bytes
0644
product-filter-price.css
725 bytes
0644
product-filter-price.js
11820 bytes
0644
product-filter-rating-frontend.asset.php
147 bytes
0644
product-filter-rating-frontend.js
1345 bytes
0644
product-filter-rating-rtl.css
5088 bytes
0644
product-filter-rating-style.asset.php
312 bytes
0644
product-filter-rating.asset.php
292 bytes
0644
product-filter-rating.css
5078 bytes
0644
product-filter-rating.js
15645 bytes
0644
product-filter-removable-chips-frontend.asset.php
147 bytes
0644
product-filter-removable-chips-frontend.js
460 bytes
0644
product-filter-removable-chips-rtl.css
1708 bytes
0644
product-filter-removable-chips-style.asset.php
256 bytes
0644
product-filter-removable-chips.asset.php
236 bytes
0644
product-filter-removable-chips.css
1706 bytes
0644
product-filter-removable-chips.js
7387 bytes
0644
product-filter-status-frontend.asset.php
147 bytes
0644
product-filter-status-frontend.js
1345 bytes
0644
product-filter-status-rtl.css
1244 bytes
0644
product-filter-status-style.asset.php
302 bytes
0644
product-filter-status.asset.php
282 bytes
0644
product-filter-status.css
1240 bytes
0644
product-filter-status.js
12404 bytes
0644
product-filters-frontend.asset.php
162 bytes
0644
product-filters-frontend.js
2931 bytes
0644
product-filters-rtl.css
4831 bytes
0644
product-filters-style.asset.php
244 bytes
0644
product-filters.asset.php
224 bytes
0644
product-filters.css
4829 bytes
0644
product-filters.js
8870 bytes
0644
product-gallery-frontend.asset.php
147 bytes
0644
product-gallery-frontend.js
4190 bytes
0644
product-gallery-large-image-frontend.asset.php
147 bytes
0644
product-gallery-large-image-frontend.js
1396 bytes
0644
product-gallery-large-image-next-previous-style.asset.php
208 bytes
0644
product-gallery-large-image-next-previous.asset.php
208 bytes
0644
product-gallery-large-image-next-previous.js
11348 bytes
0644
product-gallery-large-image-style.asset.php
187 bytes
0644
product-gallery-large-image.asset.php
167 bytes
0644
product-gallery-large-image.js
6634 bytes
0644
product-gallery-pager-style.asset.php
208 bytes
0644
product-gallery-pager.asset.php
208 bytes
0644
product-gallery-pager.js
7833 bytes
0644
product-gallery-rtl.css
12865 bytes
0644
product-gallery-style.asset.php
255 bytes
0644
product-gallery-thumbnails-style.asset.php
223 bytes
0644
product-gallery-thumbnails.asset.php
223 bytes
0644
product-gallery-thumbnails.js
11957 bytes
0644
product-gallery.asset.php
235 bytes
0644
product-gallery.css
12862 bytes
0644
product-gallery.js
36912 bytes
0644
product-image-frontend.js
5706 bytes
0644
product-image-gallery-rtl.css
619 bytes
0644
product-image-gallery-style.asset.php
210 bytes
0644
product-image-gallery.css
617 bytes
0644
product-image-rtl.css
4092 bytes
0644
product-image.css
4089 bytes
0644
product-image.js
6774 bytes
0644
product-new-style.asset.php
315 bytes
0644
product-new.asset.php
315 bytes
0644
product-new.js
28323 bytes
0644
product-on-sale-style.asset.php
315 bytes
0644
product-on-sale.asset.php
315 bytes
0644
product-on-sale.js
27514 bytes
0644
product-price-frontend.js
6288 bytes
0644
product-price-rtl.css
1754 bytes
0644
product-price.css
1751 bytes
0644
product-price.js
6581 bytes
0644
product-query-rtl.css
655 bytes
0644
product-query-style.asset.php
325 bytes
0644
product-query.asset.php
325 bytes
0644
product-query.css
652 bytes
0644
product-query.js
40941 bytes
0644
product-rating-counter-frontend.js
3603 bytes
0644
product-rating-counter.js
3781 bytes
0644
product-rating-frontend.js
5454 bytes
0644
product-rating-rtl.css
428 bytes
0644
product-rating-stars-frontend.js
5397 bytes
0644
product-rating-stars-rtl.css
3053 bytes
0644
product-rating-stars.css
3050 bytes
0644
product-rating-stars.js
5601 bytes
0644
product-rating.css
426 bytes
0644
product-rating.js
5657 bytes
0644
product-results-count-rtl.css
323 bytes
0644
product-results-count-style.asset.php
180 bytes
0644
product-results-count.asset.php
180 bytes
0644
product-results-count.css
321 bytes
0644
product-results-count.js
3846 bytes
0644
product-reviews-rtl.css
1127 bytes
0644
product-reviews-style.asset.php
204 bytes
0644
product-reviews.css
1126 bytes
0644
product-sale-badge-frontend.js
3075 bytes
0644
product-sale-badge-rtl.css
954 bytes
0644
product-sale-badge.css
952 bytes
0644
product-sale-badge.js
3279 bytes
0644
product-search-rtl.css
1169 bytes
0644
product-search-style.asset.php
261 bytes
0644
product-search.asset.php
261 bytes
0644
product-search.css
1166 bytes
0644
product-search.js
9999 bytes
0644
product-sku-frontend.js
3704 bytes
0644
product-sku-rtl.css
523 bytes
0644
product-sku.css
521 bytes
0644
product-sku.js
3908 bytes
0644
product-stock-indicator-frontend.js
4758 bytes
0644
product-stock-indicator-rtl.css
321 bytes
0644
product-stock-indicator.css
319 bytes
0644
product-stock-indicator.js
4961 bytes
0644
product-summary-frontend.js
5127 bytes
0644
product-summary-rtl.css
1560 bytes
0644
product-summary.css
1558 bytes
0644
product-summary.js
5331 bytes
0644
product-tag-style.asset.php
309 bytes
0644
product-tag.asset.php
309 bytes
0644
product-tag.js
27801 bytes
0644
product-template-rtl.css
2124 bytes
0644
product-template-style.asset.php
302 bytes
0644
product-template.asset.php
302 bytes
0644
product-template.css
2122 bytes
0644
product-template.js
11369 bytes
0644
product-title-frontend.js
3987 bytes
0644
product-title-rtl.css
1932 bytes
0644
product-title.css
1928 bytes
0644
product-title.js
4859 bytes
0644
product-top-rated-style.asset.php
315 bytes
0644
product-top-rated.asset.php
315 bytes
0644
product-top-rated.js
27741 bytes
0644
products-by-attribute-style.asset.php
338 bytes
0644
products-by-attribute.asset.php
338 bytes
0644
products-by-attribute.js
29472 bytes
0644
rating-filter-frontend.asset.php
388 bytes
0644
rating-filter-frontend.js
19321 bytes
0644
rating-filter-rtl.css
31704 bytes
0644
rating-filter-style.asset.php
407 bytes
0644
rating-filter-style.js.LICENSE.txt
121 bytes
0644
rating-filter-wrapper-frontend.js
14995 bytes
0644
rating-filter-wrapper-rtl.css
10015 bytes
0644
rating-filter-wrapper.css
10008 bytes
0644
rating-filter.asset.php
407 bytes
0644
rating-filter.css
31681 bytes
0644
rating-filter.js
17125 bytes
0644
reviews-by-category-rtl.css
10828 bytes
0644
reviews-by-category-style.asset.php
337 bytes
0644
reviews-by-category-style.js.LICENSE.txt
188 bytes
0644
reviews-by-category.asset.php
337 bytes
0644
reviews-by-category.css
10817 bytes
0644
reviews-by-category.js
40902 bytes
0644
reviews-by-product-rtl.css
10828 bytes
0644
reviews-by-product-style.asset.php
349 bytes
0644
reviews-by-product-style.js.LICENSE.txt
188 bytes
0644
reviews-by-product.asset.php
349 bytes
0644
reviews-by-product.css
10817 bytes
0644
reviews-by-product.js
45240 bytes
0644
reviews-frontend.asset.php
270 bytes
0644
reviews-frontend.js
22684 bytes
0644
single-product-rtl.css
744 bytes
0644
single-product-style.asset.php
554 bytes
0644
single-product.asset.php
554 bytes
0644
single-product.css
742 bytes
0644
single-product.js
35988 bytes
0644
stock-filter-frontend.asset.php
408 bytes
0644
stock-filter-frontend.js
19701 bytes
0644
stock-filter-rtl.css
29869 bytes
0644
stock-filter-style.asset.php
427 bytes
0644
stock-filter-style.js.LICENSE.txt
121 bytes
0644
stock-filter-wrapper-frontend.js
15543 bytes
0644
stock-filter-wrapper-rtl.css
8180 bytes
0644
stock-filter-wrapper.css
8174 bytes
0644
stock-filter.asset.php
427 bytes
0644
stock-filter.css
29847 bytes
0644
stock-filter.js
18939 bytes
0644
store-notices-rtl.css
6645 bytes
0644
store-notices-style.asset.php
208 bytes
0644
store-notices-style.js.LICENSE.txt
249 bytes
0644
store-notices.asset.php
208 bytes
0644
store-notices.css
6638 bytes
0644
store-notices.js
6108 bytes
0644
wc-blocks-classic-template-revert-button-style-rtl.css
428 bytes
0644
wc-blocks-classic-template-revert-button-style-style.asset.php
234 bytes
0644
wc-blocks-classic-template-revert-button-style.css
426 bytes
0644
wc-blocks-classic-template-revert-button.asset.php
234 bytes
0644
wc-blocks-classic-template-revert-button.js
2560 bytes
0644
wc-blocks-data.asset.php
324 bytes
0644
wc-blocks-data.js
77430 bytes
0644
wc-blocks-editor-style-rtl.css
79625 bytes
0644
wc-blocks-editor-style.css
79460 bytes
0644
wc-blocks-frontend-vendors-frontend.asset.php
97 bytes
0644
wc-blocks-frontend-vendors-frontend.js
116818 bytes
0644
wc-blocks-google-analytics.asset.php
120 bytes
0644
wc-blocks-google-analytics.js
3153 bytes
0644
wc-blocks-middleware.asset.php
123 bytes
0644
wc-blocks-middleware.js
1898 bytes
0644
wc-blocks-registry.asset.php
175 bytes
0644
wc-blocks-registry.js
20901 bytes
0644
wc-blocks-rtl.css
12947 bytes
0644
wc-blocks-shared-context.asset.php
120 bytes
0644
wc-blocks-shared-context.js
1861 bytes
0644
wc-blocks-shared-hocs.asset.php
218 bytes
0644
wc-blocks-shared-hocs.js
3213 bytes
0644
wc-blocks-style.asset.php
272 bytes
0644
wc-blocks-vendors.asset.php
97 bytes
0644
wc-blocks-vendors.js
130633 bytes
0644
wc-blocks.asset.php
272 bytes
0644
wc-blocks.css
12942 bytes
0644
wc-blocks.js
30289 bytes
0644
wc-cart-checkout-base-frontend.asset.php
97 bytes
0644
wc-cart-checkout-base-frontend.js
202267 bytes
0644
wc-cart-checkout-vendors-frontend.asset.php
97 bytes
0644
wc-cart-checkout-vendors-frontend.js
159559 bytes
0644
wc-interactivity-checkbox-list-rtl.css
1559 bytes
0644
wc-interactivity-checkbox-list-style.asset.php
117 bytes
0644
wc-interactivity-checkbox-list.asset.php
117 bytes
0644
wc-interactivity-checkbox-list.css
1556 bytes
0644
wc-interactivity-checkbox-list.js
738 bytes
0644
wc-interactivity-dropdown-rtl.css
2646 bytes
0644
wc-interactivity-dropdown-style.asset.php
117 bytes
0644
wc-interactivity-dropdown.asset.php
117 bytes
0644
wc-interactivity-dropdown.css
2646 bytes
0644
wc-interactivity-dropdown.js
1437 bytes
0644
wc-interactivity.asset.php
97 bytes
0644
wc-interactivity.js
35707 bytes
0644
wc-payment-method-bacs.asset.php
188 bytes
0644
wc-payment-method-bacs.js
23237 bytes
0644
wc-payment-method-cheque.asset.php
188 bytes
0644
wc-payment-method-cheque.js
23234 bytes
0644
wc-payment-method-cod.asset.php
188 bytes
0644
wc-payment-method-cod.js
23470 bytes
0644
wc-payment-method-paypal.asset.php
188 bytes
0644
wc-payment-method-paypal.js
23305 bytes
0644
wc-settings.asset.php
109 bytes
0644
wc-settings.js
4568 bytes
0644
wc-shipping-method-pickup-location.asset.php
242 bytes
0644
wc-shipping-method-pickup-location.js
85634 bytes
0644
wc-types.asset.php
97 bytes
0644
wc-types.js
2629 bytes
0644
N4ST4R_ID | Naxtarrr