var __awaiter=this&&this.__awaiter||function(e,t,i,r){function a(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function n(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):a(e.value).then(n,o)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,a,s,n;return n={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function o(e){return function(t){return l([e,t])}}function l(n){if(r)throw new TypeError("Generator is already executing.");while(i)try{if(r=1,a&&(s=n[0]&2?a["return"]:n[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,n[1])).done)return s;if(a=0,s)n=[n[0]&2,s.value];switch(n[0]){case 0:case 1:s=n;break;case 4:i.label++;return{value:n[1],done:false};case 5:i.label++;a=n[1];n=[0];continue;case 7:n=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(n[0]===6||n[0]===2)){i=0;continue}if(n[0]===3&&(!s||n[1]>s[0]&&n[1]<s[3])){i.label=n[1];break}if(n[0]===6&&i.label<s[1]){i.label=s[1];s=n;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(n);break}if(s[2])i.ops.pop();i.trys.pop();continue}n=t.call(e,i)}catch(e){n=[6,e];a=0}finally{r=s=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-38ad4957.js";import{n as h}from"./dom-context-hooks.module-50442785.js";import{i as isDemo,s as setUserIdentity}from"./index.module-b23fdad8.js";import"./jsonpointer-388a7082.js";import{c as cjs}from"./cjs-bdfb4486.js";import"./JSS-67b5cff8.js";import"./mixins-f750863a.js";import"./useRegistrationFormState-2c090c38.js";import{E as EmailRegistrationView}from"./email-registration-view-4cdb4129.js";import{u as useInstantAccessRegistration}from"./useInstantAccessRegistration-69fefed0.js";var InstantAccessRegistration=function(){function e(e){registerInstance(this,e);this.ignored=true;this.emailLabel="Email";this.firstNameLabel="First Name";this.lastNameLabel="Last Name";this.registerLabel="Start Referring";this.includeName=false;this.hideBorder=false;this.requiredFieldErrorMessage="Cannot be empty";this.invalidEmailErrorMessage="Please enter a valid email address";this.networkErrorMessage="There was a problem signing you in. Please wait a moment and try again. If this problem continues, contact Support for help resolving this issue.";this.paddingTop="large";this.paddingRight="large";this.paddingBottom="large";this.paddingLeft="large";this.backgroundColor="var(--sqm-portal-background)";this.includeCookies=false;h(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=isDemo()?useRegistrationDemo(this):useInstantAccessRegistration(this),t=e.states,i=e.callbacks;var r={emailLabel:this.emailLabel,registerLabel:this.registerLabel,firstNameLabel:this.firstNameLabel,lastNameLabel:this.lastNameLabel,includeName:this.includeName,hideBorder:this.hideBorder,invalidEmailErrorMessage:this.invalidEmailErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,paddingTop:this.paddingTop,paddingBottom:this.paddingBottom,paddingLeft:this.paddingLeft,paddingRight:this.paddingRight,backgroundColor:this.backgroundColor,topSlot:h$1("slot",{name:"top"}),bottomSlot:h$1("slot",{name:"bottom"})};return h$1(EmailRegistrationView,{states:t,callbacks:i,content:r})};return e}();function useRegistrationDemo(e){var t=this;var i=function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){setUserIdentity({id:"referrer@example.com",accountId:"referrer@example.com",jwt:"eyJraWQiOiJlNjI2NzQxNy1jMzZlLTRlM2EtYjM5NS1lYTFmY2YyNmU3YzIiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjbVZtWlhKeVpYSkFaWGhoYlhCc1pTNWpiMjA9OmNtVm1aWEp5WlhKQVpYaGhiWEJzWlM1amIyMD1AdGVzdF9heGJndGF0dzF0Y2NwOnVzZXJzIiwicGFzc3dvcmRsZXNzIjp0cnVlLCJpc3MiOiJodHRwczovL3N0YWdpbmcucmVmZXJyYWxzYWFzcXVhdGNoLmNvbS8iLCJleHAiOjE2ODA4ODU5MTksImlhdCI6MTY4MDc5OTUxOX0.kjmTVVf_BTb-uMNKnadLyNLxMFwpkefsY02O3iAfBVIJJZZfeZMwunPlKsS3Vbp28aYRClBjH5Wj4pYxDn23D0CdZx8KNCqiJ8yF6149O9SPMkRseoJkliqS6LyvMOEDjGDkuLfcC8_hq1AHBXFt5BdCtWOk1gwf_5R9A0w5gXEIvprBzbNDLbuo88bVAlrmFNvfttXXryrpUeruMal7cBKuy02YblBrB4kKoyJiprU5GLEjciBA4A56u8TwQc0kbsPf2YcQaJsY_IvkC7S1u4sPyObpq6iF6Ed8UYHAo6nU5KjZXyVtoUyeIS11mf_6OtDO6LyMNHV2FtEUUDdPCg"});return[2]}))}))};return cjs({states:{loading:false,error:""},callbacks:{submit:i}},e.demoData||{},{arrayMerge:function(e,t){return t}})}export{InstantAccessRegistration as sqm_instant_access_registration};