@clickview/lite 0.34.0 → 0.34.1
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-821e224999.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-821e224999.min.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4657-fcd6ff63dd-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:()=>nn});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,L=r(63093),j=r(33003),k=r.n(j),C=r(84789);function O(t){return O="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},O(t)}function N(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 A(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)?A(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 A(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 P(){P=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"==O(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 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 A(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(O(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(A),!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),A(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;A(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 I(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==O(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===O(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var T={k12:"Primary & Secondary"},_={england:"ENG",scotland:"SCT",wales:"WLS","northern ireland":"NIR"},U=(I(x={},C.X.Auth,"auth.web"),I(x,C.X.Lite,"lite.web"),x),F={getClient:function(t){var e,r,n,o,a,i;return n=this,o=void 0,a=void 0,i=P().mark((function n(){var o,a,i,c,l,u;return P().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=U[t.productName],u=(0,L.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 k().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=N(t,2)[1];return null!=e&&!("string"==typeof e&&!e.length)})).reduce((function(t,e){var r=N(e,2),n=r[0],o=r[1];return Object.assign(Object.assign({},t),I({},n,o===Object(o)?F.removeEmptyKeys(o):o))}),{})},getEventTopic:function(){return"Free Trial Request"},getCustomEventType:function(){return L.ProductFormEvent.ProductTrailRequested},getProductFormEventType:function(){return"product_form_submission"},getSchoolType:function(t){if(t){var e=t.toLowerCase();if(!["unknown","other"].includes(e))return T[e]||t}},parseProvince:function(t){return t.length?_[t.toLowerCase()]||t:""}};function G(t){return G="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},G(t)}function D(){D=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"==G(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(G(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 R(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 M(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)?M(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 M(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 K=255,Y=/\$+[\w\s]?/,z=/^\+?\d{4,255}$/;function q(t){if(!t)return{firstName:"",surname:""};var e=t.split(" ").filter((function(t){return t.length}));return{firstName:e.shift(),surname:e.join(" ")}}var V=r(65858),B=r(45157),$=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 H="__googleMapsScriptId";var Z;!function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"}(Z||(Z={}));class J{constructor({apiKey:t,authReferrerPolicy:e,channel:r,client:n,id:o=H,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||H,this.language=a,this.libraries=i,this.mapIds=c,this.nonce=l,this.region=u,this.retries=s,this.url=f,this.version=p,J.instance){if(!$(this.options,J.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(J.instance.options)}`);return J.instance}J.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?Z.FAILURE:this.done?Z.SUCCESS:this.loading?Z.LOADING:Z.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 W(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 X(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)?X(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 X(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 Q(t){return new J({apiKey:t.apiKey,version:"weekly",libraries:t.libraries,retries:3})}function tt(t){var e={apiKey:t.apiKey,libraries:t.libraries||["places"]},r=W(n.useState(!1),2),o=r[0],a=r[1],i=W(n.useState(Q(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(Q(e))}return n.useEffect((function(){u()}),[]),{loader:c,scriptLoaded:o,onGoogleApiReady:u}}function et(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 rt(t){var e,r,o=tt({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 et(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)?et(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 nt(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 ot="us",at="country:placeholder:text";function it(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=rt({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(at,":").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 nt(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)?nt(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(at,":").concat(e),t,86400),v(t)}return n.useEffect((function(){if(!m&&h&&l){var t=(null==i?void 0:i.countryCode)||ot,e={input:String.fromCharCode(96+B.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[B.Y.getRandomInt(t.length)].description;b(s.replace(p,n),r)}else b(g.I.getLocalizedLocalityPlaceholderText(ot),r)}(e,r,t)}))}}),[m,h,i,l]),m}function ct(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 lt(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 ct(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)?ct(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 ut(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 st(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)?st(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 st(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 ft=function(t){var e,r,n,o,a,i=t.formatted_address,c=ut(t.address_components);try{for(c.s();!(a=c.n()).done;){var l,u=a.value,s=ut(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 pt(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 ht={1:"geocoderPermissionDenied",2:"geocoderUnavailable",3:"geocoderTimeout"},dt=r(28329);function yt(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 mt=r(11607);function vt(){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 gt={baseText:"KL3Q_",inputFocused:"I6wQy",input:"ChY5L",suggestionContainer:"Y78ea",noBottomBorder:"IeYUw",localitySuggestion:"P3aHR",suggestionItem:"magL7",suggestionLoading:"W7rH_",noSuggestion:"XXSnS",selected:"snnHR"};function bt(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 wt(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)?wt(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 wt(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=t.predictions,r=t.getPlaceInfo,o=t.selectedIndex;return n.createElement(n.Fragment,null,e.map((function(t,e){return n.createElement(mt.L,{className:"".concat(gt.suggestionItem," ").concat(o-1===e?gt.selected:""),key:t.place_id,onClick:function(){return r(t)}},t.description)})))}function St(t){var e,r,o,a,i,l,u=n.useRef(),s=bt(n.useState((null===(e=t.data)||void 0===e?void 0:e.schoolLocality)||""),2),f=s[0],p=s[1],h=bt(n.useState(!1),2),d=h[0],y=h[1],m=it({apiKey:t.googleMapsApiKey,geoLocation:t.geoLocation}),v=function(t){var e,r,o=t.search,a=t.makePredicition,i=t.geoLocation,c=rt({googleApiKey:t.apiKey}),l=(0,dt.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 yt(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)?yt(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=ft(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 pt(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)?pt(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=tt(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=ft(o);i(Object.assign(Object.assign({},a),{longitude:n,latitude:r}))}}))}function u(e){var r=ht[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=lt({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=bt(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:V.Vw.Click,descriptor:V.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(gt.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(gt.inputFocused):"".concat(U," ").concat(gt.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(gt.suggestionContainer," ").concat(gt.localitySuggestion),ref:C},n.createElement(Et,{predictions:g,getPlaceInfo:T,selectedIndex:j}),window.navigator.geolocation&&n.createElement(mt.L,{className:"".concat(gt.suggestionItem," px-1 ").concat(j-1===g.length?gt.selected:""),onClick:_},n.createElement("div",{className:"btn btn-link info-link btn-with-icon bg-transparent py-0 pe-1"},n.createElement(vt,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(vt,null),"Use my current location")),!!N&&n.createElement("div",{className:"text-danger p-2"},N)))}var xt=r(99940);function Lt(t){return Lt="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},Lt(t)}function jt(t){var e="function"==typeof Map?new Map:void 0;return jt=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 kt(t,arguments,Nt(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ot(r,t)},jt(t)}function kt(t,e,r){return kt=Ct()?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&&Ot(o,r.prototype),o},kt.apply(null,arguments)}function Ct(){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 Ot(t,e){return Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ot(t,e)}function Nt(t){return Nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nt(t)}var At=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&&Ot(t,e)}(a,t);var e,r,n,o=(r=a,n=Ct(),function(){var t,e=Nt(r);if(n){var o=Nt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Lt(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}(jt(Error));function Pt(t){return Pt="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},Pt(t)}function It(){It=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"==Pt(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(Pt(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 Tt=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 _t(t){var e={method:xt.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===xt.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 Ut={asyncFetch:function(t){return Tt(this,void 0,void 0,It().mark((function e(){var r,n,o;return It().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=_t(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 At(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 Tt(this,void 0,void 0,It().mark((function e(){var r,n;return It().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=_t(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=_t(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 Ft(t){return Ft="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},Ft(t)}function Gt(){Gt=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"==Ft(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(Ft(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 Dt,Rt={search:function(t,e,r,n,o){var a={longitude:e.longitude,latitude:e.latitude};e.query&&(a.query=e.query),Ut.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=Gt().mark((function r(){return Gt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Ut.asyncFetch({url:t.createProspect,method:xt.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 Ut.asyncFetch({url:t.prospectLookups(e)})}},Mt=r(97395),Kt=function(t,e){if(t.productName!==C.X.Lite)return Promise.reject();var r={email:e.email};return Ut.asyncFetch({url:t.userStatus,data:r})},Yt=function(t,e,r,n,o){var a=t.prospectStatus(e.prospectId);a=Mt._.urlBuilder(a,{email:e.email}),Ut.fetch({url:a,success:r,error:n,always:o})},zt=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 Ut.asyncFetch({url:t.createTrial,method:xt.k.POST,data:r})},qt=function(t,e,r){if(t.productName!==C.X.Lite)return Promise.reject();var n={email:r.email,appLink:null==r?void 0:r.appLink};return Ut.asyncFetch({url:t.resendTrialEmail(e),method:xt.k.POST,data:n})},Vt=function(t,e){var r=t.productName===C.X.Auth?t.joinRequest:t.joinRequest(e.customerId),n=t.productName===C.X.Auth?e:{email:e.email};return Ut.asyncFetch({url:r,method:xt.k.POST,data:n})},Bt=function(t,e){return t.productName!==C.X.Lite?Promise.reject():Ut.asyncFetch({url:t.autoJoin,method:xt.k.POST,data:e})};!function(t){t.FourteenDays="trial_14_v1",t.Freemium="freemium_v1"}(Dt||(Dt={}));var $t=function(t){return g.I.isCountryCodeUS(t)||g.I.isCountryCodeUK(t)?Dt.Freemium:Dt.FourteenDays},Ht=r(99504);function Zt(t){return Zt="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},Zt(t)}function Jt(){Jt=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"==Zt(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(Zt(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 Wt(t){var e=Ht.F.getUtmParameters(),r={prospect_id:null==t?void 0:t.prospectId,email:null==t?void 0:t.email,organisation_sub_type:F.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 F.removeEmptyKeys(r)}var Xt,Qt={submitFormEvent:function(t,e,r,n){return o=this,a=void 0,i=void 0,c=Jt().mark((function o(){var a,i;return Jt().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,F.getClient({brazeConfig:t.brazeConfig,productName:t.productName,geoLocation:t.geoLocation,version:t.version});case 2:a=o.sent,i=Wt(Object.assign(Object.assign({},r),{form_type:e})),a.openSession(),a.setUser(F.hashedEmail(null==r?void 0:r.email)),a.logEvent({type:F.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}},te=["Primary","Secondary","K12","Special","TAFE","University"],ee=["Elementary","Middle School","High School","College","Other"],re={au:te,nz:te,uk:["Primary","Secondary","Primary & Secondary","Special","Sixth Form College","FE College","University","Other"],us:ee};function ne(t){return ne="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},ne(t)}function oe(){oe=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"==ne(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(ne(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 ae(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 ie(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)?ie(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 ie(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"}(Xt||(Xt={}));var ce=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 le(t,e){return e?"".concat(t," ").concat(e):t}var ue=function(t){return n.createElement("h1",{className:le("text-center mb-2 h4",t.className)},t.children)},se=function(t){return n.createElement("div",{className:le("text-center text-sm px-2 px-lg-4",t.className)},t.children)},fe=function(t){return n.createElement("p",{className:le("",t.className)},t.children)};function pe(t){return pe="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},pe(t)}function he(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==pe(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===pe(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function de(t){var e,r=(he(e={},y.Available,t.imageUrls.statusImages.available),he(e,y.Active,t.imageUrls.statusImages.active),he(e,y.Expired,t.imageUrls.statusImages.expired),he(e,y.NotRequired,t.imageUrls.statusImages.notRequired),he(e,y.Unavailable,t.imageUrls.statusImages.unavailable),he(e,y.Unsupported,t.imageUrls.statusImages.unsupported),he(e,y.UserAutoJoinAllowed,t.imageUrls.statusImages.notRequired),he(e,y.UserJoinApprovalRequired,t.imageUrls.statusImages.notRequired),e);return n.createElement("div",{className:"d-flex justify-content-center my-4 px-2 px-lg-4"},n.createElement("img",{src:r[t.trialStatus],className:"w-100 h-auto"}))}var ye=r(69624);function me(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(se,{className:"mb-3"},e?n.createElement(n.Fragment,null,n.createElement(ue,null,r,n.createElement("br",null),"already has ClickView 🎉"),n.createElement(fe,{className:"mt-3"},"If your school has SSO ",n.createElement("a",{href:ye.F.getLoginLink({email:t.email,customerId:t.customerId}),className:"info-link"},"click here to sign in.")),n.createElement(fe,null,"Otherwise please contact your school admin for access.")):n.createElement(n.Fragment,null,n.createElement(ue,null,"Good News!"),n.createElement(fe,null,"An account already exists for:",n.createElement("br",null)," ",n.createElement("strong",null,t.email)),n.createElement(fe,null,n.createElement("a",{href:ye.F.getLoginLink({email:t.email}),className:"btn btn-dark btn-lg w-100"},"Sign into ClickView"))),n.createElement(fe,null,"Need Help? ",n.createElement("a",{href:ye.F.getSupportUrlForGeoLocation(t.geoLocation),className:"info-link",target:"_blank"},"Contact our Help Centre.")))}function ve(t){return ve="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},ve(t)}function ge(){ge=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"==ve(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(ve(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 be(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 we(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)?we(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 we(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 Ee;function Se(t){return Se="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},Se(t)}function xe(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==Se(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Se(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Le=(xe(Ee={},y.Available,(function(t){var e=be(n.useState(0),2),r=e[0],o=e[1],a=be(n.useState(!1),2),i=a[0],c=a[1];if(null==t?void 0:t.email)return n.createElement(se,null,n.createElement(ue,null,"Success!"),n.createElement(fe,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(fe,null,"Didn't receive an email? ",n.createElement("button",{onClick:function(e){return n=this,a=void 0,i=void 0,l=ge().mark((function n(){return ge().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==e||e.preventDefault(),n.prev=1,n.next=4,qt(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:V.Vw.Click,descriptor:V.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(fe,{className:"mb-0 text-danger"},"❌ There was a problem resending the email. Please try again later or contact our ",n.createElement("a",{href:ye.F.getSupportUrlForGeoLocation(t.geoLocation),className:"info-link"},"support"))))})),xe(Ee,y.Active,me),xe(Ee,y.Expired,(function(t){var e=ye.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(se,null,n.createElement(ue,null,r?"".concat(o," trial has expired"):"Your trial has expired"),n.createElement(fe,null,"Please contact our ",n.createElement("a",{href:e,className:"info-link",target:"_blank"},"ClickView Sales Team")))})),xe(Ee,y.NotRequired,me),xe(Ee,y.Unavailable,(function(t){var e=ye.F.getMarketingSalesContactForGeoLocation(t.geoLocation);return n.createElement(se,null,n.createElement(ue,null,"Your school no longer",n.createElement("br",null)," has access to ClickView"),n.createElement(fe,null,"Please contact our ",n.createElement("a",{href:e,className:"info-link"},"ClickView Sales Team")," for more information."))})),xe(Ee,y.Unsupported,(function(){return n.createElement(se,null,n.createElement(ue,{className:"px-2 px-lg-4"},"ClickView isn't currently ",n.createElement("br",null)," available for your school"),n.createElement(fe,null,"We're working hard to get ClickView ready for more people."))})),xe(Ee,y.UserAutoJoinAllowed,me),xe(Ee,y.UserJoinApprovalRequired,me),Ee);function je(t){var e=Le[t.trialStatus];return n.createElement(e,Object.assign({},t))}var ke="young-student",Ce={"trial-status":function(t){return n.useEffect((function(){var e={actionType:V.Vw.Create,descriptor:V.Yu.DeadEnd,workflowPhase:V.eu.Discard};t.trialCreated&&(e.descriptor=V.Yu.TrialCreated,e.workflowPhase=V.eu.Complete),t.logUserAction({},e)}),[]),n.createElement(n.Fragment,null,n.createElement(de,{trialStatus:t.trialStatus,imageUrls:t.imageUrls}),n.createElement(je,Object.assign({},t)))},"added-to-braze":function(t){return n.useEffect((function(){t.logUserAction({},{actionType:V.Vw.Create,descriptor:V.Yu.TrialRequested,workflowPhase:V.eu.Complete})}),[]),n.createElement(n.Fragment,null,n.createElement(de,{trialStatus:y.Available,imageUrls:t.imageUrls}),n.createElement(se,{className:"mb-3"},n.createElement(ue,null,"Submitted!"),n.createElement(fe,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=ye.F.getFreeResourcesForGeoLocation(t.geoLocation);return n.useEffect((function(){o.SG.set(ke,!0)}),[]),n.createElement(n.Fragment,null,n.createElement(de,{trialStatus:y.Active,imageUrls:t.imageUrls}),n.createElement(se,{className:"mb-3"},n.createElement(ue,null,"Discover our free content"),n.createElement(fe,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(de,{trialStatus:y.Available,imageUrls:t.imageUrls}),n.createElement(se,{className:"mb-3"},n.createElement(ue,null,"You've requested access!"),n.createElement(fe,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 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 Ne(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)?Ne(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 Ne(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 Ae(t,e,r){return"".concat(t.padStart(4,"0"),"-").concat(e.padStart(2,"0"),"-").concat(r.padStart(2,"0"))}function Pe(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 Ie="gVdYS",Te="Mlp3x";function _e(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(Ie),onClick:function(){return r(e)}},e.logoUrl&&n.createElement("img",{src:e.logoUrl,className:Te}),"Continue with ",e.name)}var Ue=[{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"}],Fe=r(93824);var Ge;function De(t){return De="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},De(t)}function Re(){Re=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"==De(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(De(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 Me(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 Ke(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)?Ke(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 Ke(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 Ye(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==De(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==De(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===De(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ze=new RegExp(/^[^\s@]+@[^\s@]+\.[^\s@]+$/),qe=(Ye(Ge={},Fe.C.AU,"valerie.frizzle@school.edu.au"),Ye(Ge,Fe.C.UK,"valerie.frizzle@school.gov.uk"),Ye(Ge,Fe.C.US,"valerie.frizzle@school.gov"),Ye(Ge,Fe.C.NZ,"valerie.frizzle@school.nz"),Ge);function Ve(t){return qe[g.I.getCountryCode(t.countryCode)]||qe.us}var Be=[y.Expired,y.NotRequired,y.Unavailable,y.Unsupported,y.Active];function $e(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 He=r(12238);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}function We(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 Xe(t){return Xe="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},Xe(t)}function Qe(){Qe=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"==Xe(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(Xe(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 tr=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())}))},er=r(80247);function rr(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 nr(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)?nr(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 nr(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 or(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(mt.L,{className:"".concat(gt.suggestionItem," ").concat(a-1===e?gt.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 ar(t){return n.createElement("div",{className:"info-link ".concat(gt.suggestionItem," ").concat(gt.noSuggestion," ").concat(t.selected?gt.selected:""),onClick:t.handleNoSuggestion},"Can't find your school?")}function ir(t){var e,r,o=n.useRef(),a=rr(n.useState(!0),2),i=a[0],l=a[1],u=rr(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=rr(n.useState(),2),h=p[0],d=p[1],y=(0,dt.N)(s,250),m=lt({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),Rt.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:V.Vw.Click,descriptor:V.Yu.CantFindSchool,workflowPhase:V.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?gt.inputFocused:gt.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(gt.suggestionContainer," ").concat(N?"":"d-none"),ref:b},x?n.createElement(or,{filteredSchoolsList:h,onSchoolSuggestionClick:k,getSchoolName:C,selectedIndex:v}):E&&n.createElement("div",{className:"".concat(gt.suggestionLoading," py-4 d-flex justify-content-center")},n.createElement(er.Z,{animation:"border"})),!E&&(null==h?void 0:h.length)<5&&n.createElement(ar,{selected:v===h.length+1,handleNoSuggestion:O}))))}function cr(t){return cr="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},cr(t)}function lr(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 ur(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)?ur(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 ur(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 sr="R8ZPi",fr="SNEmW",pr="BSfO7";function hr(t){return n.createElement(n.Fragment,null,n.createElement(mt.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(sr," ").concat(t.selected?fr:""),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(mt.L,{className:"btn btn-lg btn-outline-dark w-100 d-sm-none d-block mx-auto ".concat(pr),onClick:function(){return t.onClick(t.type)}},t.buttonText))}var dr={"select-type":function(t){function e(e){t.logUserAction({userType:e},{actionType:V.Vw.Click,workflowPhase:V.eu.Next,descriptor:e===v.Staff?V.Yu.Educator:V.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(hr,{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(hr,{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=Me(n.useState(!1),2),l=i[0],u=i[1],s=Me(n.useState((null==t?void 0:t.email)||""),2),f=s[0],p=s[1],h=Me(n.useState(),2),d=h[0],y=h[1],w=(o=t.geoLocation,a=ye.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=Re().mark((function e(){var r;return Re().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f.length?ze.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,Kt(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:V.Vw.Click,workflowPhase:V.eu.Next,descriptor:V.Yu.EnterEmail}),!Be.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:Ve(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:V.Vw.Click,descriptor:V.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")}),Ue.map((function(t,e){return n.createElement(_e,{onClick:S,idp:t,key:e})}))),n.createElement("div",{className:"text-center"},n.createElement(Pe,{link:ye.F.getLoginLink(),onClick:function(){t.logUserAction({},{actionType:V.Vw.Click,descriptor:V.Yu.SignIn})}})))},"find-school":function(t){var e,r,o=t.email,a=t.userType,i=lr(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=lr(n.useState(),2),s=u[0],f=u[1],p=lr(n.useState(),2),h=p[0],d=p[1],m=lr(n.useState(!1),2),g=m[0],w=m[1],E=lr(n.useState(!1),2),S=E[0],x=E[1],L=lr(n.useState(!1),2),j=L[0],k=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 tr(this,void 0,void 0,Qe().mark((function t(){return Qe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Bt(f,{prospectId:u.prospectId,email:d});case 3:c({},{actionType:V.Vw.Click,descriptor:V.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 tr(this,void 0,void 0,Qe().mark((function e(){var r,n;return Qe().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,Rt.getLookups(f,u.prospectId);case 4:n=e.sent,r=null===(t=n.find((function(t){return t.type===He.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 tr(this,void 0,void 0,Qe().mark((function t(){return Qe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Qt.submitFormEvent({brazeConfig:b,productName:s,geoLocation:w,version:E},"trial-sign-up",Object.assign(Object.assign({},u),{email:d,province:F.parseProvince(u.province)}));case 2:case"end":return t.stop()}}),t)})))}function j(){var t;return tr(this,void 0,void 0,Qe().mark((function e(){var r;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(!0),e.prev=1,e.next=4,zt(f,{userType:a,email:d,prospectId:null==u?void 0:u.prospectId,appLink:m,accessPolicy:$t(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:V.Vw.Click,descriptor:V.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 tr(this,void 0,void 0,Qe().mark((function t(){return Qe().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!==C.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===C.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:V.Vw.Click,descriptor:V.Yu.FindSchool,workflowPhase:V.eu.Next};t.logUserAction(c||{},e)},setLoadingState:function(t){x(t),k(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),Yt(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"!==cr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==cr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===cr(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(St,{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(ir,{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=ae(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=ae(n.useState(),2),u=l[0],s=l[1],f=ae(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),re[o]||ee);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"!==ne(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===ne(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 ce(this,void 0,void 0,oe().mark((function e(){var r,n,o,a,c;return oe().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,Qt.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(St,{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 ce(this,void 0,void 0,oe().mark((function n(){var o,a,c;return oe().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:V.Vw.Click,workflowPhase:V.eu.Next,descriptor:V.Yu.CantFindSchool}),h(!0),n.prev=5,n.next=8,Rt.create(t.ajaxUrls,{name:i.schoolName,status:Xt.Draft,countryCode:i.country,prospectType:i.schoolType,city:i.city,postCode:i.schoolPostCode,province:F.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,zt(t.ajaxUrls,{userType:t.userType,email:t.email,prospectId:o.id,appLink:t.pageAppLinkString,accessPolicy:$t(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=Ce[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=R(n.useState(!1),2),o=r[0],a=r[1],c=R(n.useState({}),2),l=c[0],u=c[1];function s(e){var r=q(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:F.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:F.getEventTopic()};return F.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=q(e),a=o.firstName,i=o.surname,c={};return a&&i||(c.fullname="Please enter your full name."),(Y.test(a)||Y.test(i))&&(c.fullname="Please enter your full name."),e.length>K&&(c.fullname="Full name cannot exceed max length of ".concat(K," characters.")),(null==r?void 0:r.length)||(c.jobTitle="Please enter your job title."),Y.test(r)&&(c.jobTitle="Please enter a valid job title."),r.length>K&&(c.jobTitle="Job Title cannot exceed max length of ".concat(K," characters.")),(null==n?void 0:n.length)||(c.phone="Please enter your phone number."),!Y.test(n)&&z.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=D().mark((function r(){var n,c,p,h,d,y,m;return D().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,F.getClient({brazeConfig:t.brazeConfig,geoLocation:c,productName:t.productName,version:t.version});case 11:p=r.sent,h=q(e.fullname),d=h.firstName,y=h.surname,m={prospect_id:null==t?void 0:t.prospectId,organisation_sub_type:F.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:F.parseProvince((null==t?void 0:t.province)||"")},job_title:e.jobTitle,sync_to_crm:!0},m=F.removeEmptyKeys(m);try{p.setUser(F.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:F.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=Oe(n.useState(""),2),r=e[0],o=e[1],a=Oe(n.useState(""),2),i=a[0],c=a[1],l=Oe(n.useState(""),2),u=l[0],s=l[1],f=Oe(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(Ae(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(Ae(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 We(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)?We(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(de,{trialStatus:y.UserJoinApprovalRequired,imageUrls:t.imageUrls}),n.createElement(se,{className:"mb-3"},n.createElement(ue,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=Je().mark((function r(){var n,o;return Je().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Rt.getLookups(t.ajaxUrls,t.prospectId);case 3:if(n=r.sent,o=null===(e=n.find((function(t){return t.type===He.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,Vt(t.ajaxUrls,{customerId:o,email:t.email});case 10:t.logUserAction({},{actionType:V.Vw.Click,descriptor:V.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($e(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(fe,{className:"text-center"},"Need Help? ",n.createElement("a",{href:ye.F.getSupportUrlForGeoLocation(t.geoLocation),className:"info-link",target:"_blank"},"Contact our Help Centre.")))}};function yr(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=dr[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 mr=r(1048);const vr={buttonContainer:"izZtA",dataContainer:"OgBv5"};function gr(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 br(t){var e={};return Object.keys(t).forEach((function(r){var n=t[r];mr.t.isObject(n)&&null!==n&&!Array.isArray(n)?Object.assign(e,br(n)):e[r]=n})),e}function wr(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 Er(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 gr(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)?gr(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 br(a)}),[a]);return o&&n.createElement(n.Fragment,null,n.createElement("div",{className:"position-fixed p-4 ".concat(vr.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(vr.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(wr,{key:t,label:t,item:u[t]})})))))}var Sr=r(83529);const xr={crumb:"Btmx2"};function Lr(t,e){var r="rounded-circle mx-2 d-inline-block "+xr.crumb,n=t===e?"bg-info":"bg-light";return"".concat(r," ").concat(n)}function jr(t){return n.createElement("div",{className:"text-center"},t.crumbs.map((function(e){return n.createElement("div",{className:Lr(t.currentStep,e),key:e})})))}var kr=r(98461);function Cr(t){var e=ye.F.getTermsAndConditionsLink(),r=ye.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(kr.d,{href:e,onClick:t.onClickTermsAndConditions,className:"info-link",newTab:!0},"Terms and Conditions")," and ",n.createElement(kr.d,{href:r,onClick:t.onClickPrivacyPolicy,className:"info-link",newTab:!0},"Privacy Policy"))}var Or=r(83914),Nr=r(35223);function Ar(t){return n.createElement("button",{onClick:t.onClick,className:"btn p-0 cursor-pointer d-inline-flex align-items-center"},n.createElement(Or.x,{svgName:Nr.vn.ChevronLeft,size:Or.S.Medium}),t.children)}var Pr=r(2786);Tr.defaultProps={showBackButton:!0};var Ir=["select-type","enter-email","find-school"];function Tr(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"},Ir.includes(e)&&n.createElement(jr,{crumbs:Ir,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(Ar,{onClick:function(){r(),t.logUserAction({step:e},{actionType:V.Vw.Click,descriptor:V.Yu.Back,workflowPhase:V.eu.Back})}}),n.createElement("div",{className:"d-flex justify-content-center align-items-center px-2 ".concat("J97w_")},n.createElement(Pr.$S,null))),i),n.createElement("div",{className:"position-relative mb-4 mt-3 text-center"},"select-type"===e&&n.createElement(Pe,{link:ye.F.getLoginLink(),onClick:function(){t.logUserAction({},{actionType:V.Vw.Click,descriptor:V.Yu.SignIn})}}),["enter-email","find-school","add-to-braze"].includes(e)&&n.createElement(Cr,{onClickTermsAndConditions:function(){t.logUserAction({},{actionType:V.Vw.Click,descriptor:V.Yu.TermsAndConditions})},onClickPrivacyPolicy:function(){t.logUserAction({},{actionType:V.Vw.Click,descriptor:V.Yu.PrivacyPolicy})}})))}var _r=r(28366);Dr.defaultProps={showBackButton:!0};var Ur,Fr=["enter-email","find-school"],Gr=["enter-email","find-school","cant-find-school","add-to-braze","enter-age","request-access"];function Dr(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:V.Vw.Click,descriptor:V.Yu.Back,workflowPhase:V.eu.Back})}var s=Gr.includes(t.currentStep),f=s?"".concat(_r.Z.leftHalfLayout," ").concat(_r.Z.withBg):_r.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(_r.Z.popupButton)},o&&l()&&a&&n.createElement(Ar,{onClick:u})),n.createElement("div",{className:"col col-lg-6 px-0"},n.createElement("div",{className:_r.Z.logo},n.createElement("div",{className:"d-none d-lg-block"},s?n.createElement(Pr.Yo,null):n.createElement(Pr.$S,null)),n.createElement("div",{className:"d-block d-lg-none mt-1"},n.createElement(Pr.$S,null),Fr.includes(t.currentStep)&&n.createElement("div",{className:"mt-3"},n.createElement(jr,{crumbs:Fr,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(_r.Z.popupButton)},o&&l()&&a&&n.createElement(Ar,{onClick:u}))),Fr.includes(t.currentStep)&&n.createElement("div",{className:"d-none d-lg-block align-self-center"},n.createElement(jr,{crumbs:Fr,currentStep:e})),n.createElement(mt.L,{onClick:i,className:_r.Z.popupButton},n.createElement(Or.x,{svgName:Nr.vn.Close,size:Or.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(Pe,{link:ye.F.getLoginLink(),onClick:function(){t.logUserAction({},{actionType:V.Vw.Click,descriptor:V.Yu.SignIn})}}),["enter-email","add-to-braze"].includes(e)&&n.createElement(Cr,{onClickTermsAndConditions:function(){t.logUserAction({},{actionType:V.Vw.Click,descriptor:V.Yu.TermsAndConditions})},onClickPrivacyPolicy:function(){t.logUserAction({},{actionType:V.Vw.Click,descriptor:V.Yu.PrivacyPolicy})}}))))))}function Rr(t){return Rr="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},Rr(t)}function Mr(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==Rr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Rr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Rr(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Kr={"cant-find-school":Dr,"enter-email":Dr,"find-school":Dr,"select-type":Dr,completed:Dr,"add-to-braze":Dr,"enter-age":Dr,"request-access":Dr},Yr={"cant-find-school":Tr,"enter-email":Tr,"find-school":Tr,"select-type":Tr,completed:Tr,"add-to-braze":Tr,"enter-age":Tr,"request-access":Tr},zr=(Mr(Ur={},Sr.c.FullPage,Yr),Mr(Ur,Sr.c.Popup,Kr),Ur),qr={getLayouts:function(t){return zr[t]}},Vr=r(17331);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){return $r="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},$r(t)}function Hr(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)||Zr(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 Zr(t,e){if(t){if("string"==typeof t)return Jr(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)?Jr(t,e):void 0}}function Jr(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 Wr(t,e){var r,n,o=Object.assign(Object.assign({},t),{previousStepIds:[].concat((n=t.previousStepIds,function(t){if(Array.isArray(t))return Jr(t)}(n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||Zr(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!==Hr(t,2)[1]})).reduce((function(t,e){var r=Hr(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"!==$r(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==$r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===$r(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 Xr(t,e){switch(e.type){case"nextStep":return Wr(t,e);case"back":return function(t){var e,r=function(t){if(Array.isArray(t))return Br(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 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}}(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 Qr(t){return Qr="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},Qr(t)}function tn(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 en(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)?en(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 en(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 rn=function(t){var e=t.location,r=t.initialValues,o=t.onStepUpdate,a=t.externalLogUserAction,c=F.removeEmptyKeys(r),l=Object.assign({currentStepId:"select-type",previousStepIds:[]},c),u=tn(n.useReducer(Xr,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=Vr.i.filterBlacklistedKeys(n),c=Object.assign({currentStepId:s.currentStepId},o),l=Object.entries(c).filter((function(t){return void 0!==tn(t,2)[1]})).reduce((function(t,e){var r=tn(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"!==Qr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Qr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Qr(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 nn(t){var e=qr.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=rn({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(ke)&&w({completionStep:"young-student",trialCreated:!1,trialStatus:null})}),[]),n.createElement(n.Fragment,null,n.createElement(yr,Object.assign({},L)),n.createElement(Er,{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 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5041],{86877:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(23481);function o(e){return o="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},o(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===o(i)?i:String(i)),r)}var i}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var a=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(f,e);var t,n,a,l,s=(a=f,l=function(){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(e){return!1}}(),function(){var e,t=c(a);if(l){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),s.call(this,e)}return t=f,(n=[{key:"name",get:function(){return"FileTypeError"}},{key:"lang",get:function(){return"upload.fileType"}},{key:"dialogOptions",get:function(){return{title:r.T.getPhrase(this.lang,"heading"),text:r.T.getPhrase(this.lang,"body"),buttons:[{text:r.T.getPhrase(this.lang,"okay"),className:"btn btn-dark",success:!0},{text:r.T.getPhrase(this.lang,"close"),className:"btn btn-link",close:!0}]}}}])&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(n(47663).S)},25041:(e,t,n)=>{n.r(t),n.d(t,{BaseVideoUploadService:()=>Y,LearningResourceUploadService:()=>te,SubtitleUploadService:()=>ee,UploadType:()=>H});var r,o=n(48088),i=n(39479),u=n(46865),c=n(79976),a=n(37433),l=n(54149),s=n(71365),f=n(23481),p=n(70794),d=n(81886),y=n(49985),h=n(65858),v=n(29555);!function(e){e[e.Permanent=0]="Permanent",e[e.Temporary=1]="Temporary"}(r||(r={}));var g=n(86877),b=n(6339),m=n(52003),w=n(60735),S=n(53301),O=n(47663);function k(e){return k="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},k(e)}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==k(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===k(o)?o:String(o)),r)}var o}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function U(e){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},U(e)}var T="upload.internetConnectivityError",R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(u,e);var t,n,r,o,i=(r=u,o=function(){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(e){return!1}}(),function(){var e,t=U(r);if(o){var n=U(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),i.call(this,f.T.getPhrase(T,"title"))}return t=u,(n=[{key:"name",get:function(){return"InternetConnectivityError"}},{key:"dialogOptions",get:function(){return{title:f.T.getPhrase(T,"heading"),text:f.T.getPhrase(T,"body"),buttons:[{text:f.T.getPhrase(T,"okay"),className:"btn",success:!0}]}}}])&&P(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(O.S),E=n(44331);function _(e){return _="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},_(e)}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===_(o)?o:String(o)),r)}var o}function F(e,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},F(e,t)}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}var I,C,D=[],z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}(l,e);var t,n,r,u,c,a=(u=l,c=function(){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(e){return!1}}(),function(){var e,t=L(u);if(c){var n=L(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,n=[{key:"name",get:function(){return"DropzoneWrapper"}},{key:"initialize",value:function(e){var t=this.options.loggingEnabled,n=o.Radio.channel(e.channelName),r=this;this.dropzone=new S(document.createElement("div"),{url:function(e){return e[0].cvUpload.ingestUrl},chunking:this.options.chunkingEnabled,chunkSize:this.options.chunkSize,forceChunking:!0,autoProcessQueue:!0,maxFilesize:this.options.maxFileSize,acceptedFiles:this.options.acceptedFiles,paramName:"content",init:function(){var e=this;t&&(i.each(D,(function(t){e.on(t,(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=n[0]instanceof File?n[0].name:n[0];console.info(t,o,n)}))})),this.on("uploadprogress",(function(e,t,o){var i=o/e.size*100;n.trigger("progress",r.getId(e),i,o)})),this.on("success",(function(e){var t=e.upload.chunks,r=i.last(t),o=r.xhr;o||(o=r.file.xhr);var u=JSON.parse(o.response);e.cvUpload.fileId=u.id,n.trigger("upload:success",e,u)})),this.on("error",(function(e,t,n){n&&0===n.status?d.Q.Ry.throw(new R):"canceled"!==e.status&&d.Q.Ry.throw(new E.n(f.T.getPhrase("upload.services","uploadError",{fileName:e.name,message:t.message})))})))},params:function(e,t,n){if(n)return{chunk_index:n.index,upload_length:n.file.size}},addedfile:function(){},thumbnail:function(){},uploadprogress:function(){}})}},{key:"getId",value:function(e){return e.upload.uuid}},{key:"addFile",value:function(e){this.dropzone.addFile(e)}},{key:"removeFile",value:function(e){this.dropzone.removeFile(e)}},{key:"start",value:function(){this.dropzone.processQueue()}},{key:"destroy",value:function(){this.dropzone.destroy()}}],r=[{key:"isValidFile",value:function(e,t){return S.isValidFile(e,t)}}],n&&x(t.prototype,n),r&&x(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(d.Q.t6);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 A(e,t,n){return(t=q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,q(r.key),r)}}function Q(e,t,n){return t&&B(e.prototype,t),n&&B(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function q(e){var t=function(e,t){if("object"!==V(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==V(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===V(t)?t:String(t)}function M(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}function J(e){var t=function(){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(e){return!1}}();return function(){var n,r=G(e);if(t){var o=G(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}var H,W=function(e){M(n,e);var t=J(n);function n(){var e;return N(this,n),(e=t.call(this,{dataProvider:s.u.getInstance(a.R.Ajax),cache:s.u.getInstance(u.p.Fifo),alertService:s.u.getInstance(c.P.ALERT)})).incrementingUploadId=0,e}return Q(n,[{key:"name",get:function(){return"UploadDataService"}},{key:"channelName",get:function(){return"private:upload:data:service"}},{key:"requestUploads",value:function(e,t,n,r,o){var u=this,c=this.chain();i.each(t,(function(t){u.incrementingUploadId++,c.create({resource:e,eventPrefix:"request:upload:".concat(u.incrementingUploadId),data:u.getFileUploadRequest(t,n),callback:function(e){r(t,e)},errorHandler:u.alertService.error("Something went wrong while we were uploading your video. Please try again.")})})),c.func((function(){o()})).run()}},{key:"cancelUpload",value:function(e,t,n){this.create({resource:"/api/upload/cancel",eventPrefix:"cancel:upload",data:{uploadId:e,ingestUrl:t},callback:n})}},{key:"getFileUploadRequest",value:function(e,t){var n=e.name.split(".");return{name:n.join("."),extension:n.length>1?n.pop():"",fileSize:e.size,fileLifestyle:t}}},{key:"onDestroy",value:function(){s.u.releaseInstance(a.R.Ajax).releaseInstance(u.p.Fifo)}}]),n}(l.B);!function(e){e[e.Video=0]="Video",e[e.LearningResource=1]="LearningResource",e[e.Subtitle=2]="Subtitle"}(H||(H={}));var $=(A(I={},H.Video,"video/*"),A(I,H.LearningResource,b.l.RESOURCES),A(I,H.Subtitle,b.l.SUBTITLES),I),K=(A(C={},H.Video,m.Q4.VIDEO_UPLOAD),A(C,H.LearningResource,m.Q4.RESOURCE_UPLOAD),A(C,H.Subtitle,m.Q4.SUBTITLE_UPLOAD),C),X=function(e){M(n,e);var t=J(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return N(this,n),t.call(this,Object.assign({uploadUrl:"/api/upload"},e))}return Q(n,[{key:"initialize",value:function(){this.uploadDataService=new W,this.progressViewModel=p.r.get("upload:progress:".concat(this.uploadType)),this.bindListeners()}},{key:"channelName",get:function(){return K[this.uploadType]}},{key:"lang",get:function(){return"uploadShared.services"}},{key:"initUploader",value:function(e,t){if(!this.uploader){var n=4194304;e&&n<e&&(n=e),t&&n>t&&(n=t),this.uploader=new z({chunkingEnabled:!0,loggingEnabled:!0,chunkSize:n,maxFileSize:53687091200,acceptedFiles:this.getAcceptedFiles(),channelName:this.channelName})}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"progress",this.onProgress),this.listenTo(this.channelName,"upload:success",this.onSuccess)}},{key:"onProgress",value:function(e,t,n){var r=this.collection.get(e);r&&(r.set({progress:t>100?100:t,totalUploaded:n}),this.setOverallProgress())}},{key:"isUploading",value:function(){return!!this.getCollection().length}},{key:"getCollection",value:function(){return this.collection||(this.collection=new d.Q.FE),this.collection}},{key:"setOverallProgress",value:function(){var e=this,t=0,n=0,r=this.getCollection();if(r.length){r.each((function(e){t+=e.get("totalUploaded")||0,n+=e.get("file").size||0}));var o=t/n*100,i=o>=100,u=function(){e.progressViewModel.set({progress:i?100:o,done:i})};i?window.setTimeout(u,2e3):u()}else this.progressViewModel.set({progress:0})}},{key:"isValidFile",value:function(e){return z.isValidFile(e,this.getAcceptedFiles())}},{key:"addFiles",value:function(e,t){var n=this;i.any(e,(function(e){return!n.isValidFile(e)}))?d.Q.Ry.throw(new g.Z(f.T.getPhrase(this.lang,"invalidFileType"))):this.requestUploads(e,t)}},{key:"requestUploads",value:function(e,t){var n=this,r=this.isUploading(),i=this.getCollection();this.uploadDataService.requestUploads(this.options.uploadUrl,e,this.fileLifestyle,(function(e,t){n.initUploader(1024*t.minChunkSize,1024*t.maxChunkSize),e.cvUpload={uploadId:t.uploadId,ingestUrl:t.ingestUrl},n.uploader.addFile(e);var r=e.name;n.uploadType===H.Video&&(r=r.replace(/\.[^/.]+$/,"")),i.add(Object.assign({id:n.uploader.getId(e),file:e,name:r},n.getAdditionalFileInfo(e,t)),{at:i.length-1})}),(function(){t&&y.k.logUserAction({uploadCount:e.length},t),o.Radio.channel(n.channelName).trigger(v.S.FILES_ADDED,e,r)}))}},{key:"addFile",value:function(e,t){this.addFiles([e],t)}},{key:"cancelUpload",value:function(e){var t=this,n=this.getCollection(),r=n.get(e);if(r){var i=r.get("file");this.uploader.removeFile(i),n.remove(r),this.uploadDataService.cancelUpload(i.cvUpload.uploadId,i.cvUpload.ingestUrl,(function(){y.k.logUserAction(r.toJSON(),{entity:h.py.Video,actionType:h.Vw.Upload,workflowPhase:h.eu.Discard,descriptor:h.yh.Single,location:h.LZ.MyUploads}),o.Radio.channel(t.channelName).trigger(v.S.UPLOAD_CANCELLED)})),this.setOverallProgress()}}},{key:"onSuccess",value:function(e,t){var n=this.uploader.getId(e),r=this.getCollection().get(n);r.set("fileInfo",t),y.k.logUserAction({id:e.cvUpload.uploadId},{entity:h.py.Video,actionType:h.Vw.Upload,workflowPhase:h.eu.Complete,descriptor:h.yh.Single,location:h.LZ.VideoUpload}),o.Radio.channel(this.channelName).trigger(v.S.UPLOAD_COMPLETE,r)}},{key:"cancelAllUploads",value:function(){var e=this,t=this.getCollection().map((function(e){return e.get("id")}));i.each(t,(function(t){return e.cancelUpload(t)}))}},{key:"getAcceptedFiles",value:function(){return $[this.uploadType]}},{key:"getAdditionalFileInfo",value:function(e,t){return{}}}]),n}(d.Q.t6),Y=function(e){M(n,e);var t=J(n);function n(){return N(this,n),t.apply(this,arguments)}return Q(n,[{key:"uploadType",get:function(){return H.Video}},{key:"name",get:function(){return w.D.VideoUpload}},{key:"fileLifestyle",get:function(){return r.Temporary}}]),n}(X),ee=function(e){M(n,e);var t=J(n);function n(){return N(this,n),t.apply(this,arguments)}return Q(n,[{key:"uploadType",get:function(){return H.Subtitle}},{key:"name",get:function(){return w.D.SubtitleUpload}},{key:"fileLifestyle",get:function(){return r.Permanent}}]),n}(X),te=function(e){M(n,e);var t=J(n);function n(){return N(this,n),t.apply(this,arguments)}return Q(n,[{key:"uploadType",get:function(){return H.LearningResource}},{key:"name",get:function(){return w.D.ResourceUpload}},{key:"fileLifestyle",get:function(){return r.Permanent}}]),n}(X)},6339:(e,t,n)=>{n.d(t,{l:()=>p,v:()=>d});var r=n(39479),o=["pdf"],i=["doc","docx","dotx","dot","rtf","docm","odt"],u=["csv","txt"],c=["xls","xlt","xlsx"],a=["jpg","tif","png","bmp","gif","jpeg"],l=["zip","rar"],s=["ppt","pot","pps","pptx"],f=["srt"],p={IMAGES:".".concat(a.join(",.")),RESOURCES:".".concat([].concat(i,c,s,o,u,a,l).join(",.")),SUBTITLES:".".concat(f.join(",."))},d={getResourceType:function(e){var t=e.toLowerCase();return r.contains(i,t)?"document":r.contains(c,t)?"excel":r.contains(s,t)?"powerpoint":r.contains(o,t)?"pdf":r.contains(u,t)?"text":r.contains(a,t)?"image":r.contains(l,t)?"archive":r.contains(f,t)?"subtitle":""}}}}]);
|