@clickview/auth 0.68.0 → 0.69.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 +2 -2
- package/dist/bundles.json +2 -2
- package/dist/css/{CyHxn3Bs.chunk.css → BzkciF7s.chunk.css} +1 -1
- package/dist/en.json +1 -1
- package/dist/scripts/{index-DN6gPs4i.js → index-DBemvgj7.js} +2 -2
- package/dist/scripts/{index-DN6gPs4i.js.map → index-DBemvgj7.js.map} +1 -1
- package/package.json +1 -1
|
@@ -26,5 +26,5 @@ __p+='`),t}),a+=`';
|
|
|
26
26
|
(`+a+`: `+o+`)`,s.name=`ChunkLoadError`,s.type=a,s.request=o,r[1](s)}}),`chunk-`+t,t)}};var t=(t,n)=>{var r,a,[o,s,c]=n,l=0;if(o.some((t=>e[t]!==0))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);c&&c(i)}for(t&&t(n);l<o.length;l++)a=o[l],i.o(e,a)&&e[a]&&e[a][0](),e[a]=0},n=self.webpackChunk_clickview_braze_client=self.webpackChunk_clickview_braze_client||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var a={};return(()=>{i.r(a),i.d(a,{BrazeClient:()=>Gt,ClassHookMarketingFormEvent:()=>ht,CountryCode:()=>ct,CustomUserAttributes:()=>yt,DefaultUserAttributes:()=>vt,EventUserAttributes:()=>bt,MarketingFormEvent:()=>dt,MarketingUserEvent:()=>ut,PageEvent:()=>lt,ProductEvent:()=>gt,ProductFormEvent:()=>ft,StreamableFormEvent:()=>pt,StreamableMarketingFormEvent:()=>mt,getInstance:()=>Kt});var e=i(5825),t=i(1087),n=i(5333),r=i(6524);function o(){(0,n.e)(void 0,`iam`,`.ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9011;-webkit-tap-highlight-color:transparent}.ab-iam-root.v3:focus{outline:0}.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-show,.ab-iam-root.v3.ab-effect-html.ab-show,.ab-iam-root.v3.ab-effect-modal.ab-show{opacity:1}.ab-iam-root.v3.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-html.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-modal.ab-show.ab-animate-in{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide,.ab-iam-root.v3.ab-effect-html.ab-hide,.ab-iam-root.v3.ab-effect-modal.ab-hide{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-html.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-modal.ab-hide.ab-animate-out{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-slide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-show .ab-in-app-message{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-iam-root.v3.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left{-webkit-transform:translateX(-535px);-moz-transform:translateX(-535px);-ms-transform:translateX(-535px);transform:translateX(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up{-webkit-transform:translateY(-535px);-moz-transform:translateY(-535px);-ms-transform:translateY(-535px);transform:translateY(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down{-webkit-transform:translateY(535px);-moz-transform:translateY(535px);-ms-transform:translateY(535px);transform:translateY(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3 .ab-ios-scroll-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;pointer-events:all;touch-action:auto;-webkit-overflow-scrolling:touch}.ab-iam-root.v3 .ab-in-app-message{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;text-align:center;-webkit-box-shadow:0 0 4px rgba(0,0,0,.3);-moz-box-shadow:0 0 4px rgba(0,0,0,.3);box-shadow:0 0 4px rgba(0,0,0,.3);line-height:normal;letter-spacing:normal;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;z-index:9011;max-width:100%;overflow:hidden;display:inline-block;pointer-events:all;color:#333;color-scheme:normal}.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-text{float:none;line-height:1.5;margin:20px 25px;max-width:100%;overflow:hidden;overflow-y:auto;vertical-align:text-bottom;word-wrap:break-word;white-space:pre-wrap;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb{-webkit-appearance:none;border:4px solid transparent;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background-color:rgba(0,0,0,.2)}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-header{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;font-size:20px;margin-bottom:10px;line-height:1.3}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:14px;font-weight:700;margin:20px;margin-top:calc(constant(safe-area-inset-top,0) + 20px);margin-right:calc(constant(safe-area-inset-right,0) + 20px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 20px);margin-left:calc(constant(safe-area-inset-left,0) + 20px);margin-top:calc(env(safe-area-inset-top,0) + 20px);margin-right:calc(env(safe-area-inset-right,0) + 20px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 20px);margin-left:calc(env(safe-area-inset-left,0) + 20px);max-height:150px;padding:10px;right:0;background-color:#efefef}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text{opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 25px 5px 10px;max-width:430px;vertical-align:middle;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{display:block;max-height:150px;overflow:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:365px;border-top:0;border-bottom:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{float:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;vertical-align:top;width:60px;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{float:none;position:relative;display:block;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img{background-size:cover;background-repeat:no-repeat;background-position:50% 50%;position:absolute;top:0;right:0;bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-icon{margin-top:20px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{padding:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-text{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-buttons{bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{float:none;height:auto;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{display:block;top:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none}.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{width:auto;max-height:720px;max-width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-html-message{background-color:transparent;border:none;height:100%;overflow:auto;position:relative;touch-action:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-message-buttons{position:absolute;bottom:0;width:100%;padding:17px 25px 30px 25px;z-index:inherit;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ab-iam-root.v3 .ab-in-app-message .ab-message-button{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;height:44px;line-height:normal;letter-spacing:normal;margin:0;max-width:100%;min-width:80px;padding:0 12px;position:relative;text-transform:none;width:48%;width:calc(50% - 5px);border:1px solid #1b78cf;-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;word-wrap:normal;white-space:nowrap}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:active:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.08)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:focus:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.15)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-iam-root.v3 .ab-in-app-message .ab-icon{float:none;display:inline-block;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-iam-root.v3 .ab-centered{margin:auto;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-iam-root.v3 .ab-page-blocker{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9001;pointer-events:all;background-color:rgba(51,51,51,.75)}@media (max-width:600px){.ab-iam-root.v3 .ab-in-app-message.ab-slideup{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-close-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic),.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-message-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:480px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}}@media (max-height:750px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-height:91vh;max-height:calc(100vh - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text{max-height:65vh;max-height:calc(100vh - 30px - 60px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image{max-height:45vh;max-height:calc(100vh - 30px - 155.17241379310346px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon{max-height:45vh;max-height:calc(100vh - 30px - 70px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons{max-height:50vh;max-height:calc(100vh - 30px - 93px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image{max-height:30vh;max-height:calc(100vh - 30px - 155.17241379310346px - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon{max-height:30vh;max-height:calc(100vh - 30px - 70px - 93px - 20px)}}@media (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area img{max-height:100%;max-width:100%}}@media (max-height:750px) and (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important;width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-height:480px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:750px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}`),(0,r.N)()}var s=i(8376),c=i(1090),l=i(1792),u=i(6616),d=i(4410),f=i(3811),p=i(1507),m=i(5242);function h(e,t){return e==null?``:(e=parseInt(e.toString()),isNaN(e)?``:(t&&!isNaN(parseFloat(t.toString()))||(t=1),`rgba(`+[(16711680&(e>>>=0))>>>16,(65280&e)>>>8,255&e,((4278190080&e)>>>24)/255*t].join(`,`)+`)`))}var g=i(7671),_=i(335),v=i(2730);function y(n){if(!e.ZP.X())return!1;if(!(n instanceof l.Z||n instanceof s.Z))return _.Z.error(g.De),!1;let r=n instanceof s.Z?v.G.mo:v.G.Oi;return t.Z.m().q(n,r).L}var b=i(4365),x=i(9342);function S(n){if(!e.ZP.X())return!1;if(!(n instanceof l.Z))return _.Z.error(g.De),!1;let r=t.Z.m().q(n,v.G.Ei);if(r){n.Ur()||y(n);for(let e=0;e<r.ge.length;e++)x.n.rr().fe(b.Z.Qr,[n.triggerId],r.ge[e])}return r.L}var C=i(420),w=i(3695);function T(n,r,i){if(!e.ZP.X())return!1;if(!(n instanceof c.Z))return _.Z.error(`inAppMessage argument to logInAppMessageHtmlClick must be an HtmlMessage object.`),!1;let a=v.G.Ei;r!=null&&(a=v.G.Gi);let o=t.Z.m().q(n,a,r,i);if(o.L)for(let e=0;e<o.ge.length;e++)x.n.rr().fe(b.Z.Qr,[n.triggerId,r],o.ge[e]);return o.L}var E=i(6243),D=i(2893),O=i(5806),k=i(1148),A=i(5319),j=i(7048),M=i(4072);function N(n,r){if(!e.ZP.X())return!1;if(!(n instanceof M.Z))return _.Z.error(`button must be an InAppMessageButton object`),!1;if(!(r instanceof l.Z))return _.Z.error(g.De),!1;let i=t.Z.m().Hi(n,r);if(i.L)for(let e=0;e<i.ge.length;e++)x.n.rr().fe(b.Z.Qr,[r.triggerId,n.id?.toString()],i.ge[e]);return i.L}var P=i(7429);let F=e=>{let t=e.querySelectorAll(`.ab-close-button, .ab-message-text, .ab-message-button`),n;for(let e=0;e<t.length;e++)n=t[e],n.tabIndex=0;if(t.length>0){let n=t[0],r=t[t.length-1];e.addEventListener(`keydown`,(t=>{let i=document.activeElement;t.keyCode===P.m.lo&&(t.shiftKey||i!==r&&i!==e?!t.shiftKey||i!==n&&i!==e||(t.preventDefault(),r.focus()):(t.preventDefault(),n.focus()))}))}},I=(e,t)=>{t.setAttribute(`role`,`dialog`),t.setAttribute(`aria-modal`,`true`),t.setAttribute(`aria-label`,`Modal Message`),e&&t.setAttribute(`aria-labelledby`,e)},L=(e,t,n,r)=>{if(e.buttons&&e.buttons.length>0){let i=document.createElement(`div`);i.className=`ab-message-buttons`,n.appendChild(i);let a=n.getElementsByClassName(`ab-message-text`)[0];a!=null&&(a.className+=` ab-with-buttons`);let o=i=>a=>(e.Ae(n,(()=>{N(i,e),i.clickAction===l.Z.ClickAction.URI?(0,C.S)(i.uri||``,r||e.openTarget===l.Z.OpenTarget.BLANK,a):i.clickAction===l.Z.ClickAction.NEWS_FEED&&t()})),a.stopPropagation(),!1);for(let t=0;t<e.buttons.length;t++){let n=e.buttons[t],r=document.createElement(`button`);r.className=`ab-message-button`,r.setAttribute(`type`,`button`),(0,p.lj)(r,`touchstart`);let a=n.text;n.text===``&&(a=`\xA0`),r.appendChild(document.createTextNode(a)),e.Ce()||(r.style.backgroundColor=h(n.backgroundColor),r.style.color=h(n.textColor),r.style.borderColor=h(n.borderColor)),r.onclick=o(n),i.appendChild(r)}}};var R=i(7070);function z(t,n,r){if(!e.ZP.X())return;if(o(),t==null)return!1;if(t instanceof s.Z)return _.Z.info(`User received control for a multivariate test, logging to Braze servers.`),y(t),!0;if(!(t instanceof l.Z)||t.constructor===l.Z)return!1;t.Nh();let a=t instanceof c.Z;if(a&&!t.trusted&&!e.ZP.tr())return _.Z.error(`HTML in-app messages are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these messages.`),!1;if(n??=document.body,t.ze()&&n.querySelectorAll(`.ab-modal-interactions`).length>0)return _.Z.info(`Cannot show in-app message ${t.message} because another message is being shown.`),!1;if(A.SD.fo()){let e=A.SD.co();if(e===A.eh.PORTRAIT&&t.orientation===l.Z.Orientation.LANDSCAPE||e===A.eh.LANDSCAPE&&t.orientation===l.Z.Orientation.PORTRAIT){let n=e===A.eh.PORTRAIT?`portrait`:`landscape`,r=t.orientation===l.Z.Orientation.PORTRAIT?`portrait`:`landscape`;return _.Z.info(`Not showing ${r} in-app message ${t.message} because the screen is currently ${n}`),!1}}if(!e.ZP.tr()){let e=!1;if(t.buttons&&t.buttons.length>0){let n=t.buttons;for(let t=0;t<n.length;t++)if(n[t].clickAction===l.Z.ClickAction.URI){let r=n[t].uri;e=(0,k.o)(r)}}else t.clickAction===l.Z.ClickAction.URI&&(e=(0,k.o)(t.uri));if(e)return _.Z.error(`Javascript click actions are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these actions.`),!1}let v=document.createElement(`div`);if(v.className=`ab-iam-root v3`,v.className+=function(e){let t=``;return e.animateIn&&(t+=` ab-animate-in`),e.animateOut&&(t+=` ab-animate-out`),e instanceof d.Z?t+=` ab-effect-fullscreen`:e instanceof c.Z?t+=` ab-effect-html`:e instanceof f.Z?t+=` ab-effect-modal`:e instanceof u.Z&&(t+=` ab-effect-slide`),t}(t),v.setAttribute(`role`,`complementary`),t.xe()&&(v.id=t.htmlId),e.ZP.nn(e.JY.jo)&&(v.style.zIndex=(e.ZP.nn(e.JY.jo)+1).toString()),n.appendChild(v),t.Ce()){let n=document.createElement(`style`);n.innerHTML=t.css,n.id=t.ve(),e.ZP.nn(e.JY.bo)!=null&&n.setAttribute(`nonce`,e.ZP.nn(e.JY.bo)),document.getElementsByTagName(`head`)[0].appendChild(n)}let b=t instanceof u.Z,x=function(t,n,r,a,o,s,v,y=document.body){if(t.ke=document.activeElement,t instanceof c.Z)return function(t,n,r,a,o,s){let c=document.createElement(`iframe`);c.setAttribute(`title`,`Modal Message`),o&&(c.style.zIndex=(o+1).toString());let u=e=>{let n=e.getAttribute(`href`),r=e.onclick;return i=>{if(r!=null&&typeof r==`function`&&!1===r.bind(e)(i))return;let o=(0,k.L)(n).abButtonId;if(o!=null&&o!==``||(o=e.getAttribute(`id`)||void 0),n!=null&&n!==``&&n.indexOf(`#`)!==0){let r=(e.getAttribute(`target`)||``).toLowerCase().replace(`_`,``)===`blank`,s=a||t.openTarget===l.Z.OpenTarget.BLANK||r,u=()=>{T(t,o,n),A.SD.openUri(n,s,i)};s?u():t.Ae(c,u)}else T(t,o,n||void 0);return i.stopPropagation(),!1}},d=(e,t,n)=>{let r=`([\\w]+)\\s*=\\s*document.createElement\\(['"]${n}['"]\\)`,i=e.match(new RegExp(r));if(i){let n=`${i[1]}.setAttribute("nonce", "${t}")`;return`${e.slice(0,i.index+i[0].length)};${n};${e.slice(i.index+i[0].length)}`}return null};if(c.onload=()=>{let a=null;if(s!=null){a=document.createElement(`html`),a.innerHTML=t.message||``;let e=a.getElementsByTagName(`style`);for(let t=0;t<e.length;t++)e[t].setAttribute(`nonce`,s);let n=a.getElementsByTagName(`script`);for(let e=0;e<n.length;e++){n[e].setAttribute(`nonce`,s),n[e].innerHTML=n[e].innerHTML.replace(/<style>/g,`<style nonce='${s}'>`);let t=d(n[e].innerHTML,s,`script`);t&&(n[e].innerHTML=t);let r=d(n[e].innerHTML,s,`style`);r&&(n[e].innerHTML=r)}}let o=c.contentWindow;o.focus();let f=o.document.querySelector(`html`);f&&(f.innerHTML=a?a.innerHTML:t.message||``,(0,j.E)(f));let p=o.document.getElementsByTagName(`head`)[0];if(p!=null){if(t.Ce()){let e=document.createElement(`style`);e.innerHTML=t.css||``,e.id=t.ve()||``,s!=null&&e.setAttribute(`nonce`,s),p.appendChild(e)}let e=o.document.createElement(`base`);e!=null&&(e.setAttribute(`target`,`_parent`),p.appendChild(e))}let m=o.document.getElementsByTagName(`title`);m&&m.length>0&&c.setAttribute(`title`,m[0].textContent||``);let h={closeMessage:function(){t.Ae(c)},logClick:function(){T(t,...arguments)},display:{},web:{}},v=function(){return function(){let t=arguments;Promise.resolve().then(i.bind(i,2261)).then((n=>{e.ZP.so()?n.requestPushPermission(...Array.prototype.slice.call(t)):_.Z.error(g.Go)}))}},y={requestImmediateDataFlush:function(){let t=arguments;Promise.resolve().then(i.bind(i,4650)).then((({requestImmediateDataFlush:n})=>{e.ZP.so()?n(...Array.prototype.slice.call(t)):_.Z.error(g.Go)}))},logCustomEvent:function(){let t=arguments;Promise.resolve().then(i.bind(i,1454)).then((({logCustomEvent:n})=>{e.ZP.so()?n(...Array.prototype.slice.call(t)):_.Z.error(g.Go)}))},logPurchase:function(){let t=arguments;i.e(364).then(i.bind(i,1364)).then((({logPurchase:n})=>{e.ZP.so()?n(...Array.prototype.slice.call(t)):_.Z.error(g.Go)}))},unregisterPush:function(){let t=arguments;Promise.resolve().then(i.bind(i,7824)).then((({unregisterPush:n})=>{e.ZP.so()?n(...Array.prototype.slice.call(t)):_.Z.error(g.Go)}))},requestPushPermission:v(),changeUser:function(){let t=arguments;Promise.resolve().then(i.bind(i,4790)).then((({changeUser:n})=>{e.ZP.so()?n(...Array.prototype.slice.call(t)):_.Z.error(g.Go)}))}},b=function(e){return function(){y[e](...Array.prototype.slice.call(arguments))}};for(let e of(0,D.XP)(y))h[e]=b(e);let x=[`setFirstName`,`setLastName`,`setEmail`,`setGender`,`setDateOfBirth`,`setCountry`,`setHomeCity`,`setEmailNotificationSubscriptionType`,`setLanguage`,`addAlias`,`setPushNotificationSubscriptionType`,`setPhoneNumber`,`setCustomUserAttribute`,`addToCustomAttributeArray`,`removeFromCustomAttributeArray`,`incrementCustomUserAttribute`,`setCustomLocationAttribute`,`addToSubscriptionGroup`,`removeFromSubscriptionGroup`],S=function(e){return function(){let t=(0,E.P)();t&&t[e](...Array.prototype.slice.call(arguments))}},C={};for(let e=0;e<x.length;e++)C[x[e]]=S(x[e]);h.getUser=function(){return C};let w={showFeed:n},O=function(e){return function(){let n=arguments;t.Ae(c,(function(){w[e](...Array.prototype.slice.call(n))}))}},k=h.display;for(let e of(0,D.XP)(w))k[e]=O(e);let A={registerAppboyPushMessages:v()},M=function(e){return function(){A[e](...Array.prototype.slice.call(arguments))}},N=h.web;for(let e of(0,D.XP)(A))N[e]=M(e);if(o.appboyBridge=h,o.brazeBridge=h,t.we!==l.Z.qe.$e){let e=o.document.getElementsByTagName(`a`);for(let t=0;t<e.length;t++)e[t].onclick=u(e[t]);let t=o.document.getElementsByTagName(`button`);for(let e=0;e<t.length;e++)t[e].onclick=u(t[e])}let P=o.document.body;if(P!=null){t.xe()&&(P.id=t.htmlId||``);let e=document.createElement(`hidden`);e.onclick=h.closeMessage,e.className=`ab-programmatic-close-button`,P.appendChild(e)}o.dispatchEvent(new CustomEvent(`ab.BridgeReady`)),c.className.indexOf(`ab-start-hidden`)!==-1&&(c.className=c.className.replace(`ab-start-hidden`,``),r(c)),document.activeElement!==c&&c.focus()},c.className=`ab-in-app-message ab-start-hidden ab-html-message ab-modal-interactions`,w.Z.OS===O.T.io){let e=document.createElement(`div`);return e.className=`ab-ios-scroll-wrapper`,e.appendChild(c),t.Me=e,e}return t.Me=c,c}(t,n,r,o,s,v);let b=function(e,t,n,r,i,a,o=document.body){let s=null,c=document.createElement(`div`);var u;c.className=`ab-in-app-message ab-start-hidden ab-background`,a&&(c.style.zIndex=(a+1).toString()),e.ze()&&(c.className+=` ab-modal-interactions`,c.setAttribute(`tabindex`,`-1`)),e.Ce()||(c.style.color=h(e.textColor),c.style.backgroundColor=h(e.backgroundColor),(u=e.backgroundColor)!=null&&(u=parseInt(u.toString()),!isNaN(u)&&!((4278190080&u)>>>24))&&(c.className+=` ab-no-shadow`));let d=()=>{c.className.indexOf(`ab-start-hidden`)!==-1&&(c.className=c.className.replace(`ab-start-hidden`,``),document.querySelectorAll(`.ab-iam-img-loading`).length>0?r(`Cannot show in-app message ${e.message} because another message is being shown.`,l.Z.Be.Le):n(c))},f=(t=!0)=>{let n=document.querySelectorAll(`.ab-iam-root`);n&&n.length!==0||(n=o.querySelectorAll(`.ab-iam-root`)),n&&n.length>0&&(n[0].classList.remove(`ab-iam-img-loading`),s&&=(clearTimeout(s),null),t?d():_.Z.error(`Cannot show in-app message ${e.message} because the image failed to load.`))};e.imageStyle===l.Z.ImageStyle.GRAPHIC&&(c.className+=` graphic`),e.orientation===l.Z.Orientation.LANDSCAPE&&(c.className+=` landscape`),e.buttons!=null&&e.buttons.length===0&&(e.clickAction!==l.Z.ClickAction.NONE&&(c.className+=` ab-clickable`),c.onclick=n=>(e.Ae(c,(()=>{S(e),e.clickAction===l.Z.ClickAction.URI?(0,C.S)(e.uri||``,i||e.openTarget===l.Z.OpenTarget.BLANK,n):e.clickAction===l.Z.ClickAction.NEWS_FEED&&t()})),n.stopPropagation(),!1));let g=(0,m.B)(`Close Message`,e.Ce()?void 0:h(e.closeButtonColor),(()=>{e.Ae(c)}));c.appendChild(g),a&&(g.style.zIndex=(a+2).toString());let v=document.createElement(`div`);v.className=`ab-message-text`;let y=(e.messageAlignment||e.De).toLowerCase();v.className+=` `+y+`-aligned`;let b=!1,x=document.createElement(`div`);if(x.className=`ab-image-area`,e.imageUrl){if(e.cropType===l.Z.CropType.CENTER_CROP){let t=document.createElement(`span`);t.className=`ab-center-cropped-img`,t.style.backgroundImage=`url(`+e.imageUrl+`)`,t.setAttribute(`role`,`img`),t.setAttribute(`aria-label`,`Modal Image`),e.Ge(t),x.appendChild(t)}else{let t=document.createElement(`img`);if(t.setAttribute(`src`,e.imageUrl),e.Ge(t),document.querySelectorAll(`.ab-iam-img-loading`).length===0){b=!0;let e=document.querySelectorAll(`.ab-iam-root`);e&&e.length>0&&e[0].classList.add(`ab-iam-img-loading`),s=window.setTimeout((()=>{f(!1)}),6e4),t.onload=()=>{f()},t.onerror=()=>{f(!1)}}x.appendChild(t)}c.appendChild(x),v.className+=` ab-with-image`}else if(e.icon){x.className+=` ab-icon-area`;let t=document.createElement(`span`);t.className=`ab-icon`,e.Ce()||(t.style.backgroundColor=h(e.iconBackgroundColor),t.style.color=h(e.iconColor));let n=document.createElement(`i`);n.className=`fa`,n.appendChild(document.createTextNode(e.icon)),n.setAttribute(`aria-hidden`,`true`),t.appendChild(n),x.appendChild(t),c.appendChild(x),v.className+=` ab-with-icon`}if((0,p.lj)(v,`touchstart`),e.header&&e.header.length>0){let t=document.createElement(`h1`);t.className=`ab-message-header`,e.He=R.Z.W(),t.id=e.He;let n=(e.headerAlignment||l.Z.TextAlignment.CENTER).toLowerCase();t.className+=` `+n+`-aligned`,e.Ce()||(t.style.color=h(e.headerTextColor)),t.appendChild(document.createTextNode(e.header)),v.appendChild(t)}return v.appendChild(e.Je()),c.appendChild(v),b||d(),e.Me=c,c}(t,n,r,a,o,s,y);if(t instanceof d.Z||t instanceof f.Z){let e=t instanceof d.Z?`ab-fullscreen`:`ab-modal`;b.className+=` ${e} ab-centered`,L(t,n,b,o),F(b),I(t.He,b)}else if(t instanceof u.Z){b.className+=` ab-slideup`;let e=b.getElementsByClassName(`ab-close-button`)[0];if(e!=null){let n=(0,p.MK)(`0 0 11.38 19.44`,`M11.38 9.72l-9.33 9.72L0 17.3l7.27-7.58L0 2.14 2.05 0l9.33 9.72z`,t.Ce()?void 0:h(t.closeButtonColor));n.setAttribute(`class`,`ab-chevron`),e.appendChild(n)}let n,r;(0,p.FZ)(b,p.mQ.U,(t=>{b.className+=` ab-swiped-left`,e!=null&&e.onclick!=null&&e.onclick(t)})),(0,p.FZ)(b,p.mQ.V,(t=>{b.className+=` ab-swiped-right`,e!=null&&e.onclick!=null&&e.onclick(t)})),t.slideFrom===l.Z.SlideFrom.TOP?(n=p.mQ.Re,r=` ab-swiped-up`):(n=p.mQ.Se,r=` ab-swiped-down`),(0,p.FZ)(b,n,(t=>{b.className+=r,e!=null&&e.onclick!=null&&e.onclick(t)}))}return b}(t,(()=>{i.e(864).then(i.bind(i,4864)).then((t=>{e.ZP.so()?t.showFeed():_.Z.error(g.Go)}))}),(n=>{if(t.ze()&&t.do()){let r=document.createElement(`div`);if(r.className=`ab-page-blocker`,t.Ce()||(r.style.backgroundColor=h(t.frameColor)),e.ZP.nn(e.JY.jo)&&(r.style.zIndex=e.ZP.nn(e.JY.jo).toString()),v.appendChild(r),!e.ZP.nn(e.JY.Lh)){let e=new Date().valueOf();r.onclick=r=>{new Date().valueOf()-e>l.Z.fh&&(t.Ae(n),r.stopPropagation())}}v.appendChild(n),n.focus(),t.Oh(v)}else if(b){let e=document.querySelectorAll(`.ab-slideup`),r=null;for(let t=e.length-1;t>=0;t--)if(e[t]!==n){r=e[t];break}if(t.slideFrom===l.Z.SlideFrom.TOP){let e=0;r!=null&&(e=r.offsetTop+r.offsetHeight),n.style.top=Math.max(e,0)+`px`}else{let e=0;r!=null&&(e=(window.innerHeight||document.documentElement.clientHeight)-r.offsetTop),n.style.bottom=Math.max(e,0)+`px`}}else if(a&&!e.ZP.nn(e.JY.Lh)){let e=t;(0,j.f)(n)&&n.contentWindow&&n.contentWindow.addEventListener(`keydown`,(function(t){t.keyCode===P.m.mh&&e.closeMessage()}))}y(t),t.dismissType===l.Z.DismissType.AUTO_DISMISS&&setTimeout((()=>{v.contains(n)&&t.Ae(n)}),t.duration),typeof r==`function`&&r()}),(e=>{_.Z.info(e)}),e.ZP.nn(e.JY.ho),e.ZP.nn(e.JY.jo),e.ZP.nn(e.JY.bo),n);return(a||b)&&(v.appendChild(x),t.Oh(v)),!0}function B(n){if(e.ZP.X())return typeof n==`function`?t.Z.m()._i((function(e){return n(e[0]),e.slice(1)})):null}var V=i(5522),H=i(1454),ee=i(2261),U=i(7824),te=i(4790),ne=i(4650),re=i(1843),ie=i(158),ae=i(67),oe=i(1066),W=i(1280);function se(t,n){if(e.ZP.X())return q.rr().xs(t,n)}class G extends ae.Z{constructor(e,t){super(e,t)}getUnviewedCardCount(){return super.getUnreadCardCount()}logCardImpressions(e){(0,oe.p)(e,!0)}logCardClick(e){return(0,W.d)(e,!0)}sr(){se()}dr(){return!0}}G.ur=6e4;var ce=i(7750),le=i(5899),K=i(5966),ue=i(4663),de=i(9179),fe=i(6870),pe=i(6504);class me extends ie.Z{constructor(t,n,r,i,a){super(),this.wt=t,this.u=n,this.yt=r,this.Ft=i,this.qt=a,this.wt=t,this.u=n,this.yt=r,this.Ft=i,this.qt=a,this.Jt=new ue.Z,e.ZP.$t(this.Jt),this.Bt=0,this.Ht=0,this.cards=[],this.Kt();let o=V.Z.Yt.Qt;new V.Z(o,_.Z).Zt(o.ss.ts,(e=>{this.es(e)})),this.hs=null,this.rs=null,this.ns=null,this.os=null,this.ls=null,this.us=10,this.cs=0}fs(){return this.hs}ds(e){this.hs=e}ps(){return this.rs}vs(e){this.rs=e}Kt(){if(!this.u)return;let e=this.u.j(K.I.C.ws)||[],t=[];for(let n=0;n<e.length;n++){let r=(0,le.rN)(e[n]);r!=null&&t.push(r)}this.cards=this.Cs(this.bs(t,!1)),this.Bt=this.u.j(K.I.C.gs)||this.Bt,this.Ht=this.u.j(K.I.C.ys)||this.Ht}js(e,t=!1,n=0,r=0){let i;if(t){i=[];for(let e of this.cards)e.test&&i.push(e)}else i=this.cards.slice();for(let n=0;n<e.length;n++){let r=e[n],a=null;for(let e=0;e<this.cards.length;e++)if(r.id===this.cards[e].id){a=this.cards[e];break}if(t){let e=(0,le.xA)(r);a!=null&&a.viewed&&e&&(e.viewed=!0),e!=null&&i.push(e)}else if(a==null){let e=(0,le.xA)(r);e!=null&&i.push(e)}else if(!a.Ct(r)){for(let e=0;e<i.length;e++)if(r.id===i[e].id){i.splice(e,1);break}}}this.cards=this.Cs(this.bs(i,t)),this.Rs(),this.Bt=n,this.Ht=r,this.u&&(this.u.k(K.I.C.gs,this.Bt),this.u.k(K.I.C.ys,this.Ht))}Ns(t){if(this.Ts()&&t!=null&&t.cards){this.u&&this.u.k(K.I.C.Ss,e.ZP.Ds());let n=t.full_sync;n||this.Kt(),this.js(t.cards,n,t.last_full_sync_at,t.last_card_updated_at),this.Jt.Dt(this.Us(!0))}}ks(e){this.u&&this.u.k(K.I.C.As,e)}Fs(e,t,n){let r=()=>{this.xs(t,n,!0)},i=e?(0,re.D)(e):null,a;if(this.zs(),!i||!i[`retry-after`])return void this.ks(0);let o=i[`retry-after`];if(isNaN(o)&&!isNaN(Date.parse(o)))a=Date.parse(o)-new Date().getTime(),a<0&&r();else{if(isNaN(parseFloat(o.toString()))){de.Z.q(v.G.qs,{e:`Received unexpected value for retry-after header in /sync response: `+o}),this.ks(0);return}a=1e3*parseFloat(o.toString())}this.ns=window.setTimeout((()=>{r()}),a);let s=0;this.u&&(s=this.u.j(K.I.C.As)),(s==null||isNaN(parseInt(s.toString())))&&(s=0),this.ks(parseInt(s.toString())+1)}es(e){if(!this.Ts())return;this.Kt();let t=this.cards.slice(),n=null;n=this.wt?.getUserId();for(let r=0;r<e.length;r++)if(n===e[r].userId||n==null&&e[r].userId==null){let n=e[r].card,i=null;for(let e=0;e<this.cards.length;e++)if(n.id===this.cards[e].id){i=this.cards[e];break}if(i==null){let e=(0,le.xA)(n);e!=null&&t.push(e)}else if(!i.Ct(n)){for(let e=0;e<t.length;e++)if(n.id===t[e].id){t.splice(e,1);break}}}this.cards=this.Cs(this.bs(t,!1)),this.Rs(),this.Jt.Dt(this.Us(!0))}bs(e,t){let n={},r={},i={};this.u&&(n=this.u.j(K.I.C.v)||{},r=this.u.j(K.I.C.H)||{},i=this.u.j(K.I.C.A)||{});let a={},o={},s={};for(let t=0;t<e.length;t++){let c=e[t].id;c&&(n[c]&&(e[t].clicked=!0,a[c]=!0),r[c]&&(e[t].viewed=!0,o[c]=!0),i[c]&&(e[t].dismissed=!0,s[c]=!0))}return t&&this.u&&(this.u.k(K.I.C.v,a),this.u.k(K.I.C.H,o),this.u.k(K.I.C.A,s)),e}Cs(e){let t=[],n=new Date,r={};this.u&&(r=this.u.j(K.I.C.A)||{});let i=!1;for(let a=0;a<e.length;a++){let o=e[a].url;if(!this.Ft&&o&&(0,k.o)(o)){_.Z.error(`Card with url ${o} will not be displayed because Javascript URLs are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable this card.`);continue}let s=e[a].expiresAt,c=!0;if(s!=null&&(c=s>=n),c&&=!e[a].dismissed,c)t.push(e[a]);else{let t=e[a].id;t&&(r[t]=!0),i=!0}}return i&&this.u&&this.u.k(K.I.C.A,r),t}Rs(){var e;let t=[];for(let e=0;e<this.cards.length;e++)t.push(this.cards[e].Y());(e=this.u)==null||e.k(K.I.C.ws,t)}zs(){this.ns&&=(clearTimeout(this.ns),null)}Es(){this.os!=null&&(clearTimeout(this.os),this.os=null)}Ls(e=1e3*this.us,t,n){this.Es(),this.os=window.setTimeout((()=>{this.xs(t,n,!0)}),e),this.ls=e}xs(t,n,r=!1,i=!0){var a;let o=this.qt,s=this.u;if(!o||!s)return void(typeof n==`function`&&n());if(!r&&(this.zs(),this.ks(0)),!this.Ts())return void((a=this.yt)==null||a.Is((()=>{this.xs(t,n)})));i&&this.Es();let c=o.Js({},!0);s.j(K.I.C.Ss)!==e.ZP.Ds()&&this.Ms(),c.last_full_sync_at=this.Bt,c.last_card_updated_at=this.Ht;let l=o.$s(c,fe.Z.Ps.Bs,r),u=!1;o.Xs(c,((e=-1)=>{if(this.u){let e=new Date().valueOf();fe.Z._s(this.u,fe.Z.Ps.Bs,e)}e!==-1&&l.push([`X-Braze-Req-Tokens-Remaining`,e.toString()]),re.Z.Gs({url:`${o.Hs()}/content_cards/sync`,data:c,headers:l,L:(e,r)=>{if(!o.Ks(c,e,l))return u=!0,void(typeof n==`function`&&n());o.Os(),this.Fs(r,t,n),this.Ns(e),u=!1,fe.Z.Qs(this.u,fe.Z.Ps.Bs,1),typeof t==`function`&&t()},error:e=>{o.Vs(e,`retrieving content cards`),u=!0,typeof n==`function`&&n()},Ws:()=>{if(u&&i&&!this.os&&this.cs+1<g.Tt){fe.Z.Ys(this.u,fe.Z.Ps.Bs);let e=this.ls;(e==null||e<1e3*this.us)&&(e=1e3*this.us),this.Ls(Math.min(3e5,(0,pe.R)(1e3*this.us,3*e)),t,n),this.cs+=1}}})}),fe.Z.Ps.Bs,n)}Us(e){e||this.Kt();let t=this.Cs(this.cards);t.sort(((e,t)=>e.pinned&&!t.pinned?-1:t.pinned&&!e.pinned?1:e.updated&&t.updated&&e.updated>t.updated?-1:e.updated&&t.updated&&t.updated>e.updated?1:0));let n=Math.max(this.Ht||0,this.Bt||0);return n===0&&(n=void 0),this.u&&this.u.j(K.I.C.ys)===this.Ht&&n===void 0&&(n=this.Ht),new G(t,(0,ce.X2)(n))}Zs(e){return this.Jt.It(e)}Ms(){this.Bt=0,this.Ht=0,this.u&&(this.u.ti(K.I.C.gs),this.u.ti(K.I.C.ys))}changeUser(e){e||(this.cards=[],this.Jt.Dt(new G(this.cards.slice(),null)),this.u&&(this.u.ti(K.I.C.ws),this.u.ti(K.I.C.v),this.u.ti(K.I.C.H),this.u.ti(K.I.C.A))),this.Ms()}clearData(e){this.Bt=0,this.Ht=0,this.cards=[],this.Jt.Dt(new G(this.cards.slice(),null)),e&&this.u&&(this.u.ti(K.I.C.ws),this.u.ti(K.I.C.v),this.u.ti(K.I.C.H),this.u.ti(K.I.C.A),this.u.ti(K.I.C.gs),this.u.ti(K.I.C.ys))}Ts(){return!(!this.yt||!this.yt.si()&&(this.yt.ii()!==0&&this.ei(),1))}ei(){this.Jt.Dt(new G([],new Date)),this.u&&this.u.ti(K.I.C.ws)}}let he={t:!1,provider:null,rr:()=>(he.o(),he.provider||(he.provider=new me(e.ZP.er(),e.ZP.l(),e.ZP.ir(),e.ZP.tr(),e.ZP.nr()),e.ZP.ar(he.provider)),he.provider),o:()=>{he.t||=(e.ZP.g(he),!0)},destroy:()=>{he.provider=null,he.t=!1}},q=he;function ge(t){if(!e.ZP.X())return;let n=q.rr(),r=n.Zs(t);if(!n.ps()){let t=e.ZP.cr();if(t){let e=t.mr((()=>{n.xs()}));e&&n.vs(e)}}return r}var _e=i(1311),ve=i(5608),ye=i(6959);function be(t,n){if(!e.ZP.X())return;(0,ye.B)();let r=!1;t??(t=document.body,r=!0);let i=e.ZP.nn(e.JY.tn)||e.ZP.nn(e.JY.en)||!1,a=q.rr().Us(!1);typeof n==`function`&&(0,_e.Of)(a,n(a.cards.slice()),a.lastUpdated,null,i);let o=(0,_e.Yz)(a,i,r),s=q.rr(),c=s.fs();(a.lastUpdated==null||new Date().valueOf()-a.lastUpdated.valueOf()>G.ur)&&(c==null||new Date().valueOf()-c>G.ur)&&(_.Z.info(`Cached content cards were older than max TTL of ${G.ur} ms, requesting an update from the server.`),(0,_e.cV)(a,o),s.ds(new Date().valueOf()));let l=new Date().valueOf(),u=ge((function(e){let t=o.querySelectorAll(`.ab-refresh-button`)[0];if(t!=null){let e=500,n=e-=new Date().valueOf()-l,r=o.getAttribute(_e.cP);r&&(n=parseInt(r),isNaN(n)||(e-=new Date().valueOf()-n)),setTimeout((function(){t.className=t.className.replace(/fa-spin/g,``)}),Math.max(e,0))}let r=e.cards;typeof n==`function`&&(r=n(r.slice())),(0,_e.Of)(a,r,e.lastUpdated,o,i)}));(0,_e.GB)(u,o);let d=function(e){let t=e.querySelectorAll(`.ab-feed`),n=null;for(let r=0;r<t.length;r++)t[r].parentNode===e&&(n=t[r]);n==null?e.appendChild(o):((0,_e.tQ)(n),n.parentNode!=null&&n.parentNode.replaceChild(o,n)),setTimeout((function(){o.className=o.className.replace(`ab-hide`,`ab-show`)}),0),r&&o.focus(),(0,_e.cz)(a,o),(0,ve.CG)(a.cards,e)};var f;t==null?window.onload=(f=window.onload,function(){typeof f==`function`&&f(new Event(`oldLoad`)),d(document.body)}):d(t)}var xe=i(2080);function Se(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ce={get screenWidth(){return window.screen.width},get screenHeight(){return window.screen.height},get queryString(){return window.location.search},get queryParams(){var e,t=Ce.queryString,n=new URLSearchParams(t),r={},i=function(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return Se(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Se(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
27
27
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}(n.keys());try{for(i.s();!(e=i.n()).done;){var a=e.value;if(!(a in r)){var o=n.getAll(a);o.length>1?r[a]=o:r[a]=o[0]}}}catch(e){i.e(e)}finally{i.f()}return r&&Object.keys(r).length?JSON.stringify(r):t},get referrer(){return window.document.referrer},get title(){return window.document.title},get pathname(){return window.location.pathname},get hostname(){return window.location.hostname},get requestUrl(){return Ce.hostname+Ce.pathname},decodeURIComponent:function(e){return window.decodeURIComponent(e)}},we=Ce,Te={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i},Ee=`Unknown`;function J(e,t,n){if(!t)return{name:e,version:Ee};var r=t.exec(n);return{name:e,version:r&&r.length?r[0].trim():Ee}}var De=function(){var e=window.navigator.userAgent;return Te.mobileDevice.test(e)?Te.iphone.test(e)?`iPhone`:Te.ipad.test(e)?`iPad`:Te.android.test(e)?`Android`:Te.blackberry.test(e)?`Blackberry`:Te.windowsPhone.test(e)?`Windows Phone`:Ee:`Desktop`},Oe={getEventDataPayload:function(e,t){var n={product:this.getProductData(t),client:this.getClientData(),request:this.getRequestData()};e.data&&Object.keys(e.data).length&&(n.data=e.data),e.actionType&&(n.action_type=e.actionType);var r=we.requestUrl;return r&&(n.request_url=r),n},getProductData:function(e){var t={name:e.name,version:e.version};return e.locale&&(t.locale=e.locale),t},getClientData:function(){return{os:(e=window.navigator.userAgent,Te.android.test(e)?J(`Android`,Te.androidVersion,e):Te.iphone.test(e)||Te.ipad.test(e)?J(`iOS`,Te.iosVersion,e):Te.linux.test(e)?J(`Linux`,null,e):Te.unix.test(e)?J(`Unix`,null,e):Te.mac.test(e)?J(`Macintosh`,Te.osxVersion,e):Te.windows.test(e)?function(e,t){var n={name:`Windows`,version:null};return Te.win2000.test(t)&&(n.version=`2000`),Te.winXP.test(t)&&(n.version=`XP`),Te.winVista.test(t)&&(n.version=`Vista`),Te.win7.test(t)&&(n.version=`7`),Te.win8.test(t)&&(n.version=`8`),Te.win81.test(t)&&(n.version=`8.1`),Te.win10.test(t)&&(n.version=`10`),n.version||=Ee,n}(0,e):Te.blackberry.test(e)?J(`BlackBerry`,Te.blackberryVersion,e):Te.windowsPhone.test(e)?J(`Windows Phone`,Te.windowsPhoneVersion,e):{name:Ee,version:Ee}),device:{type:De(),resolution:`${we.screenWidth}x${we.screenHeight}`}};var e},getRequestData:function(){var e=we.queryParams,t=we.referrer,n=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:`&`,t=we.queryString;if(t.length){var n=we.decodeURIComponent(t.substring(1)),r=RegExp(`((utm_[^=]+)=([^\\`+e+`]+))`,`gi`),i=n.match(r);if(i&&i.length){var a=i.reduce((function(e,t){var n=t.split(`=`);return e[n[0].split(`_`)[1]]=n[1],e}),{});if(Object.keys(a).length)return a}}}(),r={page_name:we.title,host_name:we.hostname,path_name:we.pathname};return e.length&&(r.query_params=e),t.length&&(r.referrer=t),n&&(r.utms=n),r}},Y=function(e){throw Error(e)},ke=function(e){var t=[...arguments].slice(1);console.error(e,t)};function Ae(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function je(e){return je=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},je(e)}var Me=RegExp(`[A-Za-z0-9 _.,!"'/$]*`),Ne=RegExp(`^[a-z]+(?:_[a-z]+)*$`),Pe=[`productName`,`productVersion`,`apiKey`,`baseUrl`],Fe={clientUserAttributeValue:function(e){return typeof e==`boolean`?!0:!(!e||typeof e==`string`&&(!e.length||!(e.length<=255)||e[0]===`$`||!Me.test(e)))},isSnakeCase:function(e){return Ne.test(e)},additionalData:function(e){if(je(e)!==`object`||e===null)return!0;if(Array.isArray(e)){var t,n=function(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return Ae(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
28
28
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(!Fe.additionalData(r))return!1}}catch(e){n.e(e)}finally{n.f()}}else for(var i in e){if(!Fe.isSnakeCase(i))return ke(`'${i}' in additional data provided does not follow 'snake_case' naming convention.`),!1;var a=e[i];if(je(a)===`object`&&a!==null&&!Fe.additionalData(a))return!1}return!0},accountAddress:function(e){if(!e||je(e)!==`object`)return!1;var t=Object.keys(e);return!(t.length===0||t.length>2||t.length===1&&!t.includes(`country_code`)||t.length===2&&!t.includes(`country_code`)&&!t.includes(`province`)||typeof e.country_code!=`string`||t.includes(`province`)&&typeof e.province!=`string`)},brazeClientOptions:function(e){e||Y(`No Client options provided.`),Pe.forEach((function(t){e.hasOwnProperty(t)||Y(`Cannot find the required "${t}" attribute in client options.`)}))}};function Ie(e){return Ie=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ie(e)}function Le(){Le=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a=typeof Symbol==`function`?Symbol:{},o=a.iterator||`@@iterator`,s=a.asyncIterator||`@@asyncIterator`,c=a.toStringTag||`@@toStringTag`;function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},``)}catch{l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof g?t:g,o=Object.create(a.prototype);return i(o,`_invoke`,{value:T(e,n,new k(r||[]))}),o}function d(e,t,n){try{return{type:`normal`,arg:e.call(t,n)}}catch(e){return{type:`throw`,arg:e}}}t.wrap=u;var f=`suspendedStart`,p=`executing`,m=`completed`,h={};function g(){}function _(){}function v(){}var y={};l(y,o,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(A([])));x&&x!==n&&r.call(x,o)&&(y=x);var S=v.prototype=g.prototype=Object.create(y);function C(e){[`next`,`throw`,`return`].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(i,a,o,s){var c=d(e[i],e,a);if(c.type!==`throw`){var l=c.arg,u=l.value;return u&&Ie(u)==`object`&&r.call(u,`__await`)?t.resolve(u.__await).then((function(e){n(`next`,e,o,s)}),(function(e){n(`throw`,e,o,s)})):t.resolve(u).then((function(e){l.value=e,o(l)}),(function(e){return n(`throw`,e,o,s)}))}s(c.arg)}var a;i(this,`_invoke`,{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function T(t,n,r){var i=f;return function(a,o){if(i===p)throw Error(`Generator is already running`);if(i===m){if(a===`throw`)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===h)continue;return c}}if(r.method===`next`)r.sent=r._sent=r.arg;else if(r.method===`throw`){if(i===f)throw i=m,r.arg;r.dispatchException(r.arg)}else r.method===`return`&&r.abrupt(`return`,r.arg);i=p;var l=d(t,n,r);if(l.type===`normal`){if(i=r.done?m:`suspendedYield`,l.arg===h)continue;return{value:l.arg,done:r.done}}l.type===`throw`&&(i=m,r.method=`throw`,r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,r===`throw`&&t.iterator.return&&(n.method=`return`,n.arg=e,E(t,n),n.method===`throw`)||r!==`return`&&(n.method=`throw`,n.arg=TypeError(`The iterator does not provide a '`+r+`' method`)),h;var a=d(i,t.iterator,n.arg);if(a.type===`throw`)return n.method=`throw`,n.arg=a.arg,n.delegate=null,h;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,n.method!==`return`&&(n.method=`next`,n.arg=e),n.delegate=null,h):o:(n.method=`throw`,n.arg=TypeError(`iterator result is not an object`),n.delegate=null,h)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type=`normal`,delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:`root`}],e.forEach(D,this),this.reset(!0)}function A(t){if(t||t===``){var n=t[o];if(n)return n.call(t);if(typeof t.next==`function`)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw TypeError(Ie(t)+` is not iterable`)}return _.prototype=v,i(S,`constructor`,{value:v,configurable:!0}),i(v,`constructor`,{value:_,configurable:!0}),_.displayName=l(v,c,`GeneratorFunction`),t.isGeneratorFunction=function(e){var t=typeof e==`function`&&e.constructor;return!!t&&(t===_||(t.displayName||t.name)===`GeneratorFunction`)},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,c,`GeneratorFunction`)),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(w.prototype),l(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,a){a===void 0&&(a=Promise);var o=new w(u(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(S),l(S,c,`Generator`),l(S,o,(function(){return this})),l(S,`toString`,(function(){return`[object Generator]`})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method=`next`,this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)n.charAt(0)===`t`&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type===`throw`)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type=`throw`,s.arg=t,n.next=r,i&&(n.method=`next`,n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if(o.tryLoc===`root`)return i(`end`);if(o.tryLoc<=this.prev){var c=r.call(o,`catchLoc`),l=r.call(o,`finallyLoc`);if(c&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw Error(`try statement without catch or finally`);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,`finallyLoc`)&&this.prev<i.finallyLoc){var a=i;break}}a&&(e===`break`||e===`continue`)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method=`next`,this.next=a.finallyLoc,h):this.complete(o)},complete:function(e,t){if(e.type===`throw`)throw e.arg;return e.type===`break`||e.type===`continue`?this.next=e.arg:e.type===`return`?(this.rval=this.arg=e.arg,this.method=`return`,this.next=`end`):e.type===`normal`&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if(r.type===`throw`){var i=r.arg;O(n)}return i}}throw Error(`illegal catch attempt`)},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},this.method===`next`&&(this.arg=e),h}},t}function Re(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,ze(r.key),r)}}function ze(e){var t=function(e,t){if(Ie(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(Ie(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return Ie(t)==`symbol`?t:t+``}var Be=function(){function n(e){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n),Fe.brazeClientOptions(e),this.options=e,this.initialize()}var r,i,a;return r=n,i=[{key:`initialize`,value:function(){var n=this.options.apiKey,r={baseUrl:this.options.baseUrl,enableLogging:this.options.enableLogging,allowUserSuppliedJavascript:this.options.allowUserSuppliedJavascript,minimumIntervalBetweenTriggerActionsInSeconds:this.options.minimumIntervalBetweenTriggerActionsInSeconds,doNotLoadFontAwesome:!0};e.ZP.initialize(n,r)||Y(`Cannot initialize client. Please make sure your "apiKey" and "baseUrl" is valid.`),this.options.automaticallyShowInAppMessages&&function(){if(!e.ZP.X())return;o();let n=t.Z.m();if(n.Pi()==null){let e=B((e=>z(e)));n.$i(e)}n.Pi()}()}},{key:`openSession`,value:function(){(function(){if(!e.ZP.X())return;let t=e.ZP.cr();if(!t)return;t.openSession();let n=V.Z.Yt.Qt,r=new V.Z(n,_.Z);r.jr(n.ss.hr,((e,i)=>{let a=i.lastClick,o=i.trackingString;_.Z.info(`Firing push click trigger from ${o} push click at ${a}`);let s=t.kr(a,o),c=function(){x.n.rr().fe(b.Z.vr,[o],s)};t.$r(c,c),r.re(n.ss.hr,e)})),r.Zt(n.ss.wr,(function(e){t.yr(e)}))})()}},{key:`logEvent`,value:function(e){var t=Oe.getEventDataPayload(e,{name:this.options.productName,version:this.options.productVersion,locale:this.options?.locale});return H.logCustomEvent(e.type,t)}},{key:`getUserId`,value:function(){return this.getBrazeUser().getUserId()}},{key:`setCustomUserAttribute`,value:function(e,t){var n=this.getBrazeUser();return Fe.clientUserAttributeValue(t)||Y(`Invalid custom user attribute value: '${t}' for key: '${e}'`),n.setCustomUserAttribute(e,t)}},{key:`bulkSetCustomUserAttributes`,value:function(e){var t=this;Object.keys(e).length||Y(`Cannot bulk set emptry object for custom user attributes`),Object.keys(e).forEach((function(n){var r=e[n];t.setCustomUserAttribute(n,r)}))}},{key:`requestPushPermission`,value:function(e,t){ee.requestPushPermission(e,t)}},{key:`unregisterPush`,value:function(e,t){U.unregisterPush(e,t)}},{key:`setAlias`,value:function(e,t){this.getBrazeUser().addAlias(t,e)}},{key:`setUser`,value:function(e){te.changeUser(e)}},{key:`setUserFirstName`,value:function(e){this.getBrazeUser().setFirstName(e)}},{key:`setUserLastName`,value:function(e){this.getBrazeUser().setLastName(e)}},{key:`setUserEmail`,value:function(e){this.getBrazeUser().setEmail(e)}},{key:`setUserCountry`,value:function(e){this.getBrazeUser().setCountry(e)}},{key:`setUserPhone`,value:function(e){this.getBrazeUser().setPhoneNumber(e)}},{key:`setUserGender`,value:function(e){this.getBrazeUser().setGender(e)}},{key:`setUserEmailNotificationSubscriptionType`,value:function(e){return this.getBrazeUser().setEmailNotificationSubscriptionType(e)}},{key:`sendData`,value:function(e){e&&typeof e==`function`?ne.requestImmediateDataFlush(e):ne.requestImmediateDataFlush()}},{key:`hasUser`,value:function(){try{if(this.getBrazeUser())return!0}catch{return!1}finally{return!1}}},{key:`getBrazeUser`,value:function(){var e=E.P();return e||Y(`No valid user found!`),e}},{key:`getContentCardsV2`,value:function(){return function(){if(e.ZP.X())return q.rr().Us(!1)}()}},{key:`showContentCards`,value:function(e,t){return be(e,t)}},{key:`getContentCards`,value:function(){return e=this,t=void 0,n=void 0,r=Le().mark((function e(){return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(`return`,new Promise((function(e,t){be(null,(function(n){return n?e(n):t(Error(`No content cards found.`)),n}))})));case 1:case`end`:return e.stop()}}),e)})),new(n||=Promise)((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}));var e,t,n,r}},{key:`hideCards`,value:function(t){(function(t){if(!e.ZP.X())return;let n=document.querySelectorAll(`.ab-feed`);for(let e=0;e<n.length;e++)(t==null||t!=null&&n[e].parentNode===t)&&(0,_e.tQ)(n[e])})(t)}},{key:`logContentCardDismissal`,value:function(e){e||Y(`No "card" provided in "logContentCardDismissal"`),xe.K(e)}},{key:`logContentCardClick`,value:function(e){e||Y(`No "card" provided in "logContentCardClick"`),W.d(e,!0)}},{key:`logContentCardImpressions`,value:function(e){var t;e&&e.length||Y(`No "cards" provided in "logContentCardImpressions"`),t=e,(0,oe.p)(t,!0)}},{key:`requestContentCardRefresh`,value:function(e,t){return se(e,t)}},{key:`subscribeToContentCardUpdate`,value:function(e){return e||Y(`No "subscriber" provided in "subscribeToContentCardUpdate"`),ge(e)}},{key:`subscribeToInAppMessage`,value:function(e){return e||Y(`No "callback" provided in "subscribeToInAppMessage".`),B(e)}},{key:`showInAppMessage`,value:function(e,t,n){return e||Y(`Invalid "inAppMessage" provided in "showInAppMessage".`),z(e,t,n)}},{key:`logInAppMessageClick`,value:function(e){return e||Y(`Invalid "inAppMessage" provided in "logInAppMessageClick".`),S(e)}},{key:`logInAppMessageButtonClick`,value:function(e,t){return e&&t||Y(`Invalid params supplied in "logInAppMessageButtonClick".`),N(e,t)}},{key:`logInAppMessageHtmlClick`,value:function(e,t,n){return e||Y(`Invalid "inAppMessage" provided in "logInAppMessageHtmlClick".`),T(e,t,n)}},{key:`logInAppMessageImpression`,value:function(e){return e||Y(`Invalid "inAppMessage" provided in "logInAppMessageImpression".`),y(e)}}],a=[{key:`getInstance`,value:function(e){return this._instance||=new this(e)}}],i&&Re(r.prototype,i),a&&Re(r,a),Object.defineProperty(r,`prototype`,{writable:!1}),n}();function Ve(e){return Ve=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ve(e)}function He(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,Ue(r.key),r)}}function Ue(e){var t=function(e,t){if(Ve(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(Ve(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return Ve(t)==`symbol`?t:t+``}var We=function(){function e(t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.options=t,this.apiClient=t.apiClient}var t,n;return t=e,(n=[{key:`safelyExecute`,value:function(e){try{return e()}catch(e){e instanceof Error&&ke(e.message),typeof e==`string`&&ke(e)}}}])&&He(t.prototype,n),Object.defineProperty(t,`prototype`,{writable:!1}),e}();function Ge(e){return Ge=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ge(e)}function Ke(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,qe(r.key),r)}}function qe(e){var t=function(e,t){if(Ge(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(Ge(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return Ge(t)==`symbol`?t:t+``}function Je(e,t){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Je(e,t)}function Ye(e){var t=Ze();return function(){var n,r=Qe(e);if(t){var i=Qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xe(this,n)}}function Xe(e,t){if(t&&(Ge(t)==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}function Ze(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ze=function(){return!!e})()}function Qe(e){return Qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qe(e)}var $e=function(e){(function(e,t){if(typeof t!=`function`&&t!==null)throw 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&&Je(e,t)})(i,e);var t,n,r=Ye(i);function i(e){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),r.call(this,e)}return t=i,(n=[{key:`getAll`,value:function(){return this.apiClient.getContentCardsV2()}},{key:`getContentCards`,value:function(){return this.apiClient.getContentCards()}},{key:`show`,value:function(e,t){return this.apiClient.showContentCards(e,t)}},{key:`hide`,value:function(e){return this.apiClient.hideCards(e)}},{key:`logDismissal`,value:function(e){return this.apiClient.logContentCardDismissal(e)}},{key:`logClick`,value:function(e){return this.apiClient.logContentCardClick(e)}},{key:`logImpressions`,value:function(e){return this.apiClient.logContentCardImpressions(e)}},{key:`requestRefresh`,value:function(e,t){return this.apiClient.requestContentCardRefresh(e,t)}},{key:`subscribe`,value:function(e){return this.apiClient.subscribeToContentCardUpdate(e)}}])&&Ke(t.prototype,n),Object.defineProperty(t,`prototype`,{writable:!1}),i}(We);function et(e){return et=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},et(e)}function tt(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,nt(r.key),r)}}function nt(e){var t=function(e,t){if(et(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(et(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return et(t)==`symbol`?t:t+``}function rt(e,t){return rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rt(e,t)}function it(e){var t=ot();return function(){var n,r=st(e);if(t){var i=st(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return at(this,n)}}function at(e,t){if(t&&(et(t)==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}function ot(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ot=function(){return!!e})()}function st(e){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},st(e)}var ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St=function(e){(function(e,t){if(typeof t!=`function`&&t!==null)throw 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&&rt(e,t)})(i,e);var t,n,r=it(i);function i(e){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),r.call(this,e)}return t=i,(n=[{key:`show`,value:function(e,t,n){return this.apiClient.showInAppMessage(e,t,n)}},{key:`logMessageClick`,value:function(e){return this.apiClient.logInAppMessageClick(e)}},{key:`logButtonClick`,value:function(e,t){return this.apiClient.logInAppMessageButtonClick(e,t)}},{key:`logHtmlMessageClick`,value:function(e,t,n){return this.apiClient.logInAppMessageHtmlClick(e,t,n)}},{key:`logImpression`,value:function(e){return this.apiClient.logInAppMessageImpression(e)}},{key:`subscribe`,value:function(e){return this.apiClient.subscribeToInAppMessage(e)}}])&&tt(t.prototype,n),Object.defineProperty(t,`prototype`,{writable:!1}),i}(We),Ct={all:[`streamable`,`clickview`],cv:[`clickview`],sl:[`streamable`],none:[]};(function(e){e.AU=`au`,e.NZ=`nz`,e.UK=`uk`,e.US=`us`})(ct||={}),function(e){e.PageView=`page_view`}(lt||={}),function(e){e.ButtonClick=`marketing_button_click`,e.LinkClick=`marketing_link_click`}(ut||={}),function(e){e.FreeTrialSignup=`marketing_free_trial_signup`,e.DemoSignup=`marketing_demo_signup`,e.PostFreeTrialSubmission=`marketing_post_free_trial_submission`,e.FormSubmission=`marketing_form_submission`,e.ContactFormSubmission=`marketing_contact_us_submission`,e.CallBooked=`marketing_call_booked`,e.NewsletterSignup=`cv_marketing_newsletter_sign_up`,e.MarketingTradeshowSubmission=`marketing_tradeshow_submission`,e.LandingPageFormSubmission=`cv_marketing_lp_form_submission`,e.MarketingReferralFormSubmission=`cv_marketing_mdc_referral`}(dt||={}),function(e){e.ProductTrailRequested=`product_trial_requested`,e.FormSubmission=`product_form_submission`,e.TrialUpgradeRequested=`product_trial_upgrade_requested`,e.OlympicsOfferSubmission=`product_olympics_offer_submission`,e.BdmTrialRequested=`cv_product_bdm_trial_requested`,e.ClickViewPilotRequested=`cv_product_pilot_requested`,e.ClickViewLivePilotRequested=`cl_product_pilot_requested`}(ft||={}),function(e){e.ContactUsFormSubmit=`streamable_contact_us_submission`,e.LivestreamBookingFormSubmit=`streamable_livestream_booking_submission`}(pt||={}),function(e){e.TrialRequested=`sl_marketing_trial_requested`,e.HalloweenFormSubmission=`sl_marketing_halloween_submission`,e.NewsletterSignup=`sl_marketing_newsletter_sign_up`,e.RequestPricing=`sl_marketing_pricing_requested`,e.LandingPageFormSubmission=`sl_marketing_lp_form_submission`,e.ContactUsFormSubmit=`sl_marketing_contact_us_submission`}(mt||={}),function(e){e.ContactUsFormSubmit=`ch_marketing_contact_us_submission`}(ht||={}),function(e){e.ExploreTopics=`product_explore_topics`,e.Stream=`product_stream`,e.Search=`product_search`,e.SearchClickthrough=`product_search_clickthrough`,e.ClickBookACall=`product_book_a_call_clicked`,e.Share=`product_share`,e.DownloadResource=`product_download_resource`,e.Invite=`product_invite_send`,e.PlayerDeviceCta=`product_player_devices_cta`,e.SettingsIntegrations=`product_settings_integrations`}(gt||={}),function(e){e.AddToSubscriptionGroups=`add_to_subscription_groups`}(_t||={}),function(e){e.FirstName=`first_name`,e.LastName=`last_name`,e.Email=`email`,e.Phone=`phone_number`}(vt||={}),function(e){e.CrmId=`cvc_id`,e.JobTitle=`job_title`,e.AccountOwner=`account_owner`,e.Department=`department`,e.AccountName=`account_name`,e.AccountType=`account_type`,e.OrgType=`organisation_type`,e.OrgSubType=`organisation_sub_type`,e.SyncToCrm=`sync_to_crm`,e.MasterId=`master_id`,e.AccountAddress=`account_address`,e.Source=`source`}(yt||={}),function(e){e.AccountCity=`account_city`,e.AccountState=`account_state`,e.AccountPostCode=`account_post_code`,e.AccountCountry=`account_country`,e.HowCanWeHelp=`how_can_we_help`,e.ReasonForInterest=`reason_for_interest`,e.Conversion=`conversion`,e.ContactUsComment=`contact_us_comment`,e.ReferredBy=`referred_by`,e.ReferredBySchool=`referred_by_school`,e.ReferralSubmittedBy=`referral_submitted_by`,e.ReferralType=`referral_type`,e.Variant=`variant`}(bt||={}),function(e){e.Marketing=`marketing_id`,e.Product=`master_id`,e.Email=`email`}(xt||={});function wt(e){return wt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},wt(e)}function Tt(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,Et(r.key),r)}}function Et(e){var t=function(e,t){if(wt(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(wt(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return wt(t)==`symbol`?t:t+``}function Dt(e,t){return Dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dt(e,t)}function Ot(e){var t=At();return function(){var n,r=jt(e);if(t){var i=jt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return kt(this,n)}}function kt(e,t){if(t&&(wt(t)==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}function At(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(At=function(){return!!e})()}function jt(e){return jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jt(e)}var Mt=function(e){(function(e,t){if(typeof t!=`function`&&t!==null)throw 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&&Dt(e,t)})(i,e);var t,n,r=Ot(i);function i(e){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),r.call(this,e)}return t=i,n=[{key:`logForm`,value:function(e){this.log(e),function(e){switch(e?.internalOptions?.subscriptionGroups){case`all`:case`cv`:case`sl`:return!0;default:return!1}}(e)&&this.logInternal({eventType:_t.AddToSubscriptionGroups,additionalData:{products:Ct[e.internalOptions?.subscriptionGroups]}})}},{key:`logAnalytics`,value:function(e){this.log(e,!1)}},{key:`logInternal`,value:function(e){var t=e.eventType,n=e.additionalData,r={type:t,data:{}};Fe.additionalData(n)&&(r.data=Object.assign({},n)),this.apiClient.logEvent(r),this.apiClient.sendData()}},{key:`log`,value:function(e){var t=e.eventType,n=e.actionType,r=e.additionalData,i=e.callback,a=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],o=this.options.getPayload();Fe.additionalData(r)&&(o=Object.assign(Object.assign({},o),r));var s={type:t,data:o};n&&(s.actionType=n);var c=this.apiClient.logEvent(s);a?this.apiClient.sendData(i):typeof i!=`function`||i(c)}}],n&&Tt(t.prototype,n),Object.defineProperty(t,`prototype`,{writable:!1}),i}(We),Nt=i(8322),Pt=i.n(Nt);function Ft(e){return Ft=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ft(e)}function It(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if(typeof e==`string`)return Lt(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lt(e,t):void 0}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
29
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Lt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Rt={removeEmptyKeys:function(e){var t=this;if(Array.isArray(e))return e;var n=Object.assign({},e);return Object.entries(n).filter((function(e){var t=It(e,2)[1];return!(t==null||typeof t==`string`&&!t.length||Ft(t)===`object`&&Object.keys(t).length===0)})).reduce((function(e,n){var r,i,a,o=It(n,2),s=o[0],c=o[1];return Object.assign(Object.assign({},e),(r={},i=s,a=c===Object(c)?t.removeEmptyKeys(c):c,(i=function(e){var t=function(e,t){if(Ft(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(Ft(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return Ft(t)==`symbol`?t:t+``}(i))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r))}),{})}};function zt(e){return zt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},zt(e)}function Bt(e,t,n){return(t=function(e){var t=function(e,t){if(zt(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(zt(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return zt(t)==`symbol`?t:t+``}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vt={getDefaultUserAttributes:function(e){var t;return Rt.removeEmptyKeys((Bt(t={},vt.Email,e.email),Bt(t,vt.FirstName,e?.firstName),Bt(t,vt.LastName,e?.lastName),Bt(t,vt.Phone,e?.phone),t))},getCustomUserAttributesWithoutSource:function(e){var t,n=Rt.removeEmptyKeys({province:e?.custom?.accountAddress?.province,country_code:e?.custom?.accountAddress?.countryCode}),r=(Bt(t={},yt.AccountName,e?.custom?.accountName),Bt(t,yt.AccountType,e?.custom?.accountType),Bt(t,yt.CrmId,e?.custom?.crmId),Bt(t,yt.Department,e?.custom?.department),Bt(t,yt.JobTitle,e?.custom?.jobTitle),Bt(t,yt.MasterId,e?.custom?.masterId),Bt(t,yt.OrgSubType,e?.custom?.orgSubType),Bt(t,yt.OrgType,e?.custom?.orgType),Bt(t,yt.SyncToCrm,e?.custom?.syncToCrm),t);return Fe.accountAddress(n)&&(r[yt.AccountAddress]=n),Rt.removeEmptyKeys(r)},getCustomUserAttributes:function(e){var t=Vt.getCustomUserAttributesWithoutSource(e);return Rt.removeEmptyKeys(Object.assign(Object.assign({},t),Bt({},yt.Source,function(e){if(e.custom?.source&&e.custom.source.length){var t=Object.keys(Vt.getDefaultUserAttributes(e)),n=Object.keys(Vt.getCustomUserAttributesWithoutSource(e));return{$add:[{name:e.custom.source,attributes:[].concat(t,n)}]}}Y(`No source provided for braze user.`)}(e))))},getEventUserAttributes:function(e){var t;return Rt.removeEmptyKeys((Bt(t={},bt.AccountCity,e?.event?.accountCity),Bt(t,bt.AccountCountry,e?.event?.accountCity),Bt(t,bt.AccountPostCode,e?.event?.accountPostCode),Bt(t,bt.AccountState,e?.event?.accountState),Bt(t,bt.ContactUsComment,e?.event?.contactUsComment),Bt(t,bt.Conversion,e?.event?.conversion),Bt(t,bt.HowCanWeHelp,e?.event?.howCanWeHelp),Bt(t,bt.ReasonForInterest,e?.event?.reasonForInterest),Bt(t,bt.ReferredBy,e?.event?.referredBy),Bt(t,bt.ReferredBySchool,e?.event?.referredBySchool),Bt(t,bt.ReferralSubmittedBy,e?.event?.referralSubmittedBy),Bt(t,bt.ReferralType,e?.event?.referralType),Bt(t,bt.Variant,e?.event?.variant),t))},getExtraUserAttributes:function(e){return zt(e.extra)===`object`?Rt.removeEmptyKeys(e.extra):{}},getPayload:function(e){if(!e)return{};var t=Vt.getDefaultUserAttributes(e),n=Vt.getCustomUserAttributes(e),r=Vt.getEventUserAttributes(e),i=Vt.getExtraUserAttributes(e),a=Fe.additionalData(i),o=Object.assign(Object.assign(Object.assign({},t),n),r);return a?Object.assign(Object.assign({},o),i):o},getEmailHash:function(e){var t=e.trim().toLowerCase();return Pt().hash(t)}};function Ht(e){return Ht=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ht(e)}function Ut(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,Wt(r.key),r)}}function Wt(e){var t=function(e,t){if(Ht(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(Ht(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return Ht(t)==`symbol`?t:t+``}var Gt=function(){function e(t){var n=t.apiOptions,r=t.shouldInitialize,i=r===void 0||r,a=t.allowAnonymous,o=a!==void 0&&a,s=t.subscriptions;(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.initialized=!1,this.apiOptions=n,this.subscriptions=s,this.allowAnonymous=o,i&&this.initialize()}var t,n;return t=e,(n=[{key:`initialize`,value:function(){var e=this;this.isInitialized()?function(e){var t=[...arguments].slice(1);console.warn(e,t)}(`BrazeClient has already been initialized!`):(this.apiClient=Be.getInstance(this.apiOptions),this.cardsModule=new $e({apiClient:this.apiClient}),this.bamModule=new St({apiClient:this.apiClient}),this.eventModule=new Mt({apiClient:this.apiClient,getPayload:function(){return Vt.getPayload(e.user)}}),this.initialized=!0)}},{key:`isInitialized`,value:function(){return this.initialized}},{key:`getUser`,value:function(){return this.isInitialized()?this.validateUser()?this.user:null:(ke(`BrazeClient has not been initialized.`),null)}},{key:`card`,get:function(){return this.isInitialized()?this.cardsModule:(ke(`BrazeClient has not been initialized.`),null)}},{key:`bam`,get:function(){return this.isInitialized()?this.bamModule:(ke(`BrazeClient has not been initialized.`),null)}},{key:`event`,get:function(){return this.isInitialized()?this.allowAnonymous||this.validateUser()?this.eventModule:(ke("Anon events are disabled! Please invoke `setUser` before logging events!"),null):(ke(`BrazeClient has not been initialized.`),null)}},{key:`setUser`,value:function(e){this.isInitialized()?(this.user=e,this.startSession(),this.logUserAttributes()):ke("Trying to `setUser` but the client has not been initialized")}},{key:`setUserInit`,value:function(e){this.isInitialized()||this.initialize(),this.setUser(e)}},{key:`allowAnonymousSessions`,value:function(){this.allowAnonymous=!0}},{key:`api`,value:function(){return this.isInitialized()?this.apiClient:null}},{key:`setEmailNotificationSubscriptionType`,value:function(e){return this.isInitialized()&&this.validateUser()?this.apiClient.setUserEmailNotificationSubscriptionType(e):null}},{key:`validateUser`,value:function(){return!!this.user||(ke(`No user has been set!`),!1)}},{key:`startSession`,value:function(){this.allowAnonymous||this.validateUser()?(this.enableSubscriptions(),this.user&&this.apiClient.setUser(Vt.getEmailHash(this.user.email)),this.apiClient.openSession()):ke(`No user provided and cannot start anonymous sessions!`)}},{key:`enableSubscriptions`,value:function(){var e,t;(e=this.subscriptions)!=null&&e.subscribeToInAppMessage&&typeof this.subscriptions.subscribeToInAppMessage==`function`&&this.apiClient.subscribeToInAppMessage(this.subscriptions.subscribeToInAppMessage),(t=this.subscriptions)!=null&&t.subscribeToContentCards&&typeof this.subscriptions.subscribeToContentCards==`function`&&this.apiClient.subscribeToContentCardUpdate(this.subscriptions.subscribeToContentCards)}},{key:`logUserAttributes`,value:function(){if(this.validateUser()){this.apiClient.setUserEmail(this.user.email),this.user.firstName&&this.apiClient.setUserFirstName(this.user.firstName),this.user.lastName&&this.apiClient.setUserLastName(this.user.lastName),this.user.phone&&this.apiClient.setUserPhone(this.user.phone),this.user.country&&this.apiClient.setUserCountry(this.user.country);var e=Vt.getCustomUserAttributes(this.user);this.apiClient.bulkSetCustomUserAttributes(e)}}}])&&Ut(t.prototype,n),Object.defineProperty(t,`prototype`,{writable:!1}),e}();function Kt(e){return Be.getInstance(e)}})(),a})()))}))();function ux(e){(0,Z.useEffect)(()=>{let t=dx(e?.additionalData);t?.attributionData&&nf.setAttributionData(t.attributionData),t?.utms&&hf.setUtmParameters(t.utms)},[])}function dx(e){if(!e?.attribution?.length)return null;try{let{r:t,utms:n}=JSON.parse(e.attribution);return{attributionData:nf.decodeRValue(t),utms:n}}catch(e){let t=e instanceof Error?e.message:e?.toString();console.error(t)}}var fx=function(e){return e.Lite=`lite`,e.Auth=`auth`,e}({});function px(e){return{productName:fx.Auth,prospectStatus:t=>`${e}/v1/prospects/${t}/trial-status`,createTrial:`/ajax/trials/new`,searchProspect:`${e}/v1/search/prospects`,createProspect:`/ajax/trials/prospects`,prospectLookups:t=>`${e}/v1/prospects/${t}/lookups`,joinRequest:`/ajax/trials/join-request`}}var mx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,hx=`UINT8ARRAY not supported by this environment`;function gx(e,t,n,r){let i,a,o,s=t||[0],c=(n||=0)>>>3,l=r===-1?3:0;for(i=0;i<e.length;i+=1)o=i+c,a=o>>>2,s.length<=a&&s.push(0),s[a]|=e[i]<<8*(l+o%4*r);return{value:s,binLen:8*e.length+n}}function _x(e,t,n){switch(t){case`UTF8`:case`UTF16BE`:case`UTF16LE`:break;default:throw Error(`encoding must be UTF8, UTF16BE, or UTF16LE`)}switch(e){case`HEX`:return function(e,t,r){return function(e,t,n,r){let i,a,o,s;if(e.length%2!=0)throw Error(`String of HEX type must be in byte increments`);let c=t||[0],l=(n||=0)>>>3,u=r===-1?3:0;for(i=0;i<e.length;i+=2){if(a=parseInt(e.substr(i,2),16),isNaN(a))throw Error(`String of HEX type contains invalid characters`);for(s=(i>>>1)+l,o=s>>>2;c.length<=o;)c.push(0);c[o]|=a<<8*(u+s%4*r)}return{value:c,binLen:4*e.length+n}}(e,t,r,n)};case`TEXT`:return function(e,r,i){return function(e,t,n,r,i){let a,o,s,c,l,u,d,f,p=0,m=n||[0],h=(r||=0)>>>3;if(t===`UTF8`)for(d=i===-1?3:0,s=0;s<e.length;s+=1)for(a=e.charCodeAt(s),o=[],128>a?o.push(a):2048>a?(o.push(192|a>>>6),o.push(128|63&a)):55296>a||57344<=a?o.push(224|a>>>12,128|a>>>6&63,128|63&a):(s+=1,a=65536+((1023&a)<<10|1023&e.charCodeAt(s)),o.push(240|a>>>18,128|a>>>12&63,128|a>>>6&63,128|63&a)),c=0;c<o.length;c+=1){for(u=p+h,l=u>>>2;m.length<=l;)m.push(0);m[l]|=o[c]<<8*(d+u%4*i),p+=1}else for(d=i===-1?2:0,f=t===`UTF16LE`&&i!==1||t!==`UTF16LE`&&i===1,s=0;s<e.length;s+=1){for(a=e.charCodeAt(s),!0===f&&(c=255&a,a=c<<8|a>>>8),u=p+h,l=u>>>2;m.length<=l;)m.push(0);m[l]|=a<<8*(d+u%4*i),p+=2}return{value:m,binLen:8*p+r}}(e,t,r,i,n)};case`B64`:return function(e,t,r){return function(e,t,n,r){let i,a,o,s,c,l,u,d=0,f=t||[0],p=(n||=0)>>>3,m=r===-1?3:0,h=e.indexOf(`=`);if(e.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw Error(`Invalid character in base-64 string`);if(e=e.replace(/=/g,``),h!==-1&&h<e.length)throw Error(`Invalid '=' found in base-64 string`);for(a=0;a<e.length;a+=4){for(c=e.substr(a,4),s=0,o=0;o<c.length;o+=1)i=mx.indexOf(c.charAt(o)),s|=i<<18-6*o;for(o=0;o<c.length-1;o+=1){for(u=d+p,l=u>>>2;f.length<=l;)f.push(0);f[l]|=(s>>>16-8*o&255)<<8*(m+u%4*r),d+=1}}return{value:f,binLen:8*d+n}}(e,t,r,n)};case`BYTES`:return function(e,t,r){return function(e,t,n,r){let i,a,o,s,c=t||[0],l=(n||=0)>>>3,u=r===-1?3:0;for(a=0;a<e.length;a+=1)i=e.charCodeAt(a),s=a+l,o=s>>>2,c.length<=o&&c.push(0),c[o]|=i<<8*(u+s%4*r);return{value:c,binLen:8*e.length+n}}(e,t,r,n)};case`ARRAYBUFFER`:return function(e,t,r){return function(e,t,n,r){return gx(new Uint8Array(e),t,n,r)}(e,t,r,n)};case`UINT8ARRAY`:try{new Uint8Array}catch{throw Error(hx)}return function(e,t,r){return gx(e,t,r,n)};default:throw Error(`format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY`)}}function vx(e,t,n,r){switch(e){case`HEX`:return function(e){return function(e,t,n,r){let i=`0123456789abcdef`,a,o,s=``,c=t/8,l=n===-1?3:0;for(a=0;a<c;a+=1)o=e[a>>>2]>>>8*(l+a%4*n),s+=i.charAt(o>>>4&15)+i.charAt(15&o);return r.outputUpper?s.toUpperCase():s}(e,t,n,r)};case`B64`:return function(e){return function(e,t,n,r){let i,a,o,s,c,l=``,u=t/8,d=n===-1?3:0;for(i=0;i<u;i+=3)for(s=i+1<u?e[i+1>>>2]:0,c=i+2<u?e[i+2>>>2]:0,o=(e[i>>>2]>>>8*(d+i%4*n)&255)<<16|(s>>>8*(d+n*((i+1)%4))&255)<<8|c>>>8*(d+n*((i+2)%4))&255,a=0;a<4;a+=1)l+=8*i+6*a<=t?mx.charAt(o>>>6*(3-a)&63):r.b64Pad;return l}(e,t,n,r)};case`BYTES`:return function(e){return function(e,t,n){let r,i,a=``,o=t/8,s=n===-1?3:0;for(r=0;r<o;r+=1)i=e[r>>>2]>>>8*(s+r%4*n)&255,a+=String.fromCharCode(i);return a}(e,t,n)};case`ARRAYBUFFER`:return function(e){return function(e,t,n){let r,i=t/8,a=new ArrayBuffer(i),o=new Uint8Array(a),s=n===-1?3:0;for(r=0;r<i;r+=1)o[r]=e[r>>>2]>>>8*(s+r%4*n)&255;return a}(e,t,n)};case`UINT8ARRAY`:try{new Uint8Array}catch{throw Error(hx)}return function(e){return function(e,t,n){let r,i=t/8,a=n===-1?3:0,o=new Uint8Array(i);for(r=0;r<i;r+=1)o[r]=e[r>>>2]>>>8*(a+r%4*n)&255;return o}(e,t,n)};default:throw Error(`format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY`)}}function yx(e){let t={outputUpper:!1,b64Pad:`=`,outputLen:-1},n=e||{},r=`Output length must be a multiple of 8`;if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw Error(r);t.outputLen=n.shakeLen}if(typeof t.outputUpper!=`boolean`)throw Error(`Invalid outputUpper formatting option`);if(typeof t.b64Pad!=`string`)throw Error(`Invalid b64Pad formatting option`);return t}var bx=class{constructor(e,t,n){let r=n||{};if(this.t=t,this.i=r.encoding||`UTF8`,this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw Error(`numRounds must a integer >= 1`);this.o=e,this.h=[],this.u=0,this.l=!1,this.A=0,this.p=!1,this.U=[],this.R=[]}update(e){let t,n=0,r=this.T>>>5,i=this.F(e,this.h,this.u),a=i.binLen,o=i.value,s=a>>>5;for(t=0;t<s;t+=r)n+this.T<=a&&(this.m=this.g(o.slice(t,t+r),this.m),n+=this.T);return this.A+=n,this.h=o.slice(n>>>5),this.u=a%this.T,this.l=!0,this}getHash(e,t){let n,r,i=this.B,a=yx(t);if(this.v){if(a.outputLen===-1)throw Error(`Output length must be specified in options`);i=a.outputLen}let o=vx(e,i,this.H,a);if(this.p&&this.C)return o(this.C(a));for(r=this.Y(this.h.slice(),this.u,this.A,this.I(this.m),i),n=1;n<this.numRounds;n+=1)this.v&&i%32!=0&&(r[r.length-1]&=16777215>>>24-i%32),r=this.Y(r,i,0,this.L(this.o),i);return o(r)}setHMACKey(e,t,n){if(!this.M)throw Error(`Variant does not support HMAC`);if(this.l)throw Error(`Cannot set MAC key after calling update`);let r=_x(t,(n||{}).encoding||`UTF8`,this.H);this.N(r(e))}N(e){let t=this.T>>>3,n=t/4-1,r;if(this.numRounds!==1)throw Error(`Cannot set numRounds with MAC`);if(this.p)throw Error(`MAC key already set`);for(t<e.binLen/8&&(e.value=this.Y(e.value,e.binLen,0,this.L(this.o),this.B));e.value.length<=n;)e.value.push(0);for(r=0;r<=n;r+=1)this.U[r]=909522486^e.value[r],this.R[r]=1549556828^e.value[r];this.m=this.g(this.U,this.m),this.A=this.T,this.p=!0}getHMAC(e,t){let n=yx(t);return vx(e,this.B,this.H,n)(this.S())}S(){let e;if(!this.p)throw Error(`Cannot call getHMAC without first setting MAC key`);let t=this.Y(this.h.slice(),this.u,this.A,this.I(this.m),this.B);return e=this.g(this.R,this.L(this.o)),e=this.Y(t,this.B,this.T,e,this.B),e}};function xx(e,t){return e<<t|e>>>32-t}function Sx(e,t,n){return e^t^n}function Cx(e,t,n){return e&t^e&n^t&n}function wx(e,t){let n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function Tx(e,t,n,r,i){let a=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(a>>>16))<<16|65535&a}function Ex(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function Dx(e,t){let n,r,i,a,o,s,c,l=[];for(n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],c=0;c<80;c+=1)l[c]=c<16?e[c]:xx(l[c-3]^l[c-8]^l[c-14]^l[c-16],1),s=c<20?Tx(xx(n,5),(u=r)&i^~u&a,o,1518500249,l[c]):c<40?Tx(xx(n,5),Sx(r,i,a),o,1859775393,l[c]):c<60?Tx(xx(n,5),Cx(r,i,a),o,2400959708,l[c]):Tx(xx(n,5),Sx(r,i,a),o,3395469782,l[c]),o=a,a=i,i=xx(r,30),r=n,n=s;var u;return t[0]=wx(n,t[0]),t[1]=wx(r,t[1]),t[2]=wx(i,t[2]),t[3]=wx(a,t[3]),t[4]=wx(o,t[4]),t}function Ox(e,t,n,r){let i,a=15+(t+65>>>9<<4),o=t+n;for(;e.length<=a;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[a]=4294967295&o,e[a-1]=o/4294967296|0,i=0;i<e.length;i+=16)r=Dx(e.slice(i,i+16),r);return r}var kx=class extends bx{constructor(e,t,n){if(e!==`SHA-1`)throw Error(`Chosen SHA variant is not supported`);super(e,t,n);let r=n||{};this.M=!0,this.C=this.S,this.H=-1,this.F=_x(this.t,this.i,this.H),this.g=Dx,this.I=function(e){return e.slice()},this.L=Ex,this.Y=Ox,this.m=[1732584193,4023233417,2562383102,271733878,3285377520],this.T=512,this.B=160,this.v=!1,r.hmacKey&&this.N(function(e,t,n,r){let i=e+` must include a value and format`;if(!t){if(!r)throw Error(i);return r}if(t.value===void 0||!t.format)throw Error(i);return _x(t.format,t.encoding||`UTF8`,n)(t.value)}(`hmacKey`,r.hmacKey,this.H))}},Ax=function(e){return e.CvApSoutheast1=`cv-ap-southeast-1`,e.CvApSoutheast2=`cv-ap-southeast-2`,e.CvEuWest1=`cv-eu-west-1`,e.CvNaWest1=`cv-na-west-1`,e}({}),jx={CvApSoutheast1:{systemName:Ax.CvApSoutheast1},CvApSoutheast2:{systemName:Ax.CvApSoutheast2},CvEuWest1:{systemName:Ax.CvEuWest1},CvNaWest1:{systemName:Ax.CvNaWest1}},Mx=function(e){return e.Staff=`Staff`,e.Learner=`Learner`,e.Unknown=`Unknown`,e.System=`System`,e}({}),Nx=3,Px=5e3,Fx=6,Ix={},Lx=class{constructor(e){this.key=e.toString()}getCount(){return Ix[this.key]||0}increment(){Ix[this.key]=this.getCount()+1}reset(){delete Ix[this.key]}shouldBreak(){return this.getCount()>=Fx}},Rx=class{constructor(){this.attempt=0}async wait(){await new Promise(e=>setTimeout(e,Px*2**this.attempt)),this.attempt++}};async function zx(e,t){let n=new Rx,r=new Lx(e);async function i(){let n=await fetch(e,t);if(n.status>=500&&!r.shouldBreak())throw Error(`Server error: ${n.status}`);return n.ok&&r.reset(),n}for(let e=1;e<=Nx;e++)try{return await i()}catch(t){if(e>=Nx||r.shouldBreak())throw t;r.increment(),await n.wait()}}var Bx,Vx=new Uint8Array(16);function Hx(){if(!Bx&&(Bx=typeof crypto<`u`&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<`u`&&typeof msCrypto.getRandomValues==`function`&&msCrypto.getRandomValues.bind(msCrypto),!Bx))throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);return Bx(Vx)}var Ux=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Wx(e){return typeof e==`string`&&Ux.test(e)}for(var Gx=[],Kx=0;Kx<256;++Kx)Gx.push((Kx+256).toString(16).substr(1));function qx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Gx[e[t+0]]+Gx[e[t+1]]+Gx[e[t+2]]+Gx[e[t+3]]+`-`+Gx[e[t+4]]+Gx[e[t+5]]+`-`+Gx[e[t+6]]+Gx[e[t+7]]+`-`+Gx[e[t+8]]+Gx[e[t+9]]+`-`+Gx[e[t+10]]+Gx[e[t+11]]+Gx[e[t+12]]+Gx[e[t+13]]+Gx[e[t+14]]+Gx[e[t+15]]).toLowerCase();if(!Wx(n))throw TypeError(`Stringified UUID is invalid`);return n}function Jx(e,t,n){e||={};var r=e.random||(e.rng||Hx)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n||=0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return qx(r)}function Yx(e){if(!Wx(e))throw TypeError(`Invalid UUID`);return parseInt(e.substr(14,1),16)}var Xx=`cv:session:`,Zx=`cv:window:v2:`,Qx=1e3*60*30,$x=4;function eS(e){if(e===Vd.LocalStorage)return Kd.isAvailable()?Kd:Jd;if(e===Vd.SessionStorage)return qd.isAvailable()?qd:Jd}function tS(e){return new Date().getTime()+e}function nS(){return Jx()}function rS(e,t){return e+(t||`0`)}function iS(e){return new Date().getTime()>e}function aS(e){return!(typeof e!=`object`||typeof e?.id!=`string`||!Wx(e.id)||Yx(e.id)!==$x||typeof e?.ttl!=`number`||e?.ttl<=0||isNaN(e?.ttl))}function oS(e,t,n){let r=eS(n),i=rS(e,t),a=r.get(i);return!aS(a)||iS(a?.ttl)?null:a}function sS(e,t,n,r){let i=eS(n),a=rS(e,t),o={id:nS(),ttl:tS(r)};return i.set(a,o),o}function cS(e,t,n,r,i){let a=eS(n),o=rS(e,t);a.set(o,{id:r.id,ttl:tS(i)})}function lS(e,t,n){let r=eS(n);if(!r?.isAvailable())return;let i=rS(e,t);r.remove(i)}var uS=null,dS={getClientSessionData(e){let t=oS(Xx,e,Vd.LocalStorage);t?cS(Xx,e,Vd.LocalStorage,t,Qx):t=sS(Xx,e,Vd.LocalStorage,Qx);let n=oS(Zx,e,Vd.SessionStorage);return n?uS===null&&cS(Zx,e,Vd.SessionStorage,n,Qx):n=sS(Zx,e,Vd.SessionStorage,uS??Qx),{id:t.id,windowId:n.id}},resetClientSession(e){lS(Xx,e,Vd.LocalStorage),lS(Zx,e,Vd.SessionStorage)},lockWindowSession(e,t){uS=t;let n=oS(Zx,e,Vd.SessionStorage);n&&cS(Zx,e,Vd.SessionStorage,n,t)},unlockWindowSession(e){uS=null;let t=oS(Zx,e,Vd.SessionStorage);t&&cS(Zx,e,Vd.SessionStorage,t,Qx)}},fS={isObject(e){let t=typeof e;return t===`function`||t===`object`&&!!e},isFunction(e){return typeof e==`function`}},pS={safeUrlConcat(e,t){if(!e)return;let n=e;return e.endsWith(`/`)||(n+=`/`),t&&(n+=t.startsWith(`/`)?t.slice(1):t),n}},mS={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i},hS=`Unknown`;function gS(e,t,n){let[r]=t.exec(n)||[];return r||=hS,{name:e,version:r}}function _S(e,t,n){if(!t)return{name:e,version:hS};let r=t.exec(n);return{name:e,version:r&&r.length?r[0].trim():hS}}function vS(e,t){let n={name:e,version:null};return mS.win2000.test(t)&&(n.version=`2000`),mS.winXP.test(t)&&(n.version=`XP`),mS.winVista.test(t)&&(n.version=`Vista`),mS.win7.test(t)&&(n.version=`7`),mS.win8.test(t)&&(n.version=`8`),mS.win81.test(t)&&(n.version=`8.1`),mS.win10.test(t)&&(n.version=`10`),n.version||=hS,n}var yS={getDeviceType(){let e=window.navigator.userAgent;return mS.mobileDevice.test(e)?mS.iphone.test(e)?`iPhone`:mS.ipad.test(e)?`iPad`:mS.android.test(e)?`Android`:mS.blackberry.test(e)?`Blackberry`:mS.windowsPhone.test(e)?`Windows Phone`:hS:`Desktop`},getOperatingSystem(){let e=window.navigator.userAgent;return mS.android.test(e)?_S(`Android`,mS.androidVersion,e):mS.iphone.test(e)||mS.ipad.test(e)?_S(`iOS`,mS.iosVersion,e):mS.linux.test(e)?_S(`Linux`,null,e):mS.unix.test(e)?_S(`Unix`,null,e):mS.mac.test(e)?_S(`Macintosh`,mS.osxVersion,e):mS.windows.test(e)?vS(`Windows`,e):mS.blackberry.test(e)?_S(`BlackBerry`,mS.blackberryVersion,e):mS.windowsPhone.test(e)?_S(`Windows Phone`,mS.windowsPhoneVersion,e):{name:hS,version:hS}},getBrowser(){let e=window.navigator.userAgent;return mS.chrome.test(e)?gS(`Chrome`,mS.generalVersion,e):mS.firefox.test(e)?gS(`Firefox`,mS.generalVersion,e):mS.safari.test(e)?gS(`Safari`,mS.generalVersion,e):mS.ie.test(e)?gS(`Internet Explorer`,mS.ieVersion,e):mS.edge.test(e)?gS(`Edge`,mS.edgeVersion,e):mS.opera.test(e)?gS(`Opera`,mS.operaVersion,e):{name:hS,version:hS}},isTouchScreen(){return!!(`ontouchstart`in window||navigator.maxTouchPoints)}},bS={name:`@clickview/analytics`,version:`2.3.0`,description:`Analytics`,main:`dist/app.js`,types:`dist/analytics/src/app.d.ts`,type:`module`,private:!0,repository:{type:`git`,url:`https://gitlab.cvinternal.net/front-end/clickview`},scripts:{start:`npm run build`,"type-check":`tsc --noEmit`,build:`npm run type-check && node ../../../node_modules/vite/bin/vite.js build`,prebuild:`npm run clean`,clean:`npx rimraf dist`},author:``,license:`ISC`,devDependencies:{"@types/uuid":`8.3.4`,"tsc-alias":`1.8.16`},dependencies:{jssha:`3.3.1`,uuid:`8.3.2`}},xS=`zXJL9nOHxzDlMUDjiP41`,SS=`unknown`,CS=class{constructor(e){this.options=e,this.initialize()}initialize(){this.validateOptions(),this.options.logUtmParameters&&(this.utmParameters=hf.getUtmParameters()),this.options.logAttributionData&&(this.attributionData=nf.getDecodedAttributionData())}get name(){return`CollectionApiClient`}async log(e){if(Array.isArray(e))return this.logBulk(e);this.shouldLog(e)&&(this.validateEvent(e),await this.postData(await this.formatData(e)))}async logBulk(e){let t=e.filter(e=>this.shouldLog(e));if(!t.length)return;t.forEach(e=>this.validateEvent(e));let n=await Promise.all(t.map(e=>this.formatData(e)));await this.postData(n)}validateOptions(){if(!fS.isFunction(this.options.getUser))throw Error(`getUser option is required.`)}shouldLog(e){return fS.isFunction(this.options.shouldLog)?this.options.shouldLog(e):!0}async postData(e){let t=await this.getRegionalUrl(this.options.collectionApiUrls),n=JSON.stringify(e),r={"Content-Type":`application/json`,...this.getSignatureHeader(n)},i=pS.safeUrlConcat(t,`/v1/ingest`);Array.isArray(e)&&(i=pS.safeUrlConcat(i,`/bulk`));try{let e=await zx(i,{method:`POST`,mode:`cors`,headers:r,body:n});e.ok||this.logError(Error(`CollectionApiClient failed to log event. Status: ${e.status} ${e.statusText}`),!1,this.getResponseAsObject(e))}catch(e){this.logError(e)}}getResponseAsObject(e){return{headers:e.headers,ok:e.ok,redirected:e.redirected,status:e.status,statusText:e.statusText,type:e.type,url:e.url,body:e.text()}}getSignatureHeader(e){let t=new kx(`SHA-1`,`TEXT`,{hmacKey:{value:xS,format:`TEXT`,encoding:`UTF8`}});return t.update(e),{"cv-analytics-signature":`${this.options.collectionApiClientId}.${t.getHash(`B64`)}`}}async getRegionalUrl(e){switch((await this.getRegion()).systemName){case Ax.CvEuWest1:return e.cvEuWest1;case Ax.CvApSoutheast2:return e.cvApSoutheast2;case Ax.CvNaWest1:return e.cvNaWest1;case Ax.CvApSoutheast1:default:return e.cvApSoutheast1}}validateEvent(e){typeof e.type!=`string`&&this.logError(Error(`Event type is required.`),!0),fS.isObject(e.actionContext)||this.logError(Error(`Event actionContext is required.`),!0),e.actionContext.entity||this.logError(Error(`Event actionContext entity is required.`),!0)}async formatData(e){return{type:e.type,data:await this.getEventData(e),metadata:this.getEventMetadata(e)}}async getEventData(e){let t=e.actionContext,n=this.getPlatformMetadata(),r=await this.getUserData(),i=await this.getSessionData(),a={name:this.options.productName,version:this.options.productVersion};this.options.productVariant&&(a.variant=this.options.productVariant);let o={user:r,action:t,platform:n,product:a,session:i};this.utmParameters&&(o.utm=this.utmParameters);let s=this.extractData(e),c=Object.keys(o).map(e=>e.toLowerCase()),l=Object.keys(s).map(e=>e.toLowerCase());return c.forEach(e=>{l.includes(e)&&this.logError(Error(`${e} is a reserved key.`),!0)}),{...o,...s}}extractData(e){return fS.isFunction(this.options.formatData)?this.options.formatData(e):{[e.actionContext.entity]:e.data}}async getUserData(){let e;try{e=await this.options.getProfileId?.()}catch(e){this.logError(e)}try{let t=await this.options.getUser();return t?.id?{id:t.id,role:t.role?.toLowerCase()||SS,userGroup:(t.userGroup??Mx.Unknown).toLowerCase(),yearGroup:this.normalizeYearGroup(t.yearGroup),profileId:e,customer:{id:t.customerId,name:t.customerName,customerGuid:t.customerGuid,crmId:t.crmId,country:t.countryCode,region:await this.getRegion(),openCustomer:!1,accessPolicy:t.accessPolicy}}:e?{profileId:e}:void 0}catch(e){this.logError(e)}}async getRegion(){let e=this.options.regionName;try{let t=await this.options.getUser();t?.instanceRegion&&(e=t.instanceRegion)}catch(e){this.logError(e)}return e||this.logError(Error(`RegionName is not set.`),!0),this.getRegionByName(e.toLowerCase())}async getSessionData(){try{let e=await this.options.getUser();return{...dS.getClientSessionData(e?.id),authSessionId:e?.sessionId}}catch(e){return console.error(e),dS.getClientSessionData(null)}}getPlatformMetadata(){let e={url:window.location.href,referrer:document.referrer};return this.attributionData?.internalReferrer&&(e.internalReferrer=this.attributionData.internalReferrer),this.attributionData?.originalReferrer&&(e.originalReferrer=this.attributionData.originalReferrer),{browser:yS.getBrowser(),os:yS.getOperatingSystem(),request:e,screenResolution:`${window.screen.width}x${window.screen.height}`,viewportResolution:`${window.innerWidth}x${window.innerHeight}`}}getEventMetadata(e){return{client:{name:`${this.name}.ts`,version:bS.version,region:this.getRegionByName(this.options.regionName)},timestamp:new Date().toISOString(),eventVersion:e.eventVersion}}getRegionByName(e){let t;return Object.values(jx).forEach(n=>{n.systemName===e&&(t=n)}),t}normalizeYearGroup(e){return e?e.toLowerCase().split(` `).join(`_`):SS}logError(e,t,...n){if(this.options.logError&&this.options.logError(e,...n),t)throw e}},wS=function(e){return e.Stream=`cv_product_stream`,e.WebPlayerStream=`cv_product_webplayer_stream`,e.StreamProgress=`cv_product_stream_progress`,e.PreviewStreamProgress=`cv_product_preview_stream_progress`,e.StreamBuffering=`cv_product_stream_buffering`,e.Login=`cv_product_login`,e.LoginSsoRedirect=`cv_product_login_sso_redirect`,e.LoginFailed=`cv_product_login_failed`,e.Search=`cv_product_search`,e.InstantSearch=`cv_product_instant_search`,e.SearchEmptyResult=`cv_product_search_empty_result`,e.Filter=`cv_product_search_filter`,e.SearchLanding=`cv_product_search_landing`,e.Share=`cv_product_share`,e.Unshare=`cv_product_unshare`,e.WorkspaceAdd=`cv_product_tv_add`,e.Rename=`cv_product_rename`,e.Move=`cv_product_move`,e.Sort=`cv_product_sort`,e.Create=`cv_product_create`,e.Delete=`cv_product_delete`,e.Associate=`cv_product_associate`,e.Dissociate=`cv_product_dissociate`,e.Edit=`cv_product_edit`,e.Approve=`cv_product_approve`,e.Reject=`cv_product_reject`,e.Disable=`cv_product_disable`,e.Upload=`cv_product_upload`,e.Download=`cv_product_download`,e.Navigate=`cv_product_navigate`,e.Click=`cv_product_click`,e.Suggest=`cv_product_suggest`,e.EditAssoc=`cv_product_edit_assoc`,e.Play=`cv_product_play`,e.Favourite=`cv_product_favourite`,e.Follow=`cv_product_follow`,e.Prefer=`cv_product_prefer`,e.Print=`cv_product_print`,e.Copy=`cv_product_copy`,e.Activate=`cv_product_activate`,e.VerifyEmail=`cv_product_verify_email`,e.ChangePassword=`cv_product_change_password`,e.ManageGroup=`cv_product_manage_group`,e.Export=`cv_product_export`,e.SendEmail=`cv_product_send_email`,e.Publish=`cv_product_publish`,e.Submit=`cv_product_submit`,e.Complete=`cv_product_complete`,e.Archive=`cv_product_archive`,e.Promote=`cv_product_promote`,e.Demote=`cv_product_demote`,e.BulkAction=`cv_product_bulk_action`,e.Remove=`cv_product_remove`,e.Dismiss=`cv_product_dismiss`,e.Open=`cv_product_open`,e.Hide=`cv_product_hide`,e.PageView=`cv_product_page_view`,e.Select=`cv_product_select`,e.SwitchCustomer=`cv_product_switch_customer`,e.Focus=`cv_product_focus`,e.Blur=`cv_product_blur`,e.Hover=`cv_product_hover`,e.Unhover=`cv_product_unhover`,e.SetAccess=`cv_product_set_access`,e.AddToLocalCache=`cv_product_add_to_lc`,e.ResolveWarning=`cv_product_resolve_warning`,e.DismissWarning=`cv_product_dismiss_warning`,e}({}),TS=function(e){return e.Folder=`folder`,e.Video=`video`,e.Rating=`rating`,e.Series=`series`,e.Library=`library`,e.Resource=`resource`,e.Tag=`tag`,e.Subtitle=`subtitle`,e.Chapter=`chapter`,e.Resolution=`resolution`,e.PlaybackSpeed=`playback_speed`,e.Device=`device`,e.Restriction=`restriction`,e.Interactive=`interactive`,e.Interaction=`interaction`,e.PDF=`pdf`,e.CustomerSetting=`customer_setting`,e.UserSetting=`user_setting`,e.LibraryRequest=`staff_request`,e.Logo=`logo`,e.Pagination=`pagination`,e.Thumbnail=`thumbnail`,e.Banner=`banner`,e.Link=`link`,e.Playlist=`playlist`,e.Playlists=`playlists`,e.Person=`person`,e.Company=`company`,e.Classroom=`classroom`,e.ClassroomGroup=`classroom_group`,e.Classification=`classification`,e.ShareLink=`share_link`,e.DirectShare=`direct_share`,e.Upload=`upload`,e.SearchResults=`search_results`,e.SearchSuggestion=`search_suggestion`,e.Audience=`audience`,e.User=`user`,e.Clip=`clip`,e.UserChannel=`user_channel`,e.Widget=`widget`,e.Url=`url`,e.SocialShare=`social_share`,e.Presentation=`presentation`,e.BatchJob=`batch_job`,e.DeepLink=`deep_link`,e.Feedback=`feedback`,e.AppLink=`app_link`,e.SignUp=`sign_up`,e.FileGeneratorJob=`file_generator_job`,e.ExportLibraries=`export_libraries`,e.Product=`product`,e.Customer=`customer`,e.SpecialEvent=`special_event`,e.Region=`region`,e.ProductTip=`product_tip`,e.Livestream=`livestream`,e.DevicesCta=`devices_cta`,e.Integration=`integration`,e.Faq=`faq`,e.MixedMedia=`mixed_media`,e.TableOfContents=`table_of_contents`,e.Author=`author`,e.Glance=`glance`,e.Filter=`filter`,e.NotificationSetting=`notification_setting`,e.Transcript=`transcript`,e.CurriculumCode=`curriculum_code`,e.Assign=`assign`,e.PartnerProfile=`partner_profile`,e}({}),ES=function(e){return e.TopNav=`top_nav`,e.LeftNav=`left_nav`,e.Footer=`footer`,e.Popup=`popup`,e.Banner=`banner`,e.VideoList=`video_list`,e.VideoListItem=`video_list_item`,e.VideoListHeader=`video_header`,e.VideoThumbnail=`video_thumbnail`,e.ExpandableVideoThumbnail=`expandable_video_thumbnail`,e.VideoItemPreview=`video_item_preview`,e.InteractiveItemPreview=`interactive_item_preview`,e.ClipItemPreview=`clip_item_preview`,e.VideoDetails=`video_details`,e.InteractiveDetails=`interactive_details`,e.ClipDetails=`clip_details`,e.VideoDetailsHeader=`video_details_header`,e.EditVideoDetails=`edit_video_details`,e.EditInteractiveVideoDetails=`edit_interactive_video_details`,e.EditClipDetails=`edit_clip_details`,e.EditVideoChapters=`edit_video_chapters`,e.EditVideoResources=`edit_video_resources`,e.PreviewVideoResources=`preview_video_resources`,e.VideoUpload=`video_upload`,e.VideoRequest=`video_request`,e.Pagination=`pagination`,e.LibraryHeader=`library_header`,e.LibraryTiles=`library_tiles`,e.LibraryRequestDetails=`staff_request_details`,e.Libraries=`libraries`,e.SubFolderList=`sub_folder_list`,e.AwaitingReviewVideoListHeader=`awaiting_review_video_list_header`,e.AwaitingReviewVideoItem=`awaiting_review_video_item`,e.PastReleasesHeader=`past_releases_header`,e.MigrationWarnings=`migration_warnings`,e.PlaylistListHeader=`playlist_list_header`,e.PlaylistListItem=`playlist_list_item`,e.SeriesListItem=`series_list_item`,e.SeriesWithVideos=`series_with_videos`,e.PlaylistWithVideos=`playlist_with_videos`,e.Dropdown=`dropdown`,e.ViewCurriculumLinks=`view_curriculum_links`,e.SearchBar=`search_bar`,e.InstantSearch=`instant_search`,e.SearchFilters=`search_filters`,e.FeaturedSeriesSearchResult=`featured_series_search_result`,e.ExchangeSearchGroupItem=`exchange_search_group_item`,e.StaffManager=`staff_manager`,e.StaffManagerListItem=`staff_manager_list_item`,e.StudentManager=`student_manager`,e.ViewStudentVideos=`view_student_videos`,e.StudentManagerListItem=`student_manager_list_item`,e.EditUser=`edit_user`,e.UserAuditLog=`user_audit_log`,e.BulkUserActionsWizard=`bulk_user_actions_wizard`,e.BulkUserUploadWizard=`bulk_user_upload_wizard`,e.Classroom=`classroom`,e.ClassroomsList=`classrooms_list`,e.ClassroomsListItem=`classrooms_list_item`,e.ManageClassroomStudents=`manage_classroom_students`,e.ManageClassroomStudentListItem=`manage_classroom_student_list_item`,e.ManageClassroomGroups=`manage_classroom_groups`,e.ManageClassroomGroupListItem=`manage_classroom_group_list_item`,e.ManageClassroomTeachers=`manage_classroom_teachers`,e.ManageClassroomTeacherListItem=`manage_classroom_teachers_list_item`,e.ArchivedClassrooms=`archived_classrooms`,e.PreviewInteractive=`preview_interactive`,e.PreviewSharedInteractive=`preview_shared_interactive`,e.PreviewInteractiveQuestions=`preview_interactive_questions`,e.EditInteractive=`edit_interactive`,e.EditInteractiveDetails=`edit_interactive_details`,e.PlaySharedInteractive=`play_shared_interactive`,e.PlayInteractive=`play_interactive`,e.InteractiveListItem=`interactive_list_item`,e.DeleteInteractive=`delete_interactive`,e.NewInteractive=`new_interactive`,e.CopyInteractive=`copy_interactive`,e.UnpublishInteractive=`unpublish_interactive`,e.ShareInteractive=`share_interactive`,e.PlayPage=`play_page`,e.Player=`player`,e.FloatingPlayer=`floating_player`,e.InteractivePlayer=`interactive_player`,e.EmbeddedPlayer=`embedded_player`,e.CreateClipPlayer=`create_clip_player`,e.PlayClip=`play_clip`,e.PlaySharedClip=`play_shared_clip`,e.ClipListItem=`clip_list_item`,e.ContentUpdatesBanner=`content_updates_banner`,e.ContentUpdatesClassificationBanner=`content_updates_classification_banner`,e.PreferencesSettings=`preferences_settings`,e.NotificationSettings=`notification_settings`,e.TopicsOnboarding=`topics_onboarding`,e.MyUploads=`my_uploads`,e.MyVideos=`my_videos`,e.Playlists=`playlists`,e.SlidingList=`sliding_list`,e.HeroBannerItem=`hero_banner_item`,e.SlidingListItem=`sliding_list_item`,e.ClassificationListItem=`classification_list_item`,e.ClassificationComingSoon=`classification_coming_soon`,e.ClassificationHero=`classification_hero`,e.ClassificationFooter=`classification_footer`,e.Classification=`classification`,e.PresentationClassifications=`presentation_classifications`,e.Dashboard=`dashboard`,e.TeachingLevelBanner=`teaching_level_banner`,e.UpsellBanner=`upsell_banner`,e.FreemiumBanner=`freemium_banner`,e.DiscoverFooter=`discover_footer`,e.ProductBanner=`product_banner`,e.UserOptions=`user_options`,e.MagicTabs=`magic_tabs`,e.Settings=`settings`,e.StudentFeed=`student_feed`,e.MyShares=`my_shares`,e.SharedByMe=`shared_by_me`,e.SharedWithMe=`shared_with_me`,e.Insights=`insights`,e.Error=`error_view`,e.UpgradeForm=`upgrade_form`,e.ClassroomGuide=`classroom_guide`,e.TeachingResources=`teaching_resources`,e.ResourcesGuidancePopup=`resources_guidance_popup`,e.InteractivesGuidancePopup=`interactives_guidance_popup`,e.CurriculumGuidancePopup=`curriculum_guidance_popup`,e.TopVideos=`top_videos`,e.VideoViewsList=`video_views_list`,e.VideoOverview=`video_overview`,e.StudentReachPopup=`student_reach_popup`,e.VideoHighlight=`video_highlight`,e.ClassroomViewsPopup=`classroom_views_popup`,e.GiveFeedbackPopup=`give_feedback_popup`,e.LibraryRequestSettings=`library_request_settings`,e.LibraryRequestAutoApprovalSettings=`auto_approval_settings`,e.OpenInAppPrompt=`open_in_app_prompt`,e.UseAppButton=`use_app_button`,e.Launchpad=`launchpad`,e.EditableSubjectPreferencesWidget=`editable_subject_preferences_widget`,e.ThumbnailHeroMediaWidget=`thumbnail_hero_media_widget`,e.ThumbnailFixedListMediaLargeWidget=`thumbnail_fixed_list_media_large`,e.FilterSlidingPillListSmallWidget=`filter_sliding_pill_list_small`,e.CircleLogoSlidingListWidget=`circle_logo_sliding_list_widget`,e.RectangularLogoSlidingListWidget=`rectangular_logo_sliding_list_widget`,e.HeroBannerSmallWidget=`hero_banner_small`,e.EventIconSlidingListWidget=`event_icon_sliding_list_widget`,e.FaqQuestionWidget=`faq_question_widget`,e.FaqQuestionAccordionWidget=`faq_question_accordion_widget`,e.SubjectStatsWidgetItem=`subject_stats_widget_item`,e.AuthorReviewerWidget=`author_reviewer_widget`,e.ThumbnailFixedListMediaSmallWidget=`thumbnail_fixed_list_media_small_widget`,e.ThumbnailFixedListFolderSmallWidget=`thumbnail_fixed_list_folder_small_widget`,e.ThumbnailVerticalListWidget=`thumbnail_vertical_list_widget`,e.ThumbnailFixedListSmallWidget=`thumbnail_fixed_list_small_widget`,e.PosterFixedListLargeWidget=`poster_fixed_list_large_widget`,e.CurriculumResourcesAccordionWidget=`curriculum_resources_accordion_widget`,e.SearchCurriculumCodeWidget=`search_curriculum_code_widget`,e.ExchangeLinksWidget=`exchange_links_widget`,e.TableOfContents=`table_of_contents`,e.SignUpPopup=`sign_up_popup`,e.SignUpPage=`sign_up_page`,e.TrialBanner=`trial_banner`,e.InviteColleaguePopup=`invite_colleague_popup`,e.AuthProspectSelect=`auth_prospect_select`,e.GatedBanner=`gated_banner`,e.GatedEmptyState=`gated_empty_state`,e.GatedPopup=`gated_popup`,e.WelcomePopup=`welcome_popup`,e.WatchHistoryLanding=`watch_history_landing`,e.MyFavouritesLanding=`my_favourites_landing`,e.MyVideoLanding=`my_videos_landing`,e.PlaylistsLanding=`playlists_landing`,e.MySharesLanding=`myshares_landing`,e.PremiumFeatures=`premium_features`,e.NotificationsDropdown=`notifications_dropdown`,e.CalendarNav=`calendar_nav`,e.CalendarDay=`calendar_day`,e.CalendarPopup=`calendar_popup`,e.RegionMap=`region_map`,e.OnboardingSelectRoleScreen=`onboarding_select_role_screen`,e.OnboardingSchoolLevelScreen=`onboarding_school_level_screen`,e.OnboardingAudiencePreferencesScreen=`onboarding_audience_preferences_screen`,e.OnboardingSelectCurriculumScreen=`onboarding_select_curriculum_screen`,e.OnboardingSubjectsScreen=`onboarding_subjects_screen`,e.ProductTips=`product_tips`,e.LivestreamBookingForm=`booking_form`,e.DateRangeFilter=`date_range_selector`,e.AudienceFilter=`audience_filter`,e.AssignFlowView=`assign_flow_view`,e.ContentPartnerDashboard=`content_partner_dashboard`,e.ContentPartnerDashboardVideoBanner=`content_partner_dashboard_video_banner`,e.UpsellRequestForm=`upsell_request_form`,e.UpsellProductInfo=`upsell_product_info`,e.Global=`global`,e}({}),DS=function(e){return e.Start=`start`,e.Complete=`complete`,e.Save=`save`,e.Discard=`discard`,e.Next=`next`,e.Back=`back`,e}({}),OS=function(e){return e.SignIn=`sign_in`,e.SignUp=`sign_up`,e.SignOut=`sign_out`,e.SwitchAccount=`switch_account`,e.TopNavButton=`top_nav_button`,e.Educator=`educator`,e.Student=`student`,e.TermsAndConditions=`terms_and_conditions`,e.PrivacyPolicy=`privacy_policy`,e.EnterEmail=`enter_email`,e.ClosePopup=`close_popup`,e.Back=`back`,e.UseMyLocation=`use_my_location`,e.TrialCreated=`trial_created`,e.TrialRequested=`trial_requested`,e.DeadEnd=`dead_end`,e.CantFindSchool=`cant_find_school`,e.ResendEmail=`resend_email`,e.ContactUs=`contact_us`,e.InviteColleague=`invite_colleague`,e.PremiumFeatures=`premium_features`,e.Upgrade=`upgrade`,e.FindSchool=`find_school`,e.AddToBraze=`add_to_braze`,e.RequestAccess=`request_access`,e.AutoJoin=`auto_join`,e.WrongEmail=`wrong_email`,e.RequestBdmTrial=`request_bdm_trial`,e.SkipIdpSelect=`skip_idp_select`,e}({}),kS=function(e){return e[e.V1=1]=`V1`,e[e.V2=2]=`V2`,e[e.V3=3]=`V3`,e[e.V4=4]=`V4`,e[e.V5=5]=`V5`,e}({}),AS={first(e){return Ay(e)},firstFew(e,t){return Ay(e,t)},last(e){return My(e)},lastFew(e,t){return My(e,t)},max(e,t){return py(e,t)},cloneAndReplaceAtIdx(e,t,n,r=null){let i=e&&e.length?e.slice():[];return t+1>i.length&&(i=[...i,...Array(t+1-i.length).fill(r)]),i.splice(t,1,n),i},moveItem(e,t,n){let r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r},isEmpty(e){return e&&!e.length},findIndex(e,t){return Kv(e,t)},findWhere(e,t){return $v(e,t)},where(e,t){return fy(e,t)},groupBy(e,t){return xy(e,t)},countBy(e,t){return Cy(e,t)},flatten(e,t){return Py(e,t)},flatMap(e,t){return Py(e.map(t),!0)},intersection(...e){return zy(...e)},addOrRemove(e,t){let n=e.indexOf(t);return n===-1?e.push(t):e.splice(n,1),e},addOrRemoveImmutable(e,t){let n=e.indexOf(t),r=Yy.deepClone(e);return n===-1?[...r,t]:[...r.slice(0,n),...r.slice(n+1)]},sortBy(e,t){return yy(e,t)},chunk(e,t){return Wy(e,t)},uniq(e,t){return Ly(e,t)},toObject(e,t){return e.reduce((e,n)=>Object.assign(e,Yy.isObject(n)?{[n[t]]:n}:{[t]:n}),{})},findIndexById(e,t){return e.findIndex(e=>e.id===t.id)},removeItem(e,t){let n=this.findIndex(e,t);return n===-1?e:this.removeItemFromIndex(e,n)},removeItemFromIndex(e,t){return[...e.slice(0,t),...e.slice(t+1)]},findMatchedIdIndex(e,t){return e.findIndex(e=>e.id?.toString()===t.toString())},shuffle(e){return vy(e)},findLast(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]},findLastIndex(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}},jS=`OTHER`;function MS(e,t){return t.includes(e)?e:e?jS:``}function NS(e){let{error:t,onChange:n,countryCode:r,isTertiary:i}=e,a=Up({countryCode:r,isTertiary:i}),o=MS(e.initialValue,a),[s,c]=Z.useState(o),[l,u]=Z.useState(o===jS?e.initialValue:``);Z.useEffect(()=>{c(MS(e.initialValue,a))},[e.initialValue]);function d(e){c(e.target.value),u(``),n(e.target.value===jS?``:e.target.value)}function f(e){u(e.target.value),n(e.target.value)}let p=s===jS;return(0,Q.jsxs)(`div`,{className:`form-group`,children:[(0,Q.jsxs)(`label`,{htmlFor:e.id,className:e.labelClassName,children:[`Job title`,e.required&&(0,Q.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,Q.jsxs)(`div`,{className:`mb-2`,children:[(0,Q.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,Q.jsx)(`option`,{value:``,disabled:!0,className:`text-secondary`,children:e.placeholder?e.placeholder:(0,Q.jsx)(Q.Fragment,{children:`What do you do?`})}),a.map((e,t)=>(0,Q.jsx)(`option`,{value:e,className:`text-dark`,children:e},t)),(0,Q.jsx)(`option`,{value:jS,className:`text-dark`,children:`Other`})]}),!!t&&!p&&(0,Q.jsx)(Sf,{name:e.id,children:t})]}),p&&(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.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,Q.jsx)(Sf,{name:e.id,children:t})]})]})}var PS=function(e){return e.AU=`cv-ap-southeast-1`,e.NZ=`cv-ap-southeast-2`,e.UK=`cv-eu-west-1`,e.US=`cv-na-west-1`,e}({}),FS=[`uk`,`gb`,`gg`,`im`,`je`,`ie`],IS={au:$.AU,nz:$.NZ,us:$.US,uk:$.UK,ca:$.CA,gb:$.UK,gg:$.UK,im:$.UK,je:$.UK,ie:$.UK,al:$.UK,ad:$.UK,am:$.UK,at:$.UK,az:$.UK,by:$.UK,be:$.UK,ba:$.UK,bg:$.UK,hr:$.UK,cy:$.UK,cz:$.UK,dk:$.UK,ee:$.UK,fi:$.UK,fr:$.UK,de:$.UK,ge:$.UK,gr:$.UK,hu:$.UK,is:$.UK,it:$.UK,lv:$.UK,li:$.UK,lt:$.UK,lu:$.UK,mt:$.UK,md:$.UK,mc:$.UK,me:$.UK,nl:$.UK,mk:$.UK,no:$.UK,pl:$.UK,pt:$.UK,ro:$.UK,ru:$.UK,sm:$.UK,rs:$.UK,sk:$.UK,si:$.UK,es:$.UK,se:$.UK,ch:$.UK,tr:$.UK,ua:$.UK,va:$.UK},LS={au:Ax.CvApSoutheast1,uk:Ax.CvEuWest1,us:Ax.CvNaWest1,nz:Ax.CvApSoutheast2,ca:Ax.CvNaWest1},RS={au:PS.AU,uk:PS.UK,us:PS.US,nz:PS.NZ,ca:PS.US},zS={getRegionName(e){return LS[zS.getCountryCode(e)]},getInstanceRegion(e){return RS[zS.getCountryCode(e)]},getCountryCode(e){return IS[e?.toLowerCase()]||$.US},isCountryCodeUK(e){return FS.includes(e.toLowerCase())},isCountryCodeAU(e){return e?.toLowerCase()===$.AU},isCountryCodeUS(e){return e?.toLowerCase()===$.US},isCountryCodeNZ(e){return e?.toLowerCase()===$.NZ},isSupportedCountryCode(e){return Object.keys(IS).includes(e?.toLowerCase())},getLocalizedLocalityPlaceholderPhrase(e){if(e){if(zS.isCountryCodeUK(e))return`E.g. CR0 3RL or 36 Factory Lane`;if(zS.isCountryCodeAU(e)||zS.isCountryCodeNZ(e))return`E.g. 2212 or Revesby`;if(zS.isCountryCodeUS(e))return`E.g. 95826 or Sacramento`}},getLocalizedLocalityPlaceholderText(e){if(!e)return;let t=zS.getLocalizedLocalityPlaceholderPhrase(e);if(t)return t}};function BS(e){if(!e)return{firstName:``,surname:``};let[t,...n]=e.split(` `).filter(e=>e.length);return{firstName:t,surname:n?.join(` `)}}var VS=o(((e,t)=>{(function(){var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()})),HS=Z.createContext({prefixes:{},breakpoints:[`xxl`,`xl`,`lg`,`md`,`sm`,`xs`],minBreakpoint:`xs`}),{Consumer:US,Provider:WS}=HS;function GS(e,t){let{prefixes:n}=(0,Z.useContext)(HS);return e||n[t]||t}var KS=[`as`,`disabled`];function qS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function JS(e){return!e||e.trim()===`#`}function YS({tagName:e,disabled:t,href:n,target:r,rel:i,role:a,onClick:o,tabIndex:s=0,type:c}){e||=n!=null||r!=null||i!=null?`a`:`button`;let l={tagName:e};if(e===`button`)return[{type:c||`button`,disabled:t},l];let u=r=>{if((t||e===`a`&&JS(n))&&r.preventDefault(),t){r.stopPropagation();return}o?.(r)},d=e=>{e.key===` `&&(e.preventDefault(),u(e))};return e===`a`&&(n||=`#`,t&&(n=void 0)),[{role:a??`button`,disabled:void 0,tabIndex:t?void 0:s,href:n,target:e===`a`?r:void 0,"aria-disabled":t||void 0,rel:e===`a`?i:void 0,onClick:u,onKeyDown:d},l]}var XS=Z.forwardRef((e,t)=>{let{as:n,disabled:r}=e,i=qS(e,KS),[a,{tagName:o}]=YS(Object.assign({tagName:n,disabled:r},i));return(0,Q.jsx)(o,Object.assign({},i,a,{ref:t}))});XS.displayName=`Button`;var ZS=l(VS()),QS=Z.forwardRef(({as:e,bsPrefix:t,variant:n=`primary`,size:r,active:i=!1,disabled:a=!1,className:o,...s},c)=>{let l=GS(t,`btn`),[u,{tagName:d}]=YS({tagName:e,disabled:a,...s});return(0,Q.jsx)(d,{...u,...s,ref:c,disabled:a,className:(0,ZS.default)(o,l,i&&`active`,n&&`${l}-${n}`,r&&`${l}-${r}`,s.href&&a&&`disabled`)})});QS.displayName=`Button`;var $S=Z.forwardRef(({bsPrefix:e,variant:t,animation:n=`border`,size:r,as:i=`div`,className:a,...o},s)=>{e=GS(e,`spinner`);let c=`${e}-${n}`;return(0,Q.jsx)(i,{ref:s,...o,className:(0,ZS.default)(a,c,r&&`${c}-${r}`,t&&`text-${t}`)})});$S.displayName=`Spinner`;function eC(e){let{showSpinner:t,children:n,style:r,spinnerText:i,...a}=e,o=Z.useRef(null),[{width:s,height:c},l]=Z.useState({}),[u,d]=Z.useState(t);Z.useEffect(()=>{if(!t){l({});return}let e=o.current,n=e.offsetHeight,r=e.offsetWidth;!n||!r||l({width:r,height:n})},[t]),Z.useLayoutEffect(()=>{d(t)},[t]);let f={...r};return s&&(f.width=`${s+1}px`),c&&(f.height=`${c+1}px`),(0,Q.jsx)(QS,{ref:o,disabled:t,style:f,...a,children:u?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)($S,{as:`span`,animation:`border`,role:`status`,size:`sm`}),!!i&&(0,Q.jsx)(`span`,{className:`ps-1`,children:i})]}):n})}var tC=/\$+[\w\s]?/,nC=/^\+?\d{4,255}$/,rC=255;function iC(e){let[t,n]=Z.useState({fullname:``,jobTitle:``,phone:``});function r(n){n?.preventDefault(),d(t)&&e.handleSubmitForm(t)}function i(e){e.preventDefault(),l(`fullname`,e.target.value),u(`fullname`),u(`submission`)}function a(e){e.preventDefault(),l(`phone`,e.target.value.trim()),u(`phone`),u(`submission`)}function o(e){l(`jobTitle`,e),u(`jobTitle`),u(`submission`)}function s(){l(`fullname`,``),u(`fullname`),u(`submission`)}function c(){l(`phone`,``),u(`phone`),u(`submission`)}function l(e,t){n(n=>({...n,[e]:t}))}function u(t){if(!Object.keys(e.errors).length||!e.errors[t])return;let n={...e.errors};delete n[t],e.setErrors(n)}function d(t){let{fullname:n,jobTitle:r,phone:i}=t,{firstName:a,surname:o}=BS(n),s={};return(!a||!o)&&(s.fullname=`Please enter your full name.`),(tC.test(a)||tC.test(o))&&(s.fullname=`Please enter your full name.`),n.length>rC&&(s.fullname=`Full name cannot exceed max length of ${rC} characters.`),r?.length||(s.jobTitle=`Please enter your job title.`),tC.test(r)&&(s.jobTitle=`Please enter a valid job title.`),r.length>rC&&(s.jobTitle=`Job title cannot exceed max length of ${rC} characters.`),i?.length||(s.phone=`Please enter your phone number.`),(tC.test(i)||!nC.test(i))&&(s.phone=`Please enter a valid phone number.`),e.setErrors(s),!Object.keys(s).length}function f(){let{fullname:n,jobTitle:r,phone:i}=t;return!(!n.length||!r.length||!i.length||Object.keys(e.errors).length)}return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`A little more about you`}),(0,Q.jsx)(`p`,{children:`Please enter your details.`}),(0,Q.jsxs)(`form`,{onSubmit:r,"aria-errormessage":`brazeFormError`,children:[(0,Q.jsxs)(`div`,{className:`form-group text-start`,children:[(0,Q.jsx)(`label`,{className:`d-block fw-bold mb-1`,htmlFor:`fullname-input`,children:`Full name`}),(0,Q.jsx)(Pf,{value:t.fullname,onChange:i,name:`fullname-input`,id:`fullname-input`,type:`text`,className:`form-control form-control-lg ${e.errors.fullname?.length?`is-invalid`:``}`,placeholder:`Enter your name`,onClickClear:s,autoFocus:!0,"aria-errormessage":`fullname-inputError`}),e.errors.fullname&&(0,Q.jsx)(Sf,{name:`fullname-input`,children:e.errors.fullname})]}),(0,Q.jsxs)(`div`,{className:`form-group text-start`,children:[(0,Q.jsx)(`label`,{className:`d-block fw-bold mb-1`,htmlFor:`phone-input`,children:`Contact number`}),(0,Q.jsx)(Pf,{value:t.phone,onChange:a,name:`phone-input`,id:`phone-input`,type:`tel`,className:`form-control form-control-lg ${e.errors.phone?.length?`is-invalid`:``}`,placeholder:`Enter your phone number`,onClickClear:c,"aria-errormessage":`phone-inputError`}),e.errors.phone&&(0,Q.jsx)(Sf,{name:`phone-input`,children:e.errors.phone})]}),(0,Q.jsxs)(`div`,{className:`form-group text-start`,children:[(0,Q.jsx)(`label`,{className:`d-block fw-bold mb-1`,htmlFor:`jobTitle-select`,children:`Job title`}),(0,Q.jsx)(NS,{id:`jobTitle-select`,countryCode:zS.getCountryCode(e.country),onChange:o,error:e.errors?.jobTitle,size:`lg`,labelClassName:`d-none`,isTertiary:e.isTertiary})]}),!!e.errors?.submission&&(0,Q.jsx)(Sf,{name:`brazeForm`,className:`form-group`,children:e.errors.submission}),(0,Q.jsx)(`div`,{className:`form-group mb-1`,children:(0,Q.jsx)(eC,{className:`btn-lg w-100`,variant:`dark`,onClick:()=>r(),showSpinner:e.loading,disabled:e.loading||!f(),children:`Submit`})})]})]})}var aC=function(e){return e.Unavailable=`unavailable`,e.Expired=`expired`,e.Active=`active`,e.NotRequired=`not-required`,e.Available=`available`,e.Unsupported=`unsupported`,e.UserAutoJoinAllowed=`user-auto-join-allowed`,e.UserJoinApprovalRequired=`user-join-approval-required`,e.InvalidEmail=`invalid-email`,e.BdmTrialAvailable=`bdm-trial-available`,e}({}),oC=function(e){return e.Staff=`staff`,e.Learner=`learner`,e}({}),sC=l(o(((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})}))()),cC={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}},lC={england:`ENG`,scotland:`SCT`,wales:`WLS`,"northern ireland":`NIR`},uC={hashedEmail(e){let t=e.trim().toLowerCase();return sC.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)?uC.removeEmptyKeys(n):n}),{})},Conversions:{TRIAL_UPGRADE_REQUEST:`Request - Trial Upgrade`,FREE_TRIAL_REQUEST:`Request - Free Trial`,OLYMPICS_SPECIAL_OFFER_REQUEST:`Request - Olympics Special Offer`,START_FREE_TRIAL:`Start - Free Trial`,RequestPilot:`Request - Pilot`},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`,CV_LIVE_PILOT_REQUESTED:`cl_product_pilot_requested`,CV_PILOT_REQUESTED:`cv_product_pilot_requested`},getSchoolType(e){if(!e)return;let t=e.toLowerCase();return[`unknown`,`other`].includes(t)?void 0:cC[t]?.label||e},isTertiarySchool(e){return cC[e?.toLowerCase()]?.isTertiary||!1},parseProvince(e){return e.length?lC[e.toLowerCase()]||e:``},getConversionName(e,t){return t?.length?`${e} - ${t}`:e}};function dC(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState({});Z.useEffect(()=>{e.userType===oC.Learner&&e.complete({completionStep:`trial-status`,trialCreated:!1,trialStatus:aC.Unsupported})},[]);function a(e){if(Wp(e.jobTitle)){c();return}o(e)}async function o(a){if(t)return;if(e.userType===oC.Learner){i({...r,submission:`Something went wrong! Please try again later.`});return}e.logUserAction({},{actionType:wS.Click,workflowPhase:DS.Next,descriptor:OS.AddToBraze}),n(!0);let{firstName:o,surname:l}=BS(a.fullname),u=await e.getCrmIdForProspect(e.prospectId);try{let t={email:e.email,firstName:o,lastName:l,phone:a.phone,custom:{crmId:u,orgSubType:uC.getSchoolType(e?.schoolType),accountName:e?.schoolName,jobTitle:a.jobTitle,accountAddress:{countryCode:e?.country,province:uC.parseProvince(e?.province||``)},syncToCrm:!0,source:uC.Sources.CV_PRODUCT_TRIAL_REQUESTED},event:{accountCountry:e?.country,accountPostCode:e?.schoolPostCode,conversion:uC.getConversionName(uC.Conversions.FREE_TRIAL_REQUEST,e.entryPage?.metadata?.conversionSuffix)}},n={prospect_id:e?.prospectId};e.logBrazeEvent({user:t,event:{eventType:lx.ProductFormEvent.ProductTrailRequested,additionalData:n,callback:s}})}catch{i({...r,submission:`Something went wrong! Please try again later.`})}Object.keys(r).length||c()}function s(e){i(e?{}:{...r,submission:`Something went wrong! Please try again later.`}),n(!1)}function c(){e.complete({completionStep:`added-to-braze`,trialCreated:!1,trialStatus:null})}return(0,Q.jsx)(iC,{loading:t,errors:r,setErrors:i,country:e.country||e.geoLocation?.countryCode,logUserAction:e.logUserAction,handleSubmitForm:a,isTertiary:uC.isTertiarySchool(e.schoolType)})}var fC={getRandomInt(e=1e4){return Math.floor(Math.random()*Math.floor(e))}},pC=e=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`,mC=e=>`The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`,hC=(e,t)=>`Failed to create Trusted Types policy "${e}": ${t instanceof Error?t.message:String(t)}.\n\nIf your Content Security Policy uses "require-trusted-types-for 'script'", allow this policy with "trusted-types ${e} google-maps-api-loader google-maps-api#html lit-html". The "google-maps-api-loader", "lit-html", and "google-maps-api#html" policies are required for full Maps JavaScript API execution. Falling back to a string script URL.`,gC=`@googlemaps/js-api-loader`,_C={createScriptURL:e=>e},vC;function yC(){if(vC)return vC;let e=globalThis.trustedTypes;if(!e)return vC=_C,vC;try{vC=e.createPolicy(gC,{createScriptURL:e=>e})}catch(e){hC(gC,e),vC=_C}return vC}function bC(e,t){e.src=yC().createScriptURL(t)}var xC=e=>{var t,n,r,i=`The Google Maps JavaScript API`,a=`google`,o=`importLibrary`,s=`__ib__`,c=document,l=window,u=l[a]||(l[a]={}),d=u.maps||={},f=new Set,p=new URLSearchParams,m=()=>t||=new Promise(async(o,l)=>{for(r in await(n=c.createElement(`script`)),p.set(`libraries`,[...f]+``),e)p.set(r.replace(/[A-Z]/g,e=>`_`+e[0].toLowerCase()),e[r]);p.set(`callback`,a+`.maps.`+s),bC(n,`https://maps.googleapis.com/maps/api/js?`+p),d[s]=o,n.onerror=()=>t=l(Error(i+` could not load.`)),n.nonce=c.querySelector(`script[nonce]`)?.nonce||``,c.head.append(n)});d[o]?console.warn(i+` only loads once. Ignoring:`,e):d[o]=(e,...t)=>f.add(e)&&m().then(()=>d[o](e,...t))},SC=!1;function CC(e){if(SC){pC(e);return}e.apiKey&&(e.key||=e.apiKey),TC(e),SC=!0}async function wC(e){if(!window?.google?.maps?.importLibrary)throw Error(`google.maps.importLibrary is not installed.`);return await google.maps.importLibrary(e)}function TC(e){let t=!!window.google?.maps?.importLibrary;t&&mC(e),t||xC(e)}var EC=!1;function DC(e){EC||=(CC({key:e,v:`weekly`}),!0)}function OC(e){let t=e.libraries||[`places`],[n,r]=Z.useState(!1);Z.useEffect(()=>{let e=!1;return i().then(()=>!e&&r(!0)).catch(()=>!e&&r(!1)),()=>{e=!0}},[]);function i(){return DC(e.apiKey),Promise.all(t.map(e=>wC(e)))}function a(e,t){i().then(()=>{r(!0),e&&e()}).catch(e=>{r(!1),t&&t(e)})}return{scriptLoaded:n,onGoogleApiReady:a}}function kC(e){let{scriptLoaded:t}=OC({apiKey:e.googleApiKey,libraries:[`places`]});return t}var AC=`us`,jC=`country:placeholder:text`;function MC(e){let t=zS.getLocalizedLocalityPlaceholderText(e?.countryCode);if(t)return t;let n=Kd.cacheGet(`${jC}:${e?.countryCode}`);if(n)return n}function NC(){return String.fromCharCode(96+fC.getRandomInt(26))}function PC({apiKey:e,geoLocation:t,makeRequest:n=!0,template:r=`E.g. [placeholder]`,templateKey:i=`[placeholder]`}){let a=kC({googleApiKey:e}),[o,s]=Z.useState(()=>MC(t));Z.useEffect(()=>{if(o||!a||!n)return;let e=t?.countryCode||AC;l(NC(),e)},[o,a,t,n]);function c(e,t){Kd.cacheSet(`${jC}:${t}`,e,86400),s(e)}async function l(e,t){try{let{suggestions:n}=await google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions({input:e,includedPrimaryTypes:[`(cities)`],includedRegionCodes:[t],region:t,sessionToken:new google.maps.places.AutocompleteSessionToken}),a=n[fC.getRandomInt(n.length)]?.placePrediction?.text.toString();if(!a){c(zS.getLocalizedLocalityPlaceholderText(AC),t);return}c(r.replace(i,a),t)}catch{c(zS.getLocalizedLocalityPlaceholderText(AC),t)}}return o}function FC(e,t){let n,r,i,a;for(let e of t)for(let t of e.types)t===`locality`&&(n=e.value),t===`administrative_area_level_1`&&(r=e.value),t===`postal_code`&&(a=e.value),t===`country`&&(i=e.value);return{locality:e,country:i,postalCode:a,city:n,province:r}}var IC={getPlaceDetails(e){return FC(e.formatted_address,e.address_components.map(e=>({types:e.types,value:e.short_name})))},getPlaceDetailsFromPlace(e){return FC(e.formattedAddress,(e.addressComponents||[]).map(e=>({types:e.types,value:e.shortText})))}},LC={1:`geocoderPermissionDenied`,2:`geocoderUnavailable`,3:`geocoderTimeout`};function RC(e){let[t,n]=Z.useState({}),{onGoogleApiReady:r}=OC({apiKey:e.apiKey,libraries:[`geocoding`,`core`]});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({...IC.getPlaceDetails(a),longitude:r,latitude:t})})}function o(t){let n=LC[t.code];n||=`geocoderUnknown`,e.onPositionError(`We are unable to access your location. Please try again later.`)}return{placeDetails:t,onClickGetCurrentLocation:i}}var zC=(e,t)=>{let[n,r]=Z.useState(e);return Z.useEffect(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n};function BC({search:e,makePredicition:t,geoLocation:n,apiKey:r}){let i=kC({googleApiKey:r}),a=zC(e,300),[o,s]=Z.useState(),c=Z.useRef();Z.useEffect(()=>{if(i){if(a?.length===0||!t){s(void 0);return}l(a)}},[a,t,i]);async function l(e){let t=n?.countryCode||`us`;c.current||=new google.maps.places.AutocompleteSessionToken;try{let{suggestions:r}=await google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions({input:e,includedRegionCodes:n?.isFallback?void 0:[t],region:t,includedPrimaryTypes:[`locality`,`sublocality`,`postal_code`],sessionToken:c.current});s(r.map(e=>e.placePrediction).filter(Boolean))}catch{s(void 0)}}async function u(e,t){try{let n=e.toPlace();await n.fetchFields({fields:[`addressComponents`,`formattedAddress`,`location`]});let r=n.location.lng(),i=n.location.lat(),{locality:a,country:o,postalCode:s,city:c,province:l}=IC.getPlaceDetailsFromPlace(n);t({longitude:r,latitude:i,locality:a,country:o,city:c,postalCode:s,province:l})}catch{}finally{c.current=void 0}}return{localityPredicitions:o,getPlaceInfo:u}}function VC(){return(0,Q.jsx)(`svg`,{viewBox:`0 0 24 24`,children:(0,Q.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 HC={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 UC(e){let{predictions:t,getPlaceInfo:n,selectedIndex:r}=e;return(0,Q.jsx)(Q.Fragment,{children:t.map((e,t)=>(0,Q.jsx)(If,{className:`${HC.suggestionItem} ${r-1===t?HC.selected:``}`,onKeyDown:t=>t.key===`Enter`&&n(e),onMouseDown:()=>n(e),onClick:()=>n(e),children:e.text.toString()},e.placeId))})}function WC(e){let t=Z.useRef(null),[n,r]=Z.useState(e.data?.schoolLocality||``),[i,a]=Z.useState(!1),o=PC({apiKey:e.googleMapsApiKey,geoLocation:e.geoLocation}),{localityPredicitions:s,getPlaceInfo:c}=BC({search:n,makePredicition:i,geoLocation:e.geoLocation,apiKey:e.googleMapsApiKey}),{placeDetails:l,onClickGetCurrentLocation:u}=RC({apiKey:e.googleMapsApiKey,onPositionError:b}),d=window.navigator.geolocation?1:0,{selectedIndex:f,onKeyDown:p,containerRef:m,hide:h,onBlur:g,onFocus:_}=Ff({onSelected:C,itemCount:(s?.length??0)+d,hideOnBlur:e.hideOnBlur}),[v,y]=Z.useState();Z.useEffect(()=>{w(l)},[l]);function b(e){a(!0),y(e)}function x(t){v&&y(void 0),i||a(!0),(e.data?.longitude||e.data?.latitude||e.data?.schoolLocality)&&e.clearData(),r(t)}function S(){x(``),t.current.focus()}function C(e){if(!s)return;if(e===s.length){E();return}let t=s[e];t&&T(t)}function w(t){e.setData({schoolLocality:t.locality,country:t.country,province:t.province,schoolPostCode:t.postalCode,longitude:t.longitude,latitude:t.latitude}),t.locality&&r(t.locality)}function T(e){i&&a(!1),c(e,w)}function E(t){t?.preventDefault(),a(!1),u(),e.logUserAction?.({},{actionType:wS.Click,descriptor:OS.UseMyLocation})}function D(){let t=`form-control`;return e.size===`lg`&&(t+=` form-control-lg`),t}let O=s?.length&&!e.data?.schoolLocality?.length,k=window.navigator.geolocation&&!e.data?.schoolLocality?.length,A=e.labelClassName||`d-block text-center mb-3 fw-normal ${HC.baseText}`,j=`form-group position-relative text-start`;return e.size===`lg`&&(j+=` ${HC.large}`),(0,Q.jsxs)(`div`,{className:j,children:[(0,Q.jsxs)(`label`,{className:A,htmlFor:`locality-input`,children:[`ZIP code or city`,e.required&&(0,Q.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,Q.jsx)(Pf,{type:`text`,value:n,onChange:e=>x(e.currentTarget.value),id:`locality-input`,className:D(),ref:t,autoComplete:`off`,placeholder:o||`Loading...`,disabled:e.disabled||!o,autoFocus:e?.autoFocus,onClickClear:S,onKeyDown:p,onFocus:_,onBlur:g}),(0,Q.jsxs)(`div`,{className:`position-absolute z-1 w-100 ${HC.dropdown} ${h?`d-none`:``}`,children:[!!O&&(0,Q.jsx)(`div`,{className:HC.suggestionContainer,children:(0,Q.jsxs)(`div`,{className:HC.suggestionContainerInner,ref:m,children:[(0,Q.jsx)(UC,{predictions:s,getPlaceInfo:T,selectedIndex:f}),window.navigator.geolocation&&e.useGeoLocationApi&&(0,Q.jsx)(If,{className:td(HC.suggestionItem,`px-1`,f-1===s.length?HC.selected:``),onClick:E,children:(0,Q.jsxs)(`div`,{className:`btn btn-link info-link btn-with-icon bg-transparent py-0 pe-1`,children:[(0,Q.jsx)(VC,{}),`Use my current location`]})})]})}),k&&!O&&e.useGeoLocationApi&&(0,Q.jsx)(`div`,{className:`d-flex ${HC.useMyLocation}`,children:(0,Q.jsxs)(`button`,{onClick:E,className:`btn btn-link info-link bg-white btn-with-icon`,children:[(0,Q.jsx)(VC,{}),`Use my current location`]})}),!!v&&(0,Q.jsx)(`div`,{className:`text-danger p-2`,children:v})]})]})}var GC=function(e){return e.GET=`GET`,e.POST=`POST`,e.PUT=`PUT`,e.DELETE=`DELETE`,e}({}),KC=class extends Error{constructor(e,t=`Error`){super(t),this.body=e}},qC={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 JC(e){let t={method:GC.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===GC.GET&&e.data?n=qC.prepareQuery(n,e.data):e.data&&(t={...t,body:JSON.stringify(e.data)}),{init:t,url:n}}var YC={async asyncFetch(e){let t=JC(e),n=await fetch(t.url,t.init);if(!n.ok)throw new KC(await n.json());if(n.status!==204)return await n.json()},async asyncFetchPlain(e){let t=JC(e),n=await fetch(t.url,t.init);if(n.ok)return await n.text()},fetch(e){let t=JC(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()})}},XC={search(e,t,n,r,i){let a={longitude:t.longitude,latitude:t.latitude};t.query&&(a.query=t.query),YC.fetch({url:e,data:a,success:n,error:r,always:i})},async create(e,t){return YC.asyncFetch({url:e.createProspect,method:GC.POST,data:t})},getLookups(e,t){return YC.asyncFetch({url:e.prospectLookups(t)})}},ZC=/\/$/,QC={urlBuilder(e,t){let n=Object.entries(t).map(([e,t])=>e&&Array.isArray(t)?t.map(t=>`${e}=${encodeURIComponent(t)}`).join(`&`):e&&t!=null?`${e}=${encodeURIComponent(t)}`:``).reduce((e,t)=>t?e?`${e}&${t}`:t:e,``);return n?`${e}?${n}`:e},buildFilter(e){let t=[];if(e.limit&&t.push(`limit:${e.limit}`),e.cursor&&t.push(`page:${e.cursor}`),e.before&&t.push(`dateCreated:...${e.before}`),t.length)return t.join(`,`)},makeHttps(e){return typeof e!=`string`||e.indexOf(`http://`)===-1||(e=e.replace(`http://`,`https://`)),e},safeUrlConcat(e,t){if(!e)return;let n=e;return e.endsWith(`/`)||(n+=`/`),t&&(n+=t.startsWith(`/`)?t.slice(1):t),n},removeTrailingSlash(e){if(typeof e==`string`)return e.replace(ZC,``)},getHostname(e){if(!e)return window.location.hostname;try{return new URL(e).hostname}catch{return null}},isValidUrl(e){try{return new URL(e),!0}catch{return!1}}},$C={checkTrialStatus(e,t){if(e.productName!==fx.Lite)return Promise.reject();let n={email:t.email};return YC.asyncFetch({url:e.userStatus,data:n})},checkUserIdps(e,t){return e.productName===fx.Lite?YC.asyncFetch({url:e.idps,data:{email:t}}):Promise.reject()},checkProspectTrialStatus(e,t,n,r,i){let a=e.prospectStatus(t.prospectId);a=QC.urlBuilder(a,{email:t.email}),YC.fetch({url:a,success:n,error:r,always:i})},createTrial(e,t){return YC.asyncFetch({url:e.createTrial,method:GC.POST,data:t})},resendTrialEmail(e,t,n){if(e.productName!==fx.Lite)return Promise.reject();let r={email:n.email,appLink:n?.appLink};return YC.asyncFetch({url:e.resendTrialEmail(t),method:GC.POST,data:r})},createJoinRequest(e,t){let n=e.productName===fx.Auth?e.joinRequest:e.joinRequest(t.customerId),r=e.productName===fx.Auth?t:{email:t.email};return YC.asyncFetch({url:n,method:GC.POST,data:r})},createAutoJoinRequest(e,t){return e.productName===fx.Lite?YC.asyncFetch({url:e.autoJoin,method:GC.POST,data:t}):Promise.reject()}},ew=[`Primary`,`Secondary`,`K12`,`Special`,`TAFE`,`University`],tw=[`Primary`,`Secondary`,`Primary & Secondary`,`Special`,`Sixth Form College`,`FE College`,`University`,`Other`],nw=[`Elementary`,`Middle School`,`High School`,`College`,`Other`],rw={au:ew,nz:ew,uk:tw,us:nw,ca:nw};function iw(e){return rw[zS.getCountryCode(e)]||nw}var aw=function(e){return e.Published=`Published`,e.Draft=`Draft`,e}({});function ow(e){let[t,n]=Z.useState({prospectId:e.prospectId,schoolName:e.schoolName,schoolType:e.schoolType,schoolLocality:e.schoolLocality,country:e.country,province:e.province,city:e.city,longitude:e.longitude,latitude:e.latitude}),[r,i]=Z.useState(),[a,o]=Z.useState(!1),s=iw(t.country||e.geoLocation?.countryCode);function c(){let{schoolName:e,schoolType:n,country:r}=t;return!!(e&&n&&r)}function l(e,t){n(n=>({...n,[e]:t}))}function u(e){let{longitude:t,latitude:n,schoolLocality:r,country:i,city:a,province:o}=e;t&&l(`longitude`,t),n&&l(`latitude`,n),i&&l(`country`,i),a&&l(`city`,a),o&&l(`province`,o),r&&l(`schoolLocality`,r)}function d(){l(`schoolLocality`,void 0),l(`longitude`,void 0),l(`latitude`,void 0),l(`city`,void 0),l(`province`,void 0),l(`country`,void 0),i(``)}function f(e){let t=e.target.value;l(`schoolType`,t)}function p(e){l(`schoolName`,e.target.value)}async function m(n){let r={email:e.email,custom:{accountName:t?.schoolName,accountAddress:{countryCode:t?.country,province:uC.parseProvince(t.province)},orgSubType:uC.getSchoolType(t?.schoolType),syncToCrm:!0,source:uC.Sources.CV_PRODUCT_TRIAL_REQUESTED},event:{accountCountry:t?.country,accountPostCode:t?.schoolPostCode,accountState:uC.parseProvince(t.province)}},i={form_type:`trial-sign-up`,prospect_id:t?.prospectId};e.logBrazeEvent({user:r,event:{eventType:lx.ProductFormEvent.FormSubmission,additionalData:i,callback:n}})}async function h(n){if(n.preventDefault(),!c())return;e.logUserAction(t,{actionType:wS.Click,workflowPhase:DS.Next,descriptor:OS.CantFindSchool}),o(!0);let r;try{if(r=await XC.create(e.ajaxUrls,{name:t.schoolName,status:aw.Draft,countryCode:t.country,prospectType:t.schoolType,city:t.city,postCode:t.schoolPostCode,province:uC.parseProvince(t.province)}),!r.id){o(!1),i(`Error. Something went wrong.`);return}}catch{o(!1),i(`Error. Something went wrong.`);return}if(e.userTrialStatus===aC.BdmTrialAvailable){if(e.userType!==oC.Staff){e.complete({completionStep:`added-to-braze`,trialCreated:!1,trialStatus:null});return}e.nextStep({step:`request-bdm-trial`,...t});return}try{let n={prospectId:r.id,email:e.email,userType:e.userType,appLink:e.pageAppLinkString,signupVariant:e.signupVariant,attribution:{...nf.getDecodedAttributionData(),utms:hf.getUtmParameters()},conversion:uC.getConversionName(uC.Conversions.START_FREE_TRIAL,e.entryPage?.metadata?.conversionSuffix)},i=await $C.createTrial(e.ajaxUrls,n);e.createOrUpdateProfile&&e.createOrUpdateProfile({masterId:i.id,email:e.email,countryCode:t?.country});let a={completionStep:`trial-status`,email:e.email,userId:i.id,prospectId:r.id,schoolName:t.schoolName,schoolLocality:t.schoolLocality,country:t.country,schoolType:t.schoolType,city:t.city,schoolPostCode:t.schoolPostCode,latitude:t.latitude,longitude:t.longitude,province:t.province,trialStatus:aC.Available,trialCreated:!0,customerId:i.data?.customerId};if(e?.userType===oC.Staff){await m(t=>{t||console.error(`Failed to submit create trial data to braze.`),e.complete(a)});return}e.complete(a)}catch(n){if(!n.body){o(!1),i(`Error. Something went wrong.`);return}let a=n;if(a.body.status===400&&a.body.type===`trial-not-available`){e.nextStep({step:`add-to-braze`,...t,prospectId:r.id,trialStatus:aC.Unavailable});return}console.error(n)}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Tell us more about your school`}),(0,Q.jsx)(`p`,{children:`Please enter your school details.`}),(0,Q.jsxs)(`div`,{className:`text-start`,children:[(0,Q.jsxs)(`div`,{className:`form-group`,children:[(0,Q.jsx)(`label`,{className:`d-block`,htmlFor:`school-name-input`,children:`Name of school`}),(0,Q.jsx)(`input`,{type:`text`,value:t?.schoolName||``,onChange:p,id:`school-name-input`,className:`form-control form-control-lg`,autoComplete:`off`,placeholder:`Enter name of school`,autoFocus:!0})]}),(0,Q.jsxs)(`div`,{className:`form-group`,children:[(0,Q.jsx)(`label`,{className:`d-block`,htmlFor:`school-type-select`,children:`Type of school`}),(0,Q.jsxs)(`select`,{id:`school-type-select`,className:`form-select form-select-lg ${t.schoolType?``:`text-secondary`}`,autoComplete:`off`,value:t.schoolType||`none`,onChange:f,children:[(0,Q.jsx)(`option`,{value:`none`,className:`text-secondary`,disabled:!0,children:`Select type of school`}),s.map(e=>(0,Q.jsx)(`option`,{value:e,className:`text-dark`,children:e},e))]})]}),(0,Q.jsx)(WC,{data:t,setData:u,clearData:d,disabled:!1,labelClassName:`d-block`,geoLocation:e.geoLocation,logUserAction:e.logUserAction,googleMapsApiKey:e.googleMapsApiKey,autoFocus:!1,size:`lg`,useGeoLocationApi:!0}),r&&(0,Q.jsx)(`div`,{className:`text-danger mb-3`,children:r})]}),c()&&(0,Q.jsx)(eC,{className:`btn-lg w-100`,variant:`dark`,onClick:h,showSpinner:a,disabled:a,children:`Get started`})]})}function sw(e,t){return t?`${e} ${t}`:e}function cw(e){return(0,Q.jsx)(`h1`,{className:sw(`text-center mb-2 h4`,e.className),children:e.children})}function lw(e){return(0,Q.jsx)(`div`,{className:sw(`text-center text-sm px-2 px-lg-4`,e.className),children:e.children})}function uw(e){return(0,Q.jsx)(`p`,{className:sw(``,e.className),children:e.children})}var dw={Heading:cw,Body:lw,Message:uw};function fw(e){return(0,Q.jsx)(`div`,{className:`d-flex justify-content-center my-4 px-2 px-lg-4`,children:(0,Q.jsx)(`img`,{src:{[aC.Available]:e.imageUrls.statusImages.available,[aC.Active]:e.imageUrls.statusImages.active,[aC.Expired]:e.imageUrls.statusImages.expired,[aC.NotRequired]:e.imageUrls.statusImages.notRequired,[aC.Unavailable]:e.imageUrls.statusImages.unavailable,[aC.Unsupported]:e.imageUrls.statusImages.unsupported,[aC.UserAutoJoinAllowed]:e.imageUrls.statusImages.notRequired,[aC.UserJoinApprovalRequired]:e.imageUrls.statusImages.notRequired,[aC.InvalidEmail]:``,[aC.BdmTrialAvailable]:``}[e.trialStatus],className:`w-100 h-auto`})})}function pw(e){return Z.useEffect(()=>{e.logUserAction({},{actionType:wS.Create,descriptor:OS.TrialRequested,workflowPhase:DS.Complete})},[]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(fw,{trialStatus:aC.Available,imageUrls:e.imageUrls}),(0,Q.jsxs)(dw.Body,{className:`mb-3`,children:[(0,Q.jsx)(dw.Heading,{children:`Submitted!`}),(0,Q.jsx)(dw.Message,{children:`Thank you for your interest in trialing ClickView. We will be in touch with you as soon as possible.`})]})]})}function mw(e){return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(fw,{trialStatus:aC.Available,imageUrls:e.imageUrls}),(0,Q.jsxs)(dw.Body,{className:`mb-3`,children:[(0,Q.jsx)(dw.Heading,{children:`You've requested access!`}),(0,Q.jsx)(dw.Message,{children:`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.`})]})]})}var hw={Marketing:{au:`https://www.clickvieweducation.com/en-au`,us:`https://www.clickvieweducation.com`,nz:`https://www.clickview.co.nz`,uk:`https://www.clickview.co.uk`,ca:`https://www.clickvieweducation.com/en-ca`},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`,ca:`https://www.clickviewsupport.com/hc/en-au#ca`}},gw={[$.AU]:`/contact-us/sales`,[$.US]:`/contact-us/sales`,[$.NZ]:`/contact-us/`,[$.UK]:`/contact-us/trial`,[$.CA]:`/contact-us/sales`},_w={[$.AU]:`/resources/free-student-resources`,[$.US]:`/resources/free-student-resources`,[$.NZ]:`/free-student-resources/`,[$.UK]:`/free-student-resources/`,[$.CA]:`/resources/free-student-resources`},vw={getMarketingUrlForGeoLocation(e){let t=zS.getCountryCode(e?.countryCode);return hw.Marketing[t]||hw.Marketing.us},getMarketingSalesContactForGeoLocation(e){let t=zS.getCountryCode(e?.countryCode);return`${vw.getMarketingUrlForGeoLocation(e)}${gw[t]}`},getFreeResourcesForGeoLocation(e){let t=zS.getCountryCode(e?.countryCode);return`${this.getMarketingUrlForGeoLocation({countryCode:t})}${_w[t]}`},getTermsAndConditionsLink(){return this.getMarketingUrlForGeoLocation($.US)+`/terms-and-conditions/`},getPrivacyPolicyLink(){return this.getMarketingUrlForGeoLocation($.US)+`/privacy-policy/`},getSupportUrlForGeoLocation(e){let t=zS.getCountryCode(e?.countryCode);return hw.Support[t]||hw.Support.us}};function yw(e){let t=e?.previousStepIds&&e.previousStepIds[e.previousStepIds.length-1]===`find-school`,n=e?.schoolName||`Your school`;return(0,Q.jsxs)(dw.Body,{className:`mb-3`,children:[t?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(dw.Heading,{children:[n,(0,Q.jsx)(`br`,{}),`already has ClickView 🎉`]}),(0,Q.jsxs)(dw.Message,{className:`mt-3`,children:[`If your school has SSO\xA0`,(0,Q.jsx)(`a`,{href:e.getSignInUrl({email:e.email,customerId:e.customerId}),className:`info-link`,children:`click here to sign in.`})]}),(0,Q.jsx)(dw.Message,{children:`Otherwise please contact your school admin for access.`})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(dw.Heading,{children:`Good News!`}),(0,Q.jsxs)(dw.Message,{children:[`An account already exists for:`,(0,Q.jsx)(`br`,{}),` `,(0,Q.jsx)(`strong`,{children:e.email})]}),(0,Q.jsx)(dw.Message,{children:(0,Q.jsx)(`a`,{href:e.getSignInUrl({email:e.email}),className:`btn btn-dark btn-lg w-100`,children:`Sign into ClickView`})})]}),(0,Q.jsxs)(dw.Message,{children:[`Need Help?\xA0`,(0,Q.jsx)(`a`,{href:vw.getSupportUrlForGeoLocation(e.geoLocation),className:`info-link`,target:`_blank`,children:`Contact our Help Centre.`})]})]})}function bw(e){let t=vw.getMarketingSalesContactForGeoLocation(e.geoLocation),n=e?.previousStepIds&&e.previousStepIds[e.previousStepIds.length-1]===`find-school`,r=e?.schoolName||`Your school`;return(0,Q.jsxs)(dw.Body,{children:[(0,Q.jsx)(dw.Heading,{children:n?`${r} trial has expired`:`Your trial has expired`}),(0,Q.jsxs)(dw.Message,{children:[`Please contact our\xA0`,(0,Q.jsx)(`a`,{href:t,className:`info-link`,target:`_blank`,children:`ClickView Sales Team`})]})]})}function xw(e){let t=vw.getMarketingSalesContactForGeoLocation(e.geoLocation);return(0,Q.jsxs)(dw.Body,{children:[(0,Q.jsxs)(dw.Heading,{children:[`Your school no longer`,(0,Q.jsx)(`br`,{}),` has access to ClickView`]}),(0,Q.jsxs)(dw.Message,{children:[`Please contact our `,(0,Q.jsx)(`a`,{href:t,className:`info-link`,children:`ClickView Sales Team`}),` for more information.`]})]})}function Sw(){return(0,Q.jsxs)(dw.Body,{children:[(0,Q.jsxs)(dw.Heading,{className:`px-2 px-lg-4`,children:[`ClickView isn't currently `,(0,Q.jsx)(`br`,{}),` available for your school`]}),(0,Q.jsx)(dw.Message,{children:`We're working hard to get ClickView ready for more people.`})]})}var Cw=1;function ww(e){let[t,n]=Z.useState(0),[r,i]=Z.useState(!1);async function a(r){r?.preventDefault();try{await $C.resendTrialEmail(e.ajaxUrls,e.userId,{email:e.email,appLink:e.pageAppLinkString}),n(t+1)}catch{i(!0)}e.logUserAction({},{actionType:wS.Click,descriptor:OS.ResendEmail})}function o(t){t?.preventDefault(),e.logUserAction({},{actionType:wS.Click,descriptor:OS.WrongEmail}),e.nextStep({step:`enter-email`,userType:e.userType})}if(e?.email)return(0,Q.jsxs)(dw.Body,{children:[(0,Q.jsx)(dw.Heading,{children:`Check your inbox!`}),(0,Q.jsxs)(dw.Message,{children:[`An email has been sent to `,(0,Q.jsx)(`strong`,{children:e.email}),`.`]}),!!e.userId&&(0,Q.jsxs)(Q.Fragment,{children:[t<Cw?(0,Q.jsx)(`button`,{onClick:a,className:`btn btn-outline-dark btn-lg mb-3`,children:`Resend verification email`}):(0,Q.jsx)(dw.Message,{children:`✅ Email has been resent!`}),(0,Q.jsxs)(dw.Message,{children:[`Wrong email?\xA0`,(0,Q.jsx)(`button`,{onClick:o,className:`btn info-link p-0 align-top border-0`,children:`Update email address`})]}),r&&(0,Q.jsxs)(dw.Message,{className:`mb-0 text-danger`,children:[`❌ There was a problem resending the email. Please try again later or contact our \xA0`,(0,Q.jsx)(`a`,{href:vw.getSupportUrlForGeoLocation(e.geoLocation),className:`info-link`,children:`support`})]})]})]})}var Tw={[aC.Available]:ww,[aC.Active]:yw,[aC.Expired]:bw,[aC.NotRequired]:yw,[aC.Unavailable]:xw,[aC.Unsupported]:Sw,[aC.UserAutoJoinAllowed]:yw,[aC.UserJoinApprovalRequired]:yw,[aC.InvalidEmail]:null,[aC.BdmTrialAvailable]:null};function Ew(e){let t=Tw[e.trialStatus];return t?(0,Q.jsx)(t,{...e}):(0,Q.jsx)(Q.Fragment,{})}function Dw(e){return Z.useEffect(()=>{let t={actionType:wS.Create,descriptor:OS.DeadEnd,workflowPhase:DS.Discard};e.trialCreated&&(t.descriptor=OS.TrialCreated,t.workflowPhase=DS.Complete),e.logUserAction({},t)},[]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(fw,{trialStatus:e.trialStatus,imageUrls:e.imageUrls}),(0,Q.jsx)(Ew,{...e})]})}var Ow=`young-student`;function kw(e){let t=vw.getFreeResourcesForGeoLocation(e.geoLocation);return Z.useEffect(()=>{Kd.set(Ow,!0)},[]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(fw,{trialStatus:aC.Active,imageUrls:e.imageUrls}),(0,Q.jsxs)(dw.Body,{className:`mb-3`,children:[(0,Q.jsx)(dw.Heading,{children:`Discover our free content`}),(0,Q.jsx)(dw.Message,{children:`Click the button below to explore our videos`}),(0,Q.jsx)(`a`,{href:t,className:`btn btn-lg btn-dark w-100`,target:`_blank`,children:`Start watching now`})]})]})}var Aw={"trial-status":Dw,"added-to-braze":pw,"young-student":kw,"requested-access":mw};function jw(e){let t=Aw[e.completionStep];return(0,Q.jsx)(`div`,{className:`d-flex justify-content-center flex-column mx-auto px-2`,children:(0,Q.jsx)(t,{...e})})}var Mw=function(e){return e.Popup=`popup-form`,e.FullPage=`full-page-form`,e}({}),Nw={day:`_day_cmdpc_1`,month:`_month_cmdpc_4`,year:`_year_cmdpc_7`},Pw=120,Fw=16;function Iw(e,t,n){let r=new Date(Lw(e,t,n));return!isNaN(+r)}function Lw(e,t,n){return`${e.padStart(4,`0`)}-${t.padStart(2,`0`)}-${n.padStart(2,`0`)}`}function Rw(e){let[t,n]=Z.useState(``),[r,i]=Z.useState(``),[a,o]=Z.useState(``),[s,c]=Z.useState(null);function l(e){n(e.target.value),c(null)}function u(e){i(e.target.value),c(null)}function d(e){o(e.target.value),c(null)}function f(){return!t||!r||!a?(c(`Please enter your date of birth`),!1):Iw(a,r,t)?+a>h?(c(`Please enter a date in the past`),!1):+a<h-Pw?(c(`Please enter a realistic date of birth`),!1):!0:(c(`Please enter a valid date`),!1)}function p(n){if(n.preventDefault(),!f())return;let i=new Date(Lw(a,r,t)),o=h-Fw,s=new Date;if(s.setFullYear(o),i>s){e.complete({completionStep:`young-student`,trialCreated:!1,trialStatus:null});return}e.nextStep({step:`enter-email`,userType:e.userType})}let m=e.type===Mw.Popup,h=new Date().getFullYear(),g=td(`d-inline-block`,m?`text-center`:`text-start`),_=`form-control form-control-lg ${s?`is-invalid`:``}`,v=`order-0`,y=`order-3`,b=zS.isCountryCodeUS(e.geoLocation.countryCode);return b&&(v=`order-3`,y=`order-0`),(0,Q.jsxs)(`form`,{onSubmit:p,noValidate:!0,children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Tell us a little about yourself`}),(0,Q.jsx)(`p`,{children:`Please enter your date of birth`}),(0,Q.jsxs)(`div`,{className:`my-4`,children:[(0,Q.jsxs)(`fieldset`,{className:td(`d-flex`,m?`justify-content-center`:`justify-content-start`),"aria-describedby":`dateOfBirthError`,children:[(0,Q.jsxs)(`div`,{className:`${g} ${v}`,children:[(0,Q.jsx)(`label`,{className:`mb-0`,htmlFor:`day`,children:`Day`}),(0,Q.jsx)(`input`,{id:`day`,type:`number`,className:`${_} ${Nw.day}`,min:`1`,max:`31`,placeholder:`DD`,value:t,onChange:l,autoFocus:!b,tabIndex:b?2:1})]}),(0,Q.jsx)(`span`,{className:`h1 fw-normal mt-4 mb-0 mx-2 order-1 ${s?`text-danger`:``}`,children:`/`}),(0,Q.jsxs)(`div`,{className:`${g} ${y}`,children:[(0,Q.jsx)(`label`,{className:`mb-0`,htmlFor:`month`,children:`Month`}),(0,Q.jsx)(`input`,{id:`month`,type:`number`,className:`${_} ${Nw.month}`,min:`1`,max:`12`,placeholder:`MM`,value:r,onChange:u,autoFocus:b,tabIndex:b?1:2})]}),(0,Q.jsx)(`span`,{className:`h1 fw-normal mt-4 mb-0 mx-2 order-4 ${s?`text-danger`:``}`,children:`/`}),(0,Q.jsxs)(`div`,{className:`${g} order-5`,children:[(0,Q.jsx)(`label`,{className:`mb-0`,htmlFor:`year`,children:`Year`}),(0,Q.jsx)(`input`,{id:`year`,name:`year`,type:`number`,className:`${_} ${Nw.year}`,min:h-120,max:h,placeholder:`YYYY`,value:a,onChange:d,tabIndex:3})]})]}),!!s&&(0,Q.jsx)(Sf,{name:`dateofBirth`,children:s})]}),(0,Q.jsx)(`button`,{type:`submit`,className:`btn btn-lg btn-dark w-100`,children:`Continue`})]})}function zw(e){return(0,Q.jsxs)(Q.Fragment,{children:[`Have a ClickView account already?`,(0,Q.jsx)(`a`,{href:e.link,className:`info-link ms-1`,onClick:e.onClick,children:`Sign in`})]})}function Bw(){let e={},t=nf.getEncodedAttributionData();t&&(e.r=t);let n=hf.getUtmParameters();return n&&(e.utms=n),JSON.stringify(e)}var Vw=new RegExp(/^[^\s@]+@[^\s@]+\.[^\s@]+$/),Hw={[$.AU]:`valerie.frizzle@school.edu.au`,[$.UK]:`valerie.frizzle@school.gov.uk`,[$.US]:`valerie.frizzle@school.gov`,[$.NZ]:`valerie.frizzle@school.nz`,[$.CA]:`valerie.frizzle@school.ca`},Uw={[$.AU]:`/contact-us/support`,[$.US]:`/contact-us/support`,[$.NZ]:`/contact-us/`,[$.UK]:`/contact-us/technical/`,[$.CA]:`/contact-us/support`};function Ww(e){return`${vw.getMarketingUrlForGeoLocation(e)}${Uw[zS.getCountryCode(e?.countryCode)]}`}function Gw(e){return Hw[zS.getCountryCode(e.countryCode)]||Hw.us}var Kw=[aC.Expired,aC.NotRequired,aC.Unavailable,aC.Unsupported,aC.Active];function qw(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState(e?.email||``),[a,o]=Z.useState(),s=Ww(e.geoLocation);async function c(){o(``);let t;try{t=await $C.checkTrialStatus(e.ajaxUrls,{email:r})}catch{o(`Something went wrong! Please try again later.`);return}if(t.status===aC.InvalidEmail){o(`Please use your school email address.`);return}if(e.logUserAction({},{actionType:wS.Click,workflowPhase:DS.Next,descriptor:OS.EnterEmail}),Kw.includes(t.status)){e.complete({completionStep:`trial-status`,email:r,trialStatus:t.status,trialCreated:!1});return}try{let n=await $C.checkUserIdps(e.ajaxUrls,r);if(n.length){e.nextStep({step:`select-idp`,email:r,userTrialStatus:t.status,idps:n});return}}catch{o(`Something went wrong! Please try again later.`);return}e.nextStep({step:`find-school`,email:r,userTrialStatus:t.status})}function l(){e.logUserAction({},{actionType:wS.Click,descriptor:OS.ContactUs})}function u(){return r.length?Vw.test(r)?!0:(o(`Please use your school email address.`),!1):(o(`Please enter your school email address.`),!1)}function d(){e.logUserAction({},{actionType:wS.Click,descriptor:OS.SignIn})}function f(e){e.preventDefault(),i(e.target.value),o(``)}async function p(e){e?.preventDefault(),u()&&(n(!0),await c(),n(!1))}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:``,children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Let's set up your account`}),(0,Q.jsx)(`p`,{children:`Enter your school email address`})]}),(0,Q.jsxs)(`form`,{onSubmit:p,noValidate:!0,children:[(0,Q.jsxs)(`div`,{className:`form-group mb-3`,children:[(0,Q.jsx)(Pf,{value:r,onChange:f,name:`email-input`,id:`email-input`,type:`email`,className:`form-control form-control-lg ${a?`is-invalid`:``}`,placeholder:Gw(e.geoLocation),autoComplete:`false`,autoCorrect:`false`,autoFocus:!0,onClickClear:()=>i(``),"aria-errormessage":`email-inputError`}),a&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Sf,{name:`error-input`,children:a}),(0,Q.jsxs)(`small`,{children:[`Having an issue with your email?`,(0,Q.jsx)(`a`,{href:s,className:`info-link ps-1`,target:`_blank`,onClick:l,children:`Contact our team`})]})]})]}),(0,Q.jsx)(eC,{showSpinner:t,variant:`dark`,className:`btn-lg mb-3 w-100`,disabled:t,onClick:p,children:`Continue`})]}),e.userType===oC.Staff&&(0,Q.jsx)(xf,{idps:e.globalIdps,className:`mt-n3`,attribution:Bw()}),(0,Q.jsx)(`div`,{className:`text-center`,children:(0,Q.jsx)(zw,{link:e.getSignInUrl({email:r}),onClick:d})})]})}function Jw(e){switch(e?.body?.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 Yw=function(e){return e.MasterId=`master_id`,e.CrmId=`crm_id`,e.SalesforceId=`salesforce_id`,e}({});function Xw(e){let[t,n]=Z.useState(null);async function r(){try{let t=(await XC.getLookups(e.ajaxUrls,e.prospectId)).find(e=>e.type===Yw.MasterId)?.externalId;if(!t){n(`Something went wrong.`);return}await $C.createJoinRequest(e.ajaxUrls,{customerId:t,email:e.email}),e.logUserAction({},{actionType:wS.Click,descriptor:OS.RequestAccess}),e.complete({completionStep:`requested-access`,trialCreated:!1,trialStatus:aC.UserJoinApprovalRequired})}catch(e){n(Jw(e))}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(fw,{trialStatus:aC.UserJoinApprovalRequired,imageUrls:e.imageUrls}),(0,Q.jsx)(dw.Body,{className:`mb-3`,children:(0,Q.jsxs)(dw.Heading,{children:[e.schoolName,(0,Q.jsx)(`br`,{}),`already has ClickView 🎉`]})}),(0,Q.jsx)(`button`,{className:`btn btn-lg btn-dark w-100 mb-3`,onClick:r,children:`Request access`}),t&&(0,Q.jsx)(`p`,{className:`text-danger text-center mb-2`,children:t}),(0,Q.jsxs)(dw.Message,{className:`text-center`,children:[`Need Help?\xA0`,(0,Q.jsx)(`a`,{href:vw.getSupportUrlForGeoLocation(e.geoLocation),className:`info-link`,target:`_blank`,children:`Contact our Help Centre.`})]})]})}var Zw={createUser(e,t){if(e.productName!==fx.Lite)return Promise.reject();let{email:n,source:r,syncToCrm:i,instanceRegion:a}=t;return YC.asyncFetch({url:e.brazeCreateUser,method:GC.POST,data:{email:n,source:r,syncToCrm:i,instanceRegion:a}})}};function Qw(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState({});function a(e){if(Wp(e.jobTitle)){l();return}s(e)}function o(){let t=zS.getCountryCode(e.country||e.geoLocation?.countryCode);return zS.getInstanceRegion(t)}async function s(a){if(t)return;if(e.userType===oC.Learner){i({...r,submission:`Something went wrong! Please try again later.`});return}e.logUserAction({},{actionType:wS.Click,workflowPhase:DS.Next,descriptor:OS.RequestBdmTrial}),n(!0);let{firstName:s,surname:u}=BS(a.fullname);try{await Zw.createUser(e.ajaxUrls,{email:e.email,source:uC.Sources.CV_PRODUCT_BDM_TRIAL_REQUESTED,syncToCrm:!0,instanceRegion:o()});let t={email:e.email,firstName:s,lastName:u,phone:a.phone,custom:{orgSubType:uC.getSchoolType(e?.schoolType),accountName:e?.schoolName,jobTitle:a.jobTitle,accountAddress:{countryCode:e?.country,province:uC.parseProvince(e?.province||``)},source:uC.Sources.CV_PRODUCT_BDM_TRIAL_REQUESTED},event:{conversion:uC.getConversionName(uC.Conversions.FREE_TRIAL_REQUEST,e.entryPage?.metadata?.conversionSuffix)}},n={prospect_id:e?.prospectId};e.logBrazeEvent({user:t,event:{eventType:lx.ProductFormEvent.BdmTrialRequested,additionalData:n,callback:c}})}catch{i({...r,submission:`Something went wrong! Please try again later.`})}Object.keys(r).length||l()}function c(e){i(e?{}:{...r,submission:`Something went wrong! Please try again later.`}),n(!1)}function l(){e.complete({completionStep:`added-to-braze`,trialCreated:!1,trialStatus:null})}return(0,Q.jsx)(iC,{loading:t,errors:r,setErrors:i,country:e.country||e.geoLocation?.countryCode,logUserAction:e.logUserAction,handleSubmitForm:a,isTertiary:uC.isTertiarySchool(e.schoolType)})}function $w(e){let{loading:t,canSubmitForm:n,setSubmissionError:r,prospectStatus:i,userType:a,logStepEvent:o,logUserAction:s,nextStep:c,data:l,productName:u,ajaxUrls:d,complete:f,setLoadingState:p,email:m,userTrialStatus:h,pageAppLinkString:g,setProperty:_,logBrazeEvent:v,createOrUpdateProfile:y,signupVariant:b}=e;function x(){c({step:`add-to-braze`,trialStatus:i,...l}),o()}function S(){if(o(),a!==oC.Staff){f({completionStep:`added-to-braze`,trialCreated:!1,trialStatus:null});return}c({step:`request-bdm-trial`,...l})}function C(){c({step:`request-access`,...l}),o()}async function w(){try{await $C.createAutoJoinRequest(d,{prospectId:l.prospectId,email:m}),s({},{actionType:wS.Click,descriptor:OS.AutoJoin}),f({completionStep:`trial-status`,trialCreated:!0,trialStatus:aC.Available,...l})}catch{r(`Something went wrong! Please try again later.`),p(!1);return}}async function T(){let e;l?.prospectId&&i===aC.NotRequired&&(e=(await XC.getLookups(d,l.prospectId)).find(e=>e.type===Yw.MasterId)?.externalId),f({completionStep:`trial-status`,trialStatus:i,trialCreated:!1,customerId:e,...l}),o()}function E(){return i===aC.Active||i===aC.Available?!0:i===aC.UserAutoJoinAllowed?u===fx.Auth:!1}async function D(){if(a!==oC.Staff)return;let e={email:m,custom:{accountName:l?.schoolName,accountAddress:{countryCode:l?.country,province:uC.parseProvince(l.province)},orgSubType:uC.getSchoolType(l?.schoolType),syncToCrm:!0,source:uC.Sources.CV_PRODUCT_TRIAL_REQUESTED},event:{accountCountry:l?.country,accountPostCode:l?.schoolPostCode,accountState:uC.parseProvince(l.province),variant:b}},t={form_type:`trial-sign-up`,prospect_id:l?.prospectId};v({user:e,event:{eventType:lx.ProductFormEvent.FormSubmission,additionalData:t}})}async function O(){p(!0);let t;try{t=await $C.createTrial(d,{signupVariant:b,userType:a,email:m,prospectId:l?.prospectId,appLink:g,attribution:{...nf.getDecodedAttributionData(),utms:hf.getUtmParameters()},conversion:uC.getConversionName(uC.Conversions.START_FREE_TRIAL,e?.entryPage?.metadata?.conversionSuffix)})}catch{r(`Something went wrong! Please try again later.`),p(!1);return}i===aC.UserAutoJoinAllowed&&s({},{actionType:wS.Click,descriptor:OS.AutoJoin}),_(`userId`,t.id),f({completionStep:`trial-status`,userId:t.id,trialCreated:!0,trialStatus:aC.Available,customerId:t.data?.customerId,...l}),D(),y&&y({masterId:t.id,email:m,countryCode:l?.country}),o()}return async function(){if(!t){if(!n()){r(`Something went wrong! Please try again later.`);return}if(h===aC.BdmTrialAvailable)return S();if(a===oC.Staff){if(i===aC.Unsupported)return x();if(i===aC.UserJoinApprovalRequired)return C();if(i===aC.UserAutoJoinAllowed&&u===fx.Lite)return await w()}return E()?await O():await T()}}}var eT=50;function tT(e){return e.toLowerCase().split(` `).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function nT(e){let t=[];return e.city&&t.push(tT(e.city)),e.province&&t.push(e.province),e.postCode&&t.push(e.postCode),t.join(` `)}function rT(e){let{filteredSchoolsList:t,getSchoolName:n,onSchoolSuggestionClick:r,selectedIndex:i}=e;return(0,Q.jsx)(Q.Fragment,{children:t.map((e,t)=>(0,Q.jsxs)(If,{className:`${HC.suggestionItem} ${i-1===t?HC.selected:``}`,onKeyDown:t=>t.key===`Enter`&&r(e),onMouseDown:()=>r(e),onClick:()=>r(e),children:[n(e),` `,(0,Q.jsx)(`br`,{}),(0,Q.jsx)(`small`,{className:`text-secondary`,children:nT(e)})]},e.id))})}function iT(e){return(0,Q.jsx)(`div`,{className:`info-link ${HC.suggestionItem} ${HC.noSuggestion} ${e.selected?HC.selected:``}`,onKeyDown:t=>t.key===`Enter`&&e.handleNoSuggestion(),onMouseDown:e.handleNoSuggestion,onClick:e.handleNoSuggestion,children:`Can't find your school?`})}function aT(e){let t=Z.useRef(null),[n,r]=Z.useState(!0),[i,a]=Z.useState(e.data.schoolName&&e.data.schoolPostCode?e.data.schoolName+`, `+e.data.schoolPostCode:e.data.schoolName?e.data.schoolName:``),[o,s]=Z.useState(),c=zC(i,250),{selectedIndex:l,onKeyDown:u,containerRef:d,hide:f,onBlur:p,onFocus:m}=Ff({onSelected:h,itemCount:(o?.length??0)+1,hideOnBlur:e.hideOnBlur});function h(t){if(!o&&!t)return;if(t===o.length){e.onClickNoSuggestions(i);return}let n=o[t];n&&C(n)}let g=!!e.data?.prospectId,_=n&&!g,v=!n&&!g&&o?.length<eT,y=o?.length&&!g;Z.useEffect(()=>{if(!g){if(!c.length){S();return}if(!g&&c.length>1&&c===i){S(c);return}}},[c,g]);function b(t){(e.data.schoolName||e.data.prospectId)&&e.clearData(),t!==i&&a(t)}function x(){b(``),t.current.focus()}function S(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),XC.search(e.searchUrl,n,e=>s(e),null,()=>r(!1))}function C(t){a(w(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 w(e){return e.name}let T=(y||_||v)&&!e.disabled&&!f,E=!_&&!v&&o?.length>=eT,D=`form-control`,O=`form-group position-relative text-start`;return e.size===`lg`&&(D+=` form-control-lg`,O+=` ${HC.large}`),(0,Q.jsxs)(`div`,{className:O,children:[(0,Q.jsxs)(`label`,{className:e.labelClassName,htmlFor:`school-input`,children:[`School`,e.required&&(0,Q.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,Q.jsx)(Pf,{id:`school-input`,value:i,onChange:e=>b(e.currentTarget.value),ref:t,className:D,type:`text`,autoComplete:`off`,placeholder:e.placeholder||`Search for your school`,disabled:e.disabled,autoFocus:!0,onClickClear:x,onKeyDown:u,onFocus:m,onBlur:p}),(0,Q.jsx)(`div`,{className:`position-absolute z-1 w-100 ${HC.dropdown} ${f?`d-none`:``}`,children:(0,Q.jsx)(`div`,{className:`${HC.suggestionContainer} ${T?``:`d-none`}`,children:(0,Q.jsxs)(`div`,{className:HC.suggestionContainerInner,ref:d,children:[y?(0,Q.jsx)(rT,{filteredSchoolsList:o,onSchoolSuggestionClick:C,getSchoolName:w,selectedIndex:l}):_&&(0,Q.jsx)(`div`,{className:`${HC.suggestionLoading} py-4 d-flex justify-content-center`,children:(0,Q.jsx)($S,{animation:`border`})}),E&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`hr`,{className:`my-0`}),(0,Q.jsx)(`div`,{className:`${HC.suggestionItem} ${HC.noSuggestion} text-secondary text-center`,children:(0,Q.jsxs)(`small`,{children:[`Can't find your school? `,(0,Q.jsx)(`br`,{}),` Try searching to narrow the results`]})})]}),!_&&v&&(0,Q.jsx)(iT,{selected:l===o.length+1,handleNoSuggestion:()=>{e.onClickNoSuggestions(i)}})]})})})]})}function oT(e){return e?.toLowerCase()===`au`?`Enter your school postcode or suburb`:e?.toLowerCase()===`us`?`Enter your school ZIP code or city`:e?.toLowerCase()===`ca`?`Enter your school postal code or city`:`Enter your school postcode or city`}function sT(e){let{email:t,userType:n}=e,[r,i]=Z.useState({schoolLocality:e.schoolLocality,country:e.country,longitude:e.longitude,latitude:e.latitude,city:e.city,province:e.province,prospectId:e.prospectId,schoolName:e.schoolName,schoolType:e.schoolType,schoolPostCode:e.schoolPostCode}),[a,o]=Z.useState(e.trialStatus),[s,c]=Z.useState(),[l,u]=Z.useState(!1),[d,f]=Z.useState(!1),[p,m]=Z.useState(!1),h=$w({...e,prospectStatus:a,loading:l,data:r,canSubmitForm:_,setSubmissionError:c,logStepEvent:v,setLoadingState:y,setProperty:b});function g(){return!!(r&&r.schoolLocality&&r.longitude&&r.latitude)}function _(){if(!r||!t||!n)return!1;let{prospectId:e}=r;return!!(t&&n&&e)}function v(){let t={actionType:wS.Click,descriptor:OS.FindSchool,workflowPhase:DS.Next};e.logUserAction(r||{},t)}function y(e){f(e),m(e),u(e)}function b(t,n){t===`prospectId`&&n&&(u(!0),$C.checkProspectTrialStatus(e.ajaxUrls,{prospectId:n.toString(),email:e.email},e=>{o(e.status)},()=>{console.log(`error`)},()=>{u(!1)})),i(e=>({...e,[t]:n}))}function x(){b(`schoolLocality`,void 0),b(`longitude`,void 0),b(`latitude`,void 0),b(`city`,void 0),b(`province`,void 0),b(`country`,void 0),S()}function S(){b(`prospectId`,void 0),b(`schoolName`,``),b(`schoolPostCode`,void 0),c(void 0)}function C(t){e.nextStep({step:`cant-find-school`,prospectId:r.prospectId,schoolName:t,schoolLocality:r.schoolLocality,longitude:r.longitude,latitude:r.latitude,country:r.country,city:r.city,province:r.province}),e.logUserAction({},{actionType:wS.Click,descriptor:OS.CantFindSchool,workflowPhase:DS.Next})}function w(e){b(`prospectId`,e.prospectId),b(`schoolName`,e.schoolName),b(`schoolPostCode`,e.schoolPostCode),b(`schoolType`,e.schoolType),b(`province`,e.province),b(`city`,e.city),b(`country`,e.country)}function T(e){let{longitude:t,latitude:n,schoolLocality:r,country:i,city:a,province:o}=e;t&&b(`longitude`,t),n&&b(`latitude`,n),i&&b(`country`,i),a&&b(`city`,a),o&&b(`province`,o),r&&b(`schoolLocality`,r)}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Let's find your school`}),(0,Q.jsx)(`p`,{children:oT(e.geoLocation?.countryCode)}),(0,Q.jsx)(WC,{data:r,setData:T,clearData:x,disabled:d,geoLocation:e.geoLocation,labelClassName:`d-none`,logUserAction:e.logUserAction,googleMapsApiKey:e.googleMapsApiKey,autoFocus:!0,size:`lg`,useGeoLocationApi:!0}),g()&&(0,Q.jsx)(aT,{data:r,setData:w,clearData:S,disabled:p,searchUrl:e.ajaxUrls.searchProspect,onClickNoSuggestions:C,size:`lg`,labelClassName:`d-none`}),s&&(0,Q.jsx)(`p`,{className:`text-danger mb-2`,children:s}),_()&&(0,Q.jsx)(eC,{className:`btn-lg w-100`,variant:`dark`,onClick:h,showSpinner:d||p||l,disabled:d||p||l,children:`Get started`})]})}var cT=[`38A2E8`,`7A76E8`,`40BCC3`,`F7847B`];function lT(e){let[t,n]=Z.useState(null);function r(e){if(!e)return;let t=window.location.pathname+window.location.search;window.location.href=`/challenge?idp=${e.id}&redirectUrl=`+encodeURIComponent(t)}function i(){e.logUserAction({},{actionType:wS.Click,workflowPhase:DS.Next,descriptor:OS.SkipIdpSelect}),e.nextStep({step:`find-school`,email:e.email,userTrialStatus:e.userTrialStatus})}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Does your school already have ClickView?`}),(0,Q.jsx)(`p`,{children:`Find your school from the list below`}),e.idps.length>4?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(zf,{id:`idp`,item:t,items:e.idps,onSelect:n,getName:e=>e.name,clearData:()=>n(null),placeholder:`Select a school`,size:`lg`}),(0,Q.jsx)(`button`,{className:`btn btn-lg btn-dark w-100 mb-3`,disabled:!t,onClick:()=>r(t),children:`Continue`})]}):e.idps.map((e,t)=>(0,Q.jsx)(`button`,{className:`btn btn-lg w-100 mb-3`,onClick:()=>r(e),style:{backgroundColor:`#${cT[t%cT.length]}`,color:`#FFF`},children:e.name},t)),(0,Q.jsx)(`button`,{className:`btn btn-link text-info w-100 no-sso-link`,onClick:i,children:`My school does not have ClickView`})]})}var uT={hoverArea:`_hoverArea_1i8nr_1`,defaultImage:`_defaultImage_1i8nr_1`,activeImage:`_activeImage_1i8nr_1`,hoverImage:`_hoverImage_1i8nr_4`};function dT(e){let{as:t=`div`,className:n,...r}=e;return(0,Q.jsx)(t,{className:td(n,uT.hoverArea),...r,children:e.children})}function fT(e){return e.active?(0,Q.jsx)(`img`,{src:e.src.hovered,className:td(uT.activeImage,e.className?.hovered)}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`img`,{src:e.src.default,className:td(uT.defaultImage,e.className?.default)}),(0,Q.jsx)(`img`,{src:e.src.hovered,className:td(uT.hoverImage,e.className?.hovered)})]})}var pT={Area:dT,Image:fT},mT={userTypeOption:`_userTypeOption_e39ge_1`,selected:`_selected_e39ge_4`,image:`_image_e39ge_8`};function hT(e){return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(pT.Area,{as:If,className:`ratio ratio-1x1 d-none d-md-block`,onClick:()=>e.onClick(e.type),children:(0,Q.jsxs)(`div`,{className:td(`d-flex flex-fill flex-column justify-content-center border rounded-3 mx-auto gap-3 p-3`,mT.userTypeOption,e.selected&&mT.selected),children:[(0,Q.jsx)(pT.Image,{active:e.selected,src:{default:e.defaultImageSrc,hovered:e.hoveredImageSrc},className:{default:td(`rounded-top mx-auto pb-2 w-auto`,mT.image),hovered:td(`rounded-top mx-auto pb-2 w-auto`,mT.image)}}),(0,Q.jsx)(`span`,{className:`h4`,children:e.buttonText})]})}),(0,Q.jsx)(If,{className:`btn btn-lg btn-outline-dark w-100 d-md-none d-block mx-auto`,onClick:()=>e.onClick(e.type),children:e.buttonText})]})}var gT=function(e){return e.ClickView=`clickview`,e.ClickViewLive=`clickview-live`,e.Bundle=`bundle`,e}({}),_T={[Mw.Popup]:{[gT.ClickViewLive]:{title:`Tune in to live programs without leaving the classroom`,description:`Let's get you set up so you can access ClickView Live. Who would you like to sign up as?`},[gT.ClickView]:{title:`Access thousands of standard-aligned videos`,description:`Let's get you set up so you can access ClickView. Who would you like to sign up as?`},[gT.Bundle]:{title:`Access thousands of standard-aligned videos`,description:`Let's get you set up so you can access ClickView. Who would you like to sign up as?`}},[Mw.FullPage]:{[gT.ClickViewLive]:{title:`Let’s create your ClickView Live account`},[gT.ClickView]:{title:`Let’s create your ClickView account`},[gT.Bundle]:{title:`Let’s create your ClickView account`}}},vT={[Mw.Popup]:{itemClassName:`col-md-6 col-lg-4 col-xl-5`,containerClassName:`col-11`,titleClassName:`h4`},[Mw.FullPage]:{itemClassName:`col-12 col-md-6`,containerClassName:`col-10 col-xl-8`,titleClassName:`h2 mb-3`}};function yT(e){let{signupVariant:t}=e,{title:n,description:r}=_T[e.type][t];function i(t){if(e.logUserAction({userType:t},{actionType:wS.Click,workflowPhase:DS.Next,descriptor:t===oC.Staff?OS.Educator:OS.Student}),t===oC.Staff){e.nextStep({step:`enter-email`,userType:t});return}e.nextStep({step:`enter-age`,userType:t})}let a=vT[e.type];return(0,Q.jsx)(`div`,{className:`row justify-content-center`,children:(0,Q.jsxs)(`div`,{className:a.containerClassName,children:[(0,Q.jsx)(`h1`,{className:a.titleClassName,children:n}),r&&(0,Q.jsx)(`p`,{className:`mb-3`,children:r}),(0,Q.jsxs)(`div`,{className:`row justify-content-center text-center g-3`,children:[(0,Q.jsx)(`div`,{className:a.itemClassName,children:(0,Q.jsx)(hT,{type:oC.Staff,buttonText:`I am an educator`,defaultImageSrc:e.imageUrls.educator?.default,hoveredImageSrc:e.imageUrls.educator?.hovered,onClick:i,selected:e.userType===oC.Staff})}),(0,Q.jsx)(`div`,{className:a.itemClassName,children:(0,Q.jsx)(hT,{type:oC.Learner,buttonText:`I am a student`,defaultImageSrc:e.imageUrls.student?.default,hoveredImageSrc:e.imageUrls.student?.hovered,onClick:i,selected:e.userType===oC.Learner})})]})]})})}var bT={"select-type":yT,"enter-email":qw,"find-school":sT,"cant-find-school":ow,completed:jw,"add-to-braze":dC,"enter-age":Rw,"request-access":Xw,"request-bdm-trial":Qw,"select-idp":lT};function xT(e){let{state:t,geoLocation:n,layout:r,hasPreviousStep:i,googleMapsApiKey:a,pageAppLinkString:o,entryPage:s,back:c,nextStep:l,complete:u,logUserAction:d,logBrazeEvent:f,imageUrls:p,ajaxUrls:m,productName:h,getSignInUrl:g,globalIdps:_,createOrUpdateProfile:v,getCrmIdForProspect:y,signupVariant:b,type:x}=e,S=bT[t.currentStepId],C={...t,geoLocation:n,googleMapsApiKey:a,pageAppLinkString:o,entryPage:s,back:c,nextStep:l,complete:u,logUserAction:d,imageUrls:p,ajaxUrls:m,productName:h,getSignInUrl:g,logBrazeEvent:f,globalIdps:_,createOrUpdateProfile:v,getCrmIdForProspect:y,signupVariant:b,type:x},w=r;if(!w)return(0,Q.jsx)(S,{...C});let T=AS.last(e.state.previousStepIds)===`completed`;return(0,Q.jsx)(w,{geoLocation:e.geoLocation,currentStep:t.currentStepId,previousStep:c,closeApp:e.close,logUserAction:d,hasPreviousStep:i,showBackButton:!T,imageUrls:e.imageUrls,getSignInUrl:g,children:(0,Q.jsx)(S,{...C})})}var ST=[`email`,`longitude`,`latitude`,`trialCreated`,`idps`],CT={filterBlacklistedKeys(e){let t={...e};return ST.forEach(e=>delete t[e]),t}};function wT(e){let t=[...e.previousStepIds],n=t.pop();return{...e,previousStepIds:t,currentStepId:n}}function TT(e){return Object.entries(e).filter(([,e])=>e!==null).reduce((e,[t,n])=>({...e,[t]:n}),{})}function ET(e,t){let n={...e,previousStepIds:[...e.previousStepIds,e.currentStepId],currentStepId:t.step};if(t.step===`select-type`)return{...n};if(t.step===`enter-email`||t.step===`enter-age`)return{...n,userType:t.userType};if(t.step===`select-idp`)return{...n,email:t.email,userTrialStatus:t.userTrialStatus,idps:t.idps};if(t.step===`find-school`)return{...n,email:t.email,userTrialStatus:t.userTrialStatus};if(t.step===`cant-find-school`)return{...n,prospectId:t.prospectId,schoolName:t.schoolName,schoolLocality:t.schoolLocality,country:t.country,longitude:t.longitude,latitude:t.latitude,city:t.city,province:t.province};if(t.step===`add-to-braze`||t.step===`completed`||t.step===`request-access`||t.step===`request-bdm-trial`){let e={...t};return delete e.type,delete e.step,e=TT(e),{...n,...e}}}function DT(e,t){switch(t.type){case`nextStep`:return ET(e,t);case`back`:return wT(e)}}var OT=({location:e,initialValues:t,entryPage:n,onStepUpdate:r,externalLogUserAction:i})=>{let a={currentStepId:`select-type`,previousStepIds:[],...uC.removeEmptyKeys(t)},[o,s]=Z.useReducer(DT,a);Z.useEffect(()=>{r?.(o)},[o.currentStepId]);function c(){s({type:`back`})}function l(e){s({type:`nextStep`,...e})}function u(e){s({type:`nextStep`,step:`completed`,...e})}function d(t,r){let a={...o,...t},s=CT.filterBlacklistedKeys(a),c={currentStepId:o.currentStepId,...s};n&&(c.entryPage=n),i(Object.entries(c).filter(([,e])=>e!==void 0).reduce((e,[t,n])=>({...e,[t]:n}),{}),{entity:TS.SignUp,location:e,...r})}return{state:o,back:c,nextStep:l,complete:u,hasPreviousStep:!!o.previousStepIds.length,logUserAction:d}},kT={statusImages:{available:`/images/sign-up/available-v2.png`,active:`/images/sign-up/active-v2.png`,expired:`/images/sign-up/expired-v2.png`,notRequired:`/images/sign-up/active-v2.png`,unavailable:`/images/sign-up/unavailable-v2.png`,unsupported:`/images/sign-up/unavailable-v2.png`,autoJoin:`/images/sign-up/active-v2.png`,requestAccess:`/images/sign-up/active-v2.png`}};function AT(e){let t={currentStepId:`find-school`,previousStepIds:[],email:e.email,userType:oC.Staff},n=e.geoLocation?.countryCode?e.geoLocation:{countryCode:$.US,isFallback:!0},{complete:r,...i}=OT({location:ES.AuthProspectSelect,initialValues:t,externalLogUserAction:d}),[a,o]=Z.useState(null);Z.useEffect(()=>{bd.get(`/ajax/config`).then(e=>o(e))},[]);let s=px(a?.gatewayApi),c=Z.useMemo(()=>{if(!a)return null;let e={cvApSoutheast1:a.analytics[Ax.CvApSoutheast1].collectionApi,cvApSoutheast2:a.analytics[Ax.CvApSoutheast2].collectionApi,cvEuWest1:a.analytics[Ax.CvEuWest1].collectionApi,cvNaWest1:a.analytics[Ax.CvNaWest1].collectionApi};return new CS({productName:`auth.web`,productVersion:a.version,regionName:zS.getRegionName(n?.countryCode),collectionApiUrls:e,collectionApiClientId:`cv_auth`,getUser:()=>null,logAttributionData:!0,logUtmParameters:!0})},[a]),l=Z.useMemo(()=>{if(!a?.braze)return null;let e=a.braze[zS.getRegionName(n?.countryCode)];return new lx.BrazeClient({apiOptions:{apiKey:e.apiKey,baseUrl:e.url,productName:`auth.web`,productVersion:a.version,allowUserSuppliedJavascript:!1,automaticallyShowInAppMessages:!1}})},[a]);ux({additionalData:e.additionalData});function u(e){if(!l)return;let t=nf.getDecodedAttributionData(),n=e.event?.additionalData||{};t?.originalReferrer&&(n.original_referrer=t.originalReferrer),t?.internalReferrer&&(n.internal_referrer=t.internalReferrer);let r={...e.event,additionalData:n};l.setUserInit(e.user),l.event.log(r)}function d(e,t){c?.log({type:t.actionType,data:e,actionContext:{productArea:`prospect_select`,entity:t.entity,location:t.location,descriptor:t.descriptor,workflowPhase:t.workflowPhase},eventVersion:t.eventVersion||kS.V1})}function f(t){if(!t.trialCreated){r(t);return}bd.post(`/ajax/login/select-customer`,{customerId:t.customerId,returnUrl:e.returnUrl}).then(t=>Rd(t,e))}function p(){e.navigate({step:e.backStep,backStep:null})}async function m(e){try{return(await bd.get(s.prospectLookups(e))).find(e=>e.type===Yw.CrmId)?.externalId}catch{return}}if(!a)return(0,Q.jsx)(Q.Fragment,{});let h={...i,type:Mw.FullPage,signupVariant:gT.ClickView,complete:f,googleMapsApiKey:a.googleMapsApiKey,ajaxUrls:s,imageUrls:kT,geoLocation:n,productName:fx.Auth,getSignInUrl:()=>``,logBrazeEvent:u,getCrmIdForProspect:m};return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(nd,{theme:e.theme,onClickBack:!!e.backStep&&p}),(0,Q.jsx)(xT,{...h})]})}function jT(e){return(0,Q.jsxs)(`div`,{className:`text-center`,children:[(0,Q.jsx)(nd,{theme:e.theme}),(0,Q.jsx)(`img`,{className:`img-fluid mb-4`,alt:`error`,src:`/images/errors/email-not-allowed-v2.png`}),(0,Q.jsx)(`h1`,{className:`h2 mb-3`,children:`Oops! Make sure to use your school email address`}),(0,Q.jsx)(`p`,{className:`mb-3`,children:`This includes the email you use to sign in to Google or Microsoft.`}),(0,Q.jsx)(`a`,{href:e.liteUrl+`sign-up`,className:`btn btn-lg btn-dark w-100 text-decoration-none`,children:`Try again`})]})}var MT={username:Xu,"username-input":Cf,"username-or-guest":wf,"guest-selection":Uf,password:qf,"select-idp":Yf,error:Cp,"verify-email":tp,"verify-email-check-code":lp,"verify-email-link-success":dp,"verify-email-skip-reason":Op,"forgot-password":fp,"forgot-password-check-code":pp,"reset-password":gp,"change-password":_p,"self-activation":vp,"self-activation-check-code":yp,"verify-email-link-email-in-use":Tp,"verify-email-code-email-in-use":Ep,logout:kp,loggedout:Ap,"activate-user":ib,"select-customer":cb,"trial-expired":_b,"link-account":ex,"link-account-code":tx,invite:ax,"invite-success":ox,"select-user-type":cx,"prospect-select":AT,"email-not-allowed":jT,"organisation-select-customer":jp,"contact-support":Sp};function NT(e,t){if(t.type!==`navigate`)return e;let n=Object.keys(t.data).reduce((e,n)=>{if(n!==`bannerType`)return t.data[n]!==void 0&&(e={...e,[n]:t.data[n]}),e},{});return t.data.clearUsername&&(n.username=void 0,n.clearUsername=void 0),{...e,...n}}function PT(e,t){return t.type===`setBanner`?{...e,bannerType:t.data.bannerType}:e}function FT(e,t){switch(t.type){case`navigate`:return NT(e,t);case`setBanner`:return PT(e,t)}}var IT={footer:`_footer_psbd8_1`};function LT(e){return(0,Q.jsx)(`div`,{className:`text-center p-2 text-secondary small`,children:(0,Q.jsxs)(`ul`,{className:`d-flex flex-wrap list-unstyled justify-content-center`,children:[(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(`span`,{children:[`2003 - `,new Date().getFullYear(),` © ClickView Pty Limited`]})}),`\xA0|\xA0`,(0,Q.jsx)(`li`,{children:(0,Q.jsx)(`a`,{href:e.privacyPolicyUrl,className:`text-secondary`,children:(0,Q.jsx)(`strong`,{children:`Privacy Policy`})})}),`\xA0|\xA0`,(0,Q.jsx)(`li`,{children:(0,Q.jsx)(`a`,{href:e.termsAndConditionsUrl,className:`text-secondary`,children:(0,Q.jsx)(`strong`,{children:`Terms and Conditions`})})}),`\xA0|\xA0`,(0,Q.jsx)(`li`,{children:(0,Q.jsx)(`span`,{children:e.version})})]})})}function RT(e){return(0,Q.jsx)(`footer`,{className:IT.footer,children:(0,Q.jsx)(LT,{...e})})}var zT=`M317.302 140.594C356.23 163.069 356.23 219.257 317.302 241.731L87.9302 374.159C36.1933 404.029 -21.7046 346.131 8.16593 294.394L50.9108 220.359C61.3416 202.293 61.3416 180.034 50.9109 161.967L8.16512 87.9294C-21.7052 36.1925 36.1927 -21.7052 87.9295 8.16518L317.302 140.594Z`;function BT(){return(0,Q.jsxs)(`svg`,{viewBox:`0 0 2420 383`,children:[(0,Q.jsx)(`title`,{children:`ClickView Logo`}),(0,Q.jsx)(`path`,{fill:`#f8981d`,d:zT}),(0,Q.jsx)(`path`,{fill:`#313543`,d:`M611.506 37.93c32.531 0 61.155 7.86 85.686 23.732 24.569 15.898 42.448 38.445 53.64 67.43l2.553 6.609h-55.686l-1.301-2.829c-7.699-16.724-18.767-29.458-33.196-38.377l-.11-.069-.014-.01c-13.652-8.57-30.142-13.096-49.669-13.371l-1.903-.014c-19.522 0-36.885 4.537-52.213 13.522-15.305 8.973-27.345 21.774-36.129 38.544l-.015.029c-8.74 16.421-13.202 35.916-13.202 58.645 0 22.414 4.447 41.908 13.188 58.62l.847 1.564.825 1.465c8.613 15.034 20.102 26.719 34.486 35.152 15.328 8.985 32.691 13.521 52.213 13.521l1.906-.013c19.595-.268 36.134-4.686 49.812-13.045 14.419-8.92 25.48-21.649 33.175-38.367l1.3-2.826h55.708l-2.58 6.622c-11.198 28.71-29.078 51.11-53.635 67l-.091.058-.031.017c-24.507 15.544-53.089 23.239-85.564 23.239-27.772 0-53.222-6.451-76.248-19.403l-.022-.013-.007-.004-.117-.066-.021-.015c-22.685-13.233-40.648-31.506-53.841-54.737-13.252-23.335-19.83-49.632-19.83-78.769 0-29.136 6.578-55.434 19.83-78.768 13.169-23.468 31.098-41.866 53.747-55.1l.016-.012.205-.118c23.032-13.244 48.497-19.843 76.288-19.843M853.29 344.778h-48.522V37.935h48.522zm108.133 0H912.9V125.985h48.523zM937.586 37.93c8.392 0 15.617 3.072 21.365 9.12l.557.571c5.665 5.944 8.519 13.236 8.519 21.603 0 8.638-3.042 16.128-9.076 22.174-5.748 6.047-12.973 9.121-21.365 9.121-8.649 0-16.147-3.05-22.197-9.099-6.049-6.049-9.098-13.547-9.098-22.196 0-8.648 3.049-16.147 9.098-22.196s13.548-9.098 22.197-9.098m883.954 306.848h-48.52V125.985h48.52zM1797.71 37.93c8.39 0 15.61 3.072 21.36 9.12l.56.571c5.66 5.944 8.52 13.236 8.52 21.603 0 8.638-3.04 16.128-9.08 22.174-5.75 6.047-12.97 9.121-21.36 9.121-8.65 0-16.15-3.05-22.2-9.099s-9.1-13.547-9.1-22.196c0-8.648 3.05-16.147 9.1-22.196s13.55-9.098 22.2-9.098m-685.63 88.056c.18-.001.55-.007.8-.007h.02l1.27.007c.22-.001.58-.007.87-.007l1.23.005c25.71.192 47.32 6.421 64.47 19.041 17.63 12.79 29.21 30.547 34.76 52.985l1.49 6.025h-50.78l-1-3.522c-.03-.077-.03-.089-.05-.138-3.68-8.706-9.16-15.814-16.48-21.406l-.01-.012-.08-.064c-9.02-7.051-20.36-10.823-34.31-11.058l-1.42-.011c-18.69.005-33.52 6.889-44.94 20.703v.013l-.07.082c-3.49 4.155-6.47 8.877-8.93 14.186-3.21 9.073-4.87 19.779-4.87 32.199l.01 1.197.01 1.149c.2 11.745 1.9 21.943 5 30.664 2.43 5.277 5.37 9.989 8.8 14.153 11.43 13.858 26.29 20.763 45.01 20.763l1.37-.011c14-.221 25.37-3.876 34.4-10.69 7.21-5.445 12.74-12.723 16.56-21.979.01-.015.01-.03.02-.051l1.03-3.483h50.85l-1.64 6.118c-5.82 21.7-17.53 39.258-35.06 52.487l-.14.103-.04.022c-17.34 12.78-38.78 19.123-63.98 19.319l-1.21.005c-.21 0-.53-.004-.68-.005l-1.45.009h-.03c-.4 0-.82-.006-1.16-.009l-.91.005h-.02c-20.35 0-38.67-4.463-54.82-13.501l-.03-.013-.09-.053c-15.42-8.796-27.62-21.14-36.53-36.934l-.01-.014-.01-.014-.82-1.481-.01-.013-.01-.014c-8.73-16.072-13.15-34.684-13.42-55.69v-.023l-.01-1.99v-.026c0-21.601 4.42-40.66 13.45-57.012v-.005l.82-1.481.01-.013.01-.015c8.91-15.794 21.11-28.138 36.53-36.934l.09-.053.03-.014c16.15-9.038 34.47-13.501 54.82-13.501h.02zm483.02 158.82 89.96-246.876h51.35l-115.78 306.848h-51.48L1453.37 37.93h51.77zm375.01-158.827c19.94 0 37.78 4.354 53.37 13.192 15.55 8.809 27.53 21.032 35.85 36.604l.66 1.205.01.013v.013c7.04 13.033 10.99 27.498 11.91 43.315q.21 3.607.21 7.301v1.239c-.05 6.217-.43 12.744-1.13 19.576l-.45 4.359h-156.39c.98 8.318 3.05 15.659 6.15 22.076a60 60 0 0 0 8.24 10.724c11.63 11.489 25.5 17.231 41.88 17.334 13.51-.053 24.36-3.558 32.89-10.222 6.94-5.49 12.28-12.323 16.04-20.561l1.3-2.839h50.42l-1.73 6.17c-5.75 20.496-17.3 37.279-34.51 50.223l-.01.009-.02.009-.01.011c-17.36 12.794-38.78 19.047-63.92 19.047l-.21-.001-.07-.001-.46.002h-.02c-19.96 0-38.04-4.488-54.1-13.557l-.01-.004-.01-.006-.01-.004v-.003c-15.78-9.051-28.19-21.853-37.22-38.29l-.02-.029-.08-.162c-8.77-16.289-13.23-34.896-13.5-55.694v-.026l-.01-1.968v-.025c0-21.589 4.32-40.745 13.12-57.32 8.66-16.295 20.76-28.919 36.28-37.747l.74-.418c16.08-9.071 34.4-13.544 54.82-13.545m-1.7 41.839c-14.73 0-27.09 4.424-37.36 13.179-8.74 7.62-14.31 17.908-16.51 31.206h108.22c-.65-8.377-3-15.493-6.92-21.486l-.04-.065-.01-.01c-4.73-7.419-11.19-12.981-19.49-16.726l-.02-.007-.04-.023-.05-.023-.04-.017c-8.2-3.989-17.41-6.028-27.74-6.028m372.35 176.959h-46.41l-45.08-148.561-45.08 148.561h-46.39l-68.68-218.797h49.14l42.94 156.786 46.36-156.786h46.09l45.2 156.683L2361 125.98l47.88-.002zM1309.64 210.55l73.43-84.564h61.94l-103.03 109.019 103.39 109.773h-60.74l-74.99-84.406v84.406h-48.52V37.935h48.52z`})]})}var VT=function(e){return e[e.Audience=1]=`Audience`,e[e.Category=2]=`Category`,e[e.Channel=3]=`Channel`,e[e.Chapter=4]=`Chapter`,e[e.Comment=5]=`Comment`,e[e.OwnerComment=6]=`OwnerComment`,e[e.Image=7]=`Image`,e[e.Thumbnail=8]=`Thumbnail`,e[e.Avatar=9]=`Avatar`,e[e.Banner=10]=`Banner`,e[e.Video=11]=`Video`,e[e.Trailer=12]=`Trailer`,e[e.Rating=13]=`Rating`,e[e.Topic=14]=`Topic`,e[e.Series=15]=`Series`,e[e.Season=16]=`Season`,e[e.HostedMediaObjectCollection=17]=`HostedMediaObjectCollection`,e[e.ExchangeCollection=18]=`ExchangeCollection`,e[e.CustomMediaObjectCollection=19]=`CustomMediaObjectCollection`,e[e.Playlist=20]=`Playlist`,e[e.ClickViewTvCollection=21]=`ClickViewTvCollection`,e[e.ClickViewProductionsCollection=22]=`ClickViewProductionsCollection`,e[e.User=23]=`User`,e[e.SystemUser=24]=`SystemUser`,e[e.Customer=25]=`Customer`,e[e.Country=26]=`Country`,e[e.Organisation=28]=`Organisation`,e[e.SystemOrganisation=29]=`SystemOrganisation`,e[e.Group=30]=`Group`,e[e.SystemGroup=31]=`SystemGroup`,e[e.FlagReason=32]=`FlagReason`,e[e.Library=33]=`Library`,e[e.Interactive=34]=`Interactive`,e[e.WorkspaceCollection=35]=`WorkspaceCollection`,e[e.Conversation=36]=`Conversation`,e[e.Message=37]=`Message`,e[e.Notification=38]=`Notification`,e[e.Clip=39]=`Clip`,e[e.Link=40]=`Link`,e[e.UserChannel=41]=`UserChannel`,e[e.Resource=42]=`Resource`,e[e.VideoStream=43]=`VideoStream`,e[e.AudioStream=44]=`AudioStream`,e[e.Tag=45]=`Tag`,e[e.Subtitle=46]=`Subtitle`,e[e.LicencedContentCollection=47]=`LicencedContentCollection`,e[e.PublicCollection=48]=`PublicCollection`,e[e.CategoryTree=49]=`CategoryTree`,e[e.Logo=50]=`Logo`,e[e.Permission=51]=`Permission`,e[e.Subject=52]=`Subject`,e[e.Field=53]=`Field`,e[e.Company=54]=`Company`,e[e.Person=55]=`Person`,e[e.Cover=56]=`Cover`,e[e.Poster=57]=`Poster`,e[e.SubjectAudience=58]=`SubjectAudience`,e[e.TallPoster=60]=`TallPoster`,e[e.Classroom=67]=`Classroom`,e[e.ClassroomGroup=68]=`ClassroomGroup`,e[e.UserProfile=74]=`UserProfile`,e[e.PartnerProfile=78]=`PartnerProfile`,e[e.LearningLevel=79]=`LearningLevel`,e}({}),HT={left:`_left_1r3w0_1`,leftWithImage:`_leftWithImage_1r3w0_10`,bgCover:`_bgCover_1r3w0_14`,bgFull:`_bgFull_1r3w0_17`,right:`_right_1r3w0_20`,rightContent:`_rightContent_1r3w0_28`,narrowContent:`_narrowContent_1r3w0_34`,logo:`_logo_1r3w0_37`,buttonContainer:`_buttonContainer_1r3w0_43`,blur:`_blur_1r3w0_53`,imageContainer:`_imageContainer_1r3w0_65`,imagePosition:`_imagePosition_1r3w0_73`,image:`_image_1r3w0_65`,thumbnail:`_thumbnail_1r3w0_87`,tallposter:`_tallposter_1r3w0_90`,cover:`_cover_1r3w0_96`,contentBody:`_contentBody_1r3w0_102`,contentBodyBase:`_contentBodyBase_1r3w0_106`};function UT(e){switch(e){case VT.Video:case VT.Interactive:case VT.Clip:return HT.thumbnail;case VT.Subject:case VT.Playlist:return HT.cover;case VT.Series:return HT.tallposter;default:return``}}function WT(e){return(0,Q.jsx)(`div`,{className:`d-flex`,children:e.children})}function GT(e){return(0,Q.jsx)(`div`,{className:`${HT.left} ${e.className?e.className:``}`,children:e.children})}function KT(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState(``);return Z.useEffect(()=>{if(!e.imageUrl){let t=e.fallbackImages[Math.floor(Math.random()*e.fallbackImages.length)];i(t.bgUrl);return}let t=new Image;return t.onload=()=>n(!0),t.src=e.imageUrl,()=>t.onload=null},[e.imageUrl]),(0,Q.jsx)(`div`,{className:`${HT.left} ${HT.leftWithImage} ${HT.bgCover} bg-light`,style:{backgroundImage:r?`url('${r}')`:``},children:t&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{className:HT.blur,style:{backgroundImage:`url('${e.imageUrl}')`}}),(0,Q.jsx)(`div`,{className:`${HT.imageContainer} ${UT(e.objectType)}`,children:(0,Q.jsx)(`div`,{className:HT.imagePosition,children:(0,Q.jsx)(`img`,{className:HT.image,src:e.imageUrl,alt:e.title})})})]})})}function qT(e){let[t,n]=Z.useState(``);return Z.useEffect(()=>{let t=e.images[Math.floor(Math.random()*e.images.length)];n(t.bgUrl)},[]),(0,Q.jsx)(`div`,{className:`${HT.left} bg-blue d-flex align-items-center`,children:t&&(0,Q.jsx)(`img`,{className:`img-fluid`,src:t,draggable:!1})})}var JT={cover:HT.bgCover,full:HT.bgFull};function YT(e){let t={backgroundImage:e.imageUrl?`url("${e.imageUrl}")`:``};return e.backgroundColor&&(t.backgroundColor=e.backgroundColor),(0,Q.jsx)(`div`,{className:`${HT.left} ${HT.leftWithImage} ${JT[e.imageSize||`cover`]} d-flex align-items-center`,style:t,title:e.title})}function XT(e){return(0,Q.jsx)(`div`,{className:`${HT.right} ${e.className?e.className:``}`,children:e.children})}function ZT(e){let t=e?.logoComponent||BT;return(0,Q.jsxs)(`div`,{className:`position-relative`,children:[!!e.bannerComponent&&e.bannerComponent,(0,Q.jsx)(`div`,{className:td(HT.logo,`position-absolute`,e.className?.logoContainer),children:(0,Q.jsx)(t,{})}),e.children]})}function QT(e){return(0,Q.jsx)(`div`,{className:td(HT.rightContent,`d-flex flex-column justify-content-center h-100`,e?.className),children:e.children})}var $T={base:HT.contentBodyBase,full:``};function eE(e){let t=$T[e.width||`base`];return(0,Q.jsx)(`div`,{className:td(HT.contentBody,t,`m-auto p-3`,e.className),children:e.children})}WT.NarrowContent=tE;function tE(e){return(0,Q.jsx)(`div`,{className:`${HT.narrowContent} mx-auto w-100 ${e.className?e.className:``}`,children:e.children})}function nE(e){return(0,Q.jsx)(`div`,{className:td(`position-fixed bg-white d-flex align-items-center`,HT.buttonContainer,e?.className),children:e.children})}WT.Left=GT,WT.LeftImage=KT,WT.LeftProductImage=qT,WT.LeftImageWithBackground=YT,WT.Right=XT,WT.Header=ZT,WT.Content=QT,WT.ContentBody=eE,WT.Buttons=nE;function rE(){function e(n){n.key===`Tab`&&(document.body.classList.add(`user-is-tabbing`),window.removeEventListener(`keydown`,e),window.addEventListener(`mousedown`,t))}function t(){document.body.classList.remove(`user-is-tabbing`),window.removeEventListener(`mousedown`,t),window.addEventListener(`keydown`,e)}(0,Z.useEffect)(()=>(window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)),[])}var iE={full:`_full_vw1kz_1`,themeBannerClearance:`_themeBannerClearance_vw1kz_9`};function aE(e){return e.imageType===`background`?(0,Q.jsx)(WT.LeftImageWithBackground,{imageUrl:e.imageUrl}):e.imageType===`image`?(0,Q.jsx)(WT.LeftImageWithBackground,{imageUrl:e.imageUrl,imageSize:`full`,backgroundColor:e.backgroundColor,title:e.title}):(0,Q.jsx)(Q.Fragment,{})}function oE(e){let{children:t,footer:n,bannerType:r,theme:i}=e,[a,o]=Z.useState(null);rE();let{imageUrls:s,imageType:c,backgroundColor:l,banner:u,title:d,logoComponent:f,bannerSpacer:p}=Id.getDefinition(i),m=s[e.geoLocation?.countryCode?.toLowerCase()]||s.default;Z.useEffect(()=>{o(m[Math.floor(Math.random()*m.length)])},[]);let h=c!==`none`,g=!!r,_=[`plugin`].includes(r);return(0,Q.jsxs)(WT,{children:[h&&(0,Q.jsx)(aE,{title:d,imageUrl:a,imageType:c,backgroundColor:l}),(0,Q.jsxs)(WT.Right,{className:td(!h&&iE.full),children:[(0,Q.jsx)(WT.Header,{bannerComponent:!!u&&(0,Q.jsx)(Sd,{bannerType:u}),logoComponent:f,className:{logoContainer:!!u&&iE.themeBannerClearance}}),(0,Q.jsxs)(WT.Content,{className:td(!h&&`px-0 w-100`,`pb-0`),children:[!_&&(0,Q.jsx)(Sd,{bannerType:r}),(0,Q.jsxs)(WT.ContentBody,{children:[t,!_&&g&&(0,Q.jsx)(p,{})]}),(0,Q.jsx)(RT,{...n})]})]})]})}function sE(e){let{step:t,returnUrl:n,data:r={},footer:i,geoLocation:a,theme:o,additionalData:s}=e,[c,l]=Z.useReducer(FT,{step:t,returnUrl:n,geoLocation:a,theme:o,additionalData:s,...r});function u(e){l({type:`navigate`,data:e})}let d=MT[c.step];return d||Rd({step:t,data:r},null),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(oE,{footer:{...i,...c},bannerType:c.bannerType,step:t,theme:o,geoLocation:a,children:!!d&&(0,Q.jsx)(d,{navigate:u,dispatch:l,...c})}),!1]})}function cE(e){let{id:t,returnUrl:n,footer:r,region:i,config:a,theme:o,additionalData:s}=e,c=e.currentStep||{};(0,Wu.createRoot)(document.getElementById(t)).render((0,Q.jsx)(sE,{returnUrl:n,step:c.step,data:{...a,...c.data},footer:r,geoLocation:i,theme:c.data?.theme||o,additionalData:s}))}window.cvauth={start:cE};
|
|
30
|
-
//# sourceMappingURL=index-
|
|
29
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Lt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Rt={removeEmptyKeys:function(e){var t=this;if(Array.isArray(e))return e;var n=Object.assign({},e);return Object.entries(n).filter((function(e){var t=It(e,2)[1];return!(t==null||typeof t==`string`&&!t.length||Ft(t)===`object`&&Object.keys(t).length===0)})).reduce((function(e,n){var r,i,a,o=It(n,2),s=o[0],c=o[1];return Object.assign(Object.assign({},e),(r={},i=s,a=c===Object(c)?t.removeEmptyKeys(c):c,(i=function(e){var t=function(e,t){if(Ft(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(Ft(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return Ft(t)==`symbol`?t:t+``}(i))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r))}),{})}};function zt(e){return zt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},zt(e)}function Bt(e,t,n){return(t=function(e){var t=function(e,t){if(zt(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(zt(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return zt(t)==`symbol`?t:t+``}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vt={getDefaultUserAttributes:function(e){var t;return Rt.removeEmptyKeys((Bt(t={},vt.Email,e.email),Bt(t,vt.FirstName,e?.firstName),Bt(t,vt.LastName,e?.lastName),Bt(t,vt.Phone,e?.phone),t))},getCustomUserAttributesWithoutSource:function(e){var t,n=Rt.removeEmptyKeys({province:e?.custom?.accountAddress?.province,country_code:e?.custom?.accountAddress?.countryCode}),r=(Bt(t={},yt.AccountName,e?.custom?.accountName),Bt(t,yt.AccountType,e?.custom?.accountType),Bt(t,yt.CrmId,e?.custom?.crmId),Bt(t,yt.Department,e?.custom?.department),Bt(t,yt.JobTitle,e?.custom?.jobTitle),Bt(t,yt.MasterId,e?.custom?.masterId),Bt(t,yt.OrgSubType,e?.custom?.orgSubType),Bt(t,yt.OrgType,e?.custom?.orgType),Bt(t,yt.SyncToCrm,e?.custom?.syncToCrm),t);return Fe.accountAddress(n)&&(r[yt.AccountAddress]=n),Rt.removeEmptyKeys(r)},getCustomUserAttributes:function(e){var t=Vt.getCustomUserAttributesWithoutSource(e);return Rt.removeEmptyKeys(Object.assign(Object.assign({},t),Bt({},yt.Source,function(e){if(e.custom?.source&&e.custom.source.length){var t=Object.keys(Vt.getDefaultUserAttributes(e)),n=Object.keys(Vt.getCustomUserAttributesWithoutSource(e));return{$add:[{name:e.custom.source,attributes:[].concat(t,n)}]}}Y(`No source provided for braze user.`)}(e))))},getEventUserAttributes:function(e){var t;return Rt.removeEmptyKeys((Bt(t={},bt.AccountCity,e?.event?.accountCity),Bt(t,bt.AccountCountry,e?.event?.accountCity),Bt(t,bt.AccountPostCode,e?.event?.accountPostCode),Bt(t,bt.AccountState,e?.event?.accountState),Bt(t,bt.ContactUsComment,e?.event?.contactUsComment),Bt(t,bt.Conversion,e?.event?.conversion),Bt(t,bt.HowCanWeHelp,e?.event?.howCanWeHelp),Bt(t,bt.ReasonForInterest,e?.event?.reasonForInterest),Bt(t,bt.ReferredBy,e?.event?.referredBy),Bt(t,bt.ReferredBySchool,e?.event?.referredBySchool),Bt(t,bt.ReferralSubmittedBy,e?.event?.referralSubmittedBy),Bt(t,bt.ReferralType,e?.event?.referralType),Bt(t,bt.Variant,e?.event?.variant),t))},getExtraUserAttributes:function(e){return zt(e.extra)===`object`?Rt.removeEmptyKeys(e.extra):{}},getPayload:function(e){if(!e)return{};var t=Vt.getDefaultUserAttributes(e),n=Vt.getCustomUserAttributes(e),r=Vt.getEventUserAttributes(e),i=Vt.getExtraUserAttributes(e),a=Fe.additionalData(i),o=Object.assign(Object.assign(Object.assign({},t),n),r);return a?Object.assign(Object.assign({},o),i):o},getEmailHash:function(e){var t=e.trim().toLowerCase();return Pt().hash(t)}};function Ht(e){return Ht=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ht(e)}function Ut(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,Wt(r.key),r)}}function Wt(e){var t=function(e,t){if(Ht(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(Ht(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return Ht(t)==`symbol`?t:t+``}var Gt=function(){function e(t){var n=t.apiOptions,r=t.shouldInitialize,i=r===void 0||r,a=t.allowAnonymous,o=a!==void 0&&a,s=t.subscriptions;(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.initialized=!1,this.apiOptions=n,this.subscriptions=s,this.allowAnonymous=o,i&&this.initialize()}var t,n;return t=e,(n=[{key:`initialize`,value:function(){var e=this;this.isInitialized()?function(e){var t=[...arguments].slice(1);console.warn(e,t)}(`BrazeClient has already been initialized!`):(this.apiClient=Be.getInstance(this.apiOptions),this.cardsModule=new $e({apiClient:this.apiClient}),this.bamModule=new St({apiClient:this.apiClient}),this.eventModule=new Mt({apiClient:this.apiClient,getPayload:function(){return Vt.getPayload(e.user)}}),this.initialized=!0)}},{key:`isInitialized`,value:function(){return this.initialized}},{key:`getUser`,value:function(){return this.isInitialized()?this.validateUser()?this.user:null:(ke(`BrazeClient has not been initialized.`),null)}},{key:`card`,get:function(){return this.isInitialized()?this.cardsModule:(ke(`BrazeClient has not been initialized.`),null)}},{key:`bam`,get:function(){return this.isInitialized()?this.bamModule:(ke(`BrazeClient has not been initialized.`),null)}},{key:`event`,get:function(){return this.isInitialized()?this.allowAnonymous||this.validateUser()?this.eventModule:(ke("Anon events are disabled! Please invoke `setUser` before logging events!"),null):(ke(`BrazeClient has not been initialized.`),null)}},{key:`setUser`,value:function(e){this.isInitialized()?(this.user=e,this.startSession(),this.logUserAttributes()):ke("Trying to `setUser` but the client has not been initialized")}},{key:`setUserInit`,value:function(e){this.isInitialized()||this.initialize(),this.setUser(e)}},{key:`allowAnonymousSessions`,value:function(){this.allowAnonymous=!0}},{key:`api`,value:function(){return this.isInitialized()?this.apiClient:null}},{key:`setEmailNotificationSubscriptionType`,value:function(e){return this.isInitialized()&&this.validateUser()?this.apiClient.setUserEmailNotificationSubscriptionType(e):null}},{key:`validateUser`,value:function(){return!!this.user||(ke(`No user has been set!`),!1)}},{key:`startSession`,value:function(){this.allowAnonymous||this.validateUser()?(this.enableSubscriptions(),this.user&&this.apiClient.setUser(Vt.getEmailHash(this.user.email)),this.apiClient.openSession()):ke(`No user provided and cannot start anonymous sessions!`)}},{key:`enableSubscriptions`,value:function(){var e,t;(e=this.subscriptions)!=null&&e.subscribeToInAppMessage&&typeof this.subscriptions.subscribeToInAppMessage==`function`&&this.apiClient.subscribeToInAppMessage(this.subscriptions.subscribeToInAppMessage),(t=this.subscriptions)!=null&&t.subscribeToContentCards&&typeof this.subscriptions.subscribeToContentCards==`function`&&this.apiClient.subscribeToContentCardUpdate(this.subscriptions.subscribeToContentCards)}},{key:`logUserAttributes`,value:function(){if(this.validateUser()){this.apiClient.setUserEmail(this.user.email),this.user.firstName&&this.apiClient.setUserFirstName(this.user.firstName),this.user.lastName&&this.apiClient.setUserLastName(this.user.lastName),this.user.phone&&this.apiClient.setUserPhone(this.user.phone),this.user.country&&this.apiClient.setUserCountry(this.user.country);var e=Vt.getCustomUserAttributes(this.user);this.apiClient.bulkSetCustomUserAttributes(e)}}}])&&Ut(t.prototype,n),Object.defineProperty(t,`prototype`,{writable:!1}),e}();function Kt(e){return Be.getInstance(e)}})(),a})()))}))();function ux(e){(0,Z.useEffect)(()=>{let t=dx(e?.additionalData);t?.attributionData&&nf.setAttributionData(t.attributionData),t?.utms&&hf.setUtmParameters(t.utms)},[])}function dx(e){if(!e?.attribution?.length)return null;try{let{r:t,utms:n}=JSON.parse(e.attribution);return{attributionData:nf.decodeRValue(t),utms:n}}catch(e){let t=e instanceof Error?e.message:e?.toString();console.error(t)}}var fx=function(e){return e.Lite=`lite`,e.Auth=`auth`,e}({});function px(e){return{productName:fx.Auth,prospectStatus:t=>`${e}/v1/prospects/${t}/trial-status`,createTrial:`/ajax/trials/new`,searchProspect:`${e}/v1/search/prospects`,createProspect:`/ajax/trials/prospects`,prospectLookups:t=>`${e}/v1/prospects/${t}/lookups`,joinRequest:`/ajax/trials/join-request`}}var mx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,hx=`UINT8ARRAY not supported by this environment`;function gx(e,t,n,r){let i,a,o,s=t||[0],c=(n||=0)>>>3,l=r===-1?3:0;for(i=0;i<e.length;i+=1)o=i+c,a=o>>>2,s.length<=a&&s.push(0),s[a]|=e[i]<<8*(l+o%4*r);return{value:s,binLen:8*e.length+n}}function _x(e,t,n){switch(t){case`UTF8`:case`UTF16BE`:case`UTF16LE`:break;default:throw Error(`encoding must be UTF8, UTF16BE, or UTF16LE`)}switch(e){case`HEX`:return function(e,t,r){return function(e,t,n,r){let i,a,o,s;if(e.length%2!=0)throw Error(`String of HEX type must be in byte increments`);let c=t||[0],l=(n||=0)>>>3,u=r===-1?3:0;for(i=0;i<e.length;i+=2){if(a=parseInt(e.substr(i,2),16),isNaN(a))throw Error(`String of HEX type contains invalid characters`);for(s=(i>>>1)+l,o=s>>>2;c.length<=o;)c.push(0);c[o]|=a<<8*(u+s%4*r)}return{value:c,binLen:4*e.length+n}}(e,t,r,n)};case`TEXT`:return function(e,r,i){return function(e,t,n,r,i){let a,o,s,c,l,u,d,f,p=0,m=n||[0],h=(r||=0)>>>3;if(t===`UTF8`)for(d=i===-1?3:0,s=0;s<e.length;s+=1)for(a=e.charCodeAt(s),o=[],128>a?o.push(a):2048>a?(o.push(192|a>>>6),o.push(128|63&a)):55296>a||57344<=a?o.push(224|a>>>12,128|a>>>6&63,128|63&a):(s+=1,a=65536+((1023&a)<<10|1023&e.charCodeAt(s)),o.push(240|a>>>18,128|a>>>12&63,128|a>>>6&63,128|63&a)),c=0;c<o.length;c+=1){for(u=p+h,l=u>>>2;m.length<=l;)m.push(0);m[l]|=o[c]<<8*(d+u%4*i),p+=1}else for(d=i===-1?2:0,f=t===`UTF16LE`&&i!==1||t!==`UTF16LE`&&i===1,s=0;s<e.length;s+=1){for(a=e.charCodeAt(s),!0===f&&(c=255&a,a=c<<8|a>>>8),u=p+h,l=u>>>2;m.length<=l;)m.push(0);m[l]|=a<<8*(d+u%4*i),p+=2}return{value:m,binLen:8*p+r}}(e,t,r,i,n)};case`B64`:return function(e,t,r){return function(e,t,n,r){let i,a,o,s,c,l,u,d=0,f=t||[0],p=(n||=0)>>>3,m=r===-1?3:0,h=e.indexOf(`=`);if(e.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw Error(`Invalid character in base-64 string`);if(e=e.replace(/=/g,``),h!==-1&&h<e.length)throw Error(`Invalid '=' found in base-64 string`);for(a=0;a<e.length;a+=4){for(c=e.substr(a,4),s=0,o=0;o<c.length;o+=1)i=mx.indexOf(c.charAt(o)),s|=i<<18-6*o;for(o=0;o<c.length-1;o+=1){for(u=d+p,l=u>>>2;f.length<=l;)f.push(0);f[l]|=(s>>>16-8*o&255)<<8*(m+u%4*r),d+=1}}return{value:f,binLen:8*d+n}}(e,t,r,n)};case`BYTES`:return function(e,t,r){return function(e,t,n,r){let i,a,o,s,c=t||[0],l=(n||=0)>>>3,u=r===-1?3:0;for(a=0;a<e.length;a+=1)i=e.charCodeAt(a),s=a+l,o=s>>>2,c.length<=o&&c.push(0),c[o]|=i<<8*(u+s%4*r);return{value:c,binLen:8*e.length+n}}(e,t,r,n)};case`ARRAYBUFFER`:return function(e,t,r){return function(e,t,n,r){return gx(new Uint8Array(e),t,n,r)}(e,t,r,n)};case`UINT8ARRAY`:try{new Uint8Array}catch{throw Error(hx)}return function(e,t,r){return gx(e,t,r,n)};default:throw Error(`format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY`)}}function vx(e,t,n,r){switch(e){case`HEX`:return function(e){return function(e,t,n,r){let i=`0123456789abcdef`,a,o,s=``,c=t/8,l=n===-1?3:0;for(a=0;a<c;a+=1)o=e[a>>>2]>>>8*(l+a%4*n),s+=i.charAt(o>>>4&15)+i.charAt(15&o);return r.outputUpper?s.toUpperCase():s}(e,t,n,r)};case`B64`:return function(e){return function(e,t,n,r){let i,a,o,s,c,l=``,u=t/8,d=n===-1?3:0;for(i=0;i<u;i+=3)for(s=i+1<u?e[i+1>>>2]:0,c=i+2<u?e[i+2>>>2]:0,o=(e[i>>>2]>>>8*(d+i%4*n)&255)<<16|(s>>>8*(d+n*((i+1)%4))&255)<<8|c>>>8*(d+n*((i+2)%4))&255,a=0;a<4;a+=1)l+=8*i+6*a<=t?mx.charAt(o>>>6*(3-a)&63):r.b64Pad;return l}(e,t,n,r)};case`BYTES`:return function(e){return function(e,t,n){let r,i,a=``,o=t/8,s=n===-1?3:0;for(r=0;r<o;r+=1)i=e[r>>>2]>>>8*(s+r%4*n)&255,a+=String.fromCharCode(i);return a}(e,t,n)};case`ARRAYBUFFER`:return function(e){return function(e,t,n){let r,i=t/8,a=new ArrayBuffer(i),o=new Uint8Array(a),s=n===-1?3:0;for(r=0;r<i;r+=1)o[r]=e[r>>>2]>>>8*(s+r%4*n)&255;return a}(e,t,n)};case`UINT8ARRAY`:try{new Uint8Array}catch{throw Error(hx)}return function(e){return function(e,t,n){let r,i=t/8,a=n===-1?3:0,o=new Uint8Array(i);for(r=0;r<i;r+=1)o[r]=e[r>>>2]>>>8*(a+r%4*n)&255;return o}(e,t,n)};default:throw Error(`format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY`)}}function yx(e){let t={outputUpper:!1,b64Pad:`=`,outputLen:-1},n=e||{},r=`Output length must be a multiple of 8`;if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw Error(r);t.outputLen=n.shakeLen}if(typeof t.outputUpper!=`boolean`)throw Error(`Invalid outputUpper formatting option`);if(typeof t.b64Pad!=`string`)throw Error(`Invalid b64Pad formatting option`);return t}var bx=class{constructor(e,t,n){let r=n||{};if(this.t=t,this.i=r.encoding||`UTF8`,this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw Error(`numRounds must a integer >= 1`);this.o=e,this.h=[],this.u=0,this.l=!1,this.A=0,this.p=!1,this.U=[],this.R=[]}update(e){let t,n=0,r=this.T>>>5,i=this.F(e,this.h,this.u),a=i.binLen,o=i.value,s=a>>>5;for(t=0;t<s;t+=r)n+this.T<=a&&(this.m=this.g(o.slice(t,t+r),this.m),n+=this.T);return this.A+=n,this.h=o.slice(n>>>5),this.u=a%this.T,this.l=!0,this}getHash(e,t){let n,r,i=this.B,a=yx(t);if(this.v){if(a.outputLen===-1)throw Error(`Output length must be specified in options`);i=a.outputLen}let o=vx(e,i,this.H,a);if(this.p&&this.C)return o(this.C(a));for(r=this.Y(this.h.slice(),this.u,this.A,this.I(this.m),i),n=1;n<this.numRounds;n+=1)this.v&&i%32!=0&&(r[r.length-1]&=16777215>>>24-i%32),r=this.Y(r,i,0,this.L(this.o),i);return o(r)}setHMACKey(e,t,n){if(!this.M)throw Error(`Variant does not support HMAC`);if(this.l)throw Error(`Cannot set MAC key after calling update`);let r=_x(t,(n||{}).encoding||`UTF8`,this.H);this.N(r(e))}N(e){let t=this.T>>>3,n=t/4-1,r;if(this.numRounds!==1)throw Error(`Cannot set numRounds with MAC`);if(this.p)throw Error(`MAC key already set`);for(t<e.binLen/8&&(e.value=this.Y(e.value,e.binLen,0,this.L(this.o),this.B));e.value.length<=n;)e.value.push(0);for(r=0;r<=n;r+=1)this.U[r]=909522486^e.value[r],this.R[r]=1549556828^e.value[r];this.m=this.g(this.U,this.m),this.A=this.T,this.p=!0}getHMAC(e,t){let n=yx(t);return vx(e,this.B,this.H,n)(this.S())}S(){let e;if(!this.p)throw Error(`Cannot call getHMAC without first setting MAC key`);let t=this.Y(this.h.slice(),this.u,this.A,this.I(this.m),this.B);return e=this.g(this.R,this.L(this.o)),e=this.Y(t,this.B,this.T,e,this.B),e}};function xx(e,t){return e<<t|e>>>32-t}function Sx(e,t,n){return e^t^n}function Cx(e,t,n){return e&t^e&n^t&n}function wx(e,t){let n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function Tx(e,t,n,r,i){let a=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(a>>>16))<<16|65535&a}function Ex(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function Dx(e,t){let n,r,i,a,o,s,c,l=[];for(n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],c=0;c<80;c+=1)l[c]=c<16?e[c]:xx(l[c-3]^l[c-8]^l[c-14]^l[c-16],1),s=c<20?Tx(xx(n,5),(u=r)&i^~u&a,o,1518500249,l[c]):c<40?Tx(xx(n,5),Sx(r,i,a),o,1859775393,l[c]):c<60?Tx(xx(n,5),Cx(r,i,a),o,2400959708,l[c]):Tx(xx(n,5),Sx(r,i,a),o,3395469782,l[c]),o=a,a=i,i=xx(r,30),r=n,n=s;var u;return t[0]=wx(n,t[0]),t[1]=wx(r,t[1]),t[2]=wx(i,t[2]),t[3]=wx(a,t[3]),t[4]=wx(o,t[4]),t}function Ox(e,t,n,r){let i,a=15+(t+65>>>9<<4),o=t+n;for(;e.length<=a;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[a]=4294967295&o,e[a-1]=o/4294967296|0,i=0;i<e.length;i+=16)r=Dx(e.slice(i,i+16),r);return r}var kx=class extends bx{constructor(e,t,n){if(e!==`SHA-1`)throw Error(`Chosen SHA variant is not supported`);super(e,t,n);let r=n||{};this.M=!0,this.C=this.S,this.H=-1,this.F=_x(this.t,this.i,this.H),this.g=Dx,this.I=function(e){return e.slice()},this.L=Ex,this.Y=Ox,this.m=[1732584193,4023233417,2562383102,271733878,3285377520],this.T=512,this.B=160,this.v=!1,r.hmacKey&&this.N(function(e,t,n,r){let i=e+` must include a value and format`;if(!t){if(!r)throw Error(i);return r}if(t.value===void 0||!t.format)throw Error(i);return _x(t.format,t.encoding||`UTF8`,n)(t.value)}(`hmacKey`,r.hmacKey,this.H))}},Ax=function(e){return e.CvApSoutheast1=`cv-ap-southeast-1`,e.CvApSoutheast2=`cv-ap-southeast-2`,e.CvEuWest1=`cv-eu-west-1`,e.CvNaWest1=`cv-na-west-1`,e}({}),jx={CvApSoutheast1:{systemName:Ax.CvApSoutheast1},CvApSoutheast2:{systemName:Ax.CvApSoutheast2},CvEuWest1:{systemName:Ax.CvEuWest1},CvNaWest1:{systemName:Ax.CvNaWest1}},Mx=function(e){return e.Staff=`Staff`,e.Learner=`Learner`,e.Unknown=`Unknown`,e.System=`System`,e}({}),Nx=3,Px=5e3,Fx=6,Ix={},Lx=class{constructor(e){this.key=e.toString()}getCount(){return Ix[this.key]||0}increment(){Ix[this.key]=this.getCount()+1}reset(){delete Ix[this.key]}shouldBreak(){return this.getCount()>=Fx}},Rx=class{constructor(){this.attempt=0}async wait(){await new Promise(e=>setTimeout(e,Px*2**this.attempt)),this.attempt++}};async function zx(e,t){let n=new Rx,r=new Lx(e);async function i(){let n=await fetch(e,t);if(n.status>=500&&!r.shouldBreak())throw Error(`Server error: ${n.status}`);return n.ok&&r.reset(),n}for(let e=1;e<=Nx;e++)try{return await i()}catch(t){if(e>=Nx||r.shouldBreak())throw t;r.increment(),await n.wait()}}var Bx,Vx=new Uint8Array(16);function Hx(){if(!Bx&&(Bx=typeof crypto<`u`&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<`u`&&typeof msCrypto.getRandomValues==`function`&&msCrypto.getRandomValues.bind(msCrypto),!Bx))throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);return Bx(Vx)}var Ux=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Wx(e){return typeof e==`string`&&Ux.test(e)}for(var Gx=[],Kx=0;Kx<256;++Kx)Gx.push((Kx+256).toString(16).substr(1));function qx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Gx[e[t+0]]+Gx[e[t+1]]+Gx[e[t+2]]+Gx[e[t+3]]+`-`+Gx[e[t+4]]+Gx[e[t+5]]+`-`+Gx[e[t+6]]+Gx[e[t+7]]+`-`+Gx[e[t+8]]+Gx[e[t+9]]+`-`+Gx[e[t+10]]+Gx[e[t+11]]+Gx[e[t+12]]+Gx[e[t+13]]+Gx[e[t+14]]+Gx[e[t+15]]).toLowerCase();if(!Wx(n))throw TypeError(`Stringified UUID is invalid`);return n}function Jx(e,t,n){e||={};var r=e.random||(e.rng||Hx)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n||=0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return qx(r)}function Yx(e){if(!Wx(e))throw TypeError(`Invalid UUID`);return parseInt(e.substr(14,1),16)}var Xx=`cv:session:`,Zx=`cv:window:v2:`,Qx=1e3*60*30,$x=4;function eS(e){if(e===Vd.LocalStorage)return Kd.isAvailable()?Kd:Jd;if(e===Vd.SessionStorage)return qd.isAvailable()?qd:Jd}function tS(e){return new Date().getTime()+e}function nS(){return Jx()}function rS(e,t){return e+(t||`0`)}function iS(e){return new Date().getTime()>e}function aS(e){return!(typeof e!=`object`||typeof e?.id!=`string`||!Wx(e.id)||Yx(e.id)!==$x||typeof e?.ttl!=`number`||e?.ttl<=0||isNaN(e?.ttl))}function oS(e,t,n){let r=eS(n),i=rS(e,t),a=r.get(i);return!aS(a)||iS(a?.ttl)?null:a}function sS(e,t,n,r){let i=eS(n),a=rS(e,t),o={id:nS(),ttl:tS(r)};return i.set(a,o),o}function cS(e,t,n,r,i){let a=eS(n),o=rS(e,t);a.set(o,{id:r.id,ttl:tS(i)})}function lS(e,t,n){let r=eS(n);if(!r?.isAvailable())return;let i=rS(e,t);r.remove(i)}var uS=null,dS={getClientSessionData(e){let t=oS(Xx,e,Vd.LocalStorage);t?cS(Xx,e,Vd.LocalStorage,t,Qx):t=sS(Xx,e,Vd.LocalStorage,Qx);let n=oS(Zx,e,Vd.SessionStorage);return n?uS===null&&cS(Zx,e,Vd.SessionStorage,n,Qx):n=sS(Zx,e,Vd.SessionStorage,uS??Qx),{id:t.id,windowId:n.id}},resetClientSession(e){lS(Xx,e,Vd.LocalStorage),lS(Zx,e,Vd.SessionStorage)},lockWindowSession(e,t){uS=t;let n=oS(Zx,e,Vd.SessionStorage);n&&cS(Zx,e,Vd.SessionStorage,n,t)},unlockWindowSession(e){uS=null;let t=oS(Zx,e,Vd.SessionStorage);t&&cS(Zx,e,Vd.SessionStorage,t,Qx)}},fS={isObject(e){let t=typeof e;return t===`function`||t===`object`&&!!e},isFunction(e){return typeof e==`function`}},pS={safeUrlConcat(e,t){if(!e)return;let n=e;return e.endsWith(`/`)||(n+=`/`),t&&(n+=t.startsWith(`/`)?t.slice(1):t),n}},mS={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i},hS=`Unknown`;function gS(e,t,n){let[r]=t.exec(n)||[];return r||=hS,{name:e,version:r}}function _S(e,t,n){if(!t)return{name:e,version:hS};let r=t.exec(n);return{name:e,version:r&&r.length?r[0].trim():hS}}function vS(e,t){let n={name:e,version:null};return mS.win2000.test(t)&&(n.version=`2000`),mS.winXP.test(t)&&(n.version=`XP`),mS.winVista.test(t)&&(n.version=`Vista`),mS.win7.test(t)&&(n.version=`7`),mS.win8.test(t)&&(n.version=`8`),mS.win81.test(t)&&(n.version=`8.1`),mS.win10.test(t)&&(n.version=`10`),n.version||=hS,n}var yS={getDeviceType(){let e=window.navigator.userAgent;return mS.mobileDevice.test(e)?mS.iphone.test(e)?`iPhone`:mS.ipad.test(e)?`iPad`:mS.android.test(e)?`Android`:mS.blackberry.test(e)?`Blackberry`:mS.windowsPhone.test(e)?`Windows Phone`:hS:`Desktop`},getOperatingSystem(){let e=window.navigator.userAgent;return mS.android.test(e)?_S(`Android`,mS.androidVersion,e):mS.iphone.test(e)||mS.ipad.test(e)?_S(`iOS`,mS.iosVersion,e):mS.linux.test(e)?_S(`Linux`,null,e):mS.unix.test(e)?_S(`Unix`,null,e):mS.mac.test(e)?_S(`Macintosh`,mS.osxVersion,e):mS.windows.test(e)?vS(`Windows`,e):mS.blackberry.test(e)?_S(`BlackBerry`,mS.blackberryVersion,e):mS.windowsPhone.test(e)?_S(`Windows Phone`,mS.windowsPhoneVersion,e):{name:hS,version:hS}},getBrowser(){let e=window.navigator.userAgent;return mS.chrome.test(e)?gS(`Chrome`,mS.generalVersion,e):mS.firefox.test(e)?gS(`Firefox`,mS.generalVersion,e):mS.safari.test(e)?gS(`Safari`,mS.generalVersion,e):mS.ie.test(e)?gS(`Internet Explorer`,mS.ieVersion,e):mS.edge.test(e)?gS(`Edge`,mS.edgeVersion,e):mS.opera.test(e)?gS(`Opera`,mS.operaVersion,e):{name:hS,version:hS}},isTouchScreen(){return!!(`ontouchstart`in window||navigator.maxTouchPoints)}},bS={name:`@clickview/analytics`,version:`2.3.0`,description:`Analytics`,main:`dist/app.js`,types:`dist/analytics/src/app.d.ts`,type:`module`,private:!0,repository:{type:`git`,url:`https://gitlab.cvinternal.net/front-end/clickview`},scripts:{start:`npm run build`,"type-check":`tsc --noEmit`,build:`npm run type-check && node ../../../node_modules/vite/bin/vite.js build`,prebuild:`npm run clean`,clean:`npx rimraf dist`},author:``,license:`ISC`,devDependencies:{"@types/uuid":`8.3.4`,"tsc-alias":`1.8.16`},dependencies:{jssha:`3.3.1`,uuid:`8.3.2`}},xS=`zXJL9nOHxzDlMUDjiP41`,SS=`unknown`,CS=class{constructor(e){this.options=e,this.initialize()}initialize(){this.validateOptions(),this.options.logUtmParameters&&(this.utmParameters=hf.getUtmParameters()),this.options.logAttributionData&&(this.attributionData=nf.getDecodedAttributionData())}get name(){return`CollectionApiClient`}async log(e){if(Array.isArray(e))return this.logBulk(e);this.shouldLog(e)&&(this.validateEvent(e),await this.postData(await this.formatData(e)))}async logBulk(e){let t=e.filter(e=>this.shouldLog(e));if(!t.length)return;t.forEach(e=>this.validateEvent(e));let n=await Promise.all(t.map(e=>this.formatData(e)));await this.postData(n)}validateOptions(){if(!fS.isFunction(this.options.getUser))throw Error(`getUser option is required.`)}shouldLog(e){return fS.isFunction(this.options.shouldLog)?this.options.shouldLog(e):!0}async postData(e){let t=await this.getRegionalUrl(this.options.collectionApiUrls),n=JSON.stringify(e),r={"Content-Type":`application/json`,...this.getSignatureHeader(n)},i=pS.safeUrlConcat(t,`/v1/ingest`);Array.isArray(e)&&(i=pS.safeUrlConcat(i,`/bulk`));try{let e=await zx(i,{method:`POST`,mode:`cors`,headers:r,body:n});e.ok||this.logError(Error(`CollectionApiClient failed to log event. Status: ${e.status} ${e.statusText}`),!1,this.getResponseAsObject(e))}catch(e){this.logError(e)}}getResponseAsObject(e){return{headers:e.headers,ok:e.ok,redirected:e.redirected,status:e.status,statusText:e.statusText,type:e.type,url:e.url,body:e.text()}}getSignatureHeader(e){let t=new kx(`SHA-1`,`TEXT`,{hmacKey:{value:xS,format:`TEXT`,encoding:`UTF8`}});return t.update(e),{"cv-analytics-signature":`${this.options.collectionApiClientId}.${t.getHash(`B64`)}`}}async getRegionalUrl(e){switch((await this.getRegion()).systemName){case Ax.CvEuWest1:return e.cvEuWest1;case Ax.CvApSoutheast2:return e.cvApSoutheast2;case Ax.CvNaWest1:return e.cvNaWest1;case Ax.CvApSoutheast1:default:return e.cvApSoutheast1}}validateEvent(e){typeof e.type!=`string`&&this.logError(Error(`Event type is required.`),!0),fS.isObject(e.actionContext)||this.logError(Error(`Event actionContext is required.`),!0),e.actionContext.entity||this.logError(Error(`Event actionContext entity is required.`),!0)}async formatData(e){return{type:e.type,data:await this.getEventData(e),metadata:this.getEventMetadata(e)}}async getEventData(e){let t=e.actionContext,n=this.getPlatformMetadata(),r=await this.getUserData(),i=await this.getSessionData(),a={name:this.options.productName,version:this.options.productVersion};this.options.productVariant&&(a.variant=this.options.productVariant);let o={user:r,action:t,platform:n,product:a,session:i};this.utmParameters&&(o.utm=this.utmParameters);let s=this.extractData(e),c=Object.keys(o).map(e=>e.toLowerCase()),l=Object.keys(s).map(e=>e.toLowerCase());return c.forEach(e=>{l.includes(e)&&this.logError(Error(`${e} is a reserved key.`),!0)}),{...o,...s}}extractData(e){return fS.isFunction(this.options.formatData)?this.options.formatData(e):{[e.actionContext.entity]:e.data}}async getUserData(){let e;try{e=await this.options.getProfileId?.()}catch(e){this.logError(e)}try{let t=await this.options.getUser();return t?.id?{id:t.id,role:t.role?.toLowerCase()||SS,userGroup:(t.userGroup??Mx.Unknown).toLowerCase(),yearGroup:this.normalizeYearGroup(t.yearGroup),profileId:e,customer:{id:t.customerId,name:t.customerName,customerGuid:t.customerGuid,crmId:t.crmId,country:t.countryCode,region:await this.getRegion(),openCustomer:!1,accessPolicy:t.accessPolicy}}:e?{profileId:e}:void 0}catch(e){this.logError(e)}}async getRegion(){let e=this.options.regionName;try{let t=await this.options.getUser();t?.instanceRegion&&(e=t.instanceRegion)}catch(e){this.logError(e)}return e||this.logError(Error(`RegionName is not set.`),!0),this.getRegionByName(e.toLowerCase())}async getSessionData(){try{let e=await this.options.getUser();return{...dS.getClientSessionData(e?.id),authSessionId:e?.sessionId}}catch(e){return console.error(e),dS.getClientSessionData(null)}}getPlatformMetadata(){let e={url:window.location.href,referrer:document.referrer};return this.attributionData?.internalReferrer&&(e.internalReferrer=this.attributionData.internalReferrer),this.attributionData?.originalReferrer&&(e.originalReferrer=this.attributionData.originalReferrer),{browser:yS.getBrowser(),os:yS.getOperatingSystem(),request:e,screenResolution:`${window.screen.width}x${window.screen.height}`,viewportResolution:`${window.innerWidth}x${window.innerHeight}`}}getEventMetadata(e){return{client:{name:`${this.name}.ts`,version:bS.version,region:this.getRegionByName(this.options.regionName)},timestamp:new Date().toISOString(),eventVersion:e.eventVersion}}getRegionByName(e){let t;return Object.values(jx).forEach(n=>{n.systemName===e&&(t=n)}),t}normalizeYearGroup(e){return e?e.toLowerCase().split(` `).join(`_`):SS}logError(e,t,...n){if(this.options.logError&&this.options.logError(e,...n),t)throw e}},wS=function(e){return e.Stream=`cv_product_stream`,e.WebPlayerStream=`cv_product_webplayer_stream`,e.StreamProgress=`cv_product_stream_progress`,e.PreviewStreamProgress=`cv_product_preview_stream_progress`,e.StreamBuffering=`cv_product_stream_buffering`,e.Login=`cv_product_login`,e.LoginSsoRedirect=`cv_product_login_sso_redirect`,e.LoginFailed=`cv_product_login_failed`,e.Search=`cv_product_search`,e.InstantSearch=`cv_product_instant_search`,e.SearchEmptyResult=`cv_product_search_empty_result`,e.Filter=`cv_product_search_filter`,e.SearchLanding=`cv_product_search_landing`,e.Share=`cv_product_share`,e.Unshare=`cv_product_unshare`,e.WorkspaceAdd=`cv_product_tv_add`,e.Rename=`cv_product_rename`,e.Move=`cv_product_move`,e.Sort=`cv_product_sort`,e.Create=`cv_product_create`,e.Delete=`cv_product_delete`,e.Associate=`cv_product_associate`,e.Dissociate=`cv_product_dissociate`,e.Edit=`cv_product_edit`,e.Approve=`cv_product_approve`,e.Reject=`cv_product_reject`,e.Disable=`cv_product_disable`,e.Upload=`cv_product_upload`,e.Download=`cv_product_download`,e.Navigate=`cv_product_navigate`,e.Click=`cv_product_click`,e.Suggest=`cv_product_suggest`,e.EditAssoc=`cv_product_edit_assoc`,e.Play=`cv_product_play`,e.Favourite=`cv_product_favourite`,e.Follow=`cv_product_follow`,e.Prefer=`cv_product_prefer`,e.Print=`cv_product_print`,e.Copy=`cv_product_copy`,e.Activate=`cv_product_activate`,e.VerifyEmail=`cv_product_verify_email`,e.ChangePassword=`cv_product_change_password`,e.ManageGroup=`cv_product_manage_group`,e.Export=`cv_product_export`,e.SendEmail=`cv_product_send_email`,e.Publish=`cv_product_publish`,e.Submit=`cv_product_submit`,e.Complete=`cv_product_complete`,e.Archive=`cv_product_archive`,e.Promote=`cv_product_promote`,e.Demote=`cv_product_demote`,e.BulkAction=`cv_product_bulk_action`,e.Remove=`cv_product_remove`,e.Dismiss=`cv_product_dismiss`,e.Open=`cv_product_open`,e.Hide=`cv_product_hide`,e.PageView=`cv_product_page_view`,e.Select=`cv_product_select`,e.SwitchCustomer=`cv_product_switch_customer`,e.Focus=`cv_product_focus`,e.Blur=`cv_product_blur`,e.Hover=`cv_product_hover`,e.Unhover=`cv_product_unhover`,e.SetAccess=`cv_product_set_access`,e.AddToLocalCache=`cv_product_add_to_lc`,e.ResolveWarning=`cv_product_resolve_warning`,e.DismissWarning=`cv_product_dismiss_warning`,e}({}),TS=function(e){return e.Folder=`folder`,e.Video=`video`,e.Rating=`rating`,e.Series=`series`,e.Library=`library`,e.Resource=`resource`,e.Tag=`tag`,e.Subtitle=`subtitle`,e.Chapter=`chapter`,e.Resolution=`resolution`,e.PlaybackSpeed=`playback_speed`,e.Device=`device`,e.Restriction=`restriction`,e.Interactive=`interactive`,e.Interaction=`interaction`,e.PDF=`pdf`,e.CustomerSetting=`customer_setting`,e.UserSetting=`user_setting`,e.LibraryRequest=`staff_request`,e.Logo=`logo`,e.Pagination=`pagination`,e.Thumbnail=`thumbnail`,e.Banner=`banner`,e.Link=`link`,e.Playlist=`playlist`,e.Playlists=`playlists`,e.Person=`person`,e.Company=`company`,e.Classroom=`classroom`,e.ClassroomGroup=`classroom_group`,e.Classification=`classification`,e.ShareLink=`share_link`,e.DirectShare=`direct_share`,e.Upload=`upload`,e.SearchResults=`search_results`,e.SearchSuggestion=`search_suggestion`,e.Audience=`audience`,e.User=`user`,e.Clip=`clip`,e.UserChannel=`user_channel`,e.Widget=`widget`,e.Url=`url`,e.SocialShare=`social_share`,e.Presentation=`presentation`,e.BatchJob=`batch_job`,e.DeepLink=`deep_link`,e.Feedback=`feedback`,e.AppLink=`app_link`,e.SignUp=`sign_up`,e.FileGeneratorJob=`file_generator_job`,e.ExportLibraries=`export_libraries`,e.Product=`product`,e.Customer=`customer`,e.SpecialEvent=`special_event`,e.Region=`region`,e.ProductTip=`product_tip`,e.Livestream=`livestream`,e.DevicesCta=`devices_cta`,e.Integration=`integration`,e.Faq=`faq`,e.MixedMedia=`mixed_media`,e.TableOfContents=`table_of_contents`,e.Author=`author`,e.Glance=`glance`,e.Filter=`filter`,e.NotificationSetting=`notification_setting`,e.Transcript=`transcript`,e.CurriculumCode=`curriculum_code`,e.Assign=`assign`,e.PartnerProfile=`partner_profile`,e.Upsell=`upsell`,e}({}),ES=function(e){return e.TopNav=`top_nav`,e.LeftNav=`left_nav`,e.Footer=`footer`,e.Popup=`popup`,e.Banner=`banner`,e.VideoList=`video_list`,e.VideoListItem=`video_list_item`,e.VideoListHeader=`video_header`,e.VideoThumbnail=`video_thumbnail`,e.ExpandableVideoThumbnail=`expandable_video_thumbnail`,e.VideoItemPreview=`video_item_preview`,e.InteractiveItemPreview=`interactive_item_preview`,e.ClipItemPreview=`clip_item_preview`,e.VideoDetails=`video_details`,e.InteractiveDetails=`interactive_details`,e.ClipDetails=`clip_details`,e.VideoDetailsHeader=`video_details_header`,e.EditVideoDetails=`edit_video_details`,e.EditInteractiveVideoDetails=`edit_interactive_video_details`,e.EditClipDetails=`edit_clip_details`,e.EditVideoChapters=`edit_video_chapters`,e.EditVideoResources=`edit_video_resources`,e.PreviewVideoResources=`preview_video_resources`,e.VideoUpload=`video_upload`,e.VideoRequest=`video_request`,e.Pagination=`pagination`,e.LibraryHeader=`library_header`,e.LibraryTiles=`library_tiles`,e.LibraryRequestDetails=`staff_request_details`,e.Libraries=`libraries`,e.SubFolderList=`sub_folder_list`,e.AwaitingReviewVideoListHeader=`awaiting_review_video_list_header`,e.AwaitingReviewVideoItem=`awaiting_review_video_item`,e.PastReleasesHeader=`past_releases_header`,e.MigrationWarnings=`migration_warnings`,e.PlaylistListHeader=`playlist_list_header`,e.PlaylistListItem=`playlist_list_item`,e.SeriesListItem=`series_list_item`,e.SeriesWithVideos=`series_with_videos`,e.PlaylistWithVideos=`playlist_with_videos`,e.Dropdown=`dropdown`,e.ViewCurriculumLinks=`view_curriculum_links`,e.SearchBar=`search_bar`,e.InstantSearch=`instant_search`,e.SearchFilters=`search_filters`,e.FeaturedSeriesSearchResult=`featured_series_search_result`,e.ExchangeSearchGroupItem=`exchange_search_group_item`,e.StaffManager=`staff_manager`,e.StaffManagerListItem=`staff_manager_list_item`,e.StudentManager=`student_manager`,e.ViewStudentVideos=`view_student_videos`,e.StudentManagerListItem=`student_manager_list_item`,e.EditUser=`edit_user`,e.UserAuditLog=`user_audit_log`,e.BulkUserActionsWizard=`bulk_user_actions_wizard`,e.BulkUserUploadWizard=`bulk_user_upload_wizard`,e.Classroom=`classroom`,e.ClassroomsList=`classrooms_list`,e.ClassroomsListItem=`classrooms_list_item`,e.ManageClassroomStudents=`manage_classroom_students`,e.ManageClassroomStudentListItem=`manage_classroom_student_list_item`,e.ManageClassroomGroups=`manage_classroom_groups`,e.ManageClassroomGroupListItem=`manage_classroom_group_list_item`,e.ManageClassroomTeachers=`manage_classroom_teachers`,e.ManageClassroomTeacherListItem=`manage_classroom_teachers_list_item`,e.ArchivedClassrooms=`archived_classrooms`,e.PreviewInteractive=`preview_interactive`,e.PreviewSharedInteractive=`preview_shared_interactive`,e.PreviewInteractiveQuestions=`preview_interactive_questions`,e.EditInteractive=`edit_interactive`,e.EditInteractiveDetails=`edit_interactive_details`,e.PlaySharedInteractive=`play_shared_interactive`,e.PlayInteractive=`play_interactive`,e.InteractiveListItem=`interactive_list_item`,e.DeleteInteractive=`delete_interactive`,e.NewInteractive=`new_interactive`,e.CopyInteractive=`copy_interactive`,e.UnpublishInteractive=`unpublish_interactive`,e.ShareInteractive=`share_interactive`,e.PlayPage=`play_page`,e.Player=`player`,e.FloatingPlayer=`floating_player`,e.InteractivePlayer=`interactive_player`,e.EmbeddedPlayer=`embedded_player`,e.CreateClipPlayer=`create_clip_player`,e.PlayClip=`play_clip`,e.PlaySharedClip=`play_shared_clip`,e.ClipListItem=`clip_list_item`,e.ContentUpdatesBanner=`content_updates_banner`,e.ContentUpdatesClassificationBanner=`content_updates_classification_banner`,e.PreferencesSettings=`preferences_settings`,e.NotificationSettings=`notification_settings`,e.TopicsOnboarding=`topics_onboarding`,e.MyUploads=`my_uploads`,e.MyVideos=`my_videos`,e.Playlists=`playlists`,e.SlidingList=`sliding_list`,e.HeroBannerItem=`hero_banner_item`,e.SlidingListItem=`sliding_list_item`,e.ClassificationListItem=`classification_list_item`,e.ClassificationComingSoon=`classification_coming_soon`,e.ClassificationHero=`classification_hero`,e.ClassificationFooter=`classification_footer`,e.Classification=`classification`,e.PresentationClassifications=`presentation_classifications`,e.Dashboard=`dashboard`,e.TeachingLevelBanner=`teaching_level_banner`,e.UpsellBanner=`upsell_banner`,e.FreemiumBanner=`freemium_banner`,e.DiscoverFooter=`discover_footer`,e.ProductBanner=`product_banner`,e.UserOptions=`user_options`,e.MagicTabs=`magic_tabs`,e.Settings=`settings`,e.StudentFeed=`student_feed`,e.MyShares=`my_shares`,e.SharedByMe=`shared_by_me`,e.SharedWithMe=`shared_with_me`,e.Insights=`insights`,e.Error=`error_view`,e.UpgradeForm=`upgrade_form`,e.ClassroomGuide=`classroom_guide`,e.TeachingResources=`teaching_resources`,e.ResourcesGuidancePopup=`resources_guidance_popup`,e.InteractivesGuidancePopup=`interactives_guidance_popup`,e.CurriculumGuidancePopup=`curriculum_guidance_popup`,e.TopVideos=`top_videos`,e.VideoViewsList=`video_views_list`,e.VideoOverview=`video_overview`,e.StudentReachPopup=`student_reach_popup`,e.VideoHighlight=`video_highlight`,e.ClassroomViewsPopup=`classroom_views_popup`,e.GiveFeedbackPopup=`give_feedback_popup`,e.LibraryRequestSettings=`library_request_settings`,e.LibraryRequestAutoApprovalSettings=`auto_approval_settings`,e.OpenInAppPrompt=`open_in_app_prompt`,e.UseAppButton=`use_app_button`,e.Launchpad=`launchpad`,e.EditableSubjectPreferencesWidget=`editable_subject_preferences_widget`,e.ThumbnailHeroMediaWidget=`thumbnail_hero_media_widget`,e.ThumbnailFixedListMediaLargeWidget=`thumbnail_fixed_list_media_large`,e.FilterSlidingPillListSmallWidget=`filter_sliding_pill_list_small`,e.CircleLogoSlidingListWidget=`circle_logo_sliding_list_widget`,e.RectangularLogoSlidingListWidget=`rectangular_logo_sliding_list_widget`,e.HeroBannerSmallWidget=`hero_banner_small`,e.EventIconSlidingListWidget=`event_icon_sliding_list_widget`,e.FaqQuestionWidget=`faq_question_widget`,e.FaqQuestionAccordionWidget=`faq_question_accordion_widget`,e.SubjectStatsWidgetItem=`subject_stats_widget_item`,e.AuthorReviewerWidget=`author_reviewer_widget`,e.ThumbnailFixedListMediaSmallWidget=`thumbnail_fixed_list_media_small_widget`,e.ThumbnailFixedListFolderSmallWidget=`thumbnail_fixed_list_folder_small_widget`,e.ThumbnailVerticalListWidget=`thumbnail_vertical_list_widget`,e.ThumbnailFixedListSmallWidget=`thumbnail_fixed_list_small_widget`,e.PosterFixedListLargeWidget=`poster_fixed_list_large_widget`,e.CurriculumResourcesAccordionWidget=`curriculum_resources_accordion_widget`,e.SearchCurriculumCodeWidget=`search_curriculum_code_widget`,e.ExchangeLinksWidget=`exchange_links_widget`,e.TableOfContents=`table_of_contents`,e.SignUpPopup=`sign_up_popup`,e.SignUpPage=`sign_up_page`,e.TrialBanner=`trial_banner`,e.InviteColleaguePopup=`invite_colleague_popup`,e.AuthProspectSelect=`auth_prospect_select`,e.GatedBanner=`gated_banner`,e.GatedEmptyState=`gated_empty_state`,e.GatedPopup=`gated_popup`,e.WelcomePopup=`welcome_popup`,e.WatchHistoryLanding=`watch_history_landing`,e.MyFavouritesLanding=`my_favourites_landing`,e.MyVideoLanding=`my_videos_landing`,e.PlaylistsLanding=`playlists_landing`,e.MySharesLanding=`myshares_landing`,e.PremiumFeatures=`premium_features`,e.NotificationsDropdown=`notifications_dropdown`,e.CalendarNav=`calendar_nav`,e.CalendarDay=`calendar_day`,e.CalendarPopup=`calendar_popup`,e.RegionMap=`region_map`,e.OnboardingSelectRoleScreen=`onboarding_select_role_screen`,e.OnboardingSchoolLevelScreen=`onboarding_school_level_screen`,e.OnboardingAudiencePreferencesScreen=`onboarding_audience_preferences_screen`,e.OnboardingSelectCurriculumScreen=`onboarding_select_curriculum_screen`,e.OnboardingSubjectsScreen=`onboarding_subjects_screen`,e.ProductTips=`product_tips`,e.LivestreamBookingForm=`booking_form`,e.DateRangeFilter=`date_range_selector`,e.AudienceFilter=`audience_filter`,e.AssignFlowView=`assign_flow_view`,e.ContentPartnerDashboard=`content_partner_dashboard`,e.ContentPartnerDashboardVideoBanner=`content_partner_dashboard_video_banner`,e.UpsellRequestForm=`upsell_request_form`,e.UpsellProductInfo=`upsell_product_info`,e.Global=`global`,e}({}),DS=function(e){return e.Start=`start`,e.Complete=`complete`,e.Save=`save`,e.Discard=`discard`,e.Next=`next`,e.Back=`back`,e}({}),OS=function(e){return e.SignIn=`sign_in`,e.SignUp=`sign_up`,e.SignOut=`sign_out`,e.SwitchAccount=`switch_account`,e.TopNavButton=`top_nav_button`,e.Educator=`educator`,e.Student=`student`,e.TermsAndConditions=`terms_and_conditions`,e.PrivacyPolicy=`privacy_policy`,e.EnterEmail=`enter_email`,e.ClosePopup=`close_popup`,e.Back=`back`,e.UseMyLocation=`use_my_location`,e.TrialCreated=`trial_created`,e.TrialRequested=`trial_requested`,e.DeadEnd=`dead_end`,e.CantFindSchool=`cant_find_school`,e.ResendEmail=`resend_email`,e.ContactUs=`contact_us`,e.InviteColleague=`invite_colleague`,e.PremiumFeatures=`premium_features`,e.Upgrade=`upgrade`,e.FindSchool=`find_school`,e.AddToBraze=`add_to_braze`,e.RequestAccess=`request_access`,e.AutoJoin=`auto_join`,e.WrongEmail=`wrong_email`,e.RequestBdmTrial=`request_bdm_trial`,e.SkipIdpSelect=`skip_idp_select`,e}({}),kS=function(e){return e[e.V1=1]=`V1`,e[e.V2=2]=`V2`,e[e.V3=3]=`V3`,e[e.V4=4]=`V4`,e[e.V5=5]=`V5`,e}({}),AS={first(e){return Ay(e)},firstFew(e,t){return Ay(e,t)},last(e){return My(e)},lastFew(e,t){return My(e,t)},max(e,t){return py(e,t)},cloneAndReplaceAtIdx(e,t,n,r=null){let i=e&&e.length?e.slice():[];return t+1>i.length&&(i=[...i,...Array(t+1-i.length).fill(r)]),i.splice(t,1,n),i},moveItem(e,t,n){let r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r},isEmpty(e){return e&&!e.length},findIndex(e,t){return Kv(e,t)},findWhere(e,t){return $v(e,t)},where(e,t){return fy(e,t)},groupBy(e,t){return xy(e,t)},countBy(e,t){return Cy(e,t)},flatten(e,t){return Py(e,t)},flatMap(e,t){return Py(e.map(t),!0)},intersection(...e){return zy(...e)},addOrRemove(e,t){let n=e.indexOf(t);return n===-1?e.push(t):e.splice(n,1),e},addOrRemoveImmutable(e,t){let n=e.indexOf(t),r=Yy.deepClone(e);return n===-1?[...r,t]:[...r.slice(0,n),...r.slice(n+1)]},sortBy(e,t){return yy(e,t)},chunk(e,t){return Wy(e,t)},uniq(e,t){return Ly(e,t)},toObject(e,t){return e.reduce((e,n)=>Object.assign(e,Yy.isObject(n)?{[n[t]]:n}:{[t]:n}),{})},findIndexById(e,t){return e.findIndex(e=>e.id===t.id)},removeItem(e,t){let n=this.findIndex(e,t);return n===-1?e:this.removeItemFromIndex(e,n)},removeItemFromIndex(e,t){return[...e.slice(0,t),...e.slice(t+1)]},findMatchedIdIndex(e,t){return e.findIndex(e=>e.id?.toString()===t.toString())},shuffle(e){return vy(e)},findLast(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]},findLastIndex(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}},jS=`OTHER`;function MS(e,t){return t.includes(e)?e:e?jS:``}function NS(e){let{error:t,onChange:n,countryCode:r,isTertiary:i}=e,a=Up({countryCode:r,isTertiary:i}),o=MS(e.initialValue,a),[s,c]=Z.useState(o),[l,u]=Z.useState(o===jS?e.initialValue:``);Z.useEffect(()=>{c(MS(e.initialValue,a))},[e.initialValue]);function d(e){c(e.target.value),u(``),n(e.target.value===jS?``:e.target.value)}function f(e){u(e.target.value),n(e.target.value)}let p=s===jS;return(0,Q.jsxs)(`div`,{className:`form-group`,children:[(0,Q.jsxs)(`label`,{htmlFor:e.id,className:e.labelClassName,children:[`Job title`,e.required&&(0,Q.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,Q.jsxs)(`div`,{className:`mb-2`,children:[(0,Q.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,Q.jsx)(`option`,{value:``,disabled:!0,className:`text-secondary`,children:e.placeholder?e.placeholder:(0,Q.jsx)(Q.Fragment,{children:`What do you do?`})}),a.map((e,t)=>(0,Q.jsx)(`option`,{value:e,className:`text-dark`,children:e},t)),(0,Q.jsx)(`option`,{value:jS,className:`text-dark`,children:`Other`})]}),!!t&&!p&&(0,Q.jsx)(Sf,{name:e.id,children:t})]}),p&&(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.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,Q.jsx)(Sf,{name:e.id,children:t})]})]})}var PS=function(e){return e.AU=`cv-ap-southeast-1`,e.NZ=`cv-ap-southeast-2`,e.UK=`cv-eu-west-1`,e.US=`cv-na-west-1`,e}({}),FS=[`uk`,`gb`,`gg`,`im`,`je`,`ie`],IS={au:$.AU,nz:$.NZ,us:$.US,uk:$.UK,ca:$.CA,gb:$.UK,gg:$.UK,im:$.UK,je:$.UK,ie:$.UK,al:$.UK,ad:$.UK,am:$.UK,at:$.UK,az:$.UK,by:$.UK,be:$.UK,ba:$.UK,bg:$.UK,hr:$.UK,cy:$.UK,cz:$.UK,dk:$.UK,ee:$.UK,fi:$.UK,fr:$.UK,de:$.UK,ge:$.UK,gr:$.UK,hu:$.UK,is:$.UK,it:$.UK,lv:$.UK,li:$.UK,lt:$.UK,lu:$.UK,mt:$.UK,md:$.UK,mc:$.UK,me:$.UK,nl:$.UK,mk:$.UK,no:$.UK,pl:$.UK,pt:$.UK,ro:$.UK,ru:$.UK,sm:$.UK,rs:$.UK,sk:$.UK,si:$.UK,es:$.UK,se:$.UK,ch:$.UK,tr:$.UK,ua:$.UK,va:$.UK},LS={au:Ax.CvApSoutheast1,uk:Ax.CvEuWest1,us:Ax.CvNaWest1,nz:Ax.CvApSoutheast2,ca:Ax.CvNaWest1},RS={au:PS.AU,uk:PS.UK,us:PS.US,nz:PS.NZ,ca:PS.US},zS={getRegionName(e){return LS[zS.getCountryCode(e)]},getInstanceRegion(e){return RS[zS.getCountryCode(e)]},getCountryCode(e){return IS[e?.toLowerCase()]||$.US},isCountryCodeUK(e){return FS.includes(e.toLowerCase())},isCountryCodeAU(e){return e?.toLowerCase()===$.AU},isCountryCodeUS(e){return e?.toLowerCase()===$.US},isCountryCodeNZ(e){return e?.toLowerCase()===$.NZ},isSupportedCountryCode(e){return Object.keys(IS).includes(e?.toLowerCase())},getLocalizedLocalityPlaceholderPhrase(e){if(e){if(zS.isCountryCodeUK(e))return`E.g. CR0 3RL or 36 Factory Lane`;if(zS.isCountryCodeAU(e)||zS.isCountryCodeNZ(e))return`E.g. 2212 or Revesby`;if(zS.isCountryCodeUS(e))return`E.g. 95826 or Sacramento`}},getLocalizedLocalityPlaceholderText(e){if(!e)return;let t=zS.getLocalizedLocalityPlaceholderPhrase(e);if(t)return t}};function BS(e){if(!e)return{firstName:``,surname:``};let[t,...n]=e.split(` `).filter(e=>e.length);return{firstName:t,surname:n?.join(` `)}}var VS=o(((e,t)=>{(function(){var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()})),HS=Z.createContext({prefixes:{},breakpoints:[`xxl`,`xl`,`lg`,`md`,`sm`,`xs`],minBreakpoint:`xs`}),{Consumer:US,Provider:WS}=HS;function GS(e,t){let{prefixes:n}=(0,Z.useContext)(HS);return e||n[t]||t}var KS=[`as`,`disabled`];function qS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function JS(e){return!e||e.trim()===`#`}function YS({tagName:e,disabled:t,href:n,target:r,rel:i,role:a,onClick:o,tabIndex:s=0,type:c}){e||=n!=null||r!=null||i!=null?`a`:`button`;let l={tagName:e};if(e===`button`)return[{type:c||`button`,disabled:t},l];let u=r=>{if((t||e===`a`&&JS(n))&&r.preventDefault(),t){r.stopPropagation();return}o?.(r)},d=e=>{e.key===` `&&(e.preventDefault(),u(e))};return e===`a`&&(n||=`#`,t&&(n=void 0)),[{role:a??`button`,disabled:void 0,tabIndex:t?void 0:s,href:n,target:e===`a`?r:void 0,"aria-disabled":t||void 0,rel:e===`a`?i:void 0,onClick:u,onKeyDown:d},l]}var XS=Z.forwardRef((e,t)=>{let{as:n,disabled:r}=e,i=qS(e,KS),[a,{tagName:o}]=YS(Object.assign({tagName:n,disabled:r},i));return(0,Q.jsx)(o,Object.assign({},i,a,{ref:t}))});XS.displayName=`Button`;var ZS=l(VS()),QS=Z.forwardRef(({as:e,bsPrefix:t,variant:n=`primary`,size:r,active:i=!1,disabled:a=!1,className:o,...s},c)=>{let l=GS(t,`btn`),[u,{tagName:d}]=YS({tagName:e,disabled:a,...s});return(0,Q.jsx)(d,{...u,...s,ref:c,disabled:a,className:(0,ZS.default)(o,l,i&&`active`,n&&`${l}-${n}`,r&&`${l}-${r}`,s.href&&a&&`disabled`)})});QS.displayName=`Button`;var $S=Z.forwardRef(({bsPrefix:e,variant:t,animation:n=`border`,size:r,as:i=`div`,className:a,...o},s)=>{e=GS(e,`spinner`);let c=`${e}-${n}`;return(0,Q.jsx)(i,{ref:s,...o,className:(0,ZS.default)(a,c,r&&`${c}-${r}`,t&&`text-${t}`)})});$S.displayName=`Spinner`;function eC(e){let{showSpinner:t,children:n,style:r,spinnerText:i,...a}=e,o=Z.useRef(null),[{width:s,height:c},l]=Z.useState({}),[u,d]=Z.useState(t);Z.useEffect(()=>{if(!t){l({});return}let e=o.current,n=e.offsetHeight,r=e.offsetWidth;!n||!r||l({width:r,height:n})},[t]),Z.useLayoutEffect(()=>{d(t)},[t]);let f={...r};return s&&(f.width=`${s+1}px`),c&&(f.height=`${c+1}px`),(0,Q.jsx)(QS,{ref:o,disabled:t,style:f,...a,children:u?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)($S,{as:`span`,animation:`border`,role:`status`,size:`sm`}),!!i&&(0,Q.jsx)(`span`,{className:`ps-1`,children:i})]}):n})}var tC=/\$+[\w\s]?/,nC=/^\+?\d{4,255}$/,rC=255;function iC(e){let[t,n]=Z.useState({fullname:``,jobTitle:``,phone:``});function r(n){n?.preventDefault(),d(t)&&e.handleSubmitForm(t)}function i(e){e.preventDefault(),l(`fullname`,e.target.value),u(`fullname`),u(`submission`)}function a(e){e.preventDefault(),l(`phone`,e.target.value.trim()),u(`phone`),u(`submission`)}function o(e){l(`jobTitle`,e),u(`jobTitle`),u(`submission`)}function s(){l(`fullname`,``),u(`fullname`),u(`submission`)}function c(){l(`phone`,``),u(`phone`),u(`submission`)}function l(e,t){n(n=>({...n,[e]:t}))}function u(t){if(!Object.keys(e.errors).length||!e.errors[t])return;let n={...e.errors};delete n[t],e.setErrors(n)}function d(t){let{fullname:n,jobTitle:r,phone:i}=t,{firstName:a,surname:o}=BS(n),s={};return(!a||!o)&&(s.fullname=`Please enter your full name.`),(tC.test(a)||tC.test(o))&&(s.fullname=`Please enter your full name.`),n.length>rC&&(s.fullname=`Full name cannot exceed max length of ${rC} characters.`),r?.length||(s.jobTitle=`Please enter your job title.`),tC.test(r)&&(s.jobTitle=`Please enter a valid job title.`),r.length>rC&&(s.jobTitle=`Job title cannot exceed max length of ${rC} characters.`),i?.length||(s.phone=`Please enter your phone number.`),(tC.test(i)||!nC.test(i))&&(s.phone=`Please enter a valid phone number.`),e.setErrors(s),!Object.keys(s).length}function f(){let{fullname:n,jobTitle:r,phone:i}=t;return!(!n.length||!r.length||!i.length||Object.keys(e.errors).length)}return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`A little more about you`}),(0,Q.jsx)(`p`,{children:`Please enter your details.`}),(0,Q.jsxs)(`form`,{onSubmit:r,"aria-errormessage":`brazeFormError`,children:[(0,Q.jsxs)(`div`,{className:`form-group text-start`,children:[(0,Q.jsx)(`label`,{className:`d-block fw-bold mb-1`,htmlFor:`fullname-input`,children:`Full name`}),(0,Q.jsx)(Pf,{value:t.fullname,onChange:i,name:`fullname-input`,id:`fullname-input`,type:`text`,className:`form-control form-control-lg ${e.errors.fullname?.length?`is-invalid`:``}`,placeholder:`Enter your name`,onClickClear:s,autoFocus:!0,"aria-errormessage":`fullname-inputError`}),e.errors.fullname&&(0,Q.jsx)(Sf,{name:`fullname-input`,children:e.errors.fullname})]}),(0,Q.jsxs)(`div`,{className:`form-group text-start`,children:[(0,Q.jsx)(`label`,{className:`d-block fw-bold mb-1`,htmlFor:`phone-input`,children:`Contact number`}),(0,Q.jsx)(Pf,{value:t.phone,onChange:a,name:`phone-input`,id:`phone-input`,type:`tel`,className:`form-control form-control-lg ${e.errors.phone?.length?`is-invalid`:``}`,placeholder:`Enter your phone number`,onClickClear:c,"aria-errormessage":`phone-inputError`}),e.errors.phone&&(0,Q.jsx)(Sf,{name:`phone-input`,children:e.errors.phone})]}),(0,Q.jsxs)(`div`,{className:`form-group text-start`,children:[(0,Q.jsx)(`label`,{className:`d-block fw-bold mb-1`,htmlFor:`jobTitle-select`,children:`Job title`}),(0,Q.jsx)(NS,{id:`jobTitle-select`,countryCode:zS.getCountryCode(e.country),onChange:o,error:e.errors?.jobTitle,size:`lg`,labelClassName:`d-none`,isTertiary:e.isTertiary})]}),!!e.errors?.submission&&(0,Q.jsx)(Sf,{name:`brazeForm`,className:`form-group`,children:e.errors.submission}),(0,Q.jsx)(`div`,{className:`form-group mb-1`,children:(0,Q.jsx)(eC,{className:`btn-lg w-100`,variant:`dark`,onClick:()=>r(),showSpinner:e.loading,disabled:e.loading||!f(),children:`Submit`})})]})]})}var aC=function(e){return e.Unavailable=`unavailable`,e.Expired=`expired`,e.Active=`active`,e.NotRequired=`not-required`,e.Available=`available`,e.Unsupported=`unsupported`,e.UserAutoJoinAllowed=`user-auto-join-allowed`,e.UserJoinApprovalRequired=`user-join-approval-required`,e.InvalidEmail=`invalid-email`,e.BdmTrialAvailable=`bdm-trial-available`,e}({}),oC=function(e){return e.Staff=`staff`,e.Learner=`learner`,e}({}),sC=l(o(((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})}))()),cC={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}},lC={england:`ENG`,scotland:`SCT`,wales:`WLS`,"northern ireland":`NIR`},uC={hashedEmail(e){let t=e.trim().toLowerCase();return sC.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)?uC.removeEmptyKeys(n):n}),{})},Conversions:{TRIAL_UPGRADE_REQUEST:`Request - Trial Upgrade`,FREE_TRIAL_REQUEST:`Request - Free Trial`,START_FREE_TRIAL:`Start - Free Trial`,RequestPilot:`Request - Pilot`},Sources:{CV_PRODUCT_TRIAL_REQUESTED:`cv_product_trial_requested`,CV_PRODUCT_FORM_SUBMISSION:`cv_product_form_submission`,CV_PRODUCT_BDM_TRIAL_REQUESTED:`cv_product_bdm_trial_requested`,CV_PRODUCT_TRIAL_UPGRADE_REQUESTED:`cv_product_trial_upgrade_requested`,CV_LIVE_PILOT_REQUESTED:`cl_product_pilot_requested`,CV_PILOT_REQUESTED:`cv_product_pilot_requested`},getSchoolType(e){if(!e)return;let t=e.toLowerCase();return[`unknown`,`other`].includes(t)?void 0:cC[t]?.label||e},isTertiarySchool(e){return cC[e?.toLowerCase()]?.isTertiary||!1},parseProvince(e){return e.length?lC[e.toLowerCase()]||e:``},getConversionName(e,t){return t?.length?`${e} - ${t}`:e}};function dC(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState({});Z.useEffect(()=>{e.userType===oC.Learner&&e.complete({completionStep:`trial-status`,trialCreated:!1,trialStatus:aC.Unsupported})},[]);function a(e){if(Wp(e.jobTitle)){c();return}o(e)}async function o(a){if(t)return;if(e.userType===oC.Learner){i({...r,submission:`Something went wrong! Please try again later.`});return}e.logUserAction({},{actionType:wS.Click,workflowPhase:DS.Next,descriptor:OS.AddToBraze}),n(!0);let{firstName:o,surname:l}=BS(a.fullname),u=await e.getCrmIdForProspect(e.prospectId);try{let t={email:e.email,firstName:o,lastName:l,phone:a.phone,custom:{crmId:u,orgSubType:uC.getSchoolType(e?.schoolType),accountName:e?.schoolName,jobTitle:a.jobTitle,accountAddress:{countryCode:e?.country,province:uC.parseProvince(e?.province||``)},syncToCrm:!0,source:uC.Sources.CV_PRODUCT_TRIAL_REQUESTED},event:{accountCountry:e?.country,accountPostCode:e?.schoolPostCode,conversion:uC.getConversionName(uC.Conversions.FREE_TRIAL_REQUEST,e.entryPage?.metadata?.conversionSuffix)}},n={prospect_id:e?.prospectId};e.logBrazeEvent({user:t,event:{eventType:lx.ProductFormEvent.ProductTrailRequested,additionalData:n,callback:s}})}catch{i({...r,submission:`Something went wrong! Please try again later.`})}Object.keys(r).length||c()}function s(e){i(e?{}:{...r,submission:`Something went wrong! Please try again later.`}),n(!1)}function c(){e.complete({completionStep:`added-to-braze`,trialCreated:!1,trialStatus:null})}return(0,Q.jsx)(iC,{loading:t,errors:r,setErrors:i,country:e.country||e.geoLocation?.countryCode,logUserAction:e.logUserAction,handleSubmitForm:a,isTertiary:uC.isTertiarySchool(e.schoolType)})}var fC={getRandomInt(e=1e4){return Math.floor(Math.random()*Math.floor(e))}},pC=e=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`,mC=e=>`The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`,hC=(e,t)=>`Failed to create Trusted Types policy "${e}": ${t instanceof Error?t.message:String(t)}.\n\nIf your Content Security Policy uses "require-trusted-types-for 'script'", allow this policy with "trusted-types ${e} google-maps-api-loader google-maps-api#html lit-html". The "google-maps-api-loader", "lit-html", and "google-maps-api#html" policies are required for full Maps JavaScript API execution. Falling back to a string script URL.`,gC=`@googlemaps/js-api-loader`,_C={createScriptURL:e=>e},vC;function yC(){if(vC)return vC;let e=globalThis.trustedTypes;if(!e)return vC=_C,vC;try{vC=e.createPolicy(gC,{createScriptURL:e=>e})}catch(e){hC(gC,e),vC=_C}return vC}function bC(e,t){e.src=yC().createScriptURL(t)}var xC=e=>{var t,n,r,i=`The Google Maps JavaScript API`,a=`google`,o=`importLibrary`,s=`__ib__`,c=document,l=window,u=l[a]||(l[a]={}),d=u.maps||={},f=new Set,p=new URLSearchParams,m=()=>t||=new Promise(async(o,l)=>{for(r in await(n=c.createElement(`script`)),p.set(`libraries`,[...f]+``),e)p.set(r.replace(/[A-Z]/g,e=>`_`+e[0].toLowerCase()),e[r]);p.set(`callback`,a+`.maps.`+s),bC(n,`https://maps.googleapis.com/maps/api/js?`+p),d[s]=o,n.onerror=()=>t=l(Error(i+` could not load.`)),n.nonce=c.querySelector(`script[nonce]`)?.nonce||``,c.head.append(n)});d[o]?console.warn(i+` only loads once. Ignoring:`,e):d[o]=(e,...t)=>f.add(e)&&m().then(()=>d[o](e,...t))},SC=!1;function CC(e){if(SC){pC(e);return}e.apiKey&&(e.key||=e.apiKey),TC(e),SC=!0}async function wC(e){if(!window?.google?.maps?.importLibrary)throw Error(`google.maps.importLibrary is not installed.`);return await google.maps.importLibrary(e)}function TC(e){let t=!!window.google?.maps?.importLibrary;t&&mC(e),t||xC(e)}var EC=!1;function DC(e){EC||=(CC({key:e,v:`weekly`}),!0)}function OC(e){let t=e.libraries||[`places`],[n,r]=Z.useState(!1);Z.useEffect(()=>{let e=!1;return i().then(()=>!e&&r(!0)).catch(()=>!e&&r(!1)),()=>{e=!0}},[]);function i(){return DC(e.apiKey),Promise.all(t.map(e=>wC(e)))}function a(e,t){i().then(()=>{r(!0),e&&e()}).catch(e=>{r(!1),t&&t(e)})}return{scriptLoaded:n,onGoogleApiReady:a}}function kC(e){let{scriptLoaded:t}=OC({apiKey:e.googleApiKey,libraries:[`places`]});return t}var AC=`us`,jC=`country:placeholder:text`;function MC(e){let t=zS.getLocalizedLocalityPlaceholderText(e?.countryCode);if(t)return t;let n=Kd.cacheGet(`${jC}:${e?.countryCode}`);if(n)return n}function NC(){return String.fromCharCode(96+fC.getRandomInt(26))}function PC({apiKey:e,geoLocation:t,makeRequest:n=!0,template:r=`E.g. [placeholder]`,templateKey:i=`[placeholder]`}){let a=kC({googleApiKey:e}),[o,s]=Z.useState(()=>MC(t));Z.useEffect(()=>{if(o||!a||!n)return;let e=t?.countryCode||AC;l(NC(),e)},[o,a,t,n]);function c(e,t){Kd.cacheSet(`${jC}:${t}`,e,86400),s(e)}async function l(e,t){try{let{suggestions:n}=await google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions({input:e,includedPrimaryTypes:[`(cities)`],includedRegionCodes:[t],region:t,sessionToken:new google.maps.places.AutocompleteSessionToken}),a=n[fC.getRandomInt(n.length)]?.placePrediction?.text.toString();if(!a){c(zS.getLocalizedLocalityPlaceholderText(AC),t);return}c(r.replace(i,a),t)}catch{c(zS.getLocalizedLocalityPlaceholderText(AC),t)}}return o}function FC(e,t){let n,r,i,a;for(let e of t)for(let t of e.types)t===`locality`&&(n=e.value),t===`administrative_area_level_1`&&(r=e.value),t===`postal_code`&&(a=e.value),t===`country`&&(i=e.value);return{locality:e,country:i,postalCode:a,city:n,province:r}}var IC={getPlaceDetails(e){return FC(e.formatted_address,e.address_components.map(e=>({types:e.types,value:e.short_name})))},getPlaceDetailsFromPlace(e){return FC(e.formattedAddress,(e.addressComponents||[]).map(e=>({types:e.types,value:e.shortText})))}},LC={1:`geocoderPermissionDenied`,2:`geocoderUnavailable`,3:`geocoderTimeout`};function RC(e){let[t,n]=Z.useState({}),{onGoogleApiReady:r}=OC({apiKey:e.apiKey,libraries:[`geocoding`,`core`]});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({...IC.getPlaceDetails(a),longitude:r,latitude:t})})}function o(t){let n=LC[t.code];n||=`geocoderUnknown`,e.onPositionError(`We are unable to access your location. Please try again later.`)}return{placeDetails:t,onClickGetCurrentLocation:i}}var zC=(e,t)=>{let[n,r]=Z.useState(e);return Z.useEffect(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n};function BC({search:e,makePredicition:t,geoLocation:n,apiKey:r}){let i=kC({googleApiKey:r}),a=zC(e,300),[o,s]=Z.useState(),c=Z.useRef();Z.useEffect(()=>{if(i){if(a?.length===0||!t){s(void 0);return}l(a)}},[a,t,i]);async function l(e){let t=n?.countryCode||`us`;c.current||=new google.maps.places.AutocompleteSessionToken;try{let{suggestions:r}=await google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions({input:e,includedRegionCodes:n?.isFallback?void 0:[t],region:t,includedPrimaryTypes:[`locality`,`sublocality`,`postal_code`],sessionToken:c.current});s(r.map(e=>e.placePrediction).filter(Boolean))}catch{s(void 0)}}async function u(e,t){try{let n=e.toPlace();await n.fetchFields({fields:[`addressComponents`,`formattedAddress`,`location`]});let r=n.location.lng(),i=n.location.lat(),{locality:a,country:o,postalCode:s,city:c,province:l}=IC.getPlaceDetailsFromPlace(n);t({longitude:r,latitude:i,locality:a,country:o,city:c,postalCode:s,province:l})}catch{}finally{c.current=void 0}}return{localityPredicitions:o,getPlaceInfo:u}}function VC(){return(0,Q.jsx)(`svg`,{viewBox:`0 0 24 24`,children:(0,Q.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 HC={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 UC(e){let{predictions:t,getPlaceInfo:n,selectedIndex:r}=e;return(0,Q.jsx)(Q.Fragment,{children:t.map((e,t)=>(0,Q.jsx)(If,{className:`${HC.suggestionItem} ${r-1===t?HC.selected:``}`,onKeyDown:t=>t.key===`Enter`&&n(e),onMouseDown:()=>n(e),onClick:()=>n(e),children:e.text.toString()},e.placeId))})}function WC(e){let t=Z.useRef(null),[n,r]=Z.useState(e.data?.schoolLocality||``),[i,a]=Z.useState(!1),o=PC({apiKey:e.googleMapsApiKey,geoLocation:e.geoLocation}),{localityPredicitions:s,getPlaceInfo:c}=BC({search:n,makePredicition:i,geoLocation:e.geoLocation,apiKey:e.googleMapsApiKey}),{placeDetails:l,onClickGetCurrentLocation:u}=RC({apiKey:e.googleMapsApiKey,onPositionError:b}),d=window.navigator.geolocation?1:0,{selectedIndex:f,onKeyDown:p,containerRef:m,hide:h,onBlur:g,onFocus:_}=Ff({onSelected:C,itemCount:(s?.length??0)+d,hideOnBlur:e.hideOnBlur}),[v,y]=Z.useState();Z.useEffect(()=>{w(l)},[l]);function b(e){a(!0),y(e)}function x(t){v&&y(void 0),i||a(!0),(e.data?.longitude||e.data?.latitude||e.data?.schoolLocality)&&e.clearData(),r(t)}function S(){x(``),t.current.focus()}function C(e){if(!s)return;if(e===s.length){E();return}let t=s[e];t&&T(t)}function w(t){e.setData({schoolLocality:t.locality,country:t.country,province:t.province,schoolPostCode:t.postalCode,longitude:t.longitude,latitude:t.latitude}),t.locality&&r(t.locality)}function T(e){i&&a(!1),c(e,w)}function E(t){t?.preventDefault(),a(!1),u(),e.logUserAction?.({},{actionType:wS.Click,descriptor:OS.UseMyLocation})}function D(){let t=`form-control`;return e.size===`lg`&&(t+=` form-control-lg`),t}let O=s?.length&&!e.data?.schoolLocality?.length,k=window.navigator.geolocation&&!e.data?.schoolLocality?.length,A=e.labelClassName||`d-block text-center mb-3 fw-normal ${HC.baseText}`,j=`form-group position-relative text-start`;return e.size===`lg`&&(j+=` ${HC.large}`),(0,Q.jsxs)(`div`,{className:j,children:[(0,Q.jsxs)(`label`,{className:A,htmlFor:`locality-input`,children:[`ZIP code or city`,e.required&&(0,Q.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,Q.jsx)(Pf,{type:`text`,value:n,onChange:e=>x(e.currentTarget.value),id:`locality-input`,className:D(),ref:t,autoComplete:`off`,placeholder:o||`Loading...`,disabled:e.disabled||!o,autoFocus:e?.autoFocus,onClickClear:S,onKeyDown:p,onFocus:_,onBlur:g}),(0,Q.jsxs)(`div`,{className:`position-absolute z-1 w-100 ${HC.dropdown} ${h?`d-none`:``}`,children:[!!O&&(0,Q.jsx)(`div`,{className:HC.suggestionContainer,children:(0,Q.jsxs)(`div`,{className:HC.suggestionContainerInner,ref:m,children:[(0,Q.jsx)(UC,{predictions:s,getPlaceInfo:T,selectedIndex:f}),window.navigator.geolocation&&e.useGeoLocationApi&&(0,Q.jsx)(If,{className:td(HC.suggestionItem,`px-1`,f-1===s.length?HC.selected:``),onClick:E,children:(0,Q.jsxs)(`div`,{className:`btn btn-link info-link btn-with-icon bg-transparent py-0 pe-1`,children:[(0,Q.jsx)(VC,{}),`Use my current location`]})})]})}),k&&!O&&e.useGeoLocationApi&&(0,Q.jsx)(`div`,{className:`d-flex ${HC.useMyLocation}`,children:(0,Q.jsxs)(`button`,{onClick:E,className:`btn btn-link info-link bg-white btn-with-icon`,children:[(0,Q.jsx)(VC,{}),`Use my current location`]})}),!!v&&(0,Q.jsx)(`div`,{className:`text-danger p-2`,children:v})]})]})}var GC=function(e){return e.GET=`GET`,e.POST=`POST`,e.PUT=`PUT`,e.DELETE=`DELETE`,e}({}),KC=class extends Error{constructor(e,t=`Error`){super(t),this.body=e}},qC={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 JC(e){let t={method:GC.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===GC.GET&&e.data?n=qC.prepareQuery(n,e.data):e.data&&(t={...t,body:JSON.stringify(e.data)}),{init:t,url:n}}var YC={async asyncFetch(e){let t=JC(e),n=await fetch(t.url,t.init);if(!n.ok)throw new KC(await n.json());if(n.status!==204)return await n.json()},async asyncFetchPlain(e){let t=JC(e),n=await fetch(t.url,t.init);if(n.ok)return await n.text()},fetch(e){let t=JC(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()})}},XC={search(e,t,n,r,i){let a={longitude:t.longitude,latitude:t.latitude};t.query&&(a.query=t.query),YC.fetch({url:e,data:a,success:n,error:r,always:i})},async create(e,t){return YC.asyncFetch({url:e.createProspect,method:GC.POST,data:t})},getLookups(e,t){return YC.asyncFetch({url:e.prospectLookups(t)})}},ZC=/\/$/,QC={urlBuilder(e,t){let n=Object.entries(t).map(([e,t])=>e&&Array.isArray(t)?t.map(t=>`${e}=${encodeURIComponent(t)}`).join(`&`):e&&t!=null?`${e}=${encodeURIComponent(t)}`:``).reduce((e,t)=>t?e?`${e}&${t}`:t:e,``);return n?`${e}?${n}`:e},buildFilter(e){let t=[];if(e.limit&&t.push(`limit:${e.limit}`),e.cursor&&t.push(`page:${e.cursor}`),e.before&&t.push(`dateCreated:...${e.before}`),t.length)return t.join(`,`)},makeHttps(e){return typeof e!=`string`||e.indexOf(`http://`)===-1||(e=e.replace(`http://`,`https://`)),e},safeUrlConcat(e,t){if(!e)return;let n=e;return e.endsWith(`/`)||(n+=`/`),t&&(n+=t.startsWith(`/`)?t.slice(1):t),n},removeTrailingSlash(e){if(typeof e==`string`)return e.replace(ZC,``)},getHostname(e){if(!e)return window.location.hostname;try{return new URL(e).hostname}catch{return null}},isValidUrl(e){try{return new URL(e),!0}catch{return!1}}},$C={checkTrialStatus(e,t){if(e.productName!==fx.Lite)return Promise.reject();let n={email:t.email};return YC.asyncFetch({url:e.userStatus,data:n})},checkUserIdps(e,t){return e.productName===fx.Lite?YC.asyncFetch({url:e.idps,data:{email:t}}):Promise.reject()},checkProspectTrialStatus(e,t,n,r,i){let a=e.prospectStatus(t.prospectId);a=QC.urlBuilder(a,{email:t.email}),YC.fetch({url:a,success:n,error:r,always:i})},createTrial(e,t){return YC.asyncFetch({url:e.createTrial,method:GC.POST,data:t})},resendTrialEmail(e,t,n){if(e.productName!==fx.Lite)return Promise.reject();let r={email:n.email,appLink:n?.appLink};return YC.asyncFetch({url:e.resendTrialEmail(t),method:GC.POST,data:r})},createJoinRequest(e,t){let n=e.productName===fx.Auth?e.joinRequest:e.joinRequest(t.customerId),r=e.productName===fx.Auth?t:{email:t.email};return YC.asyncFetch({url:n,method:GC.POST,data:r})},createAutoJoinRequest(e,t){return e.productName===fx.Lite?YC.asyncFetch({url:e.autoJoin,method:GC.POST,data:t}):Promise.reject()}},ew=[`Primary`,`Secondary`,`K12`,`Special`,`TAFE`,`University`],tw=[`Primary`,`Secondary`,`Primary & Secondary`,`Special`,`Sixth Form College`,`FE College`,`University`,`Other`],nw=[`Elementary`,`Middle School`,`High School`,`College`,`Other`],rw={au:ew,nz:ew,uk:tw,us:nw,ca:nw};function iw(e){return rw[zS.getCountryCode(e)]||nw}var aw=function(e){return e.Published=`Published`,e.Draft=`Draft`,e}({});function ow(e){let[t,n]=Z.useState({prospectId:e.prospectId,schoolName:e.schoolName,schoolType:e.schoolType,schoolLocality:e.schoolLocality,country:e.country,province:e.province,city:e.city,longitude:e.longitude,latitude:e.latitude}),[r,i]=Z.useState(),[a,o]=Z.useState(!1),s=iw(t.country||e.geoLocation?.countryCode);function c(){let{schoolName:e,schoolType:n,country:r}=t;return!!(e&&n&&r)}function l(e,t){n(n=>({...n,[e]:t}))}function u(e){let{longitude:t,latitude:n,schoolLocality:r,country:i,city:a,province:o}=e;t&&l(`longitude`,t),n&&l(`latitude`,n),i&&l(`country`,i),a&&l(`city`,a),o&&l(`province`,o),r&&l(`schoolLocality`,r)}function d(){l(`schoolLocality`,void 0),l(`longitude`,void 0),l(`latitude`,void 0),l(`city`,void 0),l(`province`,void 0),l(`country`,void 0),i(``)}function f(e){let t=e.target.value;l(`schoolType`,t)}function p(e){l(`schoolName`,e.target.value)}async function m(n){let r={email:e.email,custom:{accountName:t?.schoolName,accountAddress:{countryCode:t?.country,province:uC.parseProvince(t.province)},orgSubType:uC.getSchoolType(t?.schoolType),syncToCrm:!0,source:uC.Sources.CV_PRODUCT_FORM_SUBMISSION},event:{accountCountry:t?.country,accountPostCode:t?.schoolPostCode,accountState:uC.parseProvince(t.province)}},i={form_type:`trial-sign-up`,prospect_id:t?.prospectId};e.logBrazeEvent({user:r,event:{eventType:lx.ProductFormEvent.FormSubmission,additionalData:i,callback:n}})}async function h(n){if(n.preventDefault(),!c())return;e.logUserAction(t,{actionType:wS.Click,workflowPhase:DS.Next,descriptor:OS.CantFindSchool}),o(!0);let r;try{if(r=await XC.create(e.ajaxUrls,{name:t.schoolName,status:aw.Draft,countryCode:t.country,prospectType:t.schoolType,city:t.city,postCode:t.schoolPostCode,province:uC.parseProvince(t.province)}),!r.id){o(!1),i(`Error. Something went wrong.`);return}}catch{o(!1),i(`Error. Something went wrong.`);return}if(e.userTrialStatus===aC.BdmTrialAvailable){if(e.userType!==oC.Staff){e.complete({completionStep:`added-to-braze`,trialCreated:!1,trialStatus:null});return}e.nextStep({step:`request-bdm-trial`,...t});return}try{let n={prospectId:r.id,email:e.email,userType:e.userType,appLink:e.pageAppLinkString,signupVariant:e.signupVariant,attribution:{...nf.getDecodedAttributionData(),utms:hf.getUtmParameters()},conversion:uC.getConversionName(uC.Conversions.START_FREE_TRIAL,e.entryPage?.metadata?.conversionSuffix)},i=await $C.createTrial(e.ajaxUrls,n);e.createOrUpdateProfile&&e.createOrUpdateProfile({masterId:i.id,email:e.email,countryCode:t?.country});let a={completionStep:`trial-status`,email:e.email,userId:i.id,prospectId:r.id,schoolName:t.schoolName,schoolLocality:t.schoolLocality,country:t.country,schoolType:t.schoolType,city:t.city,schoolPostCode:t.schoolPostCode,latitude:t.latitude,longitude:t.longitude,province:t.province,trialStatus:aC.Available,trialCreated:!0,customerId:i.data?.customerId};if(e?.userType===oC.Staff){await m(t=>{t||console.error(`Failed to submit create trial data to braze.`),e.complete(a)});return}e.complete(a)}catch(n){if(!n.body){o(!1),i(`Error. Something went wrong.`);return}let a=n;if(a.body.status===400&&a.body.type===`trial-not-available`){e.nextStep({step:`add-to-braze`,...t,prospectId:r.id,trialStatus:aC.Unavailable});return}console.error(n)}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Tell us more about your school`}),(0,Q.jsx)(`p`,{children:`Please enter your school details.`}),(0,Q.jsxs)(`div`,{className:`text-start`,children:[(0,Q.jsxs)(`div`,{className:`form-group`,children:[(0,Q.jsx)(`label`,{className:`d-block`,htmlFor:`school-name-input`,children:`Name of school`}),(0,Q.jsx)(`input`,{type:`text`,value:t?.schoolName||``,onChange:p,id:`school-name-input`,className:`form-control form-control-lg`,autoComplete:`off`,placeholder:`Enter name of school`,autoFocus:!0})]}),(0,Q.jsxs)(`div`,{className:`form-group`,children:[(0,Q.jsx)(`label`,{className:`d-block`,htmlFor:`school-type-select`,children:`Type of school`}),(0,Q.jsxs)(`select`,{id:`school-type-select`,className:`form-select form-select-lg ${t.schoolType?``:`text-secondary`}`,autoComplete:`off`,value:t.schoolType||`none`,onChange:f,children:[(0,Q.jsx)(`option`,{value:`none`,className:`text-secondary`,disabled:!0,children:`Select type of school`}),s.map(e=>(0,Q.jsx)(`option`,{value:e,className:`text-dark`,children:e},e))]})]}),(0,Q.jsx)(WC,{data:t,setData:u,clearData:d,disabled:!1,labelClassName:`d-block`,geoLocation:e.geoLocation,logUserAction:e.logUserAction,googleMapsApiKey:e.googleMapsApiKey,autoFocus:!1,size:`lg`,useGeoLocationApi:!0}),r&&(0,Q.jsx)(`div`,{className:`text-danger mb-3`,children:r})]}),c()&&(0,Q.jsx)(eC,{className:`btn-lg w-100`,variant:`dark`,onClick:h,showSpinner:a,disabled:a,children:`Get started`})]})}function sw(e,t){return t?`${e} ${t}`:e}function cw(e){return(0,Q.jsx)(`h1`,{className:sw(`text-center mb-2 h4`,e.className),children:e.children})}function lw(e){return(0,Q.jsx)(`div`,{className:sw(`text-center text-sm px-2 px-lg-4`,e.className),children:e.children})}function uw(e){return(0,Q.jsx)(`p`,{className:sw(``,e.className),children:e.children})}var dw={Heading:cw,Body:lw,Message:uw};function fw(e){return(0,Q.jsx)(`div`,{className:`d-flex justify-content-center my-4 px-2 px-lg-4`,children:(0,Q.jsx)(`img`,{src:{[aC.Available]:e.imageUrls.statusImages.available,[aC.Active]:e.imageUrls.statusImages.active,[aC.Expired]:e.imageUrls.statusImages.expired,[aC.NotRequired]:e.imageUrls.statusImages.notRequired,[aC.Unavailable]:e.imageUrls.statusImages.unavailable,[aC.Unsupported]:e.imageUrls.statusImages.unsupported,[aC.UserAutoJoinAllowed]:e.imageUrls.statusImages.notRequired,[aC.UserJoinApprovalRequired]:e.imageUrls.statusImages.notRequired,[aC.InvalidEmail]:``,[aC.BdmTrialAvailable]:``}[e.trialStatus],className:`w-100 h-auto`})})}function pw(e){return Z.useEffect(()=>{e.logUserAction({},{actionType:wS.Create,descriptor:OS.TrialRequested,workflowPhase:DS.Complete})},[]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(fw,{trialStatus:aC.Available,imageUrls:e.imageUrls}),(0,Q.jsxs)(dw.Body,{className:`mb-3`,children:[(0,Q.jsx)(dw.Heading,{children:`Submitted!`}),(0,Q.jsx)(dw.Message,{children:`Thank you for your interest in trialing ClickView. We will be in touch with you as soon as possible.`})]})]})}function mw(e){return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(fw,{trialStatus:aC.Available,imageUrls:e.imageUrls}),(0,Q.jsxs)(dw.Body,{className:`mb-3`,children:[(0,Q.jsx)(dw.Heading,{children:`You've requested access!`}),(0,Q.jsx)(dw.Message,{children:`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.`})]})]})}var hw={Marketing:{au:`https://www.clickvieweducation.com/en-au`,us:`https://www.clickvieweducation.com`,nz:`https://www.clickview.co.nz`,uk:`https://www.clickview.co.uk`,ca:`https://www.clickvieweducation.com/en-ca`},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`,ca:`https://www.clickviewsupport.com/hc/en-au#ca`}},gw={[$.AU]:`/contact-us/sales`,[$.US]:`/contact-us/sales`,[$.NZ]:`/contact-us/`,[$.UK]:`/contact-us/trial`,[$.CA]:`/contact-us/sales`},_w={[$.AU]:`/resources/free-student-resources`,[$.US]:`/resources/free-student-resources`,[$.NZ]:`/free-student-resources/`,[$.UK]:`/free-student-resources/`,[$.CA]:`/resources/free-student-resources`},vw={getMarketingUrlForGeoLocation(e){let t=zS.getCountryCode(e?.countryCode);return hw.Marketing[t]||hw.Marketing.us},getMarketingSalesContactForGeoLocation(e){let t=zS.getCountryCode(e?.countryCode);return`${vw.getMarketingUrlForGeoLocation(e)}${gw[t]}`},getFreeResourcesForGeoLocation(e){let t=zS.getCountryCode(e?.countryCode);return`${this.getMarketingUrlForGeoLocation({countryCode:t})}${_w[t]}`},getTermsAndConditionsLink(){return this.getMarketingUrlForGeoLocation($.US)+`/terms-and-conditions/`},getPrivacyPolicyLink(){return this.getMarketingUrlForGeoLocation($.US)+`/privacy-policy/`},getSupportUrlForGeoLocation(e){let t=zS.getCountryCode(e?.countryCode);return hw.Support[t]||hw.Support.us}};function yw(e){let t=e?.previousStepIds&&e.previousStepIds[e.previousStepIds.length-1]===`find-school`,n=e?.schoolName||`Your school`;return(0,Q.jsxs)(dw.Body,{className:`mb-3`,children:[t?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(dw.Heading,{children:[n,(0,Q.jsx)(`br`,{}),`already has ClickView 🎉`]}),(0,Q.jsxs)(dw.Message,{className:`mt-3`,children:[`If your school has SSO\xA0`,(0,Q.jsx)(`a`,{href:e.getSignInUrl({email:e.email,customerId:e.customerId}),className:`info-link`,children:`click here to sign in.`})]}),(0,Q.jsx)(dw.Message,{children:`Otherwise please contact your school admin for access.`})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(dw.Heading,{children:`Good News!`}),(0,Q.jsxs)(dw.Message,{children:[`An account already exists for:`,(0,Q.jsx)(`br`,{}),` `,(0,Q.jsx)(`strong`,{children:e.email})]}),(0,Q.jsx)(dw.Message,{children:(0,Q.jsx)(`a`,{href:e.getSignInUrl({email:e.email}),className:`btn btn-dark btn-lg w-100`,children:`Sign into ClickView`})})]}),(0,Q.jsxs)(dw.Message,{children:[`Need Help?\xA0`,(0,Q.jsx)(`a`,{href:vw.getSupportUrlForGeoLocation(e.geoLocation),className:`info-link`,target:`_blank`,children:`Contact our Help Centre.`})]})]})}function bw(e){let t=vw.getMarketingSalesContactForGeoLocation(e.geoLocation),n=e?.previousStepIds&&e.previousStepIds[e.previousStepIds.length-1]===`find-school`,r=e?.schoolName||`Your school`;return(0,Q.jsxs)(dw.Body,{children:[(0,Q.jsx)(dw.Heading,{children:n?`${r} trial has expired`:`Your trial has expired`}),(0,Q.jsxs)(dw.Message,{children:[`Please contact our\xA0`,(0,Q.jsx)(`a`,{href:t,className:`info-link`,target:`_blank`,children:`ClickView Sales Team`})]})]})}function xw(e){let t=vw.getMarketingSalesContactForGeoLocation(e.geoLocation);return(0,Q.jsxs)(dw.Body,{children:[(0,Q.jsxs)(dw.Heading,{children:[`Your school no longer`,(0,Q.jsx)(`br`,{}),` has access to ClickView`]}),(0,Q.jsxs)(dw.Message,{children:[`Please contact our `,(0,Q.jsx)(`a`,{href:t,className:`info-link`,children:`ClickView Sales Team`}),` for more information.`]})]})}function Sw(){return(0,Q.jsxs)(dw.Body,{children:[(0,Q.jsxs)(dw.Heading,{className:`px-2 px-lg-4`,children:[`ClickView isn't currently `,(0,Q.jsx)(`br`,{}),` available for your school`]}),(0,Q.jsx)(dw.Message,{children:`We're working hard to get ClickView ready for more people.`})]})}var Cw=1;function ww(e){let[t,n]=Z.useState(0),[r,i]=Z.useState(!1);async function a(r){r?.preventDefault();try{await $C.resendTrialEmail(e.ajaxUrls,e.userId,{email:e.email,appLink:e.pageAppLinkString}),n(t+1)}catch{i(!0)}e.logUserAction({},{actionType:wS.Click,descriptor:OS.ResendEmail})}function o(t){t?.preventDefault(),e.logUserAction({},{actionType:wS.Click,descriptor:OS.WrongEmail}),e.nextStep({step:`enter-email`,userType:e.userType})}if(e?.email)return(0,Q.jsxs)(dw.Body,{children:[(0,Q.jsx)(dw.Heading,{children:`Check your inbox!`}),(0,Q.jsxs)(dw.Message,{children:[`An email has been sent to `,(0,Q.jsx)(`strong`,{children:e.email}),`.`]}),!!e.userId&&(0,Q.jsxs)(Q.Fragment,{children:[t<Cw?(0,Q.jsx)(`button`,{onClick:a,className:`btn btn-outline-dark btn-lg mb-3`,children:`Resend verification email`}):(0,Q.jsx)(dw.Message,{children:`✅ Email has been resent!`}),(0,Q.jsxs)(dw.Message,{children:[`Wrong email?\xA0`,(0,Q.jsx)(`button`,{onClick:o,className:`btn info-link p-0 align-top border-0`,children:`Update email address`})]}),r&&(0,Q.jsxs)(dw.Message,{className:`mb-0 text-danger`,children:[`❌ There was a problem resending the email. Please try again later or contact our \xA0`,(0,Q.jsx)(`a`,{href:vw.getSupportUrlForGeoLocation(e.geoLocation),className:`info-link`,children:`support`})]})]})]})}var Tw={[aC.Available]:ww,[aC.Active]:yw,[aC.Expired]:bw,[aC.NotRequired]:yw,[aC.Unavailable]:xw,[aC.Unsupported]:Sw,[aC.UserAutoJoinAllowed]:yw,[aC.UserJoinApprovalRequired]:yw,[aC.InvalidEmail]:null,[aC.BdmTrialAvailable]:null};function Ew(e){let t=Tw[e.trialStatus];return t?(0,Q.jsx)(t,{...e}):(0,Q.jsx)(Q.Fragment,{})}function Dw(e){return Z.useEffect(()=>{let t={actionType:wS.Create,descriptor:OS.DeadEnd,workflowPhase:DS.Discard};e.trialCreated&&(t.descriptor=OS.TrialCreated,t.workflowPhase=DS.Complete),e.logUserAction({},t)},[]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(fw,{trialStatus:e.trialStatus,imageUrls:e.imageUrls}),(0,Q.jsx)(Ew,{...e})]})}var Ow=`young-student`;function kw(e){let t=vw.getFreeResourcesForGeoLocation(e.geoLocation);return Z.useEffect(()=>{Kd.set(Ow,!0)},[]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(fw,{trialStatus:aC.Active,imageUrls:e.imageUrls}),(0,Q.jsxs)(dw.Body,{className:`mb-3`,children:[(0,Q.jsx)(dw.Heading,{children:`Discover our free content`}),(0,Q.jsx)(dw.Message,{children:`Click the button below to explore our videos`}),(0,Q.jsx)(`a`,{href:t,className:`btn btn-lg btn-dark w-100`,target:`_blank`,children:`Start watching now`})]})]})}var Aw={"trial-status":Dw,"added-to-braze":pw,"young-student":kw,"requested-access":mw};function jw(e){let t=Aw[e.completionStep];return(0,Q.jsx)(`div`,{className:`d-flex justify-content-center flex-column mx-auto px-2`,children:(0,Q.jsx)(t,{...e})})}var Mw=function(e){return e.Popup=`popup-form`,e.FullPage=`full-page-form`,e}({}),Nw={day:`_day_cmdpc_1`,month:`_month_cmdpc_4`,year:`_year_cmdpc_7`},Pw=120,Fw=16;function Iw(e,t,n){let r=new Date(Lw(e,t,n));return!isNaN(+r)}function Lw(e,t,n){return`${e.padStart(4,`0`)}-${t.padStart(2,`0`)}-${n.padStart(2,`0`)}`}function Rw(e){let[t,n]=Z.useState(``),[r,i]=Z.useState(``),[a,o]=Z.useState(``),[s,c]=Z.useState(null);function l(e){n(e.target.value),c(null)}function u(e){i(e.target.value),c(null)}function d(e){o(e.target.value),c(null)}function f(){return!t||!r||!a?(c(`Please enter your date of birth`),!1):Iw(a,r,t)?+a>h?(c(`Please enter a date in the past`),!1):+a<h-Pw?(c(`Please enter a realistic date of birth`),!1):!0:(c(`Please enter a valid date`),!1)}function p(n){if(n.preventDefault(),!f())return;let i=new Date(Lw(a,r,t)),o=h-Fw,s=new Date;if(s.setFullYear(o),i>s){e.complete({completionStep:`young-student`,trialCreated:!1,trialStatus:null});return}e.nextStep({step:`enter-email`,userType:e.userType})}let m=e.type===Mw.Popup,h=new Date().getFullYear(),g=td(`d-inline-block`,m?`text-center`:`text-start`),_=`form-control form-control-lg ${s?`is-invalid`:``}`,v=`order-0`,y=`order-3`,b=zS.isCountryCodeUS(e.geoLocation.countryCode);return b&&(v=`order-3`,y=`order-0`),(0,Q.jsxs)(`form`,{onSubmit:p,noValidate:!0,children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Tell us a little about yourself`}),(0,Q.jsx)(`p`,{children:`Please enter your date of birth`}),(0,Q.jsxs)(`div`,{className:`my-4`,children:[(0,Q.jsxs)(`fieldset`,{className:td(`d-flex`,m?`justify-content-center`:`justify-content-start`),"aria-describedby":`dateOfBirthError`,children:[(0,Q.jsxs)(`div`,{className:`${g} ${v}`,children:[(0,Q.jsx)(`label`,{className:`mb-0`,htmlFor:`day`,children:`Day`}),(0,Q.jsx)(`input`,{id:`day`,type:`number`,className:`${_} ${Nw.day}`,min:`1`,max:`31`,placeholder:`DD`,value:t,onChange:l,autoFocus:!b,tabIndex:b?2:1})]}),(0,Q.jsx)(`span`,{className:`h1 fw-normal mt-4 mb-0 mx-2 order-1 ${s?`text-danger`:``}`,children:`/`}),(0,Q.jsxs)(`div`,{className:`${g} ${y}`,children:[(0,Q.jsx)(`label`,{className:`mb-0`,htmlFor:`month`,children:`Month`}),(0,Q.jsx)(`input`,{id:`month`,type:`number`,className:`${_} ${Nw.month}`,min:`1`,max:`12`,placeholder:`MM`,value:r,onChange:u,autoFocus:b,tabIndex:b?1:2})]}),(0,Q.jsx)(`span`,{className:`h1 fw-normal mt-4 mb-0 mx-2 order-4 ${s?`text-danger`:``}`,children:`/`}),(0,Q.jsxs)(`div`,{className:`${g} order-5`,children:[(0,Q.jsx)(`label`,{className:`mb-0`,htmlFor:`year`,children:`Year`}),(0,Q.jsx)(`input`,{id:`year`,name:`year`,type:`number`,className:`${_} ${Nw.year}`,min:h-120,max:h,placeholder:`YYYY`,value:a,onChange:d,tabIndex:3})]})]}),!!s&&(0,Q.jsx)(Sf,{name:`dateofBirth`,children:s})]}),(0,Q.jsx)(`button`,{type:`submit`,className:`btn btn-lg btn-dark w-100`,children:`Continue`})]})}function zw(e){return(0,Q.jsxs)(Q.Fragment,{children:[`Have a ClickView account already?`,(0,Q.jsx)(`a`,{href:e.link,className:`info-link ms-1`,onClick:e.onClick,children:`Sign in`})]})}function Bw(){let e={},t=nf.getEncodedAttributionData();t&&(e.r=t);let n=hf.getUtmParameters();return n&&(e.utms=n),JSON.stringify(e)}var Vw=new RegExp(/^[^\s@]+@[^\s@]+\.[^\s@]+$/),Hw={[$.AU]:`valerie.frizzle@school.edu.au`,[$.UK]:`valerie.frizzle@school.gov.uk`,[$.US]:`valerie.frizzle@school.gov`,[$.NZ]:`valerie.frizzle@school.nz`,[$.CA]:`valerie.frizzle@school.ca`},Uw={[$.AU]:`/contact-us/support`,[$.US]:`/contact-us/support`,[$.NZ]:`/contact-us/`,[$.UK]:`/contact-us/technical/`,[$.CA]:`/contact-us/support`};function Ww(e){return`${vw.getMarketingUrlForGeoLocation(e)}${Uw[zS.getCountryCode(e?.countryCode)]}`}function Gw(e){return Hw[zS.getCountryCode(e.countryCode)]||Hw.us}var Kw=[aC.Expired,aC.NotRequired,aC.Unavailable,aC.Unsupported,aC.Active];function qw(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState(e?.email||``),[a,o]=Z.useState(),s=Ww(e.geoLocation);async function c(){o(``);let t;try{t=await $C.checkTrialStatus(e.ajaxUrls,{email:r})}catch{o(`Something went wrong! Please try again later.`);return}if(t.status===aC.InvalidEmail){o(`Please use your school email address.`);return}if(e.logUserAction({},{actionType:wS.Click,workflowPhase:DS.Next,descriptor:OS.EnterEmail}),Kw.includes(t.status)){e.complete({completionStep:`trial-status`,email:r,trialStatus:t.status,trialCreated:!1});return}try{let n=await $C.checkUserIdps(e.ajaxUrls,r);if(n.length){e.nextStep({step:`select-idp`,email:r,userTrialStatus:t.status,idps:n});return}}catch{o(`Something went wrong! Please try again later.`);return}e.nextStep({step:`find-school`,email:r,userTrialStatus:t.status})}function l(){e.logUserAction({},{actionType:wS.Click,descriptor:OS.ContactUs})}function u(){return r.length?Vw.test(r)?!0:(o(`Please use your school email address.`),!1):(o(`Please enter your school email address.`),!1)}function d(){e.logUserAction({},{actionType:wS.Click,descriptor:OS.SignIn})}function f(e){e.preventDefault(),i(e.target.value),o(``)}async function p(e){e?.preventDefault(),u()&&(n(!0),await c(),n(!1))}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:``,children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Let's set up your account`}),(0,Q.jsx)(`p`,{children:`Enter your school email address`})]}),(0,Q.jsxs)(`form`,{onSubmit:p,noValidate:!0,children:[(0,Q.jsxs)(`div`,{className:`form-group mb-3`,children:[(0,Q.jsx)(Pf,{value:r,onChange:f,name:`email-input`,id:`email-input`,type:`email`,className:`form-control form-control-lg ${a?`is-invalid`:``}`,placeholder:Gw(e.geoLocation),autoComplete:`false`,autoCorrect:`false`,autoFocus:!0,onClickClear:()=>i(``),"aria-errormessage":`email-inputError`}),a&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Sf,{name:`error-input`,children:a}),(0,Q.jsxs)(`small`,{children:[`Having an issue with your email?`,(0,Q.jsx)(`a`,{href:s,className:`info-link ps-1`,target:`_blank`,onClick:l,children:`Contact our team`})]})]})]}),(0,Q.jsx)(eC,{showSpinner:t,variant:`dark`,className:`btn-lg mb-3 w-100`,disabled:t,onClick:p,children:`Continue`})]}),e.userType===oC.Staff&&(0,Q.jsx)(xf,{idps:e.globalIdps,className:`mt-n3`,attribution:Bw()}),(0,Q.jsx)(`div`,{className:`text-center`,children:(0,Q.jsx)(zw,{link:e.getSignInUrl({email:r}),onClick:d})})]})}function Jw(e){switch(e?.body?.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 Yw=function(e){return e.MasterId=`master_id`,e.CrmId=`crm_id`,e.SalesforceId=`salesforce_id`,e}({});function Xw(e){let[t,n]=Z.useState(null);async function r(){try{let t=(await XC.getLookups(e.ajaxUrls,e.prospectId)).find(e=>e.type===Yw.MasterId)?.externalId;if(!t){n(`Something went wrong.`);return}await $C.createJoinRequest(e.ajaxUrls,{customerId:t,email:e.email}),e.logUserAction({},{actionType:wS.Click,descriptor:OS.RequestAccess}),e.complete({completionStep:`requested-access`,trialCreated:!1,trialStatus:aC.UserJoinApprovalRequired})}catch(e){n(Jw(e))}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(fw,{trialStatus:aC.UserJoinApprovalRequired,imageUrls:e.imageUrls}),(0,Q.jsx)(dw.Body,{className:`mb-3`,children:(0,Q.jsxs)(dw.Heading,{children:[e.schoolName,(0,Q.jsx)(`br`,{}),`already has ClickView 🎉`]})}),(0,Q.jsx)(`button`,{className:`btn btn-lg btn-dark w-100 mb-3`,onClick:r,children:`Request access`}),t&&(0,Q.jsx)(`p`,{className:`text-danger text-center mb-2`,children:t}),(0,Q.jsxs)(dw.Message,{className:`text-center`,children:[`Need Help?\xA0`,(0,Q.jsx)(`a`,{href:vw.getSupportUrlForGeoLocation(e.geoLocation),className:`info-link`,target:`_blank`,children:`Contact our Help Centre.`})]})]})}var Zw={createUser(e,t){if(e.productName!==fx.Lite)return Promise.reject();let{email:n,source:r,syncToCrm:i,instanceRegion:a}=t;return YC.asyncFetch({url:e.brazeCreateUser,method:GC.POST,data:{email:n,source:r,syncToCrm:i,instanceRegion:a}})}};function Qw(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState({});function a(e){if(Wp(e.jobTitle)){l();return}s(e)}function o(){let t=zS.getCountryCode(e.country||e.geoLocation?.countryCode);return zS.getInstanceRegion(t)}async function s(a){if(t)return;if(e.userType===oC.Learner){i({...r,submission:`Something went wrong! Please try again later.`});return}e.logUserAction({},{actionType:wS.Click,workflowPhase:DS.Next,descriptor:OS.RequestBdmTrial}),n(!0);let{firstName:s,surname:u}=BS(a.fullname);try{await Zw.createUser(e.ajaxUrls,{email:e.email,source:uC.Sources.CV_PRODUCT_BDM_TRIAL_REQUESTED,syncToCrm:!0,instanceRegion:o()});let t={email:e.email,firstName:s,lastName:u,phone:a.phone,custom:{orgSubType:uC.getSchoolType(e?.schoolType),accountName:e?.schoolName,jobTitle:a.jobTitle,accountAddress:{countryCode:e?.country,province:uC.parseProvince(e?.province||``)},source:uC.Sources.CV_PRODUCT_BDM_TRIAL_REQUESTED},event:{conversion:uC.getConversionName(uC.Conversions.FREE_TRIAL_REQUEST,e.entryPage?.metadata?.conversionSuffix)}},n={prospect_id:e?.prospectId};e.logBrazeEvent({user:t,event:{eventType:lx.ProductFormEvent.BdmTrialRequested,additionalData:n,callback:c}})}catch{i({...r,submission:`Something went wrong! Please try again later.`})}Object.keys(r).length||l()}function c(e){i(e?{}:{...r,submission:`Something went wrong! Please try again later.`}),n(!1)}function l(){e.complete({completionStep:`added-to-braze`,trialCreated:!1,trialStatus:null})}return(0,Q.jsx)(iC,{loading:t,errors:r,setErrors:i,country:e.country||e.geoLocation?.countryCode,logUserAction:e.logUserAction,handleSubmitForm:a,isTertiary:uC.isTertiarySchool(e.schoolType)})}function $w(e){let{loading:t,canSubmitForm:n,setSubmissionError:r,prospectStatus:i,userType:a,logStepEvent:o,logUserAction:s,nextStep:c,data:l,productName:u,ajaxUrls:d,complete:f,setLoadingState:p,email:m,userTrialStatus:h,pageAppLinkString:g,setProperty:_,logBrazeEvent:v,createOrUpdateProfile:y,signupVariant:b}=e;function x(){c({step:`add-to-braze`,trialStatus:i,...l}),o()}function S(){if(o(),a!==oC.Staff){f({completionStep:`added-to-braze`,trialCreated:!1,trialStatus:null});return}c({step:`request-bdm-trial`,...l})}function C(){c({step:`request-access`,...l}),o()}async function w(){try{await $C.createAutoJoinRequest(d,{prospectId:l.prospectId,email:m}),s({},{actionType:wS.Click,descriptor:OS.AutoJoin}),f({completionStep:`trial-status`,trialCreated:!0,trialStatus:aC.Available,...l})}catch{r(`Something went wrong! Please try again later.`),p(!1);return}}async function T(){let e;l?.prospectId&&i===aC.NotRequired&&(e=(await XC.getLookups(d,l.prospectId)).find(e=>e.type===Yw.MasterId)?.externalId),f({completionStep:`trial-status`,trialStatus:i,trialCreated:!1,customerId:e,...l}),o()}function E(){return i===aC.Active||i===aC.Available?!0:i===aC.UserAutoJoinAllowed?u===fx.Auth:!1}async function D(){if(a!==oC.Staff)return;let e={email:m,custom:{accountName:l?.schoolName,accountAddress:{countryCode:l?.country,province:uC.parseProvince(l.province)},orgSubType:uC.getSchoolType(l?.schoolType),syncToCrm:!0,source:uC.Sources.CV_PRODUCT_FORM_SUBMISSION},event:{accountCountry:l?.country,accountPostCode:l?.schoolPostCode,accountState:uC.parseProvince(l.province),variant:b}},t={form_type:`trial-sign-up`,prospect_id:l?.prospectId};v({user:e,event:{eventType:lx.ProductFormEvent.FormSubmission,additionalData:t}})}async function O(){p(!0);let t;try{t=await $C.createTrial(d,{signupVariant:b,userType:a,email:m,prospectId:l?.prospectId,appLink:g,attribution:{...nf.getDecodedAttributionData(),utms:hf.getUtmParameters()},conversion:uC.getConversionName(uC.Conversions.START_FREE_TRIAL,e?.entryPage?.metadata?.conversionSuffix)})}catch{r(`Something went wrong! Please try again later.`),p(!1);return}i===aC.UserAutoJoinAllowed&&s({},{actionType:wS.Click,descriptor:OS.AutoJoin}),_(`userId`,t.id),f({completionStep:`trial-status`,userId:t.id,trialCreated:!0,trialStatus:aC.Available,customerId:t.data?.customerId,...l}),D(),y&&y({masterId:t.id,email:m,countryCode:l?.country}),o()}return async function(){if(!t){if(!n()){r(`Something went wrong! Please try again later.`);return}if(h===aC.BdmTrialAvailable)return S();if(a===oC.Staff){if(i===aC.Unsupported)return x();if(i===aC.UserJoinApprovalRequired)return C();if(i===aC.UserAutoJoinAllowed&&u===fx.Lite)return await w()}return E()?await O():await T()}}}var eT=50;function tT(e){return e.toLowerCase().split(` `).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function nT(e){let t=[];return e.city&&t.push(tT(e.city)),e.province&&t.push(e.province),e.postCode&&t.push(e.postCode),t.join(` `)}function rT(e){let{filteredSchoolsList:t,getSchoolName:n,onSchoolSuggestionClick:r,selectedIndex:i}=e;return(0,Q.jsx)(Q.Fragment,{children:t.map((e,t)=>(0,Q.jsxs)(If,{className:`${HC.suggestionItem} ${i-1===t?HC.selected:``}`,onKeyDown:t=>t.key===`Enter`&&r(e),onMouseDown:()=>r(e),onClick:()=>r(e),children:[n(e),` `,(0,Q.jsx)(`br`,{}),(0,Q.jsx)(`small`,{className:`text-secondary`,children:nT(e)})]},e.id))})}function iT(e){return(0,Q.jsx)(`div`,{className:`info-link ${HC.suggestionItem} ${HC.noSuggestion} ${e.selected?HC.selected:``}`,onKeyDown:t=>t.key===`Enter`&&e.handleNoSuggestion(),onMouseDown:e.handleNoSuggestion,onClick:e.handleNoSuggestion,children:`Can't find your school?`})}function aT(e){let t=Z.useRef(null),[n,r]=Z.useState(!0),[i,a]=Z.useState(e.data.schoolName&&e.data.schoolPostCode?e.data.schoolName+`, `+e.data.schoolPostCode:e.data.schoolName?e.data.schoolName:``),[o,s]=Z.useState(),c=zC(i,250),{selectedIndex:l,onKeyDown:u,containerRef:d,hide:f,onBlur:p,onFocus:m}=Ff({onSelected:h,itemCount:(o?.length??0)+1,hideOnBlur:e.hideOnBlur});function h(t){if(!o&&!t)return;if(t===o.length){e.onClickNoSuggestions(i);return}let n=o[t];n&&C(n)}let g=!!e.data?.prospectId,_=n&&!g,v=!n&&!g&&o?.length<eT,y=o?.length&&!g;Z.useEffect(()=>{if(!g){if(!c.length){S();return}if(!g&&c.length>1&&c===i){S(c);return}}},[c,g]);function b(t){(e.data.schoolName||e.data.prospectId)&&e.clearData(),t!==i&&a(t)}function x(){b(``),t.current.focus()}function S(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),XC.search(e.searchUrl,n,e=>s(e),null,()=>r(!1))}function C(t){a(w(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 w(e){return e.name}let T=(y||_||v)&&!e.disabled&&!f,E=!_&&!v&&o?.length>=eT,D=`form-control`,O=`form-group position-relative text-start`;return e.size===`lg`&&(D+=` form-control-lg`,O+=` ${HC.large}`),(0,Q.jsxs)(`div`,{className:O,children:[(0,Q.jsxs)(`label`,{className:e.labelClassName,htmlFor:`school-input`,children:[`School`,e.required&&(0,Q.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,Q.jsx)(Pf,{id:`school-input`,value:i,onChange:e=>b(e.currentTarget.value),ref:t,className:D,type:`text`,autoComplete:`off`,placeholder:e.placeholder||`Search for your school`,disabled:e.disabled,autoFocus:!0,onClickClear:x,onKeyDown:u,onFocus:m,onBlur:p}),(0,Q.jsx)(`div`,{className:`position-absolute z-1 w-100 ${HC.dropdown} ${f?`d-none`:``}`,children:(0,Q.jsx)(`div`,{className:`${HC.suggestionContainer} ${T?``:`d-none`}`,children:(0,Q.jsxs)(`div`,{className:HC.suggestionContainerInner,ref:d,children:[y?(0,Q.jsx)(rT,{filteredSchoolsList:o,onSchoolSuggestionClick:C,getSchoolName:w,selectedIndex:l}):_&&(0,Q.jsx)(`div`,{className:`${HC.suggestionLoading} py-4 d-flex justify-content-center`,children:(0,Q.jsx)($S,{animation:`border`})}),E&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`hr`,{className:`my-0`}),(0,Q.jsx)(`div`,{className:`${HC.suggestionItem} ${HC.noSuggestion} text-secondary text-center`,children:(0,Q.jsxs)(`small`,{children:[`Can't find your school? `,(0,Q.jsx)(`br`,{}),` Try searching to narrow the results`]})})]}),!_&&v&&(0,Q.jsx)(iT,{selected:l===o.length+1,handleNoSuggestion:()=>{e.onClickNoSuggestions(i)}})]})})})]})}function oT(e){return e?.toLowerCase()===`au`?`Enter your school postcode or suburb`:e?.toLowerCase()===`us`?`Enter your school ZIP code or city`:e?.toLowerCase()===`ca`?`Enter your school postal code or city`:`Enter your school postcode or city`}function sT(e){let{email:t,userType:n}=e,[r,i]=Z.useState({schoolLocality:e.schoolLocality,country:e.country,longitude:e.longitude,latitude:e.latitude,city:e.city,province:e.province,prospectId:e.prospectId,schoolName:e.schoolName,schoolType:e.schoolType,schoolPostCode:e.schoolPostCode}),[a,o]=Z.useState(e.trialStatus),[s,c]=Z.useState(),[l,u]=Z.useState(!1),[d,f]=Z.useState(!1),[p,m]=Z.useState(!1),h=$w({...e,prospectStatus:a,loading:l,data:r,canSubmitForm:_,setSubmissionError:c,logStepEvent:v,setLoadingState:y,setProperty:b});function g(){return!!(r&&r.schoolLocality&&r.longitude&&r.latitude)}function _(){if(!r||!t||!n)return!1;let{prospectId:e}=r;return!!(t&&n&&e)}function v(){let t={actionType:wS.Click,descriptor:OS.FindSchool,workflowPhase:DS.Next};e.logUserAction(r||{},t)}function y(e){f(e),m(e),u(e)}function b(t,n){t===`prospectId`&&n&&(u(!0),$C.checkProspectTrialStatus(e.ajaxUrls,{prospectId:n.toString(),email:e.email},e=>{o(e.status)},()=>{console.log(`error`)},()=>{u(!1)})),i(e=>({...e,[t]:n}))}function x(){b(`schoolLocality`,void 0),b(`longitude`,void 0),b(`latitude`,void 0),b(`city`,void 0),b(`province`,void 0),b(`country`,void 0),S()}function S(){b(`prospectId`,void 0),b(`schoolName`,``),b(`schoolPostCode`,void 0),c(void 0)}function C(t){e.nextStep({step:`cant-find-school`,prospectId:r.prospectId,schoolName:t,schoolLocality:r.schoolLocality,longitude:r.longitude,latitude:r.latitude,country:r.country,city:r.city,province:r.province}),e.logUserAction({},{actionType:wS.Click,descriptor:OS.CantFindSchool,workflowPhase:DS.Next})}function w(e){b(`prospectId`,e.prospectId),b(`schoolName`,e.schoolName),b(`schoolPostCode`,e.schoolPostCode),b(`schoolType`,e.schoolType),b(`province`,e.province),b(`city`,e.city),b(`country`,e.country)}function T(e){let{longitude:t,latitude:n,schoolLocality:r,country:i,city:a,province:o}=e;t&&b(`longitude`,t),n&&b(`latitude`,n),i&&b(`country`,i),a&&b(`city`,a),o&&b(`province`,o),r&&b(`schoolLocality`,r)}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Let's find your school`}),(0,Q.jsx)(`p`,{children:oT(e.geoLocation?.countryCode)}),(0,Q.jsx)(WC,{data:r,setData:T,clearData:x,disabled:d,geoLocation:e.geoLocation,labelClassName:`d-none`,logUserAction:e.logUserAction,googleMapsApiKey:e.googleMapsApiKey,autoFocus:!0,size:`lg`,useGeoLocationApi:!0}),g()&&(0,Q.jsx)(aT,{data:r,setData:w,clearData:S,disabled:p,searchUrl:e.ajaxUrls.searchProspect,onClickNoSuggestions:C,size:`lg`,labelClassName:`d-none`}),s&&(0,Q.jsx)(`p`,{className:`text-danger mb-2`,children:s}),_()&&(0,Q.jsx)(eC,{className:`btn-lg w-100`,variant:`dark`,onClick:h,showSpinner:d||p||l,disabled:d||p||l,children:`Get started`})]})}var cT=[`38A2E8`,`7A76E8`,`40BCC3`,`F7847B`];function lT(e){let[t,n]=Z.useState(null);function r(e){if(!e)return;let t=window.location.pathname+window.location.search;window.location.href=`/challenge?idp=${e.id}&redirectUrl=`+encodeURIComponent(t)}function i(){e.logUserAction({},{actionType:wS.Click,workflowPhase:DS.Next,descriptor:OS.SkipIdpSelect}),e.nextStep({step:`find-school`,email:e.email,userTrialStatus:e.userTrialStatus})}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Does your school already have ClickView?`}),(0,Q.jsx)(`p`,{children:`Find your school from the list below`}),e.idps.length>4?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(zf,{id:`idp`,item:t,items:e.idps,onSelect:n,getName:e=>e.name,clearData:()=>n(null),placeholder:`Select a school`,size:`lg`}),(0,Q.jsx)(`button`,{className:`btn btn-lg btn-dark w-100 mb-3`,disabled:!t,onClick:()=>r(t),children:`Continue`})]}):e.idps.map((e,t)=>(0,Q.jsx)(`button`,{className:`btn btn-lg w-100 mb-3`,onClick:()=>r(e),style:{backgroundColor:`#${cT[t%cT.length]}`,color:`#FFF`},children:e.name},t)),(0,Q.jsx)(`button`,{className:`btn btn-link text-info w-100 no-sso-link`,onClick:i,children:`My school does not have ClickView`})]})}var uT={hoverArea:`_hoverArea_1i8nr_1`,defaultImage:`_defaultImage_1i8nr_1`,activeImage:`_activeImage_1i8nr_1`,hoverImage:`_hoverImage_1i8nr_4`};function dT(e){let{as:t=`div`,className:n,...r}=e;return(0,Q.jsx)(t,{className:td(n,uT.hoverArea),...r,children:e.children})}function fT(e){return e.active?(0,Q.jsx)(`img`,{src:e.src.hovered,className:td(uT.activeImage,e.className?.hovered)}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`img`,{src:e.src.default,className:td(uT.defaultImage,e.className?.default)}),(0,Q.jsx)(`img`,{src:e.src.hovered,className:td(uT.hoverImage,e.className?.hovered)})]})}var pT={Area:dT,Image:fT},mT={userTypeOption:`_userTypeOption_e39ge_1`,selected:`_selected_e39ge_4`,image:`_image_e39ge_8`};function hT(e){return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(pT.Area,{as:If,className:`ratio ratio-1x1 d-none d-md-block`,onClick:()=>e.onClick(e.type),children:(0,Q.jsxs)(`div`,{className:td(`d-flex flex-fill flex-column justify-content-center border rounded-3 mx-auto gap-3 p-3`,mT.userTypeOption,e.selected&&mT.selected),children:[(0,Q.jsx)(pT.Image,{active:e.selected,src:{default:e.defaultImageSrc,hovered:e.hoveredImageSrc},className:{default:td(`rounded-top mx-auto pb-2 w-auto`,mT.image),hovered:td(`rounded-top mx-auto pb-2 w-auto`,mT.image)}}),(0,Q.jsx)(`span`,{className:`h4`,children:e.buttonText})]})}),(0,Q.jsx)(If,{className:`btn btn-lg btn-outline-dark w-100 d-md-none d-block mx-auto`,onClick:()=>e.onClick(e.type),children:e.buttonText})]})}var gT=function(e){return e.ClickView=`clickview`,e.ClickViewLive=`clickview-live`,e.Bundle=`bundle`,e}({}),_T={[Mw.Popup]:{[gT.ClickViewLive]:{title:`Tune in to live programs without leaving the classroom`,description:`Let's get you set up so you can access ClickView Live. Who would you like to sign up as?`},[gT.ClickView]:{title:`Access thousands of standard-aligned videos`,description:`Let's get you set up so you can access ClickView. Who would you like to sign up as?`},[gT.Bundle]:{title:`Access thousands of standard-aligned videos`,description:`Let's get you set up so you can access ClickView. Who would you like to sign up as?`}},[Mw.FullPage]:{[gT.ClickViewLive]:{title:`Let’s create your ClickView Live account`},[gT.ClickView]:{title:`Let’s create your ClickView account`},[gT.Bundle]:{title:`Let’s create your ClickView account`}}},vT={[Mw.Popup]:{itemClassName:`col-md-6 col-lg-4 col-xl-5`,containerClassName:`col-11`,titleClassName:`h4`},[Mw.FullPage]:{itemClassName:`col-12 col-md-6`,containerClassName:`col-10 col-xl-8`,titleClassName:`h2 mb-3`}};function yT(e){let{signupVariant:t}=e,{title:n,description:r}=_T[e.type][t];function i(t){if(e.logUserAction({userType:t},{actionType:wS.Click,workflowPhase:DS.Next,descriptor:t===oC.Staff?OS.Educator:OS.Student}),t===oC.Staff){e.nextStep({step:`enter-email`,userType:t});return}e.nextStep({step:`enter-age`,userType:t})}let a=vT[e.type];return(0,Q.jsx)(`div`,{className:`row justify-content-center`,children:(0,Q.jsxs)(`div`,{className:a.containerClassName,children:[(0,Q.jsx)(`h1`,{className:a.titleClassName,children:n}),r&&(0,Q.jsx)(`p`,{className:`mb-3`,children:r}),(0,Q.jsxs)(`div`,{className:`row justify-content-center text-center g-3`,children:[(0,Q.jsx)(`div`,{className:a.itemClassName,children:(0,Q.jsx)(hT,{type:oC.Staff,buttonText:`I am an educator`,defaultImageSrc:e.imageUrls.educator?.default,hoveredImageSrc:e.imageUrls.educator?.hovered,onClick:i,selected:e.userType===oC.Staff})}),(0,Q.jsx)(`div`,{className:a.itemClassName,children:(0,Q.jsx)(hT,{type:oC.Learner,buttonText:`I am a student`,defaultImageSrc:e.imageUrls.student?.default,hoveredImageSrc:e.imageUrls.student?.hovered,onClick:i,selected:e.userType===oC.Learner})})]})]})})}var bT={"select-type":yT,"enter-email":qw,"find-school":sT,"cant-find-school":ow,completed:jw,"add-to-braze":dC,"enter-age":Rw,"request-access":Xw,"request-bdm-trial":Qw,"select-idp":lT};function xT(e){let{state:t,geoLocation:n,layout:r,hasPreviousStep:i,googleMapsApiKey:a,pageAppLinkString:o,entryPage:s,back:c,nextStep:l,complete:u,logUserAction:d,logBrazeEvent:f,imageUrls:p,ajaxUrls:m,productName:h,getSignInUrl:g,globalIdps:_,createOrUpdateProfile:v,getCrmIdForProspect:y,signupVariant:b,type:x}=e,S=bT[t.currentStepId],C={...t,geoLocation:n,googleMapsApiKey:a,pageAppLinkString:o,entryPage:s,back:c,nextStep:l,complete:u,logUserAction:d,imageUrls:p,ajaxUrls:m,productName:h,getSignInUrl:g,logBrazeEvent:f,globalIdps:_,createOrUpdateProfile:v,getCrmIdForProspect:y,signupVariant:b,type:x},w=r;if(!w)return(0,Q.jsx)(S,{...C});let T=AS.last(e.state.previousStepIds)===`completed`;return(0,Q.jsx)(w,{geoLocation:e.geoLocation,currentStep:t.currentStepId,previousStep:c,closeApp:e.close,logUserAction:d,hasPreviousStep:i,showBackButton:!T,imageUrls:e.imageUrls,getSignInUrl:g,children:(0,Q.jsx)(S,{...C})})}var ST=[`email`,`longitude`,`latitude`,`trialCreated`,`idps`],CT={filterBlacklistedKeys(e){let t={...e};return ST.forEach(e=>delete t[e]),t}};function wT(e){let t=[...e.previousStepIds],n=t.pop();return{...e,previousStepIds:t,currentStepId:n}}function TT(e){return Object.entries(e).filter(([,e])=>e!==null).reduce((e,[t,n])=>({...e,[t]:n}),{})}function ET(e,t){let n={...e,previousStepIds:[...e.previousStepIds,e.currentStepId],currentStepId:t.step};if(t.step===`select-type`)return{...n};if(t.step===`enter-email`||t.step===`enter-age`)return{...n,userType:t.userType};if(t.step===`select-idp`)return{...n,email:t.email,userTrialStatus:t.userTrialStatus,idps:t.idps};if(t.step===`find-school`)return{...n,email:t.email,userTrialStatus:t.userTrialStatus};if(t.step===`cant-find-school`)return{...n,prospectId:t.prospectId,schoolName:t.schoolName,schoolLocality:t.schoolLocality,country:t.country,longitude:t.longitude,latitude:t.latitude,city:t.city,province:t.province};if(t.step===`add-to-braze`||t.step===`completed`||t.step===`request-access`||t.step===`request-bdm-trial`){let e={...t};return delete e.type,delete e.step,e=TT(e),{...n,...e}}}function DT(e,t){switch(t.type){case`nextStep`:return ET(e,t);case`back`:return wT(e)}}var OT=({location:e,initialValues:t,entryPage:n,onStepUpdate:r,externalLogUserAction:i})=>{let a={currentStepId:`select-type`,previousStepIds:[],...uC.removeEmptyKeys(t)},[o,s]=Z.useReducer(DT,a);Z.useEffect(()=>{r?.(o)},[o.currentStepId]);function c(){s({type:`back`})}function l(e){s({type:`nextStep`,...e})}function u(e){s({type:`nextStep`,step:`completed`,...e})}function d(t,r){let a={...o,...t},s=CT.filterBlacklistedKeys(a),c={currentStepId:o.currentStepId,...s};n&&(c.entryPage=n),i(Object.entries(c).filter(([,e])=>e!==void 0).reduce((e,[t,n])=>({...e,[t]:n}),{}),{entity:TS.SignUp,location:e,...r})}return{state:o,back:c,nextStep:l,complete:u,hasPreviousStep:!!o.previousStepIds.length,logUserAction:d}},kT={statusImages:{available:`/images/sign-up/available-v2.png`,active:`/images/sign-up/active-v2.png`,expired:`/images/sign-up/expired-v2.png`,notRequired:`/images/sign-up/active-v2.png`,unavailable:`/images/sign-up/unavailable-v2.png`,unsupported:`/images/sign-up/unavailable-v2.png`,autoJoin:`/images/sign-up/active-v2.png`,requestAccess:`/images/sign-up/active-v2.png`}};function AT(e){let t={currentStepId:`find-school`,previousStepIds:[],email:e.email,userType:oC.Staff},n=e.geoLocation?.countryCode?e.geoLocation:{countryCode:$.US,isFallback:!0},{complete:r,...i}=OT({location:ES.AuthProspectSelect,initialValues:t,externalLogUserAction:d}),[a,o]=Z.useState(null);Z.useEffect(()=>{bd.get(`/ajax/config`).then(e=>o(e))},[]);let s=px(a?.gatewayApi),c=Z.useMemo(()=>{if(!a)return null;let e={cvApSoutheast1:a.analytics[Ax.CvApSoutheast1].collectionApi,cvApSoutheast2:a.analytics[Ax.CvApSoutheast2].collectionApi,cvEuWest1:a.analytics[Ax.CvEuWest1].collectionApi,cvNaWest1:a.analytics[Ax.CvNaWest1].collectionApi};return new CS({productName:`auth.web`,productVersion:a.version,regionName:zS.getRegionName(n?.countryCode),collectionApiUrls:e,collectionApiClientId:`cv_auth`,getUser:()=>null,logAttributionData:!0,logUtmParameters:!0})},[a]),l=Z.useMemo(()=>{if(!a?.braze)return null;let e=a.braze[zS.getRegionName(n?.countryCode)];return new lx.BrazeClient({apiOptions:{apiKey:e.apiKey,baseUrl:e.url,productName:`auth.web`,productVersion:a.version,allowUserSuppliedJavascript:!1,automaticallyShowInAppMessages:!1}})},[a]);ux({additionalData:e.additionalData});function u(e){if(!l)return;let t=nf.getDecodedAttributionData(),n=e.event?.additionalData||{};t?.originalReferrer&&(n.original_referrer=t.originalReferrer),t?.internalReferrer&&(n.internal_referrer=t.internalReferrer);let r={...e.event,additionalData:n};l.setUserInit(e.user),l.event.log(r)}function d(e,t){c?.log({type:t.actionType,data:e,actionContext:{productArea:`prospect_select`,entity:t.entity,location:t.location,descriptor:t.descriptor,workflowPhase:t.workflowPhase},eventVersion:t.eventVersion||kS.V1})}function f(t){if(!t.trialCreated){r(t);return}bd.post(`/ajax/login/select-customer`,{customerId:t.customerId,returnUrl:e.returnUrl}).then(t=>Rd(t,e))}function p(){e.navigate({step:e.backStep,backStep:null})}async function m(e){try{return(await bd.get(s.prospectLookups(e))).find(e=>e.type===Yw.CrmId)?.externalId}catch{return}}if(!a)return(0,Q.jsx)(Q.Fragment,{});let h={...i,type:Mw.FullPage,signupVariant:gT.ClickView,complete:f,googleMapsApiKey:a.googleMapsApiKey,ajaxUrls:s,imageUrls:kT,geoLocation:n,productName:fx.Auth,getSignInUrl:()=>``,logBrazeEvent:u,getCrmIdForProspect:m};return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(nd,{theme:e.theme,onClickBack:!!e.backStep&&p}),(0,Q.jsx)(xT,{...h})]})}function jT(e){return(0,Q.jsxs)(`div`,{className:`text-center`,children:[(0,Q.jsx)(nd,{theme:e.theme}),(0,Q.jsx)(`img`,{className:`img-fluid mb-4`,alt:`error`,src:`/images/errors/email-not-allowed-v2.png`}),(0,Q.jsx)(`h1`,{className:`h2 mb-3`,children:`Oops! Make sure to use your school email address`}),(0,Q.jsx)(`p`,{className:`mb-3`,children:`This includes the email you use to sign in to Google or Microsoft.`}),(0,Q.jsx)(`a`,{href:e.liteUrl+`sign-up`,className:`btn btn-lg btn-dark w-100 text-decoration-none`,children:`Try again`})]})}var MT={username:Xu,"username-input":Cf,"username-or-guest":wf,"guest-selection":Uf,password:qf,"select-idp":Yf,error:Cp,"verify-email":tp,"verify-email-check-code":lp,"verify-email-link-success":dp,"verify-email-skip-reason":Op,"forgot-password":fp,"forgot-password-check-code":pp,"reset-password":gp,"change-password":_p,"self-activation":vp,"self-activation-check-code":yp,"verify-email-link-email-in-use":Tp,"verify-email-code-email-in-use":Ep,logout:kp,loggedout:Ap,"activate-user":ib,"select-customer":cb,"trial-expired":_b,"link-account":ex,"link-account-code":tx,invite:ax,"invite-success":ox,"select-user-type":cx,"prospect-select":AT,"email-not-allowed":jT,"organisation-select-customer":jp,"contact-support":Sp};function NT(e,t){if(t.type!==`navigate`)return e;let n=Object.keys(t.data).reduce((e,n)=>{if(n!==`bannerType`)return t.data[n]!==void 0&&(e={...e,[n]:t.data[n]}),e},{});return t.data.clearUsername&&(n.username=void 0,n.clearUsername=void 0),{...e,...n}}function PT(e,t){return t.type===`setBanner`?{...e,bannerType:t.data.bannerType}:e}function FT(e,t){switch(t.type){case`navigate`:return NT(e,t);case`setBanner`:return PT(e,t)}}var IT={footer:`_footer_psbd8_1`};function LT(e){return(0,Q.jsx)(`div`,{className:`text-center p-2 text-secondary small`,children:(0,Q.jsxs)(`ul`,{className:`d-flex flex-wrap list-unstyled justify-content-center`,children:[(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(`span`,{children:[`2003 - `,new Date().getFullYear(),` © ClickView Pty Limited`]})}),`\xA0|\xA0`,(0,Q.jsx)(`li`,{children:(0,Q.jsx)(`a`,{href:e.privacyPolicyUrl,className:`text-secondary`,children:(0,Q.jsx)(`strong`,{children:`Privacy Policy`})})}),`\xA0|\xA0`,(0,Q.jsx)(`li`,{children:(0,Q.jsx)(`a`,{href:e.termsAndConditionsUrl,className:`text-secondary`,children:(0,Q.jsx)(`strong`,{children:`Terms and Conditions`})})}),`\xA0|\xA0`,(0,Q.jsx)(`li`,{children:(0,Q.jsx)(`span`,{children:e.version})})]})})}function RT(e){return(0,Q.jsx)(`footer`,{className:IT.footer,children:(0,Q.jsx)(LT,{...e})})}var zT=`M317.302 140.594C356.23 163.069 356.23 219.257 317.302 241.731L87.9302 374.159C36.1933 404.029 -21.7046 346.131 8.16593 294.394L50.9108 220.359C61.3416 202.293 61.3416 180.034 50.9109 161.967L8.16512 87.9294C-21.7052 36.1925 36.1927 -21.7052 87.9295 8.16518L317.302 140.594Z`;function BT(){return(0,Q.jsxs)(`svg`,{viewBox:`0 0 2420 383`,children:[(0,Q.jsx)(`title`,{children:`ClickView Logo`}),(0,Q.jsx)(`path`,{fill:`#f8981d`,d:zT}),(0,Q.jsx)(`path`,{fill:`#313543`,d:`M611.506 37.93c32.531 0 61.155 7.86 85.686 23.732 24.569 15.898 42.448 38.445 53.64 67.43l2.553 6.609h-55.686l-1.301-2.829c-7.699-16.724-18.767-29.458-33.196-38.377l-.11-.069-.014-.01c-13.652-8.57-30.142-13.096-49.669-13.371l-1.903-.014c-19.522 0-36.885 4.537-52.213 13.522-15.305 8.973-27.345 21.774-36.129 38.544l-.015.029c-8.74 16.421-13.202 35.916-13.202 58.645 0 22.414 4.447 41.908 13.188 58.62l.847 1.564.825 1.465c8.613 15.034 20.102 26.719 34.486 35.152 15.328 8.985 32.691 13.521 52.213 13.521l1.906-.013c19.595-.268 36.134-4.686 49.812-13.045 14.419-8.92 25.48-21.649 33.175-38.367l1.3-2.826h55.708l-2.58 6.622c-11.198 28.71-29.078 51.11-53.635 67l-.091.058-.031.017c-24.507 15.544-53.089 23.239-85.564 23.239-27.772 0-53.222-6.451-76.248-19.403l-.022-.013-.007-.004-.117-.066-.021-.015c-22.685-13.233-40.648-31.506-53.841-54.737-13.252-23.335-19.83-49.632-19.83-78.769 0-29.136 6.578-55.434 19.83-78.768 13.169-23.468 31.098-41.866 53.747-55.1l.016-.012.205-.118c23.032-13.244 48.497-19.843 76.288-19.843M853.29 344.778h-48.522V37.935h48.522zm108.133 0H912.9V125.985h48.523zM937.586 37.93c8.392 0 15.617 3.072 21.365 9.12l.557.571c5.665 5.944 8.519 13.236 8.519 21.603 0 8.638-3.042 16.128-9.076 22.174-5.748 6.047-12.973 9.121-21.365 9.121-8.649 0-16.147-3.05-22.197-9.099-6.049-6.049-9.098-13.547-9.098-22.196 0-8.648 3.049-16.147 9.098-22.196s13.548-9.098 22.197-9.098m883.954 306.848h-48.52V125.985h48.52zM1797.71 37.93c8.39 0 15.61 3.072 21.36 9.12l.56.571c5.66 5.944 8.52 13.236 8.52 21.603 0 8.638-3.04 16.128-9.08 22.174-5.75 6.047-12.97 9.121-21.36 9.121-8.65 0-16.15-3.05-22.2-9.099s-9.1-13.547-9.1-22.196c0-8.648 3.05-16.147 9.1-22.196s13.55-9.098 22.2-9.098m-685.63 88.056c.18-.001.55-.007.8-.007h.02l1.27.007c.22-.001.58-.007.87-.007l1.23.005c25.71.192 47.32 6.421 64.47 19.041 17.63 12.79 29.21 30.547 34.76 52.985l1.49 6.025h-50.78l-1-3.522c-.03-.077-.03-.089-.05-.138-3.68-8.706-9.16-15.814-16.48-21.406l-.01-.012-.08-.064c-9.02-7.051-20.36-10.823-34.31-11.058l-1.42-.011c-18.69.005-33.52 6.889-44.94 20.703v.013l-.07.082c-3.49 4.155-6.47 8.877-8.93 14.186-3.21 9.073-4.87 19.779-4.87 32.199l.01 1.197.01 1.149c.2 11.745 1.9 21.943 5 30.664 2.43 5.277 5.37 9.989 8.8 14.153 11.43 13.858 26.29 20.763 45.01 20.763l1.37-.011c14-.221 25.37-3.876 34.4-10.69 7.21-5.445 12.74-12.723 16.56-21.979.01-.015.01-.03.02-.051l1.03-3.483h50.85l-1.64 6.118c-5.82 21.7-17.53 39.258-35.06 52.487l-.14.103-.04.022c-17.34 12.78-38.78 19.123-63.98 19.319l-1.21.005c-.21 0-.53-.004-.68-.005l-1.45.009h-.03c-.4 0-.82-.006-1.16-.009l-.91.005h-.02c-20.35 0-38.67-4.463-54.82-13.501l-.03-.013-.09-.053c-15.42-8.796-27.62-21.14-36.53-36.934l-.01-.014-.01-.014-.82-1.481-.01-.013-.01-.014c-8.73-16.072-13.15-34.684-13.42-55.69v-.023l-.01-1.99v-.026c0-21.601 4.42-40.66 13.45-57.012v-.005l.82-1.481.01-.013.01-.015c8.91-15.794 21.11-28.138 36.53-36.934l.09-.053.03-.014c16.15-9.038 34.47-13.501 54.82-13.501h.02zm483.02 158.82 89.96-246.876h51.35l-115.78 306.848h-51.48L1453.37 37.93h51.77zm375.01-158.827c19.94 0 37.78 4.354 53.37 13.192 15.55 8.809 27.53 21.032 35.85 36.604l.66 1.205.01.013v.013c7.04 13.033 10.99 27.498 11.91 43.315q.21 3.607.21 7.301v1.239c-.05 6.217-.43 12.744-1.13 19.576l-.45 4.359h-156.39c.98 8.318 3.05 15.659 6.15 22.076a60 60 0 0 0 8.24 10.724c11.63 11.489 25.5 17.231 41.88 17.334 13.51-.053 24.36-3.558 32.89-10.222 6.94-5.49 12.28-12.323 16.04-20.561l1.3-2.839h50.42l-1.73 6.17c-5.75 20.496-17.3 37.279-34.51 50.223l-.01.009-.02.009-.01.011c-17.36 12.794-38.78 19.047-63.92 19.047l-.21-.001-.07-.001-.46.002h-.02c-19.96 0-38.04-4.488-54.1-13.557l-.01-.004-.01-.006-.01-.004v-.003c-15.78-9.051-28.19-21.853-37.22-38.29l-.02-.029-.08-.162c-8.77-16.289-13.23-34.896-13.5-55.694v-.026l-.01-1.968v-.025c0-21.589 4.32-40.745 13.12-57.32 8.66-16.295 20.76-28.919 36.28-37.747l.74-.418c16.08-9.071 34.4-13.544 54.82-13.545m-1.7 41.839c-14.73 0-27.09 4.424-37.36 13.179-8.74 7.62-14.31 17.908-16.51 31.206h108.22c-.65-8.377-3-15.493-6.92-21.486l-.04-.065-.01-.01c-4.73-7.419-11.19-12.981-19.49-16.726l-.02-.007-.04-.023-.05-.023-.04-.017c-8.2-3.989-17.41-6.028-27.74-6.028m372.35 176.959h-46.41l-45.08-148.561-45.08 148.561h-46.39l-68.68-218.797h49.14l42.94 156.786 46.36-156.786h46.09l45.2 156.683L2361 125.98l47.88-.002zM1309.64 210.55l73.43-84.564h61.94l-103.03 109.019 103.39 109.773h-60.74l-74.99-84.406v84.406h-48.52V37.935h48.52z`})]})}var VT=function(e){return e[e.Audience=1]=`Audience`,e[e.Category=2]=`Category`,e[e.Channel=3]=`Channel`,e[e.Chapter=4]=`Chapter`,e[e.Comment=5]=`Comment`,e[e.OwnerComment=6]=`OwnerComment`,e[e.Image=7]=`Image`,e[e.Thumbnail=8]=`Thumbnail`,e[e.Avatar=9]=`Avatar`,e[e.Banner=10]=`Banner`,e[e.Video=11]=`Video`,e[e.Trailer=12]=`Trailer`,e[e.Rating=13]=`Rating`,e[e.Topic=14]=`Topic`,e[e.Series=15]=`Series`,e[e.Season=16]=`Season`,e[e.HostedMediaObjectCollection=17]=`HostedMediaObjectCollection`,e[e.ExchangeCollection=18]=`ExchangeCollection`,e[e.CustomMediaObjectCollection=19]=`CustomMediaObjectCollection`,e[e.Playlist=20]=`Playlist`,e[e.ClickViewTvCollection=21]=`ClickViewTvCollection`,e[e.ClickViewProductionsCollection=22]=`ClickViewProductionsCollection`,e[e.User=23]=`User`,e[e.SystemUser=24]=`SystemUser`,e[e.Customer=25]=`Customer`,e[e.Country=26]=`Country`,e[e.Organisation=28]=`Organisation`,e[e.SystemOrganisation=29]=`SystemOrganisation`,e[e.Group=30]=`Group`,e[e.SystemGroup=31]=`SystemGroup`,e[e.FlagReason=32]=`FlagReason`,e[e.Library=33]=`Library`,e[e.Interactive=34]=`Interactive`,e[e.WorkspaceCollection=35]=`WorkspaceCollection`,e[e.Conversation=36]=`Conversation`,e[e.Message=37]=`Message`,e[e.Notification=38]=`Notification`,e[e.Clip=39]=`Clip`,e[e.Link=40]=`Link`,e[e.UserChannel=41]=`UserChannel`,e[e.Resource=42]=`Resource`,e[e.VideoStream=43]=`VideoStream`,e[e.AudioStream=44]=`AudioStream`,e[e.Tag=45]=`Tag`,e[e.Subtitle=46]=`Subtitle`,e[e.LicencedContentCollection=47]=`LicencedContentCollection`,e[e.PublicCollection=48]=`PublicCollection`,e[e.CategoryTree=49]=`CategoryTree`,e[e.Logo=50]=`Logo`,e[e.Permission=51]=`Permission`,e[e.Subject=52]=`Subject`,e[e.Field=53]=`Field`,e[e.Company=54]=`Company`,e[e.Person=55]=`Person`,e[e.Cover=56]=`Cover`,e[e.Poster=57]=`Poster`,e[e.SubjectAudience=58]=`SubjectAudience`,e[e.TallPoster=60]=`TallPoster`,e[e.Classroom=67]=`Classroom`,e[e.ClassroomGroup=68]=`ClassroomGroup`,e[e.UserProfile=74]=`UserProfile`,e[e.PartnerProfile=78]=`PartnerProfile`,e[e.LearningLevel=79]=`LearningLevel`,e}({}),HT={left:`_left_1r3w0_1`,leftWithImage:`_leftWithImage_1r3w0_10`,bgCover:`_bgCover_1r3w0_14`,bgFull:`_bgFull_1r3w0_17`,right:`_right_1r3w0_20`,rightContent:`_rightContent_1r3w0_28`,narrowContent:`_narrowContent_1r3w0_34`,logo:`_logo_1r3w0_37`,buttonContainer:`_buttonContainer_1r3w0_43`,blur:`_blur_1r3w0_53`,imageContainer:`_imageContainer_1r3w0_65`,imagePosition:`_imagePosition_1r3w0_73`,image:`_image_1r3w0_65`,thumbnail:`_thumbnail_1r3w0_87`,tallposter:`_tallposter_1r3w0_90`,cover:`_cover_1r3w0_96`,contentBody:`_contentBody_1r3w0_102`,contentBodyBase:`_contentBodyBase_1r3w0_106`};function UT(e){switch(e){case VT.Video:case VT.Interactive:case VT.Clip:return HT.thumbnail;case VT.Subject:case VT.Playlist:return HT.cover;case VT.Series:return HT.tallposter;default:return``}}function WT(e){return(0,Q.jsx)(`div`,{className:`d-flex`,children:e.children})}function GT(e){return(0,Q.jsx)(`div`,{className:`${HT.left} ${e.className?e.className:``}`,children:e.children})}function KT(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState(``);return Z.useEffect(()=>{if(!e.imageUrl){let t=e.fallbackImages[Math.floor(Math.random()*e.fallbackImages.length)];i(t.bgUrl);return}let t=new Image;return t.onload=()=>n(!0),t.src=e.imageUrl,()=>t.onload=null},[e.imageUrl]),(0,Q.jsx)(`div`,{className:`${HT.left} ${HT.leftWithImage} ${HT.bgCover} bg-light`,style:{backgroundImage:r?`url('${r}')`:``},children:t&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{className:HT.blur,style:{backgroundImage:`url('${e.imageUrl}')`}}),(0,Q.jsx)(`div`,{className:`${HT.imageContainer} ${UT(e.objectType)}`,children:(0,Q.jsx)(`div`,{className:HT.imagePosition,children:(0,Q.jsx)(`img`,{className:HT.image,src:e.imageUrl,alt:e.title})})})]})})}function qT(e){let[t,n]=Z.useState(``);return Z.useEffect(()=>{let t=e.images[Math.floor(Math.random()*e.images.length)];n(t.bgUrl)},[]),(0,Q.jsx)(`div`,{className:`${HT.left} bg-blue d-flex align-items-center`,children:t&&(0,Q.jsx)(`img`,{className:`img-fluid`,src:t,draggable:!1})})}var JT={cover:HT.bgCover,full:HT.bgFull};function YT(e){let t={backgroundImage:e.imageUrl?`url("${e.imageUrl}")`:``};return e.backgroundColor&&(t.backgroundColor=e.backgroundColor),(0,Q.jsx)(`div`,{className:`${HT.left} ${HT.leftWithImage} ${JT[e.imageSize||`cover`]} d-flex align-items-center`,style:t,title:e.title})}function XT(e){return(0,Q.jsx)(`div`,{className:`${HT.right} ${e.className?e.className:``}`,children:e.children})}function ZT(e){let t=e?.logoComponent||BT;return(0,Q.jsxs)(`div`,{className:`position-relative`,children:[!!e.bannerComponent&&e.bannerComponent,(0,Q.jsx)(`div`,{className:td(HT.logo,`position-absolute`,e.className?.logoContainer),children:(0,Q.jsx)(t,{})}),e.children]})}function QT(e){return(0,Q.jsx)(`div`,{className:td(HT.rightContent,`d-flex flex-column justify-content-center h-100`,e?.className),children:e.children})}var $T={base:HT.contentBodyBase,full:``};function eE(e){let t=$T[e.width||`base`];return(0,Q.jsx)(`div`,{className:td(HT.contentBody,t,`m-auto p-3`,e.className),children:e.children})}WT.NarrowContent=tE;function tE(e){return(0,Q.jsx)(`div`,{className:`${HT.narrowContent} mx-auto w-100 ${e.className?e.className:``}`,children:e.children})}function nE(e){return(0,Q.jsx)(`div`,{className:td(`position-fixed bg-white d-flex align-items-center`,HT.buttonContainer,e?.className),children:e.children})}WT.Left=GT,WT.LeftImage=KT,WT.LeftProductImage=qT,WT.LeftImageWithBackground=YT,WT.Right=XT,WT.Header=ZT,WT.Content=QT,WT.ContentBody=eE,WT.Buttons=nE;function rE(){function e(n){n.key===`Tab`&&(document.body.classList.add(`user-is-tabbing`),window.removeEventListener(`keydown`,e),window.addEventListener(`mousedown`,t))}function t(){document.body.classList.remove(`user-is-tabbing`),window.removeEventListener(`mousedown`,t),window.addEventListener(`keydown`,e)}(0,Z.useEffect)(()=>(window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)),[])}var iE={full:`_full_vw1kz_1`,themeBannerClearance:`_themeBannerClearance_vw1kz_9`};function aE(e){return e.imageType===`background`?(0,Q.jsx)(WT.LeftImageWithBackground,{imageUrl:e.imageUrl}):e.imageType===`image`?(0,Q.jsx)(WT.LeftImageWithBackground,{imageUrl:e.imageUrl,imageSize:`full`,backgroundColor:e.backgroundColor,title:e.title}):(0,Q.jsx)(Q.Fragment,{})}function oE(e){let{children:t,footer:n,bannerType:r,theme:i}=e,[a,o]=Z.useState(null);rE();let{imageUrls:s,imageType:c,backgroundColor:l,banner:u,title:d,logoComponent:f,bannerSpacer:p}=Id.getDefinition(i),m=s[e.geoLocation?.countryCode?.toLowerCase()]||s.default;Z.useEffect(()=>{o(m[Math.floor(Math.random()*m.length)])},[]);let h=c!==`none`,g=!!r,_=[`plugin`].includes(r);return(0,Q.jsxs)(WT,{children:[h&&(0,Q.jsx)(aE,{title:d,imageUrl:a,imageType:c,backgroundColor:l}),(0,Q.jsxs)(WT.Right,{className:td(!h&&iE.full),children:[(0,Q.jsx)(WT.Header,{bannerComponent:!!u&&(0,Q.jsx)(Sd,{bannerType:u}),logoComponent:f,className:{logoContainer:!!u&&iE.themeBannerClearance}}),(0,Q.jsxs)(WT.Content,{className:td(!h&&`px-0 w-100`,`pb-0`),children:[!_&&(0,Q.jsx)(Sd,{bannerType:r}),(0,Q.jsxs)(WT.ContentBody,{children:[t,!_&&g&&(0,Q.jsx)(p,{})]}),(0,Q.jsx)(RT,{...n})]})]})]})}function sE(e){let{step:t,returnUrl:n,data:r={},footer:i,geoLocation:a,theme:o,additionalData:s}=e,[c,l]=Z.useReducer(FT,{step:t,returnUrl:n,geoLocation:a,theme:o,additionalData:s,...r});function u(e){l({type:`navigate`,data:e})}let d=MT[c.step];return d||Rd({step:t,data:r},null),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(oE,{footer:{...i,...c},bannerType:c.bannerType,step:t,theme:o,geoLocation:a,children:!!d&&(0,Q.jsx)(d,{navigate:u,dispatch:l,...c})}),!1]})}function cE(e){let{id:t,returnUrl:n,footer:r,region:i,config:a,theme:o,additionalData:s}=e,c=e.currentStep||{};(0,Wu.createRoot)(document.getElementById(t)).render((0,Q.jsx)(sE,{returnUrl:n,step:c.step,data:{...a,...c.data},footer:r,geoLocation:i,theme:c.data?.theme||o,additionalData:s}))}window.cvauth={start:cE};
|
|
30
|
+
//# sourceMappingURL=index-DBemvgj7.js.map
|