diff --git a/build/next-steps-portal/bundle.asset.php b/build/next-steps-portal/bundle.asset.php index b5917b9..089d981 100644 --- a/build/next-steps-portal/bundle.asset.php +++ b/build/next-steps-portal/bundle.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '6fa3e01c448e3b46a1a0'); + array('lodash', 'react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '594fc13a9cf01d02d99d'); diff --git a/build/next-steps-portal/bundle.js b/build/next-steps-portal/bundle.js index e16f19d..dacfa12 100644 --- a/build/next-steps-portal/bundle.js +++ b/build/next-steps-portal/bundle.js @@ -1 +1 @@ -(()=>{var e={183:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},530:(e,t)=>{var s;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e="",t=0;t{e.exports=s(856)()},856:(e,t,s)=>{"use strict";var n=s(183);function a(){}function r(){}r.resetWarningCache=a,e.exports=function(){function e(e,t,s,a,r,i){if(i!==n){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}function t(){return e}e.isRequired=e;var s={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:a};return s.PropTypes=s,s}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,s),r.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.domReady;var t=s.n(e);const n=window.wp.element;var a=s(530),r=s.n(a);const i=window.lodash;var d=s(598),l=s.n(d);const o={variant:{default:"",primary:"nfd-text-primary-500",white:"nfd-text-white"},size:{3:"nfd-w-3 nfd-h-3",4:"nfd-w-4 nfd-h-4",8:"nfd-w-8 nfd-h-8"}},c=(0,n.forwardRef)((({variant:e,size:t,className:s},a)=>{const i=((e=null)=>(0,n.useMemo)((()=>{const t={role:"img","aria-hidden":"true"};return null!==e&&(t.focusable=e?"true":"false"),t}),[e]))();return(0,n.createElement)("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg/",fill:"none",viewBox:"0 0 24 24",className:r()("nfd-animate-spin",o.variant[e],o.size[t],s),...i},(0,n.createElement)("circle",{className:"nfd-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.createElement)("path",{className:"nfd-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))})),f={variant:l().oneOf((0,i.keys)(o.variant)),size:l().oneOf((0,i.keys)(o.size)),className:l().string};c.propTypes=f,c.defaultProps={variant:"default",size:"4",className:""};const p=e=>(0,n.createElement)(c,{...e});p.propTypes=f,p.defaultProps=c.defaultProps,p.displayName="Spinner";const u=c,m={variant:{primary:"nfd-button--primary",secondary:"nfd-button--secondary",error:"nfd-button--error",upsell:"nfd-button--upsell"},size:{default:"",small:"nfd-button--small",large:"nfd-button--large"}},x=(0,n.forwardRef)((({children:e,as:t,type:s,variant:a,size:i,isLoading:d,disabled:l,className:o,...c},f)=>(0,n.createElement)(t,{type:s||"button"===t&&"button"||void 0,disabled:l,ref:f,className:r()("nfd-button",m.variant[a],m.size[i],d&&"nfd-cursor-wait",l&&"nfd-button--disabled",o),...c},d&&(0,n.createElement)(u,{size:"small"===i?"3":"4",className:"nfd-mr-2"}),e))),h={children:l().node.isRequired,as:l().elementType,type:l().oneOf(["button","submit","reset"]),variant:l().oneOf((0,i.keys)(m.variant)),size:l().oneOf((0,i.keys)(m.size)),isLoading:l().bool,disabled:l().bool,className:l().string};x.propTypes=h,x.defaultProps={as:"button",type:void 0,variant:"primary",size:"default",isLoading:!1,disabled:!1,className:""};const w=x,k=e=>(0,n.createElement)(x,{...e});k.propTypes=h,k.defaultProps=x.defaultProps,k.displayName="Button";const v=window.wp.i18n,b=window.wp.apiFetch;var g=s.n(b);const j=window.React;function y({title:e,titleId:t,...s},n){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const N=j.forwardRef(y);function _({title:e,titleId:t,...s},n){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const E=j.forwardRef(_);function C({title:e,titleId:t,...s},n){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const O=j.forwardRef(C);function R({title:e,titleId:t,...s},n){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const z=j.forwardRef(R);function L({title:e,titleId:t,...s},n){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const T=j.forwardRef(L);function M({title:e,titleId:t,...s},n){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const P=j.forwardRef(M);function U({title:e,titleId:t,...s},n){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 0 1-.982-3.172M9.497 14.25a7.454 7.454 0 0 0 .981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 0 0 7.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 0 0 2.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 0 1 2.916.52 6.003 6.003 0 0 1-5.395 4.972m0 0a6.726 6.726 0 0 1-2.749 1.35m0 0a6.772 6.772 0 0 1-3.044 0"}))}const S=j.forwardRef(U);function B({title:e,titleId:t,...s},n){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?j.createElement("title",{id:t},e):null,j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const I=j.forwardRef(B);function W({title:e,titleId:t,...s},n){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?j.createElement("title",{id:t},e):null,j.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const A=j.forwardRef(W),D=window.ReactJSXRuntime,H=(0,D.jsx)(N,{className:"size-6"}),V=(0,D.jsx)(E,{className:"size-6"}),Z=(0,D.jsx)(O,{className:"size-6"}),F=(0,D.jsx)(z,{className:"size-6"}),q=(0,D.jsx)(T,{className:"size-6"}),$=(0,D.jsx)(A,{className:"size-6"}),J=(0,D.jsx)(P,{className:"size-6"}),X=(0,D.jsx)(S,{className:"size-6"}),Y=(0,D.jsx)(I,{className:"size-6"}),G=(0,D.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",fill:"none",className:"size-6",children:(0,D.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.716 3.165a9 9 0 0 1 3.315 1.373m2.43 2.429a9 9 0 0 1 1.374 3.316m0 3.434a9 9 0 0 1-1.373 3.315m-2.43 2.43a9 9 0 0 1-3.316 1.373m-3.432 0a9 9 0 0 1-3.316-1.373m-2.43-2.43a9 9 0 0 1-1.373-3.315m0-3.434a9 9 0 0 1 1.373-3.315m2.43-2.43a9 9 0 0 1 3.316-1.373"})}),K=(0,D.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",fill:"none",className:"size-6",children:(0,D.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"})}),Q=(0,D.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg/",fill:"none",viewBox:"0 0 24 24",class:"next-steps-spinner nfd-animate-spin nfd-w-8 nfd-h-8",role:"img","aria-hidden":"true",children:[(0,D.jsx)("circle",{class:"nfd-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),(0,D.jsx)("path",{class:"nfd-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),ee={size:{1:"nfd-title--1",2:"nfd-title--2",3:"nfd-title--3",4:"nfd-title--4",5:"nfd-title--5"}},te=(0,n.forwardRef)((({children:e,as:t,size:s,className:a,...i},d)=>(0,n.createElement)(t,{ref:d,className:r()("nfd-title",ee.size[s||t[1]],a),...i},e))),se={children:l().node.isRequired,as:l().elementType,size:l().oneOf(Object.keys(ee.size)),className:l().string};te.propTypes=se,te.defaultProps={as:"h1",size:void 0,className:""};const ne=e=>(0,n.createElement)(te,{...e});ne.propTypes=se,ne.defaultProps=te.defaultProps,ne.displayName="Title";const ae=te,re=({completed:e,total:t})=>{const s=t?Math.round(e/t*100):0;return(0,D.jsxs)("div",{className:`nfd-progress-bar nfd-progress-bar-${s}`,children:[(0,D.jsx)("div",{className:"nfd-progress-bar-inner","data-percent":s,style:{width:`${s}%`}}),(0,D.jsxs)("span",{className:"nfd-progress-bar-label",children:[e,"/",t]})]})},ie=e=>{const{task:t,taskUpdateCallback:s,track:a,section:r,showDismissed:i,...d}=e,{id:l,title:o="",href:c,data_attributes:f={}}=t,[p,u]=(0,n.useState)(t.status),m=e=>{const t=p;u(e),s(a,r,l,e,(e=>{u(t),console.error("Error updating task status. Please, try reloading the page to load the latest data.",e)}),(t=>{u(e)}))},x=()=>{let e=c;return e.includes("{siteUrl}")&&(e=c.replace("{siteUrl}",window.NewfoldRuntime.siteUrl)),window.NewfoldRuntime?.linkTracker?.addUtmParams(e)||e},h=()=>c.includes("{siteUrl}")||c.includes(window.NewfoldRuntime.siteUrl)?"":"_blank",w={...(()=>{const e={};return Object.entries(f).forEach((([t,s])=>{const n=t.startsWith("data-")?t:`data-${t}`;e[n]="boolean"==typeof s?s?"true":"false":s})),e})()},k=(e=!1,t="")=>(0,D.jsxs)("div",{className:"nfd-nextsteps-step-content nfd-flex nfd-flex-col nfd-justify-between",children:[e&&(0,D.jsx)("a",{href:e,target:t,children:(0,D.jsx)(ae,{as:"span",className:"nfd-nextsteps-step-title nfd-font-normal",children:o})}),!e&&(0,D.jsx)(ae,{as:"span",className:"nfd-nextsteps-step-title nfd-font-normal",children:o})]});return(0,D.jsxs)(D.Fragment,{children:["new"===p&&(0,D.jsx)("div",{className:"nfd-nextsteps-step-container",id:l,...w,children:(0,D.jsxs)("div",{className:"nfd-nextsteps-step nfd-nextsteps-step-new nfd-flex nfd-flex-row nfd-justify-start nfd-items-center nfd-gap-4",children:[(0,D.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-end",children:(0,D.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-todo","data-nfd-click":"nextsteps_step_check","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":l,onClick:e=>m("done"),title:(0,v.__)("Mark Complete","wp-module-next-steps"),children:K})}),k(x(),h()),(0,D.jsxs)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-4 nfd-justify-end nfd-ml-auto",children:[(0,D.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-dismiss","data-nfd-click":"nextsteps_step_dismiss","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":l,onClick:e=>m("dismissed"),title:(0,v.__)("Skip","wp-module-next-steps"),children:F}),(0,D.jsx)("a",{className:"nfd-nextsteps-button nfd-nextsteps-button-link","data-nfd-click":"nextsteps_step_link","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":l,href:x(),target:h(),title:o,children:J})]})]})}),"done"===p&&(0,D.jsx)("div",{className:"nfd-nextsteps-step-container",id:l,...w,children:(0,D.jsxs)("div",{className:"nfd-nextsteps-step nfd-nextsteps-step-done nfd-flex nfd-flex-row nfd-justify-start nfd-items-center nfd-gap-4",children:[(0,D.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-end",children:(0,D.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-redo","data-nfd-click":"nextsteps_step_redo","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":l,onClick:e=>m("new"),title:(0,v.__)("Restart","wp-module-next-steps"),children:$})}),k(x(),h())]})}),"dismissed"===p&&i&&(0,D.jsx)("div",{className:"nfd-nextsteps-step-container",id:l,...w,children:(0,D.jsxs)("div",{className:"nfd-nextsteps-step nfd-nextsteps-step-dismissed nfd-flex nfd-flex-row nfd-justify-start nfd-items-center nfd-gap-4",children:[(0,D.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-end",children:(0,D.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-redo","data-nfd-click":"nextsteps_step_redo","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":l,onClick:e=>m("new"),title:(0,v.__)("Unskip","wp-module-next-steps"),children:G})}),k(x(),h()),(0,D.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-4 nfd-justify-end nfd-ml-auto",children:(0,D.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-dismiss","data-nfd-click":"nextsteps_step_dismiss","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":l,onClick:e=>m("new"),title:(0,v.__)("Unskip","wp-module-next-steps"),children:q})})]})})]})},de=e=>{const{section:t,index:s,taskUpdateCallback:a,sectionOpenCallback:r,track:i,showDismissed:d,...l}=e,[o,c]=(0,n.useState)(!0),[f,p]=(0,n.useState)(!1),[u,m]=(0,n.useState)(void 0!==t.open?t.open:0===s),x=t.tasks.filter((e=>"done"===e.status)).length,h=t.tasks.filter((e=>"dismissed"!==e.status)).length;(0,n.useEffect)((()=>{x===h&&c(!1)}),[]),(0,n.useEffect)((()=>{if(h===x){const e=setTimeout((()=>{p(!f)}),100);return()=>clearTimeout(e)}}),[o,x,h]);const w=(e,s=null)=>{const n=null!==s?s:e.target.open;r(t.id,n),m(n)};return(h>0||!0===d)&&(0,D.jsxs)("details",{className:"nfd-section",open:u,onToggle:w,children:[(0,D.jsxs)("summary",{className:"nfd-section-header",children:[(0,D.jsxs)(ae,{className:"nfd-section-title mb-0",as:"h3",children:[(0,D.jsxs)("span",{className:"nfd-section-header-icon nfd-header-icon",children:[(0,D.jsx)("span",{className:"nfd-section-header-icon-closed",children:V}),(0,D.jsx)("span",{className:"nfd-section-header-icon-opened",children:Z})]}),t.label]}),h>0&&(0,D.jsx)(re,{completed:x,total:h})]}),(0,D.jsx)("div",{className:"nfd-section-steps",children:t.tasks.map((e=>(0,D.jsx)(ie,{task:e,taskUpdateCallback:a,showDismissed:d,track:i,section:t.id},e.id)))}),o&&(0,D.jsxs)("div",{className:"nfd-section-complete","data-complete":f,onClick:e=>{c(!1),w(e,!1)},children:[(0,D.jsx)("button",{className:"nfd-nextsteps-section-close-button",title:(0,v.__)("Close","wp-module-next-steps"),children:Y}),(0,D.jsx)("div",{className:"nfd-section-celebrate",children:X}),(0,D.jsx)("p",{className:"nfd-section-celebrate-text",children:(0,v.__)("All complete!","wp-module-next-steps")})]})]})},le=e=>{const{track:t,index:s,taskUpdateCallback:n,sectionOpenCallback:a,trackOpenCallback:r,showDismissed:i,...d}=e,l=t.hasOwnProperty("open")?t.open:0===s;return(0,D.jsxs)("details",{className:"nfd-track",open:l,onToggle:e=>{const s=e.target.open;r(t.id,s)},children:[(0,D.jsxs)("summary",{className:"nfd-track-header",children:[(0,D.jsx)(ae,{className:"nfd-track-title mb-0",as:"h2",children:t.label}),(0,D.jsx)("span",{className:"nfd-track-header-icon nfd-header-icon",children:H})]}),(0,D.jsx)("div",{className:"nfd-track-sections",children:t.sections.map(((e,s)=>(0,D.jsx)(de,{section:e,index:s,taskUpdateCallback:n,sectionOpenCallback:a,track:t.id,showDismissed:i},e.id)))})]})},oe=(e,t)=>e.includes("?")?e+encodeURIComponent(t):e+t,ce=()=>{const[e,t]=(0,n.useState)(window.NewfoldNextSteps),[s,a]=(0,n.useState)(!0),[r,i]=(0,n.useState)(!1),d=(t,s,n,a,r,i)=>{var d;d={plan:e.id,track:t,section:s,task:n,status:a},g()({url:oe(window.NewfoldRuntime.restUrl,"newfold-next-steps/v1/steps/status"),method:"PUT",data:d}).then((e=>{(e=>{i(e)})(e)})).catch((e=>{(e=>{r(e)})(e)}))},l=(t,s)=>{let n=null;if(e&&e.tracks)for(const s of e.tracks)if(s.sections&&s.sections.some((e=>e.id===t))){n=s.id;break}var a;n&&(a={plan:e.id,track:n,section:t,open:s},g()({url:oe(window.NewfoldRuntime.restUrl,"newfold-next-steps/v1/steps/section/open"),method:"PUT",data:a}).then((e=>{})).catch((e=>{})))},o=(t,s)=>{var n;n={plan:e.id,track:t,open:s},g()({url:oe(window.NewfoldRuntime.restUrl,"newfold-next-steps/v1/steps/track/open"),method:"PUT",data:n}).then((e=>{})).catch((e=>{}))};return e&&e.tracks?(0,D.jsxs)("div",{className:"nfd-nextsteps",id:"nfd-nextsteps",children:[(0,D.jsx)("p",{className:"nfd-pb-4",children:e.description}),e.tracks.map(((e,t)=>(0,D.jsx)(le,{track:e,index:t,trackOpenCallback:o,sectionOpenCallback:l,taskUpdateCallback:d,showDismissed:s},e.id))),r&&(0,D.jsx)("div",{className:"nfd-nextsteps-filters nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-center",children:(0,D.jsxs)(w,{className:"nfd-nextsteps-filter-button","data-nfd-click":"nextsteps_step_toggle","data-nfd-event-category":"nextsteps_toggle","data-nfd-event-key":"toggle",onClick:()=>{a(!s)},variant:"secondary",children:[F,s?(0,v.__)("Hide skipped tasks","wp-module-next-steps"):(0,v.__)("View skipped tasks","wp-module-next-steps")]})})]}):(0,D.jsxs)("div",{className:"nfd-nextsteps",id:"nfd-nextsteps",children:[Q,(0,D.jsx)("p",{children:(0,v.__)("Loading next steps...","wp-module-next-steps")})]})},fe=()=>{const[e,t]=(0,n.useState)(null);return(0,n.useEffect)((()=>{const e=window.NFDPortalRegistry;if(!e)return;const s=e=>{t(e)};e.onReady("next-steps",s),e.onRemoved("next-steps",(()=>{t(null)}));const n=e.getElement("next-steps");n&&s(n)}),[e]),e?(0,n.createPortal)((0,D.jsx)("div",{className:"next-steps-fill",children:(0,D.jsx)(ce,{})}),e):null};let pe=null;const ue=()=>(0,D.jsx)(fe,{});t()((()=>{const e=document.getElementById("nfd-next-steps-portal");null!==e&&void 0!==n.createRoot&&(pe||(pe=(0,n.createRoot)(e)),pe.render((0,D.jsx)(ue,{})))}))})()})(); \ No newline at end of file +(()=>{var e={183:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},530:(e,t)=>{var n;!function(){"use strict";var s={}.hasOwnProperty;function r(){for(var e="",t=0;t{e.exports=n(856)()},856:(e,t,n)=>{"use strict";var s=n(183);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,o){if(o!==s){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}}},t={};function n(s){var r=t[s];if(void 0!==r)return r.exports;var a=t[s]={exports:{}};return e[s](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.domReady;var t=n.n(e);const s=window.wp.element,r=window.wp.i18n;var a=n(530),o=n.n(a);const i=window.lodash;var d=n(598),l=n.n(d);const c={variant:{default:"",primary:"nfd-text-primary-500",white:"nfd-text-white"},size:{3:"nfd-w-3 nfd-h-3",4:"nfd-w-4 nfd-h-4",8:"nfd-w-8 nfd-h-8"}},p=(0,s.forwardRef)((({variant:e,size:t,className:n},r)=>{const a=((e=null)=>(0,s.useMemo)((()=>{const t={role:"img","aria-hidden":"true"};return null!==e&&(t.focusable=e?"true":"false"),t}),[e]))();return(0,s.createElement)("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg/",fill:"none",viewBox:"0 0 24 24",className:o()("nfd-animate-spin",c.variant[e],c.size[t],n),...a},(0,s.createElement)("circle",{className:"nfd-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.createElement)("path",{className:"nfd-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))})),f={variant:l().oneOf((0,i.keys)(c.variant)),size:l().oneOf((0,i.keys)(c.size)),className:l().string};p.propTypes=f,p.defaultProps={variant:"default",size:"4",className:""};const u=e=>(0,s.createElement)(p,{...e});u.propTypes=f,u.defaultProps=p.defaultProps,u.displayName="Spinner";const m=p,x={variant:{primary:"nfd-button--primary",secondary:"nfd-button--secondary",error:"nfd-button--error",upsell:"nfd-button--upsell"},size:{default:"",small:"nfd-button--small",large:"nfd-button--large"}},h=(0,s.forwardRef)((({children:e,as:t,type:n,variant:r,size:a,isLoading:i,disabled:d,className:l,...c},p)=>(0,s.createElement)(t,{type:n||"button"===t&&"button"||void 0,disabled:d,ref:p,className:o()("nfd-button",x.variant[r],x.size[a],i&&"nfd-cursor-wait",d&&"nfd-button--disabled",l),...c},i&&(0,s.createElement)(m,{size:"small"===a?"3":"4",className:"nfd-mr-2"}),e))),w={children:l().node.isRequired,as:l().elementType,type:l().oneOf(["button","submit","reset"]),variant:l().oneOf((0,i.keys)(x.variant)),size:l().oneOf((0,i.keys)(x.size)),isLoading:l().bool,disabled:l().bool,className:l().string};h.propTypes=w,h.defaultProps={as:"button",type:void 0,variant:"primary",size:"default",isLoading:!1,disabled:!1,className:""};const k=h,g=e=>(0,s.createElement)(h,{...e});g.propTypes=w,g.defaultProps=h.defaultProps,g.displayName="Button";const v=window.React;function b({title:e,titleId:t,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?v.createElement("title",{id:t},e):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const j=v.forwardRef(b);function y({title:e,titleId:t,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?v.createElement("title",{id:t},e):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const N=v.forwardRef(y);function E({title:e,titleId:t,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?v.createElement("title",{id:t},e):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const _=v.forwardRef(E);function C({title:e,titleId:t,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?v.createElement("title",{id:t},e):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const S=v.forwardRef(C);function R({title:e,titleId:t,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?v.createElement("title",{id:t},e):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const O=v.forwardRef(R);function T({title:e,titleId:t,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?v.createElement("title",{id:t},e):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const P=v.forwardRef(T);function I({title:e,titleId:t,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?v.createElement("title",{id:t},e):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 0 1-.982-3.172M9.497 14.25a7.454 7.454 0 0 0 .981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 0 0 7.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 0 0 2.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 0 1 2.916.52 6.003 6.003 0 0 1-5.395 4.972m0 0a6.726 6.726 0 0 1-2.749 1.35m0 0a6.772 6.772 0 0 1-3.044 0"}))}const z=v.forwardRef(I);function U({title:e,titleId:t,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?v.createElement("title",{id:t},e):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const L=v.forwardRef(U);function M({title:e,titleId:t,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},n),e?v.createElement("title",{id:t},e):null,v.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const D=v.forwardRef(M),A=window.ReactJSXRuntime,B=(0,A.jsx)(j,{className:"size-6"}),W=(0,A.jsx)(N,{className:"size-6"}),q=(0,A.jsx)(_,{className:"size-6"}),$=(0,A.jsx)(S,{className:"size-6"}),F=(0,A.jsx)(O,{className:"size-6"}),H=(0,A.jsx)(D,{className:"size-6"}),V=(0,A.jsx)(P,{className:"size-6"}),Z=(0,A.jsx)(z,{className:"size-6"}),J=(0,A.jsx)(L,{className:"size-6"}),X=(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",fill:"none",className:"size-6",children:(0,A.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.716 3.165a9 9 0 0 1 3.315 1.373m2.43 2.429a9 9 0 0 1 1.374 3.316m0 3.434a9 9 0 0 1-1.373 3.315m-2.43 2.43a9 9 0 0 1-3.316 1.373m-3.432 0a9 9 0 0 1-3.316-1.373m-2.43-2.43a9 9 0 0 1-1.373-3.315m0-3.434a9 9 0 0 1 1.373-3.315m2.43-2.43a9 9 0 0 1 3.316-1.373"})}),Y=(0,A.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",fill:"none",className:"size-6",children:(0,A.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"})}),G=(0,A.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg/",fill:"none",viewBox:"0 0 24 24",class:"next-steps-spinner nfd-animate-spin nfd-w-8 nfd-h-8",role:"img","aria-hidden":"true",children:[(0,A.jsx)("circle",{class:"nfd-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),(0,A.jsx)("path",{class:"nfd-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),K={size:{1:"nfd-title--1",2:"nfd-title--2",3:"nfd-title--3",4:"nfd-title--4",5:"nfd-title--5"}},Q=(0,s.forwardRef)((({children:e,as:t,size:n,className:r,...a},i)=>(0,s.createElement)(t,{ref:i,className:o()("nfd-title",K.size[n||t[1]],r),...a},e))),ee={children:l().node.isRequired,as:l().elementType,size:l().oneOf(Object.keys(K.size)),className:l().string};Q.propTypes=ee,Q.defaultProps={as:"h1",size:void 0,className:""};const te=e=>(0,s.createElement)(Q,{...e});te.propTypes=ee,te.defaultProps=Q.defaultProps,te.displayName="Title";const ne=Q,se=(0,s.memo)((({completed:e,total:t})=>{const n=t?Math.round(e/t*100):0;return(0,A.jsxs)("div",{className:`nfd-progress-bar nfd-progress-bar-${n}`,children:[(0,A.jsx)("div",{className:"nfd-progress-bar-inner","data-percent":n,style:{width:`${n}%`}}),(0,A.jsxs)("span",{className:"nfd-progress-bar-label",children:[e,"/",t]})]})})),re=(0,s.memo)((e=>{const{index:t,sectionId:n,showDismissed:a,task:o,taskUpdateCallback:i,trackId:d}=e,{id:l,title:c="",href:p,data_attributes:f={}}=o,[u,m]=(0,s.useState)(o.status);(0,s.useEffect)((()=>{m(o.status)}),[o.status]);const x=e=>{const t=u;m(e),i(d,n,l,e,(e=>{m(t)}),(t=>{m(e)}))},h=()=>{let e=p;return e.includes("{siteUrl}")&&(e=p.replace("{siteUrl}",window.NewfoldRuntime.siteUrl)),window.NewfoldRuntime?.linkTracker?.addUtmParams(e)||e},w=()=>p.includes("{siteUrl}")||p.includes(window.NewfoldRuntime.siteUrl)?"":"_blank",k={...(()=>{const e={"data-nfd-task-index":t,"data-nfd-task-id":l,"data-nfd-task-status":u};return Object.entries(f).forEach((([t,n])=>{const s=t.startsWith("data-")?t:`data-${t}`;e[s]="boolean"==typeof n?n?"true":"false":n})),e})()},g=(e=!1,t="")=>(0,A.jsxs)("div",{className:"nfd-nextsteps-step-content nfd-flex nfd-flex-col nfd-justify-between",children:[e&&(0,A.jsx)("a",{href:e,target:t,children:(0,A.jsx)(ne,{as:"span",className:"nfd-nextsteps-step-title nfd-font-normal",children:c})}),!e&&(0,A.jsx)(ne,{as:"span",className:"nfd-nextsteps-step-title nfd-font-normal",children:c})]});return(0,A.jsxs)(A.Fragment,{children:["new"===u&&(0,A.jsx)("div",{className:"nfd-nextsteps-step-container",id:l,...k,children:(0,A.jsxs)("div",{className:"nfd-nextsteps-step nfd-nextsteps-step-new nfd-flex nfd-flex-row nfd-justify-start nfd-items-center nfd-gap-4",children:[(0,A.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-end",children:(0,A.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-todo","data-nfd-click":"nextsteps_step_check","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":l,onClick:e=>x("done"),title:(0,r.__)("Mark Complete","wp-module-next-steps"),children:Y})}),g(h(),w()),(0,A.jsxs)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-4 nfd-justify-end nfd-ml-auto",children:[(0,A.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-dismiss","data-nfd-click":"nextsteps_step_dismiss","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":l,onClick:e=>x("dismissed"),title:(0,r.__)("Skip","wp-module-next-steps"),children:$}),(0,A.jsx)("a",{className:"nfd-nextsteps-button nfd-nextsteps-button-link","data-nfd-click":"nextsteps_step_link","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":l,href:h(),target:w(),title:c,children:V})]})]})}),"done"===u&&(0,A.jsx)("div",{className:"nfd-nextsteps-step-container",id:l,...k,children:(0,A.jsxs)("div",{className:"nfd-nextsteps-step nfd-nextsteps-step-done nfd-flex nfd-flex-row nfd-justify-start nfd-items-center nfd-gap-4",children:[(0,A.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-end",children:(0,A.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-redo","data-nfd-click":"nextsteps_step_redo","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":l,onClick:e=>x("new"),title:(0,r.__)("Restart","wp-module-next-steps"),children:H})}),g(h(),w())]})}),"dismissed"===u&&a&&(0,A.jsx)("div",{className:"nfd-nextsteps-step-container",id:l,...k,children:(0,A.jsxs)("div",{className:"nfd-nextsteps-step nfd-nextsteps-step-dismissed nfd-flex nfd-flex-row nfd-justify-start nfd-items-center nfd-gap-4",children:[(0,A.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-end",children:(0,A.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-redo","data-nfd-click":"nextsteps_step_redo","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":l,onClick:e=>x("new"),title:(0,r.__)("Unskip","wp-module-next-steps"),children:X})}),g(h(),w()),(0,A.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-4 nfd-justify-end nfd-ml-auto",children:(0,A.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-dismiss","data-nfd-click":"nextsteps_step_dismiss","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":l,onClick:e=>x("new"),title:(0,r.__)("Unskip","wp-module-next-steps"),children:F})})]})})]})}));class ae extends s.Component{constructor(e){super(e),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t),e.name?.includes("APIError")&&console.error("API Error Details:",{endpoint:e.data?.endpoint,requestData:e.data?.requestData,originalError:e.originalError,status:e.originalError?.status}),this.setState({error:e,errorInfo:t}),window.NewfoldRuntime?.capabilities?.canLogErrors&&this.logErrorToService(e,t)}logErrorToService=(e,t)=>{try{console.warn("Error logged:",{error:e.toString(),componentStack:t.componentStack,timestamp:(new Date).toISOString(),userAgent:navigator.userAgent,url:window.location.href})}catch(e){console.error("Failed to log error:",e)}};handleRetry=()=>{this.setState({hasError:!1,error:null,errorInfo:null})};render(){if(this.state.hasError){const{fallback:e,showDetails:t=!1}=this.props;if(e)return e;const n=this.state.error?.name?.includes("APIError"),s=n?(0,r.__)("We encountered a connection error. Please check your internet connection and try again.","wp-module-next-steps"):(0,r.__)("We encountered an unexpected error. Please try refreshing the page or contact support if the problem persists.","wp-module-next-steps");return(0,A.jsx)("div",{className:"nfd-error-boundary",children:(0,A.jsxs)("div",{className:"nfd-error-boundary-content",children:[(0,A.jsx)("h3",{children:n?(0,r.__)("Connection Error","wp-module-next-steps"):(0,r.__)("Something went wrong","wp-module-next-steps")}),(0,A.jsx)("p",{children:s}),(0,A.jsxs)("div",{className:"nfd-error-boundary-actions",children:[(0,A.jsx)(k,{variant:"primary",onClick:this.handleRetry,children:(0,r.__)("Try Again","wp-module-next-steps")}),(0,A.jsx)(k,{variant:"secondary",onClick:()=>window.location.reload(),children:(0,r.__)("Refresh Page","wp-module-next-steps")})]}),t&&this.state.error&&(0,A.jsxs)("details",{className:"nfd-error-boundary-details",children:[(0,A.jsx)("summary",{children:(0,r.__)("Technical Details","wp-module-next-steps")}),(0,A.jsxs)("pre",{className:"nfd-error-boundary-stack",children:[this.state.error.toString(),this.state.errorInfo.componentStack]})]})]})})}return this.props.children}}class oe extends s.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("Next Steps Error:",e,t),window.NewfoldRuntime?.restUrl&&this.reportNextStepsError(e,t)}reportNextStepsError=async(e,t)=>{try{console.warn("Next Steps error reported:",{module:"next-steps",error:e.message,stack:e.stack,componentStack:t.componentStack,timestamp:(new Date).toISOString()})}catch(e){console.error("Failed to report Next Steps error:",e)}};render(){return this.state.hasError?(0,A.jsx)("div",{className:"nfd-nextsteps-error",children:(0,A.jsxs)("div",{className:"nfd-nextsteps-error-content",children:[(0,A.jsx)("h3",{children:(0,r.__)("Next Steps Unavailable","wp-module-next-steps")}),(0,A.jsx)("p",{children:(0,r.__)("The Next Steps module encountered an error and cannot be displayed right now.","wp-module-next-steps")}),(0,A.jsx)(k,{variant:"primary",onClick:()=>window.location.reload(),children:(0,r.__)("Refresh Page","wp-module-next-steps")})]})}):this.props.children}}s.Component;const ie=(0,s.memo)((e=>{const{index:t,section:n,sectionOpenCallback:a,showDismissed:o,taskUpdateCallback:i,trackId:d}=e,{totalCount:l,completedCount:c,isComplete:p}=n.progress||{totalCount:0,completedCount:0,isComplete:!1},[f,u]=(0,s.useState)(!1),m=(0,s.useRef)(p),x=(0,s.useRef)(!0);return(0,s.useEffect)((()=>{p&&l>0&&!m.current&&!x.current&&u(!0),m.current=p,x.current=!1}),[p]),(l>0||!0===o)&&(0,A.jsxs)("details",{className:"nfd-section","data-nfd-section-id":n.id,"data-nfd-section-index":t,onToggle:e=>{e.stopPropagation();const t=e.target.open;a(d,n.id,t)},open:n.open,children:[(0,A.jsxs)("summary",{className:"nfd-section-header",children:[(0,A.jsxs)(ne,{className:"nfd-section-title mb-0",as:"h3",children:[(0,A.jsxs)("span",{className:"nfd-section-header-icon nfd-header-icon",children:[(0,A.jsx)("span",{className:"nfd-section-header-icon-closed",children:W}),(0,A.jsx)("span",{className:"nfd-section-header-icon-opened",children:q})]}),n.label]}),l>0&&(0,A.jsx)(se,{completed:c,total:l})]}),(0,A.jsx)("div",{className:"nfd-section-steps",children:n.tasks.map(((e,t)=>(0,A.jsx)(ae,{fallback:(0,A.jsx)("div",{className:"nfd-task-error",children:(0,A.jsx)("p",{children:(0,r.__)("Task temporarily unavailable","wp-module-next-steps")})}),children:(0,A.jsx)(re,{index:t,sectionId:n.id,showDismissed:o,task:e,taskUpdateCallback:i,trackId:d},e.id)},`task-boundary-${e.id}`)))}),(0,A.jsxs)("div",{className:"nfd-section-complete","data-complete":p,"data-show-celebration":f,onClick:e=>{u(!1),a(d,n.id,!1)},children:[(0,A.jsx)("button",{className:"nfd-nextsteps-section-close-button",title:(0,r.__)("Close","wp-module-next-steps"),children:J}),(0,A.jsx)("div",{className:"nfd-section-celebrate",children:Z}),(0,A.jsx)("p",{className:"nfd-section-celebrate-text",children:(0,r.__)("All complete!","wp-module-next-steps")})]})]})})),de=(0,s.memo)((e=>{const{index:t,track:n,sectionOpenCallback:s,showDismissed:r,taskUpdateCallback:a,trackOpenCallback:o}=e;return(0,A.jsxs)("details",{className:"nfd-track",onToggle:e=>{const t=e.target.open;o(n.id,t)},"data-nfd-track-id":n.id,"data-nfd-track-index":t,open:n.open,children:[(0,A.jsxs)("summary",{className:"nfd-track-header",children:[(0,A.jsx)(ne,{className:"nfd-track-title mb-0",as:"h2",children:n.label}),(0,A.jsx)("span",{className:"nfd-track-header-icon nfd-header-icon",children:B})]}),(0,A.jsx)("div",{className:"nfd-track-sections",children:n.sections.map(((e,t)=>(0,A.jsx)(ae,{fallback:(0,A.jsx)("div",{className:"nfd-section-error",children:(0,A.jsx)("p",{children:"Section temporarily unavailable"})}),children:(0,A.jsx)(ie,{index:t,section:e,sectionOpenCallback:s,showDismissed:r,taskUpdateCallback:a,trackId:n.id},e.id)},`section-boundary-${e.id}`)))})]})})),le=window.wp.apiFetch;var ce=n.n(le);const pe=e=>e.status>=500||!e.status||!!e.name?.includes("Critical")||401===e.status||403===e.status,fe=e=>{if(!e.tasks?.length)return{totalCount:0,completedCount:0,isComplete:!1,percentage:0};const t=e.tasks.filter((e=>"dismissed"!==e.status)).length,n=e.tasks.filter((e=>"done"===e.status)).length;return{totalCount:t,completedCount:n,isComplete:t>0&&n===t,percentage:t>0?Math.round(n/t*100):0}},ue=(e,t)=>e.includes("?")?e+encodeURIComponent(t):e+t,me=()=>{const[e,t]=(0,s.useState)(window.NewfoldNextSteps),[n,a]=(0,s.useState)(!0),[o,i]=(0,s.useState)(!1),d=(0,s.useMemo)((()=>e?(e=>e?.tracks?{...e,tracks:e.tracks.map((e=>({...e,sections:e.sections.map((e=>({...e,progress:fe(e)})))})))}:e)(e):null),[e]),l=(n,s,r,a,o,i)=>{var d;d={plan_id:e.id,track_id:n,section_id:s,task_id:r,status:a},ce()({url:ue(window.NewfoldRuntime.restUrl,"newfold-next-steps/v1/steps/status"),method:"PUT",data:d}).then((e=>{if(e&&e.error){const t=new Error(`Task update failed: ${e.error}`);throw t.name="TaskUpdateError",t.data={response:e,requestData:d},t}(e=>{t((e=>((e,t,n,s,r)=>({...e,tracks:e.tracks.map((e=>e.id===t?{...e,sections:e.sections.map((e=>{if(e.id===n){const t={...e,tasks:e.tasks.map((e=>e.id===s?{...e,status:r}:e))};return{...t,progress:fe(t)}}return e}))}:e))}))(e,n,s,r,a))),i(e)})(e)})).catch((e=>{const t=new Error(`Task update API error: ${e.message||"Unknown error"}`);if(t.name="TaskUpdateAPIError",t.originalError=e,t.data={requestData:d,endpoint:"steps/status"},(e=>{o(e)})(t),pe(e))throw t}))},c=(n,s,r)=>{var a;n&&s&&(a={plan_id:e.id,track_id:n,section_id:s,open:r},ce()({url:ue(window.NewfoldRuntime.restUrl,"newfold-next-steps/v1/steps/section/open"),method:"PUT",data:a}).then((e=>{if(e&&e.error){const t=new Error(`Section update failed: ${e.error}`);throw t.name="SectionUpdateError",t.data={response:e,requestData:a},t}t((e=>((e,t,n,s)=>({...e,tracks:e.tracks.map((e=>e.id===t?{...e,sections:e.sections.map((e=>e.id===n?{...e,open:s}:e))}:e))}))(e,n,s,r)))})).catch((e=>{const t=new Error(`Section update API error: ${e.message||"Unknown error"}`);if(t.name="SectionUpdateAPIError",t.originalError=e,t.data={requestData:a,endpoint:"steps/section/open"},pe(e))throw t})))},p=(n,s)=>{var r;r={plan_id:e.id,track_id:n,open:s},ce()({url:ue(window.NewfoldRuntime.restUrl,"newfold-next-steps/v1/steps/track/open"),method:"PUT",data:r}).then((e=>{if(e&&e.error){const t=new Error(`Track update failed: ${e.error}`);throw t.name="TrackUpdateError",t.data={response:e,requestData:r},t}t((e=>((e,t,n)=>({...e,tracks:e.tracks.map((e=>e.id===t?{...e,open:n}:e))}))(e,n,s)))})).catch((e=>{const t=new Error(`Track update API error: ${e.message||"Unknown error"}`);if(t.name="TrackUpdateAPIError",t.originalError=e,t.data={requestData:r,endpoint:"steps/track/open"},pe(e))throw t}))};return d&&d.tracks?(0,A.jsx)(oe,{children:(0,A.jsxs)("div",{className:"nfd-nextsteps","data-nfd-plan-id":d.id,id:"nfd-nextsteps",children:[(0,A.jsx)("p",{className:"nfd-pb-4",children:d.description}),d.tracks.map(((e,t)=>(0,A.jsx)(de,{index:t,sectionOpenCallback:c,showDismissed:n,taskUpdateCallback:l,track:e,trackOpenCallback:p},e.id))),o&&(0,A.jsx)("div",{className:"nfd-nextsteps-filters nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-center",children:(0,A.jsxs)(k,{className:"nfd-nextsteps-filter-button","data-nfd-click":"nextsteps_step_toggle","data-nfd-event-category":"nextsteps_toggle","data-nfd-event-key":"toggle",onClick:()=>{a(!n)},variant:"secondary",children:[$,n?(0,r.__)("Hide skipped tasks","wp-module-next-steps"):(0,r.__)("View skipped tasks","wp-module-next-steps")]})})]})}):(0,A.jsxs)("div",{className:"nfd-nextsteps",id:"nfd-nextsteps",children:[G,(0,A.jsx)("p",{children:(0,r.__)("Loading next steps...","wp-module-next-steps")})]})},xe=()=>{const[e,t]=(0,s.useState)(null);return(0,s.useEffect)((()=>{const e=window.NFDPortalRegistry;if(!e)return;const n=e=>{t(e)};e.onReady("next-steps",n),e.onRemoved("next-steps",(()=>{t(null)}));const s=e.getElement("next-steps");s&&n(s)}),[e]),e?(0,s.createPortal)((0,A.jsx)("div",{className:"next-steps-fill",children:(0,A.jsx)(me,{})}),e):null};let he=null;const we=()=>(0,A.jsx)(xe,{});t()((()=>{const e=document.getElementById("nfd-next-steps-portal");null!==e&&void 0!==s.createRoot&&(he||(he=(0,s.createRoot)(e)),he.render((0,A.jsx)(we,{})))}))})()})(); \ No newline at end of file diff --git a/build/next-steps-portal/bundle.js.map b/build/next-steps-portal/bundle.js.map index c60e8c9..8324f98 100644 --- a/build/next-steps-portal/bundle.js.map +++ b/build/next-steps-portal/bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.js","mappings":";;;;;;;;;;;;;;;AAA+B;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU,E;;;;;;;;;;;;;;;;ACzBM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU,E;;;;;;;;;;;;;;;;ACzBM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG,gBAAgB,gDAAmB;AACtC;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU,E;;;;;;;;;;;;;;;;AC7BM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU,E;;;;;;;;;;;;;;;;ACzBM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU,E;;;;;;;;;;;;;;;;ACzBM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU,E;;;;;;;;;;;;;;;;ACzBM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,g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AAI;AAC5B,aAAa,wDAAc;AAC3B,YAAY,wDAAc;AAC1B,aAAa,0DAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAe,MAAM,EAAC;;AAEtB;AACO,gCAAgC,iEAAa;AACpD;AACA,CAAC;AACD;AACA;AACA,sC;;;;;;;;;;;;;;;;;;;;;;;;;;AClFmD;AACf;AACN;AACK;AACM;AACO;AACzC;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,aAAa;AAC1B;AACA,gBAAgB,8DAAU;AAC1B;AACA;AACA;AACA,CAAC;AACD,uBAAuB,kDAAU;AACjC,SAAS,iEAAa;AACtB;AACA;AACA;AACA;AACA,eAAe,iDAAU;AACzB;AACA,GAAG,EAAE,iEAAa;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG,iEAAa;AACnB;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA,WAAW,uDAAe,CAAC,4CAAI;AAC/B,QAAQ,uDAAe,CAAC,4CAAI;AAC5B,aAAa,0DAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACO,gCAAgC,iEAAa;AACpD;AACA,CAAC;AACD;AACA;AACA;AACA,iEAAe,OAAO,E;;;;;;;;;;;;;;;;;;;;;;;ACvE6B;AACnD;AACmC;AACC;AACY;AACzC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,aAAa,aAAa;AAC1B;AACA,cAAc,8DAAU;AACxB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,SAAS,iEAAa;AACtB;AACA,eAAe,iDAAU;AACzB;AACA,GAAG;AACH,CAAC;AACD;AACA,YAAY,wDAAc;AAC1B,MAAM,+DAAqB;AAC3B,QAAQ,uDAAe;AACvB,aAAa,0DAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACO,gCAAgC,iEAAa;AACpD;AACA,CAAC;AACD;AACA;AACA;AACA,iEAAe,KAAK,E;;;;;;;;;;;;;;;;;ACpDyB;;AAE7C;AACA;AACA,WAAW,cAAc;AACzB,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,2DAAO;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,iEAAe,UAAU,E;;;;;;;;;;ACnBzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB;;AAEhB;AACA;;AAEA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK,KAA6B;AAClC;AACA;AACA,GAAG,SAAS,IAA4E;AACxF;AACA,EAAE,iCAAqB,EAAE,mCAAE;AAC3B;AACA,GAAG;AAAA,kGAAC;AACJ,GAAG,KAAK;AAAA,EAEN;AACF,CAAC;;;;;;;;;;;;AC5ED;AACA;AACA;AACA;AACA;;AAEa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;;AAEA,IAAI,IAAqC;AACzC,6BAA6B,mBAAO,CAAC,yFAA4B;AACjE;AACA,YAAY,mBAAO,CAAC,uDAAW;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,WAAW;AACtB;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA6G;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;;AAEA;;;;;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,cAAc,mBAAO,CAAC,0EAAU;AAChC,aAAa,mBAAO,CAAC,4DAAe;;AAEpC,2BAA2B,mBAAO,CAAC,yFAA4B;AAC/D,UAAU,mBAAO,CAAC,uDAAW;AAC7B,qBAAqB,mBAAO,CAAC,qEAAkB;;AAE/C;;AAEA,IAAI,IAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,8BAA8B;AAC9B,QAAQ;AACR;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,4BAA4B;AAC5B,OAAO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,SAAS,KAAqC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,2BAA2B;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,KAAqC,4FAA4F,CAAM;AAC7I;AACA;;AAEA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,gCAAgC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iHAAiH;AACjH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;ACjmBA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,IAAqC;AACzC,gBAAgB,mBAAO,CAAC,0EAAU;;AAElC;AACA;AACA;AACA,mBAAmB,mBAAO,CAAC,uFAA2B;AACtD,EAAE,KAAK;AAAA,EAIN;;;;;;;;;;;;AClBD;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;;AAEA;;;;;;;;;;;ACXA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;;;AAIb,IAAI,IAAqC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA;;AAEA;AACA;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;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;;;;;;ACN4C;AACI;AACU;AAAA;AAE1D,MAAMuF,yBAAyB,GAAG,uBAAuB;AACzD,IAAIpH,IAAI,GAAG,IAAI;AAEf,MAAMqH,GAAG,GAAGA,CAAA,KAAM;EACjB,oBAAO1J,sDAAA,CAACoF,kEAAkB,IAAE,CAAC;AAC9B,CAAC;AAED,MAAMuE,wBAAwB,GAAGA,CAAA,KAAM;EACtC,MAAMC,WAAW,GAAGC,QAAQ,CAACC,cAAc,CAAEL,yBAA0B,CAAC;EACxE,IAAK,IAAI,KAAKG,WAAW,EAAG;IAC3B,IAAK,WAAW,KAAK,OAAOJ,0DAAU,EAAG;MACxC,IAAK,CAAEnH,IAAI,EAAG;QACbA,IAAI,GAAGmH,8DAAU,CAAEI,WAAY,CAAC;MACjC;MACAvH,IAAI,CAAC0H,MAAM,cAAE/J,sDAAA,CAAC0J,GAAG,IAAE,CAAE,CAAC;IACvB;EACD;AACD,CAAC;;AAED;AACAH,2DAAQ,CAAEI,wBAAyB,CAAC,C","sources":["webpack://@newfold-labs/wp-module-next-steps/./node_modules/@heroicons/react/24/outline/esm/ArrowRightIcon.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/@heroicons/react/24/outline/esm/ChevronUpIcon.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/@heroicons/react/24/outline/esm/EyeIcon.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/@heroicons/react/24/outline/esm/EyeSlashIcon.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/@heroicons/react/24/outline/esm/MinusCircleIcon.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/@heroicons/react/24/outline/esm/PlusCircleIcon.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/@heroicons/react/24/outline/esm/TrophyIcon.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/@heroicons/react/24/outline/esm/XCircleIcon.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/@heroicons/react/24/solid/esm/CheckCircleIcon.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/@newfold/ui-component-library/elements/button/index.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/@newfold/ui-component-library/elements/spinner/index.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/@newfold/ui-component-library/elements/title/index.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/@newfold/ui-component-library/hooks/use-svg-aria.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/classnames/index.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/object-assign/index.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/prop-types/checkPropTypes.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/prop-types/factoryWithTypeCheckers.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/prop-types/index.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/prop-types/lib/has.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","webpack://@newfold-labs/wp-module-next-steps/./node_modules/prop-types/node_modules/react-is/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/icons/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/nextSteps/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/nextSteps/styles.scss","webpack://@newfold-labs/wp-module-next-steps/./src/components/portal/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/progressBar/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/section/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/task/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/track/index.js","webpack://@newfold-labs/wp-module-next-steps/external window [\"wp\",\"apiFetch\"]","webpack://@newfold-labs/wp-module-next-steps/external window [\"wp\",\"domReady\"]","webpack://@newfold-labs/wp-module-next-steps/external window [\"wp\",\"element\"]","webpack://@newfold-labs/wp-module-next-steps/external window [\"wp\",\"i18n\"]","webpack://@newfold-labs/wp-module-next-steps/external window \"lodash\"","webpack://@newfold-labs/wp-module-next-steps/external window \"React\"","webpack://@newfold-labs/wp-module-next-steps/external window \"ReactJSXRuntime\"","webpack://@newfold-labs/wp-module-next-steps/webpack/bootstrap","webpack://@newfold-labs/wp-module-next-steps/webpack/runtime/compat get default export","webpack://@newfold-labs/wp-module-next-steps/webpack/runtime/define property getters","webpack://@newfold-labs/wp-module-next-steps/webpack/runtime/hasOwnProperty shorthand","webpack://@newfold-labs/wp-module-next-steps/webpack/runtime/make namespace object","webpack://@newfold-labs/wp-module-next-steps/./src/next-steps-portal/index.js"],"sourcesContent":["import * as React from \"react\";\nfunction ArrowRightIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(ArrowRightIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction ChevronUpIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"m4.5 15.75 7.5-7.5 7.5 7.5\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(ChevronUpIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction EyeIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(EyeIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction EyeSlashIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(EyeSlashIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction MinusCircleIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M15 12H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(MinusCircleIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction PlusCircleIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(PlusCircleIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction TrophyIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 0 1-.982-3.172M9.497 14.25a7.454 7.454 0 0 0 .981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 0 0 7.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 0 0 2.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 0 1 2.916.52 6.003 6.003 0 0 1-5.395 4.972m0 0a6.726 6.726 0 0 1-2.749 1.35m0 0a6.772 6.772 0 0 1-3.044 0\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(TrophyIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction XCircleIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(XCircleIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction CheckCircleIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z\",\n clipRule: \"evenodd\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(CheckCircleIcon);\nexport default ForwardRef;","import { createElement } from \"@wordpress/element\";\nimport classNames from \"classnames\";\nimport { keys } from \"lodash\";\nimport PropTypes from \"prop-types\";\nimport Spinner from \"../spinner\";\nimport { forwardRef } from \"@wordpress/element\";\nexport const classNameMap = {\n variant: {\n primary: \"nfd-button--primary\",\n secondary: \"nfd-button--secondary\",\n error: \"nfd-button--error\",\n upsell: \"nfd-button--upsell\"\n },\n size: {\n \"default\": \"\",\n small: \"nfd-button--small\",\n large: \"nfd-button--large\"\n }\n};\n\n/**\n * @param {JSX.node} children Content of the button.\n * @param {string|JSX.Element} [as=\"button\"] Base component.\n * @param {string} [type] Type attribute. Used when `as` is a `button`.\n * @param {string} [variant=\"primary\"] Button variant. See `classNameMap` for the options.\n * @param {string} [size=\"default\"] Button size. See `classNameMap` for the options.\n * @param {boolean} [isLoading=false] Whether to show a spinner.\n * @param {boolean} [disabled=false] Whether the button is disabled.\n * @param {string} [className] CSS class.\n * @returns {JSX.Element} Button component.\n */\nconst Button = forwardRef(({\n children,\n as: Component,\n type,\n variant,\n size,\n isLoading,\n disabled,\n className,\n ...props\n}, ref) => createElement(Component\n// eslint-disable-next-line no-undefined\n, {\n type: type || Component === \"button\" && \"button\" || undefined,\n disabled: disabled,\n ref: ref,\n className: classNames(\"nfd-button\", classNameMap.variant[variant], classNameMap.size[size], isLoading && \"nfd-cursor-wait\", disabled && \"nfd-button--disabled\", className),\n ...props\n}, isLoading && createElement(Spinner, {\n size: size === \"small\" ? \"3\" : \"4\",\n className: \"nfd-mr-2\"\n}), children));\nconst propTypes = {\n children: PropTypes.node.isRequired,\n as: PropTypes.elementType,\n type: PropTypes.oneOf([\"button\", \"submit\", \"reset\"]),\n variant: PropTypes.oneOf(keys(classNameMap.variant)),\n size: PropTypes.oneOf(keys(classNameMap.size)),\n isLoading: PropTypes.bool,\n disabled: PropTypes.bool,\n className: PropTypes.string\n};\nButton.propTypes = propTypes;\nButton.defaultProps = {\n as: \"button\",\n // eslint-disable-next-line no-undefined\n type: undefined,\n variant: \"primary\",\n size: \"default\",\n isLoading: false,\n disabled: false,\n className: \"\"\n};\nexport default Button;\n\n// eslint-disable-next-line require-jsdoc\nexport const StoryComponent = props => createElement(Button, {\n ...props\n});\nStoryComponent.propTypes = propTypes;\nStoryComponent.defaultProps = Button.defaultProps;\nStoryComponent.displayName = \"Button\";","import { createElement } from \"@wordpress/element\";\nimport classNames from \"classnames\";\nimport { keys } from \"lodash\";\nimport PropTypes from \"prop-types\";\nimport { useSvgAria } from \"../../hooks\";\nimport { forwardRef } from \"@wordpress/element\";\nexport const classNameMap = {\n variant: {\n // Default is currentColor.\n \"default\": \"\",\n primary: \"nfd-text-primary-500\",\n white: \"nfd-text-white\"\n },\n size: {\n 3: \"nfd-w-3 nfd-h-3\",\n 4: \"nfd-w-4 nfd-h-4\",\n 8: \"nfd-w-8 nfd-h-8\"\n }\n};\n\n/**\n * @param {string} [variant=default] The variant.\n * @param {string} [size] The size.\n * @param {string} [className] The HTML class.\n * @returns {JSX.Element} The spinner.\n */\nconst Spinner = forwardRef(({\n variant,\n size,\n className\n}, ref) => {\n const svgAriaProps = useSvgAria();\n return createElement(\"svg\", {\n ref: ref,\n xmlns: \"http://www.w3.org/2000/svg/\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n className: classNames(\"nfd-animate-spin\", classNameMap.variant[variant], classNameMap.size[size], className),\n ...svgAriaProps\n }, createElement(\"circle\", {\n className: \"nfd-opacity-25\",\n cx: \"12\",\n cy: \"12\",\n r: \"10\",\n stroke: \"currentColor\",\n strokeWidth: \"4\"\n }), createElement(\"path\", {\n className: \"nfd-opacity-75\",\n fill: \"currentColor\",\n d: \"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n }));\n});\nconst propTypes = {\n variant: PropTypes.oneOf(keys(classNameMap.variant)),\n size: PropTypes.oneOf(keys(classNameMap.size)),\n className: PropTypes.string\n};\nSpinner.propTypes = propTypes;\nSpinner.defaultProps = {\n variant: \"default\",\n size: \"4\",\n className: \"\"\n};\n\n// eslint-disable-next-line require-jsdoc\nexport const StoryComponent = props => createElement(Spinner, {\n ...props\n});\nStoryComponent.propTypes = propTypes;\nStoryComponent.defaultProps = Spinner.defaultProps;\nStoryComponent.displayName = \"Spinner\";\nexport default Spinner;","import { createElement } from \"@wordpress/element\";\n/* eslint-disable no-undefined */\nimport PropTypes from \"prop-types\";\nimport classNames from \"classnames\";\nimport { forwardRef } from \"@wordpress/element\";\nexport const classNameMap = {\n size: {\n 1: \"nfd-title--1\",\n 2: \"nfd-title--2\",\n 3: \"nfd-title--3\",\n 4: \"nfd-title--4\",\n 5: \"nfd-title--5\"\n }\n};\n\n/**\n * @param {Object} props Props object.\n * @returns {JSX.Element} Title component.\n */\nconst Title = forwardRef(({\n children,\n as: Component,\n size,\n className,\n ...props\n}, ref) => {\n return createElement(Component, {\n ref: ref,\n className: classNames(\"nfd-title\", classNameMap.size[size || Component[1]], className),\n ...props\n }, children);\n});\nconst propTypes = {\n children: PropTypes.node.isRequired,\n as: PropTypes.elementType,\n size: PropTypes.oneOf(Object.keys(classNameMap.size)),\n className: PropTypes.string\n};\nTitle.propTypes = propTypes;\nTitle.defaultProps = {\n as: \"h1\",\n size: undefined,\n className: \"\"\n};\n\n// eslint-disable-next-line require-jsdoc\nexport const StoryComponent = props => createElement(Title, {\n ...props\n});\nStoryComponent.propTypes = propTypes;\nStoryComponent.defaultProps = Title.defaultProps;\nStoryComponent.displayName = \"Title\";\nexport default Title;","import { useMemo } from \"@wordpress/element\";\n\n/**\n * Creates aria attributes for an SVG.\n * @param {boolean|null} [isFocusable] Boolean value to indicate if it should be focusable.\n * @returns {Object} Object with `role` and `aria-hidden` and optionally `focusable`.\n */\nconst useSvgAria = (isFocusable = null) => {\n return useMemo(() => {\n const aria = {\n role: \"img\",\n \"aria-hidden\": \"true\"\n };\n if (isFocusable !== null) {\n aria.focusable = isFocusable ? \"true\" : \"false\";\n }\n return aria;\n }, [isFocusable]);\n};\nexport default useSvgAria;","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","import { \n\tArrowRightIcon,\n\tChevronUpIcon,\n\tPlusCircleIcon,\n\tMinusCircleIcon,\n\tEyeSlashIcon,\n\tEyeIcon,\n\tTrophyIcon,\n\tXCircleIcon\n} from '@heroicons/react/24/outline';\nimport { CheckCircleIcon } from '@heroicons/react/24/solid';\n\n// Using Heroicons components\nexport const chevronIcon = ;\nexport const plusCircleIcon = ;\nexport const minusCircleIcon = ;\nexport const hideIcon = ;\nexport const showIcon = ;\nexport const doneIcon = ;\nexport const goIcon = ;\nexport const trophyIcon = ;\nexport const closeCircleIcon = ;\n\n// Circle dashed icon from https://sidekickicons.com/?iconset=Sidekickicons&code=JSX&icon=circle-dashed\nexport const circleDashedIcon = (\n\t\n\t\t\n\t\n);\n// Circle icon from https://sidekickicons.com/?iconset=Sidekickicons&code=JSX&icon=circle\nexport const circleIcon = (\n\t\n\t\t\n\t\n);\n\n// Custom icons (keeping as SVG)\nexport const todoIcon = (\n\t\n\t\t\n\t\n);\n\n\nexport const spinner = (\n\t\n\t\t\n\t\t\n\t\n);","import { Button } from '@newfold/ui-component-library';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport apiFetch from '@wordpress/api-fetch';\nimport { spinner, hideIcon } from '../icons';\nimport { Track } from '../track';\nimport './styles.scss';\n\n/**\n * Method to create endpoint url\n * \n * no permalinks: 'http://localhost:8882/index.php?rest_route=/'\n * permalinks: 'http://localhost:8882/wp-json/'\n */\nconst createEndpointUrl = ( root, endpoint ) => {\n\t// if restUrl has /index.php?rest_route=/, add escaped endpoint\n\tif ( root.includes( '?' ) ) {\n\t\treturn root + encodeURIComponent( endpoint );\n\t} \n\t// otherwise permalinks set and restUrl should concatenate endpoint\n\treturn root + endpoint;\n};\n\n/**\n * Wrapper method to post task update to endpoint\n *\n * @param {Object} data object of data\n * @param {Function} passError setter for the error in component\n * @param {Function} thenCallback method to call in promise then\n */\nconst taskUpdateWrapper = ( data, passError, thenCallback ) => {\n\treturn apiFetch( {\n\t\turl: createEndpointUrl( \n\t\t\twindow.NewfoldRuntime.restUrl,\n\t\t\t'newfold-next-steps/v1/steps/status'\n\t\t),\n\t\tmethod: 'PUT',\n\t\tdata,\n\t} )\n\t\t.then( ( response ) => {\n\t\t\t// console.log( 'Response from taskUpdateWrapper:', response );\n\t\t\tthenCallback( response );\n\t\t} )\n\t\t.catch( ( error ) => {\n\t\t\t// console.error( 'Error from taskUpdateWrapper:', error );\n\t\t\tpassError( error );\n\t\t} );\n};\n\n/**\n* Wrapper method to post section update to endpoint\n*\n* @param {Object} data object of data\n* @param {Function} passError setter for the error in component\n* @param {Function} thenCallback method to call in promise then\n*/\nconst sectionUpdateWrapper = ( data, passError, thenCallback ) => {\n\treturn apiFetch( {\n\t\turl: createEndpointUrl( \n\t\t\twindow.NewfoldRuntime.restUrl, \n\t\t\t'newfold-next-steps/v1/steps/section/open'\n\t\t),\n\t\tmethod: 'PUT',\n\t\tdata,\n\t} )\n\t\t.then( ( response ) => {\n\t\t\t// console.log( 'Section update response:', response );\n\t\t\tthenCallback( response );\n\t\t} )\n\t\t.catch( ( error ) => {\n\t\t\t// console.error( 'Error updating section:', error );\n\t\t\tpassError( error );\n\t\t} );\n};\n\nexport const NextSteps = () => {\n\tconst [ plan, setPlan ] = useState( window.NewfoldNextSteps );\n\tconst [ showDismissed, setShowDismissed ] = useState( true );\n\tconst [ showControls, setShowControls ] = useState( false );\n\n\tconst taskUpdateCallback = ( track, section, id, status ) => {\n\t\tconst data = {\n\t\t\tplan: plan.id,\n\t\t\ttrack,\n\t\t\tsection,\n\t\t\ttask: id,\n\t\t\tstatus,\n\t\t};\n\t\ttaskUpdateWrapper(\n\t\t\tdata,\n\t\t\t( error ) => {\n\t\t\t\t// TODO handle error better\n\t\t\t\t// console.error( 'Error updating step:', error );\n\t\t\t},\n\t\t\t( response ) => {\n\t\t\t\t// The response is the full plan object, not wrapped in a plan property\n\t\t\t\t// console.log( 'Task update response:', response );\n\t\t\t\twindow.NewfoldNextSteps = response;\n\t\t\t\tsetPlan( response );\n\t\t\t}\n\t\t);\n\t};\n\n\tconst sectionOpenCallback = ( section, open ) => {\n\t\t// console.log( 'Section open callback:', section, open );\n\t\t\n\t\t// Find the track that contains this section\n\t\tlet trackId = null;\n\t\tif ( plan && plan.tracks ) {\n\t\t\tfor ( const track of plan.tracks ) {\n\t\t\t\tif ( track.sections && track.sections.some( s => s.id === section ) ) {\n\t\t\t\t\ttrackId = track.id;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( ! trackId ) {\n\t\t\t// console.error( 'Could not find track for section:', section );\n\t\t\treturn;\n\t\t}\n\n\t\tconst data = {\n\t\t\tplan: plan.id,\n\t\t\ttrack: trackId,\n\t\t\tsection: section,\n\t\t\topen: open,\n\t\t};\n\t\t\n\t\tsectionUpdateWrapper( \n\t\t\tdata,\n\t\t\t( error ) => {\n\t\t\t\t// console.error( 'Error updating section open state:', error );\n\t\t\t},\n\t\t\t( response ) => {\n\t\t\t\t// console.log( 'Section open state updated successfully:', response );\n\t\t\t}\n\t\t);\n\t};\n\n\t// Handle case where plan might not be loaded yet\n\tif ( ! plan || ! plan.tracks ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ spinner }\n\t\t\t\t

{ __( 'Loading next steps...', 'wp-module-next-steps' ) }

\n\t\t\t
\n\t\t);\n\t}\n\n\treturn (\n\t\t
\n\t\t\t

{ plan.description }

\n\t\t\t{ plan.tracks.map( ( track, i ) => (\n\t\t\t\t\n\t\t\t) ) }\n\t\t\t{ showControls &&
\n\t\t\t\t {\n\t\t\t\t\t\tsetShowDismissed( ! showDismissed );\n\t\t\t\t\t} }\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t>{ hideIcon }\n\t\t\t\t\t{ showDismissed\n\t\t\t\t\t\t? __( 'Hide skipped tasks', 'wp-module-next-steps' )\n\t\t\t\t\t\t: __( 'View skipped tasks', 'wp-module-next-steps' )\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t
}\n\t\t
\n\t);\n};\n","// extracted by mini-css-extract-plugin\nexport {};","import { createPortal, useEffect, useState } from '@wordpress/element';\nimport { NextSteps } from '../nextSteps';\n\nexport const NextStepsPortalApp = () => {\n\tconst [ container, setContainer ] = useState( null );\n\n\tuseEffect( () => {\n\t\tconst registry = window.NFDPortalRegistry;\n\t\t// Check for required registry\n\t\tif ( ! registry ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst updateContainer = ( el ) => {\n\t\t\tsetContainer( el );\n\t\t};\n\n\t\tconst clearContainer = () => {\n\t\t\tsetContainer( null );\n\t\t};\n\n\t\t// Subscribe to portal readiness updates\n\t\tregistry.onReady( 'next-steps', updateContainer );\n\t\tregistry.onRemoved( 'next-steps', clearContainer );\n\n\t\t// Immediately try to get the container if already registered\n\t\tconst current = registry.getElement( 'next-steps' );\n\t\tif ( current ) {\n\t\t\tupdateContainer( current );\n\t\t}\n\t}, [ container ] );\n\n\tif ( ! container ) {\n\t\treturn null;\n\t}\n\n\treturn createPortal(\n\t\t
\n\t\t\t\n\t\t
,\n\t\tcontainer\n\t);\n};\n","export const ProgressBar = ( { completed, total } ) => {\n\tconst percent = total ? Math.round( ( completed / total ) * 100 ) : 0;\n\treturn (\n\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\t{ completed }/{ total }\n\t\t\t\n\t\t
\n\t);\n};\n","import { useEffect, useState } from '@wordpress/element';\nimport { Title } from '@newfold/ui-component-library';\nimport { __ } from '@wordpress/i18n';\nimport { ProgressBar } from '../progressBar';\nimport { plusCircleIcon, minusCircleIcon, closeCircleIcon,trophyIcon } from '../icons';\nimport { Task } from '../task';\n\nexport const Section = ( props ) => {\n\tconst {\n\t\tsection,\n\t\tindex,\n\t\ttaskUpdateCallback,\n\t\tsectionOpenCallback,\n\t\ttrack,\n\t\tshowDismissed,\n\t\t...restProps\n\t} = props;\n\t\n\tconst [ showCompleteCelebration, setShowCompleteCelebration ] = useState( true );\n\tconst [ isComplete, setIsComplete ] = useState( false );\n\t// Use persisted open state from section data, fallback to passed-in open prop or default for first section\n\tconst [ isOpen, setIsOpen ] = useState( section.open !== undefined ? section.open : index === 0 );\n\n\tconst completed = section.tasks.filter(\n\t\t( task ) => task.status === 'done'\n\t).length;\n\tconst total = section.tasks.filter(\n\t\t( task ) => task.status !== 'dismissed'\n\t).length;\n\n\t// if section complete on load, don't show complete celebration\n\tuseEffect( () => {\n\t\tif ( completed === total ) {\n\t\t\tsetShowCompleteCelebration( false );\n\t\t}\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( total === completed ) {\n\t\t\tconst timer = setTimeout(() => {\n\t\t\t\tsetIsComplete( !isComplete );\n\t\t\t}, 100);\n\t\t\t// Clean up the timer when the component unmounts\n\t\t\treturn () => clearTimeout(timer);\n\t\t}\n\t}, [ showCompleteCelebration, completed, total ] );\n\n\treturn (\n\t\t( total > 0 || showDismissed === true )&& (\n\t\t
\n\t\t\t {\n\t\t\t\t\tsectionOpenCallback( section.id, !isOpen );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t\n\t\t\t\t\t<span className=\"nfd-section-header-icon nfd-header-icon\">\n\t\t\t\t\t\t<span className=\"nfd-section-header-icon-closed\">\n\t\t\t\t\t\t\t{ plusCircleIcon }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"nfd-section-header-icon-opened\">\n\t\t\t\t\t\t\t{ minusCircleIcon }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t{ section.label }\n\t\t\t\t\n\t\t\t\t{ total > 0 && }\n\t\t\t\n\t\t\t
\n\t\t\t\t{ section.tasks.map( ( step ) => (\n\t\t\t\t\t\n\t\t\t\t) ) }\n\t\t\t
\n\t\t\t{ showCompleteCelebration && \n\t\t\t\t {\n\t\t\t\t\t\tsetShowCompleteCelebration( false );\n\t\t\t\t\t\tsetIsOpen( false )\n\t\t\t\t\t\tsectionOpenCallback( section.id, false );\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t\n\t\t\t\t\t
{ trophyIcon }
\n\t\t\t\t\t

{ __( 'All complete!', 'wp-module-next-steps' ) }

\n\t\t\t\t\n\t\t\t}\n\t\t
\n\t\t)\n\t);\n};\n","import { Title } from '@newfold/ui-component-library';\nimport { __ } from '@wordpress/i18n';\nimport { doneIcon, hideIcon, showIcon, goIcon, circleDashedIcon, circleIcon } from '../icons';\n\nexport const Task = ( props ) => {\n\tconst {\n\t\tstep,\n\t\ttaskUpdateCallback,\n\t\ttrack,\n\t\tsection,\n\t\tshowDismissed,\n\t\t...restProps\n\t} = props;\n\t\n\t// Destructure step properties\n\tconst {\n\t\tid,\n\t\t// description = '',\n\t\ttitle = '',\n\t\tstatus,\n\t\thref,\n\t\tdata_attributes = {}\n\t} = step;\n\t\n\tconst getHref = () => {\n\t\t// replace {siteUrl} placeholder with the actual site URL\n\t\tif ( href.includes( '{siteUrl}' ) ) {\n\t\t\treturn href.replace( '{siteUrl}', window.NewfoldRuntime.siteUrl );\n\t\t}\n\t\treturn href;\n\t};\n\n\tconst getTarget = () => {\n\t\t// if href is external, return target=\"_blank\"\n\t\tif (\n\t\t\thref.includes( '{siteUrl}' ) ||\n\t\t\thref.includes( window.NewfoldRuntime.siteUrl )\n\t\t) {\n\t\t\treturn '';\n\t\t}\n\t\treturn '_blank';\n\t};\n\n\t/**\n\t * Format data attributes for React components\n\t * Ensures all keys have 'data-' prefix and handles boolean values\n\t */\n\tconst formatDataAttributes = () => {\n\t\tconst formatted = {};\n\t\t\n\t\tObject.entries( data_attributes ).forEach( ( [ key, value ] ) => {\n\t\t\t// Ensure key has 'data-' prefix\n\t\t\tconst dataKey = key.startsWith( 'data-' ) ? key : `data-${ key }`;\n\t\t\t\n\t\t\t// Handle boolean values (convert to string or use key as flag)\n\t\t\tif ( typeof value === 'boolean' ) {\n\t\t\t\tformatted[ dataKey ] = value ? 'true' : 'false';\n\t\t\t} else {\n\t\t\t\tformatted[ dataKey ] = value;\n\t\t\t}\n\t\t} );\n\t\t\n\t\treturn formatted;\n\t};\n\n\t// Combine custom data attributes with any other restProps\n\tconst combinedAttributes = { ...formatDataAttributes() };\n\n\tconst renderStepContent = ( href = false, target = '' ) => {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ href && (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t) }\n\t\t\t\t{ ! href && (\n\t\t\t\t\t\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t\n\t\t\t\t) }\n\t\t\t\t{/* { description } */}\n\t\t\t
\n\t\t);\n\t};\n\tconst renderNewStep = () => {\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttaskUpdateCallback( track, section, id, 'done' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttitle={ __(\n\t\t\t\t\t\t\t\t'Mark Complete',\n\t\t\t\t\t\t\t\t'wp-module-next-steps'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ circleIcon }\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t{ renderStepContent( getHref(), getTarget() ) }\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttaskUpdateCallback(\n\t\t\t\t\t\t\t\t\ttrack,\n\t\t\t\t\t\t\t\t\tsection,\n\t\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\t\t'dismissed'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttitle={ __( 'Skip', 'wp-module-next-steps' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ hideIcon }\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{ goIcon }\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t};\n\tconst renderDoneStep = () => {\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttaskUpdateCallback( track, section, id, 'new' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttitle={ __( 'Restart', 'wp-module-next-steps' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ doneIcon }\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t{ renderStepContent( getHref(), getTarget() ) }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t};\n\tconst renderDismissedStep = () => {\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttaskUpdateCallback( track, section, id, 'new' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttitle={ __( 'Unskip', 'wp-module-next-steps' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ circleDashedIcon }\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t{ renderStepContent( getHref(), getTarget() ) }\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttaskUpdateCallback( track, section, id, 'new' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttitle={ __( 'Unskip', 'wp-module-next-steps' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ showIcon }\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{ status === 'new' && renderNewStep() }\n\t\t\t{ status === 'done' && renderDoneStep() }\n\t\t\t{ status === 'dismissed' && showDismissed && renderDismissedStep() }\n\t\t\n\t);\n};\n","import { Title } from '@newfold/ui-component-library';\nimport { Section } from '../section';\nimport { chevronIcon } from '../icons';\n\nexport const Track = ( props ) => {\n\tconst {\n\t\ttrack,\n\t\tindex,\n\t\ttaskUpdateCallback,\n\t\tsectionOpenCallback,\n\t\tshowDismissed,\n\t\t...restProps\n\t} = props;\n\n\tconst isOpen = index === 0; // Open the first track by default\n\n\treturn (\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{ track.label }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{ chevronIcon }\n\t\t\t\t\n\t\t\t\n\t\t\t
\n\t\t\t\t{ track.sections.map( ( section, sectionIndex ) => (\n\t\t\t\t\t\n\t\t\t\t) ) }\n\t\t\t
\n\t\t
\n\t);\n};\n","module.exports = window[\"wp\"][\"apiFetch\"];","module.exports = window[\"wp\"][\"domReady\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"lodash\"];","module.exports = window[\"React\"];","module.exports = window[\"ReactJSXRuntime\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import domReady from '@wordpress/dom-ready';\nimport { createRoot } from '@wordpress/element';\nimport { NextStepsPortalApp } from '../components/portal';\n\nconst WP_NEXTSTEPS_FILL_ELEMENT = 'nfd-next-steps-portal';\nlet root = null;\n\nconst App = () => {\n\treturn ;\n};\n\nconst NextStepsPortalAppRender = () => {\n\tconst DOM_ELEMENT = document.getElementById( WP_NEXTSTEPS_FILL_ELEMENT );\n\tif ( null !== DOM_ELEMENT ) {\n\t\tif ( 'undefined' !== typeof createRoot ) {\n\t\t\tif ( ! root ) {\n\t\t\t\troot = createRoot( DOM_ELEMENT );\n\t\t\t}\n\t\t\troot.render( );\n\t\t}\n\t}\n};\n\n// window.addEventListener( 'nfd:slots-ready', NextStepsPortalAppRender );\ndomReady( NextStepsPortalAppRender );\n"],"names":["ArrowRightIcon","ChevronUpIcon","PlusCircleIcon","MinusCircleIcon","EyeSlashIcon","EyeIcon","TrophyIcon","XCircleIcon","CheckCircleIcon","jsx","_jsx","jsxs","_jsxs","chevronIcon","className","plusCircleIcon","minusCircleIcon","hideIcon","showIcon","doneIcon","goIcon","trophyIcon","closeCircleIcon","circleDashedIcon","xmlns","viewBox","strokeWidth","stroke","fill","children","strokeLinecap","strokeLinejoin","d","circleIcon","todoIcon","cx","cy","r","spinner","class","role","Button","useState","__","apiFetch","Track","createEndpointUrl","root","endpoint","includes","encodeURIComponent","taskUpdateWrapper","data","passError","thenCallback","url","window","NewfoldRuntime","restUrl","method","then","response","catch","error","sectionUpdateWrapper","NextSteps","plan","setPlan","NewfoldNextSteps","showDismissed","setShowDismissed","showControls","setShowControls","taskUpdateCallback","track","section","id","status","task","sectionOpenCallback","open","trackId","tracks","sections","some","s","description","map","i","index","onClick","variant","createPortal","useEffect","NextStepsPortalApp","container","setContainer","registry","NFDPortalRegistry","updateContainer","el","clearContainer","onReady","onRemoved","current","getElement","ProgressBar","completed","total","percent","Math","round","style","width","Title","Task","Section","props","restProps","showCompleteCelebration","setShowCompleteCelebration","isComplete","setIsComplete","isOpen","setIsOpen","undefined","tasks","filter","length","timer","setTimeout","clearTimeout","e","as","label","step","Fragment","_Fragment","title","href","data_attributes","getHref","replace","siteUrl","getTarget","formatDataAttributes","formatted","Object","entries","forEach","key","value","dataKey","startsWith","combinedAttributes","renderStepContent","target","renderNewStep","renderDoneStep","renderDismissedStep","sectionIndex","domReady","createRoot","WP_NEXTSTEPS_FILL_ELEMENT","App","NextStepsPortalAppRender","DOM_ELEMENT","document","getElementById","render"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"bundle.js","mappings":";;;;;;;;;;;;;;;AAA+B;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU;;;;;;;;;;;;;;;;ACzBM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU;;;;;;;;;;;;;;;;ACzBM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG,gBAAgB,gDAAmB;AACtC;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU;;;;;;;;;;;;;;;;AC7BM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU;;;;;;;;;;;;;;;;ACzBM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU;;;;;;;;;;;;;;;;ACzBM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU;;;;;;;;;;;;;;;;ACzBM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU;;;;;;;;;;;;;;;;ACzBM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU;;;;;;;;;;;;;;;;ACzBM;AAC/B;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,+BAA+B,gDAAmB;AACrD;AACA,GAAG,8BAA8B,gDAAmB;AACpD;AACA;AACA;AACA,GAAG;AACH;AACA,iCAAiC,6CAAgB;AACjD,iEAAe,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;ACvB0B;AACf;AACN;AACK;AACF;AACe;AACzC;AACP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,UAAU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AI;AAC5B,aAAa,0DAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACO,gCAAgC,iEAAa;AACpD;AACA,CAAC;AACD;AACA;AACA;AACA,iEAAe,OAAO;;;;;;;;;;;;;;;;;;;;;;;ACvE6B;AACnD;AACmC;AACC;AACY;AACzC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,aAAa,aAAa;AAC1B;AACA,cAAc,8DAAU;AACxB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,SAAS,iEAAa;AACtB;AACA,eAAe,iDAAU;AACzB;AACA,GAAG;AACH,CAAC;AACD;AACA,YAAY,wDAAc;AAC1B,MAAM,+DAAqB;AAC3B,QAAQ,uDAAe;AACvB,aAAa,0DAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACO,gCAAgC,iEAAa;AACpD;AACA,CAAC;AACD;AACA;AACA;AACA,iEAAe,KAAK;;;;;;;;;;;;;;;;;ACpDyB;;AAE7C;AACA;AACA,WAAW,cAAc;AACzB,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,2DAAO;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,iEAAe,UAAU;;;;;;;;;;ACnBzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB;;AAEhB;AACA;;AAEA,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK,KAA6B;AAClC;AACA;AACA,GAAG,SAAS,IAA4E;AACxF;AACA,EAAE,iCAAqB,EAAE,mCAAE;AAC3B;AACA,GAAG;AAAA,kGAAC;AACJ,GAAG,KAAK,EAEN;AACF,CAAC;;;;;;;;;;;;AC5ED;AACA;AACA;AACA;AACA;;AAEa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;;AAEA,IAAI,IAAqC;AACzC,6BAA6B,mBAAO,CAAC,gGAA4B;AACjE;AACA,YAAY,mBAAO,CAAC,8DAAW;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,WAAW;AACtB;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA6G;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;;AAEA;;;;;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,cAAc,mBAAO,CAAC,yDAAU;AAChC,aAAa,mBAAO,CAAC,mEAAe;;AAEpC,2BAA2B,mBAAO,CAAC,gGAA4B;AAC/D,UAAU,mBAAO,CAAC,8DAAW;AAC7B,qBAAqB,mBAAO,CAAC,4EAAkB;;AAE/C;;AAEA,IAAI,IAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,8BAA8B;AAC9B,QAAQ;AACR;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,4BAA4B;AAC5B,OAAO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,SAAS,KAAqC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,IAAqC;AAC/C;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,2BAA2B;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,KAAqC,4FAA4F,CAAM;AAC7I;AACA;;AAEA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,gCAAgC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iHAAiH;AACjH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;ACjmBA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,IAAqC;AACzC,gBAAgB,mBAAO,CAAC,yDAAU;;AAElC;AACA;AACA;AACA,mBAAmB,mBAAO,CAAC,8FAA2B;AACtD,EAAE,KAAK,EAIN;;;;;;;;;;;;AClBD;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;;AAEA;;;;;;;;;;;ACXA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;;;AAIb,IAAI,IAAqC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;;AAEjD;AACA;AACA;AACA,kDAAkD;;AAElD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB,sBAAsB;AACtB,uBAAuB;AACvB,uBAAuB;AACvB,eAAe;AACf,kBAAkB;AAClB,gBAAgB;AAChB,YAAY;AACZ,YAAY;AACZ,cAAc;AACd,gBAAgB;AAChB,kBAAkB;AAClB,gBAAgB;AAChB,mBAAmB;AACnB,wBAAwB;AACxB,yBAAyB;AACzB,yBAAyB;AACzB,iBAAiB;AACjB,oBAAoB;AACpB,kBAAkB;AAClB,cAAc;AACd,cAAc;AACd,gBAAgB;AAChB,kBAAkB;AAClB,oBAAoB;AACpB,kBAAkB;AAClB,0BAA0B;AAC1B,cAAc;AACd,GAAG;AACH;;;;;;;;;;;;ACpLa;;AAEb,IAAI,KAAqC,EAAE,EAE1C,CAAC;AACF,EAAE,uIAAyD;AAC3D;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN+C;AACV;AACkB;;AAEvD;AACA;AACA;AACA;AAHA;AAIO,MAAMO,aAAa,SAASP,yDAAS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;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;ACN4C;AACI;AACU;AAAA;AAE1D,MAAMmH,yBAAyB,GAAG,uBAAuB;AACzD,IAAI3G,IAAI,GAAG,IAAI;AAEf,MAAM4G,GAAG,GAAGA,CAAA,KAAM;EACjB,oBAAOnP,sDAAA,CAAC8K,kEAAkB,IAAE,CAAC;AAC9B,CAAC;AAED,MAAMsE,wBAAwB,GAAGA,CAAA,KAAM;EACtC,MAAMC,WAAW,GAAGC,QAAQ,CAACC,cAAc,CAAEL,yBAA0B,CAAC;EACxE,IAAK,IAAI,KAAKG,WAAW,EAAG;IAC3B,IAAK,WAAW,KAAK,OAAOJ,0DAAU,EAAG;MACxC,IAAK,CAAE1G,IAAI,EAAG;QACbA,IAAI,GAAG0G,8DAAU,CAAEI,WAAY,CAAC;MACjC;MACA9G,IAAI,CAAChG,MAAM,cAAEvC,sDAAA,CAACmP,GAAG,IAAE,CAAE,CAAC;IACvB;EACD;AACD,CAAC;;AAED;AACAH,2DAAQ,CAAEI,wBAAyB,CAAC,C","sources":["webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/@heroicons/react/24/outline/esm/ArrowRightIcon.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/@heroicons/react/24/outline/esm/ChevronUpIcon.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/@heroicons/react/24/outline/esm/EyeIcon.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/@heroicons/react/24/outline/esm/EyeSlashIcon.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/@heroicons/react/24/outline/esm/MinusCircleIcon.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/@heroicons/react/24/outline/esm/PlusCircleIcon.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/@heroicons/react/24/outline/esm/TrophyIcon.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/@heroicons/react/24/outline/esm/XCircleIcon.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/@heroicons/react/24/solid/esm/CheckCircleIcon.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/@newfold/ui-component-library/elements/button/index.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/@newfold/ui-component-library/elements/spinner/index.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/@newfold/ui-component-library/elements/title/index.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/@newfold/ui-component-library/hooks/use-svg-aria.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/classnames/index.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/object-assign/index.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/prop-types/checkPropTypes.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/prop-types/factoryWithTypeCheckers.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/prop-types/index.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/prop-types/lib/has.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/react-is/cjs/react-is.development.js","webpack://@newfold-labs/wp-module-next-steps/../../../node_modules/react-is/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/ErrorBoundary/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/icons/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/nextSteps/helpers.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/nextSteps/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/nextSteps/styles.scss","webpack://@newfold-labs/wp-module-next-steps/./src/components/portal/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/progressBar/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/section/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/task/index.js","webpack://@newfold-labs/wp-module-next-steps/./src/components/track/index.js","webpack://@newfold-labs/wp-module-next-steps/external window [\"wp\",\"apiFetch\"]","webpack://@newfold-labs/wp-module-next-steps/external window [\"wp\",\"domReady\"]","webpack://@newfold-labs/wp-module-next-steps/external window [\"wp\",\"element\"]","webpack://@newfold-labs/wp-module-next-steps/external window [\"wp\",\"i18n\"]","webpack://@newfold-labs/wp-module-next-steps/external window \"lodash\"","webpack://@newfold-labs/wp-module-next-steps/external window \"React\"","webpack://@newfold-labs/wp-module-next-steps/external window \"ReactJSXRuntime\"","webpack://@newfold-labs/wp-module-next-steps/webpack/bootstrap","webpack://@newfold-labs/wp-module-next-steps/webpack/runtime/compat get default export","webpack://@newfold-labs/wp-module-next-steps/webpack/runtime/define property getters","webpack://@newfold-labs/wp-module-next-steps/webpack/runtime/hasOwnProperty shorthand","webpack://@newfold-labs/wp-module-next-steps/webpack/runtime/make namespace object","webpack://@newfold-labs/wp-module-next-steps/./src/next-steps-portal/index.js"],"sourcesContent":["import * as React from \"react\";\nfunction ArrowRightIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(ArrowRightIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction ChevronUpIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"m4.5 15.75 7.5-7.5 7.5 7.5\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(ChevronUpIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction EyeIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(EyeIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction EyeSlashIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(EyeSlashIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction MinusCircleIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M15 12H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(MinusCircleIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction PlusCircleIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(PlusCircleIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction TrophyIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 0 1-.982-3.172M9.497 14.25a7.454 7.454 0 0 0 .981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 0 0 7.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 0 0 2.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 0 1 2.916.52 6.003 6.003 0 0 1-5.395 4.972m0 0a6.726 6.726 0 0 1-2.749 1.35m0 0a6.772 6.772 0 0 1-3.044 0\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(TrophyIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction XCircleIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(XCircleIcon);\nexport default ForwardRef;","import * as React from \"react\";\nfunction CheckCircleIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z\",\n clipRule: \"evenodd\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(CheckCircleIcon);\nexport default ForwardRef;","import { createElement } from \"@wordpress/element\";\nimport classNames from \"classnames\";\nimport { keys } from \"lodash\";\nimport PropTypes from \"prop-types\";\nimport Spinner from \"../spinner\";\nimport { forwardRef } from \"@wordpress/element\";\nexport const classNameMap = {\n variant: {\n primary: \"nfd-button--primary\",\n secondary: \"nfd-button--secondary\",\n error: \"nfd-button--error\",\n upsell: \"nfd-button--upsell\"\n },\n size: {\n \"default\": \"\",\n small: \"nfd-button--small\",\n large: \"nfd-button--large\"\n }\n};\n\n/**\n * @param {JSX.node} children Content of the button.\n * @param {string|JSX.Element} [as=\"button\"] Base component.\n * @param {string} [type] Type attribute. Used when `as` is a `button`.\n * @param {string} [variant=\"primary\"] Button variant. See `classNameMap` for the options.\n * @param {string} [size=\"default\"] Button size. See `classNameMap` for the options.\n * @param {boolean} [isLoading=false] Whether to show a spinner.\n * @param {boolean} [disabled=false] Whether the button is disabled.\n * @param {string} [className] CSS class.\n * @returns {JSX.Element} Button component.\n */\nconst Button = forwardRef(({\n children,\n as: Component,\n type,\n variant,\n size,\n isLoading,\n disabled,\n className,\n ...props\n}, ref) => createElement(Component\n// eslint-disable-next-line no-undefined\n, {\n type: type || Component === \"button\" && \"button\" || undefined,\n disabled: disabled,\n ref: ref,\n className: classNames(\"nfd-button\", classNameMap.variant[variant], classNameMap.size[size], isLoading && \"nfd-cursor-wait\", disabled && \"nfd-button--disabled\", className),\n ...props\n}, isLoading && createElement(Spinner, {\n size: size === \"small\" ? \"3\" : \"4\",\n className: \"nfd-mr-2\"\n}), children));\nconst propTypes = {\n children: PropTypes.node.isRequired,\n as: PropTypes.elementType,\n type: PropTypes.oneOf([\"button\", \"submit\", \"reset\"]),\n variant: PropTypes.oneOf(keys(classNameMap.variant)),\n size: PropTypes.oneOf(keys(classNameMap.size)),\n isLoading: PropTypes.bool,\n disabled: PropTypes.bool,\n className: PropTypes.string\n};\nButton.propTypes = propTypes;\nButton.defaultProps = {\n as: \"button\",\n // eslint-disable-next-line no-undefined\n type: undefined,\n variant: \"primary\",\n size: \"default\",\n isLoading: false,\n disabled: false,\n className: \"\"\n};\nexport default Button;\n\n// eslint-disable-next-line require-jsdoc\nexport const StoryComponent = props => createElement(Button, {\n ...props\n});\nStoryComponent.propTypes = propTypes;\nStoryComponent.defaultProps = Button.defaultProps;\nStoryComponent.displayName = \"Button\";","import { createElement } from \"@wordpress/element\";\nimport classNames from \"classnames\";\nimport { keys } from \"lodash\";\nimport PropTypes from \"prop-types\";\nimport { useSvgAria } from \"../../hooks\";\nimport { forwardRef } from \"@wordpress/element\";\nexport const classNameMap = {\n variant: {\n // Default is currentColor.\n \"default\": \"\",\n primary: \"nfd-text-primary-500\",\n white: \"nfd-text-white\"\n },\n size: {\n 3: \"nfd-w-3 nfd-h-3\",\n 4: \"nfd-w-4 nfd-h-4\",\n 8: \"nfd-w-8 nfd-h-8\"\n }\n};\n\n/**\n * @param {string} [variant=default] The variant.\n * @param {string} [size] The size.\n * @param {string} [className] The HTML class.\n * @returns {JSX.Element} The spinner.\n */\nconst Spinner = forwardRef(({\n variant,\n size,\n className\n}, ref) => {\n const svgAriaProps = useSvgAria();\n return createElement(\"svg\", {\n ref: ref,\n xmlns: \"http://www.w3.org/2000/svg/\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n className: classNames(\"nfd-animate-spin\", classNameMap.variant[variant], classNameMap.size[size], className),\n ...svgAriaProps\n }, createElement(\"circle\", {\n className: \"nfd-opacity-25\",\n cx: \"12\",\n cy: \"12\",\n r: \"10\",\n stroke: \"currentColor\",\n strokeWidth: \"4\"\n }), createElement(\"path\", {\n className: \"nfd-opacity-75\",\n fill: \"currentColor\",\n d: \"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n }));\n});\nconst propTypes = {\n variant: PropTypes.oneOf(keys(classNameMap.variant)),\n size: PropTypes.oneOf(keys(classNameMap.size)),\n className: PropTypes.string\n};\nSpinner.propTypes = propTypes;\nSpinner.defaultProps = {\n variant: \"default\",\n size: \"4\",\n className: \"\"\n};\n\n// eslint-disable-next-line require-jsdoc\nexport const StoryComponent = props => createElement(Spinner, {\n ...props\n});\nStoryComponent.propTypes = propTypes;\nStoryComponent.defaultProps = Spinner.defaultProps;\nStoryComponent.displayName = \"Spinner\";\nexport default Spinner;","import { createElement } from \"@wordpress/element\";\n/* eslint-disable no-undefined */\nimport PropTypes from \"prop-types\";\nimport classNames from \"classnames\";\nimport { forwardRef } from \"@wordpress/element\";\nexport const classNameMap = {\n size: {\n 1: \"nfd-title--1\",\n 2: \"nfd-title--2\",\n 3: \"nfd-title--3\",\n 4: \"nfd-title--4\",\n 5: \"nfd-title--5\"\n }\n};\n\n/**\n * @param {Object} props Props object.\n * @returns {JSX.Element} Title component.\n */\nconst Title = forwardRef(({\n children,\n as: Component,\n size,\n className,\n ...props\n}, ref) => {\n return createElement(Component, {\n ref: ref,\n className: classNames(\"nfd-title\", classNameMap.size[size || Component[1]], className),\n ...props\n }, children);\n});\nconst propTypes = {\n children: PropTypes.node.isRequired,\n as: PropTypes.elementType,\n size: PropTypes.oneOf(Object.keys(classNameMap.size)),\n className: PropTypes.string\n};\nTitle.propTypes = propTypes;\nTitle.defaultProps = {\n as: \"h1\",\n size: undefined,\n className: \"\"\n};\n\n// eslint-disable-next-line require-jsdoc\nexport const StoryComponent = props => createElement(Title, {\n ...props\n});\nStoryComponent.propTypes = propTypes;\nStoryComponent.defaultProps = Title.defaultProps;\nStoryComponent.displayName = \"Title\";\nexport default Title;","import { useMemo } from \"@wordpress/element\";\n\n/**\n * Creates aria attributes for an SVG.\n * @param {boolean|null} [isFocusable] Boolean value to indicate if it should be focusable.\n * @returns {Object} Object with `role` and `aria-hidden` and optionally `focusable`.\n */\nconst useSvgAria = (isFocusable = null) => {\n return useMemo(() => {\n const aria = {\n role: \"img\",\n \"aria-hidden\": \"true\"\n };\n if (isFocusable !== null) {\n aria.focusable = isFocusable ? \"true\" : \"false\";\n }\n return aria;\n }, [isFocusable]);\n};\nexport default useSvgAria;","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","import { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@newfold/ui-component-library';\n\n/**\n * Generic Error Boundary Component\n * Catches JavaScript errors anywhere in the child component tree\n */\nexport class ErrorBoundary extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = { \n\t\t\thasError: false, \n\t\t\terror: null, \n\t\t\terrorInfo: null \n\t\t};\n\t}\n\n\tstatic getDerivedStateFromError(error) {\n\t\t// Update state so the next render will show the fallback UI\n\t\treturn { hasError: true };\n\t}\n\n\tcomponentDidCatch(error, errorInfo) {\n\t\t// Log error details for debugging\n\t\tconsole.error('ErrorBoundary caught an error:', error, errorInfo);\n\t\t\n\t\t// Enhanced logging for API errors\n\t\tif (error.name?.includes('APIError')) {\n\t\t\tconsole.error('API Error Details:', {\n\t\t\t\tendpoint: error.data?.endpoint,\n\t\t\t\trequestData: error.data?.requestData,\n\t\t\t\toriginalError: error.originalError,\n\t\t\t\tstatus: error.originalError?.status\n\t\t\t});\n\t\t}\n\t\t\n\t\tthis.setState({\n\t\t\terror: error,\n\t\t\terrorInfo: errorInfo\n\t\t});\n\n\t\t// Optional: Send error to logging service\n\t\tif (window.NewfoldRuntime?.capabilities?.canLogErrors) {\n\t\t\tthis.logErrorToService(error, errorInfo);\n\t\t}\n\t}\n\n\tlogErrorToService = (error, errorInfo) => {\n\t\t// Optional: Send to error tracking service\n\t\ttry {\n\t\t\t// Example: Send to your error tracking service\n\t\t\tconsole.warn('Error logged:', {\n\t\t\t\terror: error.toString(),\n\t\t\t\tcomponentStack: errorInfo.componentStack,\n\t\t\t\ttimestamp: new Date().toISOString(),\n\t\t\t\tuserAgent: navigator.userAgent,\n\t\t\t\turl: window.location.href\n\t\t\t});\n\t\t} catch (loggingError) {\n\t\t\tconsole.error('Failed to log error:', loggingError);\n\t\t}\n\t};\n\n\thandleRetry = () => {\n\t\tthis.setState({ \n\t\t\thasError: false, \n\t\t\terror: null, \n\t\t\terrorInfo: null \n\t\t});\n\t};\n\n\trender() {\n\t\tif (this.state.hasError) {\n\t\t\t// Fallback UI\n\t\t\tconst { fallback, showDetails = false } = this.props;\n\t\t\t\n\t\t\tif (fallback) {\n\t\t\t\treturn fallback;\n\t\t\t}\n\n\t\t\t// Check if this is an API error\n\t\t\tconst isApiError = this.state.error?.name?.includes('APIError');\n\t\t\tconst errorMessage = isApiError \n\t\t\t\t? __('We encountered a connection error. Please check your internet connection and try again.', 'wp-module-next-steps')\n\t\t\t\t: __('We encountered an unexpected error. Please try refreshing the page or contact support if the problem persists.', 'wp-module-next-steps');\n\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t

{ isApiError ? __('Connection Error', 'wp-module-next-steps') : __('Something went wrong', 'wp-module-next-steps') }

\n\t\t\t\t\t\t

{ errorMessage }

\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{ __('Try Again', 'wp-module-next-steps') }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t window.location.reload()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __('Refresh Page', 'wp-module-next-steps') }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t{showDetails && this.state.error && (\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{ __('Technical Details', 'wp-module-next-steps') }\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t{this.state.error.toString()}\n\t\t\t\t\t\t\t\t\t{this.state.errorInfo.componentStack}\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t)}\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\treturn this.props.children;\n\t}\n}\n\n/**\n * Specialized Error Boundary for Next Steps components\n * Provides context-specific error handling\n */\nexport class NextStepsErrorBoundary extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = { hasError: false };\n\t}\n\n\tstatic getDerivedStateFromError(error) {\n\t\treturn { hasError: true };\n\t}\n\n\tcomponentDidCatch(error, errorInfo) {\n\t\tconsole.error('Next Steps Error:', error, errorInfo);\n\t\t\n\t\t// Track specific Next Steps errors\n\t\tif (window.NewfoldRuntime?.restUrl) {\n\t\t\tthis.reportNextStepsError(error, errorInfo);\n\t\t}\n\t}\n\n\treportNextStepsError = async (error, errorInfo) => {\n\t\ttry {\n\t\t\t// Optional: Report to Next Steps specific endpoint\n\t\t\tconsole.warn('Next Steps error reported:', {\n\t\t\t\tmodule: 'next-steps',\n\t\t\t\terror: error.message,\n\t\t\t\tstack: error.stack,\n\t\t\t\tcomponentStack: errorInfo.componentStack,\n\t\t\t\ttimestamp: new Date().toISOString()\n\t\t\t});\n\t\t} catch (reportError) {\n\t\t\tconsole.error('Failed to report Next Steps error:', reportError);\n\t\t}\n\t};\n\n\trender() {\n\t\tif (this.state.hasError) {\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t

{ __('Next Steps Unavailable', 'wp-module-next-steps') }

\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t{ __('The Next Steps module encountered an error and cannot be displayed right now.', 'wp-module-next-steps') }\n\t\t\t\t\t\t

\n\t\t\t\t\t\t window.location.reload()}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __('Refresh Page', 'wp-module-next-steps') }\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\treturn this.props.children;\n\t}\n}\n\n/**\n * API-specific Error Boundary for handling API failures gracefully\n * Shows more specific messaging for API-related errors\n */\nexport class APIErrorBoundary extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = { hasError: false };\n\t}\n\n\tstatic getDerivedStateFromError(error) {\n\t\treturn { hasError: true };\n\t}\n\n\tcomponentDidCatch(error, errorInfo) {\n\t\tconsole.error('API Error Boundary caught an error:', error, errorInfo);\n\t\t\n\t\t// Enhanced API error logging\n\t\tif (error.name?.includes('APIError')) {\n\t\t\tconsole.error('API Error Context:', {\n\t\t\t\tendpoint: error.data?.endpoint,\n\t\t\t\tmethod: 'PUT',\n\t\t\t\trequestData: error.data?.requestData,\n\t\t\t\thttpStatus: error.originalError?.status,\n\t\t\t\ttimestamp: new Date().toISOString()\n\t\t\t});\n\t\t}\n\t}\n\n\trender() {\n\t\tif (this.state.hasError) {\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t

{ __('Connection Issue', 'wp-module-next-steps') }

\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t{ __('Unable to save your changes right now. Please check your connection and try again.', 'wp-module-next-steps') }\n\t\t\t\t\t\t

\n\t\t\t\t\t\t window.location.reload()}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __('Refresh Page', 'wp-module-next-steps') }\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\treturn this.props.children;\n\t}\n}\n\n/**\n * Higher-order component to wrap components with error boundary\n * @param {Component} Component - The component to wrap\n * @param {Object} options - Error boundary options\n * @returns {Component} - Wrapped component with error boundary\n */\nexport const withErrorBoundary = (WrappedComponent, options = {}) => {\n\tconst WithErrorBoundaryComponent = (props) => {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t};\n\n\tWithErrorBoundaryComponent.displayName = `withErrorBoundary(${WrappedComponent.displayName || WrappedComponent.name})`;\n\t\n\treturn WithErrorBoundaryComponent;\n};\n\n/**\n * Higher-order component specifically for API error handling\n * @param {Component} Component - The component to wrap\n * @returns {Component} - Wrapped component with API error boundary\n */\nexport const withAPIErrorBoundary = (WrappedComponent) => {\n\tconst WithAPIErrorBoundaryComponent = (props) => {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t};\n\n\tWithAPIErrorBoundaryComponent.displayName = `withAPIErrorBoundary(${WrappedComponent.displayName || WrappedComponent.name})`;\n\t\n\treturn WithAPIErrorBoundaryComponent;\n};","import { \n\tArrowRightIcon,\n\tChevronUpIcon,\n\tPlusCircleIcon,\n\tMinusCircleIcon,\n\tEyeSlashIcon,\n\tEyeIcon,\n\tTrophyIcon,\n\tXCircleIcon\n} from '@heroicons/react/24/outline';\nimport { CheckCircleIcon } from '@heroicons/react/24/solid';\n\n// Using Heroicons components\nexport const chevronIcon = ;\nexport const plusCircleIcon = ;\nexport const minusCircleIcon = ;\nexport const hideIcon = ;\nexport const showIcon = ;\nexport const doneIcon = ;\nexport const goIcon = ;\nexport const trophyIcon = ;\nexport const closeCircleIcon = ;\n\n// Circle dashed icon from https://sidekickicons.com/?iconset=Sidekickicons&code=JSX&icon=circle-dashed\nexport const circleDashedIcon = (\n\t\n\t\t\n\t\n);\n// Circle icon from https://sidekickicons.com/?iconset=Sidekickicons&code=JSX&icon=circle\nexport const circleIcon = (\n\t\n\t\t\n\t\n);\n\n// Custom icons (keeping as SVG)\nexport const todoIcon = (\n\t\n\t\t\n\t\n);\n\n\nexport const spinner = (\n\t\n\t\t\n\t\t\n\t\n);","/**\n * Helper functions for API calls and plan state immutability\n */\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Determine if an error should trigger error boundaries\n * @param {Error} error - The error object\n * @returns {boolean} - Whether to trigger error boundary\n */\nconst shouldTriggerErrorBoundary = (error) => {\n\t// Server errors (5xx) should trigger error boundaries\n\tif (error.status >= 500) return true;\n\t\n\t// Network errors (no status) should trigger error boundaries\n\tif (!error.status) return true;\n\t\n\t// Critical API errors should trigger error boundaries\n\tif (error.name?.includes('Critical')) return true;\n\t\n\t// Authentication errors might need error boundaries in some cases\n\tif (error.status === 401 || error.status === 403) return true;\n\t\n\t// Client errors (4xx) typically shouldn't trigger error boundaries\n\t// These are usually validation errors that should be handled gracefully\n\treturn false;\n};\n\n// Simple progress calculation without caching\n\n/**\n * Calculate progress for a single section\n * @param {Object} section - The section data\n * @returns {Object} Progress data for the section\n */\nexport const calculateSectionProgress = (section) => {\n\tif (!section.tasks?.length) {\n\t\treturn {\n\t\t\ttotalCount: 0,\n\t\t\tcompletedCount: 0,\n\t\t\tisComplete: false,\n\t\t\tpercentage: 0\n\t\t};\n\t}\n\t\n\tconst totalCount = section.tasks.filter(t => t.status !== 'dismissed').length;\n\tconst completedCount = section.tasks.filter(t => t.status === 'done').length;\n\t\n\treturn {\n\t\ttotalCount,\n\t\tcompletedCount,\n\t\tisComplete: totalCount > 0 && completedCount === totalCount,\n\t\tpercentage: totalCount > 0 ? Math.round((completedCount / totalCount) * 100) : 0\n\t};\n};\n\n/**\n * Calculate progress data for all sections in a plan\n * @param {Object} plan - The plan data\n * @returns {Object} Plan with progress data added to each section\n */\nexport const calculatePlanProgress = (plan) => {\n\tif (!plan?.tracks) return plan;\n\t\n\treturn {\n\t\t...plan,\n\t\ttracks: plan.tracks.map(track => ({\n\t\t\t...track,\n\t\t\tsections: track.sections.map(section => ({\n\t\t\t\t...section,\n\t\t\t\tprogress: calculateSectionProgress(section)\n\t\t\t}))\n\t\t}))\n\t};\n};\n\n/**\n * Update task status in plan state immutably and recalculate affected section progress\n * @param {Object} plan - The current plan state\n * @param {string} trackId - Track ID\n * @param {string} sectionId - Section ID \n * @param {string} taskId - Task ID\n * @param {string} newStatus - New task status\n * @returns {Object} New plan state with updated task and progress\n */\nexport const updateTaskStatusInPlan = (plan, trackId, sectionId, taskId, newStatus) => {\n\treturn {\n\t\t...plan,\n\t\ttracks: plan.tracks.map(track => \n\t\t\ttrack.id === trackId \n\t\t\t\t? {\n\t\t\t\t\t...track,\n\t\t\t\t\tsections: track.sections.map(section => {\n\t\t\t\t\t\tif (section.id === sectionId) {\n\t\t\t\t\t\t\t// Update the task and recalculate progress for this section only\n\t\t\t\t\t\t\tconst updatedSection = {\n\t\t\t\t\t\t\t\t...section,\n\t\t\t\t\t\t\t\ttasks: section.tasks.map(task =>\n\t\t\t\t\t\t\t\t\ttask.id === taskId\n\t\t\t\t\t\t\t\t\t\t? { ...task, status: newStatus }\n\t\t\t\t\t\t\t\t\t\t: task\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t// Recalculate progress for just this section\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...updatedSection,\n\t\t\t\t\t\t\t\tprogress: calculateSectionProgress(updatedSection)\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn section;\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\t: track\n\t\t)\n\t};\n};\n\n/**\n * Update section open state in plan state immutably\n * @param {Object} plan - The current plan state\n * @param {string} trackId - Track ID\n * @param {string} sectionId - Section ID\n * @param {boolean} isOpen - New open state\n * @returns {Object} New plan state with updated section\n */\nexport const updateSectionInPlan = (plan, trackId, sectionId, isOpen) => {\n\treturn {\n\t\t...plan,\n\t\ttracks: plan.tracks.map(track => \n\t\t\ttrack.id === trackId \n\t\t\t\t? {\n\t\t\t\t\t...track,\n\t\t\t\t\tsections: track.sections.map(section =>\n\t\t\t\t\t\tsection.id === sectionId\n\t\t\t\t\t\t\t? { ...section, open: isOpen }\n\t\t\t\t\t\t\t: section\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\t: track\n\t\t)\n\t};\n};\n\n/**\n * Update track open state in plan state immutably\n * @param {Object} plan - The current plan state\n * @param {string} trackId - Track ID\n * @param {boolean} isOpen - New open state\n * @returns {Object} New plan state with updated track\n */\nexport const updateTrackInPlan = (plan, trackId, isOpen) => {\n\treturn {\n\t\t...plan,\n\t\ttracks: plan.tracks.map(track => \n\t\t\ttrack.id === trackId \n\t\t\t\t? { ...track, open: isOpen }\n\t\t\t\t: track\n\t\t)\n\t};\n};\n\n/**\n * Method to create endpoint url\n * \n * no permalinks: 'http://localhost:8882/index.php?rest_route=/'\n * permalinks: 'http://localhost:8882/wp-json/'\n */\nexport const createEndpointUrl = ( root, endpoint ) => {\n\t// if restUrl has /index.php?rest_route=/, add escaped endpoint\n\tif ( root.includes( '?' ) ) {\n\t\treturn root + encodeURIComponent( endpoint );\n\t} \n\t// otherwise permalinks set and restUrl should concatenate endpoint\n\treturn root + endpoint;\n};\n\n/**\n * Wrapper method to post task update to endpoint\n *\n * @param {Object} data object of data\n * @param {Function} passError method to handle the error in component\n * @param {Function} thenCallback method to call in promise then\n */\nexport const taskUpdateWrapper = ( data, passError, thenCallback ) => {\n\treturn apiFetch( {\n\t\turl: createEndpointUrl(\n\t\t\twindow.NewfoldRuntime.restUrl,\n\t\t\t'newfold-next-steps/v1/steps/status'\n\t\t),\n\t\tmethod: 'PUT',\n\t\tdata,\n\t} )\n\t\t.then( ( response ) => {\n\t\t\t// Check for API-level errors in successful responses\n\t\t\tif ( response && response.error ) {\n\t\t\t\tconst apiError = new Error( `Task update failed: ${response.error}` );\n\t\t\t\tapiError.name = 'TaskUpdateError';\n\t\t\t\tapiError.data = { response, requestData: data };\n\t\t\t\tthrow apiError;\n\t\t\t}\n\t\t\tthenCallback( response );\n\t\t} )\n\t\t.catch( ( error ) => {\n\t\t\t// Enhance error with context for error boundaries\n\t\t\tconst enhancedError = new Error( \n\t\t\t\t`Task update API error: ${error.message || 'Unknown error'}` \n\t\t\t);\n\t\t\tenhancedError.name = 'TaskUpdateAPIError';\n\t\t\tenhancedError.originalError = error;\n\t\t\tenhancedError.data = { requestData: data, endpoint: 'steps/status' };\n\t\t\t\n\t\t\t// Call error handler first\n\t\t\tpassError( enhancedError );\n\t\t\t\n\t\t\t// Then throw to trigger error boundary if error is critical\n\t\t\tif ( shouldTriggerErrorBoundary( error ) ) {\n\t\t\t\tthrow enhancedError;\n\t\t\t}\n\t\t} );\n};\n\n/**\n* Wrapper method to post section update to endpoint\n*\n* @param {Object} data object of data\n* @param {Function} passError method to handle the error in component\n* @param {Function} thenCallback method to call in promise then\n*/\nexport const sectionUpdateWrapper = ( data, passError, thenCallback ) => {\n\treturn apiFetch( {\n\t\turl: createEndpointUrl( \n\t\t\twindow.NewfoldRuntime.restUrl, \n\t\t\t'newfold-next-steps/v1/steps/section/open'\n\t\t),\n\t\tmethod: 'PUT',\n\t\tdata,\n\t} )\n\t\t.then( ( response ) => {\n\t\t\t// Check for API-level errors in successful responses\n\t\t\tif ( response && response.error ) {\n\t\t\t\tconst apiError = new Error( `Section update failed: ${response.error}` );\n\t\t\t\tapiError.name = 'SectionUpdateError';\n\t\t\t\tapiError.data = { response, requestData: data };\n\t\t\t\tthrow apiError;\n\t\t\t}\n\t\t\tthenCallback( response );\n\t\t} )\n\t\t.catch( ( error ) => {\n\t\t\t// Enhance error with context for error boundaries\n\t\t\tconst enhancedError = new Error( \n\t\t\t\t`Section update API error: ${error.message || 'Unknown error'}` \n\t\t\t);\n\t\t\tenhancedError.name = 'SectionUpdateAPIError';\n\t\t\tenhancedError.originalError = error;\n\t\t\tenhancedError.data = { requestData: data, endpoint: 'steps/section/open' };\n\t\t\t\n\t\t\t// Call error handler first\n\t\t\tpassError( enhancedError );\n\t\t\t\n\t\t\t// Then throw to trigger error boundary if error is critical\n\t\t\tif ( shouldTriggerErrorBoundary( error ) ) {\n\t\t\t\tthrow enhancedError;\n\t\t\t}\n\t\t} );\n};\n\n/**\n* Wrapper method to post track update to endpoint\n*\n* @param {Object} data object of data\n* @param {Function} passError method to handle the error in component\n* @param {Function} thenCallback method to call in promise then\n*/\nexport const trackUpdateWrapper = ( data, passError, thenCallback ) => {\n\treturn apiFetch( {\n\t\turl: createEndpointUrl( \n\t\t\twindow.NewfoldRuntime.restUrl, \n\t\t\t'newfold-next-steps/v1/steps/track/open'\n\t\t),\n\t\tmethod: 'PUT',\n\t\tdata,\n\t} )\n\t\t.then( ( response ) => {\n\t\t\t// Check for API-level errors in successful responses\n\t\t\tif ( response && response.error ) {\n\t\t\t\tconst apiError = new Error( `Track update failed: ${response.error}` );\n\t\t\t\tapiError.name = 'TrackUpdateError';\n\t\t\t\tapiError.data = { response, requestData: data };\n\t\t\t\tthrow apiError;\n\t\t\t}\n\t\t\tthenCallback( response );\n\t\t} )\n\t\t.catch( ( error ) => {\n\t\t\t// Enhance error with context for error boundaries\n\t\t\tconst enhancedError = new Error( \n\t\t\t\t`Track update API error: ${error.message || 'Unknown error'}` \n\t\t\t);\n\t\t\tenhancedError.name = 'TrackUpdateAPIError';\n\t\t\tenhancedError.originalError = error;\n\t\t\tenhancedError.data = { requestData: data, endpoint: 'steps/track/open' };\n\t\t\t\n\t\t\t// Call error handler first\n\t\t\tpassError( enhancedError );\n\t\t\t\n\t\t\t// Then throw to trigger error boundary if error is critical\n\t\t\tif ( shouldTriggerErrorBoundary( error ) ) {\n\t\t\t\tthrow enhancedError;\n\t\t\t}\n\t\t} );\n};\n","import { useState, useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@newfold/ui-component-library';\nimport { spinner, hideIcon } from '../icons';\nimport { Track } from '../track';\nimport { NextStepsErrorBoundary } from '../ErrorBoundary';\nimport { \n\tcalculatePlanProgress,\n\tupdateTaskStatusInPlan,\n\tupdateSectionInPlan,\n\tupdateTrackInPlan,\n\ttaskUpdateWrapper,\n\tsectionUpdateWrapper,\n\ttrackUpdateWrapper\n} from './helpers';\nimport './styles.scss';\n\n\nexport const NextSteps = () => {\n\tconst [ plan, setPlan ] = useState( window.NewfoldNextSteps );\n\tconst [ showDismissed, setShowDismissed ] = useState( true );\n\tconst [ showControls, setShowControls ] = useState( false );\n\n\t// Calculate progress data on initial load, then updated per-section\n\tconst planWithProgress = useMemo(() => {\n\t\treturn plan ? calculatePlanProgress(plan) : null;\n\t}, [plan]);\n\n\tconst taskUpdateCallback = ( trackId, sectionId, taskId, status, errorCallback, successCallback ) => {\n\t\t// send update to endpoint\n\t\tconst data = {\n\t\t\tplan_id: plan.id,\n\t\t\ttrack_id: trackId,\n\t\t\tsection_id: sectionId,\n\t\t\ttask_id: taskId,\n\t\t\tstatus,\n\t\t};\n\t\ttaskUpdateWrapper(\n\t\t\tdata,\n\t\t\t( error ) => {\n\t\t\t\terrorCallback( error );\n\t\t\t},\n\t\t\t( response ) => {\n\t\t\t\t// update plan state with the new task status using immutability helper\n\t\t\t\tsetPlan( prevPlan => updateTaskStatusInPlan( prevPlan, trackId, sectionId, taskId, status ) );\n\t\t\t\t// call provided success callback\n\t\t\t\tsuccessCallback( response );\n\t\t\t}\n\t\t);\n\t};\n\n\tconst sectionOpenCallback = ( trackId, sectionId, open ) => {\t\t\n\t\tif ( !trackId || !sectionId ) {\n\t\t\t// Could not find track for intendend section\n\t\t\treturn;\n\t\t}\n\n\t\tconst data = {\n\t\t\tplan_id: plan.id,\n\t\t\ttrack_id: trackId,\n\t\t\tsection_id: sectionId,\n\t\t\topen: open,\n\t\t};\n\t\t\n\t\tsectionUpdateWrapper( \n\t\t\tdata,\n\t\t\t( error ) => {\n\t\t\t\t// console.error( 'Error updating section open state:', error );\n\t\t\t},\n\t\t\t( response ) => {\n\t\t\t\tsetPlan( prevPlan => updateSectionInPlan( prevPlan, trackId, sectionId, open ) );\n\t\t\t}\n\t\t);\n\t};\n\n\tconst trackOpenCallback = ( trackId, open ) => {\n\t\tconst data = {\n\t\t\tplan_id: plan.id,\n\t\t\ttrack_id: trackId,\n\t\t\topen: open,\n\t\t};\n\t\t\n\t\ttrackUpdateWrapper( \n\t\t\tdata,\n\t\t\t( error ) => {\n\t\t\t\t// console.error( 'Error updating track open state:', error );\n\t\t\t},\n\t\t\t( response ) => {\n\t\t\t\tsetPlan( prevPlan => updateTrackInPlan( prevPlan, trackId, open ) );\n\t\t\t}\n\t\t);\n\t};\n\n\t// Handle case where plan might not be loaded yet\n\tif ( ! planWithProgress || ! planWithProgress.tracks ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ spinner }\n\t\t\t\t

{ __( 'Loading next steps...', 'wp-module-next-steps' ) }

\n\t\t\t
\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t

{ planWithProgress.description }

\n\t\t\t\t{ planWithProgress.tracks.map( ( track, trackIndex ) => (\n\t\t\t\t\t\n\t\t\t\t) ) }\n\t\t\t\t{ showControls &&
\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetShowDismissed( ! showDismissed );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t>{ hideIcon }\n\t\t\t\t\t\t{ showDismissed\n\t\t\t\t\t\t\t? __( 'Hide skipped tasks', 'wp-module-next-steps' )\n\t\t\t\t\t\t\t: __( 'View skipped tasks', 'wp-module-next-steps' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t
}\n\t\t\t\n\t\t
\n\t);\n};\n","// extracted by mini-css-extract-plugin\nexport {};","import { createPortal, useEffect, useState } from '@wordpress/element';\nimport { NextSteps } from '../nextSteps';\n\nexport const NextStepsPortalApp = () => {\n\tconst [ container, setContainer ] = useState( null );\n\n\tuseEffect( () => {\n\t\tconst registry = window.NFDPortalRegistry;\n\t\t// Check for required registry\n\t\tif ( ! registry ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst updateContainer = ( el ) => {\n\t\t\tsetContainer( el );\n\t\t};\n\n\t\tconst clearContainer = () => {\n\t\t\tsetContainer( null );\n\t\t};\n\n\t\t// Subscribe to portal readiness updates\n\t\tregistry.onReady( 'next-steps', updateContainer );\n\t\tregistry.onRemoved( 'next-steps', clearContainer );\n\n\t\t// Immediately try to get the container if already registered\n\t\tconst current = registry.getElement( 'next-steps' );\n\t\tif ( current ) {\n\t\t\tupdateContainer( current );\n\t\t}\n\t}, [ container ] );\n\n\tif ( ! container ) {\n\t\treturn null;\n\t}\n\n\treturn createPortal(\n\t\t
\n\t\t\t\n\t\t
,\n\t\tcontainer\n\t);\n};\n","import { memo } from '@wordpress/element';\n\nexport const ProgressBar = memo( ( { completed, total } ) => {\n\tconst percent = total ? Math.round( ( completed / total ) * 100 ) : 0;\n\treturn (\n\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\t{ completed }/{ total }\n\t\t\t\n\t\t
\n\t);\n} );\n","import { useEffect, useState, useRef, memo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Title } from '@newfold/ui-component-library';\nimport { plusCircleIcon, minusCircleIcon, closeCircleIcon,trophyIcon } from '../icons';\nimport { ProgressBar } from '../progressBar';\nimport { Task } from '../task';\nimport { ErrorBoundary } from '../ErrorBoundary';\n\nexport const Section = memo(( props ) => {\n\tconst {\n\t\tindex,\n\t\tsection,\n\t\tsectionOpenCallback,\n\t\tshowDismissed,\n\t\ttaskUpdateCallback,\n\t\ttrackId,\n\t} = props;\n\t\n\t// Get progress data from props (calculated in parent)\n\tconst { totalCount, completedCount, isComplete } = section.progress || {\n\t\ttotalCount: 0,\n\t\tcompletedCount: 0,\n\t\tisComplete: false\n\t};\n\t\n\tconst [ showCompleteCelebration, setShowCompleteCelebration ] = useState( false );\n\t// Track the previous completion state to detect user-triggered completions\n\tconst prevIsComplete = useRef( isComplete );\n\tconst isInitialMount = useRef( true );\n\n\t// watch for section completion state changes and display success celebration if needed\n\tuseEffect( () => {\n\t\t// Only show celebration if\n\t\tif ( \n\t\t\tisComplete && // Section is now complete\n\t\t\ttotalCount > 0 && // Has tasks to complete \n\t\t\t!prevIsComplete.current && // Was previously incomplete (user-triggered transition)\n\t\t\t!isInitialMount.current // Not the initial mount\n\t\t) {\n\t\t\t// display success celebration (slight css-base delay and animation)\n\t\t\tsetShowCompleteCelebration( true );\n\t\t}\n\t\t\n\t\t// Update refs for next render\n\t\tprevIsComplete.current = isComplete;\n\t\tisInitialMount.current = false;\n\t}, [ isComplete ] );\n\n\tconst handleToggleOpen = ( event ) => {\n\t\t// Prevent event from bubbling up to parent track details element\n\t\tevent.stopPropagation();\n\t\t\n\t\t// Get the new open state from the details element\n\t\tconst newOpenState = event.target.open;\n\t\t// Call the callback to update the backend\n\t\tsectionOpenCallback( trackId, section.id, newOpenState );\n\t};\n\n\treturn (\n\t\t( totalCount > 0 || showDismissed === true ) && (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t<span className=\"nfd-section-header-icon nfd-header-icon\">\n\t\t\t\t\t\t<span className=\"nfd-section-header-icon-closed\">\n\t\t\t\t\t\t\t{ plusCircleIcon }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"nfd-section-header-icon-opened\">\n\t\t\t\t\t\t\t{ minusCircleIcon }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t{ section.label }\n\t\t\t\t\n\t\t\t\t{ totalCount > 0 && }\n\t\t\t\n\t\t\t
\n\t\t\t\t{ section.tasks.map( ( task, taskIndex ) => (\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t

{ __('Task temporarily unavailable', 'wp-module-next-steps') }

\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t) ) }\n\t\t\t\n\t\t\t {\n\t\t\t\t\tsetShowCompleteCelebration( false );\n\t\t\t\t\tsectionOpenCallback( trackId, section.id, false );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t\n\t\t\t\t\t{ closeCircleIcon }\n\t\t\t\t\n\t\t\t\t
{ trophyIcon }
\n\t\t\t\t

{ __( 'All complete!', 'wp-module-next-steps' ) }

\n\t\t\t\n\n\t\t\n\t\t)\n\t);\n});\n","import { Title } from '@newfold/ui-component-library';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useEffect, memo } from '@wordpress/element';\nimport { doneIcon, hideIcon, showIcon, goIcon, circleDashedIcon, circleIcon } from '../icons';\n\nexport const Task = memo(( props ) => {\n\tconst {\n\t\tindex,\n\t\tsectionId,\n\t\tshowDismissed,\n\t\ttask,\n\t\ttaskUpdateCallback,\n\t\ttrackId,\n\t} = props;\n\t\n\t// Destructure task properties\n\tconst {\n\t\tid,\n\t\ttitle = '',\n\t\thref,\n\t\tdata_attributes = {}\n\t} = task;\n\t// task status uses state to track the current status\n\tconst [ status, setStatus ] = useState( task.status );\n\n\tuseEffect( () => {\n\t\tsetStatus( task.status );\n\t}, [ task.status ] );\n\n\tconst updateStatus = ( newStatus ) => {\n\t\tconst previousStatus = status;\n\t\tsetStatus( newStatus ); // optimistic update - for immediate UI feedback\n\t\t// update task status via API\n\t\ttaskUpdateCallback( \n\t\t\ttrackId,\n\t\t\tsectionId,\n\t\t\tid,\n\t\t\tnewStatus,\n\t\t\t( error ) => {\n\t\t\t\t// If error, revert optimistic task update to previous status\n\t\t\t\tsetStatus( previousStatus );\n\t\t\t\t// further error handling done in the error boundary\n\t\t\t},\n\t\t\t( response ) => {\n\t\t\t\tsetStatus( newStatus ); // redundant since we optimistically set it above\n\t\t\t}\n\t\t);\n\t};\n\t\n\tconst getHref = () => {\n let hrefValue = href;\n\t\t// replace {siteUrl} placeholder with the actual site URL\n\t\tif ( hrefValue.includes( '{siteUrl}' ) ) {\n hrefValue = href.replace( '{siteUrl}', window.NewfoldRuntime.siteUrl );\n\t\t}\n\t\treturn window.NewfoldRuntime?.linkTracker?.addUtmParams( hrefValue ) || hrefValue;\n\t};\n\n\tconst getTarget = () => {\n\t\t// if href is external, return target=\"_blank\"\n\t\tif (\n\t\t\thref.includes( '{siteUrl}' ) ||\n\t\t\thref.includes( window.NewfoldRuntime.siteUrl )\n\t\t) {\n\t\t\treturn '';\n\t\t}\n\t\treturn '_blank';\n\t};\n\n\t/**\n\t * Format data attributes for React components\n\t * Ensures all keys have 'data-' prefix and handles boolean values\n\t */\n\tconst formatDataAttributes = () => {\n\t\tconst formatted = {\n\t\t\t'data-nfd-task-index': index,\n\t\t\t'data-nfd-task-id': id,\n\t\t};\n\t\t\n\t\tObject.entries( data_attributes ).forEach( ( [ key, value ] ) => {\n\t\t\t// Ensure key has 'data-' prefix\n\t\t\tconst dataKey = key.startsWith( 'data-' ) ? key : `data-${ key }`;\n\t\t\t\n\t\t\t// Handle boolean values (convert to string or use key as flag)\n\t\t\tif ( typeof value === 'boolean' ) {\n\t\t\t\tformatted[ dataKey ] = value ? 'true' : 'false';\n\t\t\t} else {\n\t\t\t\tformatted[ dataKey ] = value;\n\t\t\t}\n\t\t} );\n\t\t\n\t\treturn formatted;\n\t};\n\n\t// Combine custom data attributes with any other restProps\n\tconst combinedAttributes = { ...formatDataAttributes() };\n\n\tconst renderStepContent = ( href = false, target = '' ) => {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ href && (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t) }\n\t\t\t\t{ ! href && (\n\t\t\t\t\t\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t\n\t\t\t\t) }\n\t\t\t\t{/* { description } */}\n\t\t\t
\n\t\t);\n\t};\n\tconst renderNewStep = () => {\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tupdateStatus( 'done' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttitle={ __(\n\t\t\t\t\t\t\t\t'Mark Complete',\n\t\t\t\t\t\t\t\t'wp-module-next-steps'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ circleIcon }\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t{ renderStepContent( getHref(), getTarget() ) }\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tupdateStatus( 'dismissed' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttitle={ __( 'Skip', 'wp-module-next-steps' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ hideIcon }\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{ goIcon }\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t};\n\tconst renderDoneStep = () => {\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tupdateStatus( 'new' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttitle={ __( 'Restart', 'wp-module-next-steps' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ doneIcon }\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t{ renderStepContent( getHref(), getTarget() ) }\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t};\n\tconst renderDismissedStep = () => {\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tupdateStatus( 'new' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttitle={ __( 'Unskip', 'wp-module-next-steps' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ circleDashedIcon }\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t{ renderStepContent( getHref(), getTarget() ) }\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tupdateStatus( 'new' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttitle={ __( 'Unskip', 'wp-module-next-steps' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ showIcon }\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{ status === 'new' && renderNewStep() }\n\t\t\t{ status === 'done' && renderDoneStep() }\n\t\t\t{ status === 'dismissed' && showDismissed && renderDismissedStep() }\n\t\t\n\t);\n});\n","import { memo } from '@wordpress/element';\nimport { Title } from '@newfold/ui-component-library';\nimport { chevronIcon } from '../icons';\nimport { Section } from '../section';\nimport { ErrorBoundary } from '../ErrorBoundary';\n\nexport const Track = memo(( props ) => {\n\tconst {\n\t\tindex,\n\t\ttrack,\n\t\tsectionOpenCallback,\n\t\tshowDismissed,\n\t\ttaskUpdateCallback,\n\t\ttrackOpenCallback,\n\t} = props;\n\n\tconst handleToggleOpen = ( event ) => {\n\t\t// Get the new open state from the details element\n\t\tconst newOpenState = event.target.open;\n\t\t// Call the callback to update the backend\n\t\ttrackOpenCallback( track.id, newOpenState );\n\t};\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{ track.label }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{ chevronIcon }\n\t\t\t\t\n\t\t\t\n\t\t\t
\n\t\t\t\t{ track.sections.map( ( section, sectionIndex ) => (\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t

Section temporarily unavailable

\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t) ) }\n\t\t\t\n\t\t\n\t);\n});\n","module.exports = window[\"wp\"][\"apiFetch\"];","module.exports = window[\"wp\"][\"domReady\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"lodash\"];","module.exports = window[\"React\"];","module.exports = window[\"ReactJSXRuntime\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import domReady from '@wordpress/dom-ready';\nimport { createRoot } from '@wordpress/element';\nimport { NextStepsPortalApp } from '../components/portal';\n\nconst WP_NEXTSTEPS_FILL_ELEMENT = 'nfd-next-steps-portal';\nlet root = null;\n\nconst App = () => {\n\treturn ;\n};\n\nconst NextStepsPortalAppRender = () => {\n\tconst DOM_ELEMENT = document.getElementById( WP_NEXTSTEPS_FILL_ELEMENT );\n\tif ( null !== DOM_ELEMENT ) {\n\t\tif ( 'undefined' !== typeof createRoot ) {\n\t\t\tif ( ! root ) {\n\t\t\t\troot = createRoot( DOM_ELEMENT );\n\t\t\t}\n\t\t\troot.render( );\n\t\t}\n\t}\n};\n\n// window.addEventListener( 'nfd:slots-ready', NextStepsPortalAppRender );\ndomReady( NextStepsPortalAppRender );\n"],"names":["Component","__","Button","jsx","_jsx","jsxs","_jsxs","ErrorBoundary","constructor","props","state","hasError","error","errorInfo","getDerivedStateFromError","componentDidCatch","console","name","includes","endpoint","data","requestData","originalError","status","setState","window","NewfoldRuntime","capabilities","canLogErrors","logErrorToService","warn","toString","componentStack","timestamp","Date","toISOString","userAgent","navigator","url","location","href","loggingError","handleRetry","render","fallback","showDetails","isApiError","errorMessage","className","children","variant","onClick","reload","NextStepsErrorBoundary","restUrl","reportNextStepsError","module","message","stack","reportError","APIErrorBoundary","method","httpStatus","withErrorBoundary","WrappedComponent","options","WithErrorBoundaryComponent","displayName","withAPIErrorBoundary","WithAPIErrorBoundaryComponent","ArrowRightIcon","ChevronUpIcon","PlusCircleIcon","MinusCircleIcon","EyeSlashIcon","EyeIcon","TrophyIcon","XCircleIcon","CheckCircleIcon","chevronIcon","plusCircleIcon","minusCircleIcon","hideIcon","showIcon","doneIcon","goIcon","trophyIcon","closeCircleIcon","circleDashedIcon","xmlns","viewBox","strokeWidth","stroke","fill","strokeLinecap","strokeLinejoin","d","circleIcon","todoIcon","cx","cy","r","spinner","class","role","apiFetch","shouldTriggerErrorBoundary","calculateSectionProgress","section","tasks","length","totalCount","completedCount","isComplete","percentage","filter","t","Math","round","calculatePlanProgress","plan","tracks","map","track","sections","progress","updateTaskStatusInPlan","trackId","sectionId","taskId","newStatus","id","updatedSection","task","updateSectionInPlan","isOpen","open","updateTrackInPlan","createEndpointUrl","root","encodeURIComponent","taskUpdateWrapper","passError","thenCallback","then","response","apiError","Error","catch","enhancedError","sectionUpdateWrapper","trackUpdateWrapper","useState","useMemo","Track","NextSteps","setPlan","NewfoldNextSteps","showDismissed","setShowDismissed","showControls","setShowControls","planWithProgress","taskUpdateCallback","errorCallback","successCallback","plan_id","track_id","section_id","task_id","prevPlan","sectionOpenCallback","trackOpenCallback","description","trackIndex","index","createPortal","useEffect","NextStepsPortalApp","container","setContainer","registry","NFDPortalRegistry","updateContainer","el","clearContainer","onReady","onRemoved","current","getElement","memo","ProgressBar","completed","total","percent","style","width","useRef","Title","Task","Section","showCompleteCelebration","setShowCompleteCelebration","prevIsComplete","isInitialMount","handleToggleOpen","event","stopPropagation","newOpenState","target","onToggle","as","label","taskIndex","e","title","Fragment","_Fragment","data_attributes","setStatus","updateStatus","previousStatus","getHref","hrefValue","replace","siteUrl","linkTracker","addUtmParams","getTarget","formatDataAttributes","formatted","Object","entries","forEach","key","value","dataKey","startsWith","combinedAttributes","renderStepContent","renderNewStep","renderDoneStep","renderDismissedStep","sectionIndex","domReady","createRoot","WP_NEXTSTEPS_FILL_ELEMENT","App","NextStepsPortalAppRender","DOM_ELEMENT","document","getElementById"],"sourceRoot":""} \ No newline at end of file diff --git a/build/next-steps-portal/next-steps-portal-rtl.css b/build/next-steps-portal/next-steps-portal-rtl.css index 6b816ba..1f448eb 100644 --- a/build/next-steps-portal/next-steps-portal-rtl.css +++ b/build/next-steps-portal/next-steps-portal-rtl.css @@ -1 +1 @@ -#nfd-nextsteps.nfd-nextsteps .nfd-track{border:1px solid #336ad7;border-radius:4px;margin-bottom:1.5rem;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-track:hover{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-header,#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-sections{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-title{font-size:1rem;font-weight:600;padding:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-track-header{align-items:center;color:#121212;cursor:pointer;display:flex;justify-content:space-between;transition:background-color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header .nfd-header-icon{transition:color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-track-title,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track-header-icon{transform:rotate(-180deg);width:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-track[open]{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-header-icon{transform:rotate(0deg)}#nfd-nextsteps.nfd-nextsteps .nfd-section{background-color:#fff;border:1px solid #d1e1ff;border-radius:1rem;margin-bottom:1rem;overflow:hidden;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-steps{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header{gap:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header h3{align-items:center;display:flex;gap:1rem;margin:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-opened{height:1.75rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-opened{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-opened{display:inline-block}#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-closed{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar{background-color:rgba(224,232,238,.82);border:1px solid #d7d7d7;border-radius:1rem;height:1rem;max-width:50%;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-inner{background-color:rgba(51,106,215,.659);border-radius:1rem;height:calc(1rem - 2px);transition:all .2s ease;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-label{color:#234aa7;font-size:11px;position:absolute;left:.75rem;top:-1px;z-index:2}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-0 .nfd-progress-bar-label{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-inner{background-color:#a0c00f}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-label{color:#fff}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete{align-items:center;background-color:hsla(0,0%,100%,.85);border-radius:1rem;display:flex;flex-direction:column;height:calc(100% - 4.25rem);justify-content:center;right:0;max-height:100%;opacity:0;padding:0 1rem 1rem;position:absolute;top:100%;transition:all .15s ease;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete[data-complete=true]{opacity:.95;top:4.25rem;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-nextsteps-section-close-button{height:1.75rem;position:absolute;left:1rem;top:.25rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate{color:#a0c00f;display:flex;height:6rem;margin:0 auto;max-height:100%;min-height:2rem;width:auto}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate svg path{stroke-width:1px}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate-text{color:#121212;font-size:1rem;font-weight:600;margin:0 auto;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step{border:1px solid #d7d7d7;border-radius:1rem;margin-bottom:10px;padding:10px;transition:all .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover{background-color:#eaf4fb;border-color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover .nfd-nextsteps-button-dismiss{opacity:1}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done{background-color:#f6fde8!important;border-color:rgba(120,174,20,.29)}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done .nfd-nextsteps-step-title{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-dismissed{text-decoration:line-through}#nfd-nextsteps.nfd-nextsteps .nfd-ml-auto{margin-right:auto}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button{align-items:center;color:#7e7e7e;display:inline-flex;text-decoration:none;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button:hover{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button svg{height:auto;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo{width:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo:hover{color:#abae14}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-dismiss{opacity:0;width:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-link{width:1.25rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-redo{color:#abae14;width:1.5rem} +#nfd-nextsteps.nfd-nextsteps .nfd-track{border:1px solid #336ad7;border-radius:4px;margin-bottom:1.5rem;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-track:hover{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-header,#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-sections{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-title{font-size:1rem;font-weight:600;padding:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-track-header{align-items:center;color:#121212;cursor:pointer;display:flex;justify-content:space-between;transition:background-color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header .nfd-header-icon{transition:color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-track-title,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track-header-icon{transform:rotate(-180deg);width:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-track[open]{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-header-icon{transform:rotate(0deg)}#nfd-nextsteps.nfd-nextsteps .nfd-section{background-color:#fff;border:1px solid #d1e1ff;border-radius:1rem;margin-bottom:1rem;overflow:hidden;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-steps{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header{gap:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header h3{align-items:center;display:flex;gap:1rem;margin:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-opened{height:1.75rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-opened{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-opened{display:inline-block}#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-closed{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar{background-color:rgba(224,232,238,.82);border:1px solid #d7d7d7;border-radius:1rem;height:1rem;max-width:50%;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-inner{background-color:rgba(51,106,215,.659);border-radius:1rem;height:calc(1rem - 2px);transition:all .2s ease;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-label{color:#234aa7;font-size:12px;position:absolute;left:.75rem;top:-2px;z-index:2}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-0 .nfd-progress-bar-label{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-inner{background-color:#8daa0e}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-label{color:#fff;text-shadow:0 0 2px rgba(0,0,0,.75)}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete{align-items:center;background-color:hsla(0,0%,100%,.85);border-radius:1rem;display:flex;flex-direction:column;height:calc(100% - 4.25rem);justify-content:center;right:0;max-height:100%;opacity:0;padding:0 1rem 1rem;position:absolute;top:100%;transition:all .15s ease .15s;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete[data-complete=true][data-show-celebration=true]{opacity:.95;top:4.25rem;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-nextsteps-section-close-button{height:1.75rem;position:absolute;left:1rem;top:.25rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate{color:#a0c00f;display:flex;height:6rem;margin:0 auto;max-height:100%;min-height:2rem;width:auto}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate svg path{stroke-width:1px}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate-text{color:#121212;font-size:1rem;font-weight:600;margin:0 auto;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step{border:1px solid #d7d7d7;border-radius:1rem;margin-bottom:10px;padding:10px;transition:all .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover{background-color:#eaf4fb;border-color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover .nfd-nextsteps-button-dismiss{opacity:1}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done{background-color:#f6fde8!important;border-color:rgba(120,174,20,.29)}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done .nfd-nextsteps-step-title{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-dismissed{text-decoration:line-through}#nfd-nextsteps.nfd-nextsteps .nfd-ml-auto{margin-right:auto}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button{align-items:center;color:#7e7e7e;display:inline-flex;text-decoration:none;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button:hover{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button svg{height:auto;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo{width:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo:hover{color:#abae14}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-dismiss{opacity:0;width:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-link{width:1.25rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-redo{color:#abae14;width:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error{background:#fff;border:1px solid #ddd;border-radius:4px;margin:1rem 0;padding:2rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-content,#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-nextsteps-error-content,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-content,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-nextsteps-error-content{margin:0 auto;max-width:500px}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-content h3,#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-nextsteps-error-content h3,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-content h3,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-nextsteps-error-content h3{color:#d63638;font-size:1.2rem;margin-bottom:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-content p,#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-nextsteps-error-content p,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-content p,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-nextsteps-error-content p{color:#666;line-height:1.5;margin-bottom:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-actions,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-actions{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center;margin-bottom:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details{background:#f8f9fa;border:1px solid #e9ecef;border-radius:4px;margin-top:1.5rem;padding:1rem;text-align:right}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details summary,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details summary{color:#495057;cursor:pointer;font-weight:600;margin-bottom:.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details summary:hover,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details summary:hover{color:#007cba}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details .nfd-error-boundary-stack,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details .nfd-error-boundary-stack{background:#f1f1f1;border:1px solid #ccc;border-radius:3px;color:#d63638;font-family:Courier New,monospace;font-size:.8rem;margin:0;max-height:200px;overflow-y:auto;padding:.75rem;white-space:pre-wrap;word-break:break-word}#nfd-nextsteps.nfd-nextsteps .nfd-section-error{background:#fff3cd;border:1px solid #ffeaa7;border-radius:4px;color:#856404;font-size:.9rem;margin:.5rem 0;padding:1rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-section-error p{margin:0}#nfd-nextsteps.nfd-nextsteps .nfd-task-error{background:#f8d7da;border:1px solid #f5c6cb;border-radius:4px;color:#721c24;font-size:.85rem;margin:.25rem 0;padding:.75rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-task-error p{margin:0}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary{background:#e7f3ff;border:1px solid #b3d9ff;border-radius:4px;margin:1rem 0;padding:1.5rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary .nfd-api-error-content{margin:0 auto;max-width:400px}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary .nfd-api-error-content h4{color:#0073aa;font-size:1.1rem;margin-bottom:.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary .nfd-api-error-content p{color:#555;line-height:1.4;margin-bottom:1rem} diff --git a/build/next-steps-portal/next-steps-portal.css b/build/next-steps-portal/next-steps-portal.css index 5fd7d24..7126d18 100644 --- a/build/next-steps-portal/next-steps-portal.css +++ b/build/next-steps-portal/next-steps-portal.css @@ -1 +1 @@ -#nfd-nextsteps.nfd-nextsteps .nfd-track{border:1px solid #336ad7;border-radius:4px;margin-bottom:1.5rem;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-track:hover{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-header,#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-sections{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-title{font-size:1rem;font-weight:600;padding:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-track-header{align-items:center;color:#121212;cursor:pointer;display:flex;justify-content:space-between;transition:background-color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header .nfd-header-icon{transition:color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-track-title,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track-header-icon{transform:rotate(180deg);width:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-track[open]{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-header-icon{transform:rotate(0deg)}#nfd-nextsteps.nfd-nextsteps .nfd-section{background-color:#fff;border:1px solid #d1e1ff;border-radius:1rem;margin-bottom:1rem;overflow:hidden;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-steps{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header{gap:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header h3{align-items:center;display:flex;gap:1rem;margin:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-opened{height:1.75rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-opened{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-opened{display:inline-block}#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-closed{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar{background-color:rgba(224,232,238,.82);border:1px solid #d7d7d7;border-radius:1rem;height:1rem;max-width:50%;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-inner{background-color:rgba(51,106,215,.659);border-radius:1rem;height:calc(1rem - 2px);transition:all .2s ease;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-label{color:#234aa7;font-size:11px;position:absolute;right:.75rem;top:-1px;z-index:2}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-0 .nfd-progress-bar-label{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-inner{background-color:#a0c00f}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-label{color:#fff}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete{align-items:center;background-color:hsla(0,0%,100%,.85);border-radius:1rem;display:flex;flex-direction:column;height:calc(100% - 4.25rem);justify-content:center;left:0;max-height:100%;opacity:0;padding:0 1rem 1rem;position:absolute;top:100%;transition:all .15s ease;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete[data-complete=true]{opacity:.95;top:4.25rem;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-nextsteps-section-close-button{height:1.75rem;position:absolute;right:1rem;top:.25rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate{color:#a0c00f;display:flex;height:6rem;margin:0 auto;max-height:100%;min-height:2rem;width:auto}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate svg path{stroke-width:1px}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate-text{color:#121212;font-size:1rem;font-weight:600;margin:0 auto;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step{border:1px solid #d7d7d7;border-radius:1rem;margin-bottom:10px;padding:10px;transition:all .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover{background-color:#eaf4fb;border-color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover .nfd-nextsteps-button-dismiss{opacity:1}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done{background-color:#f6fde8!important;border-color:rgba(120,174,20,.29)}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done .nfd-nextsteps-step-title{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-dismissed{text-decoration:line-through}#nfd-nextsteps.nfd-nextsteps .nfd-ml-auto{margin-left:auto}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button{align-items:center;color:#7e7e7e;display:inline-flex;text-decoration:none;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button:hover{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button svg{height:auto;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo{width:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo:hover{color:#abae14}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-dismiss{opacity:0;width:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-link{width:1.25rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-redo{color:#abae14;width:1.5rem} +#nfd-nextsteps.nfd-nextsteps .nfd-track{border:1px solid #336ad7;border-radius:4px;margin-bottom:1.5rem;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-track:hover{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-header,#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-sections{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-title{font-size:1rem;font-weight:600;padding:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-track-header{align-items:center;color:#121212;cursor:pointer;display:flex;justify-content:space-between;transition:background-color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header .nfd-header-icon{transition:color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-track-title,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track-header-icon{transform:rotate(180deg);width:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-track[open]{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-header-icon{transform:rotate(0deg)}#nfd-nextsteps.nfd-nextsteps .nfd-section{background-color:#fff;border:1px solid #d1e1ff;border-radius:1rem;margin-bottom:1rem;overflow:hidden;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-steps{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header{gap:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header h3{align-items:center;display:flex;gap:1rem;margin:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-opened{height:1.75rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-opened{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-opened{display:inline-block}#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-closed{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar{background-color:rgba(224,232,238,.82);border:1px solid #d7d7d7;border-radius:1rem;height:1rem;max-width:50%;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-inner{background-color:rgba(51,106,215,.659);border-radius:1rem;height:calc(1rem - 2px);transition:all .2s ease;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-label{color:#234aa7;font-size:12px;position:absolute;right:.75rem;top:-2px;z-index:2}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-0 .nfd-progress-bar-label{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-inner{background-color:#8daa0e}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-label{color:#fff;text-shadow:0 0 2px rgba(0,0,0,.75)}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete{align-items:center;background-color:hsla(0,0%,100%,.85);border-radius:1rem;display:flex;flex-direction:column;height:calc(100% - 4.25rem);justify-content:center;left:0;max-height:100%;opacity:0;padding:0 1rem 1rem;position:absolute;top:100%;transition:all .15s ease .15s;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete[data-complete=true][data-show-celebration=true]{opacity:.95;top:4.25rem;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-nextsteps-section-close-button{height:1.75rem;position:absolute;right:1rem;top:.25rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate{color:#a0c00f;display:flex;height:6rem;margin:0 auto;max-height:100%;min-height:2rem;width:auto}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate svg path{stroke-width:1px}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate-text{color:#121212;font-size:1rem;font-weight:600;margin:0 auto;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step{border:1px solid #d7d7d7;border-radius:1rem;margin-bottom:10px;padding:10px;transition:all .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover{background-color:#eaf4fb;border-color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover .nfd-nextsteps-button-dismiss{opacity:1}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done{background-color:#f6fde8!important;border-color:rgba(120,174,20,.29)}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done .nfd-nextsteps-step-title{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-dismissed{text-decoration:line-through}#nfd-nextsteps.nfd-nextsteps .nfd-ml-auto{margin-left:auto}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button{align-items:center;color:#7e7e7e;display:inline-flex;text-decoration:none;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button:hover{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button svg{height:auto;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo{width:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo:hover{color:#abae14}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-dismiss{opacity:0;width:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-link{width:1.25rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-redo{color:#abae14;width:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error{background:#fff;border:1px solid #ddd;border-radius:4px;margin:1rem 0;padding:2rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-content,#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-nextsteps-error-content,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-content,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-nextsteps-error-content{margin:0 auto;max-width:500px}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-content h3,#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-nextsteps-error-content h3,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-content h3,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-nextsteps-error-content h3{color:#d63638;font-size:1.2rem;margin-bottom:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-content p,#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-nextsteps-error-content p,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-content p,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-nextsteps-error-content p{color:#666;line-height:1.5;margin-bottom:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-actions,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-actions{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center;margin-bottom:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details{background:#f8f9fa;border:1px solid #e9ecef;border-radius:4px;margin-top:1.5rem;padding:1rem;text-align:left}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details summary,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details summary{color:#495057;cursor:pointer;font-weight:600;margin-bottom:.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details summary:hover,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details summary:hover{color:#007cba}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details .nfd-error-boundary-stack,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details .nfd-error-boundary-stack{background:#f1f1f1;border:1px solid #ccc;border-radius:3px;color:#d63638;font-family:Courier New,monospace;font-size:.8rem;margin:0;max-height:200px;overflow-y:auto;padding:.75rem;white-space:pre-wrap;word-break:break-word}#nfd-nextsteps.nfd-nextsteps .nfd-section-error{background:#fff3cd;border:1px solid #ffeaa7;border-radius:4px;color:#856404;font-size:.9rem;margin:.5rem 0;padding:1rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-section-error p{margin:0}#nfd-nextsteps.nfd-nextsteps .nfd-task-error{background:#f8d7da;border:1px solid #f5c6cb;border-radius:4px;color:#721c24;font-size:.85rem;margin:.25rem 0;padding:.75rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-task-error p{margin:0}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary{background:#e7f3ff;border:1px solid #b3d9ff;border-radius:4px;margin:1rem 0;padding:1.5rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary .nfd-api-error-content{margin:0 auto;max-width:400px}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary .nfd-api-error-content h4{color:#0073aa;font-size:1.1rem;margin-bottom:.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary .nfd-api-error-content p{color:#555;line-height:1.4;margin-bottom:1rem} diff --git a/build/next-steps-portal/next-steps-portal.css.map b/build/next-steps-portal/next-steps-portal.css.map index 7b78fea..6ab2487 100644 --- a/build/next-steps-portal/next-steps-portal.css.map +++ b/build/next-steps-portal/next-steps-portal.css.map @@ -1 +1 @@ -{"version":3,"file":"next-steps-portal.css","mappings":";;;AAEI;EACI;EACA;EACA;EACA;AADR;AAGQ;EACI;AADZ;AAIQ;;EAEI;AAFZ;AAKQ;EACI;EACA;EACA;AAHZ;AAOI;;EAEI;EACA;EACA;EACA;EACA;EACA;AALR;AAOQ;;EACI;AAJZ;AAQY;;EACI;AALhB;AAQY;;EACI;AALhB;AAUI;EACI;EACA;AARR;AAWI;EACI;AATR;AAWQ;EACI;AATZ;AAYQ;EACI;AAVZ;AAcI;EACI;EACA;EACA;EACA;EACA;EACA;AAZR;AAcQ;;EAEI;AAZZ;AAeQ;EACI;AAbZ;AAiBI;EACI;EACA;EACA;EACA;AAfR;AAkBI;;;EAGI;EACA;AAhBR;AAoBQ;EACI;AAlBZ;AAqBQ;EACI;AAnBZ;AAyBY;EACI;AAvBhB;AA0BY;EACI;AAxBhB;AA6BI;EACI;EACA;EACA;EACA;EACA;EACA;AA3BR;AA6BQ;EACI;EACA;EACA;EACA;EACA;AA3BZ;AA8BQ;EACI;EACA;EACA;EACA;EACA;EACA;AA5BZ;AAiCY;EACI;AA/BhB;AAqCY;EACI;AAnChB;AAsCY;EACI;AApChB;AAyCI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAvCR;AAyCQ;EACI;EACA;EACA;AAvCZ;AA0CQ;EACI;EACA;EACA;EACA;EACA;AAxCZ;AA2CQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;AAzCZ;AA2CY;EACI;AAzChB;AA6CQ;EACI;EACA;EACA;EACA;EACA;AA3CZ;AA+CI;EACI;EACA;EACA;EACA;EACA;AA7CR;AA+CQ;EACI;EACA;AA7CZ;AA+CY;EACI;AA7ChB;AAkDI;EAEI;EACA;AAjDR;AAmDQ;EACI;AAjDZ;AAqDI;EACI;AAnDR;AAsDI;EACI;AApDR;AAuDI;EACI;EACA;EACA;EACA;EACA;AArDR;AAuDQ;EACI;AArDZ;AAwDQ;EACI;EACA;AAtDZ;AA0DI;EACI;AAxDR;AA0DQ;EACI;AAxDZ;AA4DI;EACI;EACA;AA1DR;AA6DI;EACI;AA3DR;AA8DI;EACI;EACA;AA5DR,C","sources":["webpack://@newfold-labs/wp-module-next-steps/./src/components/nextSteps/styles.scss"],"sourcesContent":["#nfd-nextsteps.nfd-nextsteps {\n\n .nfd-track {\n border: 1px solid #336AD7;\n border-radius: 4px;\n margin-bottom: 1.5rem;\n transition: all .2s ease;\n\n &:hover {\n background-color: #EAF4FB;\n }\n\n .nfd-track-header,\n .nfd-track-sections {\n padding: 1rem;\n }\n\n .nfd-track-title {\n padding: 0 !important;\n font-size: 1rem;\n font-weight: 600;\n }\n }\n\n .nfd-track-header,\n .nfd-section-header {\n align-items: center;\n cursor: pointer;\n display: flex;\n color: #121212;\n justify-content: space-between;\n transition: background-color .2s ease-in-out;\n\n .nfd-header-icon {\n transition: color .2s ease-in-out;\n }\n\n &:hover {\n .nfd-track-title {\n color: #336AD7;\n }\n\n .nfd-header-icon {\n color: #336AD7\n }\n }\n }\n\n .nfd-track-header-icon {\n width: 2rem;\n transform: rotate(180deg);\n }\n\n .nfd-track[open] {\n background-color: #EAF4FB;\n\n .nfd-track-title {\n color: #336AD7;\n }\n\n .nfd-track-header-icon {\n transform: rotate(0deg);\n }\n }\n\n .nfd-section {\n background-color: #ffffff;\n border: 1px solid #D1E1FF;\n border-radius: 1rem;\n margin-bottom: 1rem;\n overflow: hidden;\n position: relative;\n\n .nfd-section-header,\n .nfd-section-steps {\n padding: 1rem;\n }\n\n .nfd-section-header {\n gap: 2rem;\n }\n }\n\n .nfd-section-header h3 {\n display: flex;\n align-items: center;\n gap: 1rem;\n margin: 0 !important;\n }\n\n .nfd-section-header-icon,\n .nfd-section-header-icon-opened,\n .nfd-section-header-icon-closed {\n width: 1.75rem;\n height: 1.75rem;\n }\n\n .nfd-section-header-icon {\n .nfd-section-header-icon-opened {\n display: none;\n }\n\n .nfd-section-header-icon-closed {\n display: inline-block;\n }\n }\n\n .nfd-section[open] {\n .nfd-section-header-icon {\n .nfd-section-header-icon-opened {\n display: inline-block;\n }\n\n .nfd-section-header-icon-closed {\n display: none;\n }\n }\n }\n\n .nfd-progress-bar {\n background-color: #E0E8EED1;\n border: 1px solid #D7D7D7;\n border-radius: 1rem;\n height: 1rem;\n max-width: 50%;\n position: relative;\n\n .nfd-progress-bar-inner {\n background-color: #336AD7A8;\n border-radius: 1rem;\n height: calc(1rem - 2px);\n z-index: 1;\n transition: all .2s ease;\n }\n\n .nfd-progress-bar-label {\n position: absolute;\n top: -1px;\n right: 0.75rem;\n color: #234aa7;\n z-index: 2;\n font-size: 11px;\n }\n\n // empty style\n &.nfd-progress-bar-0 {\n .nfd-progress-bar-label {\n color: #696969;\n }\n }\n\n // complete style\n &.nfd-progress-bar-100 {\n .nfd-progress-bar-inner {\n background-color: #A0C00F;\n }\n\n .nfd-progress-bar-label {\n color: #fff;\n }\n }\n }\n\n .nfd-section-complete {\n align-items: center;\n background-color: rgba(255, 255, 255, .85);\n border-radius: 1rem;\n display: flex;\n flex-direction: column;\n height: calc(100% - 4.25rem);\n justify-content: center;\n left: 0;\n max-height: 100%;\n opacity: 0;\n padding: 0 1rem 1rem;\n position: absolute;\n top: 100%;\n transition: all .15s ease;\n width: 100%;\n\n &[data-complete=\"true\"] {\n opacity: .95;\n top: 4.25rem;\n z-index: 1;\n }\n\n .nfd-nextsteps-section-close-button {\n height: 1.75rem;\n position: absolute;\n right: 1rem;\n top: 0.25rem;\n width: 1.75rem;\n }\n\n .nfd-section-celebrate {\n display: flex;\n color: #A0C00F;\n height: 6rem;\n margin: 0 auto 0;\n max-height: 100%;\n min-height: 2rem;\n width: auto;\n\n svg path {\n stroke-width: 1px;\n }\n }\n\n .nfd-section-celebrate-text {\n color: #121212;\n font-size: 1rem;\n font-weight: 600;\n margin: 0 auto 0;\n text-align: center;\n }\n }\n\n .nfd-nextsteps-step {\n border: 1px solid #D7D7D7;\n border-radius: 1rem;\n padding: 10px;\n margin-bottom: 10px;\n transition: .2s all ease-in-out;\n\n &:hover {\n background-color: #EAF4FB;\n border-color: #336AD7;\n\n .nfd-nextsteps-button-dismiss {\n opacity: 1;\n }\n }\n }\n\n .nfd-nextsteps-step-done {\n // text-decoration: line-through;\n background-color: #F6FDE8 !important;\n border-color: #78AE144A;\n\n .nfd-nextsteps-step-title {\n color: #696969;\n }\n }\n\n .nfd-nextsteps-step-dismissed {\n text-decoration: line-through;\n }\n\n .nfd-ml-auto {\n margin-left: auto;\n }\n\n .nfd-nextsteps-button {\n align-items: center;\n color: #7E7E7E;\n display: inline-flex;\n text-decoration: none;\n transition: all .2s ease;\n\n &:hover {\n color: #336AD7\n }\n\n svg {\n width: 100%;\n height: auto;\n }\n }\n\n .nfd-nextsteps-button-todo {\n width: 1.5rem;\n\n &:hover {\n color: #ABAE14;\n }\n }\n\n .nfd-nextsteps-button-dismiss {\n width: 1rem;\n opacity: 0;\n }\n\n .nfd-nextsteps-button-link {\n width: 1.25rem;\n }\n\n .nfd-nextsteps-button-redo {\n width: 1.5rem;\n color: #ABAE14;\n }\n\n}"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"next-steps-portal.css","mappings":";;;AAEI;EACI;EACA;EACA;EACA;AADR;AAGQ;EACI;AADZ;AAIQ;;EAEI;AAFZ;AAKQ;EACI;EACA;EACA;AAHZ;AAOI;;EAEI;EACA;EACA;EACA;EACA;EACA;AALR;AAOQ;;EACI;AAJZ;AAQY;;EACI;AALhB;AAQY;;EACI;AALhB;AAUI;EACI;EACA;AARR;AAWI;EACI;AATR;AAWQ;EACI;AATZ;AAYQ;EACI;AAVZ;AAcI;EACI;EACA;EACA;EACA;EACA;EACA;AAZR;AAcQ;;EAEI;AAZZ;AAeQ;EACI;AAbZ;AAiBI;EACI;EACA;EACA;EACA;AAfR;AAkBI;;;EAGI;EACA;AAhBR;AAoBQ;EACI;AAlBZ;AAqBQ;EACI;AAnBZ;AAyBY;EACI;AAvBhB;AA0BY;EACI;AAxBhB;AA6BI;EACI;EACA;EACA;EACA;EACA;EACA;AA3BR;AA6BQ;EACI;EACA;EACA;EACA;EACA;AA3BZ;AA8BQ;EACI;EACA;EACA;EACA;EACA;EACA;AA5BZ;AAiCY;EACI;AA/BhB;AAqCY;EACI;AAnChB;AAsCY;EACI;EACA;AApChB;AAyCI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAvCR;AAyCQ;EACI;EACA;EACA;AAvCZ;AA0CQ;EACI;EACA;EACA;EACA;EACA;AAxCZ;AA2CQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;AAzCZ;AA2CY;EACI;AAzChB;AA6CQ;EACI;EACA;EACA;EACA;EACA;AA3CZ;AA+CI;EACI;EACA;EACA;EACA;EACA;AA7CR;AA+CQ;EACI;EACA;AA7CZ;AA+CY;EACI;AA7ChB;AAkDI;EAEI;EACA;AAjDR;AAmDQ;EACI;AAjDZ;AAqDI;EACI;AAnDR;AAsDI;EACI;AApDR;AAuDI;EACI;EACA;EACA;EACA;EACA;AArDR;AAuDQ;EACI;AArDZ;AAwDQ;EACI;EACA;AAtDZ;AA0DI;EACI;AAxDR;AA0DQ;EACI;AAxDZ;AA4DI;EACI;EACA;AA1DR;AA6DI;EACI;AA3DR;AA8DI;EACI;EACA;AA5DR;AAgEI;;EAEI;EACA;EACA;EACA;EACA;EACA;AA9DR;AAgEQ;;;;EAEI;EACA;AA5DZ;AA8DY;;;;EACI;EACA;EACA;AAzDhB;AA4DY;;;;EACI;EACA;EACA;AAvDhB;AA2DQ;;EACI;EACA;EACA;EACA;EACA;AAxDZ;AA2DQ;;EACI;EACA;EACA;EACA;EACA;EACA;AAxDZ;AA0DY;;EACI;EACA;EACA;EACA;AAvDhB;AAyDgB;;EACI;AAtDpB;AA0DY;;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAvDhB;AA6DI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AA3DR;AA6DQ;EACI;AA3DZ;AAgEI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AA9DR;AAgEQ;EACI;AA9DZ;AAmEI;EACI;EACA;EACA;EACA;EACA;EACA;AAjER;AAmEQ;EACI;EACA;AAjEZ;AAmEY;EACI;EACA;EACA;AAjEhB;AAoEY;EACI;EACA;EACA;AAlEhB,C","sources":["webpack://@newfold-labs/wp-module-next-steps/./src/components/nextSteps/styles.scss"],"sourcesContent":["#nfd-nextsteps.nfd-nextsteps {\n\n .nfd-track {\n border: 1px solid #336AD7;\n border-radius: 4px;\n margin-bottom: 1.5rem;\n transition: all .2s ease;\n\n &:hover {\n background-color: #EAF4FB;\n }\n\n .nfd-track-header,\n .nfd-track-sections {\n padding: 1rem;\n }\n\n .nfd-track-title {\n padding: 0 !important;\n font-size: 1rem;\n font-weight: 600;\n }\n }\n\n .nfd-track-header,\n .nfd-section-header {\n align-items: center;\n cursor: pointer;\n display: flex;\n color: #121212;\n justify-content: space-between;\n transition: background-color .2s ease-in-out;\n\n .nfd-header-icon {\n transition: color .2s ease-in-out;\n }\n\n &:hover {\n .nfd-track-title {\n color: #336AD7;\n }\n\n .nfd-header-icon {\n color: #336AD7\n }\n }\n }\n\n .nfd-track-header-icon {\n width: 2rem;\n transform: rotate(180deg);\n }\n\n .nfd-track[open] {\n background-color: #EAF4FB;\n\n .nfd-track-title {\n color: #336AD7;\n }\n\n .nfd-track-header-icon {\n transform: rotate(0deg);\n }\n }\n\n .nfd-section {\n background-color: #ffffff;\n border: 1px solid #D1E1FF;\n border-radius: 1rem;\n margin-bottom: 1rem;\n overflow: hidden;\n position: relative;\n\n .nfd-section-header,\n .nfd-section-steps {\n padding: 1rem;\n }\n\n .nfd-section-header {\n gap: 2rem;\n }\n }\n\n .nfd-section-header h3 {\n display: flex;\n align-items: center;\n gap: 1rem;\n margin: 0 !important;\n }\n\n .nfd-section-header-icon,\n .nfd-section-header-icon-opened,\n .nfd-section-header-icon-closed {\n width: 1.75rem;\n height: 1.75rem;\n }\n\n .nfd-section-header-icon {\n .nfd-section-header-icon-opened {\n display: none;\n }\n\n .nfd-section-header-icon-closed {\n display: inline-block;\n }\n }\n\n .nfd-section[open] {\n .nfd-section-header-icon {\n .nfd-section-header-icon-opened {\n display: inline-block;\n }\n\n .nfd-section-header-icon-closed {\n display: none;\n }\n }\n }\n\n .nfd-progress-bar {\n background-color: #E0E8EED1;\n border: 1px solid #D7D7D7;\n border-radius: 1rem;\n height: 1rem;\n max-width: 50%;\n position: relative;\n\n .nfd-progress-bar-inner {\n background-color: #336AD7A8;\n border-radius: 1rem;\n height: calc(1rem - 2px);\n z-index: 1;\n transition: all .2s ease;\n }\n\n .nfd-progress-bar-label {\n position: absolute;\n top: -1px;\n right: 0.75rem;\n color: #234aa7;\n z-index: 2;\n font-size: 11px;\n }\n\n // empty style\n &.nfd-progress-bar-0 {\n .nfd-progress-bar-label {\n color: #696969;\n }\n }\n\n // complete style\n &.nfd-progress-bar-100 {\n .nfd-progress-bar-inner {\n background-color: #A0C00F;\n }\n\n .nfd-progress-bar-label {\n color: #fff;\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.75);\n }\n }\n }\n\n .nfd-section-complete {\n align-items: center;\n background-color: rgba(255, 255, 255, .85);\n border-radius: 1rem;\n display: flex;\n flex-direction: column;\n height: calc(100% - 4.25rem);\n justify-content: center;\n left: 0;\n max-height: 100%;\n opacity: 0;\n padding: 0 1rem 1rem;\n position: absolute;\n top: 100%;\n transition: all .15s ease .15s;\n width: 100%;\n\n &[data-complete=\"true\"][data-show-celebration=\"true\"] {\n opacity: .95;\n top: 4.25rem;\n z-index: 1;\n }\n\n .nfd-nextsteps-section-close-button {\n height: 1.75rem;\n position: absolute;\n right: 1rem;\n top: 0.25rem;\n width: 1.75rem;\n }\n\n .nfd-section-celebrate {\n display: flex;\n color: #A0C00F;\n height: 6rem;\n margin: 0 auto 0;\n max-height: 100%;\n min-height: 2rem;\n width: auto;\n\n svg path {\n stroke-width: 1px;\n }\n }\n\n .nfd-section-celebrate-text {\n color: #121212;\n font-size: 1rem;\n font-weight: 600;\n margin: 0 auto 0;\n text-align: center;\n }\n }\n\n .nfd-nextsteps-step {\n border: 1px solid #D7D7D7;\n border-radius: 1rem;\n padding: 10px;\n margin-bottom: 10px;\n transition: .2s all ease-in-out;\n\n &:hover {\n background-color: #EAF4FB;\n border-color: #336AD7;\n\n .nfd-nextsteps-button-dismiss {\n opacity: 1;\n }\n }\n }\n\n .nfd-nextsteps-step-done {\n // text-decoration: line-through;\n background-color: #F6FDE8 !important;\n border-color: #78AE144A;\n\n .nfd-nextsteps-step-title {\n color: #696969;\n }\n }\n\n .nfd-nextsteps-step-dismissed {\n text-decoration: line-through;\n }\n\n .nfd-ml-auto {\n margin-left: auto;\n }\n\n .nfd-nextsteps-button {\n align-items: center;\n color: #7E7E7E;\n display: inline-flex;\n text-decoration: none;\n transition: all .2s ease;\n\n &:hover {\n color: #336AD7\n }\n\n svg {\n width: 100%;\n height: auto;\n }\n }\n\n .nfd-nextsteps-button-todo {\n width: 1.5rem;\n\n &:hover {\n color: #ABAE14;\n }\n }\n\n .nfd-nextsteps-button-dismiss {\n width: 1rem;\n opacity: 0;\n }\n\n .nfd-nextsteps-button-link {\n width: 1.25rem;\n }\n\n .nfd-nextsteps-button-redo {\n width: 1.5rem;\n color: #ABAE14;\n }\n\n // ✨ Error Boundary Styles\n .nfd-error-boundary,\n .nfd-nextsteps-error {\n padding: 2rem;\n text-align: center;\n background: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n margin: 1rem 0;\n\n .nfd-error-boundary-content,\n .nfd-nextsteps-error-content {\n max-width: 500px;\n margin: 0 auto;\n\n h3 {\n color: #d63638;\n margin-bottom: 1rem;\n font-size: 1.2rem;\n }\n\n p {\n color: #666;\n margin-bottom: 1.5rem;\n line-height: 1.5;\n }\n }\n\n .nfd-error-boundary-actions {\n display: flex;\n gap: 0.5rem;\n justify-content: center;\n flex-wrap: wrap;\n margin-bottom: 1rem;\n }\n\n .nfd-error-boundary-details {\n margin-top: 1.5rem;\n text-align: left;\n background: #f8f9fa;\n border: 1px solid #e9ecef;\n border-radius: 4px;\n padding: 1rem;\n\n summary {\n cursor: pointer;\n font-weight: 600;\n margin-bottom: 0.5rem;\n color: #495057;\n\n &:hover {\n color: #007cba;\n }\n }\n\n .nfd-error-boundary-stack {\n background: #f1f1f1;\n border: 1px solid #ccc;\n border-radius: 3px;\n padding: 0.75rem;\n font-family: 'Courier New', monospace;\n font-size: 0.8rem;\n color: #d63638;\n white-space: pre-wrap;\n word-break: break-word;\n max-height: 200px;\n overflow-y: auto;\n margin: 0;\n }\n }\n }\n\n // Section-level error fallback\n .nfd-section-error {\n padding: 1rem;\n text-align: center;\n background: #fff3cd;\n border: 1px solid #ffeaa7;\n border-radius: 4px;\n margin: 0.5rem 0;\n color: #856404;\n font-size: 0.9rem;\n\n p {\n margin: 0;\n }\n }\n\n // Task-level error fallback\n .nfd-task-error {\n padding: 0.75rem;\n text-align: center;\n background: #f8d7da;\n border: 1px solid #f5c6cb;\n border-radius: 4px;\n margin: 0.25rem 0;\n color: #721c24;\n font-size: 0.85rem;\n\n p {\n margin: 0;\n }\n }\n\n // API-specific error boundary\n .nfd-api-error-boundary {\n padding: 1.5rem;\n text-align: center;\n background: #e7f3ff;\n border: 1px solid #b3d9ff;\n border-radius: 4px;\n margin: 1rem 0;\n\n .nfd-api-error-content {\n max-width: 400px;\n margin: 0 auto;\n\n h4 {\n color: #0073aa;\n margin-bottom: 0.75rem;\n font-size: 1.1rem;\n }\n\n p {\n color: #555;\n margin-bottom: 1rem;\n line-height: 1.4;\n }\n }\n }\n\n}"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/next-steps-widget/bundle.asset.php b/build/next-steps-widget/bundle.asset.php index b644a7c..9abb1ae 100644 --- a/build/next-steps-widget/bundle.asset.php +++ b/build/next-steps-widget/bundle.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'a4df2b5ae69fbc209752'); + array('lodash', 'react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '459df7902e0bc7485727'); diff --git a/build/next-steps-widget/bundle.js b/build/next-steps-widget/bundle.js index 35271b2..b42012c 100644 --- a/build/next-steps-widget/bundle.js +++ b/build/next-steps-widget/bundle.js @@ -1 +1 @@ -(()=>{var e={183:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},530:(e,t)=>{var s;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e="",t=0;t{e.exports=s(856)()},856:(e,t,s)=>{"use strict";var n=s(183);function a(){}function r(){}r.resetWarningCache=a,e.exports=function(){function e(e,t,s,a,r,i){if(i!==n){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}function t(){return e}e.isRequired=e;var s={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:a};return s.PropTypes=s,s}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,s),r.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.domReady;var t=s.n(e);const n=window.wp.element;var a=s(598),r=s.n(a);const i={isRtl:!1},d=(0,n.createContext)(i),o=({children:e,context:t={},...s})=>(0,n.createElement)(d.Provider,{value:{...i,...t}},(0,n.createElement)("div",{className:"nfd-root",...s},e));o.propTypes={children:r().node.isRequired,context:r().shape({isRtl:r().bool})};const l=o;var c=s(530),p=s.n(c);const f=(0,n.forwardRef)((({as:e="div",children:t,className:s="",...a},r)=>(0,n.createElement)(e,{...a,className:p()("nfd-page",s),ref:r},t)));f.propTypes={as:a.PropTypes.element,children:a.PropTypes.node.isRequired,className:a.PropTypes.string};const u=f,m=window.lodash,x={variant:{default:"",primary:"nfd-text-primary-500",white:"nfd-text-white"},size:{3:"nfd-w-3 nfd-h-3",4:"nfd-w-4 nfd-h-4",8:"nfd-w-8 nfd-h-8"}},h=(0,n.forwardRef)((({variant:e,size:t,className:s},a)=>{const r=((e=null)=>(0,n.useMemo)((()=>{const t={role:"img","aria-hidden":"true"};return null!==e&&(t.focusable=e?"true":"false"),t}),[e]))();return(0,n.createElement)("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg/",fill:"none",viewBox:"0 0 24 24",className:p()("nfd-animate-spin",x.variant[e],x.size[t],s),...r},(0,n.createElement)("circle",{className:"nfd-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.createElement)("path",{className:"nfd-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))})),w={variant:r().oneOf((0,m.keys)(x.variant)),size:r().oneOf((0,m.keys)(x.size)),className:r().string};h.propTypes=w,h.defaultProps={variant:"default",size:"4",className:""};const k=e=>(0,n.createElement)(h,{...e});k.propTypes=w,k.defaultProps=h.defaultProps,k.displayName="Spinner";const v=h,b={variant:{primary:"nfd-button--primary",secondary:"nfd-button--secondary",error:"nfd-button--error",upsell:"nfd-button--upsell"},size:{default:"",small:"nfd-button--small",large:"nfd-button--large"}},g=(0,n.forwardRef)((({children:e,as:t,type:s,variant:a,size:r,isLoading:i,disabled:d,className:o,...l},c)=>(0,n.createElement)(t,{type:s||"button"===t&&"button"||void 0,disabled:d,ref:c,className:p()("nfd-button",b.variant[a],b.size[r],i&&"nfd-cursor-wait",d&&"nfd-button--disabled",o),...l},i&&(0,n.createElement)(v,{size:"small"===r?"3":"4",className:"nfd-mr-2"}),e))),j={children:r().node.isRequired,as:r().elementType,type:r().oneOf(["button","submit","reset"]),variant:r().oneOf((0,m.keys)(b.variant)),size:r().oneOf((0,m.keys)(b.size)),isLoading:r().bool,disabled:r().bool,className:r().string};g.propTypes=j,g.defaultProps={as:"button",type:void 0,variant:"primary",size:"default",isLoading:!1,disabled:!1,className:""};const y=g,N=e=>(0,n.createElement)(g,{...e});N.propTypes=j,N.defaultProps=g.defaultProps,N.displayName="Button";const _=window.wp.i18n,E=window.wp.apiFetch;var C=s.n(E);const R=window.React;function O({title:e,titleId:t,...s},n){return R.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?R.createElement("title",{id:t},e):null,R.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const z=R.forwardRef(O);function T({title:e,titleId:t,...s},n){return R.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?R.createElement("title",{id:t},e):null,R.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const L=R.forwardRef(T);function P({title:e,titleId:t,...s},n){return R.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?R.createElement("title",{id:t},e):null,R.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const M=R.forwardRef(P);function U({title:e,titleId:t,...s},n){return R.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?R.createElement("title",{id:t},e):null,R.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const S=R.forwardRef(U);function B({title:e,titleId:t,...s},n){return R.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?R.createElement("title",{id:t},e):null,R.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),R.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const I=R.forwardRef(B);function W({title:e,titleId:t,...s},n){return R.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?R.createElement("title",{id:t},e):null,R.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const A=R.forwardRef(W);function D({title:e,titleId:t,...s},n){return R.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?R.createElement("title",{id:t},e):null,R.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 0 1-.982-3.172M9.497 14.25a7.454 7.454 0 0 0 .981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 0 0 7.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 0 0 2.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 0 1 2.916.52 6.003 6.003 0 0 1-5.395 4.972m0 0a6.726 6.726 0 0 1-2.749 1.35m0 0a6.772 6.772 0 0 1-3.044 0"}))}const H=R.forwardRef(D);function V({title:e,titleId:t,...s},n){return R.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?R.createElement("title",{id:t},e):null,R.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const Z=R.forwardRef(V);function q({title:e,titleId:t,...s},n){return R.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?R.createElement("title",{id:t},e):null,R.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const F=R.forwardRef(q),$=window.ReactJSXRuntime,J=(0,$.jsx)(z,{className:"size-6"}),X=(0,$.jsx)(L,{className:"size-6"}),Y=(0,$.jsx)(M,{className:"size-6"}),G=(0,$.jsx)(S,{className:"size-6"}),K=(0,$.jsx)(I,{className:"size-6"}),Q=(0,$.jsx)(F,{className:"size-6"}),ee=(0,$.jsx)(A,{className:"size-6"}),te=(0,$.jsx)(H,{className:"size-6"}),se=(0,$.jsx)(Z,{className:"size-6"}),ne=(0,$.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",fill:"none",className:"size-6",children:(0,$.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.716 3.165a9 9 0 0 1 3.315 1.373m2.43 2.429a9 9 0 0 1 1.374 3.316m0 3.434a9 9 0 0 1-1.373 3.315m-2.43 2.43a9 9 0 0 1-3.316 1.373m-3.432 0a9 9 0 0 1-3.316-1.373m-2.43-2.43a9 9 0 0 1-1.373-3.315m0-3.434a9 9 0 0 1 1.373-3.315m2.43-2.43a9 9 0 0 1 3.316-1.373"})}),ae=(0,$.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",fill:"none",className:"size-6",children:(0,$.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"})}),re=(0,$.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg/",fill:"none",viewBox:"0 0 24 24",class:"next-steps-spinner nfd-animate-spin nfd-w-8 nfd-h-8",role:"img","aria-hidden":"true",children:[(0,$.jsx)("circle",{class:"nfd-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),(0,$.jsx)("path",{class:"nfd-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),ie={size:{1:"nfd-title--1",2:"nfd-title--2",3:"nfd-title--3",4:"nfd-title--4",5:"nfd-title--5"}},de=(0,n.forwardRef)((({children:e,as:t,size:s,className:a,...r},i)=>(0,n.createElement)(t,{ref:i,className:p()("nfd-title",ie.size[s||t[1]],a),...r},e))),oe={children:r().node.isRequired,as:r().elementType,size:r().oneOf(Object.keys(ie.size)),className:r().string};de.propTypes=oe,de.defaultProps={as:"h1",size:void 0,className:""};const le=e=>(0,n.createElement)(de,{...e});le.propTypes=oe,le.defaultProps=de.defaultProps,le.displayName="Title";const ce=de,pe=({completed:e,total:t})=>{const s=t?Math.round(e/t*100):0;return(0,$.jsxs)("div",{className:`nfd-progress-bar nfd-progress-bar-${s}`,children:[(0,$.jsx)("div",{className:"nfd-progress-bar-inner","data-percent":s,style:{width:`${s}%`}}),(0,$.jsxs)("span",{className:"nfd-progress-bar-label",children:[e,"/",t]})]})},fe=e=>{const{task:t,taskUpdateCallback:s,track:a,section:r,showDismissed:i,...d}=e,{id:o,title:l="",href:c,data_attributes:p={}}=t,[f,u]=(0,n.useState)(t.status),m=e=>{const t=f;u(e),s(a,r,o,e,(e=>{u(t),console.error("Error updating task status. Please, try reloading the page to load the latest data.",e)}),(t=>{u(e)}))},x=()=>{let e=c;return e.includes("{siteUrl}")&&(e=c.replace("{siteUrl}",window.NewfoldRuntime.siteUrl)),window.NewfoldRuntime?.linkTracker?.addUtmParams(e)||e},h=()=>c.includes("{siteUrl}")||c.includes(window.NewfoldRuntime.siteUrl)?"":"_blank",w={...(()=>{const e={};return Object.entries(p).forEach((([t,s])=>{const n=t.startsWith("data-")?t:`data-${t}`;e[n]="boolean"==typeof s?s?"true":"false":s})),e})()},k=(e=!1,t="")=>(0,$.jsxs)("div",{className:"nfd-nextsteps-step-content nfd-flex nfd-flex-col nfd-justify-between",children:[e&&(0,$.jsx)("a",{href:e,target:t,children:(0,$.jsx)(ce,{as:"span",className:"nfd-nextsteps-step-title nfd-font-normal",children:l})}),!e&&(0,$.jsx)(ce,{as:"span",className:"nfd-nextsteps-step-title nfd-font-normal",children:l})]});return(0,$.jsxs)($.Fragment,{children:["new"===f&&(0,$.jsx)("div",{className:"nfd-nextsteps-step-container",id:o,...w,children:(0,$.jsxs)("div",{className:"nfd-nextsteps-step nfd-nextsteps-step-new nfd-flex nfd-flex-row nfd-justify-start nfd-items-center nfd-gap-4",children:[(0,$.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-end",children:(0,$.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-todo","data-nfd-click":"nextsteps_step_check","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":o,onClick:e=>m("done"),title:(0,_.__)("Mark Complete","wp-module-next-steps"),children:ae})}),k(x(),h()),(0,$.jsxs)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-4 nfd-justify-end nfd-ml-auto",children:[(0,$.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-dismiss","data-nfd-click":"nextsteps_step_dismiss","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":o,onClick:e=>m("dismissed"),title:(0,_.__)("Skip","wp-module-next-steps"),children:G}),(0,$.jsx)("a",{className:"nfd-nextsteps-button nfd-nextsteps-button-link","data-nfd-click":"nextsteps_step_link","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":o,href:x(),target:h(),title:l,children:ee})]})]})}),"done"===f&&(0,$.jsx)("div",{className:"nfd-nextsteps-step-container",id:o,...w,children:(0,$.jsxs)("div",{className:"nfd-nextsteps-step nfd-nextsteps-step-done nfd-flex nfd-flex-row nfd-justify-start nfd-items-center nfd-gap-4",children:[(0,$.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-end",children:(0,$.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-redo","data-nfd-click":"nextsteps_step_redo","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":o,onClick:e=>m("new"),title:(0,_.__)("Restart","wp-module-next-steps"),children:Q})}),k(x(),h())]})}),"dismissed"===f&&i&&(0,$.jsx)("div",{className:"nfd-nextsteps-step-container",id:o,...w,children:(0,$.jsxs)("div",{className:"nfd-nextsteps-step nfd-nextsteps-step-dismissed nfd-flex nfd-flex-row nfd-justify-start nfd-items-center nfd-gap-4",children:[(0,$.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-end",children:(0,$.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-redo","data-nfd-click":"nextsteps_step_redo","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":o,onClick:e=>m("new"),title:(0,_.__)("Unskip","wp-module-next-steps"),children:ne})}),k(x(),h()),(0,$.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-4 nfd-justify-end nfd-ml-auto",children:(0,$.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-dismiss","data-nfd-click":"nextsteps_step_dismiss","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":o,onClick:e=>m("new"),title:(0,_.__)("Unskip","wp-module-next-steps"),children:K})})]})})]})},ue=e=>{const{section:t,index:s,taskUpdateCallback:a,sectionOpenCallback:r,track:i,showDismissed:d,...o}=e,[l,c]=(0,n.useState)(!0),[p,f]=(0,n.useState)(!1),[u,m]=(0,n.useState)(void 0!==t.open?t.open:0===s),x=t.tasks.filter((e=>"done"===e.status)).length,h=t.tasks.filter((e=>"dismissed"!==e.status)).length;(0,n.useEffect)((()=>{x===h&&c(!1)}),[]),(0,n.useEffect)((()=>{if(h===x){const e=setTimeout((()=>{f(!p)}),100);return()=>clearTimeout(e)}}),[l,x,h]);const w=(e,s=null)=>{const n=null!==s?s:e.target.open;r(t.id,n),m(n)};return(h>0||!0===d)&&(0,$.jsxs)("details",{className:"nfd-section",open:u,onToggle:w,children:[(0,$.jsxs)("summary",{className:"nfd-section-header",children:[(0,$.jsxs)(ce,{className:"nfd-section-title mb-0",as:"h3",children:[(0,$.jsxs)("span",{className:"nfd-section-header-icon nfd-header-icon",children:[(0,$.jsx)("span",{className:"nfd-section-header-icon-closed",children:X}),(0,$.jsx)("span",{className:"nfd-section-header-icon-opened",children:Y})]}),t.label]}),h>0&&(0,$.jsx)(pe,{completed:x,total:h})]}),(0,$.jsx)("div",{className:"nfd-section-steps",children:t.tasks.map((e=>(0,$.jsx)(fe,{task:e,taskUpdateCallback:a,showDismissed:d,track:i,section:t.id},e.id)))}),l&&(0,$.jsxs)("div",{className:"nfd-section-complete","data-complete":p,onClick:e=>{c(!1),w(e,!1)},children:[(0,$.jsx)("button",{className:"nfd-nextsteps-section-close-button",title:(0,_.__)("Close","wp-module-next-steps"),children:se}),(0,$.jsx)("div",{className:"nfd-section-celebrate",children:te}),(0,$.jsx)("p",{className:"nfd-section-celebrate-text",children:(0,_.__)("All complete!","wp-module-next-steps")})]})]})},me=e=>{const{track:t,index:s,taskUpdateCallback:n,sectionOpenCallback:a,trackOpenCallback:r,showDismissed:i,...d}=e,o=t.hasOwnProperty("open")?t.open:0===s;return(0,$.jsxs)("details",{className:"nfd-track",open:o,onToggle:e=>{const s=e.target.open;r(t.id,s)},children:[(0,$.jsxs)("summary",{className:"nfd-track-header",children:[(0,$.jsx)(ce,{className:"nfd-track-title mb-0",as:"h2",children:t.label}),(0,$.jsx)("span",{className:"nfd-track-header-icon nfd-header-icon",children:J})]}),(0,$.jsx)("div",{className:"nfd-track-sections",children:t.sections.map(((e,s)=>(0,$.jsx)(ue,{section:e,index:s,taskUpdateCallback:n,sectionOpenCallback:a,track:t.id,showDismissed:i},e.id)))})]})},xe=(e,t)=>e.includes("?")?e+encodeURIComponent(t):e+t,he=()=>{const[e,t]=(0,n.useState)(window.NewfoldNextSteps),[s,a]=(0,n.useState)(!0),[r,i]=(0,n.useState)(!1),d=(t,s,n,a,r,i)=>{var d;d={plan:e.id,track:t,section:s,task:n,status:a},C()({url:xe(window.NewfoldRuntime.restUrl,"newfold-next-steps/v1/steps/status"),method:"PUT",data:d}).then((e=>{(e=>{i(e)})(e)})).catch((e=>{(e=>{r(e)})(e)}))},o=(t,s)=>{let n=null;if(e&&e.tracks)for(const s of e.tracks)if(s.sections&&s.sections.some((e=>e.id===t))){n=s.id;break}var a;n&&(a={plan:e.id,track:n,section:t,open:s},C()({url:xe(window.NewfoldRuntime.restUrl,"newfold-next-steps/v1/steps/section/open"),method:"PUT",data:a}).then((e=>{})).catch((e=>{})))},l=(t,s)=>{var n;n={plan:e.id,track:t,open:s},C()({url:xe(window.NewfoldRuntime.restUrl,"newfold-next-steps/v1/steps/track/open"),method:"PUT",data:n}).then((e=>{})).catch((e=>{}))};return e&&e.tracks?(0,$.jsxs)("div",{className:"nfd-nextsteps",id:"nfd-nextsteps",children:[(0,$.jsx)("p",{className:"nfd-pb-4",children:e.description}),e.tracks.map(((e,t)=>(0,$.jsx)(me,{track:e,index:t,trackOpenCallback:l,sectionOpenCallback:o,taskUpdateCallback:d,showDismissed:s},e.id))),r&&(0,$.jsx)("div",{className:"nfd-nextsteps-filters nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-center",children:(0,$.jsxs)(y,{className:"nfd-nextsteps-filter-button","data-nfd-click":"nextsteps_step_toggle","data-nfd-event-category":"nextsteps_toggle","data-nfd-event-key":"toggle",onClick:()=>{a(!s)},variant:"secondary",children:[G,s?(0,_.__)("Hide skipped tasks","wp-module-next-steps"):(0,_.__)("View skipped tasks","wp-module-next-steps")]})})]}):(0,$.jsxs)("div",{className:"nfd-nextsteps",id:"nfd-nextsteps",children:[re,(0,$.jsx)("p",{children:(0,_.__)("Loading next steps...","wp-module-next-steps")})]})},we=()=>{const e=p()("nfd-next-steps-app-container");return(0,$.jsx)(u,{className:e,children:(0,$.jsx)(he,{})})},ke=()=>(0,$.jsx)(l,{children:(0,$.jsx)(we,{})});t()((()=>{const e=document.getElementById("nfd-next-steps-app");null!==e&&void 0!==n.createRoot&&(0,n.createRoot)(e).render((0,$.jsx)(ke,{}))}))})()})(); \ No newline at end of file +(()=>{var e={183:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},530:(e,t)=>{var s;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e="",t=0;t{e.exports=s(856)()},856:(e,t,s)=>{"use strict";var n=s(183);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,s,r,a,o){if(o!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var s={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return s.PropTypes=s,s}}},t={};function s(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,s),a.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.domReady;var t=s.n(e);const n=window.wp.element;var r=s(598),a=s.n(r);const o={isRtl:!1},i=(0,n.createContext)(o),d=({children:e,context:t={},...s})=>(0,n.createElement)(i.Provider,{value:{...o,...t}},(0,n.createElement)("div",{className:"nfd-root",...s},e));d.propTypes={children:a().node.isRequired,context:a().shape({isRtl:a().bool})};const l=d;var c=s(530),p=s.n(c);const f=(0,n.forwardRef)((({as:e="div",children:t,className:s="",...r},a)=>(0,n.createElement)(e,{...r,className:p()("nfd-page",s),ref:a},t)));f.propTypes={as:r.PropTypes.element,children:r.PropTypes.node.isRequired,className:r.PropTypes.string};const u=f,m=window.wp.i18n,x=window.lodash,h={variant:{default:"",primary:"nfd-text-primary-500",white:"nfd-text-white"},size:{3:"nfd-w-3 nfd-h-3",4:"nfd-w-4 nfd-h-4",8:"nfd-w-8 nfd-h-8"}},w=(0,n.forwardRef)((({variant:e,size:t,className:s},r)=>{const a=((e=null)=>(0,n.useMemo)((()=>{const t={role:"img","aria-hidden":"true"};return null!==e&&(t.focusable=e?"true":"false"),t}),[e]))();return(0,n.createElement)("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg/",fill:"none",viewBox:"0 0 24 24",className:p()("nfd-animate-spin",h.variant[e],h.size[t],s),...a},(0,n.createElement)("circle",{className:"nfd-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.createElement)("path",{className:"nfd-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))})),k={variant:a().oneOf((0,x.keys)(h.variant)),size:a().oneOf((0,x.keys)(h.size)),className:a().string};w.propTypes=k,w.defaultProps={variant:"default",size:"4",className:""};const g=e=>(0,n.createElement)(w,{...e});g.propTypes=k,g.defaultProps=w.defaultProps,g.displayName="Spinner";const v=w,b={variant:{primary:"nfd-button--primary",secondary:"nfd-button--secondary",error:"nfd-button--error",upsell:"nfd-button--upsell"},size:{default:"",small:"nfd-button--small",large:"nfd-button--large"}},j=(0,n.forwardRef)((({children:e,as:t,type:s,variant:r,size:a,isLoading:o,disabled:i,className:d,...l},c)=>(0,n.createElement)(t,{type:s||"button"===t&&"button"||void 0,disabled:i,ref:c,className:p()("nfd-button",b.variant[r],b.size[a],o&&"nfd-cursor-wait",i&&"nfd-button--disabled",d),...l},o&&(0,n.createElement)(v,{size:"small"===a?"3":"4",className:"nfd-mr-2"}),e))),y={children:a().node.isRequired,as:a().elementType,type:a().oneOf(["button","submit","reset"]),variant:a().oneOf((0,x.keys)(b.variant)),size:a().oneOf((0,x.keys)(b.size)),isLoading:a().bool,disabled:a().bool,className:a().string};j.propTypes=y,j.defaultProps={as:"button",type:void 0,variant:"primary",size:"default",isLoading:!1,disabled:!1,className:""};const N=j,E=e=>(0,n.createElement)(j,{...e});E.propTypes=y,E.defaultProps=j.defaultProps,E.displayName="Button";const _=window.React;function C({title:e,titleId:t,...s},n){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const S=_.forwardRef(C);function R({title:e,titleId:t,...s},n){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const T=_.forwardRef(R);function P({title:e,titleId:t,...s},n){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const O=_.forwardRef(P);function I({title:e,titleId:t,...s},n){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const z=_.forwardRef(I);function U({title:e,titleId:t,...s},n){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const L=_.forwardRef(U);function M({title:e,titleId:t,...s},n){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const D=_.forwardRef(M);function A({title:e,titleId:t,...s},n){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 0 1-.982-3.172M9.497 14.25a7.454 7.454 0 0 0 .981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 0 0 7.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 0 0 2.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 0 1 2.916.52 6.003 6.003 0 0 1-5.395 4.972m0 0a6.726 6.726 0 0 1-2.749 1.35m0 0a6.772 6.772 0 0 1-3.044 0"}))}const B=_.forwardRef(A);function W({title:e,titleId:t,...s},n){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?_.createElement("title",{id:t},e):null,_.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const q=_.forwardRef(W);function $({title:e,titleId:t,...s},n){return _.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},s),e?_.createElement("title",{id:t},e):null,_.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const H=_.forwardRef($),F=window.ReactJSXRuntime,V=(0,F.jsx)(S,{className:"size-6"}),Z=(0,F.jsx)(T,{className:"size-6"}),J=(0,F.jsx)(O,{className:"size-6"}),X=(0,F.jsx)(z,{className:"size-6"}),Y=(0,F.jsx)(L,{className:"size-6"}),G=(0,F.jsx)(H,{className:"size-6"}),K=(0,F.jsx)(D,{className:"size-6"}),Q=(0,F.jsx)(B,{className:"size-6"}),ee=(0,F.jsx)(q,{className:"size-6"}),te=(0,F.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",fill:"none",className:"size-6",children:(0,F.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.716 3.165a9 9 0 0 1 3.315 1.373m2.43 2.429a9 9 0 0 1 1.374 3.316m0 3.434a9 9 0 0 1-1.373 3.315m-2.43 2.43a9 9 0 0 1-3.316 1.373m-3.432 0a9 9 0 0 1-3.316-1.373m-2.43-2.43a9 9 0 0 1-1.373-3.315m0-3.434a9 9 0 0 1 1.373-3.315m2.43-2.43a9 9 0 0 1 3.316-1.373"})}),se=(0,F.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",fill:"none",className:"size-6",children:(0,F.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"})}),ne=(0,F.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg/",fill:"none",viewBox:"0 0 24 24",class:"next-steps-spinner nfd-animate-spin nfd-w-8 nfd-h-8",role:"img","aria-hidden":"true",children:[(0,F.jsx)("circle",{class:"nfd-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),(0,F.jsx)("path",{class:"nfd-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),re={size:{1:"nfd-title--1",2:"nfd-title--2",3:"nfd-title--3",4:"nfd-title--4",5:"nfd-title--5"}},ae=(0,n.forwardRef)((({children:e,as:t,size:s,className:r,...a},o)=>(0,n.createElement)(t,{ref:o,className:p()("nfd-title",re.size[s||t[1]],r),...a},e))),oe={children:a().node.isRequired,as:a().elementType,size:a().oneOf(Object.keys(re.size)),className:a().string};ae.propTypes=oe,ae.defaultProps={as:"h1",size:void 0,className:""};const ie=e=>(0,n.createElement)(ae,{...e});ie.propTypes=oe,ie.defaultProps=ae.defaultProps,ie.displayName="Title";const de=ae,le=(0,n.memo)((({completed:e,total:t})=>{const s=t?Math.round(e/t*100):0;return(0,F.jsxs)("div",{className:`nfd-progress-bar nfd-progress-bar-${s}`,children:[(0,F.jsx)("div",{className:"nfd-progress-bar-inner","data-percent":s,style:{width:`${s}%`}}),(0,F.jsxs)("span",{className:"nfd-progress-bar-label",children:[e,"/",t]})]})})),ce=(0,n.memo)((e=>{const{index:t,sectionId:s,showDismissed:r,task:a,taskUpdateCallback:o,trackId:i}=e,{id:d,title:l="",href:c,data_attributes:p={}}=a,[f,u]=(0,n.useState)(a.status);(0,n.useEffect)((()=>{u(a.status)}),[a.status]);const x=e=>{const t=f;u(e),o(i,s,d,e,(e=>{u(t)}),(t=>{u(e)}))},h=()=>{let e=c;return e.includes("{siteUrl}")&&(e=c.replace("{siteUrl}",window.NewfoldRuntime.siteUrl)),window.NewfoldRuntime?.linkTracker?.addUtmParams(e)||e},w=()=>c.includes("{siteUrl}")||c.includes(window.NewfoldRuntime.siteUrl)?"":"_blank",k={...(()=>{const e={"data-nfd-task-index":t,"data-nfd-task-id":d,"data-nfd-task-status":f};return Object.entries(p).forEach((([t,s])=>{const n=t.startsWith("data-")?t:`data-${t}`;e[n]="boolean"==typeof s?s?"true":"false":s})),e})()},g=(e=!1,t="")=>(0,F.jsxs)("div",{className:"nfd-nextsteps-step-content nfd-flex nfd-flex-col nfd-justify-between",children:[e&&(0,F.jsx)("a",{href:e,target:t,children:(0,F.jsx)(de,{as:"span",className:"nfd-nextsteps-step-title nfd-font-normal",children:l})}),!e&&(0,F.jsx)(de,{as:"span",className:"nfd-nextsteps-step-title nfd-font-normal",children:l})]});return(0,F.jsxs)(F.Fragment,{children:["new"===f&&(0,F.jsx)("div",{className:"nfd-nextsteps-step-container",id:d,...k,children:(0,F.jsxs)("div",{className:"nfd-nextsteps-step nfd-nextsteps-step-new nfd-flex nfd-flex-row nfd-justify-start nfd-items-center nfd-gap-4",children:[(0,F.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-end",children:(0,F.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-todo","data-nfd-click":"nextsteps_step_check","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":d,onClick:e=>x("done"),title:(0,m.__)("Mark Complete","wp-module-next-steps"),children:se})}),g(h(),w()),(0,F.jsxs)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-4 nfd-justify-end nfd-ml-auto",children:[(0,F.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-dismiss","data-nfd-click":"nextsteps_step_dismiss","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":d,onClick:e=>x("dismissed"),title:(0,m.__)("Skip","wp-module-next-steps"),children:X}),(0,F.jsx)("a",{className:"nfd-nextsteps-button nfd-nextsteps-button-link","data-nfd-click":"nextsteps_step_link","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":d,href:h(),target:w(),title:l,children:K})]})]})}),"done"===f&&(0,F.jsx)("div",{className:"nfd-nextsteps-step-container",id:d,...k,children:(0,F.jsxs)("div",{className:"nfd-nextsteps-step nfd-nextsteps-step-done nfd-flex nfd-flex-row nfd-justify-start nfd-items-center nfd-gap-4",children:[(0,F.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-end",children:(0,F.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-redo","data-nfd-click":"nextsteps_step_redo","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":d,onClick:e=>x("new"),title:(0,m.__)("Restart","wp-module-next-steps"),children:G})}),g(h(),w())]})}),"dismissed"===f&&r&&(0,F.jsx)("div",{className:"nfd-nextsteps-step-container",id:d,...k,children:(0,F.jsxs)("div",{className:"nfd-nextsteps-step nfd-nextsteps-step-dismissed nfd-flex nfd-flex-row nfd-justify-start nfd-items-center nfd-gap-4",children:[(0,F.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-end",children:(0,F.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-redo","data-nfd-click":"nextsteps_step_redo","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":d,onClick:e=>x("new"),title:(0,m.__)("Unskip","wp-module-next-steps"),children:te})}),g(h(),w()),(0,F.jsx)("div",{className:"nfd-nextsteps-buttons nfd-flex nfd-flex-row nfd-gap-4 nfd-justify-end nfd-ml-auto",children:(0,F.jsx)("button",{className:"nfd-nextsteps-button nfd-nextsteps-button-dismiss","data-nfd-click":"nextsteps_step_dismiss","data-nfd-event-category":"nextsteps_step","data-nfd-event-key":d,onClick:e=>x("new"),title:(0,m.__)("Unskip","wp-module-next-steps"),children:Y})})]})})]})}));class pe extends n.Component{constructor(e){super(e),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t),e.name?.includes("APIError")&&console.error("API Error Details:",{endpoint:e.data?.endpoint,requestData:e.data?.requestData,originalError:e.originalError,status:e.originalError?.status}),this.setState({error:e,errorInfo:t}),window.NewfoldRuntime?.capabilities?.canLogErrors&&this.logErrorToService(e,t)}logErrorToService=(e,t)=>{try{console.warn("Error logged:",{error:e.toString(),componentStack:t.componentStack,timestamp:(new Date).toISOString(),userAgent:navigator.userAgent,url:window.location.href})}catch(e){console.error("Failed to log error:",e)}};handleRetry=()=>{this.setState({hasError:!1,error:null,errorInfo:null})};render(){if(this.state.hasError){const{fallback:e,showDetails:t=!1}=this.props;if(e)return e;const s=this.state.error?.name?.includes("APIError"),n=s?(0,m.__)("We encountered a connection error. Please check your internet connection and try again.","wp-module-next-steps"):(0,m.__)("We encountered an unexpected error. Please try refreshing the page or contact support if the problem persists.","wp-module-next-steps");return(0,F.jsx)("div",{className:"nfd-error-boundary",children:(0,F.jsxs)("div",{className:"nfd-error-boundary-content",children:[(0,F.jsx)("h3",{children:s?(0,m.__)("Connection Error","wp-module-next-steps"):(0,m.__)("Something went wrong","wp-module-next-steps")}),(0,F.jsx)("p",{children:n}),(0,F.jsxs)("div",{className:"nfd-error-boundary-actions",children:[(0,F.jsx)(N,{variant:"primary",onClick:this.handleRetry,children:(0,m.__)("Try Again","wp-module-next-steps")}),(0,F.jsx)(N,{variant:"secondary",onClick:()=>window.location.reload(),children:(0,m.__)("Refresh Page","wp-module-next-steps")})]}),t&&this.state.error&&(0,F.jsxs)("details",{className:"nfd-error-boundary-details",children:[(0,F.jsx)("summary",{children:(0,m.__)("Technical Details","wp-module-next-steps")}),(0,F.jsxs)("pre",{className:"nfd-error-boundary-stack",children:[this.state.error.toString(),this.state.errorInfo.componentStack]})]})]})})}return this.props.children}}class fe extends n.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("Next Steps Error:",e,t),window.NewfoldRuntime?.restUrl&&this.reportNextStepsError(e,t)}reportNextStepsError=async(e,t)=>{try{console.warn("Next Steps error reported:",{module:"next-steps",error:e.message,stack:e.stack,componentStack:t.componentStack,timestamp:(new Date).toISOString()})}catch(e){console.error("Failed to report Next Steps error:",e)}};render(){return this.state.hasError?(0,F.jsx)("div",{className:"nfd-nextsteps-error",children:(0,F.jsxs)("div",{className:"nfd-nextsteps-error-content",children:[(0,F.jsx)("h3",{children:(0,m.__)("Next Steps Unavailable","wp-module-next-steps")}),(0,F.jsx)("p",{children:(0,m.__)("The Next Steps module encountered an error and cannot be displayed right now.","wp-module-next-steps")}),(0,F.jsx)(N,{variant:"primary",onClick:()=>window.location.reload(),children:(0,m.__)("Refresh Page","wp-module-next-steps")})]})}):this.props.children}}n.Component;const ue=(0,n.memo)((e=>{const{index:t,section:s,sectionOpenCallback:r,showDismissed:a,taskUpdateCallback:o,trackId:i}=e,{totalCount:d,completedCount:l,isComplete:c}=s.progress||{totalCount:0,completedCount:0,isComplete:!1},[p,f]=(0,n.useState)(!1),u=(0,n.useRef)(c),x=(0,n.useRef)(!0);return(0,n.useEffect)((()=>{c&&d>0&&!u.current&&!x.current&&f(!0),u.current=c,x.current=!1}),[c]),(d>0||!0===a)&&(0,F.jsxs)("details",{className:"nfd-section","data-nfd-section-id":s.id,"data-nfd-section-index":t,onToggle:e=>{e.stopPropagation();const t=e.target.open;r(i,s.id,t)},open:s.open,children:[(0,F.jsxs)("summary",{className:"nfd-section-header",children:[(0,F.jsxs)(de,{className:"nfd-section-title mb-0",as:"h3",children:[(0,F.jsxs)("span",{className:"nfd-section-header-icon nfd-header-icon",children:[(0,F.jsx)("span",{className:"nfd-section-header-icon-closed",children:Z}),(0,F.jsx)("span",{className:"nfd-section-header-icon-opened",children:J})]}),s.label]}),d>0&&(0,F.jsx)(le,{completed:l,total:d})]}),(0,F.jsx)("div",{className:"nfd-section-steps",children:s.tasks.map(((e,t)=>(0,F.jsx)(pe,{fallback:(0,F.jsx)("div",{className:"nfd-task-error",children:(0,F.jsx)("p",{children:(0,m.__)("Task temporarily unavailable","wp-module-next-steps")})}),children:(0,F.jsx)(ce,{index:t,sectionId:s.id,showDismissed:a,task:e,taskUpdateCallback:o,trackId:i},e.id)},`task-boundary-${e.id}`)))}),(0,F.jsxs)("div",{className:"nfd-section-complete","data-complete":c,"data-show-celebration":p,onClick:e=>{f(!1),r(i,s.id,!1)},children:[(0,F.jsx)("button",{className:"nfd-nextsteps-section-close-button",title:(0,m.__)("Close","wp-module-next-steps"),children:ee}),(0,F.jsx)("div",{className:"nfd-section-celebrate",children:Q}),(0,F.jsx)("p",{className:"nfd-section-celebrate-text",children:(0,m.__)("All complete!","wp-module-next-steps")})]})]})})),me=(0,n.memo)((e=>{const{index:t,track:s,sectionOpenCallback:n,showDismissed:r,taskUpdateCallback:a,trackOpenCallback:o}=e;return(0,F.jsxs)("details",{className:"nfd-track",onToggle:e=>{const t=e.target.open;o(s.id,t)},"data-nfd-track-id":s.id,"data-nfd-track-index":t,open:s.open,children:[(0,F.jsxs)("summary",{className:"nfd-track-header",children:[(0,F.jsx)(de,{className:"nfd-track-title mb-0",as:"h2",children:s.label}),(0,F.jsx)("span",{className:"nfd-track-header-icon nfd-header-icon",children:V})]}),(0,F.jsx)("div",{className:"nfd-track-sections",children:s.sections.map(((e,t)=>(0,F.jsx)(pe,{fallback:(0,F.jsx)("div",{className:"nfd-section-error",children:(0,F.jsx)("p",{children:"Section temporarily unavailable"})}),children:(0,F.jsx)(ue,{index:t,section:e,sectionOpenCallback:n,showDismissed:r,taskUpdateCallback:a,trackId:s.id},e.id)},`section-boundary-${e.id}`)))})]})})),xe=window.wp.apiFetch;var he=s.n(xe);const we=e=>e.status>=500||!e.status||!!e.name?.includes("Critical")||401===e.status||403===e.status,ke=e=>{if(!e.tasks?.length)return{totalCount:0,completedCount:0,isComplete:!1,percentage:0};const t=e.tasks.filter((e=>"dismissed"!==e.status)).length,s=e.tasks.filter((e=>"done"===e.status)).length;return{totalCount:t,completedCount:s,isComplete:t>0&&s===t,percentage:t>0?Math.round(s/t*100):0}},ge=(e,t)=>e.includes("?")?e+encodeURIComponent(t):e+t,ve=()=>{const[e,t]=(0,n.useState)(window.NewfoldNextSteps),[s,r]=(0,n.useState)(!0),[a,o]=(0,n.useState)(!1),i=(0,n.useMemo)((()=>e?(e=>e?.tracks?{...e,tracks:e.tracks.map((e=>({...e,sections:e.sections.map((e=>({...e,progress:ke(e)})))})))}:e)(e):null),[e]),d=(s,n,r,a,o,i)=>{var d;d={plan_id:e.id,track_id:s,section_id:n,task_id:r,status:a},he()({url:ge(window.NewfoldRuntime.restUrl,"newfold-next-steps/v1/steps/status"),method:"PUT",data:d}).then((e=>{if(e&&e.error){const t=new Error(`Task update failed: ${e.error}`);throw t.name="TaskUpdateError",t.data={response:e,requestData:d},t}(e=>{t((e=>((e,t,s,n,r)=>({...e,tracks:e.tracks.map((e=>e.id===t?{...e,sections:e.sections.map((e=>{if(e.id===s){const t={...e,tasks:e.tasks.map((e=>e.id===n?{...e,status:r}:e))};return{...t,progress:ke(t)}}return e}))}:e))}))(e,s,n,r,a))),i(e)})(e)})).catch((e=>{const t=new Error(`Task update API error: ${e.message||"Unknown error"}`);if(t.name="TaskUpdateAPIError",t.originalError=e,t.data={requestData:d,endpoint:"steps/status"},(e=>{o(e)})(t),we(e))throw t}))},l=(s,n,r)=>{var a;s&&n&&(a={plan_id:e.id,track_id:s,section_id:n,open:r},he()({url:ge(window.NewfoldRuntime.restUrl,"newfold-next-steps/v1/steps/section/open"),method:"PUT",data:a}).then((e=>{if(e&&e.error){const t=new Error(`Section update failed: ${e.error}`);throw t.name="SectionUpdateError",t.data={response:e,requestData:a},t}t((e=>((e,t,s,n)=>({...e,tracks:e.tracks.map((e=>e.id===t?{...e,sections:e.sections.map((e=>e.id===s?{...e,open:n}:e))}:e))}))(e,s,n,r)))})).catch((e=>{const t=new Error(`Section update API error: ${e.message||"Unknown error"}`);if(t.name="SectionUpdateAPIError",t.originalError=e,t.data={requestData:a,endpoint:"steps/section/open"},we(e))throw t})))},c=(s,n)=>{var r;r={plan_id:e.id,track_id:s,open:n},he()({url:ge(window.NewfoldRuntime.restUrl,"newfold-next-steps/v1/steps/track/open"),method:"PUT",data:r}).then((e=>{if(e&&e.error){const t=new Error(`Track update failed: ${e.error}`);throw t.name="TrackUpdateError",t.data={response:e,requestData:r},t}t((e=>((e,t,s)=>({...e,tracks:e.tracks.map((e=>e.id===t?{...e,open:s}:e))}))(e,s,n)))})).catch((e=>{const t=new Error(`Track update API error: ${e.message||"Unknown error"}`);if(t.name="TrackUpdateAPIError",t.originalError=e,t.data={requestData:r,endpoint:"steps/track/open"},we(e))throw t}))};return i&&i.tracks?(0,F.jsx)(fe,{children:(0,F.jsxs)("div",{className:"nfd-nextsteps","data-nfd-plan-id":i.id,id:"nfd-nextsteps",children:[(0,F.jsx)("p",{className:"nfd-pb-4",children:i.description}),i.tracks.map(((e,t)=>(0,F.jsx)(me,{index:t,sectionOpenCallback:l,showDismissed:s,taskUpdateCallback:d,track:e,trackOpenCallback:c},e.id))),a&&(0,F.jsx)("div",{className:"nfd-nextsteps-filters nfd-flex nfd-flex-row nfd-gap-2 nfd-justify-center",children:(0,F.jsxs)(N,{className:"nfd-nextsteps-filter-button","data-nfd-click":"nextsteps_step_toggle","data-nfd-event-category":"nextsteps_toggle","data-nfd-event-key":"toggle",onClick:()=>{r(!s)},variant:"secondary",children:[X,s?(0,m.__)("Hide skipped tasks","wp-module-next-steps"):(0,m.__)("View skipped tasks","wp-module-next-steps")]})})]})}):(0,F.jsxs)("div",{className:"nfd-nextsteps",id:"nfd-nextsteps",children:[ne,(0,F.jsx)("p",{children:(0,m.__)("Loading next steps...","wp-module-next-steps")})]})},be=()=>{const e=p()("nfd-next-steps-app-container");return(0,F.jsx)(u,{className:e,children:(0,F.jsx)(ve,{})})},je=()=>(0,F.jsx)(l,{children:(0,F.jsx)(be,{})});t()((()=>{const e=document.getElementById("nfd-next-steps-app");null!==e&&void 0!==n.createRoot&&(0,n.createRoot)(e).render((0,F.jsx)(je,{}))}))})()})(); \ No newline at end of file diff --git a/build/next-steps-widget/next-steps-widget-rtl.css b/build/next-steps-widget/next-steps-widget-rtl.css index 6b816ba..1f448eb 100644 --- a/build/next-steps-widget/next-steps-widget-rtl.css +++ b/build/next-steps-widget/next-steps-widget-rtl.css @@ -1 +1 @@ -#nfd-nextsteps.nfd-nextsteps .nfd-track{border:1px solid #336ad7;border-radius:4px;margin-bottom:1.5rem;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-track:hover{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-header,#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-sections{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-title{font-size:1rem;font-weight:600;padding:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-track-header{align-items:center;color:#121212;cursor:pointer;display:flex;justify-content:space-between;transition:background-color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header .nfd-header-icon{transition:color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-track-title,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track-header-icon{transform:rotate(-180deg);width:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-track[open]{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-header-icon{transform:rotate(0deg)}#nfd-nextsteps.nfd-nextsteps .nfd-section{background-color:#fff;border:1px solid #d1e1ff;border-radius:1rem;margin-bottom:1rem;overflow:hidden;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-steps{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header{gap:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header h3{align-items:center;display:flex;gap:1rem;margin:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-opened{height:1.75rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-opened{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-opened{display:inline-block}#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-closed{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar{background-color:rgba(224,232,238,.82);border:1px solid #d7d7d7;border-radius:1rem;height:1rem;max-width:50%;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-inner{background-color:rgba(51,106,215,.659);border-radius:1rem;height:calc(1rem - 2px);transition:all .2s ease;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-label{color:#234aa7;font-size:11px;position:absolute;left:.75rem;top:-1px;z-index:2}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-0 .nfd-progress-bar-label{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-inner{background-color:#a0c00f}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-label{color:#fff}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete{align-items:center;background-color:hsla(0,0%,100%,.85);border-radius:1rem;display:flex;flex-direction:column;height:calc(100% - 4.25rem);justify-content:center;right:0;max-height:100%;opacity:0;padding:0 1rem 1rem;position:absolute;top:100%;transition:all .15s ease;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete[data-complete=true]{opacity:.95;top:4.25rem;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-nextsteps-section-close-button{height:1.75rem;position:absolute;left:1rem;top:.25rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate{color:#a0c00f;display:flex;height:6rem;margin:0 auto;max-height:100%;min-height:2rem;width:auto}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate svg path{stroke-width:1px}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate-text{color:#121212;font-size:1rem;font-weight:600;margin:0 auto;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step{border:1px solid #d7d7d7;border-radius:1rem;margin-bottom:10px;padding:10px;transition:all .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover{background-color:#eaf4fb;border-color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover .nfd-nextsteps-button-dismiss{opacity:1}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done{background-color:#f6fde8!important;border-color:rgba(120,174,20,.29)}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done .nfd-nextsteps-step-title{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-dismissed{text-decoration:line-through}#nfd-nextsteps.nfd-nextsteps .nfd-ml-auto{margin-right:auto}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button{align-items:center;color:#7e7e7e;display:inline-flex;text-decoration:none;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button:hover{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button svg{height:auto;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo{width:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo:hover{color:#abae14}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-dismiss{opacity:0;width:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-link{width:1.25rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-redo{color:#abae14;width:1.5rem} +#nfd-nextsteps.nfd-nextsteps .nfd-track{border:1px solid #336ad7;border-radius:4px;margin-bottom:1.5rem;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-track:hover{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-header,#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-sections{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-title{font-size:1rem;font-weight:600;padding:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-track-header{align-items:center;color:#121212;cursor:pointer;display:flex;justify-content:space-between;transition:background-color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header .nfd-header-icon{transition:color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-track-title,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track-header-icon{transform:rotate(-180deg);width:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-track[open]{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-header-icon{transform:rotate(0deg)}#nfd-nextsteps.nfd-nextsteps .nfd-section{background-color:#fff;border:1px solid #d1e1ff;border-radius:1rem;margin-bottom:1rem;overflow:hidden;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-steps{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header{gap:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header h3{align-items:center;display:flex;gap:1rem;margin:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-opened{height:1.75rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-opened{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-opened{display:inline-block}#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-closed{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar{background-color:rgba(224,232,238,.82);border:1px solid #d7d7d7;border-radius:1rem;height:1rem;max-width:50%;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-inner{background-color:rgba(51,106,215,.659);border-radius:1rem;height:calc(1rem - 2px);transition:all .2s ease;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-label{color:#234aa7;font-size:12px;position:absolute;left:.75rem;top:-2px;z-index:2}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-0 .nfd-progress-bar-label{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-inner{background-color:#8daa0e}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-label{color:#fff;text-shadow:0 0 2px rgba(0,0,0,.75)}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete{align-items:center;background-color:hsla(0,0%,100%,.85);border-radius:1rem;display:flex;flex-direction:column;height:calc(100% - 4.25rem);justify-content:center;right:0;max-height:100%;opacity:0;padding:0 1rem 1rem;position:absolute;top:100%;transition:all .15s ease .15s;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete[data-complete=true][data-show-celebration=true]{opacity:.95;top:4.25rem;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-nextsteps-section-close-button{height:1.75rem;position:absolute;left:1rem;top:.25rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate{color:#a0c00f;display:flex;height:6rem;margin:0 auto;max-height:100%;min-height:2rem;width:auto}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate svg path{stroke-width:1px}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate-text{color:#121212;font-size:1rem;font-weight:600;margin:0 auto;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step{border:1px solid #d7d7d7;border-radius:1rem;margin-bottom:10px;padding:10px;transition:all .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover{background-color:#eaf4fb;border-color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover .nfd-nextsteps-button-dismiss{opacity:1}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done{background-color:#f6fde8!important;border-color:rgba(120,174,20,.29)}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done .nfd-nextsteps-step-title{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-dismissed{text-decoration:line-through}#nfd-nextsteps.nfd-nextsteps .nfd-ml-auto{margin-right:auto}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button{align-items:center;color:#7e7e7e;display:inline-flex;text-decoration:none;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button:hover{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button svg{height:auto;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo{width:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo:hover{color:#abae14}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-dismiss{opacity:0;width:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-link{width:1.25rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-redo{color:#abae14;width:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error{background:#fff;border:1px solid #ddd;border-radius:4px;margin:1rem 0;padding:2rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-content,#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-nextsteps-error-content,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-content,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-nextsteps-error-content{margin:0 auto;max-width:500px}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-content h3,#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-nextsteps-error-content h3,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-content h3,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-nextsteps-error-content h3{color:#d63638;font-size:1.2rem;margin-bottom:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-content p,#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-nextsteps-error-content p,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-content p,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-nextsteps-error-content p{color:#666;line-height:1.5;margin-bottom:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-actions,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-actions{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center;margin-bottom:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details{background:#f8f9fa;border:1px solid #e9ecef;border-radius:4px;margin-top:1.5rem;padding:1rem;text-align:right}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details summary,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details summary{color:#495057;cursor:pointer;font-weight:600;margin-bottom:.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details summary:hover,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details summary:hover{color:#007cba}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details .nfd-error-boundary-stack,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details .nfd-error-boundary-stack{background:#f1f1f1;border:1px solid #ccc;border-radius:3px;color:#d63638;font-family:Courier New,monospace;font-size:.8rem;margin:0;max-height:200px;overflow-y:auto;padding:.75rem;white-space:pre-wrap;word-break:break-word}#nfd-nextsteps.nfd-nextsteps .nfd-section-error{background:#fff3cd;border:1px solid #ffeaa7;border-radius:4px;color:#856404;font-size:.9rem;margin:.5rem 0;padding:1rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-section-error p{margin:0}#nfd-nextsteps.nfd-nextsteps .nfd-task-error{background:#f8d7da;border:1px solid #f5c6cb;border-radius:4px;color:#721c24;font-size:.85rem;margin:.25rem 0;padding:.75rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-task-error p{margin:0}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary{background:#e7f3ff;border:1px solid #b3d9ff;border-radius:4px;margin:1rem 0;padding:1.5rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary .nfd-api-error-content{margin:0 auto;max-width:400px}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary .nfd-api-error-content h4{color:#0073aa;font-size:1.1rem;margin-bottom:.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary .nfd-api-error-content p{color:#555;line-height:1.4;margin-bottom:1rem} diff --git a/build/next-steps-widget/next-steps-widget.css b/build/next-steps-widget/next-steps-widget.css index 5fd7d24..7126d18 100644 --- a/build/next-steps-widget/next-steps-widget.css +++ b/build/next-steps-widget/next-steps-widget.css @@ -1 +1 @@ -#nfd-nextsteps.nfd-nextsteps .nfd-track{border:1px solid #336ad7;border-radius:4px;margin-bottom:1.5rem;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-track:hover{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-header,#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-sections{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-title{font-size:1rem;font-weight:600;padding:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-track-header{align-items:center;color:#121212;cursor:pointer;display:flex;justify-content:space-between;transition:background-color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header .nfd-header-icon{transition:color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-track-title,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track-header-icon{transform:rotate(180deg);width:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-track[open]{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-header-icon{transform:rotate(0deg)}#nfd-nextsteps.nfd-nextsteps .nfd-section{background-color:#fff;border:1px solid #d1e1ff;border-radius:1rem;margin-bottom:1rem;overflow:hidden;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-steps{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header{gap:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header h3{align-items:center;display:flex;gap:1rem;margin:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-opened{height:1.75rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-opened{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-opened{display:inline-block}#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-closed{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar{background-color:rgba(224,232,238,.82);border:1px solid #d7d7d7;border-radius:1rem;height:1rem;max-width:50%;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-inner{background-color:rgba(51,106,215,.659);border-radius:1rem;height:calc(1rem - 2px);transition:all .2s ease;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-label{color:#234aa7;font-size:11px;position:absolute;right:.75rem;top:-1px;z-index:2}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-0 .nfd-progress-bar-label{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-inner{background-color:#a0c00f}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-label{color:#fff}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete{align-items:center;background-color:hsla(0,0%,100%,.85);border-radius:1rem;display:flex;flex-direction:column;height:calc(100% - 4.25rem);justify-content:center;left:0;max-height:100%;opacity:0;padding:0 1rem 1rem;position:absolute;top:100%;transition:all .15s ease;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete[data-complete=true]{opacity:.95;top:4.25rem;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-nextsteps-section-close-button{height:1.75rem;position:absolute;right:1rem;top:.25rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate{color:#a0c00f;display:flex;height:6rem;margin:0 auto;max-height:100%;min-height:2rem;width:auto}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate svg path{stroke-width:1px}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate-text{color:#121212;font-size:1rem;font-weight:600;margin:0 auto;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step{border:1px solid #d7d7d7;border-radius:1rem;margin-bottom:10px;padding:10px;transition:all .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover{background-color:#eaf4fb;border-color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover .nfd-nextsteps-button-dismiss{opacity:1}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done{background-color:#f6fde8!important;border-color:rgba(120,174,20,.29)}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done .nfd-nextsteps-step-title{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-dismissed{text-decoration:line-through}#nfd-nextsteps.nfd-nextsteps .nfd-ml-auto{margin-left:auto}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button{align-items:center;color:#7e7e7e;display:inline-flex;text-decoration:none;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button:hover{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button svg{height:auto;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo{width:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo:hover{color:#abae14}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-dismiss{opacity:0;width:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-link{width:1.25rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-redo{color:#abae14;width:1.5rem} +#nfd-nextsteps.nfd-nextsteps .nfd-track{border:1px solid #336ad7;border-radius:4px;margin-bottom:1.5rem;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-track:hover{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-header,#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-sections{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-track .nfd-track-title{font-size:1rem;font-weight:600;padding:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-track-header{align-items:center;color:#121212;cursor:pointer;display:flex;justify-content:space-between;transition:background-color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header .nfd-header-icon{transition:color .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header:hover .nfd-track-title,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-track-header:hover .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track-header-icon{transform:rotate(180deg);width:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-track[open]{background-color:#eaf4fb}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-title{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-track[open] .nfd-track-header-icon{transform:rotate(0deg)}#nfd-nextsteps.nfd-nextsteps .nfd-section{background-color:#fff;border:1px solid #d1e1ff;border-radius:1rem;margin-bottom:1rem;overflow:hidden;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header,#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-steps{padding:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-section .nfd-section-header{gap:2rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header h3{align-items:center;display:flex;gap:1rem;margin:0!important}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon-opened{height:1.75rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-opened{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-section-header-icon .nfd-section-header-icon-closed,#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-opened{display:inline-block}#nfd-nextsteps.nfd-nextsteps .nfd-section[open] .nfd-section-header-icon .nfd-section-header-icon-closed{display:none}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar{background-color:rgba(224,232,238,.82);border:1px solid #d7d7d7;border-radius:1rem;height:1rem;max-width:50%;position:relative}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-inner{background-color:rgba(51,106,215,.659);border-radius:1rem;height:calc(1rem - 2px);transition:all .2s ease;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar .nfd-progress-bar-label{color:#234aa7;font-size:12px;position:absolute;right:.75rem;top:-2px;z-index:2}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-0 .nfd-progress-bar-label{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-inner{background-color:#8daa0e}#nfd-nextsteps.nfd-nextsteps .nfd-progress-bar.nfd-progress-bar-100 .nfd-progress-bar-label{color:#fff;text-shadow:0 0 2px rgba(0,0,0,.75)}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete{align-items:center;background-color:hsla(0,0%,100%,.85);border-radius:1rem;display:flex;flex-direction:column;height:calc(100% - 4.25rem);justify-content:center;left:0;max-height:100%;opacity:0;padding:0 1rem 1rem;position:absolute;top:100%;transition:all .15s ease .15s;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete[data-complete=true][data-show-celebration=true]{opacity:.95;top:4.25rem;z-index:1}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-nextsteps-section-close-button{height:1.75rem;position:absolute;right:1rem;top:.25rem;width:1.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate{color:#a0c00f;display:flex;height:6rem;margin:0 auto;max-height:100%;min-height:2rem;width:auto}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate svg path{stroke-width:1px}#nfd-nextsteps.nfd-nextsteps .nfd-section-complete .nfd-section-celebrate-text{color:#121212;font-size:1rem;font-weight:600;margin:0 auto;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step{border:1px solid #d7d7d7;border-radius:1rem;margin-bottom:10px;padding:10px;transition:all .2s ease-in-out}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover{background-color:#eaf4fb;border-color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step:hover .nfd-nextsteps-button-dismiss{opacity:1}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done{background-color:#f6fde8!important;border-color:rgba(120,174,20,.29)}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-done .nfd-nextsteps-step-title{color:dimgray}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-step-dismissed{text-decoration:line-through}#nfd-nextsteps.nfd-nextsteps .nfd-ml-auto{margin-left:auto}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button{align-items:center;color:#7e7e7e;display:inline-flex;text-decoration:none;transition:all .2s ease}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button:hover{color:#336ad7}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button svg{height:auto;width:100%}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo{width:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-todo:hover{color:#abae14}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-dismiss{opacity:0;width:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-link{width:1.25rem}#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-button-redo{color:#abae14;width:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error{background:#fff;border:1px solid #ddd;border-radius:4px;margin:1rem 0;padding:2rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-content,#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-nextsteps-error-content,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-content,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-nextsteps-error-content{margin:0 auto;max-width:500px}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-content h3,#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-nextsteps-error-content h3,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-content h3,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-nextsteps-error-content h3{color:#d63638;font-size:1.2rem;margin-bottom:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-content p,#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-nextsteps-error-content p,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-content p,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-nextsteps-error-content p{color:#666;line-height:1.5;margin-bottom:1.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-actions,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-actions{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center;margin-bottom:1rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details{background:#f8f9fa;border:1px solid #e9ecef;border-radius:4px;margin-top:1.5rem;padding:1rem;text-align:left}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details summary,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details summary{color:#495057;cursor:pointer;font-weight:600;margin-bottom:.5rem}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details summary:hover,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details summary:hover{color:#007cba}#nfd-nextsteps.nfd-nextsteps .nfd-error-boundary .nfd-error-boundary-details .nfd-error-boundary-stack,#nfd-nextsteps.nfd-nextsteps .nfd-nextsteps-error .nfd-error-boundary-details .nfd-error-boundary-stack{background:#f1f1f1;border:1px solid #ccc;border-radius:3px;color:#d63638;font-family:Courier New,monospace;font-size:.8rem;margin:0;max-height:200px;overflow-y:auto;padding:.75rem;white-space:pre-wrap;word-break:break-word}#nfd-nextsteps.nfd-nextsteps .nfd-section-error{background:#fff3cd;border:1px solid #ffeaa7;border-radius:4px;color:#856404;font-size:.9rem;margin:.5rem 0;padding:1rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-section-error p{margin:0}#nfd-nextsteps.nfd-nextsteps .nfd-task-error{background:#f8d7da;border:1px solid #f5c6cb;border-radius:4px;color:#721c24;font-size:.85rem;margin:.25rem 0;padding:.75rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-task-error p{margin:0}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary{background:#e7f3ff;border:1px solid #b3d9ff;border-radius:4px;margin:1rem 0;padding:1.5rem;text-align:center}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary .nfd-api-error-content{margin:0 auto;max-width:400px}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary .nfd-api-error-content h4{color:#0073aa;font-size:1.1rem;margin-bottom:.75rem}#nfd-nextsteps.nfd-nextsteps .nfd-api-error-boundary .nfd-api-error-content p{color:#555;line-height:1.4;margin-bottom:1rem} diff --git a/includes/PlanManager.php b/includes/PlanManager.php index ee581de..1ceaec5 100644 --- a/includes/PlanManager.php +++ b/includes/PlanManager.php @@ -761,7 +761,7 @@ public static function get_blog_plan(): Plan { array( 'id' => 'blog_build_track', 'label' => __( 'Build', 'wp-module-next-steps' ), - 'open' => true, + 'open' => false, 'sections' => array( array( 'id' => 'basic_blog_setup', @@ -1206,7 +1206,7 @@ public static function get_corporate_plan(): Plan { array( 'id' => 'corporate_build_track', 'label' => __( 'Build', 'wp-module-next-steps' ), - 'open' => true, + 'open' => false, 'sections' => array( array( 'id' => 'basic_site_setup', diff --git a/includes/StepsApi.php b/includes/StepsApi.php index a74a290..8e3f299 100644 --- a/includes/StepsApi.php +++ b/includes/StepsApi.php @@ -74,7 +74,7 @@ public function register_routes() { ); // Add route for updating a step status - // newfold-next-steps/step/update + // newfold-next-steps/v1/steps/status register_rest_route( $this->namespace, $this->rest_base . '/status', @@ -85,31 +85,31 @@ public function register_routes() { return current_user_can( 'manage_options' ); }, 'args' => array( - 'plan' => array( + 'plan_id' => array( 'required' => true, 'validate_callback' => function ( $value ) { return is_string( $value ); }, ), - 'track' => array( + 'track_id' => array( 'required' => true, 'validate_callback' => function ( $value ) { return is_string( $value ); }, ), - 'section' => array( + 'section_id' => array( 'required' => true, 'validate_callback' => function ( $value ) { return is_string( $value ); }, ), - 'task' => array( + 'task_id' => array( 'required' => true, 'validate_callback' => function ( $value ) { return is_string( $value ); }, ), - 'status' => array( + 'status' => array( 'required' => true, 'validate_callback' => function ( $value ) { return is_string( $value ); @@ -210,19 +210,19 @@ public function register_routes() { return current_user_can( 'manage_options' ); }, 'args' => array( - 'plan' => array( + 'plan_id' => array( 'required' => true, 'validate_callback' => function ( $value ) { return is_string( $value ); }, ), - 'track' => array( + 'track_id' => array( 'required' => true, 'validate_callback' => function ( $value ) { return is_string( $value ); }, ), - 'section' => array( + 'section_id' => array( 'required' => true, 'validate_callback' => function ( $value ) { return is_string( $value ); @@ -249,13 +249,13 @@ public function register_routes() { return current_user_can( 'manage_options' ); }, 'args' => array( - 'plan' => array( + 'plan_id' => array( 'required' => true, 'validate_callback' => function ( $value ) { return is_string( $value ); }, ), - 'track' => array( + 'track_id' => array( 'required' => true, 'validate_callback' => function ( $value ) { return is_string( $value ); @@ -366,14 +366,14 @@ public static function add_steps( $new_tasks ) { * @return WP_REST_Response|WP_Error The response object on success, or WP_Error on failure. */ public static function update_task_status( \WP_REST_Request $request ) { - $plan = $request->get_param( 'plan' ); - $track = $request->get_param( 'track' ); - $section = $request->get_param( 'section' ); - $task = $request->get_param( 'task' ); - $status = $request->get_param( 'status' ); + $plan_id = $request->get_param( 'plan_id' ); + $track_id = $request->get_param( 'track_id' ); + $section_id = $request->get_param( 'section_id' ); + $task_id = $request->get_param( 'task_id' ); + $status = $request->get_param( 'status' ); // validate parameters - if ( empty( $track ) || empty( $section ) || empty( $task ) || empty( $status ) ) { + if ( empty( $track_id ) || empty( $section_id ) || empty( $task_id ) || empty( $status ) ) { return new WP_Error( 'invalid_params', __( 'Invalid parameters provided.', 'wp-module-next-steps' ), array( 'status' => 400 ) ); } if ( ! in_array( $status, array( 'new', 'done', 'dismissed' ), true ) ) { @@ -381,7 +381,7 @@ public static function update_task_status( \WP_REST_Request $request ) { } // Use PlanManager to update the task status - $success = PlanManager::update_task_status( $track, $section, $task, $status ); + $success = PlanManager::update_task_status( $track_id, $section_id, $task_id, $status ); if ( ! $success ) { return new WP_Error( 'step_not_found', __( 'Step not found.', 'wp-module-next-steps' ), array( 'status' => 404 ) ); @@ -400,18 +400,18 @@ public static function update_task_status( \WP_REST_Request $request ) { * @return WP_REST_Response|WP_Error The response object on success, or WP_Error on failure. */ public static function update_section_status( \WP_REST_Request $request ) { - $plan = $request->get_param( 'plan' ); - $track = $request->get_param( 'track' ); - $section = $request->get_param( 'section' ); - $open = $request->get_param( 'open' ) ?? false; + $plan_id = $request->get_param( 'plan_id' ); + $track_id = $request->get_param( 'track_id' ); + $section_id = $request->get_param( 'section_id' ); + $open = $request->get_param( 'open' ) ?? false; // validate parameters - if ( empty( $track ) || empty( $section ) ) { + if ( empty( $track_id ) || empty( $section_id ) ) { return new WP_Error( 'invalid_params', __( 'Invalid parameters provided.', 'wp-module-next-steps' ), array( 'status' => 400 ) ); } // Use PlanManager to update the section status - $success = PlanManager::update_section_status( $track, $section, $open ); + $success = PlanManager::update_section_status( $track_id, $section_id, $open ); if ( ! $success ) { return new WP_Error( 'section_not_found', __( 'Section not found.', 'wp-module-next-steps' ), array( 'status' => 404 ) ); @@ -427,17 +427,17 @@ public static function update_section_status( \WP_REST_Request $request ) { * @return WP_REST_Response|WP_Error The response object on success, or WP_Error on failure. */ public static function update_track_status( \WP_REST_Request $request ) { - $plan = $request->get_param( 'plan' ); - $track = $request->get_param( 'track' ); - $open = $request->get_param( 'open' ) ?? false; + $plan_id = $request->get_param( 'plan_id' ); + $track_id = $request->get_param( 'track_id' ); + $open = $request->get_param( 'open' ) ?? false; // validate parameters - if ( empty( $track ) ) { + if ( empty( $track_id ) ) { return new WP_Error( 'invalid_params', __( 'Invalid parameters provided.', 'wp-module-next-steps' ), array( 'status' => 400 ) ); } // Use PlanManager to update the track status - $success = PlanManager::update_track_status( $track, $open ); + $success = PlanManager::update_track_status( $track_id, $open ); if ( ! $success ) { return new WP_Error( 'track_not_found', __( 'Track not found.', 'wp-module-next-steps' ), array( 'status' => 404 ) ); diff --git a/src/components/ErrorBoundary/index.js b/src/components/ErrorBoundary/index.js new file mode 100644 index 0000000..6cbe4db --- /dev/null +++ b/src/components/ErrorBoundary/index.js @@ -0,0 +1,280 @@ +import { Component } from '@wordpress/element'; +import { __ } from '@wordpress/i18n'; +import { Button } from '@newfold/ui-component-library'; + +/** + * Generic Error Boundary Component + * Catches JavaScript errors anywhere in the child component tree + */ +export class ErrorBoundary extends Component { + constructor(props) { + super(props); + this.state = { + hasError: false, + error: null, + errorInfo: null + }; + } + + static getDerivedStateFromError(error) { + // Update state so the next render will show the fallback UI + return { hasError: true }; + } + + componentDidCatch(error, errorInfo) { + // Log error details for debugging + console.error('ErrorBoundary caught an error:', error, errorInfo); + + // Enhanced logging for API errors + if (error.name?.includes('APIError')) { + console.error('API Error Details:', { + endpoint: error.data?.endpoint, + requestData: error.data?.requestData, + originalError: error.originalError, + status: error.originalError?.status + }); + } + + this.setState({ + error: error, + errorInfo: errorInfo + }); + + // Optional: Send error to logging service + if (window.NewfoldRuntime?.capabilities?.canLogErrors) { + this.logErrorToService(error, errorInfo); + } + } + + logErrorToService = (error, errorInfo) => { + // Optional: Send to error tracking service + try { + // Example: Send to your error tracking service + console.warn('Error logged:', { + error: error.toString(), + componentStack: errorInfo.componentStack, + timestamp: new Date().toISOString(), + userAgent: navigator.userAgent, + url: window.location.href + }); + } catch (loggingError) { + console.error('Failed to log error:', loggingError); + } + }; + + handleRetry = () => { + this.setState({ + hasError: false, + error: null, + errorInfo: null + }); + }; + + render() { + if (this.state.hasError) { + // Fallback UI + const { fallback, showDetails = false } = this.props; + + if (fallback) { + return fallback; + } + + // Check if this is an API error + const isApiError = this.state.error?.name?.includes('APIError'); + const errorMessage = isApiError + ? __('We encountered a connection error. Please check your internet connection and try again.', 'wp-module-next-steps') + : __('We encountered an unexpected error. Please try refreshing the page or contact support if the problem persists.', 'wp-module-next-steps'); + + return ( +
+
+

{ isApiError ? __('Connection Error', 'wp-module-next-steps') : __('Something went wrong', 'wp-module-next-steps') }

+

{ errorMessage }

+ +
+ + + +
+ + {showDetails && this.state.error && ( +
+ { __('Technical Details', 'wp-module-next-steps') } +
+									{this.state.error.toString()}
+									{this.state.errorInfo.componentStack}
+								
+
+ )} +
+
+ ); + } + + return this.props.children; + } +} + +/** + * Specialized Error Boundary for Next Steps components + * Provides context-specific error handling + */ +export class NextStepsErrorBoundary extends Component { + constructor(props) { + super(props); + this.state = { hasError: false }; + } + + static getDerivedStateFromError(error) { + return { hasError: true }; + } + + componentDidCatch(error, errorInfo) { + console.error('Next Steps Error:', error, errorInfo); + + // Track specific Next Steps errors + if (window.NewfoldRuntime?.restUrl) { + this.reportNextStepsError(error, errorInfo); + } + } + + reportNextStepsError = async (error, errorInfo) => { + try { + // Optional: Report to Next Steps specific endpoint + console.warn('Next Steps error reported:', { + module: 'next-steps', + error: error.message, + stack: error.stack, + componentStack: errorInfo.componentStack, + timestamp: new Date().toISOString() + }); + } catch (reportError) { + console.error('Failed to report Next Steps error:', reportError); + } + }; + + render() { + if (this.state.hasError) { + return ( +
+
+

{ __('Next Steps Unavailable', 'wp-module-next-steps') }

+

+ { __('The Next Steps module encountered an error and cannot be displayed right now.', 'wp-module-next-steps') } +

+ +
+
+ ); + } + + return this.props.children; + } +} + +/** + * API-specific Error Boundary for handling API failures gracefully + * Shows more specific messaging for API-related errors + */ +export class APIErrorBoundary extends Component { + constructor(props) { + super(props); + this.state = { hasError: false }; + } + + static getDerivedStateFromError(error) { + return { hasError: true }; + } + + componentDidCatch(error, errorInfo) { + console.error('API Error Boundary caught an error:', error, errorInfo); + + // Enhanced API error logging + if (error.name?.includes('APIError')) { + console.error('API Error Context:', { + endpoint: error.data?.endpoint, + method: 'PUT', + requestData: error.data?.requestData, + httpStatus: error.originalError?.status, + timestamp: new Date().toISOString() + }); + } + } + + render() { + if (this.state.hasError) { + return ( +
+
+

{ __('Connection Issue', 'wp-module-next-steps') }

+

+ { __('Unable to save your changes right now. Please check your connection and try again.', 'wp-module-next-steps') } +

+ +
+
+ ); + } + + return this.props.children; + } +} + +/** + * Higher-order component to wrap components with error boundary + * @param {Component} Component - The component to wrap + * @param {Object} options - Error boundary options + * @returns {Component} - Wrapped component with error boundary + */ +export const withErrorBoundary = (WrappedComponent, options = {}) => { + const WithErrorBoundaryComponent = (props) => { + return ( + + + + ); + }; + + WithErrorBoundaryComponent.displayName = `withErrorBoundary(${WrappedComponent.displayName || WrappedComponent.name})`; + + return WithErrorBoundaryComponent; +}; + +/** + * Higher-order component specifically for API error handling + * @param {Component} Component - The component to wrap + * @returns {Component} - Wrapped component with API error boundary + */ +export const withAPIErrorBoundary = (WrappedComponent) => { + const WithAPIErrorBoundaryComponent = (props) => { + return ( + + + + ); + }; + + WithAPIErrorBoundaryComponent.displayName = `withAPIErrorBoundary(${WrappedComponent.displayName || WrappedComponent.name})`; + + return WithAPIErrorBoundaryComponent; +}; \ No newline at end of file diff --git a/src/components/nextSteps/helpers.js b/src/components/nextSteps/helpers.js new file mode 100644 index 0000000..aa0f4fb --- /dev/null +++ b/src/components/nextSteps/helpers.js @@ -0,0 +1,310 @@ +/** + * Helper functions for API calls and plan state immutability + */ +import apiFetch from '@wordpress/api-fetch'; + +/** + * Determine if an error should trigger error boundaries + * @param {Error} error - The error object + * @returns {boolean} - Whether to trigger error boundary + */ +const shouldTriggerErrorBoundary = (error) => { + // Server errors (5xx) should trigger error boundaries + if (error.status >= 500) return true; + + // Network errors (no status) should trigger error boundaries + if (!error.status) return true; + + // Critical API errors should trigger error boundaries + if (error.name?.includes('Critical')) return true; + + // Authentication errors might need error boundaries in some cases + if (error.status === 401 || error.status === 403) return true; + + // Client errors (4xx) typically shouldn't trigger error boundaries + // These are usually validation errors that should be handled gracefully + return false; +}; + +// Simple progress calculation without caching + +/** + * Calculate progress for a single section + * @param {Object} section - The section data + * @returns {Object} Progress data for the section + */ +export const calculateSectionProgress = (section) => { + if (!section.tasks?.length) { + return { + totalCount: 0, + completedCount: 0, + isComplete: false, + percentage: 0 + }; + } + + const totalCount = section.tasks.filter(t => t.status !== 'dismissed').length; + const completedCount = section.tasks.filter(t => t.status === 'done').length; + + return { + totalCount, + completedCount, + isComplete: totalCount > 0 && completedCount === totalCount, + percentage: totalCount > 0 ? Math.round((completedCount / totalCount) * 100) : 0 + }; +}; + +/** + * Calculate progress data for all sections in a plan + * @param {Object} plan - The plan data + * @returns {Object} Plan with progress data added to each section + */ +export const calculatePlanProgress = (plan) => { + if (!plan?.tracks) return plan; + + return { + ...plan, + tracks: plan.tracks.map(track => ({ + ...track, + sections: track.sections.map(section => ({ + ...section, + progress: calculateSectionProgress(section) + })) + })) + }; +}; + +/** + * Update task status in plan state immutably and recalculate affected section progress + * @param {Object} plan - The current plan state + * @param {string} trackId - Track ID + * @param {string} sectionId - Section ID + * @param {string} taskId - Task ID + * @param {string} newStatus - New task status + * @returns {Object} New plan state with updated task and progress + */ +export const updateTaskStatusInPlan = (plan, trackId, sectionId, taskId, newStatus) => { + return { + ...plan, + tracks: plan.tracks.map(track => + track.id === trackId + ? { + ...track, + sections: track.sections.map(section => { + if (section.id === sectionId) { + // Update the task and recalculate progress for this section only + const updatedSection = { + ...section, + tasks: section.tasks.map(task => + task.id === taskId + ? { ...task, status: newStatus } + : task + ) + }; + // Recalculate progress for just this section + return { + ...updatedSection, + progress: calculateSectionProgress(updatedSection) + }; + } + return section; + }) + } + : track + ) + }; +}; + +/** + * Update section open state in plan state immutably + * @param {Object} plan - The current plan state + * @param {string} trackId - Track ID + * @param {string} sectionId - Section ID + * @param {boolean} isOpen - New open state + * @returns {Object} New plan state with updated section + */ +export const updateSectionInPlan = (plan, trackId, sectionId, isOpen) => { + return { + ...plan, + tracks: plan.tracks.map(track => + track.id === trackId + ? { + ...track, + sections: track.sections.map(section => + section.id === sectionId + ? { ...section, open: isOpen } + : section + ) + } + : track + ) + }; +}; + +/** + * Update track open state in plan state immutably + * @param {Object} plan - The current plan state + * @param {string} trackId - Track ID + * @param {boolean} isOpen - New open state + * @returns {Object} New plan state with updated track + */ +export const updateTrackInPlan = (plan, trackId, isOpen) => { + return { + ...plan, + tracks: plan.tracks.map(track => + track.id === trackId + ? { ...track, open: isOpen } + : track + ) + }; +}; + +/** + * Method to create endpoint url + * + * no permalinks: 'http://localhost:8882/index.php?rest_route=/' + * permalinks: 'http://localhost:8882/wp-json/' + */ +export const createEndpointUrl = ( root, endpoint ) => { + // if restUrl has /index.php?rest_route=/, add escaped endpoint + if ( root.includes( '?' ) ) { + return root + encodeURIComponent( endpoint ); + } + // otherwise permalinks set and restUrl should concatenate endpoint + return root + endpoint; +}; + +/** + * Wrapper method to post task update to endpoint + * + * @param {Object} data object of data + * @param {Function} passError method to handle the error in component + * @param {Function} thenCallback method to call in promise then + */ +export const taskUpdateWrapper = ( data, passError, thenCallback ) => { + return apiFetch( { + url: createEndpointUrl( + window.NewfoldRuntime.restUrl, + 'newfold-next-steps/v1/steps/status' + ), + method: 'PUT', + data, + } ) + .then( ( response ) => { + // Check for API-level errors in successful responses + if ( response && response.error ) { + const apiError = new Error( `Task update failed: ${response.error}` ); + apiError.name = 'TaskUpdateError'; + apiError.data = { response, requestData: data }; + throw apiError; + } + thenCallback( response ); + } ) + .catch( ( error ) => { + // Enhance error with context for error boundaries + const enhancedError = new Error( + `Task update API error: ${error.message || 'Unknown error'}` + ); + enhancedError.name = 'TaskUpdateAPIError'; + enhancedError.originalError = error; + enhancedError.data = { requestData: data, endpoint: 'steps/status' }; + + // Call error handler first + passError( enhancedError ); + + // Then throw to trigger error boundary if error is critical + if ( shouldTriggerErrorBoundary( error ) ) { + throw enhancedError; + } + } ); +}; + +/** +* Wrapper method to post section update to endpoint +* +* @param {Object} data object of data +* @param {Function} passError method to handle the error in component +* @param {Function} thenCallback method to call in promise then +*/ +export const sectionUpdateWrapper = ( data, passError, thenCallback ) => { + return apiFetch( { + url: createEndpointUrl( + window.NewfoldRuntime.restUrl, + 'newfold-next-steps/v1/steps/section/open' + ), + method: 'PUT', + data, + } ) + .then( ( response ) => { + // Check for API-level errors in successful responses + if ( response && response.error ) { + const apiError = new Error( `Section update failed: ${response.error}` ); + apiError.name = 'SectionUpdateError'; + apiError.data = { response, requestData: data }; + throw apiError; + } + thenCallback( response ); + } ) + .catch( ( error ) => { + // Enhance error with context for error boundaries + const enhancedError = new Error( + `Section update API error: ${error.message || 'Unknown error'}` + ); + enhancedError.name = 'SectionUpdateAPIError'; + enhancedError.originalError = error; + enhancedError.data = { requestData: data, endpoint: 'steps/section/open' }; + + // Call error handler first + passError( enhancedError ); + + // Then throw to trigger error boundary if error is critical + if ( shouldTriggerErrorBoundary( error ) ) { + throw enhancedError; + } + } ); +}; + +/** +* Wrapper method to post track update to endpoint +* +* @param {Object} data object of data +* @param {Function} passError method to handle the error in component +* @param {Function} thenCallback method to call in promise then +*/ +export const trackUpdateWrapper = ( data, passError, thenCallback ) => { + return apiFetch( { + url: createEndpointUrl( + window.NewfoldRuntime.restUrl, + 'newfold-next-steps/v1/steps/track/open' + ), + method: 'PUT', + data, + } ) + .then( ( response ) => { + // Check for API-level errors in successful responses + if ( response && response.error ) { + const apiError = new Error( `Track update failed: ${response.error}` ); + apiError.name = 'TrackUpdateError'; + apiError.data = { response, requestData: data }; + throw apiError; + } + thenCallback( response ); + } ) + .catch( ( error ) => { + // Enhance error with context for error boundaries + const enhancedError = new Error( + `Track update API error: ${error.message || 'Unknown error'}` + ); + enhancedError.name = 'TrackUpdateAPIError'; + enhancedError.originalError = error; + enhancedError.data = { requestData: data, endpoint: 'steps/track/open' }; + + // Call error handler first + passError( enhancedError ); + + // Then throw to trigger error boundary if error is critical + if ( shouldTriggerErrorBoundary( error ) ) { + throw enhancedError; + } + } ); +}; diff --git a/src/components/nextSteps/index.js b/src/components/nextSteps/index.js index 568f78b..416f631 100644 --- a/src/components/nextSteps/index.js +++ b/src/components/nextSteps/index.js @@ -1,109 +1,38 @@ -import { Button } from '@newfold/ui-component-library'; -import { useState } from '@wordpress/element'; +import { useState, useMemo } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; -import apiFetch from '@wordpress/api-fetch'; +import { Button } from '@newfold/ui-component-library'; import { spinner, hideIcon } from '../icons'; import { Track } from '../track'; +import { NextStepsErrorBoundary } from '../ErrorBoundary'; +import { + calculatePlanProgress, + updateTaskStatusInPlan, + updateSectionInPlan, + updateTrackInPlan, + taskUpdateWrapper, + sectionUpdateWrapper, + trackUpdateWrapper +} from './helpers'; import './styles.scss'; -/** - * Method to create endpoint url - * - * no permalinks: 'http://localhost:8882/index.php?rest_route=/' - * permalinks: 'http://localhost:8882/wp-json/' - */ -const createEndpointUrl = ( root, endpoint ) => { - // if restUrl has /index.php?rest_route=/, add escaped endpoint - if ( root.includes( '?' ) ) { - return root + encodeURIComponent( endpoint ); - } - // otherwise permalinks set and restUrl should concatenate endpoint - return root + endpoint; -}; - -/** - * Wrapper method to post task update to endpoint - * - * @param {Object} data object of data - * @param {Function} passError setter for the error in component - * @param {Function} thenCallback method to call in promise then - */ -const taskUpdateWrapper = ( data, passError, thenCallback ) => { - return apiFetch( { - url: createEndpointUrl( - window.NewfoldRuntime.restUrl, - 'newfold-next-steps/v1/steps/status' - ), - method: 'PUT', - data, - } ) - .then( ( response ) => { - thenCallback( response ); - } ) - .catch( ( error ) => { - passError( error ); - } ); -}; - -/** -* Wrapper method to post section update to endpoint -* -* @param {Object} data object of data -* @param {Function} passError setter for the error in component -* @param {Function} thenCallback method to call in promise then -*/ -const sectionUpdateWrapper = ( data, passError, thenCallback ) => { - return apiFetch( { - url: createEndpointUrl( - window.NewfoldRuntime.restUrl, - 'newfold-next-steps/v1/steps/section/open' - ), - method: 'PUT', - data, - } ) - .then( ( response ) => { - thenCallback( response ); - } ) - .catch( ( error ) => { - passError( error ); - } ); -}; - -/** -* Wrapper method to post track update to endpoint -* -* @param {Object} data object of data -* @param {Function} passError setter for the error in component -* @param {Function} thenCallback method to call in promise then -*/ -const trackUpdateWrapper = ( data, passError, thenCallback ) => { - return apiFetch( { - url: createEndpointUrl( - window.NewfoldRuntime.restUrl, - 'newfold-next-steps/v1/steps/track/open' - ), - method: 'PUT', - data, - } ) - .then( ( response ) => { - thenCallback( response ); - } ) - .catch( ( error ) => { - passError( error ); - } ); -}; export const NextSteps = () => { const [ plan, setPlan ] = useState( window.NewfoldNextSteps ); const [ showDismissed, setShowDismissed ] = useState( true ); const [ showControls, setShowControls ] = useState( false ); - const taskUpdateCallback = ( track, section, id, status, errorCallback, successCallback ) => { + // Calculate progress data on initial load, then updated per-section + const planWithProgress = useMemo(() => { + return plan ? calculatePlanProgress(plan) : null; + }, [plan]); + + const taskUpdateCallback = ( trackId, sectionId, taskId, status, errorCallback, successCallback ) => { + // send update to endpoint const data = { - plan: plan.id, - track, - section, - task: id, + plan_id: plan.id, + track_id: trackId, + section_id: sectionId, + task_id: taskId, status, }; taskUpdateWrapper( @@ -112,33 +41,24 @@ export const NextSteps = () => { errorCallback( error ); }, ( response ) => { - // Nothing action needed here since the task update is handled in the task component + // update plan state with the new task status using immutability helper + setPlan( prevPlan => updateTaskStatusInPlan( prevPlan, trackId, sectionId, taskId, status ) ); + // call provided success callback successCallback( response ); } ); }; - const sectionOpenCallback = ( section, open ) => { - // Find the track that contains this section - let trackId = null; - if ( plan && plan.tracks ) { - for ( const track of plan.tracks ) { - if ( track.sections && track.sections.some( s => s.id === section ) ) { - trackId = track.id; - break; - } - } - } - - if ( ! trackId ) { + const sectionOpenCallback = ( trackId, sectionId, open ) => { + if ( !trackId || !sectionId ) { // Could not find track for intendend section return; } const data = { - plan: plan.id, - track: trackId, - section: section, + plan_id: plan.id, + track_id: trackId, + section_id: sectionId, open: open, }; @@ -148,15 +68,15 @@ export const NextSteps = () => { // console.error( 'Error updating section open state:', error ); }, ( response ) => { - // console.log( 'Section open state updated successfully:', response ); + setPlan( prevPlan => updateSectionInPlan( prevPlan, trackId, sectionId, open ) ); } ); }; - const trackOpenCallback = ( track, open ) => { + const trackOpenCallback = ( trackId, open ) => { const data = { - plan: plan.id, - track: track, + plan_id: plan.id, + track_id: trackId, open: open, }; @@ -166,13 +86,13 @@ export const NextSteps = () => { // console.error( 'Error updating track open state:', error ); }, ( response ) => { - // console.log( 'Track open state updated successfully:', response ); + setPlan( prevPlan => updateTrackInPlan( prevPlan, trackId, open ) ); } ); }; // Handle case where plan might not be loaded yet - if ( ! plan || ! plan.tracks ) { + if ( ! planWithProgress || ! planWithProgress.tracks ) { return (
{ spinner } @@ -182,36 +102,42 @@ export const NextSteps = () => { } return ( -
-

{ plan.description }

- { plan.tracks.map( ( track, i ) => ( - - ) ) } - { showControls &&
- -
} -
+ +
+

{ planWithProgress.description }

+ { planWithProgress.tracks.map( ( track, trackIndex ) => ( + + ) ) } + { showControls &&
+ +
} +
+
); }; diff --git a/src/components/nextSteps/styles.scss b/src/components/nextSteps/styles.scss index a9c101e..ed58974 100644 --- a/src/components/nextSteps/styles.scss +++ b/src/components/nextSteps/styles.scss @@ -135,11 +135,11 @@ .nfd-progress-bar-label { position: absolute; - top: -1px; + top: -2px; right: 0.75rem; color: #234aa7; z-index: 2; - font-size: 11px; + font-size: 12px; } // empty style @@ -152,11 +152,12 @@ // complete style &.nfd-progress-bar-100 { .nfd-progress-bar-inner { - background-color: #A0C00F; + background-color: #8daa0e; } .nfd-progress-bar-label { color: #fff; + text-shadow: 0 0 2px rgba(0, 0, 0, 0.75); } } } @@ -175,10 +176,10 @@ padding: 0 1rem 1rem; position: absolute; top: 100%; - transition: all .15s ease; + transition: all .15s ease .15s; width: 100%; - &[data-complete="true"] { + &[data-complete="true"][data-show-celebration="true"] { opacity: .95; top: 4.25rem; z-index: 1; @@ -289,4 +290,135 @@ color: #ABAE14; } + // Error Boundary Styles + .nfd-error-boundary, + .nfd-nextsteps-error { + padding: 2rem; + text-align: center; + background: #fff; + border: 1px solid #ddd; + border-radius: 4px; + margin: 1rem 0; + + .nfd-error-boundary-content, + .nfd-nextsteps-error-content { + max-width: 500px; + margin: 0 auto; + + h3 { + color: #d63638; + margin-bottom: 1rem; + font-size: 1.2rem; + } + + p { + color: #666; + margin-bottom: 1.5rem; + line-height: 1.5; + } + } + + .nfd-error-boundary-actions { + display: flex; + gap: 0.5rem; + justify-content: center; + flex-wrap: wrap; + margin-bottom: 1rem; + } + + .nfd-error-boundary-details { + margin-top: 1.5rem; + text-align: left; + background: #f8f9fa; + border: 1px solid #e9ecef; + border-radius: 4px; + padding: 1rem; + + summary { + cursor: pointer; + font-weight: 600; + margin-bottom: 0.5rem; + color: #495057; + + &:hover { + color: #007cba; + } + } + + .nfd-error-boundary-stack { + background: #f1f1f1; + border: 1px solid #ccc; + border-radius: 3px; + padding: 0.75rem; + font-family: 'Courier New', monospace; + font-size: 0.8rem; + color: #d63638; + white-space: pre-wrap; + word-break: break-word; + max-height: 200px; + overflow-y: auto; + margin: 0; + } + } + } + + // Section-level error fallback + .nfd-section-error { + padding: 1rem; + text-align: center; + background: #fff3cd; + border: 1px solid #ffeaa7; + border-radius: 4px; + margin: 0.5rem 0; + color: #856404; + font-size: 0.9rem; + + p { + margin: 0; + } + } + + // Task-level error fallback + .nfd-task-error { + padding: 0.75rem; + text-align: center; + background: #f8d7da; + border: 1px solid #f5c6cb; + border-radius: 4px; + margin: 0.25rem 0; + color: #721c24; + font-size: 0.85rem; + + p { + margin: 0; + } + } + + // API-specific error boundary + .nfd-api-error-boundary { + padding: 1.5rem; + text-align: center; + background: #e7f3ff; + border: 1px solid #b3d9ff; + border-radius: 4px; + margin: 1rem 0; + + .nfd-api-error-content { + max-width: 400px; + margin: 0 auto; + + h4 { + color: #0073aa; + margin-bottom: 0.75rem; + font-size: 1.1rem; + } + + p { + color: #555; + margin-bottom: 1rem; + line-height: 1.4; + } + } + } + } \ No newline at end of file diff --git a/src/components/progressBar/index.js b/src/components/progressBar/index.js index 66b402a..4c35da4 100644 --- a/src/components/progressBar/index.js +++ b/src/components/progressBar/index.js @@ -1,4 +1,6 @@ -export const ProgressBar = ( { completed, total } ) => { +import { memo } from '@wordpress/element'; + +export const ProgressBar = memo( ( { completed, total } ) => { const percent = total ? Math.round( ( completed / total ) * 100 ) : 0; return (
@@ -12,4 +14,4 @@ export const ProgressBar = ( { completed, total } ) => {
); -}; +} ); diff --git a/src/components/section/index.js b/src/components/section/index.js index 9bf15a7..f237777 100644 --- a/src/components/section/index.js +++ b/src/components/section/index.js @@ -1,64 +1,69 @@ -import { useEffect, useState } from '@wordpress/element'; -import { Title } from '@newfold/ui-component-library'; +import { useEffect, useState, useRef, memo } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; -import { ProgressBar } from '../progressBar'; +import { Title } from '@newfold/ui-component-library'; import { plusCircleIcon, minusCircleIcon, closeCircleIcon,trophyIcon } from '../icons'; +import { ProgressBar } from '../progressBar'; import { Task } from '../task'; +import { ErrorBoundary } from '../ErrorBoundary'; -export const Section = ( props ) => { +export const Section = memo(( props ) => { const { - section, index, - taskUpdateCallback, + section, sectionOpenCallback, - track, showDismissed, - ...restProps + taskUpdateCallback, + trackId, } = props; - const [ showCompleteCelebration, setShowCompleteCelebration ] = useState( true ); - const [ isComplete, setIsComplete ] = useState( false ); - // Use persisted open state from section data, fallback to passed-in open prop or default for first section - const [ isOpen, setIsOpen ] = useState( section.open !== undefined ? section.open : index === 0 ); - - const completed = section.tasks.filter( - ( task ) => task.status === 'done' - ).length; - const total = section.tasks.filter( - ( task ) => task.status !== 'dismissed' - ).length; - - // if section complete on load, don't show complete celebration - useEffect( () => { - if ( completed === total ) { - setShowCompleteCelebration( false ); - } - }, [] ); + // Get progress data from props (calculated in parent) + const { totalCount, completedCount, isComplete } = section.progress || { + totalCount: 0, + completedCount: 0, + isComplete: false + }; + + const [ showCompleteCelebration, setShowCompleteCelebration ] = useState( false ); + // Track the previous completion state to detect user-triggered completions + const prevIsComplete = useRef( isComplete ); + const isInitialMount = useRef( true ); + // watch for section completion state changes and display success celebration if needed useEffect( () => { - if ( total === completed ) { - const timer = setTimeout(() => { - setIsComplete( !isComplete ); - }, 100); - // Clean up the timer when the component unmounts - return () => clearTimeout(timer); + // Only show celebration if + if ( + isComplete && // Section is now complete + totalCount > 0 && // Has tasks to complete + !prevIsComplete.current && // Was previously incomplete (user-triggered transition) + !isInitialMount.current // Not the initial mount + ) { + // display success celebration (slight css-base delay and animation) + setShowCompleteCelebration( true ); } - }, [ showCompleteCelebration, completed, total ] ); + + // Update refs for next render + prevIsComplete.current = isComplete; + isInitialMount.current = false; + }, [ isComplete ] ); - const handleToggleOpen = ( event, state = null ) => { + const handleToggleOpen = ( event ) => { + // Prevent event from bubbling up to parent track details element + event.stopPropagation(); + // Get the new open state from the details element - const newOpenState = state !== null ? state : event.target.open; + const newOpenState = event.target.open; // Call the callback to update the backend - sectionOpenCallback( section.id, newOpenState ); - setIsOpen( newOpenState ); + sectionOpenCallback( trackId, section.id, newOpenState ); }; return ( - ( total > 0 || showDismissed === true )&& ( + ( totalCount > 0 || showDismissed === true ) && (
@@ -72,40 +77,50 @@ export const Section = ( props ) => { </span> { section.label } - { total > 0 && } + { totalCount > 0 && }
- { section.tasks.map( ( task ) => ( - + { section.tasks.map( ( task, taskIndex ) => ( + +

{ __('Task temporarily unavailable', 'wp-module-next-steps') }

+
+ } + > + + ) ) }
- { showCompleteCelebration && -
{ - setShowCompleteCelebration( false ); - handleToggleOpen( e, false ); - } } +
{ + setShowCompleteCelebration( false ); + sectionOpenCallback( trackId, section.id, false ); + } } + > + -
{ trophyIcon }
-

{ __( 'All complete!', 'wp-module-next-steps' ) }

-
- } + { closeCircleIcon } + +
{ trophyIcon }
+

{ __( 'All complete!', 'wp-module-next-steps' ) }

+
+ ) ); -}; +}); diff --git a/src/components/task/index.js b/src/components/task/index.js index d0da246..d7c3aec 100644 --- a/src/components/task/index.js +++ b/src/components/task/index.js @@ -1,16 +1,16 @@ import { Title } from '@newfold/ui-component-library'; import { __ } from '@wordpress/i18n'; -import { useState } from '@wordpress/element'; +import { useState, useEffect, memo } from '@wordpress/element'; import { doneIcon, hideIcon, showIcon, goIcon, circleDashedIcon, circleIcon } from '../icons'; -export const Task = ( props ) => { +export const Task = memo(( props ) => { const { + index, + sectionId, + showDismissed, task, taskUpdateCallback, - track, - section, - showDismissed, - ...restProps + trackId, } = props; // Destructure task properties @@ -23,23 +23,26 @@ export const Task = ( props ) => { // task status uses state to track the current status const [ status, setStatus ] = useState( task.status ); + useEffect( () => { + setStatus( task.status ); + }, [ task.status ] ); + const updateStatus = ( newStatus ) => { - const currentStatus = status; - setStatus( newStatus ); // for immediate UI feedback + const previousStatus = status; + setStatus( newStatus ); // optimistic update - for immediate UI feedback // update task status via API taskUpdateCallback( - track, - section, + trackId, + sectionId, id, newStatus, ( error ) => { - // undo status update on error - setStatus( currentStatus ); - console.error( 'Error updating task status. Please, try reloading the page to load the latest data.', error ); + // If error, revert optimistic task update to previous status + setStatus( previousStatus ); + // further error handling done in the error boundary }, ( response ) => { - // update status on success - setStatus( newStatus ); // redundant since we already set it above + setStatus( newStatus ); // redundant since we optimistically set it above } ); }; @@ -69,7 +72,11 @@ export const Task = ( props ) => { * Ensures all keys have 'data-' prefix and handles boolean values */ const formatDataAttributes = () => { - const formatted = {}; + const formatted = { + 'data-nfd-task-index': index, + 'data-nfd-task-id': id, + 'data-nfd-task-status': status, + }; Object.entries( data_attributes ).forEach( ( [ key, value ] ) => { // Ensure key has 'data-' prefix @@ -227,4 +234,4 @@ export const Task = ( props ) => { { status === 'dismissed' && showDismissed && renderDismissedStep() } ); -}; +}); diff --git a/src/components/track/index.js b/src/components/track/index.js index f400d75..b03d30e 100644 --- a/src/components/track/index.js +++ b/src/components/track/index.js @@ -1,21 +1,19 @@ +import { memo } from '@wordpress/element'; import { Title } from '@newfold/ui-component-library'; -import { Section } from '../section'; import { chevronIcon } from '../icons'; +import { Section } from '../section'; +import { ErrorBoundary } from '../ErrorBoundary'; -export const Track = ( props ) => { +export const Track = memo(( props ) => { const { - track, index, - taskUpdateCallback, + track, sectionOpenCallback, - trackOpenCallback, showDismissed, - ...restProps + taskUpdateCallback, + trackOpenCallback, } = props; - // Use track.open if available, otherwise fall back to default behavior (first track open) - const isOpen = track.hasOwnProperty('open') ? track.open : index === 0; - const handleToggleOpen = ( event ) => { // Get the new open state from the details element const newOpenState = event.target.open; @@ -24,10 +22,12 @@ export const Track = ( props ) => { }; return ( -
@@ -39,17 +39,26 @@ export const Track = ( props ) => { </summary> <div className="nfd-track-sections"> { track.sections.map( ( section, sectionIndex ) => ( - <Section - key={ section.id } - section={ section } - index={ sectionIndex } - taskUpdateCallback={ taskUpdateCallback } - sectionOpenCallback={ sectionOpenCallback } - track={ track.id } - showDismissed={ showDismissed } - /> + <ErrorBoundary + key={ `section-boundary-${section.id}` } + fallback={ + <div className="nfd-section-error"> + <p>Section temporarily unavailable</p> + </div> + } + > + <Section + index={ sectionIndex } + key={ section.id } + section={ section } + sectionOpenCallback={ sectionOpenCallback } + showDismissed={ showDismissed } + taskUpdateCallback={ taskUpdateCallback } + trackId={ track.id } + /> + </ErrorBoundary> ) ) } </div> </details> ); -}; +}); diff --git a/tests/cypress/fixtures/test-plan.json b/tests/cypress/fixtures/test-plan.json new file mode 100644 index 0000000..c0972bb --- /dev/null +++ b/tests/cypress/fixtures/test-plan.json @@ -0,0 +1,126 @@ +{ + "id": "testplan", + "label": "Test Plan", + "version": "2.0.0", + "description": "This is a test plan", + "tracks": [ + { + "id": "track1", + "label": "Test Track 1", + "open": true, + "sections": [ + { + "id": "section1", + "label": "Test Section with 1 task", + "open": true, + "tasks": [ + { + "id": "s1task1", + "title": "Test Task", + "href": "https://www.bluehost.com", + "status": "new", + "priority": 1, + "source": "test", + "data_attributes": { + "data-test-id": "test-task-1", + "data-nfd-id": "test-task-1" + } + } + ] + }, + { + "id": "section2", + "label": "Test Section with 3 tasks", + "open": true, + "tasks": [ + { + "id": "s2task1", + "title": "New Task", + "href": "https://www.bluehost.com", + "status": "new", + "priority": 1, + "source": "test" + }, + { + "id": "s2task2", + "title": "Dismissed Task", + "href": "https://www.bluehost.com", + "status": "dismissed", + "priority": 2, + "source": "test" + }, + { + "id": "s2task3", + "title": "Completed Task", + "href": "https://www.bluehost.com", + "status": "done", + "priority": 3, + "source": "test" + } + ] + }, + { + "id": "section3", + "label": "Test Section with completed tasks", + "open": true, + "tasks": [ + { + "id": "s3task1", + "title": "Complete Task 1", + "href": "https://www.bluehost.com", + "status": "done", + "priority": 1, + "source": "test" + }, + { + "id": "s3task2", + "title": "Complete Task 2", + "href": "https://www.bluehost.com", + "status": "done", + "priority": 2, + "source": "test" + } + ] + } + ] + }, + { + "id": "track2", + "label": "Test Track 2", + "open": true, + "sections": [ + { + "id": "section4", + "label": "Test Section with all new tasks", + "open": true, + "tasks": [ + { + "id": "s4task1", + "title": "Test Task 1", + "href": "https://www.bluehost.com", + "status": "new", + "priority": 1, + "source": "test" + }, + { + "id": "s4task2", + "title": "Test Task 2", + "href": "https://www.bluehost.com", + "status": "new", + "priority": 2, + "source": "test" + }, + { + "id": "s4task3", + "title": "Test Task 3", + "href": "https://www.bluehost.com", + "status": "new", + "priority": 3, + "source": "test" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/cypress/integration/next-steps-portal.cy.js b/tests/cypress/integration/next-steps-portal.cy.js index cba6ae1..d86106e 100644 --- a/tests/cypress/integration/next-steps-portal.cy.js +++ b/tests/cypress/integration/next-steps-portal.cy.js @@ -1,8 +1,7 @@ // <reference types="Cypress" /> -import { wpLogin } from '../wp-module-support/utils.cy'; +import { wpLogin, resetNextStepsData } from '../wp-module-support/utils.cy'; import { - resetNextStepsData, - waitForNextStepsApp, + waitForNextStepsApp, getTaskByStatus, verifyTaskDataAttributes, verifyTaskLinks, @@ -11,80 +10,54 @@ import { } from '../wp-module-support/next-steps-helpers.cy'; describe( 'Next Steps Portal in Plugin App', { testIsolation: true }, () => { - before( () => { - // Reset Next Steps data to ensure clean state for tests - resetNextStepsData(); - } ); - - beforeEach( () => { - wpLogin(); - - cy.visit( - '/wp-admin/admin.php?page=' + Cypress.env( 'pluginId' ) + '#/home' - ); - } ); - - it( 'renders portal structure and displays progress bars correctly', () => { - // === Portal App Rendering === - cy.get( '.next-steps-fill #nfd-nextsteps' ) - .scrollIntoView() - .should( 'be.visible' ); - - // === Basic Structure === - waitForNextStepsApp(); - - // Check that the app has loaded with content - cy.get( '#nfd-nextsteps p' ).should( 'be.visible' ); - - // === Progress Bars Display === - // Check if progress bars exist anywhere in the app - cy.get( '#nfd-nextsteps' ).then( ( $app ) => { - // Check if progress bars exist, but don't fail if they don't - cy.wrap( $app ).find( '.nfd-progress-bar' ).should( 'exist' ); - } ); - } ); - - it( 'handles all portal interactions and functionality correctly', () => { - // === Basic Interactions === - // Test that the first track is open by default - cy.get( '.nfd-track' ).first().should( 'have.attr', 'open' ); - - // Test that sections can be toggled - toggleSection( 0, 0 ); - - // Test that task buttons exist and are clickable - getTaskByStatus( 'new' ).first().then( ( task ) => { - verifyTaskIcons( cy.wrap( task ), 'new' ); - } ); - - // === Task Links and Navigation === - getTaskByStatus( 'new' ).first().then( ( task ) => { - verifyTaskLinks( cy.wrap( task ) ); - verifyTaskDataAttributes( cy.wrap( task ) ); - } ); - } ); - - // New test to verify version handling in portal context - it( 'handles versioned data correctly in portal', () => { - // Wait for initial load - waitForNextStepsApp(); - - // Verify basic functionality works - getTaskByStatus( 'new' ).should( 'have.length.greaterThan', 0 ); - - // Refresh the page to trigger potential merge logic - cy.reload(); - - // Wait for portal to reload - cy.get( '.next-steps-fill #nfd-nextsteps' ) - .scrollIntoView() - .should( 'be.visible' ); - - waitForNextStepsApp(); - - // Verify the app still functions normally after reload - cy.get( '.nfd-track' ).should( 'have.length.greaterThan', 0 ); - cy.get( '.nfd-section' ).should( 'have.length.greaterThan', 0 ); - cy.get( '.nfd-nextsteps-step-container' ).should( 'have.length.greaterThan', 0 ); - } ); + before( () => { + // Reset Next Steps data to ensure clean state for tests + resetNextStepsData(); + } ); + + beforeEach( () => { + wpLogin(); + cy.visit( + '/wp-admin/admin.php?page=' + Cypress.env( 'pluginId' ) + '#/home' + ); + } ); + + it( 'renders portal structure and displays progress bars correctly', () => { + // === Portal App Rendering === + cy.get( '.next-steps-fill #nfd-nextsteps' ) + .scrollIntoView() + .should( 'be.visible' ); + + // === Basic Structure === + waitForNextStepsApp(); + + // Check that the app has loaded with content + cy.get( '#nfd-nextsteps p' ).should( 'be.visible' ); + + // === Progress Bars Display === + cy.get( '.nfd-progress-bar' ).should( 'exist' ); + } ); + + it( 'handles all portal interactions and functionality correctly', () => { + // Test that sections can be toggled + toggleSection( 0, 0 ); + // Test that the first track is still open + cy.get( '.nfd-track' ).first().should( 'have.attr', 'open' ); + + // Test that task buttons exist and are clickable + getTaskByStatus( 'new' ).first().then( ( task ) => { + verifyTaskIcons( cy.wrap( task ), 'new' ); + } ); + + // === Task Links and Navigation === + getTaskByStatus( 'new' ).first().then( ( task ) => { + verifyTaskLinks( cy.wrap( task ) ); + verifyTaskDataAttributes( cy.wrap( task ) ); + } ); + + // Verify the app rendered correctly + getTaskByStatus( 'new' ).should( 'have.length.greaterThan', 0 ); + cy.get( '.nfd-track' ).should( 'have.length.greaterThan', 0 ); + cy.get( '.nfd-section' ).should( 'have.length.greaterThan', 0 ); + } ); } ); diff --git a/tests/cypress/integration/next-steps-widget.cy.js b/tests/cypress/integration/next-steps-widget.cy.js index c089c93..3ea2607 100644 --- a/tests/cypress/integration/next-steps-widget.cy.js +++ b/tests/cypress/integration/next-steps-widget.cy.js @@ -1,240 +1,271 @@ // <reference types="Cypress" /> -import { wpLogin, wpCli } from '../wp-module-support/utils.cy'; -import { - resetNextStepsData, - waitForNextStepsApp, - getTaskByStatus, - ensureTrackOpen, - ensureSectionExpanded, - completeTask, - dismissTask, - countTasksByStatus, - openTrack, - closeTrack -} from '../wp-module-support/next-steps-helpers.cy'; - -describe( 'Next Steps Dashboard Widget', { testIsolation: true }, () => { +import { + wpLogin, + setTestNextStepsData, + resetNextStepsData +} from '../wp-module-support/utils.cy'; + +describe('Next Steps Widget', { testIsolation: true }, () => { before( () => { - // Reset Next Steps data to ensure clean state for tests - resetNextStepsData(); + // Set test Next Steps data + setTestNextStepsData(); } ); - beforeEach( () => { - wpLogin(); - cy.visit( '/wp-admin/index.php' ); - - // Wait for the next steps widget to load - cy.get( '#nfd_next_steps_widget' ).should( 'be.visible' ); - cy.get( '#nfd-next-steps-app' ).should( 'be.visible' ); - waitForNextStepsApp(); + after( () => { + // Reset test data + resetNextStepsData(); } ); - it( 'renders complete structure and elements correctly', () => { - // Widget Container and Title - cy.get( '#nfd_next_steps_widget' ) - .scrollIntoView() - .should( 'be.visible' ); - - cy.get( '#nfd_next_steps_widget h2' ).contains( 'Next Steps' ); - - cy.get( '#nfd_next_steps_widget .nfd-widget-next-steps' ) - .scrollIntoView() - .should( 'be.visible' ); - - // Main Next Steps App Structure - cy.get( '#nfd-nextsteps' ).should( 'be.visible' ); - cy.get( '#nfd-nextsteps p' ).should( 'be.visible' ); + beforeEach(() => { + wpLogin(); + cy.visit('/wp-admin/index.php'); - // Check that tracks exist - cy.get( '.nfd-track' ).should( 'have.length.greaterThan', 0 ); + // Wait for widget to be visible + cy.get('#nfd_next_steps_widget').should('be.visible'); + cy.get('#nfd-nextsteps').should('be.visible'); - // Check that the first track is open by default - cy.get( '.nfd-track' ).first().should( 'have.attr', 'open' ); + // Wait for React app to load by checking for tracks + cy.get('.nfd-track', { timeout: 10000 }).should('exist'); + }); - // Tracks Structure - // Check track headers - cy.get( '.nfd-track-header' ).should( 'have.length.greaterThan', 0 ); - - // Check track titles - cy.get( '.nfd-track-title' ).should( 'have.length.greaterThan', 0 ); - - // Check track icons (chevron) - cy.get( '.nfd-track-header-icon' ).should( 'have.length.greaterThan', 0 ); - - // Check track sections container - cy.get( '.nfd-track-sections' ).should( 'have.length.greaterThan', 0 ); + it('renders the widget structure correctly', () => { + // Widget container + cy.get('#nfd_next_steps_widget') + .should('be.visible') + .within(() => { + cy.get('h2').should('contain', 'Next Steps'); + }); - // Sections Structure - // Check sections exist - cy.get( '.nfd-section' ).should( 'have.length.greaterThan', 0 ); - - // Check section headers - cy.get( '.nfd-section-header' ).should( 'have.length.greaterThan', 0 ); - - // Check section titles - cy.get( '.nfd-section-title' ).should( 'have.length.greaterThan', 0 ); - - // Check section icons - cy.get( '.nfd-section-header-icon' ).should( 'have.length.greaterThan', 0 ); - - // Check section steps container - cy.get( '.nfd-section-steps' ).should( 'have.length.greaterThan', 0 ); + // Main app structure + cy.get('#nfd-nextsteps') + .should('be.visible') + .should('have.attr', 'data-nfd-plan-id'); - // Tasks Structure - // Check tasks exist - cy.get( '.nfd-nextsteps-step-container' ).should( 'have.length.greaterThan', 0 ); - - // Check task content - cy.get( '.nfd-nextsteps-step-content' ).should( 'have.length.greaterThan', 0 ); - - // Check task titles - cy.get( '.nfd-nextsteps-step-title' ).should( 'have.length.greaterThan', 0 ); + // Should have tracks + cy.get('.nfd-track').should('have.length', 2); - // Check task buttons - cy.get( '.nfd-nextsteps-button' ).should( 'have.length.greaterThan', 0 ); - - // Task Data Attributes - // Check that tasks have proper data attributes - cy.get( '.nfd-nextsteps-step-container' ).first().then( ( $task ) => { - // Should have an id attribute - cy.wrap( $task ).should( 'have.attr', 'id' ); - - // May have custom data attributes - const attributes = $task.get( 0 ).attributes; - Object.values( attributes ).forEach( ( attr ) => { - if ( attr.name.startsWith( 'data-' ) ) { - cy.wrap( $task ).should( 'have.attr', attr.name ); - } - } ); - } ); - - // Loading State Verification - // Verify the structure is ready and loaded - cy.get( '#nfd-nextsteps' ).should( 'be.visible' ); - cy.get( '#nfd-nextsteps p' ).should( 'be.visible' ); - cy.get( '.nfd-track' ).should( 'have.length.greaterThan', 0 ); - } ); + // First track should be open by default + cy.get('.nfd-track').first().should('have.attr', 'open'); - it( 'displays progress bars and visual elements correctly', () => { - // Progress Bars for Sections - // With clean state, verify that sections with tasks display progress bars - cy.get( '.nfd-section' ).should( 'have.length.greaterThan', 0 ); - - // Check if progress bars exist for sections with tasks - cy.get( '.nfd-progress-bar' ).should( 'have.length.greaterThan', 0 ); - - // Each progress bar should have proper structure - cy.get( '.nfd-progress-bar' ).each( ( $progressBar ) => { - cy.wrap( $progressBar ).find( '.nfd-progress-bar-label' ).should( 'exist' ); - cy.wrap( $progressBar ).find( '.nfd-progress-bar-inner' ).should( 'exist' ); + // Track has a section + cy.get('.nfd-track').first().within(() => { + cy.get('.nfd-section').should('have.length', 3); - // Progress bar should show completion ratio (e.g., "0/5" for fresh state) - cy.wrap( $progressBar ).find( '.nfd-progress-bar-label' ).should( 'contain', '/' ); - } ); - - // Verify that tasks exist in the clean state - cy.get( '.nfd-nextsteps-step-container' ).should( 'have.length.greaterThan', 0 ); + // Check section structure + cy.get('.nfd-section').first().within(() => { + cy.get('.nfd-section-header').should('exist'); + cy.get('.nfd-section-title').should('exist'); - // ensure the first track is open - openTrack( 0 ); - - // Task Icons for Different States - // Check new task icons - cy.get( '.nfd-nextsteps-step-new' ).first().as( 'newTask' ); - cy.get( '@newTask' ).find( '.nfd-nextsteps-button-todo' ).find( 'svg' ).should( 'exist' ); - cy.get( '@newTask' ).find( '.nfd-nextsteps-button-dismiss' ).find( 'svg' ).should( 'exist' ); - cy.get( '@newTask' ).find( '.nfd-nextsteps-button-link' ).find( 'svg' ).should( 'exist' ); - - // Complete a task to test done task icons - getTaskByStatus( 'new' ).first().then( ( task ) => { - completeTask( cy.wrap( task ) ); - } ); - - // Check that the completed task has the correct redo icon - getTaskByStatus( 'done' ).first().find( '.nfd-nextsteps-button-redo' ).find( 'svg' ).should( 'exist' ); - - // Progress Bar Updates - // Mark a task as complete using helper function - getTaskByStatus( 'new' ).first().then( ( task ) => { - completeTask( cy.wrap( task ) ); - } ); - - // Check that the task state changed (this is the main functionality) - getTaskByStatus( 'done' ).should( 'have.length.greaterThan', 0 ); - - // Check if progress elements exist anywhere in the app - cy.get( '#nfd-nextsteps' ).find( '.nfd-progress-bar, [role="progressbar"]' ).should( 'exist' ); - } ); + cy.get('.nfd-nextsteps-step-container').should('have.length', 1); + cy.get('.nfd-nextsteps-step-container').first().should('have.attr', 'id').and('contain', 's1task1'); + // Task should have proper data attributes + cy.get('.nfd-nextsteps-step-container').first().should('have.attr', 'data-test-id').and('contain', 'test-task-1'); + cy.get('.nfd-nextsteps-step-container').first().should('have.attr', 'data-nfd-id').and('contain', 'test-task-1'); + }); + }); - it( 'handles all interaction functionality correctly', () => { - // Ensure Initial State - // Make sure we have a clean starting point with tracks and sections visible - ensureTrackOpen( 0 ); - ensureSectionExpanded( 0, 0 ); + // Section 2 should have new dismissed and completed task. + cy.get('.nfd-section[data-nfd-section-id="section2"]').as( 'secondSection' ); + cy.get( '@secondSection' ).find('.nfd-progress-bar').should('exist'); + cy.get( '@secondSection' ).find('.nfd-progress-bar-label').should('have.text', '1/2'); + cy.get( '@secondSection' ).find('.nfd-progress-bar-inner').should('have.attr', 'data-percent', '50'); - // Track Accordion Functionality - // It should be open by default - cy.get( '.nfd-track' ).first().should( 'have.attr', 'open' ); - - // Close the track - closeTrack( 0 ); - - // It should close - cy.get( '.nfd-track' ).first().should( 'not.have.attr', 'open' ); - - // Open the track again - openTrack( 0 ); - - // It should open again - cy.get( '.nfd-track' ).first().should( 'have.attr', 'open' ); - - // Find a task with "new" status using robust helper - getTaskByStatus( 'new' ).then( ( task ) => { - // Complete the task - completeTask( cy.wrap( task ) ); - - // Check that a done task appeared (since DOM might rebuild) - countTasksByStatus( 'done' ).should( 'be.greaterThan', 0 ); - } ); + // Section 2 should have 2 tasks + cy.get( '@secondSection' ).find('.nfd-nextsteps-step-container').should('have.length', 3); + // A single new task should be visible + cy.get( '@secondSection' ).find('.nfd-nextsteps-step-container').first().should('have.attr', 'data-nfd-task-status', 'new'); + cy.get( '@secondSection' ).find('.nfd-nextsteps-step-new').scrollIntoView().should('have.length', 1); + cy.get( '@secondSection' ).find('.nfd-nextsteps-step-new').parent().should('have.attr', 'id').and('contain', 's2task1'); + cy.get( '@secondSection' ).find('.nfd-nextsteps-step-new').as( 's2t1' ); + cy.get( '@s2t1' ).find('.nfd-nextsteps-button.nfd-nextsteps-button-todo').should('be.visible'); + cy.get( '@s2t1' ).find('.nfd-nextsteps-button.nfd-nextsteps-button-dismiss').should('exist'); + cy.get( '@s2t1' ).find('.nfd-nextsteps-button.nfd-nextsteps-button-link').should('be.visible'); + cy.get( '@s2t1' ).find('.nfd-nextsteps-button.nfd-nextsteps-button-link').should('have.attr', 'href').and('contain', 'bluehost.com'); + cy.get( '@s2t1' ).find('.nfd-nextsteps-button.nfd-nextsteps-button-link').should('have.attr', 'data-nfd-click').and('contain', 'nextsteps_step_link'); + cy.get( '@s2t1' ).find('.nfd-nextsteps-button.nfd-nextsteps-button-link').should('have.attr', 'data-nfd-event-category').and('contain', 'nextsteps_step'); + cy.get( '@s2t1' ).find('.nfd-nextsteps-button.nfd-nextsteps-button-link').should('have.attr', 'data-nfd-event-key').and('contain', 's2task1'); + // Content should be visible + cy.get( '@s2t1' ).find('.nfd-nextsteps-step-content').should('contain', 'New Task'); + // Content should contain a link + cy.get( '@s2t1' ).find('.nfd-nextsteps-step-content').find('a').should('be.visible'); + cy.get( '@s2t1' ).find('.nfd-nextsteps-step-content').find('a').should('have.attr', 'href').and('contain', 'bluehost.com'); + cy.get( '@s2t1' ).find('.nfd-nextsteps-step-content').find('a').should('have.attr', 'target').and('contain', '_blank'); + // A single dismissed task should be visible + cy.get( '@secondSection' ).find('.nfd-nextsteps-step-container').eq(1).should('have.attr', 'data-nfd-task-status', 'dismissed'); + cy.get( '@secondSection' ).find('.nfd-nextsteps-step-dismissed').as( 's2t2' ); + cy.get( '@secondSection' ).find('.nfd-nextsteps-step-dismissed').should('have.length', 1); + cy.get( '@secondSection' ).find('.nfd-nextsteps-step-dismissed').parent().should('have.attr', 'id').and('contain', 's2task2'); + cy.get( '@s2t2' ).find('.nfd-nextsteps-button.nfd-nextsteps-button-redo').should('be.visible'); + cy.get( '@s2t2' ).find('.nfd-nextsteps-button.nfd-nextsteps-button-dismiss').should('exist'); + // A single done task should be visible + cy.get( '@secondSection' ).find('.nfd-nextsteps-step-container').last().should('have.attr', 'data-nfd-task-status', 'done'); + cy.get( '@secondSection' ).find('.nfd-nextsteps-step-done').should('have.length', 1); + cy.get( '@secondSection' ).find('.nfd-nextsteps-step-done').parent().should('have.attr', 'id').and('contain', 's2task3'); + cy.get( '@secondSection' ).find('.nfd-nextsteps-step-done').find('.nfd-nextsteps-button.nfd-nextsteps-button-redo').should('be.visible'); - // Task Dismissal - - // Get the initial count of new tasks and perform dismissal in the same chain - countTasksByStatus( 'new' ).then( ( initialCount ) => { - // Find a task with "new" status and dismiss it - getTaskByStatus( 'new' ).then( ( task ) => { - dismissTask( cy.wrap( task ) ); + // Section 3 should have 2 complete tasks + cy.get('.nfd-section[data-nfd-section-id="section3"]').as( 'thirdSection' ); + // Section 3 should have progress bar with 2/2 + cy.get( '@thirdSection' ).find('.nfd-progress-bar').scrollIntoView().should('exist'); + cy.get( '@thirdSection' ).find('span.nfd-progress-bar-label').should('have.text', '2/2'); + cy.get( '@thirdSection' ).find('.nfd-progress-bar-inner').should('have.attr', 'data-percent', '100'); + // Section 3 should have 2 complete tasks + cy.get( '@thirdSection' ).find('.nfd-nextsteps-step-container').should('have.length', 2); + cy.get( '@thirdSection' ).find('.nfd-nextsteps-step-container').first().should('have.attr', 'data-nfd-task-status', 'done'); + cy.get( '@thirdSection' ).find('.nfd-nextsteps-step-container').last().should('have.attr', 'data-nfd-task-status', 'done'); + + // Track 2 should have 1 section with 3 new tasks + cy.get('.nfd-section[data-nfd-section-id="section4"]').as( 'fourthSection' ); + // Track 2 should have progress bar with 0/3 + cy.get( '@fourthSection' ).find('.nfd-progress-bar').scrollIntoView().should('exist'); + cy.get( '@fourthSection' ).find('span.nfd-progress-bar-label').should('have.text', '0/3'); + cy.get( '@fourthSection' ).find('.nfd-progress-bar-inner').should('have.attr', 'data-percent', '0'); + // Section 4 should have 3 new tasks + cy.get( '@fourthSection' ).find('.nfd-nextsteps-step-container').should('have.length', 3); + cy.get( '@fourthSection' ).find('.nfd-nextsteps-step-container').first().should('have.attr', 'data-nfd-task-status', 'new'); + cy.get( '@fourthSection' ).find('.nfd-nextsteps-step-container').last().should('have.attr', 'data-nfd-task-status', 'new'); + }); + + it('marking a task complete updates task and progress bars', () => { + // Intercept the task status update API call + cy.intercept( + { + method: 'POST', + url: /newfold-next-steps(\/|%2F)v1(\/|%2F)steps(\/|%2F)status/, + }, + { + statusCode: 200, + body: true + } + ).as( 'updateTaskStatus' ); + cy.intercept( + { + method: 'POST', + url: /newfold-next-steps(\/|%2F)v1(\/|%2F)steps(\/|%2F)section(\/|%2F)open/, + }, + { + statusCode: 200, + body: true + } + ).as( 'updateSectionState' ); + + // Find progress bar in first section + cy.get('.nfd-section[data-nfd-section-id="section1"]').as( 'firstSection' ); + // Should have a progress bar + cy.get( '@firstSection' ).find('.nfd-progress-bar').should('exist'); + + // Validate initial progress values + cy.get( '@firstSection' ).find('.nfd-progress-bar-label').should('have.text', '0/1'); + cy.get( '@firstSection' ).find('.nfd-progress-bar-inner').should('have.attr', 'data-percent', '0'); + + // Task should be in new state + cy.get( '@firstSection' ).find('#s1task1').should('have.attr', 'data-nfd-task-status', 'new'); + + // Complete task + cy.get( '@firstSection' ).find('#s1task1.nfd-nextsteps-step-container .nfd-nextsteps-step-new .nfd-nextsteps-button-todo').click(); + // Wait for API call + cy.wait('@updateTaskStatus'); + + // Task should now be in done state + cy.get( '@firstSection' ).find('#s1task1').should('have.attr', 'data-nfd-task-status', 'done'); + + // Progress should update + cy.get( '@firstSection' ).find('.nfd-progress-bar-label').should('have.text', '1/1'); + cy.get( '@firstSection' ).find('.nfd-progress-bar-inner').should('have.attr', 'data-percent', '100'); - // Verify task was dismissed by checking the count decreased - countTasksByStatus( 'new' ).should( 'be.lessThan', initialCount ); - } ); - } ); - - } ); + // Celebrate should be visible + cy.get( '@firstSection' ).find('.nfd-section-celebrate').should('be.visible'); + cy.get( '@firstSection' ).find('.nfd-section-celebrate-text').should('have.text', 'All complete!'); + cy.get( '@firstSection' ).find('.nfd-nextsteps-section-close-button').should('be.visible'); - it( 'validates task links and button functionality', () => { - // Ensure Proper Visibility First - ensureTrackOpen( 0 ); - ensureSectionExpanded( 0, 0 ); - - // Task Links and Buttons - // Get a new task using robust helper - getTaskByStatus( 'new' ).as( 'newTask' ); - - // Check that the task title is clickable (if it has an href) - cy.get( '@newTask' ).find( '.nfd-nextsteps-step-title' ).parent().then( ( $parent ) => { - if ( $parent.is( 'a' ) ) { - cy.wrap( $parent ).should( 'have.attr', 'href' ); + // Close celebration closes section + cy.get( '@firstSection' ).should('have.attr', 'open'); + cy.get( '@firstSection' ).find('.nfd-section-complete').click(); + cy.wait( '@updateSectionState' ); + cy.get( '@firstSection' ).find('.nfd-section-complete').should('not.be.visible'); + cy.get( '@firstSection' ).find('.nfd-nextsteps-step-container').should('not.be.visible'); + cy.get( '@firstSection' ).should('not.have.attr', 'open'); + // Open the section + cy.get( '@firstSection' ).find('.nfd-section-header').click(); + cy.get( '@firstSection' ).should('have.attr', 'open'); + }); + + it('dismisses a task and verifies state change', () => { + // Intercept the task status update API call + cy.intercept( + { + method: 'POST', + url: /newfold-next-steps(\/|%2F)v1(\/|%2F)steps(\/|%2F)status/, + }, + { + statusCode: 200, + body: true } - } ); - - // Check that the go button/link exists and has proper href - cy.get( '@newTask' ).find( '.nfd-nextsteps-button-link' ).should( 'have.attr', 'href' ); - - // Check that buttons have proper event attributes - cy.get( '@newTask' ).find( '.nfd-nextsteps-button-todo' ).should( 'have.attr', 'data-nfd-event-key' ); - cy.get( '@newTask' ).find( '.nfd-nextsteps-button-dismiss' ).should( 'have.attr', 'data-nfd-event-key' ); - cy.get( '@newTask' ).find( '.nfd-nextsteps-button-link' ).should( 'have.attr', 'data-nfd-event-key' ); - } ); + ).as( 'updateTaskStatus' ); + + // Find and dismiss a task + cy.get( '.nfd-nextsteps-step-container[data-nfd-task-status="new"]' ).first().as( 'firstNewTask' ); + cy.get( '@firstNewTask' ).should('have.attr', 'id', 's1task1'); + cy.get( '@firstNewTask' ).find('.nfd-nextsteps-button-dismiss').should('exist'); + cy.get( '@firstNewTask' ).find('.nfd-nextsteps-button-dismiss').should('not.be.visible'); + // Click dismiss button - force due to cypress not being able to trigger hover state + cy.get( '@firstNewTask' ).find('.nfd-nextsteps-button-dismiss').click( { force: true } ); + // Wait for API call + cy.wait( '@updateTaskStatus' ); + // Task should now be dismissed + cy.get( '#s1task1' ).should('have.attr', 'data-nfd-task-status', 'dismissed'); + }); -} ); + it('handles track and section toggle functionality', () => { + // Intercept the track and section open + cy.intercept( + { + method: 'POST', + url: /newfold-next-steps(\/|%2F)v1(\/|%2F)steps(\/|%2F)track(\/|%2F)open/, + }, + { + statusCode: 200, + body: true + } + ).as( 'updateTrackState' ); + cy.intercept( + { + method: 'POST', + url: /newfold-next-steps(\/|%2F)v1(\/|%2F)steps(\/|%2F)section(\/|%2F)open/, + }, + { + statusCode: 200, + body: true + } + ).as( 'updateSectionState' ); + + // First track should be open by default + cy.get('.nfd-track').first().should('have.attr', 'open'); + // Close the track + cy.get('.nfd-track').first().find('.nfd-track-header').click(); + cy.wait('@updateTrackState'); + // Should be closed + cy.get('.nfd-track').first().should('not.have.attr', 'open'); + // Open the track again + cy.get('.nfd-track').first().find('.nfd-track-header').click(); + cy.wait('@updateTrackState'); + // Should be open + cy.get('.nfd-track').first().should('have.attr', 'open'); + + // Get first section and test toggle + cy.get('.nfd-section').first().then($section => { + const isOpen = $section.attr('open'); + + // Click section header to toggle + cy.wrap($section).find('.nfd-section-header').click(); + cy.wait('@updateSectionState'); + + // State should change + if (isOpen) { + cy.wrap($section).should('not.have.attr', 'open'); + } else { + cy.wrap($section).should('have.attr', 'open'); + } + }); + }); +}); \ No newline at end of file diff --git a/tests/cypress/wp-module-support/next-steps-helpers.cy.js b/tests/cypress/wp-module-support/next-steps-helpers.cy.js index d422fd7..158a8fa 100644 --- a/tests/cypress/wp-module-support/next-steps-helpers.cy.js +++ b/tests/cypress/wp-module-support/next-steps-helpers.cy.js @@ -395,12 +395,3 @@ export const toggleDismissedTasks = () => { .scrollIntoView() .click( { force: true } ); // Force click to handle potential overlapping elements }; - -/** - * Reset test data for clean test state - */ -export const resetNextStepsData = () => { - // Use cy.exec to run wp-cli commands through wp-env - cy.exec( 'npx wp-env run cli wp option delete nfd_next_steps', { failOnNonZeroExit: false } ); - -}; \ No newline at end of file diff --git a/tests/cypress/wp-module-support/utils.cy.js b/tests/cypress/wp-module-support/utils.cy.js index 2f86b35..7a0197c 100644 --- a/tests/cypress/wp-module-support/utils.cy.js +++ b/tests/cypress/wp-module-support/utils.cy.js @@ -1,3 +1,5 @@ +const testPlan = require( '../fixtures/test-plan.json' ); + /** * Loginto WordPress. */ @@ -28,3 +30,22 @@ export const wpCli = ( cmd, failOnNonZeroExit = true ) => { } } ); }; + +/** + * Set next steps test fixture to database option + */ +export const setTestNextStepsData = () => { + wpCli( + `option update nfd_next_steps '${ JSON.stringify( + testPlan + ) }' --format=json` + ); +}; + +/** + * Reset test data for clean test state + */ +export const resetNextStepsData = () => { + // Use cy.exec to run wp-cli commands through wp-env + wpCli( 'option delete nfd_next_steps', { failOnNonZeroExit: false } ); +};