PageSourceSearch

https://www.workforcewindsoressex.com/wp-content/plugins/skills-di…/js/wizard.module.min.js?ver=1774029459

js workforcewindsoressex.com collected 2026-10-09 21:55:00 UTC 10,819 bytes, 1 lines download raw bytes

1import{getContext as e,getElement as t,store as r}from"@wordpress/interactivity";var n={d:(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},s={};function o(){let e=document.querySelector("#e8-screenreader-announcer");return e||(e=function(){const e=document.createElement("div");e.id="e8-screenreader-announcer",e.className="screen-reader-text",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true");const t=document.body;return t?(t.insertBefore(e,t.firstChild),e):null}()),e}n.r(s),n.d(s,{disableBackButton:()=>z,disableContinueButton:()=>v,enableBackButton:()=>q,enableContinueButton:()=>N,getAnswerElement:()=>P,getCurrentStepNumber:()=>h,getNextStepNumber:()=>g,getPrevStepNumber:()=>y,hideLandingPage:()=>_,init:()=>b,preselectInputs:()=>k,selectAnswer:()=>B,setAnswer:()=>x,showLandingPage:()=>m,showResults:()=>S,showStep:()=>A,updateProgressBar:()=>C,updateURLParams:()=>$,validateStep:()=>M});let a=new URLSearchParams(window.location.search),i=()=>a=new URLSearchParams(window.location.search);window.location.origin,window.location.pathname;const u=new Proxy(a,{get:(e,t)=>e.get(t)});function l(e){return history.pushState(null,null,"?"+e.toString())}function d(e){return u[e]}function c(e,t){i(),a.set(e,t),l(a)}function p(e,t){const{questionArrays:r,questionCount:n,subCount:s}=function(e,t={}){const{defaultSubCount:r=7,subCounts:n}=t;if(null==e)throw new Error("answerMap is required");let s,o;const a=Array.isArray(n)?n.length:null;if(Array.isArray(e)){if(s=Array.from(e,e=>Array.isArray(e)?Array.from(e):[]),o=s.length,null!=a&&a>=0){for(;s.length<a;)s.push([]);o=a}}else{if("object"!=typeof e)throw new Error("answerMap must be an array (or proxy array) or an object keyed by question number");if(null!=a&&a>=0){s=[];for(let t=0;t<a;t++){const r=e[t];s.push(Array.isArray(r)?Array.from(r):[])}o=a}else s=Object.keys(e).map(e=>Number(e)).filter(e=>Number.isFinite(e)).sort((e,t)=>e-t).map(t=>{const r=e[t];return Array.isArray(r)?Array.from(r):[]}),o=s.length}let i=0;for(const e of s)i=Math.max(i,e.length);if(Array.isArray(n)&&n.length){const e=Math.max(0,...n.map(e=>Number.isFinite(Number(e))?Number(e):0));i=Math.max(i,e)}return 0===i&&(i=r),{questionArrays:s,questionCount:o,subCount:i}}(e,t);if(n>65535)throw new Error("Too many questions");if(s>255)throw new Error("Too many sub-questions per question");const o=function(e,t){var r,n;const s=[];for(let o=0;o<e.length;o++){const a=null!=(r=e[o])?r:[];for(let e=0;e<t;e++){const t=null!=(n=a[e])?n:0;if(0!==t&&1!==t&&2!==t&&3!==t)throw new Error(`Invalid value ${t} at questionIndex ${o}, subIndex ${e}. Must be 0–3.`);s.push(t)}}return s}(r,s),a=o.length,i=Math.ceil(a/4),u=new Uint8Array(i);for(let e=0;e<a;e++){const t=2*(3-e%4);u[Math.floor(e/4)]|=o[e]<<t}const l=new Uint8Array(3+u.length);return l[0]=n>>8&255,l[1]=255&n,l[2]=255&s,l.set(u,3),function(e){let t="";for(const r of e)t+=String.fromCharCode(r);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}(l)}function f(e,t={}){var r;const n=Array.isArray(t.subCounts)?t.subCounts.length:null;if("string"!=typeof e||""===e.trim()){if(null!=n){const e=[];for(let r=0;r<n;r++){const n=Number(t.subCounts[r]),s=Number.isFinite(n)&&n>=0?n:0;e.push(Array.from({length:s},()=>0))}return e}return[]}let s;try{s=function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/")+"===".slice((e.length+3)%4),r=atob(t),n=new Uint8Array(r.length);for(let e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n}(e)}catch(e){if(null!=n){const e=[];for(let r=0;r<n;r++){const n=Number(t.subCounts[r]),s=Number.isFinite(n)&&n>=0?n:0;e.push(Array.from({length:s},()=>0))}return e}return[]}if(s.length<3){if(null!=n){const e=[];for(let r=0;r<n;r++){const n=Number(t.subCounts[r]),s=Number.isFinite(n)&&n>=0?n:0;e.push(Array.from({length:s},()=>0))}return e}return[]}const o=s[0]<<8|s[1],a=s[2],i=s.slice(3),u=o*a,l=new Array(u);for(let e=0;e<u;e++){const t=2*(3-e%4),n=null!=(r=i[Math.floor(e/4)])?r:0;l[e]=n>>t&3}let d=function(e,t,r){var n;const s=[];let o=0;for(let a=0;a<e;a++){const e=[];for(let s=0;s<t;s++)e.push(null!=(n=r[o++])?n:0);s.push(e)}return s}(o,a,l);if(Array.isArray(t.subCounts)&&t.subCounts.length){const e=[];for(let r=0;r<t.subCounts.length;r++){const n=Number(t.subCounts[r]),s=Number.isFinite(n)&&n>=0?n:0,o=(Array.isArray(d[r])?d[r]:[]).slice(0,s);for(;o.length<s;)o.push(0);e.push(o)}d=e}return d}function w(){return r("sdt/wizard").state}function b(){var r,n;const s=w(),o=e(),{ref:a}=t();s.wizard_el=a,s.results_page_permalink=null==o?void 0:o.results_page_permalink,s.questionnaire_version=null==o?void 0:o.questionnaire_version,console.log("state.questionnaire_version",s.questionnaire_version),s.questionnaire_version&&c("sdt_v",s.questionnaire_version);const i=null!=(r=null==o?void 0:o.step)?r:"landing",u=Number(null!=(n=null==o?void 0:o.max_steps)?n:1);if(s.max_steps=Number.isFinite(u)&&u>0?u:1,s.step=Number.isFinite(i)&&i>=0?i:"landing",s.step>s.max_steps&&(s.step=s.max_steps),Array.isArray(null==o?void 0:o.sub_counts)&&o.sub_counts.length?s.subCountsByStep=o.sub_counts.map(e=>Number(e)||0):s.subCountsByStep=function(e,t){const r=[];for(let n=0;n<t;n++){const t=e.querySelector(`.sdt-wizard-step[data-step="${n}"]`),s=t?t.querySelectorAll("[data-question]").length:0;r.push(s)}return r}(s.wizard_el,s.max_steps),s.answers=[],d("sdt_a")){const e=d("sdt_a");s.answers=f(e,{subCounts:s.subCountsByStep}),k()}d("sdt_s")&&"landing"!==d("sdt_s")?A(s.step):m(),M()}function y(){const e=w();return 0===e.step?"landing":e.step-1}function g(){const e=w();return"landing"===e.step?0:e.step+1===e.max_steps?"results":e.step+1}function h(){return w().step}function m(){const e=w();e.wizard_el.querySelector(".sdt-wizard-landing-page").setAttribute("aria-hidden","false"),e.wizard_el.querySelector(".sdt-wizard-landing-page").hidden=!1,e.wizard_el.querySelector(".sdt-wizard-landing-page").focus(),e.wizard_el.querySelector(".sdt-wizard-header").setAttribute("aria-hidden","true"),e.wizard_el.querySelector(".sdt-wizard-header").hidden=!0,e.wizard_el.querySelector(".sdt-wizard-body").setAttribute("aria-hidden","true"),e.wizard_el.querySelector(".sdt-wizard-body").hidden=!0,e.wizard_el.querySelector(".sdt-wizard-footer").setAttribute("aria-hidden","true"),e.wizard_el.querySelector(".sdt-wizard-footer").hidden=!0,e.step="landing",c("sdt_s","landing")}function _(){const e=w();e.wizard_el.querySelector(".sdt-wizard-header").setAttribute("aria-hidden","false"),e.wizard_el.querySelector(".sdt-wizard-header").hidden=!1,e.wizard_el.querySelector(".sdt-wizard-body").setAttribute("aria-hidden","false"),e.wizard_el.querySelector(".sdt-wizard-body").hidden=!1,e.wizard_el.querySelector(".sdt-wizard-footer").setAttribute("aria-hidden","false"),e.wizard_el.querySelector(".sdt-wizard-footer").hidden=!1,e.wizard_el.querySelector(".sdt-wizard-header").focus(),e.wizard_el.querySelector(".sdt-wizard-landing-page").setAttribute("aria-hidden","true"),e.wizard_el.querySelector(".sdt-wizard-landing-page").hidden=!0}function A(e){if("landing"===e)return void m();const t=w(),r=Number(e);if(!Number.isFinite(r))return;if(r<0)return void(t.step=0);if(r>t.max_steps-1)return void(t.step=t.max_steps-1);t.step=r,_();const n=Array.from(t.wizard_el.querySelectorAll(`.sdt-wizard-step:not([data-step="${t.step}"])`));for(let e of n)e instanceof HTMLElement&&e.setAttribute("aria-current","");const s=t.wizard_el.querySelector(`.sdt-wizard-step[data-step="${t.step}"]`);
1s instanceof HTMLElement&&s.setAttribute("aria-current","step"),C(),c("sdt_s",t.step),s.querySelector('[data-wp-on--click="actions.selectAnswer"]').focus()}function S(){const e=w();e.results_page_permalink;const t=(i(),a=new URLSearchParams(window.location.search),a.toString()),r=`${e.results_page_permalink}?${t}`;var n;n=r,window.location.assign(n)}function z(){w().wizard_el.querySelector(".sdt-wizard-footer button.back").setAttribute("aria-disabled","true")}function q(){w().wizard_el.querySelector(".sdt-wizard-footer button.back").setAttribute("aria-disabled","false")}function v(){let e=w().wizard_el.querySelector(".sdt-wizard-footer button.continue");e.setAttribute("aria-disabled","true"),e.nextElementSibling.style="display: block;"}function N(){let e=w().wizard_el.querySelector(".sdt-wizard-footer button.continue");e.setAttribute("aria-disabled","false"),e.nextElementSibling.style="display: none;"}function C(){const e=w(),t=e.wizard_el.querySelector(".sdt-wizard-header .sdt-wizard-progress-bar");console.log(`Now showing step ${e.step+1} of ${e.max_steps}`),function(e){const t=o();t&&(t.textContent="",setTimeout(()=>{t.textContent=" ",setTimeout(()=>{t.textContent=String(null!=e?e:"")},100)},100))}(`Now showing step ${e.step+1} of ${e.max_steps}`);let r=parseFloat((e.step+1)/e.max_steps);r<0&&(r=0),r>1&&(r=1);const n=t.querySelector(".progress-bar-inner");n&&n.style.setProperty("--sdt-progress",100*r+"%")}function x(e,t,r){const n=w();let s=n.answers;for(Array.isArray(s)||(s=[]),Array.isArray(s[e])||(s[e]=[]);s[e].length<=t;)s[e].push(0);s[e][t]=r,n.answers=s,B(e,t,r),$()}function $(){const e=w();c("sdt_s",e.step);c("sdt_a",p(e.answers,{subCounts:e.subCountsByStep}))}function k(){const e=w().answers;for(let t in e)for(let r in e[t]){let n=e[t][r];0!==n&&P(t,r,n).setAttribute("aria-selected","true")}}function P(e,t,r){return w().wizard_el.querySelector(`[data-step="${e}"] [data-question="${t}"] [data-answer="${r}"]`)}function B(e,t,r){let n=P(e,t,r);n.setAttribute("aria-selected","true");let s=Array.from(n.parentNode.children).filter(e=>e!==n);for(let e of s)e.setAttribute("aria-selected","false")}function M(){const e=w();if("landing"===e.step)return!0;const t=e.step,r=e.wizard_el.querySelector(`[data-step="${t}"]`),n=Array.from(r.querySelectorAll("[data-question]"));let s=!0;for(let e of n){if(!1===(null!==e.querySelector('[aria-selected="true"]'))){s=!1;break}}!0===s?N():v()}const{callbacks:E}=r("sdt/wizard",{state:{step:0,max_steps:1,wizard_el:null,answers:null,results_page_permalink:"",get stepNumber(){return Number.isFinite(this.step)?String(this.step+1):"1"}},actions:{prevStep:function(e){const t=E.getPrevStepNumber();E.showStep(t)},nextStep:function(e){const t=E.getNextStepNumber();"results"===t?E.showResults():E.showStep(t)},selectAnswer:function(e){const t=e.target;if("BUTTON"!==t.tagName||!t.getAttribute("data-answer"))return;const r=parseInt(E.getCurrentStepNumber()),n=parseInt(t.closest("[data-question]").getAttribute("data-question")),s=parseInt(t.getAttribute("data-answer"));E.setAnswer(r,n,s)},validateStep:function(e){E.validateStep()}},callbacks:s});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.