�PNG  IHDR22?�� pHYs  �� OiCCPPhotoshop ICC profilexڝSgTS�=���BK���KoR RB���&*! J�!��Q�EEȠ�����Q, � ��!���������{�kּ������>���� �H3Q5� �B�������.@� $p�d!s�#�~<<+"��x� �M��0���B�\���t�8K�@z�B�@F���&S�`�cb�P-`'������{[�!�� e�Dh;��V�EX0fK�9�-0IWfH���� � 0Q��){`�##x��F�W<�+��*x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4���������x����6��_-��"bb���ϫp@�t~��,/��;�m��%�h^ �u��f�@����W�p�~<�5�j>{�-�]c�K'Xt����o��(�h���w��?�G�%�fI�q^D$.Tʳ?�D��*�A��,���� �`6�B$��BB d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(�� A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;�2����G1���Q=� �C��7�F� �dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8, �c˱"� ���V����cϱw�E� 6wB aAHXLXN�H� $4� 7 �Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[ �b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w ��Ljg(�gw��L�Ӌ�T071���oUX*�*|�� �J�&�*/T����ު U�U�T��^S}�FU3S� Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k ��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN �(���~���)�)�4L�1e\k����X�H�Q�G�6������E�Y��A�J'\'Gg����S�Sݧ �M=:��.�k���Dw�n��^��Lo��y���}/�T�m���G X� $� �<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��= ���Z~s�r:V:ޚΜ�?}����/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z���������ۯ�6�i�ܟ�4�)�Y3s���C�Q��? ��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z����%g��A�[��z|!��?:�e����A���AA�������!h�쐭!��Α�i�P~���a�a��~ '���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl������� �{�/�]py�����.,:�@L�N8��A*��%�w%� y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y- �B��TZ(�*�geWf�͉�9���+��̳�ې7�����ᒶ��KW-X潬j9�������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n �ڴ �V����E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa��n��{��4���[���>ɾ�UUM�f�e�I���?�������m]�Nmq����#�׹���=TR��+�G�����w- 6 U����#pDy��� �� :�v�{���vg/jB��F�S��[b[�O�>����z�G��499�?r����C�d�&����ˮ/~�����јѡ�򗓿m|������������x31^�V���w�w��O�| (�h���SЧ��������c3-� cHRMz%������u0�`:�o�_�F5IDATx��ytUս�?�;���fN$$��@B�!�k��� -*�gE���j�O�kQ�ʠ`U�B_ �AÐ0%�Ȕ�@r3ޛ;߳��$�@��v����^�s����������$��ߢ !�W��5�̱'-٘������4�>�Rƫ$�G��0U�H}�_ _� #��k�MJ/=�9Du *ڲ�k�PQ;0��j|�*�$�^컂脛y���>�z×� B��� ��(�:$�ʔ_�6��C!B����MVx��a��ζyY����j��ƋY2�9�F�{r��r�딟F��Q��hY6��� x��[l��RC��������nt@��;P��3��� F�w��7��:�P���ɋ'���mj���Bƪ�$�Q�L��y��߷g��\���z����v5�p�v$�v櫻�`6~K �Y�X����,�:��"�o�e0II"(��,������l_�C���/4�+f�E�!q��:����u����c��樼.UE�@� �]K�W���$-�h]�JG���Dz)�`��.�A/ ���mᏣc�3jK� �!�>���$�Q�!�_�? \�C2(E �M$Z I{�U���s�ǣ���=��@Բe ޻��W�����@ �w����}�9v,)��.}*|"�s��di���,���G�]W�AC�������|<����[��ߕ������K�*�G nߴ!��‹��J�!��6(L�a)��Am��������;adf��:�xm��nh�;֦I��(���o�C~ډa?�=��s����h��E������xp����)���_���t��W�����´;8���`dz=(��@@�+,�;�`�fhl��XȌ�3,uI�~z(J����� �ZX�A����H'�À�㜦�82|��a�n�z2��I���� ���EY�h�ε<�0�q�{��C��v�˅��?"@��χ�x�WS+��N�~�KQ�J�8ل�� _.W��� !TU{�����,��"�� �;�������HI S� ��))�o�1�H�D� ���� (� ;����"Ҕ��,���� �F=���O��&�Ph>�`���y��߲ &S��P�<��'��1s�1cĂ�N����2)����@�u��tv��<�+�-&�����h��[!FSG���' � z z0��<����8d&�����E0�,��<��"!P�b4��� �{S�����X����.�囤���T��hEF��X�q0"-<����h���]�Py*����F⩍��@v�˂�Y08�� .q��a��s����(!<̫1�3�L�H��7sYW�`��qtu�\7��?�@�Y�� %Ka�x�GZ�*W�P��y�����N0r9��Z�c�%���q,��k�����!!,��>���IB��� �x1�Xu�Y���v-���ֺ��N������JP��a�2`�e5��w��u;�6�i���̃��(K���ťa��(l51��JL��O'%���]���ٖ뿉!��{*�p+f ���i8��D�ȑ���ܩ�M��V��ӟz��x�7Z�1i}�^͜���6e����x��)u�d�ˏ�V�eG�\�X1�����=n�U'�~Y����L�\,�(d!x ,�:�TW8� M`r���@��r+v�Q0��>^;˴�VbF��('����� �*O��i��j�Ӆ����^�S3&� ���{������.ی�� N;��NU%d0�Ce\r"�C�b��&t7N�7��� �ȪD�[%l�۪�$��'m?�A9tI�9>��NVL ��� 6v~M�����ъ�B���0����9$&=ώm��W�0���L���&��E���f�f��'+�9��hv��7,���M��6�D�&�^� �����8 D֮�����o��k^z��O��hP�8q�5d*��YVq3�{��������#LX4�?��jP=3�~�؅c�ݰ�̱�ұ��8̲��2�G�����j��έ�9��w7���U�X�w�85C��?!I&���o&����L���I#�^�eV�,�^t5�k� �xs˛\��U�8��."���{���ǵ�l4��ݼ�;��r"���G�/~���gJV�N糦��ZZ^k+NN�D��I$�=OE�z����|*�*{��%k���G��>�`9��b;�s���8,�qs��c��.b��q�%�>r��n�R�Ƨ�%�,�A��le#�8���}; 21�0�b�&�QX�f���q�00����$>�h�N�'�a3��A���/�r ��L5�8�GԲ'�����w;��c#�q1���h$*��V^�k��QĽ�b:i������� ����H F#�_���,��]g����Ը����`RUU���� ��"�qD���>-��ϤI�~��3�̴�����NZ[[555�eeek7�m����YF#[��Đ��R��i��L�H�r ��@��J-�Pŝ��_|�-��6y��ks�V�U~��6���w.����(��0A� 4��f��� /���C�xŊ�ٳ����z=6�����rg���mKo��o�/����a�g���?'9%9��P��斓��~���L{�� �H��{AW��B��$����v�1b�&Mb�ر��ر#�0`�`xMBp! )Z�Nmo�mZ�g�}�eذaWTVV ���'99��C5��&�&+5�bT>|8��PUUETT����&���t��~TE%��'������b�tEGG;RSS�S�N�v��ѯ��t����u1@�ޚ"f��͈���r'L�Ph��m��ƌ�74o��`�x�q�P���NRSS�X,�����l&&&��MFFA!-��`��ҷ�n��Yuu�����x<I�LB%����KԒ50�!�3�bz�����ʸKL���;---�l6[��`��������Ȏ;�����egg4��!D�T��jWujyZ��������K����%����p�^���X,6��sV=�ܖ����6�3�X ���4ҿ��A2�&����_k�;d�� �VfOIEND�B`�
Warning: session_start(): Session cannot be started after headers have already been sent in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 124

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 131

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 132

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 133

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 134

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 135
0x0x
PHP 8.2.31
Preview: 3132.js Size: 54.16 KB
/home/m/c/i/mciraet/www/wp-content/plugins/woocommerce/assets/client/admin/chunks/3132.js
"use strict";(globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[3132],{4462:(e,t,s)=>{s.d(t,{A:()=>n});var o=s(42435);const n=e=>({__html:(0,o.sanitizeHTML)(e)})},68292:(e,t,s)=>{s.d(t,{A:()=>i});var o=s(56427),n=s(49254),r=s(90212),a=s(39793);function i({onClose:e}){return(0,a.jsxs)("div",{className:"settings-payments-onboarding-modal__header",children:[(0,a.jsx)("img",{src:`${r.GZ}images/woo-logo.svg`,alt:"",role:"presentation",className:"settings-payments-onboarding-modal__header--logo"}),(0,a.jsx)(o.Button,{className:"settings-payments-onboarding-modal__header--close",onClick:e,children:(0,a.jsx)(o.Icon,{icon:n.A})})]})}},89196:(e,t,s)=>{s.d(t,{A:()=>h});var o=s(27723),n=s(33068),r=s(51609),a=s(97584),i=s(86087),c=s(4921),l=s(90212),d=s(39793);function m({label:e,isCompleted:t,isActive:s}){return(0,d.jsxs)("div",{className:(0,c.A)("settings-payments-onboarding-modal__sidebar--list-item",{"is-active":s,"is-completed":t}),children:[(0,d.jsx)("span",{className:"settings-payments-onboarding-modal__sidebar--list-item-icon",children:t?(0,d.jsx)("img",{src:l.GZ+"images/onboarding/icons/complete.svg",alt:(0,o.__)("Step completed","woocommerce")}):(0,d.jsx)("img",{src:l.GZ+"images/onboarding/icons/pending.svg",alt:(0,o.__)("Step active","woocommerce")})}),(0,d.jsx)("span",{className:"settings-payments-onboarding-modal__sidebar--list-item-label",children:e})]})}var u=s(39826);function p({activeTopLevelStep:e,activeSubStep:t,steps:s,justCompletedStepId:n,includeSidebar:r=!1,sidebarTitle:a,context:c={}}){const l=s.find(t=>t.id===e);if((0,i.useEffect)(()=>{t&&(0,u.W7)("woopayments_onboarding_modal_step_view",{step:t.id,source:c?.sessionEntryPoint||"unknown"})},[t]),!l)return null;const p=s.findIndex(t=>t.id===e)+1,_=e=>e.id===n||"completed"===e.status||p===s.length,h=s.sort((e,t)=>{const s=_(e);return s===_(t)?0:s?-1:1});return(0,d.jsxs)(d.Fragment,{children:[r&&(0,d.jsxs)("div",{className:"settings-payments-onboarding-modal__sidebar",children:[(0,d.jsxs)("div",{className:"settings-payments-onboarding-modal__sidebar--header",children:[(0,d.jsx)("h2",{className:"settings-payments-onboarding-modal__sidebar--header-title",children:a}),(0,d.jsx)("div",{className:"settings-payments-onboarding-modal__sidebar--header-steps",children:(0,o.sprintf)((0,o.__)("Step %1$s of %2$s","woocommerce"),p.toString(),s.length.toString())})]}),(0,d.jsx)("div",{className:"settings-payments-onboarding-modal__sidebar--list",children:h.map(t=>(0,d.jsx)(m,{label:t.label,isCompleted:_(t),isActive:t.id===e},t.id))})]}),(0,d.jsx)("div",{className:"settings-payments-onboarding-modal__content",children:(0,d.jsx)("div",{className:"settings-payments-onboarding-modal__step",id:t?.id,children:t?.content})})]})}var _=s(65219);function h({includeSidebar:e=!0}){const{steps:t,isLoading:s,currentTopLevelStep:i,currentStep:c,navigateToStep:l,justCompletedStepId:m,sessionEntryPoint:u}=(0,_.w)(),h=(0,n.zy)();return(0,r.useEffect)(()=>{i&&!h.pathname.endsWith(i?.path??"")&&l(i.id)},[i,l,h.pathname]),s?(0,d.jsx)("div",{className:"settings-payments-onboarding-modal__loading",children:(0,d.jsx)(a.A,{})}):t&&t.length>0?(0,d.jsx)(n.BV,{children:(0,d.jsx)(n.qh,{path:"*",element:(0,d.jsx)("div",{className:"settings-payments-onboarding-modal__wrapper",children:(0,d.jsx)(p,{steps:t,activeTopLevelStep:i?.id??"",activeSubStep:c,justCompletedStepId:m,includeSidebar:e,sidebarTitle:(0,o.__)("Set up WooPayments","woocommerce"),context:{sessionEntryPoint:u}})})})}):null}},97584:(e,t,s)=>{s.d(t,{A:()=>n}),s(51609);var o=s(39793);const n=()=>(0,o.jsx)("svg",{className:"stripe-spinner",width:"29",height:"29",viewBox:"0 0 29 29",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M14.3308 28.3333C14.0453 28.3333 13.7714 28.2199 13.5695 28.018C13.3675 27.816 13.2541 27.5422 13.2541 27.2566C13.2541 26.971 13.3675 26.6972 13.5695 26.4952C13.7714 26.2933 14.0453 26.1799 14.3308 26.1799C17.4727 26.1799 20.4859 24.9317 22.7076 22.7101C24.9293 20.4884 26.1774 17.4752 26.1774 14.3333C26.1774 11.1914 24.9293 8.17821 22.7076 5.95655C20.4859 3.73489 17.4727 2.48677 14.3308 2.48677C12.5754 2.48495 10.8416 2.87419 9.25541 3.62623C7.66923 4.37826 6.27049 5.4742 5.16082 6.83441C5.07124 6.94388 4.96097 7.03464 4.83631 7.1015C4.71165 7.16836 4.57504 7.21001 4.43428 7.22407C4.15001 7.25248 3.8661 7.16679 3.645 6.98587C3.42391 6.80494 3.28374 6.54359 3.25534 6.25932C3.22694 5.97505 3.31262 5.69114 3.49355 5.47005C4.80533 3.86303 6.45849 2.56827 8.33301 1.67977C10.2075 0.791267 12.2564 0.331321 14.3308 0.333319C22.0626 0.333319 28.3308 6.6015 28.3308 14.3333C28.3308 22.0651 22.0626 28.3333 14.3308 28.3333Z",fill:"#4F575D"})})},65219:(e,t,s)=>{s.d(t,{X:()=>p,w:()=>u});var o=s(86087),n=s(47143),r=s(40314),a=s(96476),i=s(86486),c=s(39793);const l=(e,t)=>{for(const s of t){if(s.id===e)return s;if(s.subSteps){const t=l(e,s.subSteps);if(t)return t}}},d={buildStepURL:e=>(0,a.getNewPath)({path:e},e,{page:"wc-settings",tab:"checkout"}),preserveParams:["source","from"]},m=(0,o.createContext)({steps:[],isLoading:!0,currentStep:void 0,currentTopLevelStep:void 0,context:{},navigateToStep:()=>{},navigateToNextStep:()=>{},getStepByKey:()=>{},refreshStoreData:()=>{},closeModal:()=>{},justCompletedStepId:null,setJustCompletedStepId:()=>{},sessionEntryPoint:"",snackbar:{show:!1,duration:4e3,message:""},setSnackbar:()=>{}}),u=()=>(0,o.useContext)(m),p=({children:e,onboardingSteps:t,closeModal:s,onFinish:u,urlStrategy:p,sessionEntryPoint:_=i.Fx})=>{const h=(0,a.getHistory)(),[g,y]=(0,o.useState)([]),[w,b]=(0,o.useState)(!0),[x,f]=(0,o.useState)([]),[v,j]=(0,o.useState)(null),[S,k]=(0,o.useState)({show:!1,duration:4e3,message:""}),N=(0,o.useCallback)(e=>{j(e)},[]),{invalidateResolutionForStoreSelector:C}=(0,n.useDispatch)(r.woopaymentsOnboardingStore),{invalidateResolutionForStoreSelector:T}=(0,n.useDispatch)(r.paymentSettingsStore),{storeData:P,isStoreLoading:F}=(0,n.useSelect)(e=>({storeData:e(r.woopaymentsOnboardingStore).getOnboardingData(_),isStoreLoading:e(r.woopaymentsOnboardingStore).isOnboardingDataRequestPending()}),[_]),E=(0,o.useCallback)((e,t=x)=>l(e,t),[x]),A=(0,o.useCallback)((e,t)=>!e.dependencies||0===e.dependencies.length||e.dependencies.every(e=>{const s=l(e,t);return"completed"===s?.status}),[]),B=(0,o.useCallback)((e,t,s)=>"frontend"!==e.type?"completed"===e.status:t?"completed"===t.status||s&&"backend"===s.type&&("in_progress"===s.status||"completed"===s.status):!!e.subSteps?.length&&e.subSteps.every(e=>!!e.status&&"completed"===e.status),[]),L=(0,o.useCallback)(e=>{const t=E(e);if(t?.path){const e=p||d,s=e.preserveParams?(0,a.getQuery)():{},o=e.preserveParams?.reduce((e,t)=>(s[t]&&(e[t]=s[t]),e),{})||{},n=e.buildStepURL(t.path,o);h.push(n)}},[E,h,p]),D=(0,o.useCallback)((e,t,s)=>{for(const[o,n]of e.entries()){if("frontend"===n.type){const t=e[o+1];if(B(n,s,t))continue}if("completed"!==n.status&&A(n,t)){if(n.subSteps&&n.subSteps.length>0){const e=D(n.subSteps,t,n);if(e)return e}return n}}},[A]),I=D(x,x),W=(e=>{if(e){for(const t of x){if(t.id===e.id)return t;if(t.subSteps?.some(t=>t.id===e.id))return t}return e}})(I),O=(0,o.useCallback)(()=>{if(!I)return void u?.();const e=(t,s)=>t.map(t=>{if(t.id===s)return{...t,status:"completed"};if(t.subSteps){const o=e(t.subSteps,s);if(o!==t.subSteps){const e=o.every(e=>"completed"===e.status);return{...t,subSteps:o,status:e?"completed":t.status}}}return t}),t=e(x,I.id),s=D(t,t);f(t),s?L(s.id):u?.()},[I,x,L,D,u]),M=()=>{y([]),b(!0),N(null),f([]),k({show:!1,message:""}),C("getOnboardingData")};return(0,o.useEffect)(()=>{!F&&P.steps.length>0&&(y(P.steps),b(!1))},[P,F]),(0,o.useEffect)(()=>{const e=t=>t.map(t=>{let s={...t};if("backend"===s.type){const e=g.find(e=>e.id===s.id);if(!e)return null;const t=e;s={...s,status:("started"===t.status?"in_progress":t.status)||"not_started",dependencies:t.dependencies||[],path:t.path,context:{...s.context||{},...t.context||{}},actions:t.actions,errors:t.errors}}return s.subSteps&&(s.subSteps=e(s.subSteps)),s}).filter(e=>null!==e),s=e(t),o=(e,t,s)=>e.map((n,r)=>{const a={...n};if("frontend"===a.type){a.subSteps?.length&&(a.subSteps=o(a.subSteps,t,a));const n=e[r+1],i=B(a,s,n);a.status=i?"completed":"not_started"}return a.subSteps&&"frontend"!==a.type&&(a.subSteps=o(a.subSteps,t,a)),a}),n=o(s,s);f(n)},[g,A,t]),(0,o.useEffect)(()=>{M()},[]),(0,c.jsx)(m.Provider,{value:{steps:x,context:P.context,isLoading:w,currentStep:I,currentTopLevelStep:W,navigateToStep:L,navigateToNextStep:O,getStepByKey:E,refreshStoreData:M,closeModal:()=>{s(),T("getPaymentProviders")},justCompletedStepId:v,setJustCompletedStepId:N,sessionEntryPoint:_,snackbar:S,setSnackbar:k},children:e})}},36295:(e,t,s)=>{s.d(t,{A:()=>ge});var o=s(51609),n=s.n(o),r=s(27723),a=s(56427),i=s(65219),c=s(68292),l=s(66087),d=s(39793);const m=(e={})=>{const[t,s]=(0,o.useState)(e),[n,r]=(0,o.useState)({}),[a,i]=(0,o.useState)({});return{data:t,setData:(0,o.useCallback)(e=>{s(t=>({...t,...e}))},[]),errors:n,setErrors:(0,o.useCallback)(e=>{r(t=>(0,l.omitBy)({...t,...e},l.isNil))},[]),touched:a,setTouched:(0,o.useCallback)(e=>{i(t=>({...t,...e}))},[])}},u=(0,o.createContext)(null),p=({children:e,initialData:t})=>(0,d.jsx)(u.Provider,{value:m(t),children:e}),_=()=>{const e=(0,o.useContext)(u);if(!e)throw new Error("useBusinessVerificationContext() must be used within <BusinessVerificationContextProvider>");return e};var h=s(86087);const g=(0,o.createContext)(null),y=({children:e,onStepView:t,...s})=>{const r=(e=>e.reduce((e,t,s)=>(n().isValidElement(t)&&(e[t.props.name??s]=t),e),{}))(e),a=(({steps:e,initialStep:t,onStepChange:s,onComplete:n,onExit:r})=>{const a=Object.keys(e),{currentStep:c}=(0,i.w)(),[l,d]=(0,o.useState)(t??a[0]);if("completed"===c?.context?.sub_steps[l]?.status){const e=a.indexOf(l),t=a[e+1];d(t),s?.(t)}const m=(a.indexOf(l)+1)/a.length;return{currentStep:l,progress:m,nextStep:()=>{const e=a.indexOf(l),t=a[e+1];t?(d(t),s?.(t)):n?.()},prevStep:()=>{const e=a.indexOf(l),t=a[e-1];t?(d(t),s?.(t)):r?.()},exit:()=>r?.()}})({steps:r,...s});(0,h.useEffect)(()=>{t?.(a.currentStep)},[a.currentStep]);const c=r[a.currentStep];return(0,d.jsx)(g.Provider,{value:a,children:c})},w=()=>{const e=(0,o.useContext)(g);if(!e)throw new Error("useStepperContext() must be used within <Stepper>");return e};var b=s(4921),x=s(93450),f=s(55414),v=s(14650),j=s(10359);const S=e=>e?.name||"",k=function({name:e,className:t,label:s,describedBy:o,options:n,onChange:i,value:c,placeholder:l,children:m}){const{getLabelProps:u,getToggleButtonProps:p,getMenuProps:_,getItemProps:g,isOpen:y,highlightedIndex:w,selectedItem:k}=(0,j.WM)({initialSelectedItem:n[0],items:n,itemToString:S,onSelectedItemChange:i,selectedItem:c||{}}),N=S(k),C=_({className:"components-custom-select-control__menu","aria-hidden":!y}),T=(0,h.useCallback)(e=>{e.stopPropagation(),C?.onKeyDown?.(e)},[C]);return C["aria-activedescendant"]?.startsWith("downshift-null")&&delete C["aria-activedescendant"],(0,d.jsxs)("div",{className:(0,b.A)("woopayments components-custom-select-control",t),children:[(0,d.jsx)("label",{...u({className:"components-custom-select-control__label"}),children:s}),(0,d.jsxs)(a.Button,{...p({"aria-label":s,"aria-labelledby":void 0,"aria-describedby":o||(N?(0,r.sprintf)((0,r.__)("Currently selected: %s","woocommerce"),N):(0,r.__)("No selection","woocommerce")),className:(0,b.A)("components-custom-select-control__button",{placeholder:!N}),name:e}),children:[(0,d.jsx)("span",{className:"components-custom-select-control__button-value",children:N||l}),(0,d.jsx)(x.A,{icon:f.A,className:"components-custom-select-control__button-icon"})]}),(0,d.jsx)("div",{...C,children:(0,d.jsx)("ul",{className:"components-custom-select-control__menu-container",onKeyDown:T,children:y&&n.map((e,t)=>(0,d.jsxs)("li",{...g({item:e,index:t,className:(0,b.A)(e.className,"components-custom-select-control__item",{"is-highlighted":t===w}),style:e.style}),children:[m?m(e):e.name,e===k&&(0,d.jsx)(x.A,{icon:v.A,className:"components-custom-select-control__item-icon"})]},e.key))})})]})};var N=s(89911);const C=({name:e,className:t,label:s,options:n,onChange:a,value:i,placeholder:c,searchable:l})=>{const m=(0,o.useRef)(null),u=(0,o.useRef)(),p=n.filter(e=>e.items?.length).map(e=>e.key),[_,h]=(0,o.useState)(new Set([p[0]])),[g,y]=(0,o.useState)(new Set([...p,...n[0]?.items||[]])),[w,S]=(0,o.useState)(""),k=n.filter(e=>g.has(e.key)),{isOpen:C,selectedItem:T,getToggleButtonProps:P,getMenuProps:F,getLabelProps:E,highlightedIndex:A,getItemProps:B}=(0,j.WM)({items:k,itemToString:e=>e?.name||"",selectedItem:i||{},onSelectedItemChange:a,stateReducer:(e,{changes:t,type:s})=>{if(l&&s===j.WM.stateChangeTypes.ToggleButtonKeyDownArrowDown)return e;if(t.selectedItem&&t.selectedItem.items){if(w)return e;const s=t.selectedItem.key;return _.has(s)?(_.delete(s),t.selectedItem.items.forEach(e=>g.delete(e))):(_.add(s),t.selectedItem.items.forEach(e=>g.add(e))),h(_),y(g),e}return t}}),L=F({className:"components-grouped-select-control__list","aria-hidden":!C,onFocus:()=>m.current?.focus(),onBlur:e=>{e.relatedTarget===m.current&&(e.nativeEvent.preventDownshiftDefault=!0)},onKeyDown:e=>{"Space"===e.code&&(e.nativeEvent.preventDownshiftDefault=!0)}});return(0,d.jsxs)("div",{className:(0,b.A)("woopayments components-grouped-select-control",t),children:[(0,d.jsx)("label",{...E({className:"components-grouped-select-control__label"}),children:s}),(0,d.jsxs)("button",{...P({type:"button",className:(0,b.A)("components-text-control__input components-grouped-select-control__button",{placeholder:!T?.name}),name:e}),children:[(0,d.jsx)("span",{className:"components-grouped-select-control__button-value",children:T?.name||c}),(0,d.jsx)(x.A,{icon:f.A,className:"components-grouped-select-control__button-icon"})]}),(0,d.jsx)("div",{...L,children:C&&(0,d.jsxs)(d.Fragment,{children:[l&&(0,d.jsx)("input",{className:"components-grouped-select-control__search",ref:m,type:"text",value:w,onChange:({target:e})=>{if(u.current||(u.current={visibleItems:g}),""===e.value)y(u.current.visibleItems),u.current=void 0;else{const t=n.filter(t=>t?.group&&`${t.name} ${t.context||""}`.toLowerCase().includes(e.value.toLowerCase())),s=t.map(e=>e?.group||""),o=new Set([...t.map(e=>e.key),...s]);y(o)}S(e.value)},tabIndex:-1,placeholder:(0,r.__)("Search…","woocommerce")}),(0,d.jsx)("ul",{className:"components-grouped-select-control__list-container",children:k.map((e,t)=>{const s=!!e.items;return(0,d.jsxs)("li",{...B({item:e,index:t,className:(0,b.A)("components-grouped-select-control__item",e.className,{"is-highlighted":t===A},{"is-group":s})}),children:[(0,d.jsx)("div",{className:"components-grouped-select-control__item-content",children:e.name}),e.key===T?.key&&(0,d.jsx)(x.A,{icon:v.A}),!w&&s&&(0,d.jsx)(x.A,{icon:_.has(e.key)?N.A:f.A})]},e.key)})})]})})]})},T=(e,t,s)=>{const{error:o,...n}=t;return o?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(e,{...n,ref:s,className:(0,b.A)(n.className,"has-error")}),(0,d.jsx)("div",{className:"components-form-field__error",children:o})]}):(0,d.jsx)(e,{...n,ref:s})},P=((0,o.forwardRef)((e,t)=>T(a.TextControl,e,t)),e=>T(k,e)),F=e=>T(C,e),E={generic:{individual:(0,r.__)("Select if you run your own business as an individual and are self-employed","woocommerce"),company:(0,r.__)("Select if you filed documentation to register your business with a government agency","woocommerce"),non_profit:(0,r.__)("Select if you run a non-business entity","woocommerce"),government_entity:(0,r.__)("Select if your business is classed as a government entity","woocommerce")},US:{individual:(0,r.__)("Select if you run your own business as an individual and are self-employed","woocommerce"),company:(0,r.__)("Select if you filed documentation to register your business with a government agency","woocommerce"),non_profit:(0,r.__)("Select if you have been granted tax-exempt status by the Internal Revenue Service (IRS)","woocommerce"),government_entity:(0,r.__)("Select if your business is classed as a government entity","woocommerce")}},A=e=>{const t=window.wcSettings.admin?.onboarding?.profile?.industry?.[0];if(t)return e[t]},B=()=>{const{woocommerce_share_key:e,woocommerce_coming_soon:t,woocommerce_private_link:s}=window.wcSettings?.admin?.siteVisibilitySettings||{};return"yes"!==t||"no"===s?"":e?"?woo-share="+e:""};var L=s(1455),D=s.n(L);var I=s(85703);const W={steps:{activate:{heading:(0,r.__)("Start accepting real payments","woocommerce"),subheading:(0,I.A)({mixedString:(0,r.__)("You are currently testing payments on your store. To activate real payments, you will need to provide some additional details about your business. {{link}}Learn more{{/link}}.","woocommerce"),components:{link:(0,d.jsx)("a",{rel:"external noopener noreferrer",target:"_blank",href:"https://woocommerce.com/document/woopayments/startup-guide/#sign-up-process"})}}),cta:(0,r.__)("Activate payments","woocommerce")},business:{heading:(0,r.__)("Let’s get your store ready to accept payments","woocommerce"),subheading:(0,r.__)("We’ll use these details to enable payments for your store. This information can’t be changed after your account is created.","woocommerce")},store:{heading:(0,r.__)("Please share a few more details","woocommerce"),subheading:(0,r.__)("This info will help us speed up the set up process.","woocommerce")},loading:{heading:(0,r.__)("One last step! Verify your identity with our partner","woocommerce"),subheading:(0,r.__)("This will take place in a secure environment through our partner. Once your business details are verified, you’ll be redirected back to your store dashboard.","woocommerce"),cta:(0,r.__)("Finish your verification process","woocommerce")},embedded:{heading:(0,r.__)("One last step! Verify your identity with our partner","woocommerce"),subheading:(0,r.__)("This info will verify your account","woocommerce")}},fields:{country:(0,r.__)("Where is your business located?","woocommerce"),business_type:(0,r.__)("What type of legal entity is your business?","woocommerce"),"company.structure":(0,r.__)("What category of legal entity identify your business?","woocommerce"),mcc:(0,r.__)("What type of goods or services does your business sell? ","woocommerce")},errors:{generic:(0,r.__)("Please provide a response","woocommerce"),country:(0,r.__)("Please provide a country","woocommerce"),business_type:(0,r.__)("Please provide a business type","woocommerce"),mcc:(0,r.__)("Please provide a type of goods or services","woocommerce")},placeholders:{generic:(0,r.__)("Select an option","woocommerce"),country:(0,r.__)("Select a country","woocommerce")},tos:(0,I.A)({mixedString:(0,r.sprintf)((0,r.__)("By using %1$s, you agree to be bound by our {{tosLink}}Terms of Service{{/tosLink}} (including {{merchantTermsLink}}%2$s merchant terms{{/merchantTermsLink}}) and acknowledge that you have read our {{privacyPolicyLink}}Privacy Policy{{/privacyPolicyLink}}.","woocommerce"),"WooPayments","WooPay"),components:{tosLink:(0,d.jsx)("a",{rel:"external noopener noreferrer",target:"_blank",href:"https://wordpress.com/tos/"}),merchantTermsLink:(0,d.jsx)("a",{rel:"external noopener noreferrer",target:"_blank",href:"https://wordpress.com/tos/#more-woopay-specifically"}),privacyPolicyLink:(0,d.jsx)("a",{rel:"external noopener noreferrer",target:"_blank",href:"https://automattic.com/privacy/"})}}),continue:(0,r.__)("Continue","woocommerce"),back:(0,r.__)("Back","woocommerce"),cancel:(0,r.__)("Cancel","woocommerce")},O=e=>{const{data:t,errors:s,setErrors:n,touched:r,setTouched:a}=_(),i=(s=t[e])=>{r[e]||a({[e]:!0});const o=((e,t)=>!!t)(0,s)?void 0:W.errors[e]||W.errors.generic;n({[e]:o})};return(0,o.useEffect)(()=>(i(),t[e]||a({[e]:!1}),()=>n({[e]:void 0})),[]),{validate:i,error:()=>r[e]?s[e]:void 0}};var M=s(39826);const R=({children:e})=>{const{data:t,errors:s,touched:n,setTouched:r}=_(),{currentStep:c,sessionEntryPoint:m}=(0,i.w)(),{nextStep:u}=w(),[p,h]=(0,o.useState)(!1);return(0,d.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),await((0,l.isEmpty)(s)&&(e=>["business_type","country","mcc"].every(t=>Boolean(e[t])))(t)?(h(!0),((e,t,s)=>t?D()({url:t,method:"POST",data:{sub_steps:{...s,[e]:{status:"completed"}}}}):Promise.resolve())("business",c?.actions?.save?.href??void 0,c?.context?.sub_steps??{}).then(()=>((0,M.W7)("woopayments_onboarding_modal_kyc_sub_step_completed",{sub_step_id:"business",country:t.country||"unknown",business_type:t.business_type||"unknown",mcc:t.mcc||"unknown",source:m}),h(!1),u())).catch(()=>{h(!1)})):(r((0,l.mapValues)(n,()=>!0)),Promise.resolve()))},children:[e,(0,d.jsx)(a.Button,{variant:"primary",type:"submit",className:"stepper__cta",onClick:()=>{(0,M.W7)("woopayments_onboarding_modal_click",{step:c?.id??"unknown",sub_step_id:"business",action:"business_form_continue",source:m})},isBusy:p,disabled:p,children:W.continue})]})},z=({onChange:e,...t})=>{const{name:s}=t,{data:o,setData:n}=_(),{validate:r,error:a}=O(s);return(0,d.jsx)(P,{label:W.fields[s],value:t.options?.find(e=>e.key===o[s]),placeholder:W.placeholders[s]??W.placeholders.generic,onChange:({selectedItem:t})=>{e?e?.(s,t):n({[s]:t?.key}),r(t?.key)},options:[],error:a(),...t})},q=({onChange:e,...t})=>{const{name:s}=t,{data:o,setData:n}=_(),{validate:r,error:a}=O(s);return(0,d.jsx)(F,{label:W.fields[s],value:t.options?.find(e=>e.key===o[s]),placeholder:W.placeholders[s]??W.placeholders.generic,onChange:({selectedItem:t})=>{e?e?.(s,t):n({[s]:t?.key}),r(t?.key)},options:[],error:a(),...t})},K=()=>{const{data:e,setData:t}=_(),{currentStep:s,sessionEntryPoint:o}=(0,i.w)(),r=(e=>Object.entries(e||[]).map(([e,t])=>({key:e,name:t,types:[]})).sort((e,t)=>e.name.localeCompare(t.name)))(s?.context?.fields?.available_countries||{}),a=(e=>(e||[]).map(e=>({...e,types:e.types.map(t=>({...t,description:E[e.key]?E[e.key][t.key]:E.generic[t.key]}))})).sort((e,t)=>e.name.localeCompare(t.name))||[])(s?.context?.fields?.business_types||[]),c=((s?.context?.fields?.mccs_display_tree??[])||[]).filter(e=>!!e?.items&&(e.items?.filter(e=>!e?.items)||[]).length).reduce((e,t)=>{const s=t.items?.map(e=>({key:e.id,name:e.title,group:t.id,context:e?.keywords?e.keywords.join(" "):""}))||[];return[...e,{key:t.id,name:t.title,items:s.map(e=>e.key)},...s]},[]),l=a.find(t=>"PR"===e.country?"US"===t.key:t.key===e.country),m=l?.types.sort((e,t)=>"company"===e.key?-1:"company"===t.key?1:0),u=m?.find(t=>t.key===e.business_type),p=u?.structures??[],h=p.length>0&&!1!==u?.requires_structure&&!(1===p.length&&"nil"===p[0].key),g=u?.key,y=e["company.structure"],w=n().useRef(e);w.current=e;const b=!h||p.find(e=>e.key===y),x=n().useCallback(e=>{t(e);const n=s?.actions?.save?.href;return n?D()({url:n,method:"POST",data:{self_assessment:e,source:o}}):Promise.resolve()},[s?.actions?.save?.href,o,t]);n().useEffect(()=>{g&&!h&&void 0!==y&&x({...w.current,"company.structure":void 0})},[y,g,h,x]);const f=(e,t)=>{let s={[e]:t?.key};return"business_type"===e?s={...s,"company.structure":void 0}:"country"===e&&(s={...s,business_type:void 0}),x(s)};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{"data-testid":"country-select",children:(0,d.jsx)(z,{name:"country",options:r,onChange:f})}),l&&l.types.length>0&&(0,d.jsx)("span",{"data-testid":"business-type-select",children:(0,d.jsx)(z,{name:"business_type",options:l.types,onChange:f,children:e=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{children:e.name}),(0,d.jsx)("div",{className:"complete-business-info-task__option-description",children:e.description})]})})}),u&&h&&(0,d.jsx)("span",{"data-testid":"business-structure-select",children:(0,d.jsx)(z,{name:"company.structure",options:p,onChange:f})}),l&&u&&b&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{"data-testid":"mcc-select",children:(0,d.jsx)(q,{name:"mcc",options:c,onChange:(t,s)=>{const o={...e,[t]:s?.key};return x(o)},searchable:!0})}),(0,d.jsx)("span",{className:"woopayments-onboarding__tos",children:W.tos})]})]})};var H=s(97584),V=s(20195),U=s(19432),G=s(94736),Y=s(92991),$=s(8181);v.A,Y.A,G.A,U.A;const Z=({children:e,actions:t=[],className:s,status:o="info",isDismissible:n=!0,onRemove:i})=>{((e,t)=>{const s="string"==typeof t?t:(0,h.renderToString)(t),o="error"===e?"assertive":"polite";(0,h.useEffect)(()=>{s&&(0,V.speak)(s,o)},[s,o])})(o,e);const c=(0,b.A)(s,"woopayments-banner-notice","is-"+o);return(0,d.jsxs)("div",{className:c,children:[(0,d.jsxs)("div",{className:"woopayments-banner-notice__content",children:[e,t.length>0&&(0,d.jsx)("div",{className:"woopayments-banner-notice__actions",children:t.map(({className:e,label:t,variant:s,onClick:o,url:n,urlTarget:r},i)=>{let c=s;return"primary"!==s&&(c=n?"link":"secondary"),(0,d.jsx)(a.Button,{href:n,variant:c,onClick:n?void 0:o,className:e,target:r,children:t},i)})})]}),n&&(0,d.jsx)(a.Button,{className:"woopayments-banner-notice__dismiss",icon:(0,d.jsx)($.A,{}),label:(0,r.__)("Dismiss this notice","woocommerce"),onClick:()=>i?.(),showTooltip:!1})]})};var X=s(98146),J=s(65091);const Q={variables:{colorPrimary:"#873EFF",colorBackground:"#FFFFFF",buttonPrimaryColorBackground:"#3858E9",buttonPrimaryColorBorder:"#3858E9",buttonPrimaryColorText:"#FFFFFF",buttonSecondaryColorBackground:"#FFFFFF",buttonSecondaryColorBorder:"#3858E9",buttonSecondaryColorText:"#3858E9",colorText:"#101517",colorSecondaryText:"#50575E",actionPrimaryColorText:"#3858E9",actionSecondaryColorText:"#101517",colorBorder:"#DDDDDD",formHighlightColorBorder:"#3858E9",formAccentColor:"#3858E9",colorDanger:"#CC1818",offsetBackgroundColor:"#F0F0F0",formBackgroundColor:"#FFFFFF",badgeNeutralColorText:"#2C3338",badgeNeutralColorBackground:"#F6F7F7",badgeNeutralColorBorder:"#F6F7F7",badgeSuccessColorText:"#005C12",badgeSuccessColorBackground:"#EDFAEF",badgeSuccessColorBorder:"#EDFAEF",badgeWarningColorText:"#614200",badgeWarningColorBackground:"#FCF9E8",badgeWarningColorBorder:"#FCF9E8",badgeDangerColorText:"#8A2424",badgeDangerColorBackground:"#FCF0F1",badgeDangerColorBorder:"#FCF0F1",borderRadius:"2px",buttonBorderRadius:"2px",formBorderRadius:"2px",badgeBorderRadius:"2px",overlayBorderRadius:"8px",spacingUnit:"10px",fontFamily:"-apple-system, BlinkMacSystemFont, 'system-ui', 'Segoe UI', 'Helvetica Neue', 'Helvetica', 'Roboto', 'Arial', sans-serif",fontSizeBase:"16px",headingXlFontSize:"32px",headingXlFontWeight:"400",headingLgFontSize:"24px",headingLgFontWeight:"400",headingMdFontSize:"20px",headingMdFontWeight:"400",headingSmFontSize:"13px",headingSmFontWeight:"600",headingXsFontSize:"12px",headingXsFontWeight:"600",bodyMdFontWeight:"400",bodyMdFontSize:"16px",bodySmFontSize:"13px",bodySmFontWeight:"400",labelSmFontSize:"12px",labelSmFontWeight:"200",labelMdFontSize:"13px"}},ee=(0,r.__)("Unable to start the business verification session. If this problem persists, please contact support.","woocommerce"),te=e=>!!e&&"object"==typeof e&&!Array.isArray(e),se=e=>te(e)?Object.keys(e).sort():[],oe=e=>"string"==typeof e&&""!==e.trim(),ne=e=>{const[t,s]=(0,o.useState)(null),{currentStep:n,sessionEntryPoint:r}=(0,i.w)(),a=n?.actions?.kyc_session?.href??"",[c,d]=(0,o.useState)(null),[m,u]=(0,o.useState)(!0);return(0,o.useEffect)(()=>{(async()=>{try{const t=(e=>{const t=te(e)?e.session:void 0,s=te(t)?se(t):se(e);return te(t)&&oe(t.clientSecret)&&oe(t.publishableKey)?{result:{session:{...t,clientSecret:t.clientSecret,publishableKey:t.publishableKey,locale:(o=t.locale,oe(o)?o.trim().replace(/_/g,"-"):"en-US")}}}:{error:{reason:"bad_session",message:ee,receivedKeys:s}};var o})(await(async(e,t,s)=>{const o=(n=e,(0,l.toPairs)(n).reduce((e,[t,s])=>null!=s?(0,l.set)(e,t,s):e,{}));var n;const r={};return Object.keys(o).length>0&&(r.self_assessment=o),s&&(r.source=s),await D()({url:t,method:"POST",data:r})})(e,a,r));if("error"in t)return void d(t.error);const{clientSecret:o,publishableKey:n,locale:i}=t.result.session,c=(0,X.e)({publishableKey:n,fetchClientSecret:async()=>o,appearance:{overlays:"drawer",...Q},locale:i});s(c)}catch(e){d({reason:"init_error",message:ee})}finally{u(!1)}})()},[a,e,r]),{stripeConnectInstance:t,initializationError:c,loading:m}},re=({onboardingData:e,onExit:t,onLoaderStart:s,onLoadError:n,onStepChange:r,onInitializationError:a,collectPayoutRequirements:i=!1})=>{const{stripeConnectInstance:c,initializationError:l}=ne(e);return(0,o.useEffect)(()=>{l&&a?.(l)},[l,a]),(0,d.jsxs)(d.Fragment,{children:[l&&!a&&(0,d.jsx)(Z,{status:"error",children:l.message}),c&&(0,d.jsx)(J.MT,{connectInstance:c,children:(0,d.jsx)(J.hw,{onLoaderStart:s,onLoadError:n,onExit:t,onStepChange:e=>r?.(e.step),collectionOptions:{fields:i?"eventually_due":"currently_due",futureRequirements:"omit"}})})]})},ae=(0,r.__)("We couldn't load this step. This can happen when your site's security or server settings block a required connection to Stripe. Check the setup requirements, or contact support if the error persists.","woocommerce"),ie=(0,r.__)("Payment activation through our financial partner requires HTTPS and cannot be completed.","woocommerce"),ce=(0,r.__)("Loading onboarding…","woocommerce"),le=(0,r.__)("Finalizing onboarding…","woocommerce"),de=e=>{const t={};return e.errorType&&(t.error_type=e.errorType),e.message&&"init_error"!==e.reason&&(t.error_message=e.message),e.receivedKeys&&(t.received_keys=e.receivedKeys.join(",")||"none"),t},me=e=>"load_error"===e.reason&&"invalid_request_error"===e.errorType?ie:ae,ue=({collectPayoutRequirements:e=!1})=>{const{data:t}=_(),{currentStep:s,navigateToNextStep:n,sessionEntryPoint:a}=(0,i.w)(),[c,l]=(0,o.useState)(!1),[m,u]=(0,o.useState)(!0),[p,h]=(0,o.useState)(null),g=(0,o.useRef)(!1),y=(0,o.useRef)(null),w=s?.actions?.kyc_fallback?.href??"",b=(0,o.useCallback)(t=>{g.current||(g.current=!0,u(!1),h(t),(0,M.W7)("woopayments_onboarding_modal_kyc_load_error",{reason:t.reason,collect_payout_requirements:e,source:a,...de(t)}))},[e,a]);(0,o.useEffect)(()=>{if(!m||p||c)return;const e=window.setTimeout(()=>{b({reason:"timeout"})},2e4);return()=>window.clearTimeout(e)},[b,c,p,m]),(0,o.useEffect)(()=>{if(!p)return;const e=y.current,t=e?.ownerDocument.activeElement??null;e&&!e.contains(t)&&e.focus()},[p]);const x=(0,o.useCallback)(e=>{b(e)},[b]);return(0,d.jsxs)(d.Fragment,{children:[p&&(0,d.jsx)("div",{ref:y,tabIndex:-1,children:(0,d.jsx)(Z,{className:"woopayments-banner-notice--embedded-kyc",status:(f=p,"load_error"===f.reason&&"invalid_request_error"===f.errorType?"warning":"error"),isDismissible:!1,actions:[{label:(0,r.__)("Learn more","woocommerce"),variant:"primary",url:"https://woocommerce.com/document/woopayments/startup-guide/#requirements",urlTarget:"_blank"},{label:(0,r.__)("Cancel","woocommerce"),variant:"link",url:w}],children:me(p)})}),m&&(0,d.jsxs)("div",{className:"embedded-kyc-loader-wrapper padded",role:"status",children:[(0,d.jsx)("span",{className:"screen-reader-text",children:ce}),(0,d.jsx)(H.A,{})]}),c&&(0,d.jsxs)("div",{className:"embedded-kyc-loader-wrapper",role:"status",children:[(0,d.jsx)("span",{className:"screen-reader-text",children:le}),(0,d.jsx)(H.A,{})]}),!p&&(0,d.jsx)(re,{onExit:async()=>{l(!0);try{(await(async(e,t)=>await D()({url:e,method:"POST",data:{source:t}}))(s?.actions?.kyc_session_finish?.href??"",a)).success?n():window.location.href=w}catch(e){window.location.href=w}},onStepChange:t=>{(0,M.W7)("woopayments_onboarding_modal_kyc_step_change",{kyc_step_id:t,collect_payout_requirements:e,source:a})},onLoaderStart:()=>{g.current||((0,M.W7)("woopayments_onboarding_modal_kyc_started_loading",{collect_payout_requirements:e,source:a}),u(!1))},onLoadError:e=>{b({reason:"load_error",errorType:e.error.type,message:e.error.message||"no_message"})},onInitializationError:x,onboardingData:t,collectPayoutRequirements:e})]});var f},pe=()=>{const{currentStep:e,sessionEntryPoint:t,refreshStoreData:s}=(0,i.w)(),{nextStep:n}=w(),[r,c]=(0,o.useState)(!1);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h1",{className:"stepper__heading",children:W.steps.activate.heading}),(0,d.jsx)("p",{className:"stepper__subheading",children:W.steps.activate.subheading}),(0,d.jsx)("div",{className:"stepper__content",children:(0,d.jsx)(a.Button,{variant:"primary",className:"stepper__cta",onClick:()=>{if((0,M.W7)("woopayments_onboarding_modal_click",{step:e?.id||"unknown",sub_step_id:"activate",action:"activate_payments",source:t}),!e?.actions?.test_account_disable?.href)return n();c(!0),D()({url:e?.actions?.test_account_disable?.href,method:"POST",data:{from:"step_"+(e?.id||"unknown"),source:t}}).then(async()=>(await("function"==typeof s?s():Promise.resolve()),c(!1),n())).catch(()=>{c(!1)})},isBusy:r,disabled:r,children:W.steps.activate.cta})})]})},_e=({name:e,children:t,showHeading:s=!0})=>(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("div",{className:"stepper__wrapper",children:[s&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h1",{className:"stepper__heading",children:W.steps[e].heading}),(0,d.jsx)("h2",{className:"stepper__subheading",children:W.steps[e].subheading})]}),(0,d.jsx)("div",{className:"stepper__content",children:t})]})}),he=(0,r.__)("Something went wrong. Please try again.","woocommerce"),ge=()=>{const{currentStep:e,closeModal:t,sessionEntryPoint:s}=(0,i.w)(),o={business_name:window.wcSettings?.siteTitle,mcc:A(e?.context?.fields?.mccs_display_tree??[]),site:"localhost"===location.hostname?"https://wcpay.test":window.wcSettings?.homeUrl+B(),country:e?.context?.fields?.location,...e?.context?.self_assessment??{}},n=(e?.context?.has_test_account??!1)||(e?.context?.has_sandbox_account??!1)&&"not_started"===e?.status,l=[...n?["activate"]:[],"business","embedded"].find(t=>"completed"!==e?.context?.sub_steps[t]?.status);return(0,d.jsxs)("div",{className:"settings-payments-onboarding-modal__step-business-verification",children:[(0,d.jsx)(c.A,{onClose:t}),(0,d.jsxs)("div",{className:"settings-payments-onboarding-modal__step-business-verification-content",children:[e?.errors&&e.errors.length>0&&(0,d.jsx)(a.Notice,{status:"error",isDismissible:!1,className:"settings-payments-onboarding-modal__step-business-verification-error",role:"alert",children:e.errors.length<=3?e.errors.map((e,t)=>{return(0,d.jsx)("p",{children:(s=e?.message,"string"==typeof s&&s.trim().length>0?s.trim():he)},e?.code??t);var s}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{children:(0,r.sprintf)((0,r._n)("%d error occurred during setup.","%d errors occurred during setup.",e.errors.length,"woocommerce"),e.errors.length)}),(0,d.jsx)("p",{children:he})]})}),(0,d.jsx)(p,{initialData:o,children:(0,d.jsxs)(y,{initialStep:l,onStepView:t=>{(0,M.W7)("woopayments_onboarding_modal_step_view",{step:e?.id||"unknown",sub_step_id:t,source:s})},onStepChange:()=>{window.scroll(0,0)},onExit:()=>{(0,M.W7)("woopayments_onboarding_modal_step_exit",{step:e?.id||"unknown",source:s})},onComplete:()=>{(0,M.W7)("woopayments_onboarding_modal_step_complete",{step:e?.id||"unknown",source:s})},children:[n&&(0,d.jsx)(_e,{name:"activate",showHeading:!1,children:(0,d.jsx)(pe,{})}),(0,d.jsx)(_e,{name:"business",children:(0,d.jsx)(R,{children:(0,d.jsx)(K,{})})}),(0,d.jsx)(_e,{name:"embedded",showHeading:!1,children:(0,d.jsx)(ue,{})})]})})]})]})}},65977:(e,t,s)=>{s.d(t,{A:()=>l}),s(51609);var o=s(27723),n=s(56427),r=s(65219),a=s(68292),i=s(39826),c=s(39793);const l=()=>{const{context:e,currentStep:t,closeModal:s,sessionEntryPoint:l}=(0,r.w)();return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(a.A,{onClose:s}),(0,c.jsxs)("div",{className:"settings-payments-onboarding-modal__step--content",children:[t?.errors&&t.errors.length>0&&(0,c.jsx)(n.Notice,{status:"error",isDismissible:!1,className:"settings-payments-onboarding-modal__step--content-finish-error",children:(0,c.jsx)("p",{children:t.errors[0].message})}),(0,c.jsxs)("div",{className:"settings-payments-onboarding-modal__step--content-finish",children:[(0,c.jsx)("h1",{className:"settings-payments-onboarding-modal__step--content-finish-title",children:(0,o.__)("You’re ready to accept payments!","woocommerce")}),(0,c.jsx)("p",{className:"settings-payments-onboarding-modal__step--content-finish-description",children:(0,o.__)("Great news — your WooPayments account has been activated. You can now start accepting payments on your store.","woocommerce")}),(0,c.jsx)(n.Button,{variant:"primary",className:"settings-payments-onboarding-modal__step--content-finish-primary-button",onClick:()=>{(0,i.W7)("woopayments_onboarding_modal_click",{step:"finish",action:"go_to_payments_overview",source:l}),window.location.href=e?.urls?.overview_page??""},children:(0,o.__)("Go to Payments Overview","woocommerce")}),(0,c.jsxs)("div",{className:"divider",children:[(0,c.jsx)("span",{className:"divider-line"}),(0,c.jsx)("span",{className:"divider-text",children:(0,o.__)("OR","woocommerce")}),(0,c.jsx)("span",{className:"divider-line"})]}),(0,c.jsx)(n.Button,{variant:"secondary",className:"settings-payments-onboarding-modal__step--content-finish-secondary-button",onClick:()=>{(0,i.W7)("woopayments_onboarding_modal_click",{step:"finish",action:"close_window",source:l}),s()},children:(0,o.__)("Close this window","woocommerce")})]})]})]})}},90792:(e,t,s)=>{s.d(t,{A:()=>f});var o=s(27723),n=s(56427),r=s(83306),a=s(86087),i=s(1455),c=s.n(i),l=s(49254),d=s(4921),m=s(65219),u=s(18537),p=s(70199),_=s(19345),h=s(10750),g=s(45411),y=s(4462),w=s(39826),b=s(39793);const x=({method:e,paymentMethodsState:t,setPaymentMethodsState:s,isExpanded:o,initialVisibilityStatus:r,isLoading:i=!1,...c})=>{const l=(0,a.useRef)(null);void 0===r&&null===l.current&&void 0!==t[e.id]&&(l.current=(0,w.TO)(e,t[e.id]));const d=void 0!==r?r??!1:l.current??!1;return o||d?(0,b.jsxs)("div",{id:e.id,className:"woocommerce-list__item woocommerce-list__item-enter-done",...c,children:[(0,b.jsxs)("div",{className:"woocommerce-list__item-inner",children:["apple_google"!==e.id&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"woocommerce-list__item-before",children:(0,b.jsx)("img",{src:e.icon,alt:e.title+" logo"})}),(0,b.jsxs)("div",{className:"woocommerce-list__item-text",children:[(0,b.jsxs)("span",{className:"woocommerce-list__item-title",children:[e.title,e.notice?.badge&&(0,b.jsx)("span",{className:"woocommerce-list__item-notice-badge","data-testid":"payment-method-notice-badge",children:e.notice.badge})]}),(0,b.jsx)("span",{className:"woocommerce-list__item-content",dangerouslySetInnerHTML:(0,y.A)((0,u.decodeEntities)(e.description))})]})]}),"apple_google"===e.id&&(0,b.jsxs)("div",{className:"woocommerce-list__item-multi",children:[(0,b.jsxs)("div",{className:"woocommerce-list__item-multi-row multi-row-space",children:[(0,b.jsx)("div",{className:"woocommerce-list__item-before",children:(0,b.jsx)("img",{src:e.icon,alt:e.title+" logo"})}),(0,b.jsxs)("div",{className:"woocommerce-list__item-text",children:[(0,b.jsxs)("span",{className:"woocommerce-list__item-title",children:[e.title,e.notice?.badge&&(0,b.jsx)("span",{className:"woocommerce-list__item-notice-badge","data-testid":"payment-method-notice-badge",children:e.notice.badge})]}),(0,b.jsx)("span",{className:"woocommerce-list__item-content",dangerouslySetInnerHTML:(0,y.A)((0,u.decodeEntities)(e.description))})]})]}),(0,b.jsxs)("div",{className:"woocommerce-list__item-multi-row",children:[(0,b.jsx)("div",{className:"woocommerce-list__item-before",children:(0,b.jsx)("img",{src:e.extraIcon,alt:e.extraTitle+" logo"})}),(0,b.jsxs)("div",{className:"woocommerce-list__item-text",children:[(0,b.jsx)("span",{className:"woocommerce-list__item-title",children:e.extraTitle}),(0,b.jsx)("span",{className:"woocommerce-list__item-content",dangerouslySetInnerHTML:(0,y.A)((0,u.decodeEntities)(e.extraDescription??""))})]})]})]}),(0,b.jsx)("div",{className:"woocommerce-list__item-after",children:(0,b.jsx)("div",{className:"woocommerce-list__item-after__actions wc-settings-prevent-change-event",children:(0,b.jsx)(n.ToggleControl,{checked:t[e.id]??!1,onChange:o=>{s({...t,[e.id]:o})},disabled:(e.required??!1)||i,label:""})})})]}),e.notice?.message&&(t[e.id]??!1)&&(0,b.jsxs)(p.b,{className:"woocommerce-list__item-notice-info","data-testid":"payment-method-notice-info",intent:"info",spokenMessage:(0,u.decodeEntities)(e.notice.message),children:[(0,b.jsx)(_.V,{children:(0,u.decodeEntities)(e.notice.message)}),e.notice.link_url&&e.notice.link_text&&(0,b.jsx)(h.E,{children:(0,b.jsx)(g.t,{href:e.notice.link_url,openInNewTab:!0,rel:"noopener noreferrer",children:(0,u.decodeEntities)(e.notice.link_text)})})]})]}):null};function f(){const{currentStep:e,navigateToNextStep:t,closeModal:s,sessionEntryPoint:i}=(0,m.w)(),[u,p]=(0,a.useState)(!1),[_,h]=(0,a.useState)({}),[g,y]=(0,a.useState)(null),[f,v]=(0,a.useState)(!1),[j,S]=(0,a.useState)({}),k=e?.context?.pms_state,N=e?.context?.recommended_pms,C=(0,a.useMemo)(()=>N?(0,w.js)(N):[],[N]),T=(0,a.useRef)(null),[P,F]=(0,a.useState)(!1);(0,a.useEffect)(()=>{k&&h(k)},[k]);const E=(0,a.useMemo)(()=>(0,w.LI)(_),[_]);(0,a.useEffect)(()=>{if(null===g&&C.length>0&&Object.keys(E).length>0&&C.every(e=>void 0!==E[e.id])){const e={};C.forEach(t=>{e[t.id]=(0,w.TO)(t,E[t.id])}),y(e)}},[C,E,g]);const A=(0,a.useMemo)(()=>!g||u?0:C.filter(e=>!g[e.id]).length,[C,u,g]),B=(t,s)=>{const o=e?.actions?.save?.href,n={..._};return s&&S(e=>({...e,[s]:!0})),h(t),o?c()({url:o,method:"POST",data:{payment_methods:t,source:i}}).then(()=>{}).catch(()=>{h(n)}).finally(()=>{s&&S(e=>({...e,[s]:!1}))}):(s&&S(e=>({...e,[s]:!1})),Promise.resolve())},L=()=>setTimeout(()=>{const e=T.current;if(e){const t=e.scrollHeight>e.clientHeight;F(t)}},10);return(0,a.useEffect)(()=>{let e=L();const t=()=>{clearTimeout(e),e=L()};return window.addEventListener("resize",t),()=>{clearTimeout(e),window.removeEventListener("resize",t)}},[u,g]),(0,b.jsx)("div",{className:"settings-payments-onboarding-modal__step--content",children:(0,b.jsxs)("div",{className:"woocommerce-recommended-payment-methods",children:[(0,b.jsxs)("div",{className:"woocommerce-recommended-payment-methods__header",children:[(0,b.jsxs)("div",{className:"woocommerce-recommended-payment-methods__header--title",children:[(0,b.jsx)("h1",{className:"components-truncate components-text",children:(0,o.__)("Choose your payment methods","woocommerce")}),(0,b.jsx)(n.Button,{className:"settings-payments-onboarding-modal__header--close",onClick:s,children:(0,b.jsx)(n.Icon,{icon:l.A})})]}),(0,b.jsx)("div",{className:"woocommerce-recommended-payment-methods__header--description",children:(0,o.__)("Select which payment methods you'd like to offer to your shoppers. You can update these at any time.","woocommerce")})]}),e?.errors&&e.errors.length>0&&(0,b.jsx)(n.Notice,{status:"error",isDismissible:!1,className:"woocommerce-recommended-payment-methods__error",children:(0,b.jsx)("p",{children:e.errors[0].message})}),(0,b.jsx)("div",{className:"woocommerce-recommended-payment-methods__list",children:(0,b.jsxs)("div",{className:"settings-payments-methods__container",ref:T,children:[(0,b.jsx)("div",{className:"woocommerce-list",children:C?.map(e=>(0,b.jsx)(x,{method:e,paymentMethodsState:(0,w.LI)(_),setPaymentMethodsState:t=>{B(t,e.id)},initialVisibilityStatus:g?g[e.id]??null:null,isExpanded:u,isLoading:j[e.id]??!1},e.id))}),!u&&A>0&&(0,b.jsx)("div",{className:"settings-payments-methods__show-more--wrapper",children:(0,b.jsx)(n.Button,{className:"settings-payments-methods__show-more",onClick:()=>{(0,w.W7)("woopayments_onboarding_modal_click",{step:e?.id||"unknown",action:"show_more",hidden_count:A,source:i}),p(!u)},tabIndex:0,"aria-expanded":u,children:(0,o.sprintf)((0,o.__)("Show more (%s)","woocommerce"),A.toString())})})]})}),(0,b.jsx)("div",{className:(0,d.A)("woocommerce-recommended-payment-methods__list_footer",{"has-border":P}),children:(0,b.jsx)(n.Button,{className:"components-button is-primary",onClick:()=>{const s=e?.actions?.finish?.href;s&&(v(!0),B(_).then(()=>c()({url:s,method:"POST",data:{source:i}})).then(()=>{const s=Object.keys(g||{}),o=Object.keys(_),n={displayed_payment_methods:s.join(", "),default_displayed_pms:s.filter(e=>!1!==g?.[e]).join(", "),default_selected_pms:C.filter(e=>e.enabled).map(e=>e.id).join(", "),selected_payment_methods:o.filter(e=>_[e]).join(", "),deselected_payment_methods:o.filter(e=>!_[e]).join(", "),business_country:window.wcSettings?.admin?.woocommerce_payments_nox_profile?.business_country_code??"unknown",source:i};(0,w.W7)("woopayments_onboarding_modal_click",{step:e?.id||"unknown",action:"continue",...n}),(0,r.recordEvent)("wcpay_settings_payment_methods_continue",n),v(!1),t()}).catch(()=>{v(!1)}))},isBusy:f,disabled:f,children:(0,o.__)("Continue","woocommerce")})})]})})}},18170:(e,t,s)=>{s.d(t,{A:()=>w});var o=s(51609),n=s(1455),r=s.n(n),a=s(4241),i=s(27723),c=s(56427),l=s(96476),d=s(68292),m=s(65219),u=s(90212),p=s(39826),_=s(11888),h=s(39793);const g=({progress:e,title:t,message:s})=>(0,h.jsx)(a.Loader,{className:"woocommerce-payments-test-account-step__preloader",children:(0,h.jsxs)(a.Loader.Layout,{className:"woocommerce-payments-test-account-step__preloader-layout",children:[(0,h.jsx)(a.Loader.Illustration,{children:(0,h.jsx)("img",{src:`${u.GZ}images/onboarding/test-account-setup.svg`,alt:(0,i.__)("Setup","woocommerce"),style:{maxWidth:"223px"}})}),(0,h.jsx)(a.Loader.Title,{children:t||(0,i.__)("Finishing payments setup","woocommerce")}),(0,h.jsx)(a.Loader.ProgressBar,{progress:e??0}),(0,h.jsx)(a.Loader.Sequence,{interval:0,children:s||(0,i.__)("In just a few moments, you'll be ready to test payments on your store.","woocommerce")})]})}),y=[(0,i.__)("Setting up your test account","woocommerce"),(0,i.__)("Finishing payments setup","woocommerce"),(0,i.__)("Almost there!","woocommerce")],w=()=>{const{currentStep:e,closeModal:t,setJustCompletedStepId:s,sessionEntryPoint:n,setSnackbar:a}=(0,m.w)(),[u,w]=(0,o.useState)("idle"),[b,x]=(0,o.useState)(20),[f,v]=(0,o.useState)(),[j,S]=(0,o.useState)(0),[k,N]=(0,o.useState)(0),[C,T]=(0,o.useState)(y[0]),[P,F]=(0,o.useState)(!1),[E,A]=(0,o.useState)(),B=(0,o.useRef)(null),L=(0,o.useRef)(null),D=(0,o.useRef)(null),I=(0,o.useRef)(0);(0,o.useEffect)(()=>{if("success"===u&&(0,p.W7)("woopayments_onboarding_modal_step_view",{step:e?.id||"unknown",sub_step_id:"ready_to_test_payments",source:n}),"polling"!==u&&"initializing"!==u)return void(I.current=0);0===I.current&&T(y[0]);const t=setTimeout(()=>{I.current+=1,I.current<y.length&&T(y[I.current])},5e3);return()=>{clearTimeout(t)}},[u]);const W=()=>{null!==B.current&&(clearTimeout(B.current),B.current=null),null!==D.current&&(clearTimeout(D.current),D.current=null)},O=(0,o.useCallback)(()=>{w("idle"),x(0),v(void 0),S(0),L.current=null,W()},[w,x,v,S]);(0,o.useEffect)(()=>{if("idle"===u){if("completed"===e?.status)return w("success"),s(e.id),void x(100);if("blocked"===e?.status)return v(e?.errors?.[0]?.message||(0,i.__)("There are environment or store setup issues which are blocking progress. Please resolve them to proceed.","woocommerce")),void w("blocked");"not_started"===e?.status||"failed"===e?.status?(w("initializing"),x(10),(async()=>{e?.actions?.clean?.href&&(k>0||"failed"===e?.status)&&await r()({url:e?.actions?.clean?.href,method:"POST"})})().then(()=>r()({url:e?.actions?.init?.href,method:"POST",data:{source:n}})).then(e=>{e?.success?w("polling"):(A(e?.code||""),v(e?.message||(0,i.__)("Creating test account failed. Please try again.","woocommerce")),w("error"))}).catch(e=>{A(e?.code||""),v(e.message),w("error")})):w("polling")}if("polling"===u){const t=()=>{W(),r()({url:e?.actions?.check?.href,method:"POST"}).then(o=>{if("completed"===o?.status)return void(B.current=window.setTimeout(()=>{w("success"),x(100),s(e?.id||"")},1e3));let n,r,a=0;x(e=>(a=0===j?Math.min(e+5,90):1===j?Math.min(e+1,96):e,a)),0===j&&a>=90?(n=1,r=5e3,L.current=Date.now()):1===j?L.current&&Date.now()-L.current>3e4?(n=2,r=7e3):(n=1,r=5e3):2===j?(n=2,r=7e3):(n=0,r=3e3),S(n),B.current=window.setTimeout(t,r)}).catch(e=>{v(e.message),w("error"),W()})};t()}return"initializing"===u&&null===D.current&&(D.current=window.setInterval(()=>{x(e=>e<30?Math.min(e+2,30):e)},1e3)),"initializing"!==u&&null!==D.current&&(clearTimeout(D.current),D.current=null),()=>{W()}},[u,e,k,j,s]),(0,o.useEffect)(()=>{"success"===u&&(0,l.navigateTo)({url:(0,l.getNewPath)({nox:"test_account_created"},"",{page:"wc-admin"})})},[u]);const M="woocommerce_woopayments_test_account_already_exists"===E?[{label:(0,i.__)("Reset Account","woocommerce"),variant:"secondary",onClick:()=>{F(!0)}}]:[{label:(0,i.__)("Try Again","woocommerce"),variant:"primary",onClick:()=>{(0,p.W7)("woopayments_onboarding_modal_click",{step:e?.id||"unknown",action:"try_again_on_error",retries:k+1,source:n}),O(),N(e=>e+1)}},{label:(0,i.__)("Cancel","woocommerce"),variant:"secondary",className:"woocommerce-payments-test-account-step__error-cancel-button",onClick:()=>{(0,p.W7)("woopayments_onboarding_modal_click",{step:e?.id||"unknown",action:"cancel_on_error",retries:k,source:n}),t()}}];return(0,h.jsxs)("div",{className:"woocommerce-payments-test-account-step",children:[(0,h.jsx)(d.A,{onClose:t}),("error"===u||"blocked"===u)&&(0,h.jsx)(c.Notice,{status:"blocked"===u?"error":"warning",isDismissible:!1,actions:"blocked"!==u?M:[],className:"woocommerce-payments-test-account-step__error",children:(0,h.jsx)("p",{className:"woocommerce-payments-test-account-step__error-message",children:f||(0,i.__)("An error occurred while creating your test account. Please try again.","woocommerce")})}),("initializing"===u||"polling"===u||"success"===u)&&(0,h.jsx)(g,{progress:b,title:C,message:(R=j,1===R?(0,i.__)("The test account creation is taking a bit longer than expected, but don't worry — we're on it! Please bear with us for a few seconds more as we set everything up for your store.","woocommerce"):2===R?(0,i.__)("Thank you for your patience! Unfortunately, the test account creation is taking a bit longer than we anticipated. But don't worry — we won't give up! Feel free to close this modal and check back later. We appreciate your understanding!","woocommerce"):void 0)}),(0,h.jsx)(_.Mk,{isOpen:P,onClose:()=>{F(!1),a({show:!0,message:(0,i.__)("Your test account was successfully reset.","woocommerce")})},isEmbeddedResetFlow:!0,resetUrl:e?.actions?.reset?.href})]});var R}},57003:(e,t,s)=>{s.d(t,{A:()=>g});var o=s(51609),n=s(27723),r=s(85703),a=s(56427),i=s(98846),c=s(1455),l=s.n(c),d=s(68292),m=s(65219),u=s(90212),p=s(39826),_=s(57309),h=s(39793);const g=()=>{const{closeModal:e,currentStep:t,sessionEntryPoint:s,navigateToNextStep:c,refreshStoreData:g,getStepByKey:y}=(0,m.w)(),[w,b]=(0,o.useState)(!1),x=y(_.CX)?.actions,f=x?.finish?.href;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(d.A,{onClose:e}),(0,h.jsx)("div",{className:"settings-payments-onboarding-modal__step--content",children:(0,h.jsx)("div",{className:"woocommerce-payments-test-or-live-account-step__success_content_container",children:(0,h.jsxs)("div",{className:"woocommerce-woopayments-modal__content woocommerce-payments-test-or-live-account-step__success_content",children:[(0,h.jsx)("h1",{className:"woocommerce-payments-test-or-live-account-step__success_content_title",children:(0,n.__)("You're almost there — time to activate payments!","woocommerce")}),t?.errors&&t.errors.length>0&&(0,h.jsx)(a.Notice,{status:"error",isDismissible:!1,className:"woocommerce-payments-test-or-live-account-step__error",role:"alert",children:(0,h.jsx)("p",{children:t.errors[0]?.message||(0,n.__)("Something went wrong. Please try again.","woocommerce")})}),(0,h.jsxs)("div",{className:"woocommerce-payments-test-or-live-account-step__success-whats-next",children:[(0,h.jsxs)("div",{className:"woocommerce-woopayments-modal__content__item-flex",children:[(0,h.jsx)("img",{src:u.GZ+"images/icons/dollar.svg",alt:"",role:"presentation"}),(0,h.jsxs)("div",{className:"woocommerce-woopayments-modal__content__item-flex__description",children:[(0,h.jsx)("h3",{children:(0,n.__)("Activate payments in two easy steps","woocommerce")}),(0,h.jsx)("div",{children:(0,n.__)("Answer a few questions and verify your business details with our payments partner, including owner, address, and bank information.","woocommerce")})]})]}),(0,h.jsx)(a.Button,{variant:"primary",onClick:()=>{if(b(!0),(0,p.W7)("woopayments_onboarding_modal_click",{step:t?.id||"unknown",action:"activate_payments",source:s}),f){const e=x?.finish?.href;e&&l()({url:e,method:"POST"}).then(()=>{b(!1),g()}).catch(()=>{b(!1)})}else{const e=y(_.kE),t=e?.actions?.start?.href;t&&l()({url:t,method:"POST"}).then(()=>{b(!1),g()}).catch(()=>{b(!1)})}},isBusy:w,disabled:w,children:(0,n.__)("Activate payments","woocommerce")}),(0,h.jsx)(i.Link,{className:"woocommerce-payments-test-or-live-account-step__learn-more",href:"https://woocommerce.com/document/woopayments/startup-guide/#sign-up-process",target:"_blank",rel:"noreferrer",type:"external","aria-label":(0,n.__)("Learn more about the WooPayments sign-up process (opens in a new tab)","woocommerce"),children:(0,n.__)("Learn more","woocommerce")})]}),f&&(0,h.jsxs)("div",{className:"woocommerce-payments-test-or-live-account-step__success-whats-next",children:[(0,h.jsxs)("div",{className:"woocommerce-woopayments-modal__content__item-flex",children:[(0,h.jsx)("img",{src:u.GZ+"images/icons/post-list.svg",alt:"",role:"presentation"}),(0,h.jsxs)("div",{className:"woocommerce-woopayments-modal__content__item-flex__description",children:[(0,h.jsx)("h3",{children:(0,n.__)("Test payments first, activate later","woocommerce")}),(0,h.jsx)("div",{children:(0,h.jsx)("p",{children:(0,r.A)({mixedString:(0,n.__)("A test account will be created for you to {{link}}test payments on your store{{/link}}. You'll still need to activate payments later to process real transactions.","woocommerce"),components:{link:(0,h.jsx)(i.Link,{href:"https://woocommerce.com/document/woopayments/testing-and-troubleshooting/test-accounts/",target:"_blank",rel:"noreferrer",type:"external"})}})})})]})]}),(0,h.jsx)(a.Button,{variant:"secondary",disabled:w,onClick:()=>{c()},children:(0,n.__)("Test payments","woocommerce")})]})]})})})]})}},46873:(e,t,s)=>{s.d(t,{A:()=>u}),s(51609);var o=s(27723),n=s(56427),r=s(86087),a=s(1455),i=s.n(a),c=s(65219),l=s(68292),d=s(39826),m=s(39793);const u=()=>{const{currentStep:e,closeModal:t,sessionEntryPoint:s}=(0,c.w)(),[a,u]=(0,r.useState)(!1);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l.A,{onClose:t}),e?.errors&&e.errors.length>0&&(0,m.jsx)(n.Notice,{status:"error",isDismissible:!1,className:"settings-payments-onboarding-modal__step-jetpack-error",role:"alert",children:(0,m.jsx)("p",{children:e.errors[0]?.message||(0,o.__)("Something went wrong. Please try again.","woocommerce")})}),(0,m.jsx)("div",{className:"settings-payments-onboarding-modal__step--content",children:(0,m.jsxs)("div",{className:"settings-payments-onboarding-modal__step--content-jetpack",children:[(0,m.jsx)("h1",{className:"settings-payments-onboarding-modal__step--content-jetpack-title",children:(0,o.__)("Connect to WordPress.com","woocommerce")}),(0,m.jsx)("p",{className:"settings-payments-onboarding-modal__step--content-jetpack-description",children:(0,o.__)("You’ll be briefly redirected to connect your store to your WordPress.com account and unlock the full features and functionality of WooPayments","woocommerce")}),(0,m.jsx)(n.Button,{variant:"primary",className:"settings-payments-onboarding-modal__step--content-jetpack-button",isBusy:a,disabled:a,onClick:()=>{u(!0);const t=e?.actions?.start?.href;t&&i()({url:t,method:"POST",data:{source:s}}),(0,d.W7)("woopayments_onboarding_modal_click",{step:e?.id||"unknown",action:"connect_to_wpcom",source:s}),window.location.href=e?.actions?.auth?.href??""},children:(0,o.__)("Connect","woocommerce")})]})})]})}}}]);

Directory Contents

Dirs: 0 × Files: 149
Name Size Perms Modified Actions
806 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
806 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
12.56 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
7.62 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
808 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
66.07 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
66.06 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
1.83 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
1.83 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
50.58 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
5.44 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
5.44 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
3.52 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
3.52 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
25.88 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
25.88 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
3.29 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
9.83 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
9.83 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
5.10 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
5.11 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
66.86 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
66.86 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
16.11 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
48.08 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
48.07 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
24.33 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
15.80 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
2.18 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
2.18 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
715 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
715 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
54.16 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
30.76 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
30.75 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.82 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.82 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
14.10 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
13.69 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
99 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.21 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.21 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
2.88 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
2.88 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
80.96 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
240 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
49.33 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
49.31 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
10.99 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
10.99 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
8.85 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
8.85 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
5.03 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
5.03 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
45.09 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
531 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
6.60 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
6.60 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
5.03 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
5.03 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
6.13 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
6.13 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
66.33 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
808 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
53.40 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
1.24 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
1.24 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
55.58 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.21 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.21 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.82 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.82 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
25.80 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
25.80 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
112.00 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
50.19 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
50.19 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
13.13 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
731 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
12.01 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
23.20 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
23.20 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
1.50 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
1.50 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
11.90 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
11.91 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
12.85 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
12.85 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.17 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
101.70 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
8.01 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
8.01 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
3.09 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
7.96 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
7.95 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
6.74 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
10.22 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
9.02 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
12.02 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
6.42 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
13.12 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
17.61 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
14.01 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
19.73 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
9.06 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
14.55 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
9.81 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
12.75 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
16.01 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
1.36 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
18.61 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
82.63 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
18.06 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
29.56 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
121 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
27.26 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
958 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
44.55 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
89.74 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
68.80 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
121 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.16 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
91.18 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
3.18 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
43.10 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
12.22 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.64 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
5.97 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
48.48 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
2.30 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
377 B lrw-r--r-- 2026-08-11 10:05:45
Edit Download
21.99 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
6.40 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
4.45 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
14.28 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
26.76 KB lrw-r--r-- 2026-08-11 10:05:45
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 0xNothings — Secure File Manager. All rights reserved. Built with ❤️ & Tailwind x Dark UI