JezK
Edit File: homescreen.js
(globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[1494],{64382:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o(39793),r=o(5573),n=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"})})},73580:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o(39793),r=o(5573),n=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})})},19432:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o(39793),r=o(5573),n=(0,s.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})})},33816:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o(39793),r=o(5573),n=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{fillRule:"evenodd",d:"M6.863 13.644L5 13.25h-.5a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5H5L18 6.5h2V16h-2l-3.854-.815.026.008a3.75 3.75 0 01-7.31-1.549zm1.477.313a2.251 2.251 0 004.356.921l-4.356-.921zm-2.84-3.28L18.157 8h.343v6.5h-.343L5.5 11.823v-1.146z",clipRule:"evenodd"})})},54200:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o(39793),r=o(5573),n=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"})})},86083:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o(39793),r=o(5573),n=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{fillRule:"evenodd",d:"M6.5 8a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zM8 5a3 3 0 100 6 3 3 0 000-6zm6.5 11a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zm1.5-3a3 3 0 100 6 3 3 0 000-6zM5.47 17.41a.75.75 0 001.06 1.06L18.47 6.53a.75.75 0 10-1.06-1.06L5.47 17.41z",clipRule:"evenodd"})})},28402:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o(39793),r=o(5573),n=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M3 6.75C3 5.784 3.784 5 4.75 5H15V7.313l.05.027 5.056 2.73.394.212v3.468a1.75 1.75 0 01-1.75 1.75h-.012a2.5 2.5 0 11-4.975 0H9.737a2.5 2.5 0 11-4.975 0H3V6.75zM13.5 14V6.5H4.75a.25.25 0 00-.25.25V14h.965a2.493 2.493 0 011.785-.75c.7 0 1.332.287 1.785.75H13.5zm4.535 0h.715a.25.25 0 00.25-.25v-2.573l-4-2.16v4.568a2.487 2.487 0 011.25-.335c.7 0 1.332.287 1.785.75zM6.282 15.5a1.002 1.002 0 00.968 1.25 1 1 0 10-.968-1.25zm9 0a1 1 0 101.937.498 1 1 0 00-1.938-.498z"})})},97440:(e,t,o)=>{"use strict";o.d(t,{a:()=>c});var s=o(4921),r=o(86087),n=o(54500),i=o(39793);const c=({children:e,className:t})=>(0,i.jsx)("div",{className:(0,s.A)("woocommerce-onboarding-loader",t),children:e});c.Layout=({children:e,className:t})=>(0,i.jsx)("div",{className:(0,s.A)("woocommerce-onboarding-loader-wrapper",t),children:(0,i.jsx)("div",{className:(0,s.A)("woocommerce-onboarding-loader-container",t),children:e})}),c.Illustration=({children:e})=>(0,i.jsx)(i.Fragment,{children:e}),c.Title=({children:e,className:t})=>(0,i.jsx)("h1",{className:(0,s.A)("woocommerce-onboarding-loader__title",t),children:e}),c.ProgressBar=({progress:e,className:t})=>(0,i.jsx)(n.A,{className:(0,s.A)("progress-bar",t),percent:e??0,color:"var(--wp-admin-theme-color)",bgcolor:"#E0E0E0"}),c.Subtext=({children:e,className:t})=>(0,i.jsx)("p",{className:(0,s.A)("woocommerce-onboarding-loader__paragraph",t),children:e}),c.Sequence=({interval:e,shouldLoop:t=!0,children:o,onChange:s=()=>{}})=>{const[n,c]=(0,r.useState)(0),a=r.Children.count(o);(0,r.useEffect)(()=>{const o=setInterval(()=>{c(e=>{const r=e+1;if(t){const e=r%a;return s(e),e}return r<a?(s(r),r):(clearInterval(o),e)})},e);return()=>clearInterval(o)},[e,o,t,a]);const l=r.Children.toArray(o)[n];return(0,i.jsx)(i.Fragment,{children:l})}},64473:(e,t,o)=>{"use strict";o.d(t,{L:()=>E});var s=o(51609),r=o(56427),n=o(68854),i=o(75933),c=o(54728),a=o(3868),l=o(58339),m=o(89098),d=o(13150),u=o(55342),p=o(88e3),_=o(24702),h=o(72762),w=o(25102),g=o(98607),v=o(29366),y=o(8180),k=o(92510),x=o(30978),f=o(16243),j=o(64090),b=o(76469),S=o(5413),C=o(39793);const N=[{name:"visa",src:n},{name:"mastercard",src:i},{name:"amex",src:c,background:"#006FCF"},{name:"discover",src:a},{name:"woopay",src:w,background:"#873EFF"},{name:"applepay",src:l},{name:"googlepay",src:m},{name:"afterpay",src:g,background:"#B2FCE4"},{name:"affirm",src:v},{name:"klarna",src:y,background:"#FFB3C7"},{name:"cartebancaire",src:u,background:"linear-gradient(30deg, #2E2E79 0%, #2581C4 25%, #E6D6DB 50%, #E3756A 75%, #C90C0F 100%)"},{name:"unionpay",src:p},{name:"diners",src:_},{name:"eftpos",src:h,background:"rgba(31, 0, 56, 1)"},{name:"jcb",src:d,background:"rgba(14, 76, 150, 1)"},{name:"bancontact",src:x},{name:"becs",src:j},{name:"eps",src:f},{name:"ideal",src:k},{name:"przelewy24",src:b},{name:"grabpay",src:S}],A=e=>(0,C.jsx)("img",{src:e.src,alt:"",width:e.background?40:38,height:e.background?26:24,className:e.background?"has-background":void 0,style:e.background?{background:e.background}:void 0,loading:"lazy"},e.name),E=({isWooPayEligible:e=!1,maxElements:t=10,tabletWidthBreakpoint:o=768,maxElementsTablet:n=7,mobileWidthBreakpoint:i=480,maxElementsMobile:c=5,totalPaymentMethods:a=21})=>{const[l,m]=(0,s.useState)(t),[d,u]=(0,s.useState)(!1),p=(0,s.useRef)(null),_=e=>{const t=e.target.closest(".woocommerce-woopayments-payment-methods-logos-count");p.current&&t!==p.current||u(e=>!e)},h=e=>{"Escape"===e.key&&d?(e.stopPropagation(),u(!1),p.current?.focus()):"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),_(e))};(0,s.useEffect)(()=>{if(!d)return;const e=e=>{"Escape"===e.key&&(e.stopPropagation(),u(!1),p.current?.focus())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[d]);const w=e?a:a-1,g=t=>e?t:t+1;(0,s.useEffect)(()=>{const e=()=>{window.innerWidth<=i?m(c):window.innerWidth<=o?m(n):m(t)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[t,c,n,o,i]);const v=N.slice(0,g(l)).filter(t=>e||"woopay"!==t.name),y=N.slice(g(l)).filter(t=>e||"woopay"!==t.name);return(0,C.jsxs)("div",{className:"woocommerce-woopayments-payment-methods-logos",children:[v.map(A),l<w&&(0,C.jsxs)("div",{className:"woocommerce-woopayments-payment-methods-logos-count",role:"button",tabIndex:0,ref:p,onClick:_,onKeyDown:h,children:["+ ",w-l,d&&(0,C.jsx)(r.Popover,{className:"woocommerce-woopayments-payment-methods-logos-popover",placement:"top-start",offset:4,variant:"unstyled",focusOnMount:!0,noArrow:!0,shift:!0,onFocusOutside:()=>{u(!1)},onKeyDown:h,children:(0,C.jsx)("div",{className:"woocommerce-woopayments-payment-methods-logos",children:y.map(A)})})]})]})}},18229:(e,t,o)=>{"use strict";o.d(t,{b:()=>c,J:()=>a});var s=o(84343),r=o.n(s),n=o(27723);const i={PH:{"National Capital Region":(0,n.__)("Metro Manila","woocommerce")},IT:{Rome:(0,n.__)("Roma","woocommerce")}},c=(e,t,o=.7)=>{if(!t)return null;let s=null,n=o;const c=(({country_short:e,region:t="",city:o=""})=>{if(!e)return null;const s=i[e];if(!s)return null;const r=s[t];return r||(s[o]||null)})(t);for(const o of e){if(o.key===t.country_short)return o;if(o.key.split(":")[0]===t.country_short&&o.label.includes("—")){const e=o.label.split("—")[1].trim();if(c===e)return o;if(0===e.localeCompare(t.region||"","en",{sensitivity:"base"})||0===e.localeCompare(t.city||"","en",{sensitivity:"base"}))return o;const i=Math.max(r().compareTwoStrings(e,t.region||""),r().compareTwoStrings(e,t.city||""));i>=n&&(s=o,n=i)}}return s},a=e=>e?.split(":")[0]??void 0},40188:(e,t,o)=>{"use strict";o.d(t,{O:()=>_,p:()=>p});var s=o(4921),r=o(86087),n=o(94736),i=o(76154),c=o.n(i),a=o(98846),l=o(56427),m=o(39793),d=o(66087);class u extends r.Component{render(){const{className:e,hasAction:t,hasDate:o,hasSubtitle:r,lines:n}=this.props,i=(0,s.A)("woocommerce-activity-card is-loading",e);return(0,m.jsxs)("div",{className:i,"aria-hidden":!0,children:[(0,m.jsx)("span",{className:"woocommerce-activity-card__icon",children:(0,m.jsx)("span",{className:"is-placeholder"})}),(0,m.jsxs)("div",{className:"woocommerce-activity-card__header",children:[(0,m.jsx)("div",{className:"woocommerce-activity-card__title is-placeholder"}),r&&(0,m.jsx)("div",{className:"woocommerce-activity-card__subtitle is-placeholder"}),o&&(0,m.jsx)("div",{className:"woocommerce-activity-card__date",children:(0,m.jsx)("span",{className:"is-placeholder"})})]}),(0,m.jsx)("div",{className:"woocommerce-activity-card__body",children:(0,d.range)(n).map(e=>(0,m.jsx)("span",{className:"is-placeholder"},e))}),t&&(0,m.jsx)("div",{className:"woocommerce-activity-card__actions",children:(0,m.jsx)("span",{className:"is-placeholder"})})]})}}u.defaultProps={hasAction:!1,hasDate:!1,hasSubtitle:!1,lines:1};const p=u;class _ extends r.Component{getCard(){const{actions:e,className:t,children:o,date:n,icon:i,subtitle:l,title:d,unread:u}=this.props,p=(0,s.A)("woocommerce-activity-card",t),_=Array.isArray(e)?e:[e],h=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(n)?c().utc(n).fromNow():n;return(0,m.jsxs)("section",{className:p,children:[u&&(0,m.jsx)("span",{className:"woocommerce-activity-card__unread"}),i&&(0,m.jsx)("span",{className:"woocommerce-activity-card__icon","aria-hidden":!0,children:i}),d&&(0,m.jsxs)("header",{className:"woocommerce-activity-card__header",children:[(0,m.jsx)(a.H,{className:"woocommerce-activity-card__title",children:d}),l&&(0,m.jsx)("div",{className:"woocommerce-activity-card__subtitle",children:l}),h&&(0,m.jsx)("span",{className:"woocommerce-activity-card__date",children:h})]}),o&&(0,m.jsx)(a.Section,{className:"woocommerce-activity-card__body",children:o}),e&&(0,m.jsx)("footer",{className:"woocommerce-activity-card__actions",children:_.map((e,t)=>(0,r.cloneElement)(e,{key:t}))})]})}render(){const{onClick:e}=this.props;return e?(0,m.jsx)(l.Button,{className:"woocommerce-activity-card__button",onClick:e,children:this.getCard()}):this.getCard()}}_.defaultProps={icon:(0,m.jsx)(n.A,{size:48}),unread:!1}},52310:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var s=o(4921),r=o(86087),n=o(14908),i=(o(98846),o(39793));class c extends r.Component{render(){const{className:e,menu:t,subtitle:o,title:r,unreadMessages:c}=this.props,a=(0,s.A)({"woocommerce-layout__inbox-panel-header":o,"woocommerce-layout__activity-panel-header":!o},e),l=c||0;return(0,i.jsxs)("div",{className:a,children:[(0,i.jsxs)("div",{className:"woocommerce-layout__inbox-title",children:[(0,i.jsx)(n.Text,{size:16,weight:600,color:"#23282d",children:r}),(0,i.jsx)(n.Text,{variant:"button",weight:"600",size:"14",lineHeight:"20px",children:l>0&&(0,i.jsx)("span",{className:"woocommerce-layout__inbox-badge",children:c})})]}),(0,i.jsx)("div",{className:"woocommerce-layout__inbox-subtitle",children:o&&(0,i.jsx)(n.Text,{variant:"body.small",size:"14",lineHeight:"20px",children:o})}),t&&(0,i.jsx)("div",{className:"woocommerce-layout__activity-panel-header-menu",children:t})]})}}const a=c},95899:(e,t,o)=>{"use strict";o.r(t),o.d(t,{HelpPanel:()=>x,SETUP_TASK_HELP_ITEMS_FILTER:()=>y,default:()=>f});var s=o(27723),r=o(14908),n=o(47143),i=o(86087),c=o(52619),a=o(93450),l=o(83243),m=o(94846),d=o(66087),u=o(98846),p=o(40314),_=o(86958),h=o(83306),w=o(52310),g=o(47721),v=o(39793);const y="woocommerce_admin_setup_task_help_items";function k(e,t){const{taskName:o}=e;t&&e.recordEvent("help_panel_click",{task_name:o||"homescreen",link:t.currentTarget.href})}const x=({taskName:e,recordEvent:t=h.recordEvent,...o})=>{(0,i.useEffect)(()=>{t("help_panel_open",{task_name:e||"homescreen"})},[e,t]);const n=function(e){const t=function(e){const{taskName:t}=e;switch(t){case"products":return[{title:(0,s.__)("Adding and Managing Products","woocommerce"),link:"https://woocommerce.com/document/managing-products/?utm_source=help_panel&utm_medium=product"},{title:(0,s.__)("Import products using the CSV Importer and Exporter","woocommerce"),link:"https://woocommerce.com/document/product-csv-importer-exporter/?utm_source=help_panel&utm_medium=product"},{title:(0,s.__)("Migrate products using Cart2Cart","woocommerce"),link:"https://woocommerce.com/products/cart2cart/?utm_source=help_panel&utm_medium=product"},{title:(0,s.__)("Learn more about setting up products","woocommerce"),link:"https://woocommerce.com/documentation/plugins/woocommerce/getting-started/setup-products/?utm_source=help_panel&utm_medium=product"}];case"appearance":return[{title:(0,s.__)("Showcase your products and tailor your shopping experience using Blocks","woocommerce"),link:"https://woocommerce.com/document/woocommerce-blocks/?utm_source=help_panel&utm_medium=product"},{title:(0,s.__)("Manage Store Notice, Catalog View and Product Images","woocommerce"),link:"https://woocommerce.com/document/woocommerce-customizer/?utm_source=help_panel&utm_medium=product"},{title:(0,s.__)("How to choose and change a theme","woocommerce"),link:"https://woocommerce.com/document/choose-change-theme/?utm_source=help_panel&utm_medium=product"}];case"shipping":return function({activePlugins:e,countryCode:t}){const o="US"===t&&!e.includes("woocommerce-services")&&!e.includes("woocommerce-shipping")&&!e.includes("woocommerce-tax");return[{title:(0,s.__)("Setting up Shipping Zones","woocommerce"),link:"https://woocommerce.com/document/setting-up-shipping-zones/?utm_source=help_panel&utm_medium=product"},{title:(0,s.__)("Core Shipping Options","woocommerce"),link:"https://woocommerce.com/documentation/plugins/woocommerce/getting-started/shipping/core-shipping-options/?utm_source=help_panel&utm_medium=product"},{title:(0,s.__)("Product Shipping Classes","woocommerce"),link:"https://woocommerce.com/document/product-shipping-classes/?utm_source=help_panel&utm_medium=product"},o&&{title:(0,s.__)("WooCommerce Shipping setup and configuration","woocommerce"),link:"https://woocommerce.com/document/woocommerce-shipping-and-tax/?utm_source=help_panel&utm_medium=product#section-3"},{title:(0,s.__)("Learn more about configuring your shipping settings","woocommerce"),link:"https://woocommerce.com/document/plugins/woocommerce/getting-started/shipping/?utm_source=help_panel&utm_medium=product"}].filter(Boolean)}(e);case"tax":return function(e){const{countryCode:t,taskLists:o}=e,r=o.reduce((e,t)=>[...e,...t.tasks],[]).find(e=>"tax"===e.id);if(!r)return;const{additionalData:n}=r,{woocommerceTaxCountries:i=[],taxJarActivated:c,woocommerceTaxActivated:a,woocommerceShippingActivated:l}=n,m=!c&&i.includes(t)&&!a&&!l;return[{title:(0,s.__)("Setting up Taxes in WooCommerce","woocommerce"),link:"https://woocommerce.com/document/setting-up-taxes-in-woocommerce/?utm_source=help_panel&utm_medium=product"},m&&{title:(0,s.__)("Automated Tax calculation using WooCommerce Tax","woocommerce"),link:"https://woocommerce.com/document/woocommerce-services/?utm_source=help_panel&utm_medium=product#section-10"}].filter(Boolean)}(e);case"payments":return function(e){const{paymentGatewaySuggestions:t}=e;return[{title:(0,s.__)("Which Payment Option is Right for Me?","woocommerce"),link:"https://woocommerce.com/document/premium-payment-gateway-extensions/?utm_source=help_panel&utm_medium=product"},t.woocommerce_payments&&{title:(0,s.__)("WooPayments Start Up Guide","woocommerce"),link:"https://woocommerce.com/document/payments/?utm_source=help_panel&utm_medium=product"},t.woocommerce_payments&&{title:(0,s.__)("WooPayments FAQs","woocommerce"),link:"https://woocommerce.com/documentation/woocommerce-payments/woocommerce-payments-faqs/?utm_source=help_panel&utm_medium=product"},t.stripe&&{title:(0,s.__)("Stripe Setup and Configuration","woocommerce"),link:"https://woocommerce.com/document/stripe/?utm_source=help_panel&utm_medium=product"},t["ppcp-gateway"]&&{title:(0,s.__)("PayPal Checkout Setup and Configuration","woocommerce"),link:"https://woocommerce.com/document/2-0/woocommerce-paypal-payments/?utm_medium=product#section-3"},t.square_credit_card&&{title:(0,s.__)("Square - Get started","woocommerce"),link:"https://woocommerce.com/document/woocommerce-square/?utm_source=help_panel&utm_medium=product"},t.kco&&{title:(0,s.__)("Kustom - Introduction","woocommerce"),link:"https://woocommerce.com/document/kustom-checkout/?utm_source=help_panel&utm_medium=product"},t.klarna_payments&&{title:(0,s.__)("Klarna - Introduction","woocommerce"),link:"https://woocommerce.com/document/klarna-payments/?utm_source=help_panel&utm_medium=product"},t.payfast&&{title:(0,s.__)("Payfast Setup and Configuration","woocommerce"),link:"https://woocommerce.com/document/payfast-payment-gateway/?utm_source=help_panel&utm_medium=product"},t.eway&&{title:(0,s.__)("Eway Setup and Configuration","woocommerce"),link:"https://woocommerce.com/document/eway/?utm_source=help_panel&utm_medium=product"},{title:(0,s.__)("Direct Bank Transfer (BACS)","woocommerce"),link:"https://woocommerce.com/document/bacs/?utm_source=help_panel&utm_medium=product"},{title:(0,s.__)("Cash on Delivery","woocommerce"),link:"https://woocommerce.com/document/cash-on-delivery/?utm_source=help_panel&utm_medium=product"}].filter(Boolean)}(e);case"marketing":return function(e){const{activePlugins:t}=e;return[t.includes("mailpoet")&&{title:(0,s.__)("Get started with Mailpoet","woocommerce"),link:"https://kb.mailpoet.com/category/114-getting-started"},t.includes("google-listings-and-ads")&&{title:(0,s.__)("Set up Google for WooCommerce","woocommerce"),link:"https://woocommerce.com/document/google-listings-and-ads/?utm_medium=product#get-started"},t.includes("pinterest-for-woocommerce")&&{title:(0,s.__)("Set up Pinterest for WooCommerce","woocommerce"),link:"https://woocommerce.com/products/pinterest-for-woocommerce/"},t.includes("mailchimp-for-woocommerce")&&{title:(0,s.__)("Connect Mailchimp for WooCommerce","woocommerce"),link:"https://mailchimp.com/help/connect-or-disconnect-mailchimp-for-woocommerce/"},t.includes("creative-mail-by-constant-contact")&&{title:(0,s.__)("Set up Creative Mail for WooCommerce","woocommerce"),link:"https://app.creativemail.com/kb/help/WooCommerce"}].filter(Boolean)}(e);default:return[{title:(0,s.__)("Get Support","woocommerce"),link:"https://woocommerce.com/my-account/create-a-ticket/?utm_medium=product"},{title:(0,s.__)("Home Screen","woocommerce"),link:"https://woocommerce.com/document/home-screen/?utm_medium=product"},{title:(0,s.__)("Inbox","woocommerce"),link:"https://woocommerce.com/document/home-screen/?utm_medium=product#section-4"},{title:(0,s.__)("Stats Overview","woocommerce"),link:"https://woocommerce.com/document/home-screen/?utm_medium=product#section-5"},{title:(0,s.__)("Store Management","woocommerce"),link:"https://woocommerce.com/document/home-screen/?utm_medium=product#section-10"},{title:(0,s.__)("Store Setup Checklist","woocommerce"),link:"https://woocommerce.com/document/woocommerce-setup-wizard?utm_medium=product#store-setup-checklist"}]}}(e),o={title:(0,s.__)("WooCommerce Docs","woocommerce"),link:"https://woocommerce.com/documentation/?utm_source=help_panel&utm_medium=product"};t.push(o);const n=(0,c.applyFilters)(y,t,e.taskName,e);let i=Array.isArray(n)?n.filter(e=>e instanceof Object&&e.title&&e.link):[];i.length||(i=[o]);const u=(0,d.partial)(k,e);return i.map(e=>({title:(0,v.jsx)(r.Text,{as:"div",variant:"button",weight:"600",size:"14",lineHeight:"20px",children:e.title}),before:(0,v.jsx)(a.A,{icon:l.A}),after:(0,v.jsx)(a.A,{icon:m.A}),linkType:e.linkType??"external",target:e.target??"_blank",href:e.link,onClick:u}))}({taskName:e,recordEvent:t,...o});return(0,v.jsxs)(i.Fragment,{children:[(0,v.jsx)(w.A,{title:(0,s.__)("Documentation","woocommerce")}),(0,v.jsx)(u.Section,{children:(0,v.jsx)(u.List,{items:n,className:"woocommerce-quick-links__list"})})]})},f=(0,_.Zz)((0,n.withSelect)(e=>{const{getSettings:t}=e(p.settingsStore),{getActivePlugins:o}=e(p.pluginsStore),{general:s={}}=t("general"),r=o(),n=e(p.onboardingStore).getPaymentGatewaySuggestions().reduce((e,t)=>{const{id:o}=t;return e[o]=!0,e},{}),i=e(p.onboardingStore).getTaskLists();return{activePlugins:r,countryCode:(0,g.gI)(s.woocommerce_default_country),paymentGatewaySuggestions:n,taskLists:i}}))(x)},95266:(e,t,o)=>{"use strict";o.d(t,{gV:()=>d,zm:()=>p,$W:()=>y});var s=o(27723),r=o(52619),n=o(85703),i=o(98846),c=o(40314),a=o(77374),l=o(39793);var m=o(90212);const d=["processing","on-hold"],u=["completed","processing","refunded","cancelled","failed","pending","on-hold"],p="woocommerce_analytics_scheduled_import",_=Object.keys(m.wm).filter(e=>"refunded"!==e).map(e=>({value:e,label:m.wm[e],description:(0,s.sprintf)((0,s.__)("Exclude the %s status from reports","woocommerce"),m.wm[e])})),h=(0,m.Qk)("unregisteredOrderStatuses",{}),w=[{key:"defaultStatuses",options:_.filter(e=>u.includes(e.value))},{key:"customStatuses",label:(0,s.__)("Custom Statuses","woocommerce"),options:_.filter(e=>!u.includes(e.value))},{key:"unregisteredStatuses",label:(0,s.__)("Unregistered Statuses","woocommerce"),options:Object.keys(h).map(e=>({value:e,label:e,description:(0,s.sprintf)((0,s.__)("Exclude the %s status from reports","woocommerce"),e)}))}],g={woocommerce_excluded_report_order_statuses:{label:(0,s.__)("Excluded statuses:","woocommerce"),inputType:"checkboxGroup",options:w,helpText:(0,n.A)({mixedString:(0,s.__)("Orders with these statuses are excluded from the totals in your reports. The {{strong}}Refunded{{/strong}} status can not be excluded.","woocommerce"),components:{strong:(0,l.jsx)("strong",{})}}),defaultValue:["pending","cancelled","failed"]},woocommerce_actionable_order_statuses:{label:(0,s.__)("Actionable statuses:","woocommerce"),inputType:"checkboxGroup",options:w,helpText:(0,s.__)("Orders with these statuses require action on behalf of the store admin. These orders will show up in the Home Screen - Orders task.","woocommerce"),defaultValue:d},woocommerce_default_date_range:{name:"woocommerce_default_date_range",label:(0,s.__)("Default date range:","woocommerce"),inputType:"component",component:({value:e,onChange:t})=>{const{wcAdminSettings:o}=(0,c.useSettings)("wc_admin",["wcAdminSettings"]),{woocommerce_default_date_range:s}=o,r=Object.fromEntries(new URLSearchParams(e.replace(/&/g,"&"))),{period:n,compare:m,before:d,after:u}=(0,a.getDateParamsFromQuery)(r,s),{primary:p,secondary:_}=(0,a.getCurrentDates)(r,s),h={period:n,compare:m,before:d,after:u,primaryDate:p,secondaryDate:_};return(0,l.jsx)(i.DateRangeFilterPicker,{query:r,onRangeSelect:e=>{const o=Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e));t({target:{name:"woocommerce_default_date_range",value:new URLSearchParams(o).toString()}})},dateQuery:h,isoDateFormat:a.isoDateFormat})},helpText:(0,s.__)("Select a default date range. When no range is selected, reports will be viewed by the default date range.","woocommerce"),defaultValue:"period=month&compare=previous_year"},woocommerce_date_type:{name:"woocommerce_date_type",label:(0,s.__)("Date type:","woocommerce"),inputType:"select",options:[{label:(0,s.__)("Select a date type","woocommerce"),value:"",disabled:!0},{label:(0,s.__)("Date created","woocommerce"),value:"date_created",key:"date_created"},{label:(0,s.__)("Date paid","woocommerce"),value:"date_paid",key:"date_paid"},{label:(0,s.__)("Date completed","woocommerce"),value:"date_completed",key:"date_completed"}],helpText:(0,s.__)("Database date field considered for Revenue and Orders reports","woocommerce"),defaultValue:"date_paid"}},v=(0,m.Qk)("woocommerce_analytics_import_interval",(0,s.__)("12 hours","woocommerce"));g[p]={name:p,label:(0,s.__)("Updates:","woocommerce"),inputType:"radio",options:[{label:(0,s.__)("Scheduled (recommended)","woocommerce"),value:"yes",description:(0,s.sprintf)((0,s.__)("Updates automatically every %s. Lowest impact on your site.","woocommerce"),v)},{label:(0,s.__)("Immediately","woocommerce"),value:"no",description:(0,s.__)("Updates as soon as new data is available. May slow busy stores.","woocommerce")}],defaultValue:"yes"};const y=(0,r.applyFilters)("woocommerce_admin_analytics_settings",g)},83878:(e,t,o)=>{"use strict";o.d(t,{m:()=>m,w:()=>l});var s=o(66087),r=o(77374),n=o(40314),i=o(96476),c=o(43577),a=o(15703);const l=({indicator:e,primaryData:t,secondaryData:o,currency:r,formatAmount:n,persistedQuery:l})=>{const m=(0,s.find)(t.data,t=>t.stat===e.stat),d=(0,s.find)(o.data,t=>t.stat===e.stat);if(!m||!d)return{};const u=m._links&&m._links.report[0]&&m._links.report[0].href||"",p=function(e,t,o){return e?"/jetpack"===e?(0,a.getAdminLink)("admin.php?page=jetpack#/dashboard"):(0,i.getNewPath)(t,e,{chart:o.chart}):""}(u,l,m),_="/jetpack"===u?"wp-admin":"wc-admin",h="currency"===m.format,w=(0,c.calculateDelta)(m.value,d.value);return{primaryValue:h?n(m.value):(0,c.formatValue)(r,m.format,m.value),secondaryValue:h?n(d.value):(0,c.formatValue)(r,d.format,d.value),delta:w,reportUrl:p,reportUrlType:_}},m=(e,t,o,s)=>{const{getReportItems:i,getReportItemsError:c,isResolving:a}=e(n.reportsStore),{woocommerce_default_date_range:l}=e(n.settingsStore).getSetting("wc_admin","wcAdminSettings"),m=(0,r.getCurrentDates)(o,l),d=m.primary.before,u=m.secondary.before,p=t.map(e=>e.stat).join(","),_=(0,n.getFilterQuery)({filters:s,query:o}),h={..._,after:(0,r.appendTimestamp)(m.primary.after,"start"),before:(0,r.appendTimestamp)(d,d.isSame((0,r.getStoreTimeZoneMoment)(),"day")?"now":"end"),stats:p},w={..._,after:(0,r.appendTimestamp)(m.secondary.after,"start"),before:(0,r.appendTimestamp)(u,u.isSame((0,r.getStoreTimeZoneMoment)(),"day")?"now":"end"),stats:p};return{primaryData:i("performance-indicators",h),primaryError:c("performance-indicators",h)||null,primaryRequesting:a("getReportItems",["performance-indicators",h]),secondaryData:i("performance-indicators",w),secondaryError:c("performance-indicators",w)||null,secondaryRequesting:a("getReportItems",["performance-indicators",w]),defaultDateRange:l}}},62868:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>mt});var s=o(29491),r=o(47143),n=o(86087),i=o(40314),c=o(96476),a=o(4921),l=o(27723),m=o(52310),d=o(66503),u=o(98846),p=o(56427),_=o(83306),h=o(66087),w=o(95266);const g={status:"publish"};var v=o(18537),y=o(15703),k=o(94111),x=o(40188),f=o(90212),j=o(16253),b=o(39793);function S(e){(0,_.recordEvent)(`activity_panel_orders_${e}`,{})}function C(e,t,o){if(0===e.length)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(x.O,{className:"woocommerce-empty-activity-card",title:"",icon:"",children:[(0,b.jsx)("span",{className:"woocommerce-order-empty__success-icon",role:"img","aria-labelledby":"woocommerce-order-empty-message",children:"🎉"}),(0,b.jsx)(u.H,{id:"woocommerce-order-empty-message",children:(0,l.__)("You’ve fulfilled all your orders","woocommerce")})]}),(0,b.jsx)(u.Link,{href:"edit.php?post_type=shop_order",onClick:()=>S("orders_manage"),className:"woocommerce-layout__activity-panel-outbound-link woocommerce-layout__activity-panel-empty",type:"wp-admin",children:(0,l.__)("Manage all orders","woocommerce")})]});const s=e=>{const{id:o,number:s,customer_id:r,billing:i}=e,a=t.find(e=>e.user_id===r)||{};let m=null;a&&a.id&&(m=(0,j.G7)("analytics")?(0,c.getNewPath)({},"/analytics/customers",{filter:"single_customer",customers:a.id}):(0,y.getAdminLink)("user-edit.php?user_id="+a.id));const d=i?`${i.first_name||""} ${i.last_name||""}`:"",p=(a?.name||d||"").replace(/[<>]/g,"").trim(),_=(0,l.sprintf)((0,l.__)("<orderLink>Order #%1$s</orderLink> %2$s","woocommerce"),s,(h=p)?`<customerLink>${h}</customerLink>`:"");var h;return(0,b.jsx)(b.Fragment,{children:(0,n.createInterpolateElement)(_,{orderLink:(0,b.jsx)(u.Link,{href:(0,y.getAdminLink)("post.php?action=edit&post="+o),onClick:()=>S("order_number"),type:"wp-admin"}),customerLink:m?(0,b.jsx)(u.Link,{href:m,onClick:()=>S("customer_name"),type:"wc-admin"}):(0,b.jsx)("span",{})})})},r=[];return e.forEach(e=>{const{date_created_gmt:t,line_items:n,id:i}=e,c=n?n.length:0;r.push((0,b.jsx)(x.O,{className:"woocommerce-order-activity-card",title:s(e),date:t,onClick:({target:e})=>{S("orders_begin_fulfillment"),e.href||(window.location.href=(0,y.getAdminLink)(`post.php?action=edit&post=${i}`))},subtitle:(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{children:(0,l.sprintf)((0,l._n)("%d product","%d products",c,"woocommerce"),c)}),(0,b.jsx)("span",{children:o(e.total,e.currency)})]}),children:(0,b.jsx)(u.OrderStatus,{order:e,orderStatusMap:(0,f.Qk)("orderStatuses",{})})},i))}),(0,b.jsxs)(b.Fragment,{children:[r,(0,b.jsx)(u.Link,{href:"edit.php?post_type=shop_order",className:"woocommerce-layout__activity-panel-outbound-link",onClick:()=>S("orders_manage"),type:"wp-admin",children:(0,l.__)("Manage all orders","woocommerce")})]})}const N=function({unreadOrdersCount:e,orderStatuses:t}){const o=(0,n.useMemo)(()=>({page:1,per_page:5,status:t,_fields:["id","number","currency","status","total","customer","billing","line_items","customer_id","date_created_gmt"]}),[t]),s=(0,n.useContext)(k.CurrencyContext),c=s.getCurrencyConfig(),{currencySymbols:a={}}=(0,f.Qk)("onboarding",{}),{orders:m=[],isRequesting:d,isError:p,customerItems:_}=(0,r.useSelect)(s=>{const{getOrders:r,hasFinishedResolution:n,getOrdersError:c}=s(i.ordersStore);if(!t.length&&0===e)return{isRequesting:!1};const a=r(o,null),l=n("getOrders",[o]);if(l||null===e||null===a)return{isError:Boolean(c(o)),isRequesting:!0,orderStatuses:t};const{getItems:m}=s(i.itemsStore),d=m("customers",{users:a.map(e=>e.customer_id).filter(e=>0!==e),_fields:["id","name","country","user_id"]});return{orders:a,isError:Boolean(c(a)),isRequesting:l,orderStatuses:t,customerItems:d}});if(p){if(!t.length&&(0,j.G7)("analytics"))return(0,b.jsx)(u.EmptyContent,{title:(0,l.__)("You currently don’t have any actionable statuses. To display orders here, select orders that require further review in settings.","woocommerce"),actionLabel:(0,l.__)("Settings","woocommerce"),actionURL:(0,y.getAdminLink)("admin.php?page=wc-admin&path=/analytics/settings")});throw new Error("Failed to load orders, raise error to trigger ErrorBoundary")}const h=_?Array.from(_,([,e])=>e):[];return(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(u.Section,{children:d?(0,b.jsx)(x.p,{className:"woocommerce-order-activity-card",hasAction:!0,hasDate:!0,lines:1}):C(m,h,(e,t)=>{if(!t)return null;if(c&&c.code===t)return s.formatAmount(e);const o=a[t];return o?(0,k.CurrencyFactory)({...c,symbol:(0,v.decodeEntities)(o),code:t}).formatAmount(e):`${t}${e}`})})})};var A=o(48558),E=o(76154),L=o.n(E);class P extends n.Component{constructor(e){super(e),this.state={quantity:e.product.stock_quantity,editing:!1,edited:!1},this.beginEdit=this.beginEdit.bind(this),this.cancelEdit=this.cancelEdit.bind(this),this.onQuantityChange=this.onQuantityChange.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.onSubmit=this.onSubmit.bind(this)}recordStockEvent(e,t={}){(0,_.recordEvent)(`activity_panel_stock_${e}`,t)}beginEdit(){const{product:e}=this.props;this.setState({editing:!0,quantity:e.stock_quantity},()=>{this.quantityInput&&this.quantityInput.focus()}),this.recordStockEvent("update_stock")}cancelEdit(){const{product:e}=this.props;this.setState({editing:!1,quantity:e.stock_quantity}),this.recordStockEvent("cancel")}handleKeyDown(e){e.keyCode===A.ESCAPE&&this.cancelEdit()}onQuantityChange(e){this.setState({quantity:e.target.value})}async onSubmit(){const{product:e,updateProductStock:t,createNotice:o}=this.props,s=parseInt(this.state.quantity,10);e.stock_quantity!==s?(this.setState({editing:!1,edited:!0}),await t(e,s)?o("success",(0,l.sprintf)((0,l.__)("%s stock updated","woocommerce"),e.name),{actions:[{label:(0,l.__)("Undo","woocommerce"),onClick:()=>{t(e,e.stock_quantity),this.recordStockEvent("undo")}}]}):o("error",(0,l.sprintf)((0,l.__)("%s stock could not be updated","woocommerce"),e.name)),this.recordStockEvent("save",{quantity:s})):this.setState({editing:!1})}getActions(){const{editing:e}=this.state;return e?[(0,b.jsx)(p.Button,{type:"submit",isPrimary:!0,children:(0,l.__)("Save","woocommerce")},"save"),(0,b.jsx)(p.Button,{type:"reset",children:(0,l.__)("Cancel","woocommerce")},"cancel")]:[(0,b.jsx)(p.Button,{isSecondary:!0,onClick:this.beginEdit,children:(0,l.__)("Update stock","woocommerce")},"update")]}getBody(){const{product:e}=this.props,{editing:t,quantity:o}=this.state;return t?(0,b.jsxs)(n.Fragment,{children:[(0,b.jsx)(p.BaseControl,{className:"woocommerce-stock-activity-card__edit-quantity",children:(0,b.jsx)("input",{className:"components-text-control__input",type:"number",value:o,onKeyDown:this.handleKeyDown,onChange:this.onQuantityChange,ref:e=>{this.quantityInput=e}})}),(0,b.jsx)("span",{children:(0,l.__)("in stock","woocommerce")})]}):(0,b.jsx)("span",{className:(0,a.A)("woocommerce-stock-activity-card__stock-quantity",{"out-of-stock":e.stock_quantity<1}),children:(0,l.sprintf)((0,l.__)("%d in stock","woocommerce"),e.stock_quantity)})}render(){const{product:e}=this.props,{edited:t,editing:o}=this.state,s=(0,f.Qk)("notifyLowStockAmount",0),r=Number.isFinite(e.low_stock_amount)?e.low_stock_amount:s,n=e.stock_quantity<=r,i=e.last_order_date?(0,l.sprintf)((0,l.__)("Last ordered %s","woocommerce"),L().utc(e.last_order_date).fromNow()):null;if(!n&&!t)return null;const c=(0,b.jsx)(u.Link,{href:"post.php?action=edit&post="+(e.parent_id||e.id),onClick:()=>this.recordStockEvent("product_name"),type:"wp-admin",children:e.name});let m=null;"variation"===e.type&&(m=Object.values(e.attributes).map(e=>e.option).join(", "));const d=(0,h.get)(e,["images",0])||(0,h.get)(e,["image"]),p=(0,a.A)("woocommerce-stock-activity-card__image-overlay__product",{"is-placeholder":!d||!d.src}),_=(0,b.jsx)("div",{className:"woocommerce-stock-activity-card__image-overlay",children:(0,b.jsx)("div",{className:p,children:(0,b.jsx)(u.ProductImage,{product:e})})}),w=(0,a.A)("woocommerce-stock-activity-card",{"is-dimmed":!o&&!n}),g=(0,b.jsx)(x.O,{className:w,title:c,subtitle:m,icon:_,date:i,actions:this.getActions(),children:this.getBody()});return o?(0,b.jsx)("form",{onReset:this.cancelEdit,onSubmit:this.onSubmit,children:g}):g}}const T={page:1,per_page:5,status:"publish",_fields:["attributes","id","images","last_order_date","low_stock_amount","name","parent_id","stock_quantity","type"]};class R extends n.Component{constructor(e){super(e),this.updateStock=this.updateStock.bind(this)}async updateStock(e,t){const{invalidateResolution:o,invalidateActivityPanel:s,updateProductStock:r}=this.props,n=await r(e,t);return n&&(o("getItems",["products/low-in-stock",T]),o("getItemsTotalCount",["products/count-low-in-stock",g,null]),s("getActivityPanelCounts",[])),n}renderProducts(){const{products:e,createNotice:t}=this.props;return e.map(e=>(0,b.jsx)(P,{product:e,updateProductStock:this.updateStock,createNotice:t},e.id))}render(){const{lowStockProductsCount:e,isError:t,isRequesting:o,products:s}=this.props;if(t)throw new Error("Failed to load low stock products, Raise error to trigger ErrorBoundary");if(o||!s.length){const t=Math.min(5,e??1),o=Array.from(new Array(t)).map((e,t)=>(0,b.jsx)(x.p,{className:"woocommerce-stock-activity-card",hasAction:!0,lines:1},t));return(0,b.jsx)(u.Section,{children:o})}return(0,b.jsx)(u.Section,{children:this.renderProducts()})}}R.defaultProps={products:[],isError:!1,isRequesting:!1};const I=(0,s.compose)((0,r.withSelect)(e=>{const{getItems:t,getItemsError:o,isResolving:s}=e(i.itemsStore);return{products:Array.from(t("products/low-in-stock",T).values()),isError:Boolean(o("products/low-in-stock",T)),isRequesting:s("getItems",["products/low-in-stock",T])}}),(0,r.withDispatch)(e=>{const{invalidateResolution:t,updateProductStock:o}=e(i.itemsStore),{invalidateResolution:s}=e(i.activityPanelStore),{createNotice:r}=e("core/notices");return{createNotice:r,invalidateResolution:t,invalidateActivityPanel:s,updateProductStock:o}}))(R);var M=o(81739),B=o(73572),D=o(85703);const F=()=>(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("mask",{id:"mask0",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"1",y:"1",width:"14",height:"14",children:(0,b.jsx)("path",{d:"M7.99992 1.33301C4.31992 1.33301 1.33325 4.31967 1.33325 7.99967C1.33325 11.6797 4.31992 14.6663 7.99992 14.6663C11.6799 14.6663 14.6666 11.6797 14.6666 7.99967C14.6666 4.31967 11.6799 1.33301 7.99992 1.33301ZM7.99992 13.333C5.05992 13.333 2.66659 10.9397 2.66659 7.99967C2.66659 5.05967 5.05992 2.66634 7.99992 2.66634C10.9399 2.66634 13.3333 5.05967 13.3333 7.99967C13.3333 10.9397 10.9399 13.333 7.99992 13.333ZM6.66658 9.44634L11.0599 5.05301L11.9999 5.99967L6.66658 11.333L3.99992 8.66634L4.93992 7.72634L6.66658 9.44634Z",fill:"white"})}),(0,b.jsx)("g",{mask:"url(#mask0)",children:(0,b.jsx)("rect",{width:"16",height:"16",fill:"#4AB866"})})]});var O=o(4462);const q={page:1,per_page:1,status:"hold",_embed:1,_fields:["id"]},H={page:1,per_page:5,status:"hold",_embed:1};class U extends n.Component{recordReviewEvent(e,t){(0,_.recordEvent)(`reviews_${e}`,t||{})}deleteReview(e){const{deleteReview:t,createNotice:o,updateReview:s,clearReviewsCache:r}=this.props;e&&t(e).then(()=>{r(),o("success",(0,l.__)("Review successfully deleted.","woocommerce"),{actions:[{label:(0,l.__)("Undo","woocommerce"),onClick:()=>{s(e,{status:"untrash"},{_embed:1}).then(()=>r())}}]})}).catch(()=>{o("error",(0,l.__)("Review could not be deleted.","woocommerce"))})}updateReviewStatus(e,t,o){const{createNotice:s,updateReview:r,clearReviewsCache:n}=this.props;e&&r(e,{status:t}).then(()=>{n(),s("success",(0,l.__)("Review successfully updated.","woocommerce"),{actions:[{label:(0,l.__)("Undo","woocommerce"),onClick:()=>{r(e,{status:o},{_embed:1}).then(()=>n())}}]})}).catch(()=>{s("error",(0,l.__)("Review could not be updated.","woocommerce"))})}renderReview(e){const t=e&&e._embedded&&e._embedded.up&&e._embedded.up[0]||null;if(e.isUpdating)return(0,b.jsx)(x.p,{className:"woocommerce-review-activity-card",hasAction:!0,hasDate:!0,lines:1},e.id);if((0,h.isNull)(t)||e.status!==H.status)return null;const o=(0,D.A)({mixedString:(0,l.sprintf)((0,l.__)("{{authorLink}}%1$s{{/authorLink}}{{verifiedCustomerIcon/}} reviewed {{productLink}}%2$s{{/productLink}}","woocommerce"),e.reviewer,t.name),components:{productLink:(0,b.jsx)(u.Link,{href:t.permalink,onClick:()=>this.recordReviewEvent("product"),type:"external"}),authorLink:(0,b.jsx)(u.Link,{href:(0,y.getAdminLink)("admin.php?page=wc-admin&path=%2Fcustomers&search="+e.reviewer),onClick:()=>this.recordReviewEvent("customer"),type:"external"}),verifiedCustomerIcon:e.verified?(0,b.jsx)("span",{className:"woocommerce-review-activity-card__verified",children:(0,b.jsx)(p.Tooltip,{text:(0,l.__)("Verified owner","woocommerce"),children:(0,b.jsx)("span",{children:(0,b.jsx)(F,{})})})}):null}}),s=(0,b.jsx)(n.Fragment,{children:(0,b.jsx)(u.ReviewRating,{review:e,icon:B.A,outlineIcon:M.A,size:13})}),r=(0,h.get)(t,["images",0])||(0,h.get)(t,["image"]),i=(0,a.A)("woocommerce-review-activity-card__image-overlay__product",{"is-placeholder":!r||!r.src}),c=(0,b.jsx)("div",{className:"woocommerce-review-activity-card__image-overlay",children:(0,b.jsx)("div",{className:i,children:(0,b.jsx)(u.ProductImage,{product:t,width:33})})}),m={date:e.date_created_gmt,status:e.status},d=[(0,b.jsx)(p.Button,{isSecondary:!0,onClick:()=>{this.recordReviewEvent("approve",m),this.updateReviewStatus(e.id,"approved",e.status)},children:(0,l.__)("Approve","woocommerce")},"approve-action"),(0,b.jsx)(p.Button,{isTertiary:!0,onClick:()=>{this.recordReviewEvent("mark_as_spam",m),this.updateReviewStatus(e.id,"spam",e.status)},children:(0,l.__)("Mark as spam","woocommerce")},"spam-action"),(0,b.jsx)(p.Button,{isDestructive:!0,isTertiary:!0,onClick:()=>{this.recordReviewEvent("delete",m),this.deleteReview(e.id)},children:(0,l.__)("Delete","woocommerce")},"delete-action")];return(0,b.jsx)(x.O,{className:"woocommerce-review-activity-card",title:o,subtitle:s,date:e.date_created_gmt,icon:c,actions:d,children:(0,b.jsx)("span",{dangerouslySetInnerHTML:(0,O.A)(e.review)})},e.id)}renderReviews(e){const t=e.map(e=>this.renderReview(e,this.props));return 0===t.filter(Boolean).length?(0,b.jsx)(b.Fragment,{}):(0,b.jsxs)(b.Fragment,{children:[t,(0,b.jsx)(u.Link,{href:(0,y.getAdminLink)("edit.php?post_type=product&page=product-reviews"),onClick:()=>this.recordReviewEvent("reviews_manage"),className:"woocommerce-layout__activity-panel-outbound-link woocommerce-layout__activity-panel-empty",type:"wp-admin",children:(0,l.__)("Manage all reviews","woocommerce")})]})}render(){const{isRequesting:e,isError:t,reviews:o}=this.props;if(t)throw new Error("Failed to load reviews, Raise error to trigger ErrorBoundary");return(0,b.jsx)(n.Fragment,{children:(0,b.jsx)(u.Section,{children:e||!o.length?(0,b.jsx)(x.p,{className:"woocommerce-review-activity-card",hasAction:!0,hasDate:!0,lines:1}):(0,b.jsx)(b.Fragment,{children:this.renderReviews(o)})})})}}U.defaultProps={reviews:[],isError:!1,isRequesting:!1},U.contextType=k.CurrencyContext;const z=(0,s.compose)([(0,r.withSelect)((e,t)=>{const{hasUnapprovedReviews:o}=t,{getReviews:s,getReviewsError:r,isResolving:n}=e(i.reviewsStore);let c=[],a=!1,l=!1;return o&&(c=s(H),a=Boolean(r(H)),l=n("getReviews",[H])),{reviews:c,isError:a,isRequesting:l}}),(0,r.withDispatch)((e,t)=>{const{deleteReview:o,updateReview:s,invalidateResolution:r}=e(i.reviewsStore),{invalidateResolution:n}=e(i.activityPanelStore),{createNotice:c}=e("core/notices");return{deleteReview:o,createNotice:c,updateReview:s,clearReviewsCache:()=>{r("getReviews",[H]),t.reviews&&t.reviews.length<2&&r("getReviewsTotalCount",[q]),n("getActivityPanelCounts",[])}}})])(U);var V=o(76071),W=o(94824);const $={_fields:["id"]},G={status:"publish",_fields:["id"]},Q=()=>{const e=(0,r.useSelect)(e=>{const{getOrdersTotalCount:t,hasFinishedResolution:o}=e(i.ordersStore),{getProductsTotalCount:s,hasFinishedResolution:r}=e(i.productsStore),n=t($,0),c=function(e){const{getSetting:t}=e(i.settingsStore),{woocommerce_actionable_order_statuses:o=w.gV}=t("wc_admin","wcAdminSettings",{});return o}(e),a=(0,f.Qk)("reviewsEnabled","no"),l=(0,f.Qk)("manageStock","no"),m=e(i.activityPanelStore).getActivityPanelCounts(),d=m?.orders_to_fulfill_count??null,u=m?.products_low_in_stock_count??null,p=m?.reviews_to_moderate_count??null,_=s(G,0);return{loadingOrderAndProductCount:!o("getOrdersTotalCount",[$,0])||!r("getProductsTotalCount",[G,0]),lowStockProductsCount:u,unapprovedReviewsCount:p,unreadOrdersCount:d,manageStock:l,isTaskListHidden:!(0,W.Oh)("setup"),publishedProductCount:_,reviewsEnabled:a,totalOrderCount:n,orderStatuses:c}}),t=e.loadingOrderAndProductCount?[]:function({lowStockProductsCount:e,unapprovedReviewsCount:t,unreadOrdersCount:o,manageStock:s,isTaskListHidden:r,orderStatuses:n,publishedProductCount:i,reviewsEnabled:c,totalOrderCount:a}){return r?[a>0&&{className:"woocommerce-homescreen-card",count:o,collapsible:!0,id:"orders-panel",initialOpen:!1,panel:(0,b.jsx)(u.__experimentalErrorBoundary,{errorMessage:(0,b.jsxs)(b.Fragment,{children:[(0,l.__)("There was an error getting your orders.","woocommerce"),(0,b.jsx)("br",{}),(0,l.__)("Please try again.","woocommerce")]}),children:(0,b.jsx)(N,{unreadOrdersCount:o,orderStatuses:n})}),title:(0,l.__)("Orders","woocommerce")},a>0&&i>0&&"yes"===s&&{className:"woocommerce-homescreen-card",count:e,id:"stock-panel",initialOpen:!1,collapsible:0!==e,panel:(0,b.jsx)(u.__experimentalErrorBoundary,{errorMessage:(0,b.jsxs)(b.Fragment,{children:[(0,l.__)("There was an error getting your low stock products.","woocommerce"),(0,b.jsx)("br",{}),(0,l.__)("Please try again.","woocommerce")]}),children:(0,b.jsx)(I,{lowStockProductsCount:e})}),title:(0,l.__)("Stock","woocommerce")},i>0&&t>0&&"yes"===c&&{className:"woocommerce-homescreen-card",id:"reviews-panel",count:t,initialOpen:!1,collapsible:0!==t,panel:(0,b.jsx)(u.__experimentalErrorBoundary,{errorMessage:(0,b.jsxs)(b.Fragment,{children:[(0,l.__)("There was an error getting your reviews.","woocommerce"),(0,b.jsx)("br",{}),(0,l.__)("Please try again.","woocommerce")]}),children:(0,b.jsx)(z,{hasUnapprovedReviews:t>0})}),title:(0,l.__)("Reviews","woocommerce")}].filter(Boolean):[]}(e);if((0,n.useEffect)(()=>{if(void 0!==e.isTaskListHidden){const o=t.reduce((e,t)=>(e[(0,h.snakeCase)(t.id)]=!0,e),{task_list:e.isTaskListHidden});(0,_.recordEvent)("activity_panel_visible_panels",o)}},[e.isTaskListHidden,t]),0===t.length)return null;const o=e=>{const{opened_panel:t}=(0,V.al)(window.location.search);return e===t};return(0,b.jsx)(p.Panel,{className:"woocommerce-activity-panel",children:t.map(e=>{const{className:t,count:s,id:r,initialOpen:n,panel:i,title:c,collapsible:a}=e;return a?(0,b.jsx)(p.PanelBody,{title:[(0,b.jsx)(p.__experimentalText,{variant:"title.small",size:"20",lineHeight:"28px",children:c},c),null!==s&&(0,b.jsx)(u.Badge,{count:s},`${c}-badge`)],className:t,initialOpen:o(r)||n,collapsible:a,disabled:!a,onToggle:e=>{e&&(0,_.recordEvent)("activity_panel_open",{tab:r})},children:(0,b.jsx)(p.PanelRow,{children:i})},r):(0,b.jsx)("div",{className:"components-panel__body",children:(0,b.jsx)("h2",{className:"components-panel__body-title",children:(0,b.jsxs)(p.Button,{className:"components-panel__body-toggle","aria-expanded":!1,disabled:!0,children:[(0,b.jsx)(p.__experimentalText,{variant:"title.small",size:"20",lineHeight:"28px",children:c}),null!==s&&(0,b.jsx)(u.Badge,{count:s})]})})},r)})})},J=({children:e,shouldStick:t=!1})=>{const[o,s]=(0,n.useState)(!1),r=(0,n.useRef)(null),i=(0,n.useRef)(null),c=(0,n.useCallback)(()=>{if(!r.current)return;const{bottom:e,top:t}=r.current.getBoundingClientRect();null===i.current&&(i.current=t);const o=e<window.innerHeight;t===i.current&&s(o)},[]);return(0,n.useLayoutEffect)(()=>{if(t)return c(),window.addEventListener("resize",c),window.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),window.removeEventListener("scroll",c)}},[c,t]),(0,b.jsx)("div",{className:"woocommerce-homescreen-column",ref:r,style:{position:t&&o?"sticky":"static"},children:e})};var Z=o(62656),Y=o(11144),K=o(14650),X=o(14908),ee=o(52619);const te=(0,ee.applyFilters)("woocommerce_admin_homepage_default_stats",["revenue/total_sales","revenue/net_revenue","orders/orders_count","products/items_sold","jetpack/stats/visitors","jetpack/stats/views"]),oe=["revenue/net_revenue","products/items_sold"];var se=o(83878);const re=(0,r.withSelect)((e,{stats:t,query:o})=>(0,se.m)(e,t,o))(({stats:e,primaryData:t,secondaryData:o,primaryRequesting:s,secondaryRequesting:r,primaryError:i,secondaryError:m,query:d})=>{const{formatAmount:p,getCurrencyConfig:h}=(0,n.useContext)(k.CurrencyContext);if(i||m)return null;const w=(0,c.getPersistedQuery)(d),g=h();return(0,b.jsx)("ul",{className:(0,a.A)("woocommerce-stats-overview__stats",{"is-even":e.length%2==0}),children:e.map(e=>{if(s||r)return(0,b.jsx)(u.SummaryNumberPlaceholder,{},e.stat);const{primaryValue:n,secondaryValue:i,delta:c,reportUrl:a,reportUrlType:m}=(0,se.w)({indicator:e,primaryData:t,secondaryData:o,currency:g,formatAmount:p,persistedQuery:w});return(0,b.jsx)(u.SummaryNumber,{isHomescreen:!0,href:a,hrefType:m,label:e.label,value:n,prevLabel:(0,l.__)("Previous period:","woocommerce"),prevValue:i,delta:c,onLinkClickCallback:()=>{(0,_.recordEvent)("statsoverview_indicators_click",{key:e.stat})}},e.stat)})})}),ne=e=>({unavailable:(0,l.__)("Get Jetpack","woocommerce"),installed:(0,l.__)("Activate Jetpack","woocommerce"),activated:(0,l.__)("Connect Jetpack","woocommerce")}[e]||""),ie=({onClickInstall:e,onClickDismiss:t,isBusy:o,jetpackInstallState:s})=>(0,b.jsxs)("article",{className:"woocommerce-stats-overview__install-jetpack-promo",children:[(0,b.jsxs)("div",{className:"woocommerce-stats-overview__install-jetpack-promo__content",children:[(0,b.jsx)(u.H,{children:(0,l.__)("Get traffic stats with Jetpack","woocommerce")}),(0,b.jsx)("p",{children:(0,l.__)("Keep an eye on your views and visitors metrics with Jetpack. Requires Jetpack plugin and a WordPress.com account.","woocommerce")})]}),(0,b.jsxs)("footer",{children:[(0,b.jsx)(p.Button,{isSecondary:!0,onClick:()=>{(0,_.recordEvent)("statsoverview_install_jetpack"),e()},disabled:o,isBusy:o,children:ne(s)}),(0,b.jsx)(p.Button,{isTertiary:!0,onClick:()=>{(0,_.recordEvent)("statsoverview_dismiss_install_jetpack"),t()},disabled:o,isBusy:o,children:(0,l.__)("No thanks","woocommerce")})]})]}),ce=()=>{const{currentUserCan:e}=(0,i.useUser)(),{updateUserPreferences:t,...o}=(0,i.useUserPreferences)(),{canUserInstallPlugins:s,jetpackInstallState:n,isBusy:c}=(0,r.useSelect)(t=>{const{getPluginInstallState:o,isPluginsRequesting:s}=t(i.pluginsStore),r=o("jetpack");return{isBusy:s("getJetpackConnectUrl")||s("installPlugins")||s("activatePlugins"),jetpackInstallState:r,canUserInstallPlugins:e("install_plugins")}}),{installJetpackAndConnect:a}=(0,r.useDispatch)(i.pluginsStore),{createErrorNotice:l}=(0,r.useDispatch)("core/notices");return s?(0,b.jsx)(ie,{jetpackInstallState:n,isBusy:c,onClickInstall:()=>{a(l,y.getAdminLink)},onClickDismiss:()=>{const e=o.homepage_stats||{};e.installJetpackDismissed=!0,t({homepage_stats:e})}}):null},{performanceIndicators:ae=[]}=(0,f.Qk)("dataEndpoints",{performanceIndicators:[]}),le=ae.filter(e=>te.includes(e.stat)),me=()=>(0,b.jsx)(X.Text,{variant:"title.small",size:"20",lineHeight:"28px",children:(0,l.__)("Stats overview","woocommerce")}),de=()=>{const{updateUserPreferences:e,...t}=(0,i.useUserPreferences)(),o=(0,h.get)(t,["homepage_stats","hiddenStats"],oe),s=(0,r.useSelect)(e=>{const t=e(i.pluginsStore);return t.isJetpackConnected()&&"activated"===t.getPluginInstallState("jetpack")},[]),a=(t.homepage_stats||{}).installJetpackDismissed,m=le.filter(e=>!o.includes(e.stat));return(0,b.jsxs)(p.Card,{size:"large",className:"woocommerce-stats-overview woocommerce-homescreen-card",children:[(0,b.jsxs)(p.CardHeader,{size:"medium",children:[(0,b.jsx)(me,{}),(0,b.jsx)(p.DropdownMenu,{icon:Y.A,label:(0,l.__)("Choose which values to display","woocommerce"),popoverProps:{placement:"bottom-end"},toggleProps:{className:"woocommerce-ellipsis-menu__toggle"},children:()=>(0,b.jsx)(p.MenuGroup,{label:(0,l.__)("Display stats","woocommerce"),children:le.map(t=>{const s=!o.includes(t.stat);return(0,b.jsx)(p.MenuItem,{className:"woocommerce-stats-overview__dropdown-item",icon:K.A,iconPosition:"left",isSelected:s,onClick:()=>(t=>{const s=(0,h.xor)(o,[t]);e({homepage_stats:{hiddenStats:s}}),(0,_.recordEvent)("statsoverview_indicators_toggle",{indicator_name:t,status:s.includes(t)?"off":"on"})})(t.stat),role:"menuitemcheckbox",children:t.label},t.stat)})})})]}),(0,b.jsx)(p.TabPanel,{className:"woocommerce-stats-overview__tabs",onSelect:e=>{(0,_.recordEvent)("statsoverview_date_picker_update",{period:e})},tabs:[{title:(0,l.__)("Today","woocommerce"),name:"today"},{title:(0,l.__)("Week to date","woocommerce"),name:"week"},{title:(0,l.__)("Month to date","woocommerce"),name:"month"}],children:e=>(0,b.jsxs)(n.Fragment,{children:[!s&&!a&&(0,b.jsx)(ce,{}),(0,b.jsx)(re,{query:{period:e.name,compare:"previous_period"},stats:m})]})}),(0,b.jsx)(p.CardFooter,{children:(0,b.jsx)(u.Link,{className:"woocommerce-stats-overview__more-btn",href:(0,c.getNewPath)({},"/analytics/overview"),type:"wc-admin",onClick:()=>{(0,_.recordEvent)("statsoverview_indicators_click",{key:"view_detailed_stats"})},children:(0,l.__)("View detailed stats","woocommerce")})})]})};var ue=o(33816),pe=o(74175),_e=o(64382),he=o(5573),we=(0,b.jsx)(he.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,b.jsx)(he.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),ge=(0,b.jsx)(he.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,b.jsx)(he.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),ve=o(54200),ye=o(86083),ke=o(28402);const xe=({title:e,children:t})=>(0,b.jsxs)("div",{className:"woocommerce-quick-links__category",children:[(0,b.jsx)("h3",{className:"woocommerce-quick-links__category-header",children:e}),t]});var fe=o(93450),je=o(43907);const be=({icon:e,title:t,href:o,linkType:s,onClick:r})=>{const n="external"===s;return(0,b.jsx)("div",{className:"woocommerce-quick-links__item",children:(0,b.jsxs)(u.Link,{onClick:r,href:o,type:s,target:n?"_blank":null,className:"woocommerce-quick-links__item-link",children:[(0,b.jsx)(fe.A,{className:"woocommerce-quick-links__item-link__icon",icon:e}),(0,b.jsx)(X.Text,{className:"woocommerce-quick-links__item-link__text",as:"div",variant:"button",weight:"600",size:"14",lineHeight:"20px",children:t}),n&&(0,b.jsx)(fe.A,{icon:je.A})]})})};function Se({path:e,tab:t=null,type:o,href:s=null}){return{"wc-admin":{href:`admin.php?page=wc-admin&path=%2F${e}`,linkType:"wc-admin"},"wp-admin":{href:e,linkType:"wp-admin"},"wc-settings":{href:`admin.php?page=wc-settings&tab=${t}`,linkType:"wp-admin"}}[o]||{href:s,linkType:"external"}}const Ce=()=>{const e=(0,f.Qk)("shopUrl"),t=(0,ee.applyFilters)("woocommerce_admin_homescreen_quicklinks",[]).reduce((e,{icon:t,href:o,title:s})=>(new URL(o,window.location.href).origin===window.location.origin&&e.push({icon:t,link:{href:o,linkType:"wp-admin"},title:s,listItemTag:"quick-links-extension-link"}),e),[]),o=function(e){return[{title:(0,l.__)("Marketing & Merchandising","woocommerce"),items:[{title:(0,l.__)("Marketing","woocommerce"),link:Se({type:"wc-admin",path:"marketing"}),icon:ue.A,listItemTag:"marketing"},{title:(0,l.__)("Add products","woocommerce"),link:Se({type:"wp-admin",path:"post-new.php?post_type=product"}),icon:pe.A,listItemTag:"add-products"},{title:(0,l.__)("Personalize my store","woocommerce"),link:Se({type:"wp-admin",path:"customize.php"}),icon:_e.A,listItemTag:"personalize-store"},{title:(0,l.__)("View my store","woocommerce"),link:Se({type:"external",href:e}),icon:we,listItemTag:"view-store"}]},{title:(0,l.__)("Settings","woocommerce"),items:[{title:(0,l.__)("Store details","woocommerce"),link:Se({type:"wc-settings",tab:"general"}),icon:ge,listItemTag:"edit-store-details"},{title:(0,l.__)("Payments","woocommerce"),link:Se({type:"wc-settings",tab:"checkout"}),icon:ve.A,listItemTag:"payment-settings"},{title:(0,l.__)("Tax","woocommerce"),link:Se({type:"wc-settings",tab:"tax"}),icon:ye.A,listItemTag:"tax-settings"},{title:(0,l.__)("Shipping","woocommerce"),link:Se({type:"wc-settings",tab:"shipping"}),icon:ke.A,listItemTag:"shipping-settings"}]}]}(e),s={title:(0,l.__)("Extensions","woocommerce"),items:t},r=t.length?[...o,s]:o;return(0,b.jsxs)(p.Card,{size:"medium",children:[(0,b.jsx)(p.CardHeader,{size:"medium",children:(0,b.jsx)(X.Text,{variant:"title.small",size:"20",lineHeight:"28px",children:(0,l.__)("Store management","woocommerce")})}),(0,b.jsx)(p.CardBody,{size:"custom",className:"woocommerce-store-management-links__card-body",children:r.map(e=>(0,b.jsx)(xe,{title:e.title,children:e.items.map(({icon:e,listItemTag:t,title:o,link:{href:s,linkType:r}})=>(0,b.jsx)(be,{icon:e,title:o,linkType:r,href:s,onClick:()=>{(0,_.recordEvent)("home_quick_links_click",{task_name:t})}},`${o}_${t}_${s}`))},e.title))})]})};var Ne=o(60074),Ae=o(17135),Ee=o(92279),Le=o(73580);const Pe=o.p+"9a6ad9a6f33d5f8cefde.png",Te=({body:e,onDismiss:t})=>(0,b.jsxs)("div",{className:"mobile-app-modal-layout",children:[(0,b.jsx)("div",{className:"mobile-app-modal-content",children:e}),(0,b.jsx)("div",{className:"mobile-app-modal-illustration",children:(0,b.jsx)("img",{src:Pe,alt:(0,l.__)("Screen captures of the WooCommerce mobile app","woocommerce")})}),(0,b.jsx)(p.Button,{variant:"tertiary",className:"woocommerce__mobile-app-welcome-modal__close-button",label:(0,l.__)("Close","woocommerce"),icon:(0,b.jsx)(p.Icon,{icon:Le.A,viewBox:"6 4 12 14"}),iconSize:16,onClick:t})]}),Re="full-connection";var Ie=o(1455),Me=o.n(Ie);const Be="fetching",De="success",Fe="error",Oe=({onClickHandler:e,isFetching:t})=>(0,b.jsxs)(p.Button,{className:"send-magic-link-button",onClick:e,children:[t&&(0,b.jsx)(u.Spinner,{className:"send-magic-link-spinner"}),(0,b.jsx)("div",{style:{visibility:t?"hidden":"visible"},className:"send-magic-link-button-contents",children:(0,b.jsx)("div",{className:"send-magic-link-button-text",children:(0,l.__)("✨️ Send the sign-in link","woocommerce")})})]});o(64409);var qe=o(81497);o(63515),o(52427);var He=o(60050);const Ue=({apUuid:e,deviceInfo:t})=>{const o=(0,He.Dh)(t),[s,r]=(0,n.useState)(!1),{revoke:c,isRevoking:a,isRevoked:m,errorMessage:d}=(()=>{const[e,t]=(0,n.useState)(!1),[o,s]=(0,n.useState)(!1),[r,c]=(0,n.useState)(null),a=(0,n.useRef)(!0);return(0,n.useEffect)(()=>(a.current=!0,()=>{a.current=!1}),[]),{revoke:(0,n.useCallback)(async e=>{if(e){t(!0),c(null);try{if(await Me()({path:`${i.WC_ADMIN_NAMESPACE}/mobile-app/qr-login-revoke`,method:"DELETE",data:{uuid:e}}),!a.current)return;s(!0)}catch(e){if(!a.current)return;const t=e,o=t.data?.status;if("rate_limit_exceeded"===t.code||"invalid_json"===t.code||429===o)return void c((0,l.__)("You're sending requests too quickly. Please wait a moment and try again.","woocommerce"));c(t.message||(0,l.__)("Failed to revoke access. Please try again or remove the application password manually under Users → Profile.","woocommerce"))}finally{a.current&&t(!1)}}},[]),isRevoking:e,isRevoked:o,errorMessage:r}})(),u=()=>{a||r(!1)};return m?(0,b.jsxs)("div",{className:"qr-login-success-step qr-login-success-step--revoked",role:"status","aria-live":"polite",children:[(0,b.jsx)("h2",{className:"qr-login-success-step__heading",children:(0,l.__)("Access revoked","woocommerce")}),(0,b.jsx)("p",{className:"qr-login-success-step__description",children:(0,l.__)("The mobile app will be signed out the next time it makes a request.","woocommerce")})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"qr-login-success-step",role:"status","aria-live":"polite",children:[o&&(0,b.jsx)("p",{className:"qr-login-success-step__device-details",children:o}),(0,b.jsxs)("div",{className:"qr-login-success-step__revoke-row",children:[(0,b.jsx)("p",{className:"qr-login-success-step__challenge",children:(0,l.__)("It wasn't you?","woocommerce")}),(0,b.jsx)(p.Button,{variant:"primary",className:"qr-login-success-step__revoke-button",onClick:()=>{(0,_.recordEvent)("mobile_app_qr_direct_login_revoke_intent"),r(!0)},disabled:!e,children:(0,l.__)("Revoke access","woocommerce")})]}),d&&(0,b.jsx)("p",{className:"qr-login-success-step__error",role:"alert",children:d})]}),s&&(0,b.jsxs)(p.Modal,{title:(0,l.__)("Revoke access?","woocommerce"),onRequestClose:u,className:"qr-login-success-step__confirm-modal",shouldCloseOnEsc:!a,shouldCloseOnClickOutside:!a,children:[(0,b.jsx)("p",{children:(0,l.__)("The mobile app will be signed out the next time it tries to reach your store. You can sign in again any time by scanning a new QR code.","woocommerce")}),(0,b.jsxs)("div",{className:"qr-login-success-step__confirm-actions",children:[(0,b.jsx)(p.Button,{variant:"tertiary",onClick:u,disabled:a,children:(0,l.__)("Cancel","woocommerce")}),(0,b.jsx)(p.Button,{variant:"primary",onClick:async()=>{e&&((0,_.recordEvent)("mobile_app_qr_direct_login_revoke_attempt"),await c(e))},isBusy:a,disabled:a,className:"qr-login-success-step__confirm-revoke-button",children:(0,l.__)("Revoke access","woocommerce")})]})]})]})},ze=({returnToSendLinkPage:e})=>(0,b.jsxs)("div",{className:"email-sent-modal-body",children:[(0,b.jsx)("div",{className:"email-sent-illustration"}),(0,b.jsx)("div",{className:"email-sent-title",children:(0,b.jsx)("h1",{children:(0,l.__)("Check your email!","woocommerce")})}),(0,b.jsx)("div",{className:"email-sent-subheader-spacer",children:(0,b.jsx)("div",{className:"email-sent-subheader",children:(0,l.__)("We just sent you the magic link. Open it on your mobile device and follow the instructions.","woocommerce")})}),(0,b.jsxs)("div",{className:"email-sent-footer",children:[(0,b.jsx)("div",{className:"email-sent-footer-prompt",children:(0,l.__)("DIDN’T GET IT?","woocommerce")}),(0,b.jsx)("div",{className:"email-sent-footer-text",children:(0,D.A)({mixedString:(0,l.__)("Check your spam/junk email folder or {{ sendAnotherLink /}}.","woocommerce"),components:{sendAnotherLink:(0,b.jsx)(p.Button,{className:"email-sent-send-another-link",onClick:()=>{e()},children:(0,l.__)("send another link","woocommerce")})}})})]})]}),Ve=({children:e})=>(0,b.jsxs)("div",{className:"jetpack-installation-content",children:[(0,b.jsxs)("div",{className:"modal-layout-header",children:[(0,b.jsx)("div",{className:"woo-icon"}),(0,b.jsx)("div",{className:"modal-header",children:(0,b.jsx)("h1",{children:(0,l.__)("Manage orders and track sales in real-time with the free mobile app","woocommerce")})})]}),(0,b.jsx)("div",{className:"modal-layout-body",children:e}),(0,b.jsxs)("div",{className:"modal-layout-footer",children:[(0,b.jsxs)("div",{className:"mobile-footer-icons",children:[(0,b.jsx)("div",{className:"apple-icon"}),(0,b.jsx)("div",{className:"android-icon"})]}),(0,b.jsx)("div",{className:"mobile-footer-blurb",children:(0,l.__)("The WooCommerce Mobile App is available on iOS and Android","woocommerce")})]})]});var We=o(23203);const $e=()=>(0,b.jsx)("div",{children:(0,b.jsx)(We.hp,{value:"https://woocommerce.com/mobile/?utm_source=wc_onboarding_mobile_task",size:140})}),Ge=({step:e,isJetpackPluginInstalled:t,wordpressAccountEmailAddress:o,signInResult:s,completeInstallationStepHandler:r,sendMagicLinkHandler:i,sendMagicLinkStatus:c,onSignedIn:a})=>{const[m,d]=(0,n.useState)(void 0);return(0,n.useEffect)(()=>{if("first"===e)d([{key:"first",label:(0,l.__)("Install the mobile app","woocommerce"),description:(0,l.__)("Scan the code below to download or upgrade the app, or visit woo.com/mobile from your mobile device.","woocommerce"),content:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)($e,{}),(0,b.jsx)(p.Button,{variant:"primary",className:"install-app-button",onClick:()=>{r()},children:(0,l.__)("App is installed","woocommerce")})]})},{key:"second",label:(0,l.__)("Sign into the app","woocommerce"),description:"",content:(0,b.jsx)(b.Fragment,{})},{key:"third",label:(0,l.__)("Signed in","woocommerce"),description:"",content:(0,b.jsx)(b.Fragment,{})}]);else if("second"===e){const e=t&&void 0!==o;d([{key:"first",label:(0,l.__)("App installed","woocommerce"),description:"",content:(0,b.jsx)(b.Fragment,{})},{key:"second",label:(0,l.__)("Sign into the app","woocommerce"),description:(0,l.__)("Scan the QR code below with your phone to sign in instantly — no password needed.","woocommerce"),content:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(qe.j,{onConsumed:a,suppressInlinePanels:!0}),e&&(0,b.jsxs)("div",{className:"mobile-app-login-magic-link-secondary",children:[(0,b.jsx)("p",{className:"mobile-app-login-magic-link-secondary__label",children:(0,l.__)("Or get a WordPress.com sign-in link by email:","woocommerce")}),(0,b.jsx)(Oe,{onClickHandler:i,isFetching:c===Be})]}),(0,b.jsx)("div",{className:"mobile-app-login-faq",children:(0,D.A)({mixedString:(0,l.__)("Any troubles signing in? Check out the {{link}}FAQ{{/link}}.","woocommerce"),components:{link:(0,b.jsx)(u.Link,{href:"https://woocommerce.com/document/android-ios-apps-login-help-faq/",target:"_blank",type:"external",onClick:()=>{(0,_.recordEvent)("onboarding_app_login_faq_click")}})}})})]})},{key:"third",label:(0,l.__)("Signed in","woocommerce"),description:"",content:(0,b.jsx)(b.Fragment,{})}])}else"third"===e&&d([{key:"first",label:(0,l.__)("App installed","woocommerce"),description:"",content:(0,b.jsx)(b.Fragment,{})},{key:"second",label:(0,l.__)("Sign-in complete","woocommerce"),description:"",content:(0,b.jsx)(b.Fragment,{})},{key:"third",label:(0,l.__)("Signed in successfully","woocommerce"),description:"",content:(0,b.jsx)(Ue,{apUuid:s?.apUuid??null,deviceInfo:s?.deviceInfo??null})}])},[e,t,o,s,r,i,c,a]),(0,b.jsx)("div",{className:"login-stepper-wrapper",children:m&&(0,b.jsx)(u.Stepper,{isVertical:!0,currentStep:e,steps:m})})},Qe=({appInstalledClicked:e,isJetpackPluginInstalled:t,wordpressAccountEmailAddress:o,completeInstallationHandler:s,sendMagicLinkHandler:r,sendMagicLinkStatus:i})=>{const[c,a]=(0,n.useState)(null),m=(0,n.useCallback)(e=>{a(t=>t??e)},[]);let d;return d=c?"third":e?"second":"first",(0,b.jsxs)(Ve,{children:[(0,b.jsx)("div",{className:"modal-subheader",children:(0,b.jsx)("h3",{children:(0,l.__)("Run your store from anywhere with the Woo mobile app.","woocommerce")})}),(0,b.jsx)(Ge,{step:d,isJetpackPluginInstalled:t,wordpressAccountEmailAddress:o,signInResult:c,completeInstallationStepHandler:s,sendMagicLinkHandler:r,sendMagicLinkStatus:i,onSignedIn:m})]})};var Je=o(95899);const Ze=()=>{const[e,t]=(0,n.useState)(!1),[o,s]=(0,n.useState)(!1),{state:a,jetpackConnectionData:m}=(()=>{const{currentUserCan:e}=(0,i.useUser)(),{canUserInstallPlugins:t,jetpackInstallState:o,jetpackConnectionData:s}=(0,r.useSelect)(t=>{const{getPluginInstallState:o,getJetpackConnectionData:s}=t(i.pluginsStore),r=o("jetpack");return{jetpackConnectionData:s(),jetpackInstallState:r,canUserInstallPlugins:e("install_plugins")}},[e]),{installJetpackAndConnect:c}=(0,r.useDispatch)(i.pluginsStore),{createErrorNotice:a}=(0,r.useDispatch)("core/notices"),[l,m]=(0,n.useState)("initializing"),d=(0,n.useCallback)(()=>{const e=window.location.href;c(a,()=>e+"&jetpackState=returning"),m("installing")},[c,a]);return(0,n.useEffect)(()=>{if(t)switch(o){case"installed":m("not-activated");break;case"unavailable":m("not-installed");break;case"activated":s&&!s?.connectionOwner?m("userless-connection"):s&&!s?.currentUser?.isMaster?m("not-owner-of-connection"):s&&s?.currentUser?.isConnected&&s?.currentUser?.isMaster&&m(Re)}else m("user-cannot-install")},[t,o,s]),{state:l,installHandler:d,jetpackConnectionData:s}})(),{updateOptions:d}=(0,r.useDispatch)(i.optionsStore),[u,h]=(0,n.useState)(),[w]=(0,Ae.ok)(),{invalidateResolutionForStoreSelector:g}=(0,r.useDispatch)(i.onboardingStore);(0,n.useEffect)(()=>{w.get("mobileAppModal")?t(!0):t(!1),"returning"===w.get("jetpackState")&&s(!0)},[w]);const[v,y]=(0,n.useState)(!1),[k,x]=(0,n.useState)(!1),[f,j]=(0,n.useState)(!1),{requestState:S,fetchMagicLinkApiCall:C}=(()=>{const[e,t]=(0,n.useState)("initializing"),{createNotice:o}=(0,r.useDispatch)("core/notices");return{requestState:e,fetchMagicLinkApiCall:(0,n.useCallback)(()=>{t(Be),Me()({path:`${i.WC_ADMIN_NAMESPACE}/mobile-app/send-magic-link`}).then(e=>{"success"===e.code?t(De):(t(Fe),o("error",(0,l.__)("Sorry, an unknown error occurred.","woocommerce")))}).catch(e=>{t(Fe),(0,_.recordEvent)("magic_prompt_send_magic_link_error",{error:e.message,code:e.code}),console.error("Send magic link failed:",e);const s=(0,l.__)("We couldn’t send the link. Try again in a few seconds.","woocommerce");if("error_sending_mobile_magic_link"===e.code){const t=e.message?` (${e.message})`:"";o("error",`${s}${t}`)}else"invalid_user_permission_view_admin"===e.code?o("error",(0,l.__)("Sorry, your account doesn’t have sufficient permission.","woocommerce")):"jetpack_not_connected"===e.code?o("error",e.message):o("error",s)})},[o])}})(),N=(0,n.useCallback)(()=>{y(!0),(0,_.recordEvent)("onboarding_app_install_click")},[]),A=(0,n.useCallback)(()=>{C(),(0,_.recordEvent)("magic_prompt_send_signin_link_click")},[C]);(0,n.useEffect)(()=>{S===De&&x(!0)},[S]),(0,n.useEffect)(()=>{if(k)h((0,b.jsx)(ze,{returnToSendLinkPage:()=>{x(!1),j(!0),(0,_.recordEvent)("magic_prompt_retry_send_signin_link")}}));else{const e=(a===Re&&void 0!==m?.currentUser?.wpcomUser?.email)??!1,t=m?.currentUser?.wpcomUser?.email;h((0,b.jsx)(Qe,{appInstalledClicked:v,isJetpackPluginInstalled:e,wordpressAccountEmailAddress:t,completeInstallationHandler:N,sendMagicLinkHandler:A,sendMagicLinkStatus:S}))}},[v,A,k,o,m?.currentUser?.wpcomUser?.email,a,f,S,N]);const E=(0,n.useCallback)(()=>{(0,c.updateQueryString)({jetpackState:void 0,mobileAppModal:void 0},void 0,Object.fromEntries(w.entries()))},[w]),L=()=>{d({woocommerce_admin_dismissed_mobile_app_modal:"yes"}).then(()=>g("getTaskLists")),E(),t(!1)};return(0,b.jsx)(b.Fragment,{children:e&&(0,b.jsx)(p.Guide,{onFinish:L,contentLabel:"",className:"woocommerce__mobile-app-welcome-modal",pages:[{content:(0,b.jsx)(Te,{body:u,onDismiss:L})}]})})},Ye="wc/admin/mobile-app-help-entry-callback";(0,Ee.registerPlugin)("woocommerce-mobile-app-modal",{render:()=>{const e=(0,n.useCallback)(e=>[...e,{title:(0,l.__)("Get the WooCommerce app","woocommerce"),link:(0,y.getAdminLink)("./admin.php?page=wc-admin&mobileAppModal=true"),linkType:"wc-admin"}],[]);return(0,n.useEffect)(()=>{(0,ee.removeFilter)(Je.SETUP_TASK_HELP_ITEMS_FILTER,Ye),(0,ee.addFilter)(Je.SETUP_TASK_HELP_ITEMS_FILTER,Ye,e,10)},[e]),null},scope:"woocommerce-admin"});const Ke=o.p+"205ccd8b65027df184d2.png",Xe=({type:e})=>{const[t,o]=(0,n.useState)(!1),[s]=(0,Ae.ok)();let r=(0,l.__)("Your store emails have had an upgrade!","woocommerce"),i=(0,l.__)("We’ve made some exciting improvements to your email templates, including modern, shopper-friendly designs and new customization options. Head to your email settings to explore the new changes.","woocommerce");"try"===e&&(r=(0,l.__)("Store emails have had an upgrade!","woocommerce"),i=(0,l.__)("We’ve made some exciting improvements to our email templates, including modern, shopper-friendly designs and new customization options. Head to your email settings to explore the new features.","woocommerce")),(0,n.useEffect)(()=>{s.get("emailImprovementsModal")?o(!0):o(!1)},[s]);const a=()=>{(0,c.updateQueryString)({emailImprovementsModal:void 0},void 0,Object.fromEntries(s.entries())),o(!1)};return(0,b.jsx)(b.Fragment,{children:t&&(0,b.jsx)(p.Guide,{onFinish:a,contentLabel:"",className:"woocommerce__email-improvements-modal",pages:[{content:(0,b.jsxs)("div",{className:"email-improvements-modal-layout",children:[(0,b.jsxs)("div",{className:"email-improvements-modal-content",children:[(0,b.jsx)("div",{className:"email-improvements-modal-content-image",children:(0,b.jsx)("img",{src:Ke,alt:"",width:250,height:240})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{children:r}),(0,b.jsx)("p",{children:i})]}),(0,b.jsxs)("div",{className:"email-improvements-modal-footer",children:[(0,b.jsx)(p.Button,{variant:"tertiary",href:"https://developer.woocommerce.com/2025/04/09/woocommerce-9-8-modernized-designs-and-email-previews/",target:"_blank",children:(0,l.__)("Learn more","woocommerce")}),"try"===e?(0,b.jsx)(p.Button,{variant:"primary",href:"?page=wc-settings&tab=email&try-new-templates",children:(0,l.__)("Try the new templates","woocommerce")}):(0,b.jsx)(p.Button,{variant:"primary",href:"?page=wc-settings&tab=email",children:(0,l.__)("Customize your emails","woocommerce")})]})]}),(0,b.jsx)(p.Button,{variant:"tertiary",className:"email-improvements-modal-close-button",label:(0,l.__)("Close","woocommerce"),icon:(0,b.jsx)(p.Icon,{icon:Le.A,viewBox:"6 4 12 14"}),iconSize:24,onClick:a})]})}]})})},et="woocommerce_homescreen_experimental_header_banner_item",tt=({children:e,order:t=1})=>(0,b.jsx)(p.Fill,{name:et,children:o=>(0,u.createOrderedChildren)(e,t,o)});tt.Slot=({fillProps:e})=>(0,b.jsx)(p.Slot,{name:et,fillProps:e,children:u.sortFillsByOrder});const ot=({className:e})=>{const t=(0,X.useSlot)(et);return Boolean(t?.fills?.length)?(0,b.jsx)("div",{className:(0,a.A)("woocommerce-homescreen__header",e),children:(0,b.jsx)(tt.Slot,{})}):null},st="experimental_woocommerce_wcpay_feature",rt=({children:e,order:t=1})=>(0,b.jsx)(p.Fill,{name:st,children:o=>(0,u.createOrderedChildren)(e,t,o)});rt.Slot=({fillProps:e})=>(0,b.jsx)(p.Slot,{name:st,fillProps:e,children:u.sortFillsByOrder});const nt=({className:e})=>{const t=(0,X.useSlot)(st);return Boolean(t?.fills?.length)?(0,b.jsx)("div",{className:(0,a.A)("woocommerce-homescreen__header",e),children:(0,b.jsx)(rt.Slot,{})}):null};var it=o(77794);const ct=(0,n.lazy)(()=>Promise.resolve().then(o.bind(o,60074)).then(e=>({default:e.TaskLists}))),at=(0,s.compose)((0,r.withSelect)(e=>{const{isNotesRequesting:t}=e(i.notesStore),{getOption:o}=e(i.optionsStore),s=o("woocommerce_default_homepage_layout")||"single_column",{getTaskLists:r,hasFinishedResolution:n}=e(i.onboardingStore),c=(0,f.Qk)("visibleTaskListIds",[]).length>0;let a=!1,l=[];return c&&(a=!n("getTaskLists"),l=r()),{defaultHomescreenLayout:s,isBatchUpdating:t("batchUpdateNotes"),isLoadingTaskLists:a,hasTaskList:c,showingProgressHeader:!!l.find(e=>e.isVisible&&e.displayProgressHeader)}}))(({defaultHomescreenLayout:e,query:t,hasTaskList:o,showingProgressHeader:s,isLoadingTaskLists:c})=>{const u=(0,i.useUserPreferences)(),{createInfoNotice:p}=(0,r.dispatch)("core/notices"),{setupTaskListActive:_,setupTaskListHidden:h}=(0,W.fK)({setupTasklist:!0,extendedTaskList:!1}),w=!(Object.keys(t).length>0&&t.task),g=(0,it.B)(u.homepage_layout,e,_),v=(0,n.useRef)(!0),y=(0,n.useCallback)(()=>{v.current=window.innerWidth>=782},[]);(0,n.useLayoutEffect)(()=>(y(),window.addEventListener("resize",y),()=>{window.removeEventListener("resize",y)}),[y]),(0,n.useEffect)(()=>{"test_account_created"===t?.nox&&p((0,l.__)("Your WooPayments test account was successfully created.","woocommerce"),{type:"info",duration:5e3})},[t?.nox,p]);const k=v.current&&g,x=t.mobileAppModal??!1,f=t.emailImprovementsModal??!1,S="enabled"===f?"enabled":"try",C=()=>(0,b.jsxs)(n.Suspense,{fallback:(0,b.jsx)(Ne.TasksPlaceholder,{query:t}),children:[!h&&w&&(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(Ne.ProgressTitle,{taskListId:"setup"})}),(0,b.jsx)(ct,{query:t})]});return(0,b.jsxs)(b.Fragment,{children:[w&&(0,b.jsx)(ot,{className:(0,a.A)("woocommerce-homescreen",{"woocommerce-homescreen-column":!g})}),(0,b.jsxs)("div",{className:(0,a.A)("woocommerce-homescreen",{"two-columns":g}),children:[w?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(J,{shouldStick:k,children:[!c&&!s&&(0,b.jsx)(m.A,{className:"your-store-today",title:(0,l.__)("Your store today","woocommerce"),subtitle:(0,l.__)("To-dos, tips, and insights for your business","woocommerce")}),!_&&(0,b.jsx)(nt,{}),!(0,W.Oh)("setup")&&(0,b.jsx)(Q,{}),o&&C(),(0,b.jsx)(d.A,{format:"promo-card"}),(0,b.jsx)(Z.A,{})]}),(0,b.jsxs)(J,{shouldStick:k,children:[(0,j.G7)("analytics")&&(0,b.jsx)(de,{}),!_&&(0,b.jsx)(Ce,{})]})]}):C(),x&&(0,b.jsx)(Ze,{}),f&&(0,b.jsx)(Xe,{type:S})]})]})}),lt=(0,f.Qk)("onboarding",{}),mt=(0,s.compose)((0,i.withOnboardingHydration)({profileItems:lt.profile}),(0,r.withSelect)(e=>{const{getProfileItems:t,hasFinishedResolution:o}=e(i.onboardingStore);return{profileItems:t(),hasFinishedResolution:o("getProfileItems",[])}}))(({profileItems:{completed:e,skipped:t}={},hasFinishedResolution:o})=>{(0,n.useEffect)(()=>{!o||e||t||(0,c.getHistory)().push((0,c.getNewPath)({},"/setup-wizard",{}))},[o,e,t]);const s=(0,c.useQuery)();return(0,b.jsx)(at,{query:s})})},77794:(e,t,o)=>{"use strict";o.d(t,{B:()=>r});var s=o(16253);const r=(e,t,o)=>{const r=!o||(0,s.G7)("analytics");return"two_columns"===(e||t)&&r}},62656:(e,t,o)=>{"use strict";o.d(t,{A:()=>A});var s=o(27723),r=o(86087),n=o(98846),i=o(56427),c=o(11144),a=o(55414),l=o(40314),m=o(47143),d=o(83306),u=o(89085),p=o(93151),_=o(14908),h=o(76154),w=o.n(h),g=o(40188),v=o(51508),y=o(76071),k=o(39793);const x=({onClose:e})=>{const{createNotice:t}=(0,m.useDispatch)("core/notices"),{batchUpdateNotes:o,removeAllNotes:r}=(0,m.useDispatch)(l.notesStore);return(0,k.jsx)(k.Fragment,{children:(0,k.jsx)(i.Modal,{title:(0,s.__)("Dismiss all messages","woocommerce"),className:"woocommerce-inbox-dismiss-all-modal",onRequestClose:e,children:(0,k.jsxs)("div",{className:"woocommerce-inbox-dismiss-all-modal__wrapper",children:[(0,k.jsx)("div",{className:"woocommerce-usage-modal__message",children:(0,s.__)("Are you sure? Inbox messages will be dismissed forever.","woocommerce")}),(0,k.jsxs)("div",{className:"woocommerce-usage-modal__actions",children:[(0,k.jsx)(i.Button,{onClick:e,children:(0,s.__)("Cancel","woocommerce")}),(0,k.jsx)(i.Button,{isPrimary:!0,onClick:()=>{(async()=>{(0,d.recordEvent)("wcadmin_inbox_action_dismissall",{});try{const e=await r({status:"unactioned"});t("success",(0,s.__)("All messages dismissed","woocommerce"),{actions:[{label:(0,s.__)("Undo","woocommerce"),onClick:()=>{o(e.map(e=>e.id),{is_deleted:0})}}]})}catch(o){t("error",(0,s.__)("Messages could not be dismissed","woocommerce")),e()}})(),e()},children:(0,s.__)("Yes, dismiss all","woocommerce")})]})]})})})},f={page:1,per_page:5,status:"unactioned",type:l.QUERY_DEFAULTS.noteTypes,orderby:"date",order:"desc",_fields:["id","name","title","content","type","status","actions","date_created","date_created_gmt","layout","image","is_deleted","is_read","locale"]},j=["en_US","en_AU","en_CA","en_GB","en_ZA"],b=w()("2022-01-11","YYYY-MM-DD").valueOf(),S=(e,t)=>{(0,d.recordEvent)("inbox_action_click",{note_name:e.name,note_title:e.title,note_content_inner_link:t})};let C=!1;const N=({hasNotes:e,isBatchUpdating:t,notes:o,onDismiss:r,onNoteActionClick:l,onNoteVisible:m,setShowDismissAllModal:h,showHeader:w=!0,loadMoreNotes:v,allNotesFetched:y,notesHaveResolved:x,unreadNotesCount:j})=>{if(t)return;if(!e)return(0,k.jsx)(g.O,{className:"woocommerce-empty-activity-card",title:(0,s.__)("Your inbox is empty","woocommerce"),icon:!1,children:(0,s.__)("As things begin to happen in your store your inbox will start to fill up. You’ll see things like achievements, new feature announcements, extension recommendations and more!","woocommerce")});C||((0,d.recordEvent)("inbox_panel_view",{total:o.length}),C=!0);const b=Object.keys(o).map(e=>o[e]);return(0,k.jsxs)(i.Card,{className:"woocommerce-homescreen-card woocommerce-inbox-card",size:"large",children:[w&&(0,k.jsxs)(i.CardHeader,{size:"medium",children:[(0,k.jsxs)("div",{className:"woocommerce-inbox-card__header",children:[(0,k.jsx)(_.Text,{size:"20",lineHeight:"28px",variant:"title.small",children:(0,s.__)("Inbox","woocommerce")}),(0,k.jsx)(n.Badge,{count:j})]}),(0,k.jsx)(i.DropdownMenu,{controls:[{title:(0,s.__)("Dismiss all","woocommerce"),onClick:()=>{h(!0)}}],icon:c.A,label:(0,s.__)("Inbox notes options","woocommerce"),popoverProps:{placement:"bottom-end"},toggleProps:{className:"woocommerce-ellipsis-menu__toggle"}})]}),(0,k.jsx)(u.A,{role:"menu",children:b.map(e=>{const{id:t,is_deleted:o}=e;return o?null:(0,k.jsx)(p.A,{timeout:500,classNames:"woocommerce-inbox-message",children:(0,k.jsx)(_.InboxNoteCard,{note:e,onDismiss:r,onNoteActionClick:l,onBodyLinkClick:S,onNoteVisible:m},t)},t)})}),y?null:x?(0,k.jsx)(i.CardFooter,{className:"woocommerce-inbox-card__footer",size:"medium",children:(0,k.jsx)(i.Button,{icon:a.A,iconPosition:"right",onClick:()=>{v()},variant:"tertiary",children:b.length>f.per_page?(0,s.__)("Show more","woocommerce"):(0,s.__)("Show older","woocommerce")})}):(0,k.jsx)(_.InboxNotePlaceholder,{className:"banner message-is-unread"})]})},A=({showHeader:e=!0})=>{const[t,o]=(0,r.useState)(f.per_page),[i,c]=(0,r.useState)(!1),[a,u]=(0,r.useState)([]),[p,h]=(0,r.useState)({}),{createNotice:g}=(0,m.useDispatch)("core/notices"),{removeNote:S,updateNote:C,triggerNoteAction:A,invalidateResolutionForStoreSelector:E}=(0,m.useDispatch)(l.notesStore),L=(0,y.s9)(),P=(0,r.useMemo)(()=>({...f,per_page:t}),[t]),{isError:T,notes:R,notesHaveResolved:I,isBatchUpdating:M,unreadNotesCount:B}=(0,m.useSelect)(e=>{const{getNotes:t,getNotesError:o,isNotesRequesting:s,hasFinishedResolution:r}=e(l.notesStore);return{notes:t(P),unreadNotesCount:t({...f,is_read:!1,per_page:-1}).length,isError:Boolean(o("getNotes",[P])),isBatchUpdating:s("batchUpdateNotes"),notesHaveResolved:!s("batchUpdateNotes")&&r("getNotes",[P])}});(0,r.useEffect)(()=>{I&&R.length<t&&c(!0),I&&R.length&&u(R.map(e=>{const t=w()(e.date_created_gmt,"YYYY-MM-DD").valueOf();return j.includes(e.locale)&&t>=b?{...e,content:(0,v.yz)(e.content,320)}:e}))},[R,I]);const[D,F]=(0,r.useState)(!1);if(T){const e=(0,s.__)("There was an error getting your inbox. Please try again.","woocommerce"),t=(0,s.__)("Reload","woocommerce"),o=()=>{window.location.reload()};return(0,k.jsx)(n.EmptyContent,{title:e,actionLabel:t,actionURL:null,actionCallback:o})}return I&&!a.length?null:(0,k.jsxs)(k.Fragment,{children:[D&&(0,k.jsx)(x,{onClose:()=>{F(!1)}}),(0,k.jsxs)("div",{className:"woocommerce-homepage-notes-wrapper",children:[!I&&!a.length&&(0,k.jsx)(n.Section,{children:(0,k.jsx)(_.InboxNotePlaceholder,{className:"banner message-is-unread"})}),(0,k.jsx)(n.Section,{children:Boolean(a.length)&&N({loadMoreNotes:()=>{(0,d.recordEvent)("inbox_action_load_more",{quantity_shown:a.length}),o(t+10)},hasNotes:(0,v.e8)(a),isBatchUpdating:M,notes:a,onDismiss:async e=>{(0,d.recordEvent)("inbox_action_dismiss",{note_name:e.name,note_title:e.title,note_name_dismiss_all:!1,note_name_dismiss_confirmation:!0,screen:L});const t=e.id;try{await S(t),E("getNotes"),g("success",(0,s.__)("Message dismissed","woocommerce"),{actions:[{label:(0,s.__)("Undo","woocommerce"),onClick:async()=>{await C(t,{is_deleted:0}),E("getNotes")}}]})}catch(e){g("error",(0,s._n)("Message could not be dismissed","Messages could not be dismissed",1,"woocommerce"))}},onNoteActionClick:(e,t)=>{A(e.id,t.id)},onNoteVisible:e=>{p[e.id]||e.is_read||(h({...p,[e.id]:!0}),setTimeout(()=>{C(e.id,{is_read:!0})},3e3)),(0,d.recordEvent)("inbox_note_view",{note_content:e.content,note_name:e.name,note_title:e.title,note_type:e.type,screen:L})},setShowDismissAllModal:F,showHeader:e,allNotesFetched:i,notesHaveResolved:I,unreadNotesCount:B})})]})]})}},46942:(e,t,o)=>{"use strict";o.d(t,{r:()=>i});var s=o(93832),r=o(15703),n=o(90212);const i=(e,t={})=>{const{pathname:o,search:i}=window.location,c=(0,r.getSetting)("connectNonce","");return t={"wccom-site":(0,n.Qk)("siteUrl"),"wccom-back":o+i,"wccom-woo-version":(0,r.getSetting)("wcVersion"),"wccom-connect-nonce":c,...t},(0,s.addQueryArgs)(e,t)}},4462:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var s=o(42435);const r=e=>({__html:(0,s.sanitizeHTML)(e)})},29775:(e,t,o)=>{"use strict";o.d(t,{A:()=>p});var s=o(4921),r=o(86087),n=o(19432),i=o(14650),c=o(86083),a=o(93450),l=o(73580),m=o(4462),d=o(39793);const u={info:n.A,check:i.A,percent:c.A};function p(e){const{id:t,description:o,children:n,icon:i,isDismissible:c=!0,variant:p="info",className:_,onClose:h,onLoad:w}=e,[g,v]=(0,r.useState)("true"!==localStorage.getItem(`wc-marketplaceNoticeClosed-${t}`));if((0,r.useEffect)(()=>{g&&"function"==typeof w&&w()},[g]),!g)return null;const y=(0,s.A)("woocommerce-marketplace__notice",`woocommerce-marketplace__notice--${p}`,{"is-dismissible":c},_),k=u[i||"info"],x=(0,s.A)("woocommerce-marketplace__notice-icon",`woocommerce-marketplace__notice-icon--${p}`);return(0,d.jsxs)("div",{className:y,children:[i&&(0,d.jsx)("span",{className:x,children:(0,d.jsx)(a.A,{icon:k})}),(0,d.jsxs)("div",{className:"woocommerce-marketplace__notice-content",children:[(0,d.jsx)("p",{className:"woocommerce-marketplace__notice-description",dangerouslySetInnerHTML:(0,m.A)(o)}),n&&(0,d.jsx)("div",{className:"woocommerce-marketplace__notice-children",children:n})]}),c&&(0,d.jsx)("button",{className:"woocommerce-marketplace__notice-close","aria-label":"Close",onClick:()=>{v(!1),localStorage.setItem(`wc-marketplaceNoticeClosed-${t}`,"true"),"function"==typeof h&&h()},children:(0,d.jsx)(a.A,{icon:l.A})})]})}},54143:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var s=o(39793);function r(){return(0,s.jsxs)("svg",{width:"72",height:"60",viewBox:"0 0 72 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsxs)("g",{clipPath:"url(#clip0_4074_10418)",children:[(0,s.jsx)("path",{d:"M68.5301 33.3144C68.0263 32.1006 66.3348 32.344 65.8443 31.1636C65.3538 29.9832 66.7251 28.9562 66.2213 27.7458C65.7175 26.5354 64.0259 26.7755 63.5355 25.5951C63.045 24.4147 64.4163 23.3877 63.9125 22.1773C63.4087 20.9669 61.7171 21.207 61.2267 20.0266C60.7362 18.8462 62.1075 17.8192 61.6037 16.6088C61.0999 15.395 59.4083 15.6385 58.9179 14.4581C58.4274 13.2777 59.7987 12.2507 59.2949 11.0403C58.7911 9.82652 57.0995 10.0699 56.6091 8.88955C56.1186 7.70915 57.4899 6.68214 56.9861 5.47174C56.4823 4.26134 54.7907 4.50142 54.3003 3.32102C53.8465 2.22733 55.0476 1.11696 54.8274 -0.00341797L0 22.5941C0.5038 23.8079 2.19537 23.5644 2.68582 24.7448C3.17627 25.9252 1.805 26.9522 2.3088 28.1626C2.8126 29.373 4.50417 29.133 4.99462 30.3134C5.48508 31.4937 4.11381 32.5208 4.61761 33.7312C5.12141 34.9416 6.81297 34.7015 7.30343 35.8819C7.79388 37.0623 6.42261 38.0893 6.92641 39.2997C7.43021 40.5134 9.12178 40.27 9.61223 41.4504C10.1027 42.6308 8.73142 43.6578 9.23522 44.8682C9.73902 46.0786 11.4306 45.8385 11.921 47.0189C12.4115 48.1993 11.0402 49.2263 11.544 50.4367C12.0478 51.6471 13.7394 51.4071 14.2298 52.5874C14.6836 53.6811 13.4825 54.7915 13.7027 55.9119L28.1928 49.9232L68.5368 33.3177L68.5301 33.3144Z",fill:"#720EEC"}),(0,s.jsx)("path",{d:"M13.696 55.912L28.1861 49.9234L52.3851 39.9634H7.46021C8.17086 40.4802 9.23852 40.5569 9.60886 41.4539C10.0993 42.6343 8.72805 43.6613 9.23185 44.8717C9.73565 46.0821 11.4272 45.842 11.9177 47.0224C12.4081 48.2028 11.0368 49.2298 11.5406 50.4402C12.0444 51.6506 13.736 51.4105 14.2265 52.5909C14.6802 53.6846 13.4791 54.795 13.6993 55.9154L13.696 55.912Z",fill:"#3C087E"}),(0,s.jsx)("path",{d:"M63.8523 41.9907C63.8523 37.4925 67.499 33.848 71.9998 33.848V23.988H17.873V33.848C22.3739 33.848 26.0206 37.4925 26.0206 41.9907C26.0206 46.4889 22.3739 50.1334 17.873 50.1334V59.9934H71.9998V50.1334C67.499 50.1334 63.8523 46.4889 63.8523 41.9907Z",fill:"#D1C1FF"}),(0,s.jsx)("path",{d:"M35.2527 37.676C35.2527 35.2051 37.0143 33.2878 39.6968 33.2878C42.3793 33.2878 44.1643 35.2051 44.1643 37.676C44.1643 40.1468 42.4026 42.0107 39.6968 42.0107C36.991 42.0107 35.2527 40.1201 35.2527 37.676ZM41.7954 37.676C41.7954 36.2288 40.9046 35.3385 39.6935 35.3385C38.4823 35.3385 37.6182 36.2288 37.6182 37.676C37.6182 39.1231 38.509 39.9601 39.6935 39.9601C40.8779 39.9601 41.7954 39.0664 41.7954 37.676ZM37.9852 51.0704L49.1789 33.5513H51.1774L39.9537 51.0704H37.9819H37.9852ZM44.8983 47.0524C44.8983 44.5849 46.6566 42.641 49.3391 42.641C52.0215 42.641 53.8065 44.5849 53.8065 47.0524C53.8065 49.5199 52.0182 51.3872 49.3391 51.3872C46.6599 51.3872 44.8983 49.4966 44.8983 47.0524ZM51.441 47.0524C51.441 45.6053 50.5468 44.715 49.3357 44.715C48.1246 44.715 47.2605 45.6053 47.2605 47.0524C47.2605 48.4996 48.1279 49.3365 49.3357 49.3365C50.5435 49.3365 51.441 48.4696 51.441 47.0524Z",fill:"#720EEC"})]}),(0,s.jsx)("defs",{children:(0,s.jsx)("clipPath",{id:"clip0_4074_10418",children:(0,s.jsx)("rect",{width:"72",height:"60",fill:"white"})})})]})}},63111:(e,t,o)=>{"use strict";o.d(t,{A:()=>d});var s=o(56427),r=o(27723),n=o(86087),i=o(83306),c=o(4462),a=o(54143),l=o(39793);const m={percent:a.A},d=({promotion:e,eventProperties:t={},onDismiss:o})=>{const a=window.location.pathname+window.location.search,d=()=>JSON.parse(localStorage.getItem("wc-marketplaceDismissedPromos")||"[]"),[u,p]=(0,n.useState)(!!o||!d().includes(a));if((0,n.useEffect)(()=>{u&&(0,i.recordEvent)("marketplace_promotion_viewed",{...t,path:a,format:"promo-card"})},[u]),!u)return null;const _="promo-card"+(e.style?` ${e.style}`:""),h=(0,l.jsxs)("div",{className:"promo-content",children:[(0,l.jsx)("h2",{className:"promo-title",children:e.title?.en_US}),(0,l.jsx)("div",{className:"promo-text",dangerouslySetInnerHTML:(0,c.A)(e.content?.en_US)})]}),w=(0,l.jsxs)("div",{className:"promo-links",children:[(0,l.jsx)(s.Button,{className:"promo-cta",href:e.cta_link??"",variant:"secondary",onClick:()=>((0,i.recordEvent)("marketplace_promotion_actioned",{...t,path:a,target_uri:e.cta_link,format:"promo-card"}),!0),children:e.cta_label?.en_US??""}),(0,l.jsx)(s.Button,{className:"promo-cta-link woocommerce-admin-dismiss-notification",onClick:()=>{p(!1),o?o():localStorage.setItem("wc-marketplaceDismissedPromos",JSON.stringify(d().concat(a))),(0,i.recordEvent)("marketplace_promotion_dismissed",{...t,path:a,format:"promo-card"})},children:(0,r.__)("Dismiss","woocommerce")})]});function g(){if(e.icon&&Object.hasOwn(m,e.icon)){const t=m[e.icon];return t?(0,l.jsx)("div",{className:"promo-image",children:(0,n.createElement)(t)}):null}return null}return(0,l.jsx)(s.Card,{className:_,children:(0,l.jsx)(s.CardBody,{className:"promo-card__body",children:"has-background"===e?.style?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"promo-content-links",children:[h,w]}),g()]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"promo-content-image",children:[h,g()]}),w]})})})}},66503:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var s=o(83306),r=o(90212),n=o(29775),i=o(63111),c=o(39793);const a=({format:e})=>{if(!window?.wcMarketplace?.promotions||!Array.isArray(window?.wcMarketplace?.promotions))return null;const t=(window?.wcMarketplace?.promotions??[]).filter(t=>t.format===e),o=new URLSearchParams(window.location.search),a=o.get("page"),l=Date.now(),m=decodeURIComponent(o.get("path")||""),d=o.get("tab"),u=window.location.pathname+window.location.search,p=()=>{(0,s.recordEvent)("marketplace_promotion_viewed",{path:u,format:e})},_=()=>{(0,s.recordEvent)("marketplace_promotion_dismissed",{path:u,format:e})};return(0,c.jsx)(c.Fragment,{children:t.map((e,t)=>{if(!e.pages)return null;if(!e.pages.some(e=>{if(e.pathname)return e.pathname===u;if(!e.path)return!1;const t=e=>e.startsWith("/")?e:`/${e}`,o=t(e.path),s=t(m);return e.page===a&&o===s&&(e.tab?d:!d)}))return null;const o=new Date(e.date_from_gmt).getTime(),s=new Date(e.date_to_gmt).getTime();return l<o||l>s?null:"promo-card"===e.format?(0,c.jsx)(i.A,{promotion:e},t):"notice"===e.format&&e?.content?(0,c.jsx)(n.A,{id:e.menu_item_id??`promotion-${t}`,description:e.content[r.ne.userLocale]||e.content.en_US,variant:e.style?e.style:"info",icon:e?.icon||"",isDismissible:e.is_dismissible||!1,onLoad:p,onClose:_},t):null})})}},17073:(e,t,o)=>{"use strict";o.d(t,{W:()=>r});var s=o(39793);const r=({numTasks:e=5,query:t})=>Boolean(t.task)?null:(0,s.jsx)("div",{className:"woocommerce-task-dashboard__container",children:(0,s.jsxs)("div",{className:"woocommerce-card woocommerce-task-card is-loading","aria-hidden":!0,children:[(0,s.jsx)("div",{className:"woocommerce-card__header",children:(0,s.jsx)("div",{className:"woocommerce-card__title-wrapper",children:(0,s.jsx)("div",{className:"woocommerce-card__title woocommerce-card__header-item",children:(0,s.jsx)("span",{className:"is-placeholder"})})})}),(0,s.jsx)("div",{className:"woocommerce-card__body",children:(0,s.jsx)("div",{className:"woocommerce-list",children:Array.from(new Array(e)).map((e,t)=>(0,s.jsx)("div",{className:"woocommerce-list__item has-action",children:(0,s.jsxs)("div",{className:"woocommerce-list__item-inner",children:[(0,s.jsx)("div",{className:"woocommerce-list__item-before",children:(0,s.jsx)("span",{className:"is-placeholder"})}),(0,s.jsx)("div",{className:"woocommerce-list__item-text",children:(0,s.jsx)("div",{className:"woocommerce-list__item-title",children:(0,s.jsx)("span",{className:"is-placeholder"})})}),(0,s.jsx)("div",{className:"woocommerce-list__item-after",children:(0,s.jsx)("span",{className:"is-placeholder"})})]})},t))})})]})})},6527:(e,t,o)=>{"use strict";o.d(t,{Bo:()=>r,El:()=>i,Ud:()=>n});var s=o(15703);const r=["woocommerce-services"],n=(e,t=!0)=>{const{woocommerce_store_address:o,woocommerce_default_country:s,woocommerce_store_postcode:r}=e;return t?Boolean(o&&s&&r):Boolean(o&&s)},i=()=>{window.location.href=(0,s.getAdminLink)("admin.php?page=wc-settings&tab=tax§ion=standard&wc_onboarding_active_task=tax")}},41407:(e,t,o)=>{"use strict";o.d(t,{i:()=>w});var s=o(14908),r=o(56427),n=o(98846),i=o(39793);const c="woocommerce_tasklist_experimental_progress_title_item",a=({children:e,order:t=1})=>(0,i.jsx)(r.Fill,{name:c,children:o=>(0,n.createOrderedChildren)(e,t,o)});a.Slot=({fillProps:e})=>(0,i.jsx)(r.Slot,{name:c,fillProps:e,children:n.sortFillsByOrder});var l=o(27723),m=o(86087),d=o(47143),u=o(40314),p=o(15703),_=o(4462);const h=({taskListId:e})=>{const{loading:t,tasksCount:o,completedCount:s,hasVisitedTasks:r}=(0,d.useSelect)(t=>{const o=t(u.onboardingStore).getTaskList(e),s=t(u.onboardingStore).hasFinishedResolution("getTaskList",[e]),r=(0,u.getVisibleTasks)(o?.tasks||[]);return{loading:!s,tasksCount:r?.length,completedCount:r?.filter(e=>e.isComplete).length,hasVisitedTasks:r?.filter(e=>e.isVisited&&"store_details"!==e.id).length>0}},[e]),n=(0,m.useMemo)(()=>{if(!r||s===o){const e=(0,p.getSetting)("siteTitle");return e?(0,l.sprintf)((0,l.__)("Welcome to %s","woocommerce"),e):(0,l.__)("Welcome to your store","woocommerce")}return s<=3?(0,l.__)("Let’s get you started","woocommerce")+" 🚀":s>3&&s<6?(0,l.__)("You’re on the right track","woocommerce"):(0,l.__)("You’re almost there","woocommerce")},[s,r,o]);return t?null:(0,i.jsx)("h1",{className:"woocommerce-task-progress-header__title",dangerouslySetInnerHTML:(0,_.A)(n)})},w=({taskListId:e})=>{const t=(0,s.useSlot)(c);return Boolean(t?.fills?.length)?(0,i.jsx)(a.Slot,{fillProps:{taskListId:e}}):(0,i.jsx)(h,{taskListId:e})}},73572:(e,t,o)=>{"use strict";t.A=function(e){var t=e.size,o=void 0===t?24:t,s=e.onClick,c=(e.icon,e.className),a=function(e,t){if(null==e)return{};var o,s,r=function(e,t){if(null==e)return{};var o,s,r={},n=Object.keys(e);for(s=0;s<n.length;s++)o=n[s],0<=t.indexOf(o)||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(s=0;s<n.length;s++)o=n[s],0<=t.indexOf(o)||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,n),l=["gridicon","gridicons-star-outline",c,!!function(e){return 0==e%18}(o)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return r.default.createElement("svg",i({className:l,height:o,width:o,onClick:s},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),r.default.createElement("g",null,r.default.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.041 3.374.139-2.647 2.092-.784.62.27.962.911 3.249-2.814-1.871-.83-.553-.83.552-2.814 1.871.911-3.249.27-.962-.784-.62-2.648-2.092 3.374-.139.997-.041.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.891 18.18 21l-2.002-7.141L22 9.257l-7.418-.305L12 2z"})))};var s,r=(s=o(51609))&&s.__esModule?s:{default:s},n=["size","onClick","icon","className"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t,o=1;o<arguments.length;o++)for(var s in t=arguments[o])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},i.apply(this,arguments)}},81739:(e,t,o)=>{"use strict";t.A=function(e){var t=e.size,o=void 0===t?24:t,s=e.onClick,c=(e.icon,e.className),a=function(e,t){if(null==e)return{};var o,s,r=function(e,t){if(null==e)return{};var o,s,r={},n=Object.keys(e);for(s=0;s<n.length;s++)o=n[s],0<=t.indexOf(o)||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(s=0;s<n.length;s++)o=n[s],0<=t.indexOf(o)||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,n),l=["gridicon","gridicons-star",c,!!function(e){return 0==e%18}(o)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return r.default.createElement("svg",i({className:l,height:o,width:o,onClick:s},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),r.default.createElement("g",null,r.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.891 5.82 21l2.002-7.141L2 9.257l7.418-.304z"})))};var s,r=(s=o(51609))&&s.__esModule?s:{default:s},n=["size","onClick","icon","className"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t,o=1;o<arguments.length;o++)for(var s in t=arguments[o])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},i.apply(this,arguments)}},84343:e=>{function t(e,t){if((e=e.replace(/\s+/g,""))===(t=t.replace(/\s+/g,"")))return 1;if(e.length<2||t.length<2)return 0;let o=new Map;for(let t=0;t<e.length-1;t++){const s=e.substring(t,t+2),r=o.has(s)?o.get(s)+1:1;o.set(s,r)}let s=0;for(let e=0;e<t.length-1;e++){const r=t.substring(e,e+2),n=o.has(r)?o.get(r):0;n>0&&(o.set(r,n-1),s++)}return 2*s/(e.length+t.length-2)}e.exports={compareTwoStrings:t,findBestMatch:function(e,o){if(!function(e,t){return"string"==typeof e&&!!Array.isArray(t)&&!!t.length&&!t.find(function(e){return"string"!=typeof e})}(e,o))throw new Error("Bad arguments: First argument should be a string, second should be an array of strings");const s=[];let r=0;for(let n=0;n<o.length;n++){const i=o[n],c=t(e,i);s.push({target:i,rating:c}),c>s[r].rating&&(r=n)}return{ratings:s,bestMatch:s[r],bestMatchIndex:r}}}}}]);