@clickview/streamable-learning 0.48.0-rc.1 → 0.48.0
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/.vite/manifest.json +605 -605
- package/dist/bundles.json +1 -1
- package/dist/en.json +1 -1
- package/dist/scripts/{CN8PeBwg.chunk.js → BIisq8ZO.chunk.js} +2 -2
- package/dist/scripts/{CN8PeBwg.chunk.js.map → BIisq8ZO.chunk.js.map} +1 -1
- package/dist/scripts/{BaMNOAYj2.chunk.js → BWU6_pPN2.chunk.js} +2 -2
- package/dist/scripts/{BaMNOAYj2.chunk.js.map → BWU6_pPN2.chunk.js.map} +1 -1
- package/dist/scripts/{BvJXPFoz2.chunk.js → BcZFo9Vw2.chunk.js} +2 -2
- package/dist/scripts/{BvJXPFoz2.chunk.js.map → BcZFo9Vw2.chunk.js.map} +1 -1
- package/dist/scripts/Bd2bbHru.chunk.js +1 -0
- package/dist/scripts/{CkYqp83j.chunk.js → BfNy0Hvk.chunk.js} +2 -2
- package/dist/scripts/{CkYqp83j.chunk.js.map → BfNy0Hvk.chunk.js.map} +1 -1
- package/dist/scripts/{D0SYGnyF.chunk.js → BivP7X20.chunk.js} +2 -2
- package/dist/scripts/{D0SYGnyF.chunk.js.map → BivP7X20.chunk.js.map} +1 -1
- package/dist/scripts/{BihZ4r0z2.chunk.js → BjbY4Fbp2.chunk.js} +3 -3
- package/dist/scripts/{BihZ4r0z2.chunk.js.map → BjbY4Fbp2.chunk.js.map} +1 -1
- package/dist/scripts/{DO8_mR5i2.chunk.js → BmxcE73n2.chunk.js} +2 -2
- package/dist/scripts/{DO8_mR5i2.chunk.js.map → BmxcE73n2.chunk.js.map} +1 -1
- package/dist/scripts/{bycmewy72.chunk.js → BnEMhkEE2.chunk.js} +2 -2
- package/dist/scripts/{bycmewy72.chunk.js.map → BnEMhkEE2.chunk.js.map} +1 -1
- package/dist/scripts/{jWpq99N3.chunk.js → Buc8GegC.chunk.js} +2 -2
- package/dist/scripts/{jWpq99N3.chunk.js.map → Buc8GegC.chunk.js.map} +1 -1
- package/dist/scripts/{CrCAJmt6.chunk.js → Byczy1lS.chunk.js} +2 -2
- package/dist/scripts/{CrCAJmt6.chunk.js.map → Byczy1lS.chunk.js.map} +1 -1
- package/dist/scripts/{BZOcEcTA2.chunk.js → C2itEpvc2.chunk.js} +2 -2
- package/dist/scripts/{BZOcEcTA2.chunk.js.map → C2itEpvc2.chunk.js.map} +1 -1
- package/dist/scripts/{smdLElLq.chunk.js → CEFKXxac.chunk.js} +2 -2
- package/dist/scripts/{smdLElLq.chunk.js.map → CEFKXxac.chunk.js.map} +1 -1
- package/dist/scripts/{B-qOny0I2.chunk.js → CEYjJAp52.chunk.js} +2 -2
- package/dist/scripts/{B-qOny0I2.chunk.js.map → CEYjJAp52.chunk.js.map} +1 -1
- package/dist/scripts/{CNJrD44-2.chunk.js → CJSc4YDq2.chunk.js} +2 -2
- package/dist/scripts/{CNJrD44-2.chunk.js.map → CJSc4YDq2.chunk.js.map} +1 -1
- package/dist/scripts/{Br0Uc4GG.chunk.js → CKUA5J3R.chunk.js} +2 -2
- package/dist/scripts/{Br0Uc4GG.chunk.js.map → CKUA5J3R.chunk.js.map} +1 -1
- package/dist/scripts/{CWFInhB82.chunk.js → CYrzupmS2.chunk.js} +2 -2
- package/dist/scripts/{CWFInhB82.chunk.js.map → CYrzupmS2.chunk.js.map} +1 -1
- package/dist/scripts/{Llxar-VU.chunk.js → CcGYZb9f.chunk.js} +2 -2
- package/dist/scripts/{Llxar-VU.chunk.js.map → CcGYZb9f.chunk.js.map} +1 -1
- package/dist/scripts/{BTYwcYPL2.chunk.js → CeQGaFi-2.chunk.js} +2 -2
- package/dist/scripts/{BTYwcYPL2.chunk.js.map → CeQGaFi-2.chunk.js.map} +1 -1
- package/dist/scripts/{D7tastET2.chunk.js → Cr3Blj6H2.chunk.js} +2 -2
- package/dist/scripts/{D7tastET2.chunk.js.map → Cr3Blj6H2.chunk.js.map} +1 -1
- package/dist/scripts/{Dr1flAez.chunk.js → CxCkwLio.chunk.js} +2 -2
- package/dist/scripts/{Dr1flAez.chunk.js.map → CxCkwLio.chunk.js.map} +1 -1
- package/dist/scripts/{DyT1OGvP2.chunk.js → Cxj75Dqe2.chunk.js} +2 -2
- package/dist/scripts/{DyT1OGvP2.chunk.js.map → Cxj75Dqe2.chunk.js.map} +1 -1
- package/dist/scripts/{CsC3VVvE2.chunk.js → D-VNmhoM2.chunk.js} +2 -2
- package/dist/scripts/{CsC3VVvE2.chunk.js.map → D-VNmhoM2.chunk.js.map} +1 -1
- package/dist/scripts/{CKdklY2o2.chunk.js → D2FqnK9m2.chunk.js} +2 -2
- package/dist/scripts/{CKdklY2o2.chunk.js.map → D2FqnK9m2.chunk.js.map} +1 -1
- package/dist/scripts/{qcrBN1zR2.chunk.js → D3sdyN2Q2.chunk.js} +2 -2
- package/dist/scripts/{qcrBN1zR2.chunk.js.map → D3sdyN2Q2.chunk.js.map} +1 -1
- package/dist/scripts/{Ce1TZZdV2.chunk.js → D6IzS-bj2.chunk.js} +2 -2
- package/dist/scripts/{Ce1TZZdV2.chunk.js.map → D6IzS-bj2.chunk.js.map} +1 -1
- package/dist/scripts/{B703cBe72.chunk.js → D8g6nOG92.chunk.js} +2 -2
- package/dist/scripts/{B703cBe72.chunk.js.map → D8g6nOG92.chunk.js.map} +1 -1
- package/dist/scripts/{CCoZQmgX.chunk.js → DCKKwz9L.chunk.js} +2 -2
- package/dist/scripts/{CCoZQmgX.chunk.js.map → DCKKwz9L.chunk.js.map} +1 -1
- package/dist/scripts/{DIavEegC.chunk.js → DL4UFxRK.chunk.js} +2 -2
- package/dist/scripts/{DIavEegC.chunk.js.map → DL4UFxRK.chunk.js.map} +1 -1
- package/dist/scripts/{C5i1HsPp2.chunk.js → DLofRa642.chunk.js} +2 -2
- package/dist/scripts/{C5i1HsPp2.chunk.js.map → DLofRa642.chunk.js.map} +1 -1
- package/dist/scripts/{B5jBIPaP.chunk.js → DMZ--ok1.chunk.js} +2 -2
- package/dist/scripts/{B5jBIPaP.chunk.js.map → DMZ--ok1.chunk.js.map} +1 -1
- package/dist/scripts/{CUUUI6pl.chunk.js → DQFcbMMk.chunk.js} +2 -2
- package/dist/scripts/{CUUUI6pl.chunk.js.map → DQFcbMMk.chunk.js.map} +1 -1
- package/dist/scripts/{Dj4AeYQQ2.chunk.js → DVeqPzBe2.chunk.js} +2 -2
- package/dist/scripts/{Dj4AeYQQ2.chunk.js.map → DVeqPzBe2.chunk.js.map} +1 -1
- package/dist/scripts/{CGxa1Jzq.chunk.js → DWerltCT.chunk.js} +2 -2
- package/dist/scripts/{CGxa1Jzq.chunk.js.map → DWerltCT.chunk.js.map} +1 -1
- package/dist/scripts/{CbLL7dIz2.chunk.js → DatscYpA2.chunk.js} +2 -2
- package/dist/scripts/{CbLL7dIz2.chunk.js.map → DatscYpA2.chunk.js.map} +1 -1
- package/dist/scripts/{DwzBzBlI2.chunk.js → DkaGC5IU2.chunk.js} +2 -2
- package/dist/scripts/{DwzBzBlI2.chunk.js.map → DkaGC5IU2.chunk.js.map} +1 -1
- package/dist/scripts/{BLrjbrp8.chunk.js → DqZWSPDJ.chunk.js} +2 -2
- package/dist/scripts/{BLrjbrp8.chunk.js.map → DqZWSPDJ.chunk.js.map} +1 -1
- package/dist/scripts/{BKnxYKDu2.chunk.js → Dql-1E6g2.chunk.js} +2 -2
- package/dist/scripts/{BKnxYKDu2.chunk.js.map → Dql-1E6g2.chunk.js.map} +1 -1
- package/dist/scripts/{B7iwtSij.chunk.js → DuBHin02.chunk.js} +2 -2
- package/dist/scripts/{B7iwtSij.chunk.js.map → DuBHin02.chunk.js.map} +1 -1
- package/dist/scripts/{BpgHKWR52.chunk.js → QMuFwiiF2.chunk.js} +2 -2
- package/dist/scripts/{BpgHKWR52.chunk.js.map → QMuFwiiF2.chunk.js.map} +1 -1
- package/dist/scripts/{Ces-KTwe.chunk.js → U_sIlzAD.chunk.js} +2 -2
- package/dist/scripts/{Ces-KTwe.chunk.js.map → U_sIlzAD.chunk.js.map} +1 -1
- package/dist/scripts/{ACTQklJQ.chunk.js → WLyOm9Lj.chunk.js} +2 -2
- package/dist/scripts/{ACTQklJQ.chunk.js.map → WLyOm9Lj.chunk.js.map} +1 -1
- package/dist/scripts/{DR80oZtZ.chunk.js → Ymq7JLkU.chunk.js} +2 -2
- package/dist/scripts/{DR80oZtZ.chunk.js.map → Ymq7JLkU.chunk.js.map} +1 -1
- package/dist/scripts/{app-BIigh9wv.js → app-gjHxcZG3.js} +4 -4
- package/dist/scripts/app-gjHxcZG3.js.map +1 -0
- package/dist/scripts/{CNmmq34f.chunk.js → djRnI462.chunk.js} +2 -2
- package/dist/scripts/{CNmmq34f.chunk.js.map → djRnI462.chunk.js.map} +1 -1
- package/dist/scripts/{oTYyWWB-.chunk.js → e2K2YU7z.chunk.js} +2 -2
- package/dist/scripts/{oTYyWWB-.chunk.js.map → e2K2YU7z.chunk.js.map} +1 -1
- package/dist/scripts/{BxypZGPK.chunk.js → fnfhCa1P.chunk.js} +2 -2
- package/dist/scripts/{BxypZGPK.chunk.js.map → fnfhCa1P.chunk.js.map} +1 -1
- package/dist/scripts/{BsAo7Lri2.chunk.js → iyIL3kim2.chunk.js} +2 -2
- package/dist/scripts/{BsAo7Lri2.chunk.js.map → iyIL3kim2.chunk.js.map} +1 -1
- package/dist/scripts/{DK3xia1t.chunk.js → kfFYr9dc.chunk.js} +2 -2
- package/dist/scripts/{DK3xia1t.chunk.js.map → kfFYr9dc.chunk.js.map} +1 -1
- package/dist/scripts/{BXJetawx2.chunk.js → kts5xiiM2.chunk.js} +2 -2
- package/dist/scripts/{BXJetawx2.chunk.js.map → kts5xiiM2.chunk.js.map} +1 -1
- package/dist/scripts/{tYi-sUb22.chunk.js → lLAYbgAy2.chunk.js} +2 -2
- package/dist/scripts/{tYi-sUb22.chunk.js.map → lLAYbgAy2.chunk.js.map} +1 -1
- package/dist/scripts/{BCBfXCYM2.chunk.js → p9ukva5a2.chunk.js} +2 -2
- package/dist/scripts/{BCBfXCYM2.chunk.js.map → p9ukva5a2.chunk.js.map} +1 -1
- package/dist/scripts/{DKnZ8BaN.chunk.js → wOeN2ls0.chunk.js} +2 -2
- package/dist/scripts/{DKnZ8BaN.chunk.js.map → wOeN2ls0.chunk.js.map} +1 -1
- package/dist/scripts/{DU1SE31v2.chunk.js → zp2BHOp82.chunk.js} +2 -2
- package/dist/scripts/{DU1SE31v2.chunk.js.map → zp2BHOp82.chunk.js.map} +1 -1
- package/dist/scripts/{DnSy_Myx.chunk.js → zyVwH8JF.chunk.js} +2 -2
- package/dist/scripts/{DnSy_Myx.chunk.js.map → zyVwH8JF.chunk.js.map} +1 -1
- package/package.json +1 -1
- package/dist/scripts/C4MLxDS-.chunk.js +0 -1
- package/dist/scripts/app-BIigh9wv.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{gt as e,mt as t}from"./Dp9qJj1C.chunk.js";import{a as n,i as r}from"./BJvPfCvt.chunk.js";import{C as i,a,lt as o,ut as s,x as c}from"./Dun43GrB.chunk.js";import{y as l}from"./BQ5XMoHG.chunk.js";import{t as u}from"./epZn2FwZ.chunk.js";import{t as d}from"./CEsevkum.chunk.js";import{n as f,t as p}from"./C_llN0lX.chunk.js";import{t as m}from"./B20k2DA32.chunk.js";import{n as h}from"./Ca1QPe-q2.chunk.js";import{t as g}from"./DIVzVtlg.chunk.js";import{t as _}from"./DZUGjRSP.chunk.js";import{y as v}from"./app-BIigh9wv.js";import{t as y}from"./D6RH5IPj.chunk.js";var b=e(t(((e,t)=>{(function(n){if(typeof e==`object`)t.exports=n();else if(typeof define==`function`&&define.amd)define(n);else{var r;try{r=window}catch{r=self}r.SparkMD5=n()}})(function(e){var t=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`a`,`b`,`c`,`d`,`e`,`f`];function n(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];n+=(r&i|~r&a)+t[0]-680876936|0,n=(n<<7|n>>>25)+r|0,a+=(n&r|~n&i)+t[1]-389564586|0,a=(a<<12|a>>>20)+n|0,i+=(a&n|~a&r)+t[2]+606105819|0,i=(i<<17|i>>>15)+a|0,r+=(i&a|~i&n)+t[3]-1044525330|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&a)+t[4]-176418897|0,n=(n<<7|n>>>25)+r|0,a+=(n&r|~n&i)+t[5]+1200080426|0,a=(a<<12|a>>>20)+n|0,i+=(a&n|~a&r)+t[6]-1473231341|0,i=(i<<17|i>>>15)+a|0,r+=(i&a|~i&n)+t[7]-45705983|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&a)+t[8]+1770035416|0,n=(n<<7|n>>>25)+r|0,a+=(n&r|~n&i)+t[9]-1958414417|0,a=(a<<12|a>>>20)+n|0,i+=(a&n|~a&r)+t[10]-42063|0,i=(i<<17|i>>>15)+a|0,r+=(i&a|~i&n)+t[11]-1990404162|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&a)+t[12]+1804603682|0,n=(n<<7|n>>>25)+r|0,a+=(n&r|~n&i)+t[13]-40341101|0,a=(a<<12|a>>>20)+n|0,i+=(a&n|~a&r)+t[14]-1502002290|0,i=(i<<17|i>>>15)+a|0,r+=(i&a|~i&n)+t[15]+1236535329|0,r=(r<<22|r>>>10)+i|0,n+=(r&a|i&~a)+t[1]-165796510|0,n=(n<<5|n>>>27)+r|0,a+=(n&i|r&~i)+t[6]-1069501632|0,a=(a<<9|a>>>23)+n|0,i+=(a&r|n&~r)+t[11]+643717713|0,i=(i<<14|i>>>18)+a|0,r+=(i&n|a&~n)+t[0]-373897302|0,r=(r<<20|r>>>12)+i|0,n+=(r&a|i&~a)+t[5]-701558691|0,n=(n<<5|n>>>27)+r|0,a+=(n&i|r&~i)+t[10]+38016083|0,a=(a<<9|a>>>23)+n|0,i+=(a&r|n&~r)+t[15]-660478335|0,i=(i<<14|i>>>18)+a|0,r+=(i&n|a&~n)+t[4]-405537848|0,r=(r<<20|r>>>12)+i|0,n+=(r&a|i&~a)+t[9]+568446438|0,n=(n<<5|n>>>27)+r|0,a+=(n&i|r&~i)+t[14]-1019803690|0,a=(a<<9|a>>>23)+n|0,i+=(a&r|n&~r)+t[3]-187363961|0,i=(i<<14|i>>>18)+a|0,r+=(i&n|a&~n)+t[8]+1163531501|0,r=(r<<20|r>>>12)+i|0,n+=(r&a|i&~a)+t[13]-1444681467|0,n=(n<<5|n>>>27)+r|0,a+=(n&i|r&~i)+t[2]-51403784|0,a=(a<<9|a>>>23)+n|0,i+=(a&r|n&~r)+t[7]+1735328473|0,i=(i<<14|i>>>18)+a|0,r+=(i&n|a&~n)+t[12]-1926607734|0,r=(r<<20|r>>>12)+i|0,n+=(r^i^a)+t[5]-378558|0,n=(n<<4|n>>>28)+r|0,a+=(n^r^i)+t[8]-2022574463|0,a=(a<<11|a>>>21)+n|0,i+=(a^n^r)+t[11]+1839030562|0,i=(i<<16|i>>>16)+a|0,r+=(i^a^n)+t[14]-35309556|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^a)+t[1]-1530992060|0,n=(n<<4|n>>>28)+r|0,a+=(n^r^i)+t[4]+1272893353|0,a=(a<<11|a>>>21)+n|0,i+=(a^n^r)+t[7]-155497632|0,i=(i<<16|i>>>16)+a|0,r+=(i^a^n)+t[10]-1094730640|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^a)+t[13]+681279174|0,n=(n<<4|n>>>28)+r|0,a+=(n^r^i)+t[0]-358537222|0,a=(a<<11|a>>>21)+n|0,i+=(a^n^r)+t[3]-722521979|0,i=(i<<16|i>>>16)+a|0,r+=(i^a^n)+t[6]+76029189|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^a)+t[9]-640364487|0,n=(n<<4|n>>>28)+r|0,a+=(n^r^i)+t[12]-421815835|0,a=(a<<11|a>>>21)+n|0,i+=(a^n^r)+t[15]+530742520|0,i=(i<<16|i>>>16)+a|0,r+=(i^a^n)+t[2]-995338651|0,r=(r<<23|r>>>9)+i|0,n+=(i^(r|~a))+t[0]-198630844|0,n=(n<<6|n>>>26)+r|0,a+=(r^(n|~i))+t[7]+1126891415|0,a=(a<<10|a>>>22)+n|0,i+=(n^(a|~r))+t[14]-1416354905|0,i=(i<<15|i>>>17)+a|0,r+=(a^(i|~n))+t[5]-57434055|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~a))+t[12]+1700485571|0,n=(n<<6|n>>>26)+r|0,a+=(r^(n|~i))+t[3]-1894986606|0,a=(a<<10|a>>>22)+n|0,i+=(n^(a|~r))+t[10]-1051523|0,i=(i<<15|i>>>17)+a|0,r+=(a^(i|~n))+t[1]-2054922799|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~a))+t[8]+1873313359|0,n=(n<<6|n>>>26)+r|0,a+=(r^(n|~i))+t[15]-30611744|0,a=(a<<10|a>>>22)+n|0,i+=(n^(a|~r))+t[6]-1560198380|0,i=(i<<15|i>>>17)+a|0,r+=(a^(i|~n))+t[13]+1309151649|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~a))+t[4]-145523070|0,n=(n<<6|n>>>26)+r|0,a+=(r^(n|~i))+t[11]-1120210379|0,a=(a<<10|a>>>22)+n|0,i+=(n^(a|~r))+t[2]+718787259|0,i=(i<<15|i>>>17)+a|0,r+=(a^(i|~n))+t[9]-343485551|0,r=(r<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=a+e[3]|0}function r(e){var t=[],n;for(n=0;n<64;n+=4)t[n>>2]=e.charCodeAt(n)+(e.charCodeAt(n+1)<<8)+(e.charCodeAt(n+2)<<16)+(e.charCodeAt(n+3)<<24);return t}function i(e){var t=[],n;for(n=0;n<64;n+=4)t[n>>2]=e[n]+(e[n+1]<<8)+(e[n+2]<<16)+(e[n+3]<<24);return t}function a(e){var t=e.length,i=[1732584193,-271733879,-1732584194,271733878],a,o,s,c,l,u;for(a=64;a<=t;a+=64)n(i,r(e.substring(a-64,a)));for(e=e.substring(a-64),o=e.length,s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=0;a<o;a+=1)s[a>>2]|=e.charCodeAt(a)<<(a%4<<3);if(s[a>>2]|=128<<(a%4<<3),a>55)for(n(i,s),a=0;a<16;a+=1)s[a]=0;return c=t*8,c=c.toString(16).match(/(.*?)(.{0,8})$/),l=parseInt(c[2],16),u=parseInt(c[1],16)||0,s[14]=l,s[15]=u,n(i,s),i}function o(e){var t=e.length,r=[1732584193,-271733879,-1732584194,271733878],a,o,s,c,l,u;for(a=64;a<=t;a+=64)n(r,i(e.subarray(a-64,a)));for(e=a-64<t?e.subarray(a-64):new Uint8Array,o=e.length,s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=0;a<o;a+=1)s[a>>2]|=e[a]<<(a%4<<3);if(s[a>>2]|=128<<(a%4<<3),a>55)for(n(r,s),a=0;a<16;a+=1)s[a]=0;return c=t*8,c=c.toString(16).match(/(.*?)(.{0,8})$/),l=parseInt(c[2],16),u=parseInt(c[1],16)||0,s[14]=l,s[15]=u,n(r,s),r}function s(e){var n=``,r;for(r=0;r<4;r+=1)n+=t[e>>r*8+4&15]+t[e>>r*8&15];return n}function c(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join(``)}c(a(`hello`)),typeof ArrayBuffer<`u`&&!ArrayBuffer.prototype.slice&&(function(){function t(e,t){return e=e|0||0,e<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i=this.byteLength,a=t(n,i),o=i,s,c,l,u;return r!==e&&(o=t(r,i)),a>o?new ArrayBuffer(0):(s=o-a,c=new ArrayBuffer(s),l=new Uint8Array(c),u=new Uint8Array(this,a,s),l.set(u),c)}})();function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function u(e,t){var n=e.length,r=new ArrayBuffer(n),i=new Uint8Array(r),a;for(a=0;a<n;a+=1)i[a]=e.charCodeAt(a);return t?i:r}function d(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function f(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function p(e){var t=[],n=e.length,r;for(r=0;r<n-1;r+=2)t.push(parseInt(e.substr(r,2),16));return String.fromCharCode.apply(String,t)}function m(){this.reset()}return m.prototype.append=function(e){return this.appendBinary(l(e)),this},m.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t=this._buff.length,i;for(i=64;i<=t;i+=64)n(this._hash,r(this._buff.substring(i-64,i)));return this._buff=this._buff.substring(i-64),this},m.prototype.end=function(e){var t=this._buff,n=t.length,r,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a;for(r=0;r<n;r+=1)i[r>>2]|=t.charCodeAt(r)<<(r%4<<3);return this._finish(i,n),a=c(this._hash),e&&(a=p(a)),this.reset(),a},m.prototype.reset=function(){return this._buff=``,this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},m.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},m.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},m.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},m.prototype._finish=function(e,t){var r=t,i,a,o;if(e[r>>2]|=128<<(r%4<<3),r>55)for(n(this._hash,e),r=0;r<16;r+=1)e[r]=0;i=this._length*8,i=i.toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(i[2],16),o=parseInt(i[1],16)||0,e[14]=a,e[15]=o,n(this._hash,e)},m.hash=function(e,t){return m.hashBinary(l(e),t)},m.hashBinary=function(e,t){var n=c(a(e));return t?p(n):n},m.ArrayBuffer=function(){this.reset()},m.ArrayBuffer.prototype.append=function(e){var t=f(this._buff.buffer,e,!0),r=t.length,a;for(this._length+=e.byteLength,a=64;a<=r;a+=64)n(this._hash,i(t.subarray(a-64,a)));return this._buff=a-64<r?new Uint8Array(t.buffer.slice(a-64)):new Uint8Array,this},m.ArrayBuffer.prototype.end=function(e){var t=this._buff,n=t.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i,a;for(i=0;i<n;i+=1)r[i>>2]|=t[i]<<(i%4<<3);return this._finish(r,n),a=c(this._hash),e&&(a=p(a)),this.reset(),a},m.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array,this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},m.ArrayBuffer.prototype.getState=function(){var e=m.prototype.getState.call(this);return e.buff=d(e.buff),e},m.ArrayBuffer.prototype.setState=function(e){return e.buff=u(e.buff,!0),m.prototype.setState.call(this,e)},m.ArrayBuffer.prototype.destroy=m.prototype.destroy,m.ArrayBuffer.prototype._finish=m.prototype._finish,m.ArrayBuffer.hash=function(e,t){var n=c(o(new Uint8Array(e)));return t?p(n):n},m})}))()),x={secondary:{label:`Secondary`,isTertiary:!1},"primary & secondary":{label:`Primary & Secondary`,isTertiary:!1},k12:{label:`Primary & Secondary`,isTertiary:!1},primary:{label:`Primary`,isTertiary:!1},special:{label:`Special`,isTertiary:!1},university:{label:`University`,isTertiary:!0},middle:{label:`Middle`,isTertiary:!1},"fe college":{label:`FE College`,isTertiary:!0},"high school":{label:`Secondary`,isTertiary:!1},elementary:{label:`Primary`,isTertiary:!1},"middle school":{label:`Middle`,isTertiary:!1},tafe:{label:`TAFE`,isTertiary:!0},college:{label:`FE College`,isTertiary:!0},"sixth form college":{label:`Sixth Form College`,isTertiary:!0}},S={england:`ENG`,scotland:`SCT`,wales:`WLS`,"northern ireland":`NIR`},C={hashedEmail(e){let t=e.trim().toLowerCase();return b.default.hash(t)},removeEmptyKeys(e){if(Array.isArray(e))return e;let t={...e};return Object.entries(t).filter(([,e])=>!(e==null||typeof e==`string`&&!e.length)).reduce((e,[t,n])=>({...e,[t]:n===Object(n)?C.removeEmptyKeys(n):n}),{})},Conversions:{TRIAL_UPGRADE_REQUEST:`Request - Trial Upgrade`,FREE_TRIAL_REQUEST:`Request - Free Trial`,OLYMPICS_SPECIAL_OFFER_REQUEST:`Request - Olympics Special Offer`},Sources:{CV_PRODUCT_TRIAL_REQUESTED:`cv_product_trial_requested`,CV_PRODUCT_BDM_TRIAL_REQUESTED:`cv_product_bdm_trial_requested`,CV_PRODUCT_TRIAL_UPGRADE_REQUESTED:`cv_product_trial_upgrade_requested`},getSchoolType(e){if(!e)return;let t=e.toLowerCase();return[`unknown`,`other`].includes(t)?void 0:x[t]?.label||e},isTertiarySchool(e){return x[e?.toLowerCase()]?.isTertiary||!1},parseProvince(e){return e.length?S[e.toLowerCase()]||e:``}},w={checkEmail(e){return{url:`/api/braze/check-email`,key:`braze:check:email:${e}`,type:l.POST,data:{email:e}}},prospectLookups(e){return{url:`{gateway}/v1/prospects/${e}/lookups`,key:`prospect:lookup:${e}`}}};function T(){return{createOrUpdateProfile:p(a.ProfileApiClient).createOrUpdate}}var E=function(e){return e.ContactUs=`Contact - Contact Us`,e.LivestreamBooking=`Submit - Livestream Booking`,e}({}),D=function(e){return e.LivestreamBooking=`sl_product_livestream`,e.ContactUs=`sl_marketing_form_contact_us`,e}({});function O(e,t){return{...e,custom:{...e?.custom,source:t.source},event:{...e?.event,conversion:t.conversion}}}function k(){let e=f(u.BrazeClient);function t({user:t,additionalData:n,source:r,eventType:i,conversion:a,productType:o,callback:s}){let c=O(t,{source:r,conversion:a});e.setUserInit(c),e.logFormEvent({eventType:i,additionalData:n,callback:s,internalOptions:{subscriptionGroups:o}})}return{client:e,logFormSubmission:t}}function A(){return k()}var j=[`Teacher`,`Librarian / Teacher Librarian`,`Curriculum Coordinator`,`Digital Technology Coordinator`,`SSO / SLSO`,`IT`,`Head of Department`,`Head of Subject`,`Assistant Principal`,`Deputy Principal`,`Principal`,`Business Manager`],M=[`Teacher`,`Librarian / 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`],N=[`Teacher`,`Librarian / Teacher Librarian`,`Head of Department`,`Instructional Technology Specialist`,`Curriculum Coordinator`,`School Leadership`,`District Leadership`,`Academic Coach`,`Principal`,`IT / IT Specialist`],ee=[`Teacher`,`Librarian / Teacher Librarian`,`Curriculum Leader`,`e-Learning Coordinator`,`IT`,`Head of Department`,`Head of Faculty`,`Learning Support`,`Learning Assistant`,`Deputy Principal`,`Assistant Principal`,`Principal`],P=[`Teacher`,`Librarian / Teacher Librarian`,`Educational Assistant (EA)`,`Learning Support Teacher / Resource Teacher`,`Department Head / Manager`,`Curriculum Coordinator / Consultant`,`School Counsellor / Guidance Counsellor`,`Vice-Principal`,`Principal`,`Superintendent`,`Director of Education`],F=[`Professor`,`Lecturer`,`Course Coordinator / Administrator`,`Digital Learning Manager`,`Tutor`,`Teaching Fellow`,`Librarian`,`Learning Technologist`,`Teaching Assistant`,`Researcher`,`IT`],te=[`Professor`,`Lecturer`,`Course Coordinator / Administrator`,`Digital Learning Manager`,`Tutor`,`Teaching Fellow`,`Librarian`,`Learning Technologist`,`Teacher`,`Teaching Assistant`,`Researcher`,`IT`],ne={[g.AU]:j,[g.NZ]:ee,[g.UK]:M,[g.US]:N,[g.CA]:P},re={[g.AU]:F,[g.UK]:te};function ie(e){let t=e.countryCode?.toLowerCase();return e.isTertiary?re[t]||F:ne[t]||N}var I=e(s()),L=o(),R=`OTHER`;function z(e,t){return t.includes(e)?e:e?R:``}function ae(e){let{error:t,onChange:n,countryCode:r,isTertiary:i}=e,a=ie({countryCode:r,isTertiary:i}),o=z(e.initialValue,a),[s,c]=I.useState(o),[l,u]=I.useState(o===R?e.initialValue:``);I.useEffect(()=>{c(z(e.initialValue,a))},[e.initialValue]);function d(e){c(e.target.value),u(``),n(e.target.value===R?``:e.target.value)}function f(e){u(e.target.value),n(e.target.value)}let p=s===R;return(0,L.jsxs)(`div`,{className:`form-group`,children:[(0,L.jsxs)(`label`,{htmlFor:e.id,className:e.labelClassName,children:[`Job title`,e.required&&(0,L.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,L.jsxs)(`div`,{className:`mb-2`,children:[(0,L.jsxs)(`select`,{id:e.id,name:e.id,className:`form-select ${e.size===`lg`?`form-select-lg`:``} ${s.length?`text-dark`:`text-secondary`} ${!!t&&`is-invalid`}`,value:s,placeholder:`Role`,onChange:d,children:[(0,L.jsx)(`option`,{value:``,disabled:!0,className:`text-secondary`,children:e.placeholder?e.placeholder:(0,L.jsx)(L.Fragment,{children:`What do you do?`})}),a.map((e,t)=>(0,L.jsx)(`option`,{value:e,className:`text-dark`,children:e},t)),(0,L.jsx)(`option`,{value:R,className:`text-dark`,children:`Other`})]}),!!t&&!p&&(0,L.jsx)(y,{name:e.id,children:t})]}),p&&(0,L.jsxs)(`div`,{className:`mb-3`,children:[(0,L.jsx)(`input`,{className:`form-control ${e.size===`lg`?`form-select-lg`:``} ${!!t&&`is-invalid`}`,type:`text`,value:l,placeholder:`What do you do?`,autoFocus:!0,onChange:f}),!!t&&(0,L.jsx)(y,{name:e.id,children:t})]})]})}function oe(){return(0,L.jsx)(`svg`,{viewBox:`0 0 24 24`,children:(0,L.jsx)(`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 B={clearInput:`_clearInput_1l19p_1`,clearableInput:`_clearableInput_1l19p_8`},V=I.forwardRef((e,t)=>{let{onClickClear:n,showClearButton:r,clearClassName:i,...a}=e;return(0,L.jsxs)(`div`,{className:`position-relative`,children:[(0,L.jsx)(`input`,{...a,ref:t,className:`${e.className} ${B.clearableInput}`}),(!!e.value||r)&&(0,L.jsx)(`span`,{className:`${B.clearInput} position-absolute cursor-pointer text-secondary ${i||``}`,role:`button`,onClick:n,onKeyDown:e=>e.key===`Enter`&&n(),tabIndex:0,children:(0,L.jsx)(`div`,{className:`d-inline-block svg-container md`,children:(0,L.jsx)(oe,{})})})]})}),se=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n},ce=`__googleMapsScriptId`,H;(function(e){e[e.INITIALIZED=0]=`INITIALIZED`,e[e.LOADING=1]=`LOADING`,e[e.SUCCESS=2]=`SUCCESS`,e[e.FAILURE=3]=`FAILURE`})(H||={});var le=class e{constructor({apiKey:t,authReferrerPolicy:n,channel:r,client:i,id:a=ce,language:o,libraries:s=[],mapIds:c,nonce:l,region:u,retries:d=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=n,this.channel=r,this.client=i,this.id=a||`__googleMapsScriptId`,this.language=o,this.libraries=s,this.mapIds=c,this.nonce=l,this.region=u,this.retries=d,this.url=f,this.version=p,e.instance){if(!se(this.options,e.instance.options))throw Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(e.instance.options)}`);return e.instance}e.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?H.FAILURE:this.done?H.SUCCESS:this.loading?H.LOADING:H.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+=`?callback=${this.CALLBACK}`,this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(`,`)}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(`,`)}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){let e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,t)=>{this.loadCallback(n=>{n?t(n.error):e(window.google)})})}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){if(document.getElementById(this.id)){this.callback();return}let e=this.createUrl(),t=document.createElement(`script`);t.id=this.id,t.type=`text/javascript`,t.src=e,t.onerror=this.loadErrorCallback.bind(this),t.defer=!0,t.async=!0,this.nonce&&(t.nonce=this.nonce),document.head.appendChild(t)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){let e=this.errors.length*2**this.errors.length;console.log(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},e)}else this.onerrorEvent=e,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){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.`),this.callback();return}this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}};function U(e){return new le({apiKey:e.apiKey,version:`weekly`,libraries:e.libraries,retries:3})}function W(e){let t={apiKey:e.apiKey,libraries:e.libraries||[`places`]},[n,r]=I.useState(!1),[i,a]=I.useState(U(t));I.useEffect(()=>{o()},[]);function o(e,n){if(!i){a(U(t));return}i.loadCallback(t=>{if(t){r(!1),n&&n(t);return}r(!0),e&&e()})}return{loader:i,scriptLoaded:n,onGoogleApiReady:o}}function G(e){let{scriptLoaded:t}=W({apiKey:e.googleApiKey}),[n,r]=I.useState();return I.useEffect(()=>{t&&r(new google.maps.places.AutocompleteService)},[t]),n}var K=`us`,q=`country:placeholder:text`;function ue(e){let t=_.getLocalizedLocalityPlaceholderText(e?.countryCode);if(t)return t;let n=d.cacheGet(`${q}:${e?.countryCode}`);if(n)return n}function de(){return String.fromCharCode(96+r.getRandomInt(26))}function fe({apiKey:e,geoLocation:t,makeRequest:n=!0,template:i=`E.g. [placeholder]`,templateKey:a=`[placeholder]`}){let o=G({googleApiKey:e}),[s,c]=I.useState(()=>ue(t));I.useEffect(()=>{if(s||!o||!n)return;let e=t?.countryCode||K,r={input:de(),types:[`(cities)`],region:e,componentRestrictions:{country:e}};o.getPlacePredictions(r,(t,n)=>u(t,n,e))},[s,o,t,n]);function l(e,t){d.cacheSet(`${q}:${t}`,e,86400),c(e)}function u(e,t,n){if(t!==google.maps.places.PlacesServiceStatus.OK||!e){l(_.getLocalizedLocalityPlaceholderText(K),n);return}let o=e[r.getRandomInt(e.length)].description;l(i.replace(a,o),n)}return s}function J(e){let[t,n]=I.useState(0),r=I.useRef(null),[i,a]=I.useState(!!e.hideInitially);function o(){r.current&&r.current.children[t-1]?.scrollIntoView({block:`center`})}function s(r){if(e.hideOnEnter&&a(!1),r.code===`ArrowDown`){r.stopPropagation(),r.preventDefault();let i=t+1;i>e.itemCount&&(i=1),n(i),o();return}if(r.code===`ArrowUp`){r.stopPropagation(),r.preventDefault();let i=t-1;i<=0&&(i=e.itemCount),n(i),o();return}if(r.code===`Enter`&&t>0){r.stopPropagation(),r.preventDefault(),e.onSelected(t-1),e.hideOnEnter&&a(!0);return}n(0)}function c(){e.hideOnBlur&&a(!1)}function l(){e.hideOnBlur&&a(!0)}return{selectedIndex:t,onKeyDown:s,containerRef:r,hide:i,onFocus:c,onBlur:l}}var Y={getPlaceDetails(e){let t,n,r,i,a=e.formatted_address;for(let a of e.address_components)for(let e of a.types)e===`locality`&&(t=a.short_name),e===`administrative_area_level_1`&&(n=a.short_name),e===`postal_code`&&(i=a.short_name),e===`country`&&(r=a.short_name);return{locality:a,country:r,postalCode:i,city:t,province:n}}},pe={1:`geocoderPermissionDenied`,2:`geocoderUnavailable`,3:`geocoderTimeout`};function me(e){let[t,n]=I.useState({}),{onGoogleApiReady:r}=W(e);function i(){r(()=>{window.navigator.geolocation.getCurrentPosition(a,o)})}function a(e){let{latitude:t,longitude:r}=e.coords,i=new google.maps.LatLng(t,r);new google.maps.Geocoder().geocode({location:i},(e,i)=>{if(i!==google.maps.GeocoderStatus.OK)return;let a=e.find(e=>e.types.includes(`locality`)||e.types.includes(`administrative_area_level_2`));n({...Y.getPlaceDetails(a),longitude:r,latitude:t})})}function o(t){let n=pe[t.code];n||=`geocoderUnknown`,e.onPositionError(`We are unable to access your location. Please try again later.`)}return{placeDetails:t,onClickGetCurrentLocation:i}}function he({search:e,makePredicition:t,geoLocation:n,apiKey:r}){let i=G({googleApiKey:r}),a=v(e,300),[o,s]=I.useState();I.useEffect(()=>{if(!i)return;if(a?.length===0||!t){s(void 0);return}let e=n?.countryCode||`us`;i.getPlacePredictions({input:a,componentRestrictions:n?.isFallback?void 0:{country:e},region:e,types:[`locality`,`sublocality`,`postal_code`]},c)},[a,t,i]);function c(e,t){if(t!==google.maps.places.PlacesServiceStatus.OK||!e){s(void 0);return}s(e)}function l(e,t,r){new google.maps.places.PlacesService(t.current).getDetails({placeId:e.place_id,fields:[`geometry`,`address_components`,`formatted_address`],region:n.countryCode},(e,t)=>{if(t!==google.maps.places.PlacesServiceStatus.OK)return;let n=e.geometry.location.lng(),i=e.geometry.location.lat(),{locality:a,country:o,postalCode:s,city:c,province:l}=Y.getPlaceDetails(e);r({longitude:n,latitude:i,locality:a,country:o,city:c,postalCode:s,province:l})})}return{localityPredicitions:o,getPlaceInfo:l}}function X(){return(0,L.jsx)(`svg`,{viewBox:`0 0 24 24`,children:(0,L.jsx)(`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`})})}var Z={baseText:`_baseText_bmazz_1`,dropdown:`_dropdown_bmazz_4`,suggestionContainer:`_suggestionContainer_bmazz_7`,suggestionContainerInner:`_suggestionContainerInner_bmazz_13`,suggestionItem:`_suggestionItem_bmazz_18`,suggestionLoading:`_suggestionLoading_bmazz_18`,noSuggestion:`_noSuggestion_bmazz_18`,large:`_large_bmazz_22`,selected:`_selected_bmazz_32`,useMyLocation:`_useMyLocation_bmazz_36`};function ge(e){let{predictions:t,getPlaceInfo:n,selectedIndex:r}=e;return(0,L.jsx)(L.Fragment,{children:t.map((e,t)=>(0,L.jsx)(h,{className:`${Z.suggestionItem} ${r-1===t?Z.selected:``}`,onKeyDown:t=>t.key===`Enter`&&n(e),onMouseDown:()=>n(e),onClick:()=>n(e),children:e.description},e.place_id))})}function _e(e){let t=I.useRef(null),[r,a]=I.useState(e.data?.schoolLocality||``),[o,s]=I.useState(!1),l=fe({apiKey:e.googleMapsApiKey,geoLocation:e.geoLocation}),{localityPredicitions:u,getPlaceInfo:d}=he({search:r,makePredicition:o,geoLocation:e.geoLocation,apiKey:e.googleMapsApiKey}),{placeDetails:f,onClickGetCurrentLocation:p}=me({apiKey:e.googleMapsApiKey,onPositionError:w}),m=window.navigator.geolocation?1:0,{selectedIndex:g,onKeyDown:_,containerRef:v,hide:y,onBlur:b,onFocus:x}=J({onSelected:D,itemCount:(u?.length??0)+m,hideOnBlur:e.hideOnBlur}),[S,C]=I.useState();I.useEffect(()=>{O(f)},[f]);function w(e){s(!0),C(e)}function T(t){S&&C(void 0),o||s(!0),(e.data?.longitude||e.data?.latitude||e.data?.schoolLocality)&&e.clearData(),a(t)}function E(){T(``),t.current.focus()}function D(e){if(!u)return;if(e===u.length){A();return}let t=u[e];t&&k(t)}function O(t){e.setData({schoolLocality:t.locality,country:t.country,province:t.province,schoolPostCode:t.postalCode,longitude:t.longitude,latitude:t.latitude}),t.locality&&a(t.locality)}function k(e){o&&s(!1),d(e,t,O)}function A(t){t?.preventDefault(),s(!1),p(),e.logUserAction?.({},{actionType:i.Click,descriptor:c.UseMyLocation})}function j(){let t=`form-control`;return e.size===`lg`&&(t+=` form-control-lg`),t}let M=u?.length&&!e.data?.schoolLocality?.length,N=window.navigator.geolocation&&!e.data?.schoolLocality?.length,ee=e.labelClassName||`d-block text-center mb-3 fw-normal ${Z.baseText}`,P=`form-group position-relative`;return e.size===`lg`&&(P+=` ${Z.large}`),(0,L.jsxs)(`div`,{className:P,children:[(0,L.jsxs)(`label`,{className:ee,htmlFor:`locality-input`,children:[`ZIP code or city`,e.required&&(0,L.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,L.jsx)(V,{type:`text`,value:r,onChange:e=>T(e.currentTarget.value),id:`locality-input`,className:j(),ref:t,autoComplete:`off`,placeholder:l||`Loading...`,disabled:e.disabled||!l,autoFocus:e?.autoFocus,onClickClear:E,onKeyDown:_,onFocus:x,onBlur:b}),(0,L.jsxs)(`div`,{className:`position-absolute z-1 w-100 ${Z.dropdown} ${y?`d-none`:``}`,children:[!!M&&(0,L.jsx)(`div`,{className:Z.suggestionContainer,children:(0,L.jsxs)(`div`,{className:Z.suggestionContainerInner,ref:v,children:[(0,L.jsx)(ge,{predictions:u,getPlaceInfo:k,selectedIndex:g}),window.navigator.geolocation&&e.useGeoLocationApi&&(0,L.jsx)(h,{className:n(Z.suggestionItem,`px-1`,g-1===u.length?Z.selected:``),onClick:A,children:(0,L.jsxs)(`div`,{className:`btn btn-link info-link btn-with-icon bg-transparent py-0 pe-1`,children:[(0,L.jsx)(X,{}),`Use my current location`]})})]})}),N&&!M&&e.useGeoLocationApi&&(0,L.jsx)(`div`,{className:`d-flex ${Z.useMyLocation}`,children:(0,L.jsxs)(`button`,{onClick:A,className:`btn btn-link info-link bg-white btn-with-icon`,children:[(0,L.jsx)(X,{}),`Use my current location`]})}),!!S&&(0,L.jsx)(`div`,{className:`text-danger p-2`,children:S})]})]})}var ve=class extends Error{constructor(e,t=`Error`){super(t),this.body=e}},ye={prepareQuery(e,t){let n=e;return Object.keys(t).forEach((e,r)=>{t[e]&&(r===0?n+=`?`:n+=`&`,n+=`${e}=${encodeURIComponent(t[e])}`)}),n}};function Q(e){let t={method:l.GET,headers:{"Content-type":`application/json`}};e.method&&(t={...t,method:e.method}),e.init&&(t={...t,...e.init});let n=e.url;return t.method===l.GET&&e.data?n=ye.prepareQuery(n,e.data):e.data&&(t={...t,body:JSON.stringify(e.data)}),{init:t,url:n}}var $={async asyncFetch(e){let t=Q(e),n=await fetch(t.url,t.init);if(!n.ok)throw new ve(await n.json());if(n.status!==204)return await n.json()},async asyncFetchPlain(e){let t=Q(e),n=await fetch(t.url,t.init);if(n.ok)return await n.text()},fetch(e){let t=Q(e);return fetch(t.url,t.init).then(e=>{if(e.status!==204)return e.json()}).then(t=>(e.success&&e.success(t),t)).catch(t=>(e.error&&e.error(),t)).finally(()=>{e.always&&e.always()})}},be={search(e,t,n,r,i){let a={longitude:t.longitude,latitude:t.latitude};t.query&&(a.query=t.query),$.fetch({url:e,data:a,success:n,error:r,always:i})},async create(e,t){return $.asyncFetch({url:e.createProspect,method:l.POST,data:t})},getLookups(e,t){return $.asyncFetch({url:e.prospectLookups(t)})}},xe=50;function Se(e){return e.toLowerCase().split(` `).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Ce(e){let t=[];return e.city&&t.push(Se(e.city)),e.province&&t.push(e.province),e.postCode&&t.push(e.postCode),t.join(` `)}function we(e){let{filteredSchoolsList:t,getSchoolName:n,onSchoolSuggestionClick:r,selectedIndex:i}=e;return(0,L.jsx)(L.Fragment,{children:t.map((e,t)=>(0,L.jsxs)(h,{className:`${Z.suggestionItem} ${i-1===t?Z.selected:``}`,onKeyDown:t=>t.key===`Enter`&&r(e),onMouseDown:()=>r(e),onClick:()=>r(e),children:[n(e),` `,(0,L.jsx)(`br`,{}),(0,L.jsx)(`small`,{className:`text-secondary`,children:Ce(e)})]},e.id))})}function Te(e){return(0,L.jsx)(`div`,{className:`info-link ${Z.suggestionItem} ${Z.noSuggestion} ${e.selected?Z.selected:``}`,onKeyDown:t=>t.key===`Enter`&&e.handleNoSuggestion(),onMouseDown:e.handleNoSuggestion,onClick:e.handleNoSuggestion,children:`Can't find your school?`})}function Ee(e){let t=I.useRef(null),[n,r]=I.useState(!0),[i,a]=I.useState(e.data.schoolName&&e.data.schoolPostCode?e.data.schoolName+`, `+e.data.schoolPostCode:e.data.schoolName?e.data.schoolName:``),[o,s]=I.useState(),c=v(i,250),{selectedIndex:l,onKeyDown:u,containerRef:d,hide:f,onBlur:p,onFocus:h}=J({onSelected:g,itemCount:(o?.length??0)+1,hideOnBlur:e.hideOnBlur});function g(t){if(!o&&!t)return;if(t===o.length){e.onClickNoSuggestions(i);return}let n=o[t];n&&T(n)}let _=!!e.data?.prospectId,y=n&&!_,b=!n&&!_&&o?.length<xe,x=o?.length&&!_;I.useEffect(()=>{if(!_){if(!c.length){w();return}if(!_&&c.length>1&&c===i){w(c);return}}},[c,_]);function S(t){(e.data.schoolName||e.data.prospectId)&&e.clearData(),t!==i&&a(t)}function C(){S(``),t.current.focus()}function w(t){if(!e.data.latitude&&!e.data.longitude){r(!1);return}r(!0);let n={latitude:e.data.latitude,longitude:e.data.longitude};t&&t.length&&(n.query=t),be.search(e.searchUrl,n,e=>s(e),null,()=>r(!1))}function T(t){a(E(t)),e.setData({prospectId:t.id,schoolName:t.name,schoolPostCode:t.postCode,schoolType:t.prospectType,province:t.province,city:t.city,country:t.countryCode})}function E(e){return e.name}let D=(x||y||b)&&!e.disabled&&!f,O=!y&&!b&&o?.length>=xe,k=`form-control`,A=`form-group position-relative`;return e.size===`lg`&&(k+=` form-control-lg`,A+=` ${Z.large}`),(0,L.jsxs)(`div`,{className:A,children:[(0,L.jsxs)(`label`,{className:e.labelClassName,htmlFor:`school-input`,children:[`School`,e.required&&(0,L.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,L.jsx)(V,{id:`school-input`,value:i,onChange:e=>S(e.currentTarget.value),ref:t,className:k,type:`text`,autoComplete:`off`,placeholder:e.placeholder||`Search for your school`,disabled:e.disabled,autoFocus:!0,onClickClear:C,onKeyDown:u,onFocus:h,onBlur:p}),(0,L.jsx)(`div`,{className:`position-absolute z-1 w-100 ${Z.dropdown} ${f?`d-none`:``}`,children:(0,L.jsx)(`div`,{className:`${Z.suggestionContainer} ${D?``:`d-none`}`,children:(0,L.jsxs)(`div`,{className:Z.suggestionContainerInner,ref:d,children:[x?(0,L.jsx)(we,{filteredSchoolsList:o,onSchoolSuggestionClick:T,getSchoolName:E,selectedIndex:l}):y&&(0,L.jsx)(`div`,{className:`${Z.suggestionLoading} py-4 d-flex justify-content-center`,children:(0,L.jsx)(m,{animation:`border`})}),O&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`hr`,{className:`my-0`}),(0,L.jsx)(`div`,{className:`${Z.suggestionItem} ${Z.noSuggestion} text-secondary text-center`,children:(0,L.jsxs)(`small`,{children:[`Can't find your school? `,(0,L.jsx)(`br`,{}),` Try searching to narrow the results`]})})]}),!y&&b&&(0,L.jsx)(Te,{selected:l===o.length+1,handleNoSuggestion:()=>{e.onClickNoSuggestions(i)}})]})})})]})}export{D as a,w as c,A as i,C as l,_e as n,E as o,ae as r,T as s,Ee as t};
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{gt as e,mt as t}from"./Dp9qJj1C.chunk.js";import{a as n,i as r}from"./BJvPfCvt.chunk.js";import{C as i,a,lt as o,ut as s,x as c}from"./Dun43GrB.chunk.js";import{y as l}from"./BQ5XMoHG.chunk.js";import{t as u}from"./epZn2FwZ.chunk.js";import{t as d}from"./CEsevkum.chunk.js";import{n as f,t as p}from"./C_llN0lX.chunk.js";import{t as m}from"./B20k2DA32.chunk.js";import{n as h}from"./Ca1QPe-q2.chunk.js";import{t as g}from"./DIVzVtlg.chunk.js";import{t as _}from"./DZUGjRSP.chunk.js";import{y as v}from"./app-gjHxcZG3.js";import{t as y}from"./D6RH5IPj.chunk.js";var b=e(t(((e,t)=>{(function(n){if(typeof e==`object`)t.exports=n();else if(typeof define==`function`&&define.amd)define(n);else{var r;try{r=window}catch{r=self}r.SparkMD5=n()}})(function(e){var t=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`a`,`b`,`c`,`d`,`e`,`f`];function n(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];n+=(r&i|~r&a)+t[0]-680876936|0,n=(n<<7|n>>>25)+r|0,a+=(n&r|~n&i)+t[1]-389564586|0,a=(a<<12|a>>>20)+n|0,i+=(a&n|~a&r)+t[2]+606105819|0,i=(i<<17|i>>>15)+a|0,r+=(i&a|~i&n)+t[3]-1044525330|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&a)+t[4]-176418897|0,n=(n<<7|n>>>25)+r|0,a+=(n&r|~n&i)+t[5]+1200080426|0,a=(a<<12|a>>>20)+n|0,i+=(a&n|~a&r)+t[6]-1473231341|0,i=(i<<17|i>>>15)+a|0,r+=(i&a|~i&n)+t[7]-45705983|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&a)+t[8]+1770035416|0,n=(n<<7|n>>>25)+r|0,a+=(n&r|~n&i)+t[9]-1958414417|0,a=(a<<12|a>>>20)+n|0,i+=(a&n|~a&r)+t[10]-42063|0,i=(i<<17|i>>>15)+a|0,r+=(i&a|~i&n)+t[11]-1990404162|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&a)+t[12]+1804603682|0,n=(n<<7|n>>>25)+r|0,a+=(n&r|~n&i)+t[13]-40341101|0,a=(a<<12|a>>>20)+n|0,i+=(a&n|~a&r)+t[14]-1502002290|0,i=(i<<17|i>>>15)+a|0,r+=(i&a|~i&n)+t[15]+1236535329|0,r=(r<<22|r>>>10)+i|0,n+=(r&a|i&~a)+t[1]-165796510|0,n=(n<<5|n>>>27)+r|0,a+=(n&i|r&~i)+t[6]-1069501632|0,a=(a<<9|a>>>23)+n|0,i+=(a&r|n&~r)+t[11]+643717713|0,i=(i<<14|i>>>18)+a|0,r+=(i&n|a&~n)+t[0]-373897302|0,r=(r<<20|r>>>12)+i|0,n+=(r&a|i&~a)+t[5]-701558691|0,n=(n<<5|n>>>27)+r|0,a+=(n&i|r&~i)+t[10]+38016083|0,a=(a<<9|a>>>23)+n|0,i+=(a&r|n&~r)+t[15]-660478335|0,i=(i<<14|i>>>18)+a|0,r+=(i&n|a&~n)+t[4]-405537848|0,r=(r<<20|r>>>12)+i|0,n+=(r&a|i&~a)+t[9]+568446438|0,n=(n<<5|n>>>27)+r|0,a+=(n&i|r&~i)+t[14]-1019803690|0,a=(a<<9|a>>>23)+n|0,i+=(a&r|n&~r)+t[3]-187363961|0,i=(i<<14|i>>>18)+a|0,r+=(i&n|a&~n)+t[8]+1163531501|0,r=(r<<20|r>>>12)+i|0,n+=(r&a|i&~a)+t[13]-1444681467|0,n=(n<<5|n>>>27)+r|0,a+=(n&i|r&~i)+t[2]-51403784|0,a=(a<<9|a>>>23)+n|0,i+=(a&r|n&~r)+t[7]+1735328473|0,i=(i<<14|i>>>18)+a|0,r+=(i&n|a&~n)+t[12]-1926607734|0,r=(r<<20|r>>>12)+i|0,n+=(r^i^a)+t[5]-378558|0,n=(n<<4|n>>>28)+r|0,a+=(n^r^i)+t[8]-2022574463|0,a=(a<<11|a>>>21)+n|0,i+=(a^n^r)+t[11]+1839030562|0,i=(i<<16|i>>>16)+a|0,r+=(i^a^n)+t[14]-35309556|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^a)+t[1]-1530992060|0,n=(n<<4|n>>>28)+r|0,a+=(n^r^i)+t[4]+1272893353|0,a=(a<<11|a>>>21)+n|0,i+=(a^n^r)+t[7]-155497632|0,i=(i<<16|i>>>16)+a|0,r+=(i^a^n)+t[10]-1094730640|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^a)+t[13]+681279174|0,n=(n<<4|n>>>28)+r|0,a+=(n^r^i)+t[0]-358537222|0,a=(a<<11|a>>>21)+n|0,i+=(a^n^r)+t[3]-722521979|0,i=(i<<16|i>>>16)+a|0,r+=(i^a^n)+t[6]+76029189|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^a)+t[9]-640364487|0,n=(n<<4|n>>>28)+r|0,a+=(n^r^i)+t[12]-421815835|0,a=(a<<11|a>>>21)+n|0,i+=(a^n^r)+t[15]+530742520|0,i=(i<<16|i>>>16)+a|0,r+=(i^a^n)+t[2]-995338651|0,r=(r<<23|r>>>9)+i|0,n+=(i^(r|~a))+t[0]-198630844|0,n=(n<<6|n>>>26)+r|0,a+=(r^(n|~i))+t[7]+1126891415|0,a=(a<<10|a>>>22)+n|0,i+=(n^(a|~r))+t[14]-1416354905|0,i=(i<<15|i>>>17)+a|0,r+=(a^(i|~n))+t[5]-57434055|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~a))+t[12]+1700485571|0,n=(n<<6|n>>>26)+r|0,a+=(r^(n|~i))+t[3]-1894986606|0,a=(a<<10|a>>>22)+n|0,i+=(n^(a|~r))+t[10]-1051523|0,i=(i<<15|i>>>17)+a|0,r+=(a^(i|~n))+t[1]-2054922799|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~a))+t[8]+1873313359|0,n=(n<<6|n>>>26)+r|0,a+=(r^(n|~i))+t[15]-30611744|0,a=(a<<10|a>>>22)+n|0,i+=(n^(a|~r))+t[6]-1560198380|0,i=(i<<15|i>>>17)+a|0,r+=(a^(i|~n))+t[13]+1309151649|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~a))+t[4]-145523070|0,n=(n<<6|n>>>26)+r|0,a+=(r^(n|~i))+t[11]-1120210379|0,a=(a<<10|a>>>22)+n|0,i+=(n^(a|~r))+t[2]+718787259|0,i=(i<<15|i>>>17)+a|0,r+=(a^(i|~n))+t[9]-343485551|0,r=(r<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=a+e[3]|0}function r(e){var t=[],n;for(n=0;n<64;n+=4)t[n>>2]=e.charCodeAt(n)+(e.charCodeAt(n+1)<<8)+(e.charCodeAt(n+2)<<16)+(e.charCodeAt(n+3)<<24);return t}function i(e){var t=[],n;for(n=0;n<64;n+=4)t[n>>2]=e[n]+(e[n+1]<<8)+(e[n+2]<<16)+(e[n+3]<<24);return t}function a(e){var t=e.length,i=[1732584193,-271733879,-1732584194,271733878],a,o,s,c,l,u;for(a=64;a<=t;a+=64)n(i,r(e.substring(a-64,a)));for(e=e.substring(a-64),o=e.length,s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=0;a<o;a+=1)s[a>>2]|=e.charCodeAt(a)<<(a%4<<3);if(s[a>>2]|=128<<(a%4<<3),a>55)for(n(i,s),a=0;a<16;a+=1)s[a]=0;return c=t*8,c=c.toString(16).match(/(.*?)(.{0,8})$/),l=parseInt(c[2],16),u=parseInt(c[1],16)||0,s[14]=l,s[15]=u,n(i,s),i}function o(e){var t=e.length,r=[1732584193,-271733879,-1732584194,271733878],a,o,s,c,l,u;for(a=64;a<=t;a+=64)n(r,i(e.subarray(a-64,a)));for(e=a-64<t?e.subarray(a-64):new Uint8Array,o=e.length,s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=0;a<o;a+=1)s[a>>2]|=e[a]<<(a%4<<3);if(s[a>>2]|=128<<(a%4<<3),a>55)for(n(r,s),a=0;a<16;a+=1)s[a]=0;return c=t*8,c=c.toString(16).match(/(.*?)(.{0,8})$/),l=parseInt(c[2],16),u=parseInt(c[1],16)||0,s[14]=l,s[15]=u,n(r,s),r}function s(e){var n=``,r;for(r=0;r<4;r+=1)n+=t[e>>r*8+4&15]+t[e>>r*8&15];return n}function c(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join(``)}c(a(`hello`)),typeof ArrayBuffer<`u`&&!ArrayBuffer.prototype.slice&&(function(){function t(e,t){return e=e|0||0,e<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i=this.byteLength,a=t(n,i),o=i,s,c,l,u;return r!==e&&(o=t(r,i)),a>o?new ArrayBuffer(0):(s=o-a,c=new ArrayBuffer(s),l=new Uint8Array(c),u=new Uint8Array(this,a,s),l.set(u),c)}})();function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function u(e,t){var n=e.length,r=new ArrayBuffer(n),i=new Uint8Array(r),a;for(a=0;a<n;a+=1)i[a]=e.charCodeAt(a);return t?i:r}function d(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function f(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function p(e){var t=[],n=e.length,r;for(r=0;r<n-1;r+=2)t.push(parseInt(e.substr(r,2),16));return String.fromCharCode.apply(String,t)}function m(){this.reset()}return m.prototype.append=function(e){return this.appendBinary(l(e)),this},m.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t=this._buff.length,i;for(i=64;i<=t;i+=64)n(this._hash,r(this._buff.substring(i-64,i)));return this._buff=this._buff.substring(i-64),this},m.prototype.end=function(e){var t=this._buff,n=t.length,r,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a;for(r=0;r<n;r+=1)i[r>>2]|=t.charCodeAt(r)<<(r%4<<3);return this._finish(i,n),a=c(this._hash),e&&(a=p(a)),this.reset(),a},m.prototype.reset=function(){return this._buff=``,this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},m.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},m.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},m.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},m.prototype._finish=function(e,t){var r=t,i,a,o;if(e[r>>2]|=128<<(r%4<<3),r>55)for(n(this._hash,e),r=0;r<16;r+=1)e[r]=0;i=this._length*8,i=i.toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(i[2],16),o=parseInt(i[1],16)||0,e[14]=a,e[15]=o,n(this._hash,e)},m.hash=function(e,t){return m.hashBinary(l(e),t)},m.hashBinary=function(e,t){var n=c(a(e));return t?p(n):n},m.ArrayBuffer=function(){this.reset()},m.ArrayBuffer.prototype.append=function(e){var t=f(this._buff.buffer,e,!0),r=t.length,a;for(this._length+=e.byteLength,a=64;a<=r;a+=64)n(this._hash,i(t.subarray(a-64,a)));return this._buff=a-64<r?new Uint8Array(t.buffer.slice(a-64)):new Uint8Array,this},m.ArrayBuffer.prototype.end=function(e){var t=this._buff,n=t.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i,a;for(i=0;i<n;i+=1)r[i>>2]|=t[i]<<(i%4<<3);return this._finish(r,n),a=c(this._hash),e&&(a=p(a)),this.reset(),a},m.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array,this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},m.ArrayBuffer.prototype.getState=function(){var e=m.prototype.getState.call(this);return e.buff=d(e.buff),e},m.ArrayBuffer.prototype.setState=function(e){return e.buff=u(e.buff,!0),m.prototype.setState.call(this,e)},m.ArrayBuffer.prototype.destroy=m.prototype.destroy,m.ArrayBuffer.prototype._finish=m.prototype._finish,m.ArrayBuffer.hash=function(e,t){var n=c(o(new Uint8Array(e)));return t?p(n):n},m})}))()),x={secondary:{label:`Secondary`,isTertiary:!1},"primary & secondary":{label:`Primary & Secondary`,isTertiary:!1},k12:{label:`Primary & Secondary`,isTertiary:!1},primary:{label:`Primary`,isTertiary:!1},special:{label:`Special`,isTertiary:!1},university:{label:`University`,isTertiary:!0},middle:{label:`Middle`,isTertiary:!1},"fe college":{label:`FE College`,isTertiary:!0},"high school":{label:`Secondary`,isTertiary:!1},elementary:{label:`Primary`,isTertiary:!1},"middle school":{label:`Middle`,isTertiary:!1},tafe:{label:`TAFE`,isTertiary:!0},college:{label:`FE College`,isTertiary:!0},"sixth form college":{label:`Sixth Form College`,isTertiary:!0}},S={england:`ENG`,scotland:`SCT`,wales:`WLS`,"northern ireland":`NIR`},C={hashedEmail(e){let t=e.trim().toLowerCase();return b.default.hash(t)},removeEmptyKeys(e){if(Array.isArray(e))return e;let t={...e};return Object.entries(t).filter(([,e])=>!(e==null||typeof e==`string`&&!e.length)).reduce((e,[t,n])=>({...e,[t]:n===Object(n)?C.removeEmptyKeys(n):n}),{})},Conversions:{TRIAL_UPGRADE_REQUEST:`Request - Trial Upgrade`,FREE_TRIAL_REQUEST:`Request - Free Trial`,OLYMPICS_SPECIAL_OFFER_REQUEST:`Request - Olympics Special Offer`},Sources:{CV_PRODUCT_TRIAL_REQUESTED:`cv_product_trial_requested`,CV_PRODUCT_BDM_TRIAL_REQUESTED:`cv_product_bdm_trial_requested`,CV_PRODUCT_TRIAL_UPGRADE_REQUESTED:`cv_product_trial_upgrade_requested`},getSchoolType(e){if(!e)return;let t=e.toLowerCase();return[`unknown`,`other`].includes(t)?void 0:x[t]?.label||e},isTertiarySchool(e){return x[e?.toLowerCase()]?.isTertiary||!1},parseProvince(e){return e.length?S[e.toLowerCase()]||e:``}},w={checkEmail(e){return{url:`/api/braze/check-email`,key:`braze:check:email:${e}`,type:l.POST,data:{email:e}}},prospectLookups(e){return{url:`{gateway}/v1/prospects/${e}/lookups`,key:`prospect:lookup:${e}`}}};function T(){return{createOrUpdateProfile:p(a.ProfileApiClient).createOrUpdate}}var E=function(e){return e.ContactUs=`Contact - Contact Us`,e.LivestreamBooking=`Submit - Livestream Booking`,e}({}),D=function(e){return e.LivestreamBooking=`sl_product_livestream`,e.ContactUs=`sl_marketing_form_contact_us`,e}({});function O(e,t){return{...e,custom:{...e?.custom,source:t.source},event:{...e?.event,conversion:t.conversion}}}function k(){let e=f(u.BrazeClient);function t({user:t,additionalData:n,source:r,eventType:i,conversion:a,productType:o,callback:s}){let c=O(t,{source:r,conversion:a});e.setUserInit(c),e.logFormEvent({eventType:i,additionalData:n,callback:s,internalOptions:{subscriptionGroups:o}})}return{client:e,logFormSubmission:t}}function A(){return k()}var j=[`Teacher`,`Librarian / Teacher Librarian`,`Curriculum Coordinator`,`Digital Technology Coordinator`,`SSO / SLSO`,`IT`,`Head of Department`,`Head of Subject`,`Assistant Principal`,`Deputy Principal`,`Principal`,`Business Manager`],M=[`Teacher`,`Librarian / 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`],N=[`Teacher`,`Librarian / Teacher Librarian`,`Head of Department`,`Instructional Technology Specialist`,`Curriculum Coordinator`,`School Leadership`,`District Leadership`,`Academic Coach`,`Principal`,`IT / IT Specialist`],ee=[`Teacher`,`Librarian / Teacher Librarian`,`Curriculum Leader`,`e-Learning Coordinator`,`IT`,`Head of Department`,`Head of Faculty`,`Learning Support`,`Learning Assistant`,`Deputy Principal`,`Assistant Principal`,`Principal`],P=[`Teacher`,`Librarian / Teacher Librarian`,`Educational Assistant (EA)`,`Learning Support Teacher / Resource Teacher`,`Department Head / Manager`,`Curriculum Coordinator / Consultant`,`School Counsellor / Guidance Counsellor`,`Vice-Principal`,`Principal`,`Superintendent`,`Director of Education`],F=[`Professor`,`Lecturer`,`Course Coordinator / Administrator`,`Digital Learning Manager`,`Tutor`,`Teaching Fellow`,`Librarian`,`Learning Technologist`,`Teaching Assistant`,`Researcher`,`IT`],te=[`Professor`,`Lecturer`,`Course Coordinator / Administrator`,`Digital Learning Manager`,`Tutor`,`Teaching Fellow`,`Librarian`,`Learning Technologist`,`Teacher`,`Teaching Assistant`,`Researcher`,`IT`],ne={[g.AU]:j,[g.NZ]:ee,[g.UK]:M,[g.US]:N,[g.CA]:P},re={[g.AU]:F,[g.UK]:te};function ie(e){let t=e.countryCode?.toLowerCase();return e.isTertiary?re[t]||F:ne[t]||N}var I=e(s()),L=o(),R=`OTHER`;function z(e,t){return t.includes(e)?e:e?R:``}function ae(e){let{error:t,onChange:n,countryCode:r,isTertiary:i}=e,a=ie({countryCode:r,isTertiary:i}),o=z(e.initialValue,a),[s,c]=I.useState(o),[l,u]=I.useState(o===R?e.initialValue:``);I.useEffect(()=>{c(z(e.initialValue,a))},[e.initialValue]);function d(e){c(e.target.value),u(``),n(e.target.value===R?``:e.target.value)}function f(e){u(e.target.value),n(e.target.value)}let p=s===R;return(0,L.jsxs)(`div`,{className:`form-group`,children:[(0,L.jsxs)(`label`,{htmlFor:e.id,className:e.labelClassName,children:[`Job title`,e.required&&(0,L.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,L.jsxs)(`div`,{className:`mb-2`,children:[(0,L.jsxs)(`select`,{id:e.id,name:e.id,className:`form-select ${e.size===`lg`?`form-select-lg`:``} ${s.length?`text-dark`:`text-secondary`} ${!!t&&`is-invalid`}`,value:s,placeholder:`Role`,onChange:d,children:[(0,L.jsx)(`option`,{value:``,disabled:!0,className:`text-secondary`,children:e.placeholder?e.placeholder:(0,L.jsx)(L.Fragment,{children:`What do you do?`})}),a.map((e,t)=>(0,L.jsx)(`option`,{value:e,className:`text-dark`,children:e},t)),(0,L.jsx)(`option`,{value:R,className:`text-dark`,children:`Other`})]}),!!t&&!p&&(0,L.jsx)(y,{name:e.id,children:t})]}),p&&(0,L.jsxs)(`div`,{className:`mb-3`,children:[(0,L.jsx)(`input`,{className:`form-control ${e.size===`lg`?`form-select-lg`:``} ${!!t&&`is-invalid`}`,type:`text`,value:l,placeholder:`What do you do?`,autoFocus:!0,onChange:f}),!!t&&(0,L.jsx)(y,{name:e.id,children:t})]})]})}function oe(){return(0,L.jsx)(`svg`,{viewBox:`0 0 24 24`,children:(0,L.jsx)(`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 B={clearInput:`_clearInput_1l19p_1`,clearableInput:`_clearableInput_1l19p_8`},V=I.forwardRef((e,t)=>{let{onClickClear:n,showClearButton:r,clearClassName:i,...a}=e;return(0,L.jsxs)(`div`,{className:`position-relative`,children:[(0,L.jsx)(`input`,{...a,ref:t,className:`${e.className} ${B.clearableInput}`}),(!!e.value||r)&&(0,L.jsx)(`span`,{className:`${B.clearInput} position-absolute cursor-pointer text-secondary ${i||``}`,role:`button`,onClick:n,onKeyDown:e=>e.key===`Enter`&&n(),tabIndex:0,children:(0,L.jsx)(`div`,{className:`d-inline-block svg-container md`,children:(0,L.jsx)(oe,{})})})]})}),se=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n},ce=`__googleMapsScriptId`,H;(function(e){e[e.INITIALIZED=0]=`INITIALIZED`,e[e.LOADING=1]=`LOADING`,e[e.SUCCESS=2]=`SUCCESS`,e[e.FAILURE=3]=`FAILURE`})(H||={});var le=class e{constructor({apiKey:t,authReferrerPolicy:n,channel:r,client:i,id:a=ce,language:o,libraries:s=[],mapIds:c,nonce:l,region:u,retries:d=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=n,this.channel=r,this.client=i,this.id=a||`__googleMapsScriptId`,this.language=o,this.libraries=s,this.mapIds=c,this.nonce=l,this.region=u,this.retries=d,this.url=f,this.version=p,e.instance){if(!se(this.options,e.instance.options))throw Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(e.instance.options)}`);return e.instance}e.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?H.FAILURE:this.done?H.SUCCESS:this.loading?H.LOADING:H.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+=`?callback=${this.CALLBACK}`,this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(`,`)}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(`,`)}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){let e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,t)=>{this.loadCallback(n=>{n?t(n.error):e(window.google)})})}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){if(document.getElementById(this.id)){this.callback();return}let e=this.createUrl(),t=document.createElement(`script`);t.id=this.id,t.type=`text/javascript`,t.src=e,t.onerror=this.loadErrorCallback.bind(this),t.defer=!0,t.async=!0,this.nonce&&(t.nonce=this.nonce),document.head.appendChild(t)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){let e=this.errors.length*2**this.errors.length;console.log(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},e)}else this.onerrorEvent=e,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){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.`),this.callback();return}this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}};function U(e){return new le({apiKey:e.apiKey,version:`weekly`,libraries:e.libraries,retries:3})}function W(e){let t={apiKey:e.apiKey,libraries:e.libraries||[`places`]},[n,r]=I.useState(!1),[i,a]=I.useState(U(t));I.useEffect(()=>{o()},[]);function o(e,n){if(!i){a(U(t));return}i.loadCallback(t=>{if(t){r(!1),n&&n(t);return}r(!0),e&&e()})}return{loader:i,scriptLoaded:n,onGoogleApiReady:o}}function G(e){let{scriptLoaded:t}=W({apiKey:e.googleApiKey}),[n,r]=I.useState();return I.useEffect(()=>{t&&r(new google.maps.places.AutocompleteService)},[t]),n}var K=`us`,q=`country:placeholder:text`;function ue(e){let t=_.getLocalizedLocalityPlaceholderText(e?.countryCode);if(t)return t;let n=d.cacheGet(`${q}:${e?.countryCode}`);if(n)return n}function de(){return String.fromCharCode(96+r.getRandomInt(26))}function fe({apiKey:e,geoLocation:t,makeRequest:n=!0,template:i=`E.g. [placeholder]`,templateKey:a=`[placeholder]`}){let o=G({googleApiKey:e}),[s,c]=I.useState(()=>ue(t));I.useEffect(()=>{if(s||!o||!n)return;let e=t?.countryCode||K,r={input:de(),types:[`(cities)`],region:e,componentRestrictions:{country:e}};o.getPlacePredictions(r,(t,n)=>u(t,n,e))},[s,o,t,n]);function l(e,t){d.cacheSet(`${q}:${t}`,e,86400),c(e)}function u(e,t,n){if(t!==google.maps.places.PlacesServiceStatus.OK||!e){l(_.getLocalizedLocalityPlaceholderText(K),n);return}let o=e[r.getRandomInt(e.length)].description;l(i.replace(a,o),n)}return s}function J(e){let[t,n]=I.useState(0),r=I.useRef(null),[i,a]=I.useState(!!e.hideInitially);function o(){r.current&&r.current.children[t-1]?.scrollIntoView({block:`center`})}function s(r){if(e.hideOnEnter&&a(!1),r.code===`ArrowDown`){r.stopPropagation(),r.preventDefault();let i=t+1;i>e.itemCount&&(i=1),n(i),o();return}if(r.code===`ArrowUp`){r.stopPropagation(),r.preventDefault();let i=t-1;i<=0&&(i=e.itemCount),n(i),o();return}if(r.code===`Enter`&&t>0){r.stopPropagation(),r.preventDefault(),e.onSelected(t-1),e.hideOnEnter&&a(!0);return}n(0)}function c(){e.hideOnBlur&&a(!1)}function l(){e.hideOnBlur&&a(!0)}return{selectedIndex:t,onKeyDown:s,containerRef:r,hide:i,onFocus:c,onBlur:l}}var Y={getPlaceDetails(e){let t,n,r,i,a=e.formatted_address;for(let a of e.address_components)for(let e of a.types)e===`locality`&&(t=a.short_name),e===`administrative_area_level_1`&&(n=a.short_name),e===`postal_code`&&(i=a.short_name),e===`country`&&(r=a.short_name);return{locality:a,country:r,postalCode:i,city:t,province:n}}},pe={1:`geocoderPermissionDenied`,2:`geocoderUnavailable`,3:`geocoderTimeout`};function me(e){let[t,n]=I.useState({}),{onGoogleApiReady:r}=W(e);function i(){r(()=>{window.navigator.geolocation.getCurrentPosition(a,o)})}function a(e){let{latitude:t,longitude:r}=e.coords,i=new google.maps.LatLng(t,r);new google.maps.Geocoder().geocode({location:i},(e,i)=>{if(i!==google.maps.GeocoderStatus.OK)return;let a=e.find(e=>e.types.includes(`locality`)||e.types.includes(`administrative_area_level_2`));n({...Y.getPlaceDetails(a),longitude:r,latitude:t})})}function o(t){let n=pe[t.code];n||=`geocoderUnknown`,e.onPositionError(`We are unable to access your location. Please try again later.`)}return{placeDetails:t,onClickGetCurrentLocation:i}}function he({search:e,makePredicition:t,geoLocation:n,apiKey:r}){let i=G({googleApiKey:r}),a=v(e,300),[o,s]=I.useState();I.useEffect(()=>{if(!i)return;if(a?.length===0||!t){s(void 0);return}let e=n?.countryCode||`us`;i.getPlacePredictions({input:a,componentRestrictions:n?.isFallback?void 0:{country:e},region:e,types:[`locality`,`sublocality`,`postal_code`]},c)},[a,t,i]);function c(e,t){if(t!==google.maps.places.PlacesServiceStatus.OK||!e){s(void 0);return}s(e)}function l(e,t,r){new google.maps.places.PlacesService(t.current).getDetails({placeId:e.place_id,fields:[`geometry`,`address_components`,`formatted_address`],region:n.countryCode},(e,t)=>{if(t!==google.maps.places.PlacesServiceStatus.OK)return;let n=e.geometry.location.lng(),i=e.geometry.location.lat(),{locality:a,country:o,postalCode:s,city:c,province:l}=Y.getPlaceDetails(e);r({longitude:n,latitude:i,locality:a,country:o,city:c,postalCode:s,province:l})})}return{localityPredicitions:o,getPlaceInfo:l}}function X(){return(0,L.jsx)(`svg`,{viewBox:`0 0 24 24`,children:(0,L.jsx)(`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`})})}var Z={baseText:`_baseText_bmazz_1`,dropdown:`_dropdown_bmazz_4`,suggestionContainer:`_suggestionContainer_bmazz_7`,suggestionContainerInner:`_suggestionContainerInner_bmazz_13`,suggestionItem:`_suggestionItem_bmazz_18`,suggestionLoading:`_suggestionLoading_bmazz_18`,noSuggestion:`_noSuggestion_bmazz_18`,large:`_large_bmazz_22`,selected:`_selected_bmazz_32`,useMyLocation:`_useMyLocation_bmazz_36`};function ge(e){let{predictions:t,getPlaceInfo:n,selectedIndex:r}=e;return(0,L.jsx)(L.Fragment,{children:t.map((e,t)=>(0,L.jsx)(h,{className:`${Z.suggestionItem} ${r-1===t?Z.selected:``}`,onKeyDown:t=>t.key===`Enter`&&n(e),onMouseDown:()=>n(e),onClick:()=>n(e),children:e.description},e.place_id))})}function _e(e){let t=I.useRef(null),[r,a]=I.useState(e.data?.schoolLocality||``),[o,s]=I.useState(!1),l=fe({apiKey:e.googleMapsApiKey,geoLocation:e.geoLocation}),{localityPredicitions:u,getPlaceInfo:d}=he({search:r,makePredicition:o,geoLocation:e.geoLocation,apiKey:e.googleMapsApiKey}),{placeDetails:f,onClickGetCurrentLocation:p}=me({apiKey:e.googleMapsApiKey,onPositionError:w}),m=window.navigator.geolocation?1:0,{selectedIndex:g,onKeyDown:_,containerRef:v,hide:y,onBlur:b,onFocus:x}=J({onSelected:D,itemCount:(u?.length??0)+m,hideOnBlur:e.hideOnBlur}),[S,C]=I.useState();I.useEffect(()=>{O(f)},[f]);function w(e){s(!0),C(e)}function T(t){S&&C(void 0),o||s(!0),(e.data?.longitude||e.data?.latitude||e.data?.schoolLocality)&&e.clearData(),a(t)}function E(){T(``),t.current.focus()}function D(e){if(!u)return;if(e===u.length){A();return}let t=u[e];t&&k(t)}function O(t){e.setData({schoolLocality:t.locality,country:t.country,province:t.province,schoolPostCode:t.postalCode,longitude:t.longitude,latitude:t.latitude}),t.locality&&a(t.locality)}function k(e){o&&s(!1),d(e,t,O)}function A(t){t?.preventDefault(),s(!1),p(),e.logUserAction?.({},{actionType:i.Click,descriptor:c.UseMyLocation})}function j(){let t=`form-control`;return e.size===`lg`&&(t+=` form-control-lg`),t}let M=u?.length&&!e.data?.schoolLocality?.length,N=window.navigator.geolocation&&!e.data?.schoolLocality?.length,ee=e.labelClassName||`d-block text-center mb-3 fw-normal ${Z.baseText}`,P=`form-group position-relative`;return e.size===`lg`&&(P+=` ${Z.large}`),(0,L.jsxs)(`div`,{className:P,children:[(0,L.jsxs)(`label`,{className:ee,htmlFor:`locality-input`,children:[`ZIP code or city`,e.required&&(0,L.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,L.jsx)(V,{type:`text`,value:r,onChange:e=>T(e.currentTarget.value),id:`locality-input`,className:j(),ref:t,autoComplete:`off`,placeholder:l||`Loading...`,disabled:e.disabled||!l,autoFocus:e?.autoFocus,onClickClear:E,onKeyDown:_,onFocus:x,onBlur:b}),(0,L.jsxs)(`div`,{className:`position-absolute z-1 w-100 ${Z.dropdown} ${y?`d-none`:``}`,children:[!!M&&(0,L.jsx)(`div`,{className:Z.suggestionContainer,children:(0,L.jsxs)(`div`,{className:Z.suggestionContainerInner,ref:v,children:[(0,L.jsx)(ge,{predictions:u,getPlaceInfo:k,selectedIndex:g}),window.navigator.geolocation&&e.useGeoLocationApi&&(0,L.jsx)(h,{className:n(Z.suggestionItem,`px-1`,g-1===u.length?Z.selected:``),onClick:A,children:(0,L.jsxs)(`div`,{className:`btn btn-link info-link btn-with-icon bg-transparent py-0 pe-1`,children:[(0,L.jsx)(X,{}),`Use my current location`]})})]})}),N&&!M&&e.useGeoLocationApi&&(0,L.jsx)(`div`,{className:`d-flex ${Z.useMyLocation}`,children:(0,L.jsxs)(`button`,{onClick:A,className:`btn btn-link info-link bg-white btn-with-icon`,children:[(0,L.jsx)(X,{}),`Use my current location`]})}),!!S&&(0,L.jsx)(`div`,{className:`text-danger p-2`,children:S})]})]})}var ve=class extends Error{constructor(e,t=`Error`){super(t),this.body=e}},ye={prepareQuery(e,t){let n=e;return Object.keys(t).forEach((e,r)=>{t[e]&&(r===0?n+=`?`:n+=`&`,n+=`${e}=${encodeURIComponent(t[e])}`)}),n}};function Q(e){let t={method:l.GET,headers:{"Content-type":`application/json`}};e.method&&(t={...t,method:e.method}),e.init&&(t={...t,...e.init});let n=e.url;return t.method===l.GET&&e.data?n=ye.prepareQuery(n,e.data):e.data&&(t={...t,body:JSON.stringify(e.data)}),{init:t,url:n}}var $={async asyncFetch(e){let t=Q(e),n=await fetch(t.url,t.init);if(!n.ok)throw new ve(await n.json());if(n.status!==204)return await n.json()},async asyncFetchPlain(e){let t=Q(e),n=await fetch(t.url,t.init);if(n.ok)return await n.text()},fetch(e){let t=Q(e);return fetch(t.url,t.init).then(e=>{if(e.status!==204)return e.json()}).then(t=>(e.success&&e.success(t),t)).catch(t=>(e.error&&e.error(),t)).finally(()=>{e.always&&e.always()})}},be={search(e,t,n,r,i){let a={longitude:t.longitude,latitude:t.latitude};t.query&&(a.query=t.query),$.fetch({url:e,data:a,success:n,error:r,always:i})},async create(e,t){return $.asyncFetch({url:e.createProspect,method:l.POST,data:t})},getLookups(e,t){return $.asyncFetch({url:e.prospectLookups(t)})}},xe=50;function Se(e){return e.toLowerCase().split(` `).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Ce(e){let t=[];return e.city&&t.push(Se(e.city)),e.province&&t.push(e.province),e.postCode&&t.push(e.postCode),t.join(` `)}function we(e){let{filteredSchoolsList:t,getSchoolName:n,onSchoolSuggestionClick:r,selectedIndex:i}=e;return(0,L.jsx)(L.Fragment,{children:t.map((e,t)=>(0,L.jsxs)(h,{className:`${Z.suggestionItem} ${i-1===t?Z.selected:``}`,onKeyDown:t=>t.key===`Enter`&&r(e),onMouseDown:()=>r(e),onClick:()=>r(e),children:[n(e),` `,(0,L.jsx)(`br`,{}),(0,L.jsx)(`small`,{className:`text-secondary`,children:Ce(e)})]},e.id))})}function Te(e){return(0,L.jsx)(`div`,{className:`info-link ${Z.suggestionItem} ${Z.noSuggestion} ${e.selected?Z.selected:``}`,onKeyDown:t=>t.key===`Enter`&&e.handleNoSuggestion(),onMouseDown:e.handleNoSuggestion,onClick:e.handleNoSuggestion,children:`Can't find your school?`})}function Ee(e){let t=I.useRef(null),[n,r]=I.useState(!0),[i,a]=I.useState(e.data.schoolName&&e.data.schoolPostCode?e.data.schoolName+`, `+e.data.schoolPostCode:e.data.schoolName?e.data.schoolName:``),[o,s]=I.useState(),c=v(i,250),{selectedIndex:l,onKeyDown:u,containerRef:d,hide:f,onBlur:p,onFocus:h}=J({onSelected:g,itemCount:(o?.length??0)+1,hideOnBlur:e.hideOnBlur});function g(t){if(!o&&!t)return;if(t===o.length){e.onClickNoSuggestions(i);return}let n=o[t];n&&T(n)}let _=!!e.data?.prospectId,y=n&&!_,b=!n&&!_&&o?.length<xe,x=o?.length&&!_;I.useEffect(()=>{if(!_){if(!c.length){w();return}if(!_&&c.length>1&&c===i){w(c);return}}},[c,_]);function S(t){(e.data.schoolName||e.data.prospectId)&&e.clearData(),t!==i&&a(t)}function C(){S(``),t.current.focus()}function w(t){if(!e.data.latitude&&!e.data.longitude){r(!1);return}r(!0);let n={latitude:e.data.latitude,longitude:e.data.longitude};t&&t.length&&(n.query=t),be.search(e.searchUrl,n,e=>s(e),null,()=>r(!1))}function T(t){a(E(t)),e.setData({prospectId:t.id,schoolName:t.name,schoolPostCode:t.postCode,schoolType:t.prospectType,province:t.province,city:t.city,country:t.countryCode})}function E(e){return e.name}let D=(x||y||b)&&!e.disabled&&!f,O=!y&&!b&&o?.length>=xe,k=`form-control`,A=`form-group position-relative`;return e.size===`lg`&&(k+=` form-control-lg`,A+=` ${Z.large}`),(0,L.jsxs)(`div`,{className:A,children:[(0,L.jsxs)(`label`,{className:e.labelClassName,htmlFor:`school-input`,children:[`School`,e.required&&(0,L.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,L.jsx)(V,{id:`school-input`,value:i,onChange:e=>S(e.currentTarget.value),ref:t,className:k,type:`text`,autoComplete:`off`,placeholder:e.placeholder||`Search for your school`,disabled:e.disabled,autoFocus:!0,onClickClear:C,onKeyDown:u,onFocus:h,onBlur:p}),(0,L.jsx)(`div`,{className:`position-absolute z-1 w-100 ${Z.dropdown} ${f?`d-none`:``}`,children:(0,L.jsx)(`div`,{className:`${Z.suggestionContainer} ${D?``:`d-none`}`,children:(0,L.jsxs)(`div`,{className:Z.suggestionContainerInner,ref:d,children:[x?(0,L.jsx)(we,{filteredSchoolsList:o,onSchoolSuggestionClick:T,getSchoolName:E,selectedIndex:l}):y&&(0,L.jsx)(`div`,{className:`${Z.suggestionLoading} py-4 d-flex justify-content-center`,children:(0,L.jsx)(m,{animation:`border`})}),O&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`hr`,{className:`my-0`}),(0,L.jsx)(`div`,{className:`${Z.suggestionItem} ${Z.noSuggestion} text-secondary text-center`,children:(0,L.jsxs)(`small`,{children:[`Can't find your school? `,(0,L.jsx)(`br`,{}),` Try searching to narrow the results`]})})]}),!y&&b&&(0,L.jsx)(Te,{selected:l===o.length+1,handleNoSuggestion:()=>{e.onClickNoSuggestions(i)}})]})})})]})}export{D as a,w as c,A as i,C as l,_e as n,E as o,ae as r,T as s,Ee as t};
|
|
2
|
+
//# sourceMappingURL=D8g6nOG92.chunk.js.map
|