@clickview/lite 0.34.0 → 0.34.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/scripts/1316-5123580c25-lite.chunk.js +1 -0
- package/dist/scripts/1517-fea7d3d8c1-lite.chunk.js +1 -0
- package/dist/scripts/{1526-11a5f5a145-lite.chunk.js → 1526-eda6832e12-lite.chunk.js} +1 -1
- package/dist/scripts/{1830-281b3deb19-lite.chunk.js → 1830-218438985f-lite.chunk.js} +1 -1
- package/dist/scripts/2235-02fa6854c8-lite.chunk.js +1 -0
- package/dist/scripts/2608-9d9eb7d113-lite.chunk.js +1 -0
- package/dist/scripts/2743-4f3172d7e8-lite.chunk.js +1 -0
- package/dist/scripts/3216-9caff8afdd-lite.chunk.js +1 -0
- package/dist/scripts/3654-96999f107e-lite.chunk.js +1 -0
- package/dist/scripts/{3667-9c94c5f35d-lite.chunk.js → 3667-43e348aada-lite.chunk.js} +2 -2
- package/dist/scripts/3728-8f767eeedd-lite.chunk.js +1 -0
- package/dist/scripts/3836-060f903a23-lite.chunk.js +1 -0
- package/dist/scripts/3865-7a58fd26f0-lite.chunk.js +1 -0
- package/dist/scripts/3966-e4ad0f453d-lite.chunk.js +1 -0
- package/dist/scripts/{4032-6ad1b16cd9-lite.chunk.js → 4032-ad48f98700-lite.chunk.js} +1 -1
- package/dist/scripts/4145-24137c0973-lite.chunk.js +1 -0
- package/dist/scripts/{4393-f97fc37b3f-lite.chunk.js → 4393-bb6bbe6eb1-lite.chunk.js} +1 -1
- package/dist/scripts/4441-37e8304c59-lite.chunk.js +2 -0
- package/dist/scripts/4612-cfc046e6e9-lite.chunk.js +1 -0
- package/dist/scripts/4617-918d5995e3-lite.chunk.js +1 -0
- package/dist/scripts/4657-48f545484f-lite.chunk.js +2 -0
- package/dist/scripts/{4690-3bfc632794-lite.chunk.js → 4690-ff95c6ea7d-lite.chunk.js} +1 -1
- package/dist/scripts/{4753-c2ff023429-lite.chunk.js → 4753-d8e01a7af9-lite.chunk.js} +1 -1
- package/dist/scripts/5041-8e820ed93c-lite.chunk.js +1 -0
- package/dist/scripts/{5143-5fcc666d2e-lite.chunk.js → 5143-56be0b0492-lite.chunk.js} +1 -1
- package/dist/scripts/5271-da40b4f079-lite.chunk.js +1 -1
- package/dist/scripts/5986-74ae15124b-lite.chunk.js +1 -0
- package/dist/scripts/615-0322d641a3-lite.chunk.js +1 -0
- package/dist/scripts/6330-5e2af8dcf4-lite.chunk.js +1 -0
- package/dist/scripts/{6572-94123a1aaf-lite.chunk.js → 6572-37b2e1d856-lite.chunk.js} +1 -1
- package/dist/scripts/{6609-df975fb60f-lite.chunk.js → 6609-54043ba8a7-lite.chunk.js} +1 -1
- package/dist/scripts/{6801-fb5064f563-lite.chunk.js → 6801-d3cf047fb8-lite.chunk.js} +1 -1
- package/dist/scripts/7052-d9ae572322-lite.chunk.js +2 -0
- package/dist/scripts/7178-a1115d825b-lite.chunk.js +1 -0
- package/dist/scripts/{7205-3c765f792f-lite.chunk.js → 7205-20ace43ff9-lite.chunk.js} +1 -1
- package/dist/scripts/7221-d71ae05428-lite.chunk.js +2 -0
- package/dist/scripts/{7288-394b622cce-lite.chunk.js → 7288-8fca167593-lite.chunk.js} +1 -1
- package/dist/scripts/{7422-91954804ee-lite.chunk.js → 7422-f3c089f530-lite.chunk.js} +2 -2
- package/dist/scripts/{7506-a623cf821d-lite.chunk.js → 7506-d91786f020-lite.chunk.js} +1 -1
- package/dist/scripts/754-2d58ce124d-lite.chunk.js +1 -0
- package/dist/scripts/{7540-6ad70b637c-lite.chunk.js → 7540-2694a96451-lite.chunk.js} +1 -1
- package/dist/scripts/{7555-218f62ec53-lite.chunk.js → 7555-3d6fa65b58-lite.chunk.js} +1 -1
- package/dist/scripts/{7703-de6cbcd44a-lite.chunk.js → 7703-b750159966-lite.chunk.js} +1 -1
- package/dist/scripts/8046-1b45fa8487-lite.chunk.js +1 -0
- package/dist/scripts/{8367-511fc0a70f-lite.chunk.js → 8367-87790190cb-lite.chunk.js} +1 -1
- package/dist/scripts/8564-42ab0647f0-lite.chunk.js +1 -0
- package/dist/scripts/9226-f59a8a5d53-lite.chunk.js +1 -0
- package/dist/scripts/9242-ca8229f486-lite.chunk.js +1 -0
- package/dist/scripts/{9869-b6523c4972-lite.chunk.js → 9869-b51a7e94fc-lite.chunk.js} +2 -2
- package/dist/scripts/bundle-99be3ef9a9.min.js +2 -0
- package/jest.config.js +11 -11
- package/package.json +61 -61
- package/typings/libs/CVEvents.d.ts +12 -12
- package/typings/libs/CVLanguages.d.ts +24 -24
- package/typings/libs/cloneDeep.d.ts +4 -4
- package/typings/libs/cookiesjs.d.ts +25 -25
- package/typings/libs/draft-convert.d.ts +3 -3
- package/typings/libs/google-api.d.ts +93 -93
- package/typings/libs/intersection-observer.d.ts +82 -82
- package/typings/libs/microsoft-teams.d.ts +2 -2
- package/typings/libs/react-table-config.d.ts +138 -138
- package/typings/libs/trackjs.d.ts +2 -2
- package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
- package/typings/utils/imports.d.ts +13 -13
- package/dist/scripts/1316-d38802f300-lite.chunk.js +0 -1
- package/dist/scripts/1517-61c14ac04c-lite.chunk.js +0 -1
- package/dist/scripts/2235-3f8588d749-lite.chunk.js +0 -1
- package/dist/scripts/2608-a613c9f4ec-lite.chunk.js +0 -1
- package/dist/scripts/2743-bf20f487a2-lite.chunk.js +0 -1
- package/dist/scripts/3216-acc193b366-lite.chunk.js +0 -1
- package/dist/scripts/3654-578a52f327-lite.chunk.js +0 -1
- package/dist/scripts/3728-5d9da27ef4-lite.chunk.js +0 -1
- package/dist/scripts/3836-19765a2696-lite.chunk.js +0 -1
- package/dist/scripts/3865-64c64edc8b-lite.chunk.js +0 -1
- package/dist/scripts/3966-ea5ccf719b-lite.chunk.js +0 -1
- package/dist/scripts/4145-880a35009e-lite.chunk.js +0 -1
- package/dist/scripts/4441-4c6b25ab5d-lite.chunk.js +0 -2
- package/dist/scripts/4612-6dc5801045-lite.chunk.js +0 -1
- package/dist/scripts/4617-4b290b7533-lite.chunk.js +0 -1
- package/dist/scripts/4657-fcd6ff63dd-lite.chunk.js +0 -2
- package/dist/scripts/5041-c671395800-lite.chunk.js +0 -1
- package/dist/scripts/5986-c2ac84fc87-lite.chunk.js +0 -1
- package/dist/scripts/615-5d93f99210-lite.chunk.js +0 -1
- package/dist/scripts/6330-dd799d318b-lite.chunk.js +0 -1
- package/dist/scripts/7052-6a2c889fad-lite.chunk.js +0 -2
- package/dist/scripts/7178-77d1cc145a-lite.chunk.js +0 -1
- package/dist/scripts/7221-93267ee8ca-lite.chunk.js +0 -2
- package/dist/scripts/754-c4f64fa21c-lite.chunk.js +0 -1
- package/dist/scripts/8046-83bcffb587-lite.chunk.js +0 -1
- package/dist/scripts/8564-34d58492f5-lite.chunk.js +0 -1
- package/dist/scripts/9226-0afd5cae01-lite.chunk.js +0 -1
- package/dist/scripts/9242-0fbe6b67eb-lite.chunk.js +0 -1
- package/dist/scripts/bundle-aa871fcdba.min.js +0 -2
- /package/dist/scripts/{2452-446607a894-lite.chunk.js → 2452-f96e548d17-lite.chunk.js} +0 -0
- /package/dist/scripts/{3667-9c94c5f35d-lite.chunk.js.LICENSE.txt → 3667-43e348aada-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4441-4c6b25ab5d-lite.chunk.js.LICENSE.txt → 4441-37e8304c59-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4657-fcd6ff63dd-lite.chunk.js.LICENSE.txt → 4657-48f545484f-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7052-6a2c889fad-lite.chunk.js.LICENSE.txt → 7052-d9ae572322-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7221-93267ee8ca-lite.chunk.js.LICENSE.txt → 7221-d71ae05428-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7422-91954804ee-lite.chunk.js.LICENSE.txt → 7422-f3c089f530-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9869-b6523c4972-lite.chunk.js.LICENSE.txt → 9869-b51a7e94fc-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-aa871fcdba.min.js.LICENSE.txt → bundle-99be3ef9a9.min.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 4657-48f545484f-lite.chunk.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4657],{42328:(t,e,r)=>{r.d(e,{w:()=>a});var n=r(32735);function o(){return n.createElement("svg",{viewBox:"0 0 24 24"},n.createElement("path",{d:"M11.959 10.641l4.402-4.296a.964.964 0 0 1 1.358 0 .951.951 0 0 1 0 1.35l-4.403 4.297 4.403 4.378a.951.951 0 0 1 0 1.35.964.964 0 0 1-1.358 0l-4.402-4.378-4.32 4.378a.964.964 0 0 1-1.358 0 .951.951 0 0 1 0-1.35l4.32-4.378-4.32-4.362a.951.951 0 0 1 0-1.35.964.964 0 0 1 1.358 0l4.32 4.361z"}))}var a=n.forwardRef((function(t,e){var r=t.onClickClear,a=t.showClearButton,i=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(t,["onClickClear","showClearButton"]);return n.createElement("div",{className:"position-relative"},n.createElement("input",Object.assign({},i,{ref:e,className:"".concat(t.className," ").concat("aYpO7")})),(!!t.value||a)&&n.createElement("span",{className:"".concat("ygMgF"," position-absolute cursor-pointer text-muted"),role:"button",onClick:r},n.createElement("div",{className:"d-inline-block svg-container md"},n.createElement(o,null))))}))},12594:(t,e,r)=>{r.d(e,{h:()=>Qr});var n=r(32735),o=r(57900),a=r(49985),i=r(74254),c=r(42328),l=["Teacher","Librarian","Curriculum Coordinator","Digital Technology Coordinator","IT","Head of Department","Head of Subject","Deputy Principal","Principal"],u=["Teacher","Librarian","Head of department","Subject lead","Curriculum coordinator","School leadership","District leadership","Academic coach","Instructional technology specialist","Consortium leadership","IT"],s={au:l,nz:l,uk:["Teacher","Librarian","IT/LRC","e-Learning/ICT Coordinator","Head of Key Stage","Head of Department","Subject Lead","Assistant Head Teacher","Deputy Head Teacher","Head Teacher"],us:u};function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return p(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var h="OTHER";function d(t){var e=t.error,r=t.onChange,o=t.countryCode,a=f(n.useState(""),2),i=a[0],c=a[1],l=f(n.useState(""),2),p=l[0],d=l[1],y=function(t){return s[t]||u}(o),m=i===h;return n.createElement(n.Fragment,null,n.createElement("div",{className:"mb-2"},n.createElement("select",{id:t.id,name:t.id,className:"form-select form-select-lg ".concat(i.length?"text-dark":"text-secondary"," ").concat(!!e&&"is-invalid"),value:i,placeholder:"Role",onChange:function(t){c(t.target.value),d(""),r(t.target.value===h?"":t.target.value)}},n.createElement("option",{value:"",disabled:!0,className:"text-muted"},"What do you do?"),y.map((function(t,e){return n.createElement("option",{value:t,className:"text-dark",key:e},t)})),n.createElement("option",{value:h,className:"text-dark"},"Other")),!!e&&!m&&n.createElement("div",{className:"invalid-feedback"},e)),m&&n.createElement("div",{className:"mb-3"},n.createElement("input",{className:"form-control form-control-lg ".concat(!!e&&"is-invalid"),type:"text",value:p,placeholder:"What do you do?",autoFocus:!0,onChange:function(t){d(t.target.value),r(t.target.value)}}),!!e&&n.createElement("div",{className:"invalid-feedback"},e)))}var y,m,v,g=r(86664),b=r(2102);function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function S(t){var e,r,o,a,i,l,u,s,f,p=(s=n.useState({fullname:"",jobTitle:"",phone:""}),f=2,function(t){if(Array.isArray(t))return t}(s)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(s,f)||function(t,e){if(t){if("string"==typeof t)return E(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(t,e):void 0}}(s,f)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),h=p[0],y=p[1];function m(t,e){y((function(r){return Object.assign(Object.assign({},r),function(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==w(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===w(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},t,e))}))}return n.createElement("div",{className:"text-center"},n.createElement("h1",{className:"text-center h4"},"A little more about you"),n.createElement("p",null,"Please enter your details."),n.createElement("form",{onSubmit:function(e){e.preventDefault(),t.handleSubmitForm(h)}},n.createElement("div",{className:"form-group text-start"},n.createElement("label",{className:"d-block fw-bold mb-1",htmlFor:"fullname-input"},"Full name"),n.createElement(c.w,{value:h.fullname,onChange:function(e){e.preventDefault(),m("fullname",e.target.value),t.removeErrorForKey("fullname"),t.removeErrorForKey("submission")},name:"fullname-input",id:"fullname-input",type:"text",className:"form-control form-control-lg ".concat((null===(e=t.errors.fullname)||void 0===e?void 0:e.length)?"is-invalid":""),placeholder:"Enter your name",onClickClear:function(){m("fullname",""),t.removeErrorForKey("fullname"),t.removeErrorForKey("submission")},autoFocus:!0}),t.errors.fullname&&n.createElement("div",{className:"invalid-feedback d-block"},t.errors.fullname)),n.createElement("div",{className:"form-group text-start"},n.createElement("label",{className:"d-block fw-bold mb-1",htmlFor:"phone-input"},"Contact number"),n.createElement(c.w,{value:h.phone,onChange:function(e){e.preventDefault(),m("phone",e.target.value.trim()),t.removeErrorForKey("phone"),t.removeErrorForKey("submission")},name:"phone-input",id:"phone-input",type:"tel",className:"form-control form-control-lg ".concat((null===(r=t.errors.phone)||void 0===r?void 0:r.length)?"is-invalid":""),placeholder:"Enter your phone number",onClickClear:function(){m("phone",""),t.removeErrorForKey("phone"),t.removeErrorForKey("submission")}}),t.errors.phone&&n.createElement("div",{className:"invalid-feedback d-block"},t.errors.phone)),n.createElement("div",{className:"form-group text-start"},n.createElement("label",{className:"d-block fw-bold mb-1",htmlFor:"jobTitle-select"},"Job title"),n.createElement(d,{id:"jobTitle-select",countryCode:g.I.getCountryCode(t.country),onChange:function(e){m("jobTitle",e),t.removeErrorForKey("jobTitle"),t.removeErrorForKey("submission")},error:null===(o=t.errors)||void 0===o?void 0:o.jobTitle})),!!(null===(a=t.errors)||void 0===a?void 0:a.submission)&&n.createElement("div",{className:"form-group invalid-feedback d-block"},t.errors.submission),n.createElement("div",{className:"form-group mb-1"},n.createElement(b.m,{className:"btn-lg w-100",variant:"dark",onClick:function(){return t.handleSubmitForm(h)},showSpinner:t.loading,disabled:t.loading||(i=h.fullname,l=h.jobTitle,u=h.phone,!(i.length&&l.length&&u.length&&!Object.keys(t.errors).length))},"Submit"))))}!function(t){t.Unavailable="unavailable",t.Expired="expired",t.Active="active",t.NotRequired="not-required",t.Available="available",t.Unsupported="unsupported",t.UserAutoJoinAllowed="user-auto-join-allowed",t.UserJoinApprovalRequired="user-join-approval-required"}(y||(y={})),function(t){t.InvalidEmail="invalid-email"}(m||(m={})),function(t){t.Staff="staff",t.Learner="learner"}(v||(v={}));var x=r(63093),L=r(33003),j=r.n(L),k=r(84789);function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function O(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return N(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?N(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function A(){A=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(T([])));S&&S!==r&&n.call(S,i)&&(w=S);var x=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==C(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=O(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(C(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},L(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function P(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==C(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===C(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var I={k12:"Primary & Secondary"},T={england:"ENG",scotland:"SCT",wales:"WLS","northern ireland":"NIR"},_=P(P({},k.X.Auth,"auth.web"),k.X.Lite,"lite.web"),U={getClient:function(t){var e,r,n,o,a,i;return n=this,o=void 0,a=void 0,i=A().mark((function n(){var o,a,i,c,l,u;return A().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=t.brazeConfig,a=t.geoLocation,i=t.version,c=o[g.I.getInstanceRegion(null==a?void 0:a.countryCode)],l=_[t.productName],u=(0,x.getInstance)({baseUrl:c.url,apiKey:c.apiKey,productVersion:i,productName:l,enableLogging:!1,automaticallyShowInAppMessages:!1}),(null===(e=t.geoLocation)||void 0===e?void 0:e.countryCode)&&u.setUserCountry(null===(r=t.geoLocation)||void 0===r?void 0:r.countryCode),n.abrupt("return",u);case 6:case"end":return n.stop()}}),n)})),new(a||(a=Promise))((function(t,e){function r(t){try{l(i.next(t))}catch(t){e(t)}}function c(t){try{l(i.throw(t))}catch(t){e(t)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof a?n:new a((function(t){t(n)}))).then(r,c)}l((i=i.apply(n,o||[])).next())}))},hashedEmail:function(t){var e=t.trim().toLowerCase();return j().hash(e)},removeEmptyKeys:function(t){if(Array.isArray(t))return t;var e=Object.assign({},t);return Object.entries(e).filter((function(t){var e=O(t,2)[1];return null!=e&&!("string"==typeof e&&!e.length)})).reduce((function(t,e){var r=O(e,2),n=r[0],o=r[1];return Object.assign(Object.assign({},t),P({},n,o===Object(o)?U.removeEmptyKeys(o):o))}),{})},getEventTopic:function(){return"Free Trial Request"},getCustomEventType:function(){return x.ProductFormEvent.ProductTrailRequested},getProductFormEventType:function(){return"product_form_submission"},getSchoolType:function(t){if(t){var e=t.toLowerCase();if(!["unknown","other"].includes(e))return I[e]||t}},parseProvince:function(t){return t.length?T[t.toLowerCase()]||t:""}};function F(t){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F(t)}function G(){G=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==r&&n.call(S,i)&&(w=S);var x=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==F(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(F(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},L(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function D(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return R(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var M=255,K=/\$+[\w\s]?/,Y=/^\+?\d{4,255}$/;function z(t){if(!t)return{firstName:"",surname:""};var e=t.split(" ").filter((function(t){return t.length}));return{firstName:e.shift(),surname:e.join(" ")}}var q=r(65858),V=r(45157),B=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var n,o,a;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(o=n;0!=o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(a=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,a[o]))return!1;for(o=n;0!=o--;){var i=a[o];if(!t(e[i],r[i]))return!1}return!0}return e!=e&&r!=r};const $="__googleMapsScriptId";var H;!function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"}(H||(H={}));class Z{constructor({apiKey:t,authReferrerPolicy:e,channel:r,client:n,id:o=$,language:a,libraries:i=[],mapIds:c,nonce:l,region:u,retries:s=3,url:f="https://maps.googleapis.com/maps/api/js",version:p}){if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=t,this.authReferrerPolicy=e,this.channel=r,this.client=n,this.id=o||$,this.language=a,this.libraries=i,this.mapIds=c,this.nonce=l,this.region=u,this.retries=s,this.url=f,this.version=p,Z.instance){if(!B(this.options,Z.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Z.instance.options)}`);return Z.instance}Z.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?H.FAILURE:this.done?H.SUCCESS:this.loading?H.LOADING:H.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let t=this.url;return t+=`?callback=${this.CALLBACK}`,this.apiKey&&(t+=`&key=${this.apiKey}`),this.channel&&(t+=`&channel=${this.channel}`),this.client&&(t+=`&client=${this.client}`),this.libraries.length>0&&(t+=`&libraries=${this.libraries.join(",")}`),this.language&&(t+=`&language=${this.language}`),this.region&&(t+=`®ion=${this.region}`),this.version&&(t+=`&v=${this.version}`),this.mapIds&&(t+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(t+=`&auth_referrer_policy=${this.authReferrerPolicy}`),t}deleteScript(){const t=document.getElementById(this.id);t&&t.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((t,e)=>{this.loadCallback((r=>{r?e(r.error):t(window.google)}))}))}loadCallback(t){this.callbacks.push(t),this.execute()}setScript(){if(document.getElementById(this.id))return void this.callback();const t=this.createUrl(),e=document.createElement("script");e.id=this.id,e.type="text/javascript",e.src=t,e.onerror=this.loadErrorCallback.bind(this),e.defer=!0,e.async=!0,this.nonce&&(e.nonce=this.nonce),document.head.appendChild(e)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(t){if(this.errors.push(t),this.errors.length<=this.retries){const t=this.errors.length*Math.pow(2,this.errors.length);console.log(`Failed to load Google Maps script, retrying in ${t} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),t)}else this.onerrorEvent=t,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((t=>{t(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}}function J(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return W(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function X(t){return new Z({apiKey:t.apiKey,version:"weekly",libraries:t.libraries,retries:3})}function Q(t){var e={apiKey:t.apiKey,libraries:t.libraries||["places"]},r=J(n.useState(!1),2),o=r[0],a=r[1],i=J(n.useState(X(e)),2),c=i[0],l=i[1];function u(t,r){c?c.loadCallback((function(e){if(e)return a(!1),void(r&&r(e));a(!0),t&&t()})):l(X(e))}return n.useEffect((function(){u()}),[]),{loader:c,scriptLoaded:o,onGoogleApiReady:u}}function tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function et(t){var e,r,o=Q({apiKey:t.googleApiKey}).scriptLoaded,a=(e=n.useState(),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return tt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tt(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=a[0],c=a[1];return n.useEffect((function(){o&&c(new google.maps.places.AutocompleteService)}),[o]),i}function rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var nt="us",ot="country:placeholder:text";function at(t){var e,r,a=t.apiKey,i=t.geoLocation,c=t.makeRequest,l=void 0===c||c,u=t.template,s=void 0===u?"E.g. [placeholder]":u,f=t.templateKey,p=void 0===f?"[placeholder]":f,h=et({googleApiKey:a}),d=n.useState((function(){return function(t){var e=g.I.getLocalizedLocalityPlaceholderText(null==t?void 0:t.countryCode);return e||(o.SG.cacheGet("".concat(ot,":").concat(null==t?void 0:t.countryCode))||void 0)}(i)})),y=(r=2,function(t){if(Array.isArray(t))return t}(e=d)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return rt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rt(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=y[0],v=y[1];function b(t,e){o.SG.cacheSet("".concat(ot,":").concat(e),t,86400),v(t)}return n.useEffect((function(){if(!m&&h&&l){var t=(null==i?void 0:i.countryCode)||nt,e={input:String.fromCharCode(96+V.Y.getRandomInt(26)),types:["(cities)"],region:t,componentRestrictions:{country:t}};h.getPlacePredictions(e,(function(e,r){return function(t,e,r){if(e===google.maps.places.PlacesServiceStatus.OK&&t){var n=t[V.Y.getRandomInt(t.length)].description;b(s.replace(p,n),r)}else b(g.I.getLocalizedLocalityPlaceholderText(nt),r)}(e,r,t)}))}}),[m,h,i,l]),m}function it(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ct(t){var e,r,o=(e=n.useState(0),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return it(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?it(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],i=o[1],c=n.useRef();function l(){var t;c.current&&(null===(t=c.current.children[a-1])||void 0===t||t.scrollIntoView({block:"center"}))}return{selectedIndex:a,onKeyDown:function(e){if("ArrowDown"===e.code){e.stopPropagation(),e.preventDefault();var r=a+1;return r>t.itemCount&&(r=1),i(r),void l()}if("ArrowUp"===e.code){e.stopPropagation(),e.preventDefault();var n=a-1;return n<=0&&(n=t.itemCount),i(n),void l()}if("Enter"===e.code&&a>0)return e.stopPropagation(),e.preventDefault(),void t.onSelected(a-1);i(0)},containerRef:c}}function lt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ut(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ut(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var st=function(t){var e,r,n,o,a,i=t.formatted_address,c=lt(t.address_components);try{for(c.s();!(a=c.n()).done;){var l,u=a.value,s=lt(u.types);try{for(s.s();!(l=s.n()).done;){var f=l.value;"locality"===f&&(e=u.short_name),"administrative_area_level_1"===f&&(r=u.short_name),"postal_code"===f&&(o=u.short_name),"country"===f&&(n=u.short_name)}}catch(t){s.e(t)}finally{s.f()}}}catch(t){c.e(t)}finally{c.f()}return{locality:i,country:n,postalCode:o,city:e,province:r}};function ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var pt={1:"geocoderPermissionDenied",2:"geocoderUnavailable",3:"geocoderTimeout"},ht=r(28329);function dt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var yt=r(11607);function mt(){return n.createElement("svg",{viewBox:"0 0 24 24"},n.createElement("path",{d:"m12.00559,20.40189c4.60881,0 8.37242,-3.78424 8.37242,-8.40189c0,-4.61764 -3.76361,-8.40187 -8.37242,-8.40187c-4.62002,0 -8.38365,3.78422 -8.38365,8.40187c0,4.61765 3.76364,8.40189 8.38365,8.40189zm0,-1.65557c-3.75235,0 -6.67085,-2.96208 -6.67085,-6.74632c0,-3.7842 2.91851,-6.74625 6.67085,-6.74625c3.74105,0 6.67084,2.96206 6.67084,6.74625c0,3.78424 -2.92978,6.74632 -6.67084,6.74632zm-10.14151,-6.02552l6.01731,0c0.40566,0 0.72118,-0.31536 0.72118,-0.7208c0,-0.40544 -0.31552,-0.7208 -0.72118,-0.7208l-6.01731,0c-0.40566,0 -0.72117,0.31536 -0.72117,0.7208c0,0.40544 0.31551,0.7208 0.72118,0.7208l-0.00001,0zm14.25442,0l6.0174,0c0.40565,0 0.72118,-0.31536 0.72118,-0.7208c0,-0.40544 -0.31553,-0.7208 -0.72118,-0.7208l-6.0174,0c-0.40565,0 -0.72118,0.31536 -0.72118,0.7208c0,0.40544 0.31553,0.7208 0.72118,0.7208zm-4.12417,-4.1221c0.40566,0 0.72118,-0.31534 0.72118,-0.70952l0,-6.02547c0,-0.40544 -0.31552,-0.7208 -0.72118,-0.7208c-0.3944,0 -0.7099,0.31536 -0.7099,0.7208l0,6.02547c0,0.39418 0.31551,0.70952 0.7099,0.70952zm0,14.25838c0.40566,0 0.72118,-0.3154 0.72118,-0.72077l0,-6.02541c0,-0.39425 -0.31552,-0.70965 -0.72118,-0.70965c-0.3944,0 -0.7099,0.3154 -0.7099,0.70965l0,6.02541c0,0.40538 0.31551,0.72077 0.7099,0.72077z"}))}const vt={baseText:"KL3Q_",inputFocused:"I6wQy",input:"ChY5L",suggestionContainer:"Y78ea",noBottomBorder:"IeYUw",localitySuggestion:"P3aHR",suggestionItem:"magL7",suggestionLoading:"W7rH_",noSuggestion:"XXSnS",selected:"snnHR"};function gt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return bt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function wt(t){var e=t.predictions,r=t.getPlaceInfo,o=t.selectedIndex;return n.createElement(n.Fragment,null,e.map((function(t,e){return n.createElement(yt.L,{className:"".concat(vt.suggestionItem," ").concat(o-1===e?vt.selected:""),key:t.place_id,onClick:function(){return r(t)}},t.description)})))}function Et(t){var e,r,o,a,i,l,u=n.useRef(),s=gt(n.useState((null===(e=t.data)||void 0===e?void 0:e.schoolLocality)||""),2),f=s[0],p=s[1],h=gt(n.useState(!1),2),d=h[0],y=h[1],m=at({apiKey:t.googleMapsApiKey,geoLocation:t.geoLocation}),v=function(t){var e,r,o=t.search,a=t.makePredicition,i=t.geoLocation,c=et({googleApiKey:t.apiKey}),l=(0,ht.N)(o,300),u=(e=n.useState(),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return dt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dt(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=u[0],f=u[1];function p(t,e){e===google.maps.places.PlacesServiceStatus.OK&&t?f(t):f(void 0)}return n.useEffect((function(){if(c)if(0!==(null==l?void 0:l.length)&&a){var t=(null==i?void 0:i.countryCode)||"us";c.getPlacePredictions({input:l,componentRestrictions:(null==i?void 0:i.isFallback)?void 0:{country:t},region:t,types:["locality","sublocality","postal_code"]},p)}else f(void 0)}),[l,a,c]),{localityPredicitions:s,getPlaceInfo:function(t,e,r){new google.maps.places.PlacesService(e.current).getDetails({placeId:t.place_id,fields:["geometry","address_components","formatted_address"],region:i.countryCode},(function(t,e){if(e===google.maps.places.PlacesServiceStatus.OK){var n=t.geometry.location.lng(),o=t.geometry.location.lat(),a=st(t),i=a.locality,c=a.country,l=a.postalCode,u=a.city,s=a.province;r({longitude:n,latitude:o,locality:i,country:c,city:u,postalCode:l,province:s})}}))}}}({search:f,makePredicition:d,geoLocation:t.geoLocation,apiKey:t.googleMapsApiKey}),g=v.localityPredicitions,b=v.getPlaceInfo,w=function(t){var e,r,o=(e=n.useState({}),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return ft(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ft(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],i=o[1],c=Q(t).onGoogleApiReady;function l(t){var e=t.coords,r=e.latitude,n=e.longitude,o=new google.maps.LatLng(r,n);(new google.maps.Geocoder).geocode({location:o},(function(t,e){if(e===google.maps.GeocoderStatus.OK){var o=t.find((function(t){return t.types.includes("locality")||t.types.includes("administrative_area_level_2")})),a=st(o);i(Object.assign(Object.assign({},a),{longitude:n,latitude:r}))}}))}function u(e){var r=pt[e.code];r||(r="geocoderUnknown"),t.onPositionError("We are unable to access your location. Please try again later.")}return{placeDetails:a,onClickGetCurrentLocation:function(){c((function(){window.navigator.geolocation.getCurrentPosition(l,u)}))}}}({apiKey:t.googleMapsApiKey,onPositionError:function(t){y(!0),A(t)}}),E=w.placeDetails,S=w.onClickGetCurrentLocation,x=window.navigator.geolocation?1:0,L=ct({onSelected:function(t){if(g)if(t!==g.length){var e=g[t];e&&T(e)}else _()},itemCount:null!==(r=(null==g?void 0:g.length)+x)&&void 0!==r?r:0}),j=L.selectedIndex,k=L.onKeyDown,C=L.containerRef,O=gt(n.useState(),2),N=O[0],A=O[1];function P(e){var r,n,o;N&&A(void 0),d||y(!0),((null===(r=t.data)||void 0===r?void 0:r.longitude)||(null===(n=t.data)||void 0===n?void 0:n.latitude)||(null===(o=t.data)||void 0===o?void 0:o.schoolLocality))&&t.clearStepGroupData(),p(e)}function I(e){var r=e.longitude,n=e.latitude,o=e.locality,a=e.country,i=e.city,c=e.province;r&&t.setDataProperty("longitude",r),n&&t.setDataProperty("latitude",n),a&&t.setDataProperty("country",a),i&&t.setDataProperty("city",i),c&&t.setDataProperty("province",c),o&&function(e){t.setDataProperty("schoolLocality",e),p(e)}(o)}function T(t){d&&y(!1),b(t,u,I)}function _(e){null==e||e.preventDefault(),y(!1),S(),t.logUserAction({},{actionType:q.Vw.Click,descriptor:q.Yu.UseMyLocation})}n.useEffect((function(){I(E)}),[E]);var U,F=(null==g?void 0:g.length)&&!(null===(a=null===(o=t.data)||void 0===o?void 0:o.schoolLocality)||void 0===a?void 0:a.length),G=window.navigator.geolocation&&!(null===(l=null===(i=t.data)||void 0===i?void 0:i.schoolLocality)||void 0===l?void 0:l.length),D=t.labelClassName||"d-block text-center mb-3 fw-normal ".concat(vt.baseText);return n.createElement("div",{className:"form-group position-relative"},n.createElement("label",{className:D,htmlFor:"locality-input"},"Postcode or suburb:"),n.createElement(c.w,{type:"text",value:f,onChange:function(t){return P(t.currentTarget.value)},id:"locality-input",className:(U="form-control form-control-lg",F?"".concat(U," ").concat(vt.inputFocused):"".concat(U," ").concat(vt.input)),ref:u,autoComplete:"off",placeholder:m||"Loading...",disabled:t.disabled||!m,autoFocus:null==t?void 0:t.autoFocus,onClickClear:function(){P(""),u.current.focus()},onKeyDown:k}),n.createElement("div",{className:"position-absolute w-100"},!!F&&n.createElement("div",{className:"".concat(vt.suggestionContainer," ").concat(vt.localitySuggestion),ref:C},n.createElement(wt,{predictions:g,getPlaceInfo:T,selectedIndex:j}),window.navigator.geolocation&&n.createElement(yt.L,{className:"".concat(vt.suggestionItem," px-1 ").concat(j-1===g.length?vt.selected:""),onClick:_},n.createElement("div",{className:"btn btn-link info-link btn-with-icon bg-transparent py-0 pe-1"},n.createElement(mt,null),"Use my current location"))),G&&!F&&n.createElement("div",{className:"d-flex"},n.createElement("button",{onClick:_,className:"btn btn-link info-link bg-white btn-with-icon"},n.createElement(mt,null),"Use my current location")),!!N&&n.createElement("div",{className:"text-danger p-2"},N)))}var St=r(99940);function xt(t){return xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xt(t)}function Lt(t){var e="function"==typeof Map?new Map:void 0;return Lt=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return jt(t,arguments,Ot(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ct(r,t)},Lt(t)}function jt(t,e,r){return jt=kt()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&Ct(o,r.prototype),o},jt.apply(null,arguments)}function kt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Ct(t,e){return Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ct(t,e)}function Ot(t){return Ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ot(t)}var Nt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ct(t,e)}(a,t);var e,r,n,o=(r=a,n=kt(),function(){var t,e=Ot(r);if(n){var o=Ot(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===xt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function a(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Error";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=o.call(this,r)).body=t,e}return e=a,Object.defineProperty(e,"prototype",{writable:!1}),e}(Lt(Error));function At(t){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(t)}function Pt(){Pt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==r&&n.call(S,i)&&(w=S);var x=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==At(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(At(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},L(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}var It=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{l(n.next(t))}catch(t){a(t)}}function c(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}l((n=n.apply(t,e||[])).next())}))};function Tt(t){var e={method:St.k.GET,headers:{"Content-type":"application/json"}};t.method&&(e=Object.assign(Object.assign({},e),{method:t.method})),t.init&&(e=Object.assign(Object.assign({},e),t.init));var r,n,o,a=t.url;return e.method===St.k.GET&&t.data?(r=a,n=t.data,o=r,Object.keys(n).forEach((function(t,e){n[t]&&(o+=0===e?"?":"&",o+="".concat(t,"=").concat(encodeURIComponent(n[t])))})),a=o):t.data&&(e=Object.assign(Object.assign({},e),{body:JSON.stringify(t.data)})),{init:e,url:a}}var _t={asyncFetch:function(t){return It(this,void 0,void 0,Pt().mark((function e(){var r,n,o;return Pt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Tt(t),e.next=3,fetch(r.url,r.init);case 3:if((n=e.sent).ok){e.next=9;break}return e.next=7,n.json();case 7:throw o=e.sent,new Nt(o);case 9:if(204!==n.status){e.next=11;break}return e.abrupt("return");case 11:return e.next=13,n.json();case 13:return e.abrupt("return",e.sent);case 14:case"end":return e.stop()}}),e)})))},asyncFetchPlain:function(t){return It(this,void 0,void 0,Pt().mark((function e(){var r,n;return Pt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Tt(t),e.next=3,fetch(r.url,r.init);case 3:if((n=e.sent).ok){e.next=6;break}return e.abrupt("return");case 6:return e.next=8,n.text();case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)})))},fetch:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=Tt(t);return fetch(e.url,e.init).then((function(t){if(204!==t.status)return t.json()})).then((function(e){return t.success&&t.success(e),e})).catch((function(e){return t.error&&t.error(),e})).finally((function(){t.always&&t.always()}))}))};function Ut(t){return Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ut(t)}function Ft(){Ft=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==r&&n.call(S,i)&&(w=S);var x=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Ut(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(Ut(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},L(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}var Gt,Dt={search:function(t,e,r,n,o){var a={longitude:e.longitude,latitude:e.latitude};e.query&&(a.query=e.query),_t.fetch({url:t.searchProspect,data:a,success:r,error:n,always:o})},create:function(t,e){return r=this,n=void 0,o=void 0,a=Ft().mark((function r(){return Ft().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",_t.asyncFetch({url:t.createProspect,method:St.k.POST,data:e}));case 1:case"end":return r.stop()}}),r)})),new(o||(o=Promise))((function(t,e){function i(t){try{l(a.next(t))}catch(t){e(t)}}function c(t){try{l(a.throw(t))}catch(t){e(t)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(i,c)}l((a=a.apply(r,n||[])).next())}));var r,n,o,a},getLookups:function(t,e){return _t.asyncFetch({url:t.prospectLookups(e)})}},Rt=r(97395),Mt=function(t,e){if(t.productName!==k.X.Lite)return Promise.reject();var r={email:e.email};return _t.asyncFetch({url:t.userStatus,data:r})},Kt=function(t,e,r,n,o){var a=t.prospectStatus(e.prospectId);a=Rt._.urlBuilder(a,{email:e.email}),_t.fetch({url:a,success:r,error:n,always:o})},Yt=function(t,e){var r={prospectId:e.prospectId,firstName:"Trial",surname:"User",email:e.email,userType:e.userType,accessPolicy:e.accessPolicy,appLink:null==e?void 0:e.appLink};return _t.asyncFetch({url:t.createTrial,method:St.k.POST,data:r})},zt=function(t,e,r){if(t.productName!==k.X.Lite)return Promise.reject();var n={email:r.email,appLink:null==r?void 0:r.appLink};return _t.asyncFetch({url:t.resendTrialEmail(e),method:St.k.POST,data:n})},qt=function(t,e){var r=t.productName===k.X.Auth?t.joinRequest:t.joinRequest(e.customerId),n=t.productName===k.X.Auth?e:{email:e.email};return _t.asyncFetch({url:r,method:St.k.POST,data:n})},Vt=function(t,e){return t.productName!==k.X.Lite?Promise.reject():_t.asyncFetch({url:t.autoJoin,method:St.k.POST,data:e})};!function(t){t.FourteenDays="trial_14_v1",t.Freemium="freemium_v1"}(Gt||(Gt={}));var Bt=function(t){return g.I.isCountryCodeUS(t)||g.I.isCountryCodeUK(t)?Gt.Freemium:Gt.FourteenDays},$t=r(99504);function Ht(t){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(t)}function Zt(){Zt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==r&&n.call(S,i)&&(w=S);var x=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Ht(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(Ht(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},L(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Jt(t){var e=$t.F.getUtmParameters(),r={prospect_id:null==t?void 0:t.prospectId,email:null==t?void 0:t.email,organisation_sub_type:U.getSchoolType(null==t?void 0:t.schoolType),account_name:null==t?void 0:t.schoolName,account_post_code:null==t?void 0:t.schoolPostCode,account_country:null==t?void 0:t.country,province:null==t?void 0:t.province,sync_to_crm:!0,form_type:null==t?void 0:t.form_type,utms:e};return U.removeEmptyKeys(r)}var Wt,Xt={submitFormEvent:function(t,e,r,n){return o=this,a=void 0,i=void 0,c=Zt().mark((function o(){var a,i;return Zt().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,U.getClient({brazeConfig:t.brazeConfig,productName:t.productName,geoLocation:t.geoLocation,version:t.version});case 2:a=o.sent,i=Jt(Object.assign(Object.assign({},r),{form_type:e})),a.openSession(),a.setUser(U.hashedEmail(null==r?void 0:r.email)),a.logEvent({type:U.getProductFormEventType(),data:i}),a.sendData(n);case 8:case"end":return o.stop()}}),o)})),new(i||(i=Promise))((function(t,e){function r(t){try{l(c.next(t))}catch(t){e(t)}}function n(t){try{l(c.throw(t))}catch(t){e(t)}}function l(e){var o;e.done?t(e.value):(o=e.value,o instanceof i?o:new i((function(t){t(o)}))).then(r,n)}l((c=c.apply(o,a||[])).next())}));var o,a,i,c}},Qt=["Primary","Secondary","K12","Special","TAFE","University"],te=["Elementary","Middle School","High School","College","Other"],ee={au:Qt,nz:Qt,uk:["Primary","Secondary","Primary & Secondary","Special","Sixth Form College","FE College","University","Other"],us:te};function re(t){return re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},re(t)}function ne(){ne=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==r&&n.call(S,i)&&(w=S);var x=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==re(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(re(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},L(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function oe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ae(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ae(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ae(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}!function(t){t.Published="Published",t.Draft="Draft"}(Wt||(Wt={}));var ie=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{l(n.next(t))}catch(t){a(t)}}function c(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}l((n=n.apply(t,e||[])).next())}))};function ce(t,e){return e?"".concat(t," ").concat(e):t}var le=function(t){return n.createElement("h1",{className:ce("text-center mb-2 h4",t.className)},t.children)},ue=function(t){return n.createElement("div",{className:ce("text-center text-sm px-2 px-lg-4",t.className)},t.children)},se=function(t){return n.createElement("p",{className:ce("",t.className)},t.children)};function fe(t){return fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fe(t)}function pe(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==fe(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==fe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===fe(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function he(t){var e=pe(pe(pe(pe(pe(pe(pe(pe({},y.Available,t.imageUrls.statusImages.available),y.Active,t.imageUrls.statusImages.active),y.Expired,t.imageUrls.statusImages.expired),y.NotRequired,t.imageUrls.statusImages.notRequired),y.Unavailable,t.imageUrls.statusImages.unavailable),y.Unsupported,t.imageUrls.statusImages.unsupported),y.UserAutoJoinAllowed,t.imageUrls.statusImages.notRequired),y.UserJoinApprovalRequired,t.imageUrls.statusImages.notRequired);return n.createElement("div",{className:"d-flex justify-content-center my-4 px-2 px-lg-4"},n.createElement("img",{src:e[t.trialStatus],className:"w-100 h-auto"}))}var de=r(69624);function ye(t){var e=(null==t?void 0:t.previousStepIds)&&"find-school"===t.previousStepIds[t.previousStepIds.length-1],r=(null==t?void 0:t.schoolName)||"Your school";return n.createElement(ue,{className:"mb-3"},e?n.createElement(n.Fragment,null,n.createElement(le,null,r,n.createElement("br",null),"already has ClickView 🎉"),n.createElement(se,{className:"mt-3"},"If your school has SSO ",n.createElement("a",{href:de.F.getLoginLink({email:t.email,customerId:t.customerId}),className:"info-link"},"click here to sign in.")),n.createElement(se,null,"Otherwise please contact your school admin for access.")):n.createElement(n.Fragment,null,n.createElement(le,null,"Good News!"),n.createElement(se,null,"An account already exists for:",n.createElement("br",null)," ",n.createElement("strong",null,t.email)),n.createElement(se,null,n.createElement("a",{href:de.F.getLoginLink({email:t.email}),className:"btn btn-dark btn-lg w-100"},"Sign into ClickView"))),n.createElement(se,null,"Need Help? ",n.createElement("a",{href:de.F.getSupportUrlForGeoLocation(t.geoLocation),className:"info-link",target:"_blank"},"Contact our Help Centre.")))}function me(t){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},me(t)}function ve(){ve=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==r&&n.call(S,i)&&(w=S);var x=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==me(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(me(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},L(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function ge(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return be(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?be(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function be(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function we(t){return we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},we(t)}function Ee(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==we(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==we(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===we(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Se=Ee(Ee(Ee(Ee(Ee(Ee(Ee(Ee({},y.Available,(function(t){var e=ge(n.useState(0),2),r=e[0],o=e[1],a=ge(n.useState(!1),2),i=a[0],c=a[1];if(null==t?void 0:t.email)return n.createElement(ue,null,n.createElement(le,null,"Success!"),n.createElement(se,null,"An email has been sent to ",n.createElement("strong",null,t.email),". Please check your email for further instructions to complete the sign up process."),!!t.userId&&n.createElement(n.Fragment,null,r<1?n.createElement(se,null,"Didn't receive an email? ",n.createElement("button",{onClick:function(e){return n=this,a=void 0,i=void 0,l=ve().mark((function n(){return ve().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==e||e.preventDefault(),n.prev=1,n.next=4,zt(t.ajaxUrls,t.userId,{email:t.email,appLink:t.pageAppLinkString});case 4:o(r+1),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(1),c(!0);case 10:t.logUserAction({},{actionType:q.Vw.Click,descriptor:q.Yu.ResendEmail});case 11:case"end":return n.stop()}}),n,null,[[1,7]])})),new(i||(i=Promise))((function(t,e){function r(t){try{c(l.next(t))}catch(t){e(t)}}function o(t){try{c(l.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof i?n:new i((function(t){t(n)}))).then(r,o)}c((l=l.apply(n,a||[])).next())}));var n,a,i,l},className:"btn info-link p-0"},"Resend verification email")):"✅ Email has been resent!",i&&n.createElement(se,{className:"mb-0 text-danger"},"❌ There was a problem resending the email. Please try again later or contact our ",n.createElement("a",{href:de.F.getSupportUrlForGeoLocation(t.geoLocation),className:"info-link"},"support"))))})),y.Active,ye),y.Expired,(function(t){var e=de.F.getMarketingSalesContactForGeoLocation(t.geoLocation),r=(null==t?void 0:t.previousStepIds)&&"find-school"===t.previousStepIds[t.previousStepIds.length-1],o=(null==t?void 0:t.schoolName)||"Your school";return n.createElement(ue,null,n.createElement(le,null,r?"".concat(o," trial has expired"):"Your trial has expired"),n.createElement(se,null,"Please contact our ",n.createElement("a",{href:e,className:"info-link",target:"_blank"},"ClickView Sales Team")))})),y.NotRequired,ye),y.Unavailable,(function(t){var e=de.F.getMarketingSalesContactForGeoLocation(t.geoLocation);return n.createElement(ue,null,n.createElement(le,null,"Your school no longer",n.createElement("br",null)," has access to ClickView"),n.createElement(se,null,"Please contact our ",n.createElement("a",{href:e,className:"info-link"},"ClickView Sales Team")," for more information."))})),y.Unsupported,(function(){return n.createElement(ue,null,n.createElement(le,{className:"px-2 px-lg-4"},"ClickView isn't currently ",n.createElement("br",null)," available for your school"),n.createElement(se,null,"We're working hard to get ClickView ready for more people."))})),y.UserAutoJoinAllowed,ye),y.UserJoinApprovalRequired,ye);function xe(t){var e=Se[t.trialStatus];return n.createElement(e,Object.assign({},t))}var Le="young-student",je={"trial-status":function(t){return n.useEffect((function(){var e={actionType:q.Vw.Create,descriptor:q.Yu.DeadEnd,workflowPhase:q.eu.Discard};t.trialCreated&&(e.descriptor=q.Yu.TrialCreated,e.workflowPhase=q.eu.Complete),t.logUserAction({},e)}),[]),n.createElement(n.Fragment,null,n.createElement(he,{trialStatus:t.trialStatus,imageUrls:t.imageUrls}),n.createElement(xe,Object.assign({},t)))},"added-to-braze":function(t){return n.useEffect((function(){t.logUserAction({},{actionType:q.Vw.Create,descriptor:q.Yu.TrialRequested,workflowPhase:q.eu.Complete})}),[]),n.createElement(n.Fragment,null,n.createElement(he,{trialStatus:y.Available,imageUrls:t.imageUrls}),n.createElement(ue,{className:"mb-3"},n.createElement(le,null,"Submitted!"),n.createElement(se,null,"Thank you for your interest in trialing ClickView. We will be in touch with you as soon as possible.")))},"young-student":function(t){var e=de.F.getFreeResourcesForGeoLocation(t.geoLocation);return n.useEffect((function(){o.SG.set(Le,!0)}),[]),n.createElement(n.Fragment,null,n.createElement(he,{trialStatus:y.Active,imageUrls:t.imageUrls}),n.createElement(ue,{className:"mb-3"},n.createElement(le,null,"Discover our free content"),n.createElement(se,null,"Click the button below to explore our videos"),n.createElement("a",{href:e,className:"btn btn-lg btn-dark w-100",target:"_blank"},"Start watching now")))},"requested-access":function(t){return n.createElement(n.Fragment,null,n.createElement(he,{trialStatus:y.Available,imageUrls:t.imageUrls}),n.createElement(ue,{className:"mb-3"},n.createElement(le,null,"You've requested access!"),n.createElement(se,null,"We've sent a request to your ClickView admin. Once your account is ready, you'll receive an email notification with instructions on how to get started with ClickView.")))}};function ke(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ce(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ce(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ce(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Oe(t,e,r){return"".concat(t.padStart(4,"0"),"-").concat(e.padStart(2,"0"),"-").concat(r.padStart(2,"0"))}function Ne(t){return n.createElement(n.Fragment,null,"Have a ClickView account already?",n.createElement("a",{href:t.link,className:"info-link ms-1",target:"_blank",onClick:t.onClick},"Sign in"))}const Ae="gVdYS",Pe="Mlp3x";function Ie(t){var e=t.idp,r=t.onClick,o=t.last;return n.createElement("button",{className:"btn btn-lg btn-outline-dark w-100 ".concat(o?"":"mb-3"," ").concat(Ae),onClick:function(){return r(e)}},e.logoUrl&&n.createElement("img",{src:e.logoUrl,className:Pe}),"Continue with ",e.name)}var Te=[{name:"ClassLink",logoUrl:"https://img.clickviewapp.com/v2/logos/ZA2ew5",url:"/login?idp=classlink"},{name:"Clever",logoUrl:"https://img.clickviewapp.com/v2/logos/LqlKgd",url:"/login?idp=clever"},{name:"Google",logoUrl:"https://img.clickviewapp.com/v2/logos/l5x0jL",url:"/login?idp=google"},{name:"Microsoft",logoUrl:"https://img.clickviewapp.com/v2/logos/xAxGPP",url:"/login?idp=microsoft"}],_e=r(93824);function Ue(t){return Ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ue(t)}function Fe(){Fe=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==r&&n.call(S,i)&&(w=S);var x=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Ue(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(Ue(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},L(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Ge(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return De(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?De(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function De(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Re(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==Ue(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Ue(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Ue(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Me=new RegExp(/^[^\s@]+@[^\s@]+\.[^\s@]+$/),Ke=Re(Re(Re(Re({},_e.C.AU,"valerie.frizzle@school.edu.au"),_e.C.UK,"valerie.frizzle@school.gov.uk"),_e.C.US,"valerie.frizzle@school.gov"),_e.C.NZ,"valerie.frizzle@school.nz");function Ye(t){return Ke[g.I.getCountryCode(t.countryCode)]||Ke.us}var ze=[y.Expired,y.NotRequired,y.Unavailable,y.Unsupported,y.Active];function qe(t){var e;switch(null===(e=null==t?void 0:t.body)||void 0===e?void 0:e.type){case"user-type-not-supported":return"Students may not request to join schools.";case"join-request-already-pending":return"Your request is awaiting administrator approval.";case"join-request-already-denied":return"Your request has been denied by an administrator.";default:return"Something went wrong."}}var Ve=r(12238);function Be(t){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Be(t)}function $e(){$e=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==r&&n.call(S,i)&&(w=S);var x=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Be(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(Be(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},L(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function He(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ze(t){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(t)}function Je(){Je=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(P([])));S&&S!==r&&n.call(S,i)&&(w=S);var x=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Ze(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(Ze(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},L(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}var We=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{l(n.next(t))}catch(t){a(t)}}function c(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}l((n=n.apply(t,e||[])).next())}))},Xe=r(80247);function Qe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return tr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tr(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function er(t){var e=t.filteredSchoolsList,r=t.getSchoolName,o=t.onSchoolSuggestionClick,a=t.selectedIndex;return n.createElement(n.Fragment,null,e.map((function(t,e){return n.createElement(yt.L,{className:"".concat(vt.suggestionItem," ").concat(a-1===e?vt.selected:""),key:t.id,onClick:function(){return o(t)}},r(t)," ",n.createElement("br",null),n.createElement("small",{className:"text-muted"},function(t){var e=[];return t.city&&e.push(t.city.toLowerCase().split(" ").map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join(" ")),t.province&&e.push(t.province),t.postCode&&e.push(t.postCode),e.join(" ")}(t)))})))}function rr(t){return n.createElement("div",{className:"info-link ".concat(vt.suggestionItem," ").concat(vt.noSuggestion," ").concat(t.selected?vt.selected:""),onClick:t.handleNoSuggestion},"Can't find your school?")}function nr(t){var e,r,o=n.useRef(),a=Qe(n.useState(!0),2),i=a[0],l=a[1],u=Qe(n.useState(t.data.schoolName&&t.data.schoolPostCode?t.data.schoolName+", "+t.data.schoolPostCode:t.data.schoolName?t.data.schoolName:""),2),s=u[0],f=u[1],p=Qe(n.useState(),2),h=p[0],d=p[1],y=(0,ht.N)(s,250),m=ct({onSelected:function(t){if(h||t)if(t!==h.length){var e=h[t];e&&k(e)}else O()},itemCount:null!==(e=(null==h?void 0:h.length)+1)&&void 0!==e?e:0}),v=m.selectedIndex,g=m.onKeyDown,b=m.containerRef,w=!!(null===(r=t.data)||void 0===r?void 0:r.prospectId),E=i&&!w,S=!i&&!w&&!(null==h?void 0:h.length),x=(null==h?void 0:h.length)&&!w;function L(e){(t.data.schoolName||t.data.prospectId)&&t.clearStepItemData(),e!==s&&f(e)}function j(e){l(!0);var r={latitude:t.data.latitude,longitude:t.data.longitude};e&&e.length&&(r.query=e),Dt.search(t.ajaxUrls,r,(function(t){return d(t)}),null,(function(){return l(!1)}))}function k(e){f(C(e)),t.setDataProperty("prospectId",e.id),t.setDataProperty("schoolName",e.name),t.setDataProperty("schoolPostCode",e.postCode),t.setDataProperty("schoolType",e.prospectType),t.setDataProperty("province",e.province),t.setDataProperty("city",e.city),t.setDataProperty("country",e.countryCode)}function C(t){return t.name}function O(){t.nextStep({step:"cant-find-school",prospectId:t.data.prospectId,schoolName:s,schoolLocality:t.data.schoolLocality,longitude:t.data.longitude,latitude:t.data.latitude,country:t.data.country,city:t.data.city,province:t.data.province}),t.logUserAction({},{actionType:q.Vw.Click,descriptor:q.Yu.CantFindSchool,workflowPhase:q.eu.Next})}n.useEffect((function(){w||(y.length?!w&&y.length>1&&y===s&&j(y):j())}),[y,w]);var N=x||E||S;return n.createElement("div",{className:"form-group position-relative"},n.createElement(c.w,{value:s,onChange:function(t){return L(t.currentTarget.value)},ref:o,className:"form-control form-control-lg ".concat(N?vt.inputFocused:vt.input),type:"text",autoComplete:"off",placeholder:"Select your school below",disabled:t.disabled,autoFocus:!0,onClickClear:function(){L(""),o.current.focus()},onKeyDown:g}),n.createElement("div",{className:"position-absolute w-100"},n.createElement("div",{className:"".concat(vt.suggestionContainer," ").concat(N?"":"d-none"),ref:b},x?n.createElement(er,{filteredSchoolsList:h,onSchoolSuggestionClick:k,getSchoolName:C,selectedIndex:v}):E&&n.createElement("div",{className:"".concat(vt.suggestionLoading," py-4 d-flex justify-content-center")},n.createElement(Xe.Z,{animation:"border"})),!E&&(null==h?void 0:h.length)<5&&n.createElement(rr,{selected:v===h.length+1,handleNoSuggestion:O}))))}function or(t){return or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},or(t)}function ar(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ir(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ir(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ir(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const cr="R8ZPi",lr="SNEmW",ur="BSfO7";function sr(t){return n.createElement(n.Fragment,null,n.createElement(yt.L,{className:"\n d-flex\n flex-column\n justify-content-between\n h-100\n p-3\n border\n rounded\n rounded-3\n mx-auto\n d-sm-block\n d-none\n ".concat(cr," ").concat(t.selected?lr:""),onClick:function(){return t.onClick(t.type)}},n.createElement("img",{src:t.imageSrc,className:"rounded-top mx-auto pb-2"}),n.createElement("div",{className:"py-2"},n.createElement("span",{className:"h4"},t.buttonText))),n.createElement(yt.L,{className:"btn btn-lg btn-outline-dark w-100 d-sm-none d-block mx-auto ".concat(ur),onClick:function(){return t.onClick(t.type)}},t.buttonText))}var fr={"select-type":function(t){function e(e){t.logUserAction({userType:e},{actionType:q.Vw.Click,workflowPhase:q.eu.Next,descriptor:e===v.Staff?q.Yu.Educator:q.Yu.Student}),e!==v.Staff?t.nextStep({step:"enter-age",userType:e}):t.nextStep({step:"enter-email",userType:e})}return n.createElement("div",{className:"text-center"},n.createElement("h1",{className:"h4"},"Access educational videos at your fingertips"),n.createElement("p",{className:"mb-3"},"Let's get you set up so you can access ClickView."),n.createElement("div",{className:"row"},n.createElement("div",{className:"col-lg-6 mb-3"},n.createElement(sr,{type:v.Staff,buttonText:"I'm an educator",imageSrc:t.imageUrls.educator,onClick:e,selected:t.userType===v.Staff})),n.createElement("div",{className:"col-lg-6 mb-3"},n.createElement(sr,{type:v.Learner,buttonText:"I'm a student",imageSrc:t.imageUrls.student,onClick:e,selected:t.userType===v.Learner}))))},"enter-email":function(t){var e,r,o,a,i=Ge(n.useState(!1),2),l=i[0],u=i[1],s=Ge(n.useState((null==t?void 0:t.email)||""),2),f=s[0],p=s[1],h=Ge(n.useState(),2),d=h[0],y=h[1],w=(o=t.geoLocation,a=de.F.getMarketingUrlForGeoLocation(o),"nz"===(null==o?void 0:o.countryCode)?a+"/contact-us/":a+"/contact-us/technical/");function E(e){null==e||e.preventDefault(),function(){var e,r,n,o;e=this,r=void 0,n=void 0,o=Fe().mark((function e(){var r;return Fe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f.length?Me.test(f)||(y("Please use your school email address."),0):(y("Please enter your school email address."),0)){e.next=2;break}return e.abrupt("return");case 2:return u(!0),y(""),e.prev=4,e.next=7,Mt(t.ajaxUrls,{email:f});case 7:r=e.sent,e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(4),y("Something went wrong! Please try again later."),e.abrupt("return");case 14:if(u(!1),r.status!==m.InvalidEmail){e.next=18;break}return y("Please use your school email address."),e.abrupt("return");case 18:if(t.logUserAction({},{actionType:q.Vw.Click,workflowPhase:q.eu.Next,descriptor:q.Yu.EnterEmail}),!ze.includes(r.status)){e.next=22;break}return t.complete({completionStep:"trial-status",email:f,trialStatus:r.status,trialCreated:!1}),e.abrupt("return");case 22:t.nextStep({step:"find-school",email:f});case 23:case"end":return e.stop()}}),e,null,[[4,10]])})),new(n||(n=Promise))((function(t,a){function i(t){try{l(o.next(t))}catch(t){a(t)}}function c(t){try{l(o.throw(t))}catch(t){a(t)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(t){t(r)}))).then(i,c)}l((o=o.apply(e,r||[])).next())}))}()}function S(t){var e=window.location.pathname+window.location.search;window.location.href=t.url+"&redirectUrl="+encodeURIComponent(e)}var x=!1;return t.userType===v.Staff&&(g.I.isCountryCodeUS(null===(e=t.geoLocation)||void 0===e?void 0:e.countryCode)&&(x=!0),(null===(r=window.location.search)||void 0===r?void 0:r.indexOf("emulateUSA"))>-1&&(x=!0)),n.createElement(n.Fragment,null,n.createElement("div",{className:"text-center"},n.createElement("h1",{className:"h4"},"Let's set up your account"),n.createElement("p",null,"Enter your school email address")),n.createElement("form",{onSubmit:E,noValidate:!0},n.createElement("div",{className:"form-group mb-3"},n.createElement(c.w,{value:f,onChange:function(t){t.preventDefault(),p(t.target.value),y("")},name:"email-input",id:"email-input",type:"email",className:"form-control form-control-lg ".concat(d?"is-invalid":""),placeholder:Ye(t.geoLocation),autoComplete:"false",autoCorrect:"false",autoFocus:!0,onClickClear:function(){return p("")}}),d&&n.createElement(n.Fragment,null,n.createElement("div",{className:"invalid-feedback d-block"},d),n.createElement("small",null,"Having an issue with your email?",n.createElement("a",{href:w,className:"info-link ps-1",target:"_blank",onClick:function(){t.logUserAction({},{actionType:q.Vw.Click,descriptor:q.Yu.ContactUs})}},"Contact our team")))),n.createElement(b.m,{showSpinner:l,variant:"dark",className:"btn-lg mb-3 w-100",disabled:l,onClick:E},"Continue")),x&&n.createElement("div",{className:"mt-n3"},n.createElement("div",{className:"my-3 border-bottom position-relative ".concat("bGwO5")}),Te.map((function(t,e){return n.createElement(Ie,{onClick:S,idp:t,key:e})}))),n.createElement("div",{className:"text-center"},n.createElement(Ne,{link:de.F.getLoginLink(),onClick:function(){t.logUserAction({},{actionType:q.Vw.Click,descriptor:q.Yu.SignIn})}})))},"find-school":function(t){var e,r,o=t.email,a=t.userType,i=ar(n.useState({schoolLocality:t.schoolLocality,country:t.country,longitude:t.longitude,latitude:t.latitude,city:t.city,province:t.province}),2),c=i[0],l=i[1],u=ar(n.useState(),2),s=u[0],f=u[1],p=ar(n.useState(),2),h=p[0],d=p[1],m=ar(n.useState(!1),2),g=m[0],w=m[1],E=ar(n.useState(!1),2),S=E[0],x=E[1],L=ar(n.useState(!1),2),j=L[0],C=L[1],O=function(t){var e=t.loading,r=t.canSubmitForm,n=t.setSubmissionError,o=t.prospectStatus,a=t.userType,i=t.logStepEvent,c=t.logUserAction,l=t.nextStep,u=t.data,s=t.productName,f=t.ajaxUrls,p=t.complete,h=t.setLoadingState,d=t.email,m=t.pageAppLinkString,g=t.setProperty,b=t.brazeConfig,w=t.geoLocation,E=t.version;function S(){return We(this,void 0,void 0,Je().mark((function t(){return Je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Vt(f,{prospectId:u.prospectId,email:d});case 3:c({},{actionType:q.Vw.Click,descriptor:q.Yu.AutoJoin}),p(Object.assign({completionStep:"trial-status",trialCreated:!0,trialStatus:y.Available},u)),t.next=12;break;case 7:return t.prev=7,t.t0=t.catch(0),n("Something went wrong! Please try again later."),h(!1),t.abrupt("return");case 12:case"end":return t.stop()}}),t,null,[[0,7]])})))}function x(){var t;return We(this,void 0,void 0,Je().mark((function e(){var r,n;return Je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=void 0,!(null==u?void 0:u.prospectId)||o!==y.NotRequired){e.next=6;break}return e.next=4,Dt.getLookups(f,u.prospectId);case 4:n=e.sent,r=null===(t=n.find((function(t){return t.type===Ve.C.MasterId})))||void 0===t?void 0:t.externalId;case 6:p(Object.assign({completionStep:"trial-status",trialStatus:o,trialCreated:!1,customerId:r},u)),i();case 8:case"end":return e.stop()}}),e)})))}function L(){return We(this,void 0,void 0,Je().mark((function t(){return Je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Xt.submitFormEvent({brazeConfig:b,productName:s,geoLocation:w,version:E},"trial-sign-up",Object.assign(Object.assign({},u),{email:d,province:U.parseProvince(u.province)}));case 2:case"end":return t.stop()}}),t)})))}function j(){var t;return We(this,void 0,void 0,Je().mark((function e(){var r;return Je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(!0),e.prev=1,e.next=4,Yt(f,{userType:a,email:d,prospectId:null==u?void 0:u.prospectId,appLink:m,accessPolicy:Bt(u.country)});case 4:r=e.sent,e.next=12;break;case 7:return e.prev=7,e.t0=e.catch(1),n("Something went wrong! Please try again later."),h(!1),e.abrupt("return");case 12:o===y.UserAutoJoinAllowed&&c({},{actionType:q.Vw.Click,descriptor:q.Yu.AutoJoin}),g("userId",r.id),p(Object.assign({completionStep:"trial-status",userId:r.id,trialCreated:!0,trialStatus:y.Available,customerId:null===(t=r.data)||void 0===t?void 0:t.customerId},u)),L(),i();case 17:case"end":return e.stop()}}),e,null,[[1,7]])})))}return function(){return We(this,void 0,void 0,Je().mark((function t(){return Je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=2;break}return t.abrupt("return");case 2:if(r()){t.next=5;break}return n("Something went wrong! Please try again later."),t.abrupt("return");case 5:if(a!==v.Staff){t.next=14;break}if(o!==y.Unsupported){t.next=8;break}return t.abrupt("return",(l(Object.assign({step:"add-to-braze",trialStatus:o},u)),void i()));case 8:if(o!==y.UserJoinApprovalRequired){t.next=10;break}return t.abrupt("return",(l(Object.assign({step:"request-access"},u)),void i()));case 10:if(o!==y.UserAutoJoinAllowed||s!==k.X.Lite){t.next=14;break}return t.next=13,S();case 13:case 17:case 20:return t.abrupt("return",t.sent);case 14:if(o===y.Active||o===y.Available||o===y.UserAutoJoinAllowed&&s===k.X.Auth){t.next=18;break}return t.next=17,x();case 18:return t.next=20,j();case 21:case"end":return t.stop()}}),t)})))}}(Object.assign(Object.assign({},t),{prospectStatus:s,loading:g,data:c,canSubmitForm:N,setSubmissionError:d,logStepEvent:function(){var e={actionType:q.Vw.Click,descriptor:q.Yu.FindSchool,workflowPhase:q.eu.Next};t.logUserAction(c||{},e)},setLoadingState:function(t){x(t),C(t),w(t)},setProperty:A}));function N(){if(!c||!o||!a)return!1;var t=c.prospectId;return!!(o&&a&&t)}function A(e,r){"prospectId"===e&&r&&(w(!0),Kt(t.ajaxUrls,{prospectId:r.toString(),email:t.email},(function(t){f(t.status)}),(function(){console.log("error")}),(function(){w(!1)}))),l((function(t){return Object.assign(Object.assign({},t),function(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==or(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==or(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===or(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},e,r))}))}function P(){A("prospectId",void 0),A("schoolName",""),A("schoolPostCode",void 0),d(void 0)}return n.createElement(n.Fragment,null,n.createElement("div",{className:"text-center"},n.createElement("h1",{className:"h4"},"Next, let's find your school"),n.createElement("p",null,"au"===(null==(r=null===(e=t.geoLocation)||void 0===e?void 0:e.countryCode)?void 0:r.toLowerCase())?"Enter your school postcode or suburb":"Enter your school postcode or city")),n.createElement(Et,{data:c,setDataProperty:A,clearStepGroupData:function(){A("schoolLocality",void 0),l((function(t){return Object.assign(Object.assign({},t),{longitude:undefined,latitude:undefined})})),A("city",void 0),A("province",void 0),A("country",void 0),P(),d(void 0)},disabled:S,geoLocation:t.geoLocation,labelClassName:"d-none",logUserAction:t.logUserAction,googleMapsApiKey:t.googleMapsApiKey,autoFocus:!0}),!!(c&&c.schoolLocality&&c.longitude&&c.latitude)&&n.createElement(nr,{data:c,setDataProperty:A,clearStepItemData:P,nextStep:t.nextStep,currentStepId:t.currentStepId,disabled:j,logUserAction:t.logUserAction,ajaxUrls:t.ajaxUrls}),h&&n.createElement("p",{className:"text-danger mb-2"},h),N()&&n.createElement(b.m,{className:"btn-lg w-100",variant:"dark",onClick:O,showSpinner:S||j||g,disabled:S||j||g},"Get started"))},"cant-find-school":function(t){var e,r,o,a=oe(n.useState({prospectId:t.prospectId,schoolName:t.schoolName,schoolType:t.schoolType,schoolLocality:t.schoolLocality,country:t.country,province:t.province,city:t.city,longitude:t.longitude,latitude:t.latitude}),2),i=a[0],c=a[1],l=oe(n.useState(),2),u=l[0],s=l[1],f=oe(n.useState(!1),2),p=f[0],h=f[1],d=(r=i.country||(null===(e=t.geoLocation)||void 0===e?void 0:e.countryCode),o=g.I.getCountryCode(r),ee[o]||te);function m(){var t=i.schoolName,e=i.schoolType,r=i.country;return!!(t&&e&&r)}function v(t,e){c((function(r){return Object.assign(Object.assign({},r),function(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==re(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==re(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===re(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},t,e))}))}function w(){return ie(this,void 0,void 0,ne().mark((function e(){var r,n,o,a,c;return ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.email,n=t.brazeConfig,o=t.productName,a=t.geoLocation,c=t.version,e.next=3,Xt.submitFormEvent({brazeConfig:n,productName:o,geoLocation:a,version:c},"trial-sign-up",Object.assign(Object.assign({},i),{email:r}));case 3:case"end":return e.stop()}}),e)})))}return n.createElement(n.Fragment,null,n.createElement("div",{className:"text-center"},n.createElement("h1",{className:"h4"},"Tell us more about yourself"),n.createElement("p",null,"Please enter your school details.")),n.createElement("div",{className:"form-group"},n.createElement("label",{className:"d-block",htmlFor:"school-name-input"},"Name of school"),n.createElement("input",{type:"text",value:(null==i?void 0:i.schoolName)||"",onChange:function(t){v("schoolName",t.target.value)},id:"school-name-input",className:"form-control form-control-lg",autoComplete:"off",placeholder:"Enter name of school",autoFocus:!0})),n.createElement("div",{className:"form-group"},n.createElement("label",{className:"d-block",htmlFor:"school-type-select"},"Type of school"),n.createElement("select",{id:"school-type-select",className:"form-control form-control-lg ".concat(i.schoolType?"":"text-muted"),autoComplete:"off",value:i.schoolType||"none",onChange:function(t){v("schoolType",t.target.value)}},n.createElement("option",{value:"none",className:"text-muted",disabled:!0},"Select type of school"),d.map((function(t){return n.createElement("option",{value:t,key:t,className:"text-dark"},t)})))),n.createElement(Et,{data:i,setDataProperty:v,clearStepGroupData:function(){v("schoolLocality",void 0),c((function(t){return Object.assign(Object.assign({},t),{longitude:undefined,latitude:undefined})})),v("city",void 0),v("province",void 0),v("country",void 0),s("")},disabled:!1,labelClassName:"d-block",geoLocation:t.geoLocation,logUserAction:t.logUserAction,googleMapsApiKey:t.googleMapsApiKey,autoFocus:!1}),u&&n.createElement("div",{className:"text-danger mb-3"},u),m()&&n.createElement(b.m,{className:"btn-lg w-100",variant:"dark",onClick:function(e){var r;return ie(this,void 0,void 0,ne().mark((function n(){var o,a,c;return ne().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.preventDefault(),m()){n.next=3;break}return n.abrupt("return");case 3:return t.logUserAction(i,{actionType:q.Vw.Click,workflowPhase:q.eu.Next,descriptor:q.Yu.CantFindSchool}),h(!0),n.prev=5,n.next=8,Dt.create(t.ajaxUrls,{name:i.schoolName,status:Wt.Draft,countryCode:i.country,prospectType:i.schoolType,city:i.city,postCode:i.schoolPostCode,province:U.parseProvince(i.province)});case 8:if((o=n.sent).id){n.next=13;break}return h(!1),s("Error. Something went wrong."),n.abrupt("return");case 13:n.next=20;break;case 15:return n.prev=15,n.t0=n.catch(5),h(!1),s("Error. Something went wrong."),n.abrupt("return");case 20:return n.prev=20,n.next=23,Yt(t.ajaxUrls,{userType:t.userType,email:t.email,prospectId:o.id,appLink:t.pageAppLinkString,accessPolicy:Bt(i.country)});case 23:a=n.sent,t.complete({completionStep:"trial-status",email:t.email,userId:a.id,prospectId:o.id,schoolName:i.schoolName,schoolLocality:i.schoolLocality,country:i.country,schoolType:i.schoolType,city:i.city,schoolPostCode:i.schoolPostCode,latitude:i.latitude,longitude:i.longitude,province:i.province,trialStatus:y.Available,trialCreated:!0,customerId:null===(r=a.data)||void 0===r?void 0:r.customerId}),w(),n.next=38;break;case 28:if(n.prev=28,n.t1=n.catch(20),n.t1.body){n.next=34;break}return h(!1),s("Error. Something went wrong."),n.abrupt("return");case 34:if(400!==(c=n.t1).body.status||"trial-not-available"!==c.body.type){n.next=38;break}return t.nextStep(Object.assign(Object.assign({step:"add-to-braze"},i),{prospectId:o.id,trialStatus:y.Unavailable})),n.abrupt("return");case 38:case"end":return n.stop()}}),n,null,[[5,15],[20,28]])})))},showSpinner:p,disabled:p},"Get started"))},completed:function(t){var e=je[t.completionStep];return n.createElement("div",{className:"d-flex justify-content-center flex-column mx-auto px-2"},n.createElement(e,Object.assign({},t)))},"add-to-braze":function(t){var e,r=D(n.useState(!1),2),o=r[0],a=r[1],c=D(n.useState({}),2),l=c[0],u=c[1];function s(e){var r=z(e.fullname),n=r.firstName,o=r.surname,a={prospect_id:null==t?void 0:t.prospectId,email:null==t?void 0:t.email,organisation_sub_type:U.getSchoolType(null==t?void 0:t.schoolType),account_name:null==t?void 0:t.schoolName,account_post_code:null==t?void 0:t.schoolPostCode,account_country:null==t?void 0:t.country,province:null==t?void 0:t.province,first_name:n,last_name:o,job_title:e.jobTitle,sync_to_crm:!0,event_topic:U.getEventTopic()};return U.removeEmptyKeys(a)}function f(){t.complete({completionStep:"added-to-braze",trialCreated:!1,trialStatus:null})}return n.useEffect((function(){t.userType===v.Learner&&t.complete({completionStep:"trial-status",trialCreated:!1,trialStatus:y.Unsupported})}),[]),n.createElement(S,{errors:l,loading:o,geoLocation:t.geoLocation,country:t.country||(null===(e=t.geoLocation)||void 0===e?void 0:e.countryCode),logUserAction:t.logUserAction,handleSubmitForm:function(e){var r,n;(function(t){var e=t.fullname,r=t.jobTitle,n=t.phone,o=z(e),a=o.firstName,i=o.surname,c={};return a&&i||(c.fullname="Please enter your full name."),(K.test(a)||K.test(i))&&(c.fullname="Please enter your full name."),e.length>M&&(c.fullname="Full name cannot exceed max length of ".concat(M," characters.")),(null==r?void 0:r.length)||(c.jobTitle="Please enter your job title."),K.test(r)&&(c.jobTitle="Please enter a valid job title."),r.length>M&&(c.jobTitle="Job Title cannot exceed max length of ".concat(M," characters.")),(null==n?void 0:n.length)||(c.phone="Please enter your phone number."),!K.test(n)&&Y.test(n)||(c.phone="Please enter a valid phone number."),u(c),!Object.keys(c).length})(e)&&((null===(r=e.jobTitle)||void 0===r?void 0:r.toLowerCase().includes("student"))||(null===(n=e.jobTitle)||void 0===n?void 0:n.toLowerCase().includes("parent"))?f():function(e){var r,n,c,p;r=this,n=void 0,c=void 0,p=G().mark((function r(){var n,c,p,h,d,y,m;return G().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!o){r.next=2;break}return r.abrupt("return");case 2:if(t.userType!==v.Learner){r.next=5;break}return u(Object.assign(Object.assign({},l),{submission:"Something went wrong! Please try again later."})),r.abrupt("return");case 5:return t.logUserAction({},{actionType:i.Vw.Click,workflowPhase:i.eu.Next,descriptor:i.Yu.AddToBraze}),a(!0),n=s(e),c=t.geoLocation.isFallback?{countryCode:t.country||t.geoLocation.countryCode}:t.geoLocation,r.next=11,U.getClient({brazeConfig:t.brazeConfig,geoLocation:c,productName:t.productName,version:t.version});case 11:p=r.sent,h=z(e.fullname),d=h.firstName,y=h.surname,m={prospect_id:null==t?void 0:t.prospectId,organisation_sub_type:U.getSchoolType(null==t?void 0:t.schoolType),account_name:null==t?void 0:t.schoolName,account_address:{country_code:null==t?void 0:t.country,province:U.parseProvince((null==t?void 0:t.province)||"")},job_title:e.jobTitle,sync_to_crm:!0},m=U.removeEmptyKeys(m);try{p.setUser(U.hashedEmail(null==t?void 0:t.email)),p.setUserFirstName(d),p.setUserLastName(y),p.setUserPhone(e.phone),p.setUserEmail(null==t?void 0:t.email),p.openSession(),p.bulkSetCustomUserAttributes(m),p.logEvent({type:U.getCustomEventType(),data:n}),p.sendData((function(t){u(t?{}:Object.assign(Object.assign({},l),{submission:"Something went wrong! Please try again later."})),a(!1)}))}catch(t){u(Object.assign(Object.assign({},l),{submission:"Something went wrong! Please try again later."}))}Object.keys(l).length||f();case 17:case"end":return r.stop()}}),r)})),new(c||(c=Promise))((function(t,e){function o(t){try{i(p.next(t))}catch(t){e(t)}}function a(t){try{i(p.throw(t))}catch(t){e(t)}}function i(e){var r;e.done?t(e.value):(r=e.value,r instanceof c?r:new c((function(t){t(r)}))).then(o,a)}i((p=p.apply(r,n||[])).next())}))}(e))},removeErrorForKey:function(t){if(Object.keys(l).length&&l[t]){var e=Object.assign({},l);delete e[t],u(e)}}})},"enter-age":function(t){var e=ke(n.useState(""),2),r=e[0],o=e[1],a=ke(n.useState(""),2),i=a[0],c=a[1],l=ke(n.useState(""),2),u=l[0],s=l[1],f=ke(n.useState(null),2),p=f[0],h=f[1];var d=(new Date).getFullYear(),y="mx-2 d-inline-block text-start",m="form-control form-control-lg ".concat(p?"is-invalid":""),v="order-0",b="order-3",w=g.I.isCountryCodeUS(t.geoLocation.countryCode);return w&&(v="order-3",b="order-0"),n.createElement("form",{className:"text-center",onSubmit:function(e){if(e.preventDefault(),r&&i&&u?function(t,e,r){var n=new Date(Oe(t,e,r));return!isNaN(+n)}(u,i,r)?+u>d?(h("Please enter a date in the past"),0):!(+u<d-120&&(h("Please enter a realistic date of birth"),1)):(h("Please enter a valid date"),0):(h("Please enter your date of birth"),0)){var n=new Date(Oe(u,i,r)),o=d-13,a=new Date;a.setFullYear(o),n>a?t.complete({completionStep:"young-student",trialCreated:!1,trialStatus:null}):t.nextStep({step:"enter-email",userType:t.userType})}},noValidate:!0},n.createElement("h1",{className:"h4"},"Tell us a little about yourself"),n.createElement("p",null,"Please enter your date of birth"),n.createElement("div",{className:"my-4"},n.createElement("div",{className:"d-flex justify-content-center"},n.createElement("div",{className:"".concat(y," ").concat(v)},n.createElement("label",{className:"mb-0",htmlFor:"day"},"Day"),n.createElement("input",{id:"day",type:"number",className:"".concat(m," ").concat("e0Dbj"),min:"1",max:"31",placeholder:"DD",value:r,onChange:function(t){o(t.target.value),h(null)},autoFocus:!w,tabIndex:w?2:1})),n.createElement("span",{className:"h1 fw-normal mt-3 mb-0 order-1 ".concat(p?"text-danger":"")},"/"),n.createElement("div",{className:"".concat(y," ").concat(b)},n.createElement("label",{className:"mb-0",htmlFor:"month"},"Month"),n.createElement("input",{id:"month",type:"number",className:"".concat(m," ").concat("zLcQr"),min:"1",max:"12",placeholder:"MM",value:i,onChange:function(t){c(t.target.value),h(null)},autoFocus:w,tabIndex:w?1:2})),n.createElement("span",{className:"h1 fw-normal mt-3 mb-0 order-4 ".concat(p?"text-danger":"")},"/"),n.createElement("div",{className:"".concat(y," order-5")},n.createElement("label",{className:"mb-0",htmlFor:"year"},"Year"),n.createElement("input",{id:"year",type:"number",className:"".concat(m," ").concat("XiXPP"),min:d-120,max:d,placeholder:"YYYY",value:u,onChange:function(t){s(t.target.value),h(null)},tabIndex:3}))),!!p&&n.createElement("div",{className:"invalid-feedback d-block"},p)),n.createElement("button",{type:"submit",className:"btn btn-lg btn-dark w-100"},"Continue"))},"request-access":function(t){var e,r,o=(e=n.useState(null),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return He(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?He(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],i=o[1];return n.createElement(n.Fragment,null,n.createElement(he,{trialStatus:y.UserJoinApprovalRequired,imageUrls:t.imageUrls}),n.createElement(ue,{className:"mb-3"},n.createElement(le,null,t.schoolName,n.createElement("br",null),"already has ClickView 🎉")),n.createElement("button",{className:"btn btn-lg btn-dark w-100 mb-3",onClick:function(){var e,r,n,o,a;return r=this,n=void 0,o=void 0,a=$e().mark((function r(){var n,o;return $e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Dt.getLookups(t.ajaxUrls,t.prospectId);case 3:if(n=r.sent,o=null===(e=n.find((function(t){return t.type===Ve.C.MasterId})))||void 0===e?void 0:e.externalId){r.next=8;break}return i("Something went wrong."),r.abrupt("return");case 8:return r.next=10,qt(t.ajaxUrls,{customerId:o,email:t.email});case 10:t.logUserAction({},{actionType:q.Vw.Click,descriptor:q.Yu.RequestAccess}),t.complete({completionStep:"requested-access",trialCreated:!1,trialStatus:y.UserJoinApprovalRequired}),r.next=17;break;case 14:r.prev=14,r.t0=r.catch(0),i(qe(r.t0));case 17:case"end":return r.stop()}}),r,null,[[0,14]])})),new(o||(o=Promise))((function(t,e){function i(t){try{l(a.next(t))}catch(t){e(t)}}function c(t){try{l(a.throw(t))}catch(t){e(t)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(i,c)}l((a=a.apply(r,n||[])).next())}))}},"Request access"),a&&n.createElement("p",{className:"text-danger text-center mb-2"},a),n.createElement(se,{className:"text-center"},"Need Help? ",n.createElement("a",{href:de.F.getSupportUrlForGeoLocation(t.geoLocation),className:"info-link",target:"_blank"},"Contact our Help Centre.")))}};function pr(t){var e=t.state,r=t.geoLocation,o=t.layoutMapping,a=t.hasPreviousStep,i=t.googleMapsApiKey,c=t.pageAppLinkString,l=t.back,u=t.nextStep,s=t.complete,f=t.logUserAction,p=t.imageUrls,h=t.ajaxUrls,d=t.brazeConfig,y=t.version,m=t.productName,v=fr[e.currentStepId],g=Object.assign(Object.assign({},e),{geoLocation:r,googleMapsApiKey:i,pageAppLinkString:c,back:l,nextStep:u,complete:s,logUserAction:f,imageUrls:p,ajaxUrls:h,brazeConfig:d,version:y,productName:m}),b=null==o?void 0:o[e.currentStepId];return b?n.createElement(b,{geoLocation:t.geoLocation,currentStep:e.currentStepId,previousStep:l,closeApp:t.close,logUserAction:f,hasPreviousStep:a,imageUrls:t.imageUrls},n.createElement(v,Object.assign({},g))):n.createElement(v,Object.assign({},g))}var hr=r(1048);const dr={buttonContainer:"izZtA",dataContainer:"OgBv5"};function yr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function mr(t){var e={};return Object.keys(t).forEach((function(r){var n=t[r];hr.t.isObject(n)&&null!==n&&!Array.isArray(n)?Object.assign(e,mr(n)):e[r]=n})),e}function vr(t){var e=t.label,r=t.item,o=r;return Array.isArray(r)&&(o=o.join(" -> ")),"boolean"==typeof o&&(o=o?"true":"false"),n.createElement("div",{className:"pb-1"},e,": ",n.createElement("b",{className:"text-white"},o))}function gr(t){var e,r,o=t.developmentEnv,a=t.objects,i=(e=n.useState(!0),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return yr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yr(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=i[0],l=i[1],u=n.useMemo((function(){return mr(a)}),[a]);return o&&n.createElement(n.Fragment,null,n.createElement("div",{className:"position-fixed p-4 ".concat(dr.buttonContainer)},n.createElement("button",{onClick:function(){l(!c)},className:"btn btn-dark px-2 py-1"},c?"Hide":"Show"," debugger")),c&&n.createElement("div",{className:"fixed-bottom mb-4 ms-4 bg-dark rounded ".concat(dr.dataContainer)},n.createElement("code",{className:"d-block p-4"},n.createElement("div",{className:"fw-bold pb-2"},"{ Debug: Form Data }"),Object.keys(u).map((function(t){return n.createElement(vr,{key:t,label:t,item:u[t]})})))))}var br=r(83529);const wr={crumb:"Btmx2"};function Er(t,e){var r="rounded-circle mx-2 d-inline-block "+wr.crumb,n=t===e?"bg-info":"bg-light";return"".concat(r," ").concat(n)}function Sr(t){return n.createElement("div",{className:"text-center"},t.crumbs.map((function(e){return n.createElement("div",{className:Er(t.currentStep,e),key:e})})))}var xr=r(98461);function Lr(t){var e=de.F.getTermsAndConditionsLink(),r=de.F.getPrivacyPolicyLink();return n.createElement("span",{className:"text-center text-md mt-2 text-normal small"},"By signing up you agree to the",n.createElement("br",null),n.createElement(xr.d,{href:e,onClick:t.onClickTermsAndConditions,className:"info-link",newTab:!0},"Terms and Conditions")," and ",n.createElement(xr.d,{href:r,onClick:t.onClickPrivacyPolicy,className:"info-link",newTab:!0},"Privacy Policy"))}var jr=r(83914),kr=r(35223);function Cr(t){return n.createElement("button",{onClick:t.onClick,className:"btn p-0 cursor-pointer d-inline-flex align-items-center"},n.createElement(jr.x,{svgName:kr.vn.ChevronLeft,size:jr.S.Medium}),t.children)}var Or=r(2786);Ar.defaultProps={showBackButton:!0};var Nr=["select-type","enter-email","find-school"];function Ar(t){var e=t.currentStep,r=t.previousStep,o=t.hasPreviousStep,a=t.showBackButton,i=t.children;return n.createElement("div",{className:"d-flex flex-column justify-content-between px-4 py-0 ".concat("jZ_Wp")},n.createElement("div",{className:"mt-3 mb-2"},Nr.includes(e)&&n.createElement(Sr,{crumbs:Nr,currentStep:e})),n.createElement("div",{className:"position-relative mx-auto w-100 ".concat("select-type"===e?"Ye154":["enter-email","find-school","cant-find-school","add-to-braze","enter-age"].includes(e)?"m2kAT":"ollkc")},n.createElement("div",{className:"d-flex flex-row justify-content-center align-items-center mt-2 mb-3"},o&&a&&["enter-email","find-school","cant-find-school","add-to-braze","enter-age","request-access"].includes(e)&&n.createElement(Cr,{onClick:function(){r(),t.logUserAction({step:e},{actionType:q.Vw.Click,descriptor:q.Yu.Back,workflowPhase:q.eu.Back})}}),n.createElement("div",{className:"d-flex justify-content-center align-items-center px-2 ".concat("J97w_")},n.createElement(Or.$S,null))),i),n.createElement("div",{className:"position-relative mb-4 mt-3 text-center"},"select-type"===e&&n.createElement(Ne,{link:de.F.getLoginLink(),onClick:function(){t.logUserAction({},{actionType:q.Vw.Click,descriptor:q.Yu.SignIn})}}),["enter-email","find-school","add-to-braze"].includes(e)&&n.createElement(Lr,{onClickTermsAndConditions:function(){t.logUserAction({},{actionType:q.Vw.Click,descriptor:q.Yu.TermsAndConditions})},onClickPrivacyPolicy:function(){t.logUserAction({},{actionType:q.Vw.Click,descriptor:q.Yu.PrivacyPolicy})}})))}var Pr=r(28366);_r.defaultProps={showBackButton:!0};var Ir=["enter-email","find-school"],Tr=["enter-email","find-school","cant-find-school","add-to-braze","enter-age","request-access"];function _r(t){var e=t.currentStep,r=t.previousStep,o=t.hasPreviousStep,a=t.showBackButton,i=t.closeApp,c=t.children;function l(){return["enter-email","find-school","cant-find-school","add-to-braze","enter-age"].includes(e)}function u(){r(),t.logUserAction({},{actionType:q.Vw.Click,descriptor:q.Yu.Back,workflowPhase:q.eu.Back})}var s=Tr.includes(t.currentStep),f=s?"".concat(Pr.Z.leftHalfLayout," ").concat(Pr.Z.withBg):Pr.Z.leftHalfLayout;return n.createElement("div",{className:f},n.createElement("div",{className:"row mx-0 p-3"},n.createElement("div",{className:"col px-0 d-lg-none ".concat(Pr.Z.popupButton)},o&&l()&&a&&n.createElement(Cr,{onClick:u})),n.createElement("div",{className:"col col-lg-6 px-0"},n.createElement("div",{className:Pr.Z.logo},n.createElement("div",{className:"d-none d-lg-block"},s?n.createElement(Or.Yo,null):n.createElement(Or.$S,null)),n.createElement("div",{className:"d-block d-lg-none mt-1"},n.createElement(Or.$S,null),Ir.includes(t.currentStep)&&n.createElement("div",{className:"mt-3"},n.createElement(Sr,{crumbs:Ir,currentStep:e}))))),n.createElement("div",{className:"col col-lg-6 d-flex flex-row justify-content-between px-0"},n.createElement("div",{className:"px-3"},n.createElement("div",{className:"d-none d-lg-block ".concat(Pr.Z.popupButton)},o&&l()&&a&&n.createElement(Cr,{onClick:u}))),Ir.includes(t.currentStep)&&n.createElement("div",{className:"d-none d-lg-block align-self-center"},n.createElement(Sr,{crumbs:Ir,currentStep:e})),n.createElement(yt.L,{onClick:i,className:Pr.Z.popupButton},n.createElement(jr.x,{svgName:kr.vn.Close,size:jr.S.Medium})))),n.createElement("div",{className:"row mx-0 flex-grow-1"},s&&n.createElement("div",{className:"col-6 px-0 d-none d-lg-block"},n.createElement("div",{className:"h-100 d-flex align-items-center justify-content-center"},n.createElement("img",{src:t.imageUrls.popupDashboard,className:"w-100 p-4 pb-5"}))),n.createElement("div",{className:"px-4 pt-0 pb-4 ".concat(s?"col-12 col-lg-6":"col-12")},n.createElement("div",{className:"d-flex flex-column h-100"},n.createElement("div",{className:"flex-grow-1"},c),n.createElement("div",{className:"text-center mt-3"},"select-type"===e&&n.createElement(Ne,{link:de.F.getLoginLink(),onClick:function(){t.logUserAction({},{actionType:q.Vw.Click,descriptor:q.Yu.SignIn})}}),["enter-email","add-to-braze"].includes(e)&&n.createElement(Lr,{onClickTermsAndConditions:function(){t.logUserAction({},{actionType:q.Vw.Click,descriptor:q.Yu.TermsAndConditions})},onClickPrivacyPolicy:function(){t.logUserAction({},{actionType:q.Vw.Click,descriptor:q.Yu.PrivacyPolicy})}}))))))}function Ur(t){return Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ur(t)}function Fr(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==Ur(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Ur(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Ur(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Gr={"cant-find-school":_r,"enter-email":_r,"find-school":_r,"select-type":_r,completed:_r,"add-to-braze":_r,"enter-age":_r,"request-access":_r},Dr={"cant-find-school":Ar,"enter-email":Ar,"find-school":Ar,"select-type":Ar,completed:Ar,"add-to-braze":Ar,"enter-age":Ar,"request-access":Ar},Rr=Fr(Fr({},br.c.FullPage,Dr),br.c.Popup,Gr),Mr={getLayouts:function(t){return Rr[t]}},Kr=r(17331);function Yr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function zr(t){return zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zr(t)}function qr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||Vr(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vr(t,e){if(t){if("string"==typeof t)return Br(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Br(t,e):void 0}}function Br(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function $r(t,e){var r,n,o=Object.assign(Object.assign({},t),{previousStepIds:[].concat((n=t.previousStepIds,function(t){if(Array.isArray(t))return Br(t)}(n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||Vr(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[t.currentStepId]),currentStepId:e.step});if("select-type"===e.step)return Object.assign({},o);if("enter-email"===e.step||"enter-age"===e.step)return Object.assign(Object.assign({},o),{userType:e.userType});if("find-school"===e.step)return Object.assign(Object.assign({},o),{email:e.email});if("cant-find-school"===e.step)return Object.assign(Object.assign({},o),{prospectId:e.prospectId,schoolName:e.schoolName,schoolLocality:e.schoolLocality,country:e.country,longitude:e.longitude,latitude:e.latitude,city:e.city,province:e.province});if("add-to-braze"===e.step||"completed"===e.step||"request-access"===e.step){var a=Object.assign({},e);return delete a.type,delete a.step,r=a,a=Object.entries(r).filter((function(t){return null!==qr(t,2)[1]})).reduce((function(t,e){var r=qr(e,2),n=r[0],o=r[1];return Object.assign(Object.assign({},t),function(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==zr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==zr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===zr(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},n,o))}),{}),Object.assign(Object.assign({},o),a)}}function Hr(t,e){switch(e.type){case"nextStep":return $r(t,e);case"back":return function(t){var e,r=function(t){if(Array.isArray(t))return Yr(t)}(e=t.previousStepIds)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return Yr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yr(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=r.pop();return Object.assign(Object.assign({},t),{previousStepIds:r,currentStepId:n})}(t)}}function Zr(t){return Zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zr(t)}function Jr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Wr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wr(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Xr=function(t){var e=t.location,r=t.initialValues,o=t.onStepUpdate,a=t.externalLogUserAction,c=U.removeEmptyKeys(r),l=Object.assign({currentStepId:"select-type",previousStepIds:[]},c),u=Jr(n.useReducer(Hr,l),2),s=u[0],f=u[1];return n.useEffect((function(){null==o||o(s)}),[s.currentStepId]),{state:s,back:function(){f({type:"back"})},nextStep:function(t){f(Object.assign({type:"nextStep"},t))},complete:function(t){f(Object.assign({type:"nextStep",step:"completed"},t))},hasPreviousStep:!!s.previousStepIds.length,logUserAction:function(t,r){var n=Object.assign(Object.assign({},s),t),o=Kr.i.filterBlacklistedKeys(n),c=Object.assign({currentStepId:s.currentStepId},o),l=Object.entries(c).filter((function(t){return void 0!==Jr(t,2)[1]})).reduce((function(t,e){var r=Jr(e,2),n=r[0],o=r[1];return Object.assign(Object.assign({},t),function(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==Zr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Zr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Zr(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},n,o))}),{});a(l,Object.assign({entity:i.py.SignUp,location:e},r))}}};function Qr(t){var e=Mr.getLayouts(t.type),r=t.location,i=t.initialValues,c=t.geoLocation,l=t.googleMapsApiKey,u=t.pageAppLinkString,s=t.onStepUpdate,f=t.imageUrls,p=t.ajaxUrls,h=t.brazeConfig,d=t.version,y=t.productName,m=t.close,v=Xr({location:r,initialValues:i,onStepUpdate:s,externalLogUserAction:a.k.logUserAction}),g=v.back,b=v.nextStep,w=v.complete,E=v.hasPreviousStep,S=v.state,x=v.logUserAction,L={state:S,geoLocation:c,layoutMapping:e,hasPreviousStep:E,googleMapsApiKey:l,pageAppLinkString:u,back:g,close:m,nextStep:b,complete:w,logUserAction:x,imageUrls:f,ajaxUrls:p,brazeConfig:h,version:d,productName:y};return n.useEffect((function(){o.SG.get(Le)&&w({completionStep:"young-student",trialCreated:!1,trialStatus:null})}),[]),n.createElement(n.Fragment,null,n.createElement(pr,Object.assign({},L)),n.createElement(gr,{developmentEnv:!1,objects:Object.assign(Object.assign(Object.assign({},S),{pageAppLinkString:u}),c)}))}},83529:(t,e,r)=>{var n;r.d(e,{c:()=>n}),function(t){t.Popup="popup-form",t.FullPage="full-page-form"}(n||(n={}))},12238:(t,e,r)=>{var n;r.d(e,{C:()=>n}),function(t){t.MasterId="master_id",t.CrmId="crm_id",t.SalesforceId="salesforce_id"}(n||(n={}))},84789:(t,e,r)=>{var n;r.d(e,{X:()=>n}),function(t){t.Lite="lite",t.Auth="auth"}(n||(n={}))},17331:(t,e,r)=>{r.d(e,{i:()=>o});var n=["email","longitude","latitude","trialCreated"],o={filterBlacklistedKeys:function(t){var e=Object.assign({},t);return n.forEach((function(t){return delete e[t]})),e}}},69624:(t,e,r)=>{r.d(e,{F:()=>c});var n=r(97395),o=r(86664),a=r(93824),i={Marketing:{au:"https://www.clickview.com.au",uk:"https://www.clickview.co.uk",nz:"https://www.clickview.co.nz",us:"https://www.clickvieweducation.com"},Support:{au:"https://www.clickviewsupport.com/hc/en-au",uk:"https://www.clickviewsupport.com/hc/en-au#gb",nz:"https://www.clickviewsupport.com/hc/en-au#nz",us:"https://www.clickviewsupport.com/hc/en-au#us"}},c={getMarketingUrlForGeoLocation:function(t){var e=o.I.getCountryCode(null==t?void 0:t.countryCode);return i.Marketing[e]||i.Marketing.us},getMarketingSalesContactForGeoLocation:function(t){var e=o.I.getCountryCode(null==t?void 0:t.countryCode),r=this.getMarketingUrlForGeoLocation(t);return t&&e===a.C.NZ?r+"/contact-us/":r+"/contact-us/trial/"},getFreeResourcesForGeoLocation:function(t){var e=o.I.getCountryCode(null==t?void 0:t.countryCode);return e===a.C.NZ&&(e=a.C.AU),this.getMarketingUrlForGeoLocation({countryCode:e})+"/free-student-resources//"},getTermsAndConditionsLink:function(){return this.getMarketingUrlForGeoLocation(a.C.US)+"/terms-and-conditions/"},getPrivacyPolicyLink:function(){return this.getMarketingUrlForGeoLocation(a.C.US)+"/privacy-policy/"},getSupportUrlForGeoLocation:function(t){var e=o.I.getCountryCode(null==t?void 0:t.countryCode);return i.Support[e]||i.Support.us},getLoginLink:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.email,r=t.customerId,o={redirectUrl:window.location.pathname+window.location.search};return e&&(o.email=e),r&&(o.customerId=r),n._.urlBuilder("/login",o)}}},86664:(t,e,r)=>{r.d(e,{I:()=>l});var n=r(83765),o=r(93824),a=["uk","gb","gg","im","je","ie"],i={au:o.C.AU,nz:o.C.NZ,us:o.C.US,uk:o.C.UK,gb:o.C.UK,gg:o.C.UK,im:o.C.UK,je:o.C.UK,ie:o.C.UK},c={au:n.M.CvApSoutheast1,uk:n.M.CvEuWest1,us:n.M.CvNaWest1,nz:n.M.CvApSoutheast2},l={getInstanceRegion:function(t){var e=l.getCountryCode(t);return c[e]},getCountryCode:function(t){return i[null==t?void 0:t.toLowerCase()]||o.C.US},isCountryCodeUK:function(t){return a.includes(t.toLowerCase())},isCountryCodeAU:function(t){return(null==t?void 0:t.toLowerCase())===o.C.AU},isCountryCodeUS:function(t){return(null==t?void 0:t.toLowerCase())===o.C.US},isCountryCodeNZ:function(t){return(null==t?void 0:t.toLowerCase())===o.C.NZ},isSupportedCountryCode:function(t){return Object.keys(i).includes(null==t?void 0:t.toLowerCase())},getLocalizedLocalityPlaceholderPhrase:function(t){if(t)return l.isCountryCodeUK(t)?"E.g. CR0 3RL or 36 Factory Lane":l.isCountryCodeAU(t)||l.isCountryCodeNZ(t)?"E.g. 2212 or Revesby":l.isCountryCodeUS(t)?"E.g. 95826 or Sacramento":void 0},getLocalizedLocalityPlaceholderText:function(t){if(t){var e=l.getLocalizedLocalityPlaceholderPhrase(t);if(e)return e}}}},93824:(t,e,r)=>{var n;r.d(e,{C:()=>n}),function(t){t.AU="au",t.NZ="nz",t.UK="uk",t.US="us"}(n||(n={}))},48456:(t,e,r)=>{r.d(e,{v:()=>o});var n=r(99742),o={popupDashboard:n.W.SignUp.POPUP_DASHBOARD,educator:n.W.SignUp.EDUCATOR,student:n.W.SignUp.STUDENT,statusImages:{available:n.W.SignUp.VERIFY_ACCOUNT,active:n.W.SignUp.EXISTING_CUSTOMER,expired:n.W.SignUp.EXPIRED_TRIAL,notRequired:n.W.SignUp.EXISTING_CUSTOMER,unavailable:n.W.SignUp.NOT_AVAILABLE,unsupported:n.W.SignUp.NOT_AVAILABLE,autoJoin:n.W.SignUp.EXISTING_CUSTOMER,requestAccess:n.W.SignUp.EXISTING_CUSTOMER}}},17762:(t,e,r)=>{r.d(e,{M:()=>i});var n=r(20354),o=r(39151),a={countryCode:"us",isFallback:!0};function i(){var t=n.a.useBasicFetch(o.L.geoLocation());return t.hasCompleted&&!t.data?a:t.data}},63643:(t,e,r)=>{r.d(e,{c:()=>c});var n=r(97395),o=r(20354),a=r(84789),i=r(39151);function c(){var t=o.a.useBasicFetch(i.L.config());if(!t.hasCompleted)return null;var e=t.data.gatewayApiUrl;return{productName:a.X.Lite,userStatus:n._.safeUrlConcat(e,"/v1/users/trial-status"),prospectStatus:function(t){return n._.safeUrlConcat(e,"/v1/prospects/".concat(t,"/trial-status"))},createTrial:"/api/user/trials",resendTrialEmail:function(t){return"/api/user/trials/users/".concat(t,"/send-activation-email")},searchProspect:n._.safeUrlConcat(e,"/v1/search/prospects"),createProspect:"/api/prospects",prospectLookups:function(t){return n._.safeUrlConcat(e,"/v1/prospects/".concat(t,"/lookups"))},autoJoin:"/api/user/trials/auto-join",joinRequest:function(t){return"/api/user/customers/".concat(t,"/join-requests")}}}},28366:(t,e,r)=>{r.d(e,{Z:()=>n});const n={logo:"Kh4Dd",modalBody:"V9nIN",popupButton:"hS60U",leftHalfLayout:"aQ1K8",withBg:"zALxE"}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4690],{83657:(e,t,n)=>{n.d(t,{e:()=>s});var a=n(32735),r=n(79014),i=n(10874),o=n(76177),c=n(42735),l=n(86509);function s(e){var t=a.useMemo((function(){return e.actions.sort((function(e,t){return e.order-t.order}))}),[e.actions]),n=[],s=[];t.forEach((function(e){e.button?n.push(e):s.push(e)}));var m="d-flex";return e.className&&(m+=" ".concat(e.className)),n.length||s.length?a.createElement("div",{className:m},a.createElement(a.Fragment,null,a.createElement("span",{className:"d-flex align-items-center"},n.length?n.map((function(e,t){return a.createElement(a.Fragment,{key:t},function(){if(e.label){var t=r.q.isFunction(e.label)?e.label:function(){return a.createElement(a.Fragment,null,e.label)};return a.createElement(c.K,{appLink:e.appLink,href:e.href,onClick:e.onClick,svgName:e.svgName,className:e.className,tooltip:e.tooltip,showSpinner:e.showSpinner,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled},t())}var n=a.createElement(i.h,{appLink:e.appLink,href:e.href,onClick:e.onClick,svgName:e.svgName,className:e.className,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled});return e.tooltip?a.createElement(o.u,{title:e.tooltip,spanHack:!0},n):n}())})):a.createElement(a.Fragment,null),e.sortComponent&&e.sortComponent,s.length?a.createElement(l.m,{actions:s,dropdownToggleClassName:e.actionsDropdownClassName,dropdownToggleSvgSize:e.dropdownToggleSvgSize}):a.createElement(a.Fragment,null)))):a.createElement(a.Fragment,null)}},86509:(e,t,n)=>{n.d(t,{m:()=>v});var a=n(32735),r=n(79014),i=n(81886),o=n(45157),c=n(49985),l=n(36848),s=n(83914),m=n(76177),u=n(35223);const d={dropdownToggle:"UCAnJ"};function p(e){var t="dropdown-item";return e&&(t+=" ".concat(e)),t}function g(e){var t=r.q.isFunction(e.action.label)?e.action.label:function(){return a.createElement(a.Fragment,null,e.action.label)};if(e.action.appLink)return a.createElement(l.F,{appLink:e.action.appLink,onClick:e.action.onClick,className:p(e.action.className),analyticsData:e.action.analyticsData,analyticsOptions:e.action.analyticsOptions,openInNewTab:e.action.openInNewTab,disabled:e.action.disabled},t());function n(t){t.preventDefault(),e.action.analyticsData&&e.action.analyticsOptions&&c.k.logUserAction(e.action.analyticsData,e.action.analyticsOptions),r.q.isFunction(e.action.onClick)&&e.action.onClick(),e.action.href&&i.Q.Ab.PageLoad(e.action.href,e.action.openInNewTab)}return e.action.href?a.createElement("a",{className:p(e.action.className),onClick:n,href:e.action.href},t()):a.createElement("span",{className:"cursor-pointer ".concat(p(e.action.className)),onClick:n,role:"button",tabIndex:0,onKeyDown:function(e){return"Enter"===e.key&&n(e)}},t())}function v(e){if(!e.actions||!e.actions.length)return a.createElement(a.Fragment,null);var t="dropdown";e.className&&(t+=" ".concat(e.className));var n="actions-dropdown-".concat(o.Y.getRandomInt()),r="dropdown-toggle px-0 ".concat(d.dropdownToggle);return e.dropdownToggleClassName&&(r+=" ".concat(e.dropdownToggleClassName)),a.createElement("div",{className:t},a.createElement("button",{className:r,type:"button",id:n,"data-bs-toggle":"dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},a.createElement(s.x,{svgName:u.vn.More,size:e.dropdownToggleSvgSize})),a.createElement("div",{className:"dropdown-menu dropdown-menu-end dropdown-menu-right","aria-labelledby":n},e.actions.map((function(e,t){return e.tooltip?a.createElement(m.u,{key:t,title:e.tooltip,spanHack:!0},a.createElement(g,{action:e})):a.createElement(g,{key:t,action:e})}))))}v.defaultProps={dropdownToggleClassName:"btn btn-light",dropdownToggleSvgSize:s.S.Small}},80181:(e,t,n)=>{n.d(t,{Z:()=>E});var a=n(32735),r=n(98495),i=n(11607),o=n(83914),c=n(83345),l=n(28972),s=n(93264),m=n(35223),u=n(86572);const d={time:"JDp5N",type:"AzIWg",question:"UhEYq",deleteContainer:"wBqoo",delete:"OAQQu",correctness:"W5sR9",selected:"tfrDf",row:"sGk59"};var p="shared.interactiveQuestions";function g(e){var t=e.interaction;switch((0,e.getCorrectness)(t)){case l.w.Correct:return a.createElement("span",{className:"text-success"},a.createElement(o.x,{size:o.S.Medium,svgName:m.vn.Check}));case l.w.Incorrect:return a.createElement("span",{className:"text-danger"},a.createElement(o.x,{size:o.S.Medium,svgName:m.vn.Close}));case l.w.AwaitingMarking:return a.createElement("span",{className:"text-muted italic"},a.createElement("i",null,a.createElement(c.x,{namespace:p,phrase:"pending"})));case l.w.UnAnswered:return a.createElement("button",{className:"btn btn-outline-dark"},a.createElement(c.x,{namespace:p,phrase:"answer"}));case l.w.Answered:return a.createElement("span",{className:"text-muted italic"},a.createElement("i",null,a.createElement(c.x,{namespace:p,phrase:"answered"})));case l.w.NotApplicable:return a.createElement(a.Fragment,null)}}function v(e){var t=e.interaction,n=e.visibleAt,r=e.selectedInteractionId,c=e.goToTimepoint,l=e.scrollTo,p=e.isFirstInteraction,v=t.id.toString()===(null==r?void 0:r.toString()),f=a.useRef();a.useEffect((function(){if(v&&f.current){var e=f.current,t=e.getBoundingClientRect(),n=t.top-e.offsetParent.getBoundingClientRect().top;l(n,t.height)}}),[v]);var E=c?"cursor-pointer":"cursor-default";return a.createElement("div",{ref:f},a.createElement(i.L,{className:"py-2 ".concat(E," ").concat(d.row," ").concat(v?d.selected:""),onClick:v?function(){}:function(){c&&c(t.id)}},a.createElement("span",{className:"".concat(d.time," me-2 ").concat(v?"fw-bold":"")},p?s.T.ToDisplayDuration(n):""),a.createElement(u.y,{interaction:t,showTypeName:!0,typeNameClassName:d.type,questionClassName:d.question}),e.onClickDelete&&a.createElement(i.L,{onClick:function(n){n.stopPropagation(),e.onClickDelete(t.id)},className:"".concat(d.deleteContainer)},a.createElement("span",{className:"text-end ".concat(d.delete)},a.createElement(o.x,{size:o.S.Medium,svgName:m.vn.Delete}))),e.getCorrectness&&a.createElement("span",{className:"text-end ".concat(d.correctness)},a.createElement(g,{interaction:t,getCorrectness:e.getCorrectness}))))}function f(e){var t=e.timepoint,n=e.scrollTo,r=e.onClickDelete,i=e.selectedInteractionId,o=e.getCorrectness;function c(n){e.goToTimepoint(t.id,n)}return t.interactions?a.createElement("div",null,t.interactions.map((function(l,s){return a.createElement(v,{interaction:l,visibleAt:t.visibleAt,goToTimepoint:e.goToTimepoint&&c,onClickDelete:r,scrollTo:n,selectedInteractionId:i,isFirstInteraction:0===s,getCorrectness:o,key:s})}))):a.createElement(a.Fragment,null)}function E(e){var t=e.interactive,n=e.goToTimepoint,i=e.selectedInteractionId,o=e.maxHeight,c=e.onClickDelete,l=e.getCorrectness,s=a.useRef();function m(e,t){if(s.current){var n=s.current.getClientHeight(),a=s.current.getScrollTop(),r=e+a;(r<a||r+t>a+n)&&s.current.scrollTop(r-n/2+t/2)}}var u=n?"border rounded":"";return a.createElement(r.$B,{autoHeight:!0,autoHeightMax:o,className:u,hideTracksWhenNotNeeded:!0,ref:s},a.createElement("div",{className:"px-3 py-1"},t.timepoints.map((function(e,t){return a.createElement(f,{key:t,timepoint:e,goToTimepoint:n,selectedInteractionId:i,scrollTo:m,onClickDelete:c,getCorrectness:l})}))))}},28972:(e,t,n)=>{var a;n.d(t,{w:()=>a}),function(e){e[e.Correct=0]="Correct",e[e.Incorrect=1]="Incorrect",e[e.AwaitingMarking=2]="AwaitingMarking",e[e.Answered=3]="Answered",e[e.UnAnswered=4]="UnAnswered",e[e.NotApplicable=5]="NotApplicable"}(a||(a={}))},41630:(e,t,n)=>{n.d(t,{X:()=>T});var a=n(32735),r=n(44645),i=n(17327),o=n.n(i),c=n(56050),l=n(23481),s=n(81886),m=n(2786),u=n(93264),d=n(98758);const p={worksheet:"Bv47P",interaction:"efkgi",timepointCell:"ffoDR",interactionCell:"rKBEu",checkbox:"ilhe4",multipleChoiceAnswer:"TqhFx",shortAnswerTextArea:"voJCM",image:"go2dV",cvLogo:"Z4GOw",copyright:"petLf"};var g;function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==v(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===v(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=/{([^{}]*)}/g;function b(e){return a.createElement("div",{className:"mb-2"},e.interaction.name)}function w(e){return a.createElement(a.Fragment,null,a.createElement(b,{interaction:e.interaction}),a.createElement("table",null,a.createElement("tbody",null,e.interaction.actionableItems.map((function(e){return a.createElement("tr",{key:e.id},a.createElement("td",null,a.createElement("div",{className:"border ".concat(p.checkbox)})),a.createElement("td",{className:"break-word align-top"},a.createElement("div",{className:p.multipleChoiceAnswer},e.name)))})))))}var y=(f(g={},d.Z9.Annotation,(function(e){return a.createElement("div",{dangerouslySetInnerHTML:{__html:e.interaction.data.annotation}})})),f(g,d.Z9.Image,(function(e){return a.createElement(a.Fragment,null,a.createElement(b,{interaction:e.interaction}),a.createElement("img",{className:p.image,src:e.interaction.data.url}))})),f(g,d.Z9.MissingWord,(function(e){var t=e.interaction.data.sentence.replace(E,(function(t,n){var a=2*e.interaction.actionableItems.find((function(e){return e.order.toString()===n})).name.length;return Array(a+1).join("_")}));return a.createElement("div",null,t)})),f(g,d.Z9.MultipleChoice,w),f(g,d.Z9.TrueOrFalse,w),f(g,d.Z9.ShortAnswer,(function(e){return a.createElement(a.Fragment,null,a.createElement(b,{interaction:e.interaction}),a.createElement("div",{className:"border w-100 ".concat(p.shortAnswerTextArea)}))})),g),N=l.T.encloseNamespace("interactives.printableInteractiveWorksheet");function h(e){var t=y[e.interaction.typeId];return t?a.createElement("tr",{className:p.interaction},a.createElement("td",{className:"align-top ".concat(p.timepointCell)},u.T.ToDisplayDuration(e.visibleAt)),a.createElement("td",{className:"break-word ".concat(p.interactionCell)},a.createElement(t,{interaction:e.interaction}))):a.createElement(a.Fragment,null)}function _(e){return a.createElement(a.Fragment,null,e.interactive.timepoints.map((function(e,t){return e.interactions.map((function(n,r){return a.createElement(h,{key:"".concat(t,":").concat(r),interaction:n,visibleAt:e.visibleAt})}))})))}function k(e){var t=(new Date).getFullYear();return a.createElement("div",{id:e.worksheetElementId,className:p.worksheet},a.createElement("div",{className:"row pb-2"},a.createElement("div",{className:"col-6"},N("name")," ______________________________"),a.createElement("div",{className:"col-6"},N("date")," ______________________________")),a.createElement("h1",null,a.createElement("strong",null,N("questionSheet"),":")," ",e.interactive.name),a.createElement("table",null,a.createElement("tbody",null,a.createElement(_,{interactive:e.interactive}))),a.createElement("div",{className:p.cvLogo},a.createElement(m.$S,null)),e.isClickViewContent&&a.createElement("span",{className:p.copyright},N("copyright",{year:t})))}var C=l.T.encloseNamespace("interactives.utils");function T(e,t,n){var i=document.getElementById("print-region");if(i||s.Q.Ry.throw(new c.H("Could not find print region in layout")),e){var l="printable-interactive-".concat(e.id),m=(0,r.s)(i);m.render(a.createElement("div",{className:"d-none"},a.createElement(k,{worksheetElementId:l,interactive:e,isClickViewContent:t}))),window.setTimeout((function(){o()({printable:l,type:"html",documentTitle:C("worksheetTitle",{interactiveName:e.name}),targetStyles:["*"],style:"@page { size: A4; margin: 1.5cm 0; }",onLoadingEnd:function(){n&&n(),m.unmount()},font_size:"14px"})}),200)}}},74690:(e,t,n)=>{n.r(t),n.d(t,{PreviewQuestionsView:()=>N});var a=n(32735),r=n(23481),i=n(20354),o=n(28400),c=n(65858),l=n(83657),s=n(80181),m=n(9111),u=n(13876),d=n(20768),p=n(35223),g=n(14070),v=n(97291),f=n(90102),E=n(41630);const b={printBtn:"VWlur"};function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var y=r.T.encloseNamespace("interactives.previewQuestions");function N(e){var t,n,r,N,h,_=(N=a.useState(!1),h=2,function(e){if(Array.isArray(e))return e}(N)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(N,h)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}(N,h)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),k=_[0],C=_[1],T=i.a.useBasicFetch(d.b.interactiveMetadata(e.id)),I=i.a.useBasicFetch(T.data?d.b.interactive(T.data.interactiveId):null),S=null;T.data&&(S={id:T.data.id,interactiveId:T.data.interactiveId,name:T.data.name},(null===(t=T.data._parentVideo)||void 0===t?void 0:t.id)&&(S.video={id:T.data._parentVideo.id}),(null===(n=T.data._parentClip)||void 0===n?void 0:n.id)&&(S.clip={id:T.data._parentClip.id}));var A=[{label:y("watchInteractive"),className:"btn btn-outline-dark me-2",svgName:p.vn.Play,button:!0,appLink:{application:v.O.INTERACTIVES,action:g.e.Interactives.VIEW_INTERACTIVE,args:[e.id,o.m.slugify(null===(r=I.data)||void 0===r?void 0:r.name)]},onClick:e.closePopup,analyticsData:S,analyticsOptions:{entity:c.py.Interactive,actionType:c.Vw.Click,location:c.LZ.PreviewInteractiveQuestions,descriptor:c._S.Button}},{label:y("printAsWorksheet"),className:"btn btn-outline-dark ".concat(b.printBtn),svgName:p.vn.Print,button:!0,onClick:function(){var e;C(!0),(0,E.X)(I.data,null===(e=T.data._isClickViewContent)||void 0===e?void 0:e.value,(function(){return C(!1)}))},showSpinner:k,analyticsData:S,analyticsOptions:{entity:c.py.Interactive,actionType:c.Vw.Print,location:c.LZ.PreviewInteractiveQuestions,workflowPhase:c.eu.Start,eventVersion:c.eq.V2}}];return a.createElement(m.G,{title:y("mainTitle"),closePopup:e.closePopup,showLoadingSpinner:!I.data,size:"lg"},I.data?a.createElement(a.Fragment,null,a.createElement(s.Z,{interactive:I.data,maxHeight:f.x}),a.createElement(u.u,null,a.createElement(l.e,{actions:A}))):a.createElement(a.Fragment,null))}},90102:(e,t,n)=>{n.d(t,{x:()=>a});var a=368}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4690],{83657:(e,t,n)=>{n.d(t,{e:()=>s});var a=n(32735),r=n(79014),i=n(10874),o=n(76177),c=n(42735),l=n(86509);function s(e){var t=a.useMemo((function(){return e.actions.sort((function(e,t){return e.order-t.order}))}),[e.actions]),n=[],s=[];t.forEach((function(e){e.button?n.push(e):s.push(e)}));var m="d-flex";return e.className&&(m+=" ".concat(e.className)),n.length||s.length?a.createElement("div",{className:m},a.createElement(a.Fragment,null,a.createElement("span",{className:"d-flex align-items-center"},n.length?n.map((function(e,t){return a.createElement(a.Fragment,{key:t},function(){if(e.label){var t=r.q.isFunction(e.label)?e.label:function(){return a.createElement(a.Fragment,null,e.label)};return a.createElement(c.K,{appLink:e.appLink,href:e.href,onClick:e.onClick,svgName:e.svgName,className:e.className,tooltip:e.tooltip,showSpinner:e.showSpinner,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled},t())}var n=a.createElement(i.h,{appLink:e.appLink,href:e.href,onClick:e.onClick,svgName:e.svgName,className:e.className,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled});return e.tooltip?a.createElement(o.u,{title:e.tooltip,spanHack:!0},n):n}())})):a.createElement(a.Fragment,null),e.sortComponent&&e.sortComponent,s.length?a.createElement(l.m,{actions:s,dropdownToggleClassName:e.actionsDropdownClassName,dropdownToggleSvgSize:e.dropdownToggleSvgSize}):a.createElement(a.Fragment,null)))):a.createElement(a.Fragment,null)}},86509:(e,t,n)=>{n.d(t,{m:()=>v});var a=n(32735),r=n(79014),i=n(81886),o=n(45157),c=n(49985),l=n(36848),s=n(83914),m=n(76177),u=n(35223);const d={dropdownToggle:"UCAnJ"};function p(e){var t="dropdown-item";return e&&(t+=" ".concat(e)),t}function g(e){var t=r.q.isFunction(e.action.label)?e.action.label:function(){return a.createElement(a.Fragment,null,e.action.label)};if(e.action.appLink)return a.createElement(l.F,{appLink:e.action.appLink,onClick:e.action.onClick,className:p(e.action.className),analyticsData:e.action.analyticsData,analyticsOptions:e.action.analyticsOptions,openInNewTab:e.action.openInNewTab,disabled:e.action.disabled},t());function n(t){t.preventDefault(),e.action.analyticsData&&e.action.analyticsOptions&&c.k.logUserAction(e.action.analyticsData,e.action.analyticsOptions),r.q.isFunction(e.action.onClick)&&e.action.onClick(),e.action.href&&i.Q.Ab.PageLoad(e.action.href,e.action.openInNewTab)}return e.action.href?a.createElement("a",{className:p(e.action.className),onClick:n,href:e.action.href},t()):a.createElement("span",{className:"cursor-pointer ".concat(p(e.action.className)),onClick:n,role:"button",tabIndex:0,onKeyDown:function(e){return"Enter"===e.key&&n(e)}},t())}function v(e){if(!e.actions||!e.actions.length)return a.createElement(a.Fragment,null);var t="dropdown";e.className&&(t+=" ".concat(e.className));var n="actions-dropdown-".concat(o.Y.getRandomInt()),r="dropdown-toggle px-0 ".concat(d.dropdownToggle);return e.dropdownToggleClassName&&(r+=" ".concat(e.dropdownToggleClassName)),a.createElement("div",{className:t},a.createElement("button",{className:r,type:"button",id:n,"data-bs-toggle":"dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},a.createElement(s.x,{svgName:u.vn.More,size:e.dropdownToggleSvgSize})),a.createElement("div",{className:"dropdown-menu dropdown-menu-end dropdown-menu-right","aria-labelledby":n},e.actions.map((function(e,t){return e.tooltip?a.createElement(m.u,{key:t,title:e.tooltip,spanHack:!0},a.createElement(g,{action:e})):a.createElement(g,{key:t,action:e})}))))}v.defaultProps={dropdownToggleClassName:"btn btn-light",dropdownToggleSvgSize:s.S.Small}},80181:(e,t,n)=>{n.d(t,{Z:()=>E});var a=n(32735),r=n(98495),i=n(11607),o=n(83914),c=n(83345),l=n(28972),s=n(93264),m=n(35223),u=n(86572);const d={time:"JDp5N",type:"AzIWg",question:"UhEYq",deleteContainer:"wBqoo",delete:"OAQQu",correctness:"W5sR9",selected:"tfrDf",row:"sGk59"};var p="shared.interactiveQuestions";function g(e){var t=e.interaction;switch((0,e.getCorrectness)(t)){case l.w.Correct:return a.createElement("span",{className:"text-success"},a.createElement(o.x,{size:o.S.Medium,svgName:m.vn.Check}));case l.w.Incorrect:return a.createElement("span",{className:"text-danger"},a.createElement(o.x,{size:o.S.Medium,svgName:m.vn.Close}));case l.w.AwaitingMarking:return a.createElement("span",{className:"text-muted italic"},a.createElement("i",null,a.createElement(c.x,{namespace:p,phrase:"pending"})));case l.w.UnAnswered:return a.createElement("button",{className:"btn btn-outline-dark"},a.createElement(c.x,{namespace:p,phrase:"answer"}));case l.w.Answered:return a.createElement("span",{className:"text-muted italic"},a.createElement("i",null,a.createElement(c.x,{namespace:p,phrase:"answered"})));case l.w.NotApplicable:return a.createElement(a.Fragment,null)}}function v(e){var t=e.interaction,n=e.visibleAt,r=e.selectedInteractionId,c=e.goToTimepoint,l=e.scrollTo,p=e.isFirstInteraction,v=t.id.toString()===(null==r?void 0:r.toString()),f=a.useRef();a.useEffect((function(){if(v&&f.current){var e=f.current,t=e.getBoundingClientRect(),n=t.top-e.offsetParent.getBoundingClientRect().top;l(n,t.height)}}),[v]);var E=c?"cursor-pointer":"cursor-default";return a.createElement("div",{ref:f},a.createElement(i.L,{className:"py-2 ".concat(E," ").concat(d.row," ").concat(v?d.selected:""),onClick:v?function(){}:function(){c&&c(t.id)}},a.createElement("span",{className:"".concat(d.time," me-2 ").concat(v?"fw-bold":"")},p?s.T.ToDisplayDuration(n):""),a.createElement(u.y,{interaction:t,showTypeName:!0,typeNameClassName:d.type,questionClassName:d.question}),e.onClickDelete&&a.createElement(i.L,{onClick:function(n){n.stopPropagation(),e.onClickDelete(t.id)},className:"".concat(d.deleteContainer)},a.createElement("span",{className:"text-end ".concat(d.delete)},a.createElement(o.x,{size:o.S.Medium,svgName:m.vn.Delete}))),e.getCorrectness&&a.createElement("span",{className:"text-end ".concat(d.correctness)},a.createElement(g,{interaction:t,getCorrectness:e.getCorrectness}))))}function f(e){var t=e.timepoint,n=e.scrollTo,r=e.onClickDelete,i=e.selectedInteractionId,o=e.getCorrectness;function c(n){e.goToTimepoint(t.id,n)}return t.interactions?a.createElement("div",null,t.interactions.map((function(l,s){return a.createElement(v,{interaction:l,visibleAt:t.visibleAt,goToTimepoint:e.goToTimepoint&&c,onClickDelete:r,scrollTo:n,selectedInteractionId:i,isFirstInteraction:0===s,getCorrectness:o,key:s})}))):a.createElement(a.Fragment,null)}function E(e){var t=e.interactive,n=e.goToTimepoint,i=e.selectedInteractionId,o=e.maxHeight,c=e.onClickDelete,l=e.getCorrectness,s=a.useRef();function m(e,t){if(s.current){var n=s.current.getClientHeight(),a=s.current.getScrollTop(),r=e+a;(r<a||r+t>a+n)&&s.current.scrollTop(r-n/2+t/2)}}var u=n?"border rounded":"";return a.createElement(r.$B,{autoHeight:!0,autoHeightMax:o,className:u,hideTracksWhenNotNeeded:!0,ref:s},a.createElement("div",{className:"px-3 py-1"},t.timepoints.map((function(e,t){return a.createElement(f,{key:t,timepoint:e,goToTimepoint:n,selectedInteractionId:i,scrollTo:m,onClickDelete:c,getCorrectness:l})}))))}},28972:(e,t,n)=>{var a;n.d(t,{w:()=>a}),function(e){e[e.Correct=0]="Correct",e[e.Incorrect=1]="Incorrect",e[e.AwaitingMarking=2]="AwaitingMarking",e[e.Answered=3]="Answered",e[e.UnAnswered=4]="UnAnswered",e[e.NotApplicable=5]="NotApplicable"}(a||(a={}))},41630:(e,t,n)=>{n.d(t,{X:()=>C});var a=n(32735),r=n(44645),i=n(17327),o=n.n(i),c=n(56050),l=n(23481),s=n(81886),m=n(2786),u=n(93264),d=n(98758);const p={worksheet:"Bv47P",interaction:"efkgi",timepointCell:"ffoDR",interactionCell:"rKBEu",checkbox:"ilhe4",multipleChoiceAnswer:"TqhFx",shortAnswerTextArea:"voJCM",image:"go2dV",cvLogo:"Z4GOw",copyright:"petLf"};function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function v(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==g(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===g(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=/{([^{}]*)}/g;function E(e){return a.createElement("div",{className:"mb-2"},e.interaction.name)}function b(e){return a.createElement(a.Fragment,null,a.createElement(E,{interaction:e.interaction}),a.createElement("table",null,a.createElement("tbody",null,e.interaction.actionableItems.map((function(e){return a.createElement("tr",{key:e.id},a.createElement("td",null,a.createElement("div",{className:"border ".concat(p.checkbox)})),a.createElement("td",{className:"break-word align-top"},a.createElement("div",{className:p.multipleChoiceAnswer},e.name)))})))))}var w=v(v(v(v(v(v({},d.Z9.Annotation,(function(e){return a.createElement("div",{dangerouslySetInnerHTML:{__html:e.interaction.data.annotation}})})),d.Z9.Image,(function(e){return a.createElement(a.Fragment,null,a.createElement(E,{interaction:e.interaction}),a.createElement("img",{className:p.image,src:e.interaction.data.url}))})),d.Z9.MissingWord,(function(e){var t=e.interaction.data.sentence.replace(f,(function(t,n){var a=2*e.interaction.actionableItems.find((function(e){return e.order.toString()===n})).name.length;return Array(a+1).join("_")}));return a.createElement("div",null,t)})),d.Z9.MultipleChoice,b),d.Z9.TrueOrFalse,b),d.Z9.ShortAnswer,(function(e){return a.createElement(a.Fragment,null,a.createElement(E,{interaction:e.interaction}),a.createElement("div",{className:"border w-100 ".concat(p.shortAnswerTextArea)}))})),y=l.T.encloseNamespace("interactives.printableInteractiveWorksheet");function N(e){var t=w[e.interaction.typeId];return t?a.createElement("tr",{className:p.interaction},a.createElement("td",{className:"align-top ".concat(p.timepointCell)},u.T.ToDisplayDuration(e.visibleAt)),a.createElement("td",{className:"break-word ".concat(p.interactionCell)},a.createElement(t,{interaction:e.interaction}))):a.createElement(a.Fragment,null)}function h(e){return a.createElement(a.Fragment,null,e.interactive.timepoints.map((function(e,t){return e.interactions.map((function(n,r){return a.createElement(N,{key:"".concat(t,":").concat(r),interaction:n,visibleAt:e.visibleAt})}))})))}function _(e){var t=(new Date).getFullYear();return a.createElement("div",{id:e.worksheetElementId,className:p.worksheet},a.createElement("div",{className:"row pb-2"},a.createElement("div",{className:"col-6"},y("name")," ______________________________"),a.createElement("div",{className:"col-6"},y("date")," ______________________________")),a.createElement("h1",null,a.createElement("strong",null,y("questionSheet"),":")," ",e.interactive.name),a.createElement("table",null,a.createElement("tbody",null,a.createElement(h,{interactive:e.interactive}))),a.createElement("div",{className:p.cvLogo},a.createElement(m.$S,null)),e.isClickViewContent&&a.createElement("span",{className:p.copyright},y("copyright",{year:t})))}var k=l.T.encloseNamespace("interactives.utils");function C(e,t,n){var i=document.getElementById("print-region");if(i||s.Q.Ry.throw(new c.H("Could not find print region in layout")),e){var l="printable-interactive-".concat(e.id),m=(0,r.s)(i);m.render(a.createElement("div",{className:"d-none"},a.createElement(_,{worksheetElementId:l,interactive:e,isClickViewContent:t}))),window.setTimeout((function(){o()({printable:l,type:"html",documentTitle:k("worksheetTitle",{interactiveName:e.name}),targetStyles:["*"],style:"@page { size: A4; margin: 1.5cm 0; }",onLoadingEnd:function(){n&&n(),m.unmount()},font_size:"14px"})}),200)}}},74690:(e,t,n)=>{n.r(t),n.d(t,{PreviewQuestionsView:()=>N});var a=n(32735),r=n(23481),i=n(20354),o=n(28400),c=n(65858),l=n(83657),s=n(80181),m=n(9111),u=n(13876),d=n(20768),p=n(35223),g=n(14070),v=n(97291),f=n(90102),E=n(41630);const b={printBtn:"VWlur"};function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var y=r.T.encloseNamespace("interactives.previewQuestions");function N(e){var t,n,r,N,h,_=(N=a.useState(!1),h=2,function(e){if(Array.isArray(e))return e}(N)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(N,h)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}(N,h)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),k=_[0],C=_[1],T=i.a.useBasicFetch(d.b.interactiveMetadata(e.id)),I=i.a.useBasicFetch(T.data?d.b.interactive(T.data.interactiveId):null),S=null;T.data&&(S={id:T.data.id,interactiveId:T.data.interactiveId,name:T.data.name},(null===(t=T.data._parentVideo)||void 0===t?void 0:t.id)&&(S.video={id:T.data._parentVideo.id}),(null===(n=T.data._parentClip)||void 0===n?void 0:n.id)&&(S.clip={id:T.data._parentClip.id}));var A=[{label:y("watchInteractive"),className:"btn btn-outline-dark me-2",svgName:p.vn.Play,button:!0,appLink:{application:v.O.INTERACTIVES,action:g.e.Interactives.VIEW_INTERACTIVE,args:[e.id,o.m.slugify(null===(r=I.data)||void 0===r?void 0:r.name)]},onClick:e.closePopup,analyticsData:S,analyticsOptions:{entity:c.py.Interactive,actionType:c.Vw.Click,location:c.LZ.PreviewInteractiveQuestions,descriptor:c._S.Button}},{label:y("printAsWorksheet"),className:"btn btn-outline-dark ".concat(b.printBtn),svgName:p.vn.Print,button:!0,onClick:function(){var e;C(!0),(0,E.X)(I.data,null===(e=T.data._isClickViewContent)||void 0===e?void 0:e.value,(function(){return C(!1)}))},showSpinner:k,analyticsData:S,analyticsOptions:{entity:c.py.Interactive,actionType:c.Vw.Print,location:c.LZ.PreviewInteractiveQuestions,workflowPhase:c.eu.Start,eventVersion:c.eq.V2}}];return a.createElement(m.G,{title:y("mainTitle"),closePopup:e.closePopup,showLoadingSpinner:!I.data,size:"lg"},I.data?a.createElement(a.Fragment,null,a.createElement(s.Z,{interactive:I.data,maxHeight:f.x}),a.createElement(u.u,null,a.createElement(l.e,{actions:A}))):a.createElement(a.Fragment,null))}},90102:(e,t,n)=>{n.d(t,{x:()=>a});var a=368}}]);
|