@saasquatch/mint-components 1.14.6-2 → 1.14.6-4

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.
Files changed (86) hide show
  1. package/dist/cjs/{ShadowViewAddon-c0a5fdf8.js → ShadowViewAddon-40f0bc74.js} +58 -26
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-big-stat_42.cjs.entry.js +84 -116
  5. package/dist/cjs/sqm-lead-dropdown-field-view-69513385.js +69 -0
  6. package/dist/cjs/sqm-lead-dropdown-field.cjs.entry.js +75 -0
  7. package/dist/cjs/sqm-lead-input-field-view-e2373fc6.js +51 -0
  8. package/dist/cjs/sqm-lead-input-field.cjs.entry.js +86 -0
  9. package/dist/cjs/sqm-stencilbook.cjs.entry.js +166 -49
  10. package/dist/cjs/useLeadFormState-c83d2034.js +72 -0
  11. package/dist/collection/collection-manifest.json +2 -0
  12. package/dist/collection/components/sqm-lead-form/LeadForm.stories.js +34 -46
  13. package/dist/collection/components/sqm-lead-form/LeadFormDropdownField.stories.js +59 -0
  14. package/dist/collection/components/sqm-lead-form/LeadInputField.stories.js +48 -0
  15. package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field-view.js +65 -0
  16. package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field.js +193 -0
  17. package/dist/collection/components/sqm-lead-form/sqm-lead-form-view.js +59 -26
  18. package/dist/collection/components/sqm-lead-form/sqm-lead-form.js +147 -36
  19. package/dist/collection/components/sqm-lead-form/sqm-lead-input-field-view.js +47 -0
  20. package/dist/collection/components/sqm-lead-form/sqm-lead-input-field.js +248 -0
  21. package/dist/collection/components/sqm-lead-form/useLeadDropdownField.js +10 -0
  22. package/dist/collection/components/sqm-lead-form/useLeadForm.js +8 -5
  23. package/dist/collection/components/sqm-lead-form/useLeadInputField.js +10 -0
  24. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +4 -0
  25. package/dist/esm/{ShadowViewAddon-aa7177fe.js → ShadowViewAddon-8a0d9e83.js} +58 -26
  26. package/dist/esm/loader.js +1 -1
  27. package/dist/esm/mint-components.js +1 -1
  28. package/dist/esm/sqm-big-stat_42.entry.js +81 -113
  29. package/dist/esm/sqm-lead-dropdown-field-view-0f91101f.js +67 -0
  30. package/dist/esm/sqm-lead-dropdown-field.entry.js +71 -0
  31. package/dist/esm/sqm-lead-input-field-view-6bc3aae8.js +49 -0
  32. package/dist/esm/sqm-lead-input-field.entry.js +82 -0
  33. package/dist/esm/sqm-stencilbook.entry.js +166 -49
  34. package/dist/esm/useLeadFormState-9016d812.js +68 -0
  35. package/dist/esm-es5/{ShadowViewAddon-aa7177fe.js → ShadowViewAddon-8a0d9e83.js} +1 -1
  36. package/dist/esm-es5/loader.js +1 -1
  37. package/dist/esm-es5/mint-components.js +1 -1
  38. package/dist/esm-es5/sqm-big-stat_42.entry.js +1 -1
  39. package/dist/esm-es5/sqm-lead-dropdown-field-view-0f91101f.js +1 -0
  40. package/dist/esm-es5/sqm-lead-dropdown-field.entry.js +1 -0
  41. package/dist/esm-es5/sqm-lead-input-field-view-6bc3aae8.js +1 -0
  42. package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -0
  43. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  44. package/dist/esm-es5/useLeadFormState-9016d812.js +1 -0
  45. package/dist/mint-components/mint-components.esm.js +1 -1
  46. package/dist/mint-components/p-12f4bb08.system.entry.js +1 -0
  47. package/dist/mint-components/p-13c67985.system.entry.js +1 -0
  48. package/dist/mint-components/p-1d704c40.system.js +1 -0
  49. package/dist/mint-components/p-37996351.system.js +1 -1
  50. package/dist/mint-components/{p-373a92a2.js → p-4139feb5.js} +3 -3
  51. package/dist/mint-components/p-47144172.system.entry.js +1 -0
  52. package/dist/mint-components/p-4e42e6a1.entry.js +1 -0
  53. package/dist/mint-components/p-506e7681.js +1 -0
  54. package/dist/mint-components/p-68acdfe8.system.js +1 -0
  55. package/dist/mint-components/p-6c57e7e6.js +1 -0
  56. package/dist/mint-components/{p-8dc110b0.entry.js → p-a15b3197.entry.js} +2 -2
  57. package/dist/mint-components/{p-72e5e84f.system.js → p-ad6420a2.system.js} +1 -1
  58. package/dist/mint-components/p-daf77001.system.js +1 -0
  59. package/dist/mint-components/p-db412748.system.entry.js +1 -0
  60. package/dist/mint-components/p-e358f0c1.entry.js +265 -0
  61. package/dist/mint-components/p-f16bd3ab.entry.js +1 -0
  62. package/dist/mint-components/p-f98a4354.js +1 -0
  63. package/dist/types/components/sqm-lead-form/LeadForm.stories.d.ts +1 -0
  64. package/dist/types/components/sqm-lead-form/LeadFormDropdownField.stories.d.ts +9 -0
  65. package/dist/types/components/sqm-lead-form/LeadInputField.stories.d.ts +8 -0
  66. package/dist/types/components/sqm-lead-form/sqm-lead-dropdown-field-view.d.ts +16 -0
  67. package/dist/types/components/sqm-lead-form/sqm-lead-dropdown-field.d.ts +42 -0
  68. package/dist/types/components/sqm-lead-form/sqm-lead-form-view.d.ts +7 -0
  69. package/dist/types/components/sqm-lead-form/sqm-lead-form.d.ts +24 -7
  70. package/dist/types/components/sqm-lead-form/sqm-lead-input-field-view.d.ts +15 -0
  71. package/dist/types/components/sqm-lead-form/sqm-lead-input-field.d.ts +50 -0
  72. package/dist/types/components/sqm-lead-form/useLeadDropdownField.d.ts +6 -0
  73. package/dist/types/components/sqm-lead-form/useLeadForm.d.ts +4 -0
  74. package/dist/types/components/sqm-lead-form/useLeadInputField.d.ts +6 -0
  75. package/dist/types/components.d.ts +196 -12
  76. package/docs/docs.docx +0 -0
  77. package/docs/raisins.json +1 -1
  78. package/grapesjs/grapesjs.js +1 -1
  79. package/package.json +1 -1
  80. package/dist/mint-components/p-02a6e0df.system.entry.js +0 -1
  81. package/dist/mint-components/p-0c6ab3ec.system.entry.js +0 -1
  82. package/dist/mint-components/p-6349fb7c.entry.js +0 -265
  83. package/dist/types/global/android.d.ts +0 -7
  84. package/dist/types/global/demo.d.ts +0 -2
  85. package/dist/types/stories/features.d.ts +0 -4
  86. package/dist/types/stories/templates.d.ts +0 -4
@@ -0,0 +1 @@
1
+ System.register(["./p-f26aedcd.system.js","./p-bdb7d451.system.js","./p-1a673057.system.js","./p-cd1d497f.system.js"],(function(e){"use strict";var r,t,a,i,l;return{setters:[function(e){r=e.h},function(e){t=e.i},function(e){a=e.j;i=e.a},function(e){l=e.E}],execute:function(){e("L",u);var s={ErrorStyle:l,FieldContainer:{"margin-bottom":"var(--sl-spacing-large)"}};var d="\n:host {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\n";a.setup(i());var n=a.createStyleSheet(s);var o=n.toString();function u(e){var a,i,l,s,u,v;var f=e.states,c=e.content;var b=function(e){var r=e.fieldLabel;return t.formatMessage({id:"requiredFieldErrorMessage",defaultMessage:c.requiredFieldErrorMessage},{fieldLabel:r})};return r("div",{part:"sqm-base"},r("style",{type:"text/css"},d,o),r("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",name:"/"+c.fieldName,type:c.fieldType,label:c.fieldLabel},!c.fieldOptional?{required:true}:[],{disabled:((a=f.leadFormState)===null||a===void 0?void 0:a.loading)||((i=f.leadFormState)===null||i===void 0?void 0:i.disabled),required:c.required,validationError:function(e){var r=e.value;if(!r){return b({fieldLabel:c.fieldLabel})}}},((s=(l=f.leadFormState)===null||l===void 0?void 0:l.validationErrors)===null||s===void 0?void 0:s.firstName)?{class:n.classes.ErrorStyle,helpText:((v=(u=f.leadFormState)===null||u===void 0?void 0:u.validationErrors)===null||v===void 0?void 0:v.firstName)||c.requiredFieldErrorMessage}:[])))}}}}));
@@ -0,0 +1 @@
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e};return __assign.apply(this,arguments)};System.register(["./p-f26aedcd.system.js","./p-48135f99.system.js","./p-bdb7d451.system.js","./p-6cd4f2b1.system.js","./p-4bd679a7.system.js","./p-6333265f.system.js","./p-1a673057.system.js","./p-cd1d497f.system.js","./p-1d704c40.system.js","./p-daf77001.system.js"],(function(e){"use strict";var t,s,i,n,r,a,o,f,u,d,c;return{setters:[function(e){t=e.r;s=e.h},function(e){i=e.i;n=e.n},function(){},function(e){r=e.i},function(e){a=e.c},function(e){o=e.g;f=e.a},function(){},function(){},function(e){u=e.L;d=e.R},function(e){c=e.L}],execute:function(){function l(){var e=i(u);return{states:{leadFormState:e}}}var p=e("sqm_lead_input_field",function(){function e(e){t(this,e);this.ignored=true;this.required=false;this.fieldType="text";this.requiredFieldErrorMessage="Please enter a {fieldName}";this.fieldOptional=false;n(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=__assign({},o(this));var t=f([{attribute:"field-name",value:this.fieldName}]);if(!r()&&t){return s(d,{missingProps:t,heading:"An error occured while loading this form",subheading:"A technical problem prevented this input field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"})}var i=(r()?h(this):l()).states;return s(c,{states:i,content:e})};return e}());function h(e){return a({states:{leadForState:{}},content:{fieldName:e.fieldName,fieldLabel:e.fieldLabel,fieldType:e.fieldType,requiredFieldErrorMessage:e.requiredFieldErrorMessage,required:e.required}},e.demoData||{},{arrayMerge:function(e,t){return t}})}}}}));
@@ -0,0 +1,265 @@
1
+ import{r as e,h as t,c as r}from"./p-f708da7b.js";import{n as s,f as a,i,k as n,m as o,u as l,b as c,j as d}from"./p-cd651f81.js";import{i as u}from"./p-65069b66.js";import{i as h,_ as m,d as p,J as v,H as g,$ as f,w as b,B as y,u as x,L as w,y as k,j as E,r as C,V as I,Q as R,k as S}from"./p-94a876b9.js";import{j as _}from"./p-e7e129ac.js";import{c as N}from"./p-c1086930.js";import{g as T,a as M}from"./p-9ec99ced.js";import{c as q}from"./p-cef45012.js";import"./p-3f7b81b8.js";import"./p-91521e9d.js";import{C as A}from"./p-31015791.js";import{a as L}from"./p-4e451f75.js";import{u as D}from"./p-19ccb4ce.js";import"./p-5bedb58c.js";import"./p-c9f1dde7.js";import{p as P}from"./p-8d363802.js";import{R as F,u as O}from"./p-98698131.js";import{R as V,u as $}from"./p-f98a4354.js";import{P as j}from"./p-dbcb5359.js";import{u as U}from"./p-4e526a94.js";import{A as B}from"./p-121cdc60.js";import{i as z}from"./p-8c23d1b8.js";import{b as H,V as W,B as G,Q as K,J as Y,i as Z,K as Q,D as X,E as J,H as ee,I as te,O as re,W as se,L as ae,N as ie,C as ne,d as oe,h as le,P as ce,e as de,R as ue,X as he,j as me,a as pe,S as ve,u as ge,c as fe,T as be}from"./p-4139feb5.js";import"./p-a9f4ddb1.js";import{u as ye}from"./p-11dff275.js";const xe=class{constructor(t){e(this,t),this.flexReverse=!1,this.ignored=!0,s(this)}disconnectedCallback(){}render(){var e;const{props:r,label:s}=h()?H(this):W(this),a=!!(null===(e=m().innerHTML)||void 0===e?void 0:e.trim()),i=t("slot",{name:"label"},a?t("slot",null):s);return t(G,Object.assign({},r,{labelSlot:i}))}},we=class{constructor(t){e(this,t),s(this)}disconnectedCallback(){}render(){var e,s;const i=null!==(e=function(e){if(e)try{return K(e)}catch{}}(this.brandColor))&&void 0!==e?e:"",n=(null!==(s=this.brandFont)&&void 0!==s?s:"Nunito Sans").trim()||void 0;a((()=>{if(!n)return;const e=document.createElement("link");return e.setAttribute("href",function(...e){return`https://fonts.googleapis.com/css2?${e.map((e=>`family=${encodeURIComponent(e)}`)).join("&")}`}(n)),e.setAttribute("rel","stylesheet"),document.head.appendChild(e),()=>document.head.removeChild(e)}),[n]);const o=null!=n?n:"";return t(r,null,t("style",null,`\n\n :host{\n display: contents;\n }\n /* \n Selects any element placed inside a slot\n - resets css variable inheritence for fonts\n \n */\n ::slotted(*) {\n --sl-font-sans: "${o}", arial;\n --sl-input-font-family: "${o}", arial;\n --sl-tooltip-font-family: "${o}", arial;\n font-family: "${o}", arial;\n\t\t\t\n ${i}\n\n --sl-focus-ring-color-primary: var(--sl-color-primary-100);\n --sl-input-border-color-focus: var(--sl-color-primary-500);\n --sl-color-primary-hue: var(--sl-color-primary-500);\n }`),t("slot",null))}},ke=class{constructor(t){e(this,t),this.ignored=!0,this.width=347,this.gap=24,s(this)}disconnectedCallback(){}render(){return t(Y,Object.assign({},T(this)),t("slot",null))}};function Ee(e){var t;const r=i(F),[s,o]=n(!1);return a((()=>{var t,s;(null===(t=null==r?void 0:r.initialData)||void 0===t?void 0:t[e.checkboxName])&&o(!!(null===(s=null==r?void 0:r.initialData)||void 0===s?void 0:s[e.checkboxName]))}),[null===(t=null==r?void 0:r.initialData)||void 0===t?void 0:t[e.checkboxName]]),{states:{registrationFormState:r,checked:s},callbacks:{setChecked:o}}}const Ce=class{constructor(t){e(this,t),this.ignored=!0,this.checkboxLabel="By signing up you agree to the {labelLink}",this.checkboxLabelLink="https://example.com",this.checkboxLabelLinkText="Terms and Conditions",this.errorMessage="Must be checked",this.checkboxOptional=!1,s(this)}disconnectedCallback(){}render(){const e=M([{attribute:"checkbox-name",value:this.checkboxName}]);if(!h()&&e)return t(V,{missingProps:e,heading:"An error occured while loading this form",subheading:"A technical problem prevented this checkbox field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"});const r={...T(this)},{states:s,callbacks:a}=h()?N({states:{registrationFormState:{},checked:!1},callbacks:{setChecked:()=>{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):Ee(this);return t(Z,{states:s,content:r,callbacks:a})}},Ie=p.gql`
2
+ query fuelTankRewardsQuery($programId: ID!) {
3
+ user: viewer {
4
+ ... on User {
5
+ instantAccessRewards(
6
+ filter: { type_eq: FUELTANK, programId_eq: $programId }
7
+ ) {
8
+ data {
9
+ fuelTankCode
10
+ fuelTankType
11
+ statuses
12
+ dateGiven
13
+ dateExpires
14
+ dateRedeemed
15
+ dateCancelled
16
+ dateScheduledFor
17
+ datePendingForUnhandledError
18
+ pendingReasons
19
+ }
20
+ count
21
+ totalCount
22
+ }
23
+ }
24
+ }
25
+ }
26
+ `,Re=p.gql`
27
+ mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
28
+ createUserAnalyticsEvent(eventMeta: $eventMeta)
29
+ }
30
+ `;const Se=class{constructor(t){e(this,t),this.tooltiptext="Copied to Clipboard",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Coupon",this.buttonStyle="icon",this.couponCodeLabel="Your coupon code:",this.cancelledErrorText="This code has been cancelled. Please reach out to the Support team for help resolving this issue.",this.redeemedErrorText="Looks like you’ve already redeemed this code.",this.expiredErrorText="Looks like this code has expired. Please reach out to the Support team for help resolving this issue.",this.fullfillmentErrorText="We couldn't fetch your code. Please try again later or reach out to the Support team for help resolving this issue.",this.pendingErrorText="Your code will be available on {unpendDate}. Mark your calendar and come back then to redeem your reward!",this.codeSyncErrorRetryText="We're experiencing an issue generating your coupon code. If it doesn't appear shortly, please contact {supportEmail}. Retrying in {timeRemaining} seconds.",this.codeSyncErrorText="We're still experiencing an issue generating your coupon code. Please contact {supportEmail} for assistance.",this.genericErrorText="We couldn't fetch your code. Please try again later or reach out to the Support team for help resolving this issue.",this.couponCodePlaceholder="...",s(this)}disconnectedCallback(){}render(){const e=T(this),r=h()?function(e){const[t,r]=n(!1),s="THANKSJANE125uv125";return N({copyString:s,tooltiptext:e.tooltiptext,textAlign:e.textAlign,buttonStyle:e.buttonStyle,copyButtonLabel:e.copyButtonLabel,error:!1,couponCodePlaceholder:e.couponCodePlaceholder,couponCodeLabel:e.couponCodeLabel,codeSyncErrorText:e.codeSyncErrorText,codeSyncErrorRetryText:e.codeSyncErrorRetryText,open:t,onClick:()=>{navigator.clipboard.writeText(s),r(!0),setTimeout((()=>r(!1)),e.tooltiplifespan)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):function(e){var t,r,s;const i=v(),l=g(),c=y(),[d]=f(Re),[h,m]=n(!1),[p,x]=n(60),w=o(void 0),k=o(void 0),{data:E,loading:C,refetch:I}=b(Ie,{programId:l},!(null==i?void 0:i.jwt));async function R(){var e,t,r,s,a,i;const n=await I();if(m(!0),!(null===(i=null===(a=null===(s=null===(r=null===(t=null===(e=n)||void 0===e?void 0:e.user)||void 0===t?void 0:t.instantAccessRewards)||void 0===r?void 0:r.data)||void 0===s?void 0:s[0])||void 0===a?void 0:a.pendingReasons)||void 0===i?void 0:i.includes("ERROR_SYNCING_FUEL_TANK_CODE")))return clearInterval(w.current)}const S=null===(s=null===(r=null===(t=null==E?void 0:E.user)||void 0===t?void 0:t.instantAccessRewards)||void 0===r?void 0:r.data)||void 0===s?void 0:s[0],_=(e=61e3)=>setInterval(R,e);a((()=>{var e,t;return!w.current&&(null===(e=null==S?void 0:S.statuses)||void 0===e?void 0:e.includes("PENDING"))&&(null===(t=null==S?void 0:S.pendingReasons)||void 0===t?void 0:t.includes("ERROR_SYNCING_FUEL_TANK_CODE"))&&(w.current=_()),()=>{clearInterval(w.current)}}),[]),a((()=>{var e,t;return p>0&&(null===(e=null==S?void 0:S.statuses)||void 0===e?void 0:e.includes("PENDING"))&&(null===(t=null==S?void 0:S.pendingReasons)||void 0===t?void 0:t.includes("ERROR_SYNCING_FUEL_TANK_CODE"))&&(clearInterval(k.current),k.current=(e=>setInterval((()=>x(e)),1e3))(p-1)),()=>{clearInterval(k.current)}}),[p,S]),a((()=>{var e,t;(null===(e=null==S?void 0:S.statuses)||void 0===e?void 0:e.includes("PENDING"))&&(null===(t=null==S?void 0:S.pendingReasons)||void 0===t?void 0:t.includes("ERROR_SYNCING_FUEL_TANK_CODE"))&&_()}),[S]);const N=(e=>{if(!e||!e.statuses)return"ERROR";const t=e.statuses[e.statuses.length-1];return"PENDING"===t&&e.pendingReasons.includes("ERROR_SYNCING_FUEL_TANK_CODE")?"ERROR_SYNCING_FUEL_TANK_CODE":"PENDING"===t&&null===e.dateScheduledFor?"EMPTY_TANK":t})(S),T="PENDING"===N&&S.dateScheduledFor?new Date(S.dateScheduledFor).toLocaleDateString("default",{day:"numeric",month:"long",year:"numeric"}):void 0,M=(null==S?void 0:S.fuelTankCode)||"...",[q,A]=n(!1),L=(t=>{switch(t){case"CANCELLED":return e.cancelledErrorText;case"EXPIRED":return e.expiredErrorText;case"EMPTY_TANK":return e.fullfillmentErrorText;case"ERROR_SYNCING_FUEL_TANK_CODE":return h?u.formatMessage({id:"codeSyncErrorText",defaultMessage:e.codeSyncErrorText},{supportEmail:"advocate-support@impact.com"}):u.formatMessage({id:"codeSyncErrorText",defaultMessage:e.codeSyncErrorRetryText},{supportEmail:"advocate-support@impact.com",timeRemaining:p});case"PENDING":return e.pendingErrorText.replace("{unpendDate}",T);case"REDEEMED":return e.redeemedErrorText;case"AVAILABLE":return"";default:return e.genericErrorText}})(N),D=(e=>{switch(e){case"EXPIRED":case"EMPTY_TANK":case"CANCELLED":case"ERROR":case"ERROR_SYNCING_FUEL_TANK_CODE":return"warning";case"PENDING":return"info";case"REDEEMED":return"success";default:return}})(N),P="AVAILABLE"!==N;return{...e,onClick:function(){navigator.clipboard.writeText(M),A(!0),setTimeout((()=>A(!1)),e.tooltiplifespan),d({eventMeta:{programId:l,id:null==i?void 0:i.id,accountId:null==i?void 0:i.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:c,shareMedium:"DIRECT"}}})},open:q,copyString:M,error:P,errorText:L,dateAvailable:T,loading:C,errorType:D}}(e);return t(Q,Object.assign({},r))}};function _e(e,r){const s=()=>"row"===e.direction?{"border-right":e.dividerStyle||"1px solid #EAEAEA"}:{"border-bottom":e.dividerStyle||"1px solid #EAEAEA"},a={LayoutContainer:{display:"contents","& > :not(:last-child)":{...s()},"& > ::slotted(*:not(:last-child))":{...s()}}},i=`\n display: flex;\n flex: 1;\n box-sizing: border-box;\n flex-direction: ${e.direction};\n background-color: var(--sqm-content-background);\n overflow-x: clip;\n ${"column"===e.direction?"width: 100%; max-width: var(--sqm-portal-main-width);":""}\n ${null!==e.contentAreaWidth?`max-width: ${e.contentAreaWidth} !important;`:""}\n `,n=`\n :host{\n ${i}\n }\n @media screen and (max-width: 570px) {\n :host {\n display: flex;\n flex-direction: column;\n }\n }\n sqm-divided-layout {\n ${i}\n }\n `,o=q(a),l=o.toString();return t("div",{class:o.classes.LayoutContainer,part:"sqm-base"},t("style",{type:"text/css"},n,l),r)}const Ne=class{constructor(t){e(this,t),this.dividerStyle="1px solid #EAEAEA",s(this)}disconnectedCallback(){}render(){return t(_e,Object.assign({},T(this)),t("slot",null))}},Te=class{constructor(t){e(this,t),this.ignored=!0,this.dropdownLabel="Select an option",this.errorMessage="Select an option",this.dropdownOptional=!1,s(this)}disconnectedCallback(){}render(){const e=M([{attribute:"dropdown-name",value:this.dropdownName}]);if(!h()&&e)return t(V,{missingProps:e,heading:"An error occured while loading this form",subheading:"A technical problem prevented this drop down field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"},t("slot",null));const r={...T(this),selectOptions:t("slot",null)},{states:s}=h()?N({states:{registrationFormState:{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):{states:{registrationFormState:i(F)}};return t(X,{states:s,content:r})}},Me=p.gql`
31
+ query {
32
+ viewer {
33
+ ... on User {
34
+ id
35
+ accountId
36
+ firstName
37
+ lastName
38
+ email
39
+ countryCode
40
+ }
41
+ }
42
+ }
43
+ `,qe=p.gql`
44
+ mutation (
45
+ $id: String!
46
+ $accountId: String!
47
+ $firstName: String!
48
+ $lastName: String!
49
+ ) {
50
+ upsertUser(
51
+ userInput: {
52
+ id: $id
53
+ accountId: $accountId
54
+ firstName: $firstName
55
+ lastName: $lastName
56
+ }
57
+ ) {
58
+ firstName
59
+ lastName
60
+ }
61
+ }
62
+ `,Ae={currentRegion:"",firstName:"",lastName:"",errors:{},error:""},Le=class{constructor(t){e(this,t),this.ignored=!0,this.networkErrorMessage="Network request failed.",this.fieldEmptyText="Cannot be empty",this.formErrorText="Please correct the errors below to update your profile.",s(this)}disconnectedCallback(){}render(){const e=h()?function(e){return N({states:{loading:!1,submitDisabled:!1,formState:{currentRegion:"Canada",firstName:"Bill",lastName:"Bob",errors:{},error:"An error string"},user:{firstName:"Bill",lastName:"Bob",email:"billbob@example.com"},showEdit:!1,text:{editprofileheader:e.editprofileheader?e.editprofileheader:"Edit Profile",editprofiletext:e.editprofiletext?e.editprofiletext:"Update your profile.",firstnametext:e.firstnametext?e.firstnametext:"First Name",lastnametext:e.lastnametext?e.lastnametext:"Last Name",canceltext:e.canceltext?e.canceltext:"Cancel",updatetext:e.updatetext?e.updatetext:"Update",currentregiontext:e.currentregiontext?e.currentregiontext:"Region",showregion:!0,fieldEmptyText:e.fieldEmptyText}},callbacks:{onSubmit:e=>{console.log(e)},resetForm:()=>{console.log("reset")},onChange:()=>{console.log("change")},setShowEdit:e=>{console.log(e)}}},e.demoData||{},{arrayMerge:(e,t)=>t})}(T(this)):function(e){const t=v(),[r,s]=n(!1),[i,o]=n(""),[l,c]=n(void 0),[d,h]=n(Ae),m=b(Me,{},!(null==t?void 0:t.jwt)),[p,g]=f(qe);return a((()=>{!(null==g?void 0:g.loading)&&r&&((null==g?void 0:g.errors)?h((e=>{var t,r,s;return{...e,error:null===(s=null===(r=null===(t=null==g?void 0:g.errors)||void 0===t?void 0:t.response)||void 0===r?void 0:r.errors)||void 0===s?void 0:s[0].message}})):(c((e=>{var t;return{...e,...null===(t=null==g?void 0:g.data)||void 0===t?void 0:t.upsertUser}})),s(!1)))}),[null==g?void 0:g.loading]),a((()=>{c((e=>{var t;return{...e,...null===(t=null==m?void 0:m.data)||void 0===t?void 0:t.viewer}}))}),[null==m?void 0:m.data]),a((()=>{var t;(null===(t=null==g?void 0:g.errors)||void 0===t?void 0:t.message)&&h((t=>({...t,error:e.networkErrorMessage})))}),[null==g?void 0:g.errors]),{states:{loading:(null==m?void 0:m.loading)||g.loading,submitDisabled:!1,formState:d,user:l,showEdit:r,text:{editprofileheader:e.editprofileheader,editprofiletext:e.editprofiletext,firstnametext:e.firstnametext,lastnametext:e.lastnametext,canceltext:e.canceltext,updatetext:e.updatetext,currentregiontext:e.currentregiontext,showregion:e.showregion,fieldEmptyText:e.fieldEmptyText}},callbacks:{onSubmit:()=>{if(d.firstName&&d.lastName)return p({id:null==t?void 0:t.id,accountId:null==t?void 0:t.accountId,firstName:d.firstName,lastName:d.lastName}),void h((e=>({...e,errors:{}})));const r={};d.firstName||(r.firstName={message:e.fieldEmptyText}),d.lastName||(r.lastName={message:e.fieldEmptyText}),z(r)||h((t=>({...t,error:e.formErrorText}))),h((e=>({...e,errors:r})))},resetForm:()=>{var e,t,r,s,a,i;const n=(null===(t=null===(e=null==m?void 0:m.data)||void 0===e?void 0:e.viewer)||void 0===t?void 0:t.countryCode)?u.formatDisplayName(m.data.viewer.countryCode,{type:"region"}):"";c({...null===(r=m.data)||void 0===r?void 0:r.viewer,...null===(s=g.data)||void 0===s?void 0:s.upsertUser}),h({...Ae,...null===(a=m.data)||void 0===a?void 0:a.viewer,...null===(i=g.data)||void 0===i?void 0:i.upsertUser,currentRegion:n})},onChange:e=>{const{name:t,value:r}=e.target;h((e=>({...e,[t]:r})))},setShowEdit:s}}}(T(this));return t(J,Object.assign({},e))}};Le.style=".ErrorStyles::part(base){background:var(--sl-color-danger-10);border-color:var(--sl-color-danger-500);outline:var(--sl-color-danger-500)}.ErrorStyles:host{--something-random:red;--focus-ring:0 0 0 var(--sl-focus-ring-width) red !important}.ErrorStyles::part(input){color:var(--sl-color-danger-500)}.ErrorStyles::part(input):-webkit-autofill,.ErrorStyles::part(input):-webkit-autofill:hover,.ErrorStyles::part(input):-webkit-autofill:focus,.ErrorStyles::part(input):-webkit-autofill:active{-webkit-box-shadow:0 0 0 var(--sl-input-height-large) var(--sl-input-background-color-hover) inset !important;box-shadow:0 0 0 var(--sl-input-height-large) var(--sl-input-background-color-hover) inset !important;-webkit-text-fill-color:var(--sl-color-danger-500)}.ErrorStyles::part(help-text){color:var(--sl-color-danger-500)}:host{display:block}:host([hidden]){display:none}.FormWrapper>:not(:first-child){margin-top:54px}.FormSection{width:100%}.FormSection>:not(:first-child){margin-top:16px}.ButtonWrapper{display:-ms-flexbox;display:flex;margin-top:24px;-ms-flex-pack:end;justify-content:flex-end}.ButtonWrapper>:not(:first-child){margin-left:var(--sl-font-size-x-small)}.CardWrapper{-webkit-box-sizing:border-box;box-sizing:border-box;background:var(--sl-color-white);padding:40px 30px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between}@media screen and (max-width: 499px){.CardWrapper{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}}@media screen and (max-width: 880px){.CardWrapper.ShowEdit{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}}";const De=class{constructor(t){e(this,t),this.columns=1,this.minHeight=200,this.background="var(--sl-color-gray-50)",this.paddingSize="large",this.wrapDirection="wrap",s(this)}disconnectedCallback(){}render(){const e={states:{...T(this)},content:{primaryColumn:t("slot",null),secondaryColumn:t("slot",{name:"secondary-column"})}};return t(ee,Object.assign({},e))}};function Pe(e,r){const s=Boolean((e.header||e.description||e.buttonText)&&"overlay"===e.layout),a=q({Container:{position:"relative","&:before":{content:s?'""':"",width:"100%",height:"100%",position:"absolute",background:e.overlayColor||"var(--sl-color-primary-900)",opacity:e.overlayOpacity}},Image:{display:"block",width:"100%",height:"100%",objectFit:"cover"},Background:{backgroundImage:`url(${e.imageUrl})`,backgroundSize:"cover",backgroundPosition:e.imagePos||"center",display:"flex",justifyContent:"center",alignItems:"center"},Overlay:{zIndex:"1",padding:"calc(var(--sl-spacing-"+e.paddingText+") + var(--sl-spacing-"+e.paddingImage+"))",textAlign:"center",color:e.textColor||"var(--sl-color-neutral-0)",lineHeight:"var(--sl-line-height-dense)","@media (max-width: 599px)":{padding:"var(--sl-spacing-"+e.paddingText+")"}},Column:{display:"flex",background:e.backgroundColor||"",flexDirection:"right"===e.imagePos?"row-reverse":"row",lineHeight:"var(--sl-line-height-dense)",color:e.textColor||"var(--sl-color-neutral-900)","& .image-area":{width:e.imagePercentage?e.imagePercentage+"%":"50%",padding:"var(--sl-spacing-"+e.paddingImage+")",boxSizing:"border-box",display:"flex",justifyContent:"center",alignItems:"center","@media (max-width: 599px)":{width:"100%"}},"& .text-area":{width:e.imagePercentage?100-e.imagePercentage+"%":"50%",padding:"var(--sl-spacing-"+e.paddingText+")",alignSelf:"center",boxSizing:"border-box","@media (max-width: 599px)":{width:"100%",textAlign:"center",padding:"calc(0.5*var(--sl-spacing-"+e.paddingText+"))"}},"@media (max-width: 599px)":{flexDirection:"bottom"===e.imageMobilePos?"column-reverse":"column"}},Header:{fontSize:"var(--sl-font-size-xxx-large)",fontWeight:"var(--sl-font-weight-bold)","@media (max-width: 599px)":{fontSize:"var(--sl-font-size-xx-large)"}},Description:{fontSize:"var(--sl-font-size-x-large)",margin:"var(--sl-spacing-small) 0","@media (max-width: 599px)":{fontSize:"var(--sl-font-size-large)"}},Button:{marginTop:"var(--sl-spacing-medium)","&::part(base)":{padding:"0 var(--sl-spacing-x-large)"},"@media (max-width: 599px)":{width:"100%"}}}),i=a.toString();return t("div",{class:a.classes.Container,part:"sqm-base"},t("style",{type:"text/css"},"\n :host{\n display: block;\n }",i),"overlay"===e.layout&&t("div",{class:a.classes.Background},t("div",{class:a.classes.Overlay,part:"sqm-overlay"},e.header&&t("div",{class:a.classes.Header},e.header),e.description&&t("div",{class:a.classes.Description},e.description),e.buttonText&&t("sl-button",{class:a.classes.Button,type:"primary",onClick:()=>e.buttonNewTab?window.open(e.buttonLink):window.open(e.buttonLink,"_parent")},e.buttonText),r&&r)),"columns"===e.layout&&t("div",null,t("div",{class:a.classes.Column},t("div",{class:"image-area"},t("img",{class:a.classes.Image,src:e.imageUrl,part:"sqm-columns-image"})),t("div",{class:"text-area",part:"sqm-columns-text-area"},e.header&&t("div",{class:a.classes.Header,part:"sqm-columns-header"},e.header),e.description&&t("div",{class:a.classes.Description,part:"sqm-columns-description"},e.description),e.buttonText&&t("sl-button",{exportparts:"base: sqm-hero-image-button",class:a.classes.Button,type:"primary",onClick:()=>e.buttonNewTab?window.open(e.buttonLink):window.open(e.buttonLink,"_parent")},e.buttonText)))))}const Fe=class{constructor(t){e(this,t),this.overlayOpacity="0.75",this.layout="overlay",this.imagePercentage=50,this.imagePos="center",this.imageMobilePos="top",this.buttonNewTab=!1,this.paddingText="xxxx-large",this.paddingImage="none",s(this)}disconnectedCallback(){}render(){return t(Pe,Object.assign({},T(this)),t("slot",null))}},Oe=class{constructor(t){e(this,t),this.ignored=!0,s(this)}disconnectedCallback(){}render(){return t(this.hookStory,null)}};function Ve(e){const r=q({Container:{display:"flex",width:"100%",justifyContent:e.alignment||"center",background:e.backgroundColor||""},Image:{minHeight:e.minHeight||"100%",width:e.width||"100%",maxWidth:"max-content",objectFit:"cover"}}),s=r.toString();return t("div",null,t("style",{type:"text/css"},s,"\n :host{\n display: block; \n }\n "),t("div",{class:r.classes.Container,part:"sqm-base"},t("img",{part:"sqm-image",src:e.imageUrl,class:r.classes.Image})))}const $e=class{constructor(t){e(this,t),this.alignment="center"}render(){return t(Ve,Object.assign({},T(this)))}},je=class{constructor(t){e(this,t),this.ignored=!0,this.fieldType="text",this.errorMessage="Cannot be empty",this.fieldOptional=!1,s(this)}disconnectedCallback(){}render(){const e={...T(this)},r=M([{attribute:"field-name",value:this.fieldName}]);if(!h()&&r)return t(V,{missingProps:r,heading:"An error occured while loading this form",subheading:"A technical problem prevented this input field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"});const{states:s}=h()?N({states:{registrationFormState:{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):{states:{registrationFormState:i(F)}};return t(te,{states:s,content:e})}},Ue=p.gql`
63
+ mutation submitForm($formSubmissionInput: FormSubmissionInput!) {
64
+ submitForm(formSubmissionInput: $formSubmissionInput) {
65
+ success
66
+ }
67
+ }
68
+ `,Be=class{constructor(t){e(this,t),this.ignored=!0,this.emailLabel="Email",this.firstNameLabel="First Name",this.lastNameLabel="Last Name",this.submitLabel="Submit",this.resubmitFormLabel="Refer Another Friend",this.pageLabel="Refer your friend",this.formKey="lead-form",this.supportLink="Support",this.submitSuccessHeader="Referral submitted",this.submitSuccessDescription="Our team will contact your friend to see if they’re a good fit. In the meantime, you can track this referral on Activity page.",this.submitErrorHeader="An error occurred while submitting",this.submitErrorDescription="Please try again later. If the problem continues, contact {supportLink}",this.requiredFieldErrorMessage="Please enter a valid {fieldLabel}",this.networkErrorMessage="Network request failed.",this.invalidEmailErrorMessage="Must be a valid email address",s(this)}disconnectedCallback(){}render(){const{states:e,callbacks:r,refs:s}=h()?N({states:{error:"",loading:!1,success:!1},callbacks:{submit:async()=>{console.log("submit")},inputFunction:()=>{}},refs:{formRef:{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):function(e){var t,r,s,i,l,c,d,u,h;const m=o(null),{leadFormState:p,setLeadFormState:v}=$({}),[g,{loading:b,errors:y}]=f(Ue),[w,k]=n(!1);a((()=>{if(!m.current)return;const e=m.current;return e.addEventListener("sl-input",E),()=>{e.removeEventListener("sl-input",E)}}),[m.current]);const E=x((e=>{var t,r;if("tel"!==(null===(r=null===(t=e.target)||void 0===t?void 0:t.type)||void 0===r?void 0:r.toLowerCase()))return;const s=new B("US");e.target.value=s.input(e.target.value)}),[]);let C="";return C=(null===(t=null==y?void 0:y.response)||void 0===t?void 0:t.error)||(null==y?void 0:y.message)&&!(null===(r=null==y?void 0:y.response)||void 0===r?void 0:r.errors.length)?e.networkErrorMessage:(null===(c=null===(l=null===(i=null===(s=null==y?void 0:y.response)||void 0===s?void 0:s.errors)||void 0===i?void 0:i[0])||void 0===l?void 0:l.extensions)||void 0===c?void 0:c.message)||(null===(h=null===(u=null===(d=null==y?void 0:y.response)||void 0===d?void 0:d.errors)||void 0===u?void 0:u[0])||void 0===h?void 0:h.message)||(null==p?void 0:p.error),{states:{loading:b,error:C,success:w,leadFormState:p,referralCode:"ABC123"},callbacks:{submit:async t=>{var r,s;let a=t.target.getFormControls(),i={},n={};if(null==a||a.forEach((t=>{if(!t.name)return;const r=t.name,s=t.value;if(_.set(i,r,s),t.required&&!s&&_.set(n,r,e.requiredFieldErrorMessage),"function"==typeof t.validationError){const e=(0,t.validationError)({control:t,key:r,value:s});e&&_.set(n,r,e)}})),Object.keys(n).length)return void v({loading:!1,error:"",validationErrors:n});v({loading:!0,error:"",validationErrors:{}}),i={...i};const o={key:e.formKey,formData:i};try{const e=await g({formSubmissionInput:o});if(e instanceof Error)throw e;v({loading:!1,error:"",validationErrors:{}}),console.log({success:e.data.submitForm.success}),(null===(s=null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.submitForm)||void 0===s?void 0:s.success)&&k(!0)}catch(t){v({loading:!1,error:e.networkErrorMessage,validationErrors:{}})}},inputFunction:E},refs:{formRef:m}}}(this),i={formData:t("slot",{name:"formData"}),emailLabel:this.emailLabel,submitLabel:this.submitLabel,resubmitFormLabel:this.resubmitFormLabel,pageLabel:this.pageLabel,supportLink:this.supportLink,submitSuccessHeader:this.submitSuccessHeader,submitSuccessDescription:this.submitSuccessDescription,submitErrorHeader:this.submitErrorHeader,submitErrorDescription:this.submitErrorDescription,invalidEmailErrorMessage:this.invalidEmailErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage};return t(re,{states:e,callbacks:r,content:i,refs:s})}},ze=p.gql`
69
+ query (
70
+ $type: String!
71
+ $filter: UserLeaderboardFilterInput
72
+ $locale: RSLocale
73
+ $limit: Int!
74
+ ) {
75
+ userLeaderboard(type: $type, filter: $filter) {
76
+ dateModified
77
+ rows(limit: $limit) {
78
+ textValue(locale: $locale)
79
+ firstName
80
+ lastInitial
81
+ rank {
82
+ rank
83
+ denseRank
84
+ rowNumber
85
+ }
86
+ }
87
+ }
88
+ }
89
+ `,He=p.gql`
90
+ query (
91
+ $type: String!
92
+ $filter: UserLeaderboardFilterInput
93
+ $locale: RSLocale
94
+ $limit: Int!
95
+ ) {
96
+ userLeaderboard(type: $type, filter: $filter) {
97
+ dateModified
98
+ rows(limit: $limit) {
99
+ textValue(locale: $locale)
100
+ rank {
101
+ rank
102
+ denseRank
103
+ rowNumber
104
+ }
105
+ }
106
+ }
107
+ }
108
+ `,We=p.gql`
109
+ query (
110
+ $type: String!
111
+ $filter: UserLeaderboardFilterInput
112
+ $locale: RSLocale
113
+ ) {
114
+ viewer {
115
+ ... on User {
116
+ firstName
117
+ lastInitial
118
+ leaderboardRank(type: $type, filter: $filter) {
119
+ textValue(locale: $locale)
120
+ rank
121
+ denseRank
122
+ rowNumber
123
+ }
124
+ }
125
+ }
126
+ }
127
+ `,Ge=p.gql`
128
+ query (
129
+ $type: String!
130
+ $filter: UserLeaderboardFilterInput
131
+ $locale: RSLocale
132
+ ) {
133
+ viewer {
134
+ ... on User {
135
+ leaderboardRank(type: $type, filter: $filter) {
136
+ textValue(locale: $locale)
137
+ rank
138
+ denseRank
139
+ rowNumber
140
+ }
141
+ }
142
+ }
143
+ }
144
+ `,Ke=class{constructor(t){e(this,t),this.width="100%",this.hideViewer=!1,this.viewingUserText="You",this.hideNames=!1,this.anonymousUser="Anonymous User",this.maxRows=10,this.ignored=!0,s(this),se(this)}disconnectedCallback(){}render(){const e={empty:t(Ye,null),usersheading:this.usersheading,statsheading:this.statsheading,rankheading:this.rankheading,rankType:this.rankType,leaderboardType:this.leaderboardType,maxRows:this.maxRows,programId:this.programId,anonymousUser:this.anonymousUser,interval:this.interval,hideViewer:this.hideViewer,viewingUserText:this.viewingUserText,hideNames:this.hideNames,showRank:this.showRank,rankSuffix:this.rankSuffix,width:this.width},r={...e,demoData:this.demoData},s=h()?function(e){var r,s;const a=(null===(s=null===(r=e.demoData)||void 0===r?void 0:r.data)||void 0===s?void 0:s.leaderboard)||[{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1},{firstName:"MF",lastInitial:"D",textValue:"73",rank:2,rowNumber:2},{firstName:"Freddie",lastInitial:"G",textValue:"64",rank:3,rowNumber:3},{firstName:"Benny",lastInitial:"B",textValue:"55",rank:4,rowNumber:4},{textValue:"46",rank:5,rowNumber:5}];return N({states:{loading:!1,hasLeaders:!0,isEssentials:!1,styles:{usersheading:e.usersheading?e.usersheading:"Top referrers",statsheading:e.statsheading?e.statsheading:"New customers",rankheading:e.rankheading?e.rankheading:"Rank",anonymousUser:e.anonymousUser?e.anonymousUser:"Anonymous User",showRank:e.showRank,hideViewer:e.hideViewer,viewingUserText:e.viewingUserText,hideNames:e.hideNames,rankSuffix:e.rankSuffix,width:e.width}},data:{rankType:"rowNumber",leaderboard:a},elements:{empty:t(Ye,null)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(r):function(e){var t,r,s,a,i,n,o,c,d,u;const h=g(),m=null!==(t=e.programId)&&void 0!==t?t:h,p=v(),f=w(),y=m?{type:e.leaderboardType,filter:{programId_eq:m}}:{type:e.leaderboardType,filter:{}};e.interval&&(y.filter.interval=e.interval),f&&(y.locale=f),e.maxRows>0&&(y.limit=e.maxRows);const{data:x,loading:k,errors:E}=b(e.hideNames?He:ze,y,!(null==p?void 0:p.jwt),{batch:!1}),{data:C}=b(e.hideNames?Ge:We,y,!(null==p?void 0:p.jwt)),I=null==(_=null===(r=null==x?void 0:x.userLeaderboard)||void 0===r?void 0:r.rows)?void 0:_.flatMap((t=>{var r,s;return{textValue:t.textValue,firstName:t.firstName,lastInitial:t.lastInitial,rank:null===(r=t.rank)||void 0===r?void 0:r[e.rankType],rowNumber:null===(s=t.rank)||void 0===s?void 0:s.rowNumber}})),R=null==I?void 0:I.sort((function(e,t){return e.rank-t.rank})),S={textValue:null===(a=null===(s=null==C?void 0:C.viewer)||void 0===s?void 0:s.leaderboardRank)||void 0===a?void 0:a.textValue,firstName:null===(i=null==C?void 0:C.viewer)||void 0===i?void 0:i.firstName,lastInitial:null===(n=null==C?void 0:C.viewer)||void 0===n?void 0:n.lastInitial,rank:null===(c=null===(o=null==C?void 0:C.viewer)||void 0===o?void 0:o.leaderboardRank)||void 0===c?void 0:c[e.rankType],rowNumber:null===(u=null===(d=null==C?void 0:C.viewer)||void 0===d?void 0:d.leaderboardRank)||void 0===u?void 0:u.rowNumber};var _;return{states:{loading:k,isEssentials:l((()=>{var e,t;return!!(null===(t=null===(e=null==E?void 0:E.response)||void 0===e?void 0:e.errors)||void 0===t?void 0:t.find((e=>{var t,r;return 403===(null===(r=null===(t=null==e?void 0:e.extensions)||void 0===t?void 0:t.apiError)||void 0===r?void 0:r.statusCode)})))}),[E]),hasLeaders:(null==R?void 0:R.length)>0,styles:e},data:{leaderboard:R,rankType:e.rankType,viewerRank:S},elements:{empty:e.empty}}}(e);return t(ae,Object.assign({},s))}};function Ye(){return t("slot",{name:"empty"},t("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png","empty-state-header":"View your rank in the leaderboard","empty-state-text":"Be the first to refer a friend and reach the top of the leaderboard"}))}const Ze=q({Container:{display:"contents"},Link:{textDecoration:"none",color:"inherit"}}),Qe=Ze.toString();function Xe(e){const{onClick:r,buttonText:s}=e;return t("span",{class:Ze.classes.Container,part:"sqm-base"},t("style",{type:"text/css"},Qe,"\n:host{\n display: inline; \n}\n"),t("sl-button",{onClick:r,type:"primary",exportparts:"base: primarybutton-base"},t("a",{class:Ze.classes.Link,part:"sqm-link"},s)))}const Je=class{constructor(t){e(this,t),this.openInNewTab=!1,this.buttonText="Click here"}render(){return t(Xe,Object.assign({},{...T(this),onClick:()=>{window.open(this.link,this.openInNewTab?"_blank":"_parent")}}))}},et=class{constructor(t){e(this,t),this.ignored=!0,this.checkboxLabel="I would like to receive marketing and promotional emails for this referral program",this.checkboxName="marketingEmailOptIn",s(this)}disconnectedCallback(){}render(){const e={...T(this)},{states:r,callbacks:s}=h()?N({states:{registrationFormState:{},checked:!1},callbacks:{setChecked:()=>{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):Ee(this);return t(Z,{states:r,content:e,callbacks:s})}},tt=class{constructor(t){e(this,t),this.ignored=!0,this.firstNameLabel="First Name",this.lastNameLabel="Last Name",s(this)}disconnectedCallback(){}render(){const{states:e}=h()?N({states:{validationErrors:[],content:{firstNameLabel:this.firstNameLabel,lastNameLabel:this.lastNameLabel}}},this.demoData||{},{arrayMerge:(e,t)=>t}):function(e){return{states:{registrationFormState:i(F),content:{lastNameLabel:e.lastNameLabel,firstNameLabel:e.firstNameLabel}}}}(this);return t(ie,{states:e})}};function rt(e){const{states:r}=e,{styles:s}=r;return r.includeDropdown?t("sl-dropdown",{style:"margin-bottom: var(--sl-spacing-large)"},t("sl-button",{slot:"trigger",caret:!0,onClick:e.callbacks.rerender,exportparts:"base: dropdownbutton-base"},s.menuLabel),t("sl-menu",{ref:t=>{void 0===e.ref.current&&(e.ref.current=t,e.callbacks.rerender())}},t("slot",null))):""}const st=class{constructor(t){e(this,t),this.ignored=!0,s(this)}disconnectedCallback(){}render(){const e=h()?function(e){return N({states:{includeDropdown:!0,styles:{...e,menuLabel:"Menu"}},callbacks:{rerender:()=>{}},ref:{current:void 0}},e.demoData||{},{arrayMerge:(e,t)=>t})}(T(this)):function(e){const t=o(),[,r]=k(),s=v();return a((()=>{var e;null===(e=t.current)||void 0===e||e.addEventListener("sl-select",(e=>function(e){E.push(e.detail.item.value)}(e)))}),[t.current]),{states:{includeDropdown:void 0!==((null==s?void 0:s.id)||(null==s?void 0:s.accountId)||(null==s?void 0:s.jwt)),styles:{menuLabel:e.menuLabel}},callbacks:{rerender:r},ref:t}}(T(this));return t(r,{slot:"sqm-navigation-menu"},t(rt,Object.assign({},e)))}};st.style=":host{display:block}:host([hidden]){display:none}.HeaderWrapper{width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--sl-spacing-small) var(--sl-spacing-large);-ms-flex-align:center;align-items:center;background-color:var(--sqm-header-background)}@media screen and (max-width: 499px){.HeaderWrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:end;justify-content:flex-end;padding:0 var(--sl-spacing-x-small)}}";const at=q({Wrapper:{maxWidth:"200px",marginLeft:"auto"},PayoutButtonDescription:{color:"var(--sl-color-neutral-500)",fontSize:"var(--sl-font-size-small)",margin:"0"}}),it=at.toString();function nt(e){const{text:r,states:s}=e;return s.payoutSettingsComplete?t("div",{class:at.classes.Wrapper},t("style",{type:"text/css"},it),t("sqm-scroll",{"scroll-tag-name":"sqm-tabs","button-text":r.payoutButtonText,"scroll-animation":"smooth"}),t("p",{class:at.classes.PayoutButtonDescription},r.payoutButtonDescription)):t("div",null)}const ot=p.gql`
145
+ query getPayoutDetails {
146
+ user: viewer {
147
+ ... on User {
148
+ id
149
+ impactConnection {
150
+ connected
151
+ publisher {
152
+ id
153
+ payoutsAccount {
154
+ hold
155
+ balance
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }
162
+ `,lt=class{constructor(t){e(this,t),this.payoutButtonText="Payouts & Tax Settings",this.payoutButtonDescription="Check your payout settings to see when you’ll get paid out next",this.ignored=!0,s(this)}disconnectedCallback(){}getTextProps(){return T(this)}render(){const e=h()?function(e){return N({states:{payoutSettingsComplete:!1},text:e.getTextProps()},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){var t,r,s;const{data:i,refetch:n}=b(ot,{});return a((()=>{const e=()=>n();return window.addEventListener("sqm:tax-form-updated",e),()=>window.removeEventListener("sqm:tax-form-updated",e)}),[]),{states:{payoutSettingsComplete:!!(null===(s=null===(r=null===(t=null==i?void 0:i.user)||void 0===t?void 0:t.impactConnection)||void 0===r?void 0:r.publisher)||void 0===s?void 0:s.payoutsAccount)},text:e.getTextProps()}}(this);return t(nt,Object.assign({},e))}},ct=q({SkeletonOne:{width:"50%",height:"16px"},AlertDescriptionText:{margin:"0",marginBottom:"var(--sl-spacing-small)"},ErrorAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-red-100)",borderTop:"none"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},WarningAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-yellow-100)",borderTop:"none"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},InfoAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-sky-100)",borderTop:"none"},"& sl-icon::part(base)":{color:"var(--sl-color-blue-500)"}},Dialog:{"&::part(panel)":{height:"600px"},"&::part(close-button)":{marginBottom:"var(--sl-spacing-xx-large)"},"&::part(title)":{display:"none"},"&::part(header)":{},"&::part(body)":{padding:"0"},"&::part(footer)":{}}}),dt=ct.toString();function ut(e){const{text:r,states:s,data:a,callbacks:i}=e;if(s.loading)return t("sl-skeleton",{class:ct.classes.SkeletonOne});const n=function(e){if(s.error)return{header:r.errorHeader,description:r.errorDescription,buttonText:null,alertType:"critical",icon:"exclamation-triangle",class:ct.classes.ErrorAlertContainer};switch(e){case"INFORMATION_REQUIRED":return{header:r.informationRequiredHeader,description:r.informationRequiredDescription,buttonText:r.informationRequiredButtonText,alertType:"info",icon:"info-circle",class:ct.classes.InfoAlertContainer};case"VERIFICATION:REQUIRED":return{header:r.verificationRequiredHeader,description:u.formatMessage({id:"verificationRequiredDescription",defaultMessage:r.verificationRequiredDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),buttonText:r.verificationRequiredButtonText,alertType:"warning",icon:"exclamation-triangle",class:ct.classes.WarningAlertContainer};case"VERIFICATION:INTERNAL":return{header:r.verificationRequiredInternalHeader,description:u.formatMessage({id:"verificationRequiredInternalDescription",defaultMessage:r.verificationRequiredInternalDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),alertType:"warning",icon:"exclamation-triangle",class:ct.classes.WarningAlertContainer};case"VERIFICATION:REVIEW":return{header:r.verificationReviewInternalHeader,description:u.formatMessage({id:"verificationReviewInternalDescription",defaultMessage:r.verificationReviewInternalDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),alertType:"warning",icon:"exclamation-triangle",class:ct.classes.WarningAlertContainer};case"VERIFICATION:FAILED":return{header:r.verificationFailedInternalHeader,description:u.formatMessage({id:"verificationFailedInternalDescription",defaultMessage:r.verificationFailedInternalDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),alertType:"critical",icon:"exclamation-octagon",class:ct.classes.ErrorAlertContainer};case"HOLD":return{header:r.holdHeader,description:u.formatMessage({id:"holdDescription",defaultMessage:r.holdDescription},{supportLink:t("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},r.supportLink)}),buttonText:null,alertType:"warning",icon:"exclamation-triangle",class:ct.classes.WarningAlertContainer};default:return}}(s.status);return"DONE"!==s.status&&n?t("div",{part:"sqm-base"},t("style",{type:"text/css"},dt),t("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:n.alertType,class:n.class,open:!0},t("sl-icon",{slot:"icon",name:n.icon}),t("strong",null,n.header),t("p",{class:ct.classes.AlertDescriptionText},n.description),function(e){switch(e){case"INFORMATION_REQUIRED":return"SquatchJS2"===a.type?t("sqm-scroll",{"scroll-tag-name":"sqm-tabs","button-text":r.informationRequiredButtonText,"scroll-animation":"smooth"}):t("sl-button","SquatchPortal"===a.type?{type:"default",onClick:i.onTermsClick}:{type:"default"},r.informationRequiredButtonText);case"VERIFICATION:REQUIRED":return t("sl-button",{type:"default",loading:s.veriffLoading,onClick:i.onClick},r.verificationRequiredButtonText);default:return}}(s.status))):t("div",null)}const ht=class{constructor(t){e(this,t),this.informationRequiredHeader="Payout and tax information required",this.informationRequiredDescription="Submit your banking details and tax documents to receive your rewards.",this.informationRequiredButtonText="Payouts & Tax Settings",this.verificationRequiredHeader="Verify your identity",this.verificationRequiredDescription="It should only take a few minutes verify. If you run in to an issue verifying your identity contact our {supportLink}.",this.verificationRequiredButtonText="Start Verification",this.verificationRequiredInternalHeader="Identity Verification in Progress",this.verificationRequiredInternalDescription="Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortly. If you don't hear from us contact our {supportLink}.",this.verificationReviewInternalHeader="Identity Verification Under Review",this.verificationReviewInternalDescription="Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly. If you don't hear from us contact our {supportLink}.",this.verificationFailedInternalHeader="Identity Verification Unsuccessful",this.verificationFailedInternalDescription="Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.",this.holdHeader="Your payouts and account are on hold",this.holdDescription="Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to our {supportLink}.",this.cashPayoutsPageUrl="/cash",this.supportLink="support team",this.errorHeader="Could not determine payout status.",this.errorDescription="There was an error with determining your payout status.",s(this)}disconnectedCallback(){}getTextProps(){return T(this)}render(){const e=h()?function(e){return N({states:{error:!1,status:"INFORMATION_REQUIRED",loading:!1,showVerifyIdentity:!1},data:{type:"SquatchAdmin"},text:e.getTextProps(),callbacks:{onTermsClick:()=>{},onClick:()=>console.log("show")}},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):ye(this);return t(ut,Object.assign({},e))}},mt=p.gql`
163
+ query {
164
+ viewer {
165
+ ... on User {
166
+ id
167
+ accountId
168
+ marketingEmailOptIn
169
+ }
170
+ }
171
+ }
172
+ `,pt=p.gql`
173
+ mutation ($userInput: UserInput!) {
174
+ upsertUser(userInput: $userInput) {
175
+ id
176
+ marketingEmailOptIn
177
+ }
178
+ }
179
+ `,vt={marketingEmailOptIn:!1,errors:{},error:""},gt=class{constructor(t){e(this,t),this.ignored=!0,this.emailPreferencesHeader="Email preferences",this.marketingCheckboxLabel="I want to receive marketing emails and promotions for this referral program from impact.com",this.submitChangeButtonText="Save",this.networkRequestMessage="An error occurred while loading this page. Please refresh the page.",this.successMessage="Opt-in preference has been changed.",s(this)}disconnectedCallback(){}render(){const e=h()?function(e){return N({states:{success:!1,loading:!1,submitDisabled:!1,user:{id:"01",accountId:"111100000",marketingEmailOptIn:!1},text:{emailPreferencesHeader:e.emailPreferencesHeader,marketingCheckboxLabel:e.marketingCheckboxLabel,submitChangeButtonText:e.submitChangeButtonText,successMessage:e.successMessage},formState:{marketingEmailOptIn:!1,errors:null,error:""}},callbacks:{onSubmit:e=>console.log(e),setChecked:()=>{}}},e.demoData||{},{arrayMerge:(e,t)=>t})}(T(this)):function(e){const t=v(),[r,s]=n(!1),[i,o]=n(void 0),[l,c]=n(vt),d=b(mt,{},!(null==t?void 0:t.jwt)),[u,h]=f(pt);return a((()=>{(null==h?void 0:h.loading)||((null==h?void 0:h.errors)?c((e=>{var t,r,s;return{...e,error:null===(s=null===(r=null===(t=null==h?void 0:h.errors)||void 0===t?void 0:t.response)||void 0===r?void 0:r.errors)||void 0===s?void 0:s[0].message}})):(o((e=>{var t;return{...e,...null===(t=null==h?void 0:h.data)||void 0===t?void 0:t.upsertUser}})),(null==h?void 0:h.data)&&s(!0)))}),[null==h?void 0:h.loading]),a((()=>{var e,t;o((e=>{var t;return{...e,...null===(t=null==d?void 0:d.data)||void 0===t?void 0:t.viewer}})),c({...vt,...null===(e=d.data)||void 0===e?void 0:e.viewer,...null===(t=h.data)||void 0===t?void 0:t.upsertUser})}),[null==d?void 0:d.data]),a((()=>{var t,r;(null===(t=null==h?void 0:h.errors)||void 0===t?void 0:t.message)&&c({...null===(r=d.data)||void 0===r?void 0:r.viewer,error:e.networkRequestMessage})}),[null==h?void 0:h.errors]),{states:{success:r,loading:(null==d?void 0:d.loading)||h.loading,submitDisabled:!1,formState:l,user:i,text:{emailPreferencesHeader:e.emailPreferencesHeader,marketingCheckboxLabel:e.marketingCheckboxLabel,submitChangeButtonText:e.submitChangeButtonText,successMessage:e.successMessage}},callbacks:{onSubmit:e=>{var r;s(!1);const a=null===(r=e.detail)||void 0===r?void 0:r.formData;null==a||a.forEach(((e,t)=>{_.set(a,t,e)})),u({userInput:{id:null==t?void 0:t.id,accountId:null==t?void 0:t.accountId,marketingEmailOptIn:Boolean(a.marketingEmailOptIn)}}),c((e=>({...e,errors:{},error:""})))},setChecked:e=>c({...l,marketingEmailOptIn:e})}}}(T(this));return t(ne,Object.assign({},e))}},ft=class{constructor(t){e(this,t),this.ignored=!0,this.modalChangePasswordHeader="Change Password",this.cancelText="Cancel",this.changePasswordButtonText="Change Password",this.passwordFieldLabel="New Password",this.confirmPasswordFieldLabel="Confirm New Password",this.successMessage="Your password has been updated.",this.portalChangePasswordHeader="Password",this.portalChangePasswordButtonText="Change your password...",this.meetsRequirementsText="Password has met all requirements",this.doesNotMeetRequirementsText="Password must meet the following requirements:",this.minErrorText="be a minimum of 8 characters",this.uppercaseErrorText="contain at least 1 uppercase character",this.lowercaseErrorText="contain at least 1 lowercase character",this.nonMatchingPasswordErrorText="contain at least 1 lowercase character",this.invalidSessionErrorText="Please log in again to change your password.",this.hasErrorText="contain at least 1 number or symbol",s(this)}disconnectedCallback(){}render(){const{states:e,callbacks:r}=h()?function(e){const[t,r]=n(!1);return N({states:{open:t,error:"",content:{modalChangePasswordHeader:e.modalChangePasswordHeader,cancelText:e.cancelText,changePasswordButtonText:e.changePasswordButtonText,passwordFieldLabel:e.passwordFieldLabel,confirmPasswordFieldLabel:e.confirmPasswordFieldLabel,successMessage:e.successMessage,portalChangePasswordHeader:e.portalChangePasswordHeader,portalChangePasswordButtonText:e.portalChangePasswordButtonText,meetsRequirementsText:e.meetsRequirementsText,doesNotMeetRequirementsText:e.doesNotMeetRequirementsText,minErrorText:e.minErrorText,uppercaseErrorText:e.uppercaseErrorText,lowercaseErrorText:e.lowercaseErrorText,hasErrorText:e.hasErrorText}},callbacks:{setOpen:e=>r(e),submit:e=>console.log("Submit",e)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){var t,r,s,a,i,o,l;const[c,{loading:d,errors:u}]=C(),[h,m]=n(!1),[p,g]=n(""),[f,b]=n(!1),y=v();return{states:{open:h,loading:d,success:f,error:p||(null===(a=null===(s=null===(r=null===(t=null==u?void 0:u.response)||void 0===t?void 0:t.errors)||void 0===r?void 0:r[0])||void 0===s?void 0:s.extensions)||void 0===a?void 0:a.message)||(null===(l=null===(o=null===(i=null==u?void 0:u.response)||void 0===i?void 0:i.errors)||void 0===o?void 0:o[0])||void 0===l?void 0:l.message),content:{modalChangePasswordHeader:e.modalChangePasswordHeader,cancelText:e.cancelText,changePasswordButtonText:e.changePasswordButtonText,passwordFieldLabel:e.passwordFieldLabel,confirmPasswordFieldLabel:e.confirmPasswordFieldLabel,successMessage:e.successMessage,portalChangePasswordHeader:e.portalChangePasswordHeader,portalChangePasswordButtonText:e.portalChangePasswordButtonText,meetsRequirementsText:e.meetsRequirementsText,doesNotMeetRequirementsText:e.doesNotMeetRequirementsText,minErrorText:e.minErrorText,uppercaseErrorText:e.uppercaseErrorText,lowercaseErrorText:e.lowercaseErrorText,hasErrorText:e.hasErrorText}},data:{},callbacks:{setOpen:m,submit:async t=>{var r,s;b(!1);const a=null===(r=t.detail)||void 0===r?void 0:r.formData;if(null==a||a.forEach(((e,t)=>{_.set(a,t,e)})),!(null==y?void 0:y.jwt))return void g(e.invalidSessionErrorText);if(a.password!==a.confirmPassword)return void g(e.nonMatchingPasswordErrorText);g("");const i={password:a.password},n=await c(i);n instanceof Error||!(null===(s=n.changeManagedIdentityPassword)||void 0===s?void 0:s.success)||b(!0)}}}}(this);return t(oe,{states:e,callbacks:r})}},bt=class{constructor(t){e(this,t),this.ignored=!0,this.hideSupportText=!1,this.supportEmail="support@example.com",this.supportText="For program support, contact {email}",this.hidePoweredBy=!1,this.poweredByLink="https://impact.com/advocate/",this.paddingTop="large",this.paddingRight="large",this.paddingBottom="large",this.paddingLeft="large",s(this)}disconnectedCallback(){}render(){return t(le,Object.assign({},T(this)))}static get assetsDirs(){return["../../assets"]}},yt=class{constructor(t){e(this,t),this.ignored=!0,this.notFullScreen=!1,s(this)}disconnectedCallback(){}render(){const e=t("slot",{name:"footer"}),r=t("slot",{name:"header"}),s=h()?function(e,r,s){return N({notFullScreen:!0,data:{footer:e||t("span",null,"example@example.com"),header:r||t("div",{style:{display:"flex",flexDirection:"column"}},t("span",{style:{fontSize:"var(--sl-font-size-large)",fontWeight:"bold"}},"Portal Header"),t("span",{style:{fontSize:"var(--sl-font-size-small)"}},"A description for the portal"))},callbacks:{rerender:()=>{}}},s.demoData||{},{arrayMerge:(e,t)=>t})}(e,r,this):function(e,t){const[,r]=k();return{data:{footer:e,header:t},callbacks:{rerender:r}}}(e,r);return t(ce,Object.assign({},s),t("slot",null))}},xt=class{constructor(t){e(this,t),this.ignored=!0,this.nextPage="/",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Sign In",this.forgotPasswordPath="/forgotPassword",this.forgotPasswordLabel="Forgot Password?",this.registerLabel="Register",this.registerPath="/register",this.pageLabel="Sign in to your account",this.networkErrorMessage="An error occurred while logging you in. Please refresh the page and try again.",this.registerCTA="Don't have an account?",s(this)}disconnectedCallback(){}render(){const{states:e,callbacks:r}=h()?N({states:{error:"",loading:!1,forgotPasswordPath:"/forgotPassword",registerPath:"/register",showLoginForm:"manual"},callbacks:{googleSubmit:async()=>{console.log("google submit")},submit:async()=>{console.log("submit")}},content:{googleButton:null}},this.demoData||{},{arrayMerge:(e,t)=>t}):U(this),s=q({RegisterButton:{"&::part(label)":{padding:"0"}}}).toString(),a={forgotPasswordButton:t("slot",{name:"forgotPassword"},t("a",{onClick:()=>E.push(e.forgotPasswordPath)},this.forgotPasswordLabel)),googleButton:null,secondaryButton:t("slot",{name:"secondaryButton"},t("style",null,s),t("sl-button",{type:"text",disabled:e.loading,onClick:()=>E.push(e.registerPath)},this.registerLabel)),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel};return t(j,{states:e,callbacks:r,content:a})}},wt=class{constructor(t){e(this,t),this.ignored=!0,this.nextPage="/",this.redirectPath="/verifyEmail",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Register",this.loginLabel="Sign in",this.confirmPasswordLabel="Confirm Password",this.confirmPassword=!1,this.disablePasswordValidation=!1,this.hideInputs=!1,this.pageLabel="Register",this.loginPath="/login",this.requiredFieldErrorMessage="Cannot be empty",this.networkErrorMessage="Network request failed.",this.passwordMismatchErrorMessage="Passwords do not match.",this.invalidEmailErrorMessage="Must be a valid email address",this.meetsRequirementsText="Password has met all requirements",this.doesNotMeetRequirementsText="Password must meet the following requirements:",this.minErrorText="be a minimum of 8 characters",this.uppercaseErrorText="contain at least 1 uppercase character",this.lowercaseErrorText="contain at least 1 lowercase character",this.hasErrorText="contain at least 1 number or symbol",s(this)}disconnectedCallback(){}render(){const{states:e,callbacks:r,refs:s}=h()?N({states:{error:"",loading:!1,confirmPassword:(i=this).confirmPassword,hideInputs:i.hideInputs||!1,customPasswordField:!1,loginPath:i.loginPath,disablePasswordValidation:i.disablePasswordValidation},callbacks:{submit:async()=>{console.log("submit")},inputFunction:()=>{}},refs:{formRef:{}}},i.demoData||{},{arrayMerge:(e,t)=>t}):function(e){var t,r,s,i,n,l,c,d,u;const h=o(null),{registrationFormState:m,setRegistrationFormState:p}=O({}),[v,{loading:g,errors:f}]=I();a((()=>{if(!h.current)return;const e=h.current;return e.addEventListener("sl-input",b),()=>{e.removeEventListener("sl-input",b)}}),[h.current]);const b=x((e=>{var t,r;if("tel"!==(null===(r=null===(t=e.target)||void 0===t?void 0:t.type)||void 0===r?void 0:r.toLowerCase()))return;const s=new B("US");e.target.value=s.input(e.target.value)}),[]);let y="";return y=(null===(t=null==f?void 0:f.response)||void 0===t?void 0:t.error)||(null==f?void 0:f.message)&&!(null===(r=null==f?void 0:f.response)||void 0===r?void 0:r.errors.length)?e.networkErrorMessage:(null===(l=null===(n=null===(i=null===(s=null==f?void 0:f.response)||void 0===s?void 0:s.errors)||void 0===i?void 0:i[0])||void 0===n?void 0:n.extensions)||void 0===l?void 0:l.message)||(null===(u=null===(d=null===(c=null==f?void 0:f.response)||void 0===c?void 0:c.errors)||void 0===d?void 0:d[0])||void 0===u?void 0:u.message)||(null==m?void 0:m.error),{states:{loading:g,error:y,registrationFormState:m,confirmPassword:e.confirmPassword,hideInputs:e.hideInputs,loginPath:e.loginPath,disablePasswordValidation:e.disablePasswordValidation},callbacks:{submit:async t=>{var r;let s=t.target.getFormControls(),a={},i={};if(null==s||s.forEach((t=>{if(!t.name)return;const r=t.name,s=t.value;if(_.set(a,r,s),t.required&&!s&&_.set(i,r,e.requiredFieldErrorMessage),"function"==typeof t.validationError){const e=(0,t.validationError)({control:t,key:r,value:s});e&&_.set(i,r,e)}})),(e.confirmPassword||a.confirmPassword)&&a.password!==a.confirmPassword&&(i={...i,confirmPassword:e.passwordMismatchErrorMessage}),Object.keys(i).length)return void p({loading:!1,error:"",validationErrors:i});p({loading:!0,error:"",validationErrors:{}});const{email:n,password:o}=a;delete a.email,delete a.password,delete a.confirmPassword,a={...a};const l={email:n,password:o,formData:a,redirectPath:e.redirectPath};try{const t=await v(l);if(t instanceof Error)throw t;p({loading:!1,error:"",validationErrors:{}}),(null===(r=t.registerManagedIdentityWithEmailAndPassword)||void 0===r?void 0:r.token)&&E.push(e.nextPage)}catch(t){p({loading:!1,error:e.networkErrorMessage,validationErrors:{}})}},inputFunction:b},refs:{formRef:h}}}(this);var i;const n={formData:t("slot",{name:"formData"}),secondaryButton:t("slot",{name:"secondaryButton"},t("sl-button",{type:"text",disabled:e.loading,onClick:()=>E.push(e.loginPath)},this.loginLabel)),terms:t("slot",{name:"terms"}),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel,confirmPasswordLabel:this.confirmPasswordLabel,invalidEmailErrorMessage:this.invalidEmailErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,meetsRequirementsText:this.meetsRequirementsText,doesNotMeetRequirementsText:this.doesNotMeetRequirementsText,minErrorText:this.minErrorText,uppercaseErrorText:this.uppercaseErrorText,lowercaseErrorText:this.lowercaseErrorText,hasErrorText:this.hasErrorText};return t(de,{states:e,callbacks:r,content:n,refs:s})}};function kt(e,r){const s=q({Container:{color:e.textColor||"var(--sl-color-neutral-900)",background:e.backgroundColor||""},Header:{fontSize:"var(--sl-font-size-x-large)",fontWeight:"var(--sl-font-weight-bold)",lineHeight:"var(--sl-line-height-dense)",marginBottom:"var(--sl-spacing-large)",textAlign:"center"},Grid:{display:"flex",flexDirection:"row",gap:"var(--sl-spacing-large)","@media (max-width: 499px)":{flexDirection:"column"}}}),a=s.toString();return t("div",{class:s.classes.Container,part:"sqm-base"},t("style",{type:"text/css"},a,"\n ::slotted(*){\n display: flex;\n width: 100%;\n }\n @media (max-width: 499px) {\n ::slotted(*){\n display: block;\n }\n }"),t("div",{class:s.classes.Header},t("div",{class:s.classes.Header,part:"sqm-header"},e.header)),t("div",{class:s.classes.Grid,part:"sqm-grid-container"},r))}const Et=class{constructor(t){e(this,t),this.ignored=!0,s(this)}disconnectedCallback(){}render(){return t(kt,Object.assign({},T(this)),t("slot",null))}};function Ct(e){const r=q({Container:{display:"flex",flexDirection:"column",width:"100%",padding:"var(--sl-spacing-x-large)",lineHeight:"var(--sl-line-height-dense)",color:e.textColor||"var(--sl-color-neutral-900)",background:e.backgroundColor||"var(--sl-color-primary-50)","@media (max-width: 499px)":{flexDirection:"row",width:"auto",paddingBottom:"var(--sl-spacing-large)"}},Text:{"@media (max-width: 499px)":{marginLeft:"var(--sl-spacing-large)"}},Header:{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-bold)",marginTop:"var(--sl-spacing-x-large)","@media (max-width: 499px)":{margin:"0"}},Description:{fontSize:"var(--sl-font-size-medium)",marginTop:"var(--sl-spacing-small)","@media (max-width: 499px)":{marginTop:"var(--sl-spacing-x-small)"}},Media:{width:"64px",height:"64px",borderRadius:"100%",objectFit:"cover",userSelect:"none",background:"#FFF",color:"var(--sl-color-primary-300)",fontSize:"26px",textAlign:"center",lineHeight:"72px"}}),s=r.toString();return t("div",{class:r.classes.Container,part:"sqm-base"},t("style",{type:"text/css"},s),t("div",null,e.imageUrl?t("img",{class:r.classes.Media,src:e.imageUrl,part:"sqm-media"}):t("div",{class:r.classes.Media,part:"sqm-media"},t("sl-icon",{name:e.icon}))),t("div",{class:r.classes.Text},t("div",{class:r.classes.Header,part:"sqm-header"},e.header),t("div",{class:r.classes.Description,part:"sqm-description"},e.description)))}const It=class{constructor(t){e(this,t),s(this)}disconnectedCallback(){}render(){return t(Ct,Object.assign({},T(this)))}},Rt=c("sq:useProgramMenu"),St=class{constructor(t){e(this,t),this.ignored=!0,s(this)}disconnectedCallback(){}render(){const{data:e,ref:s}=function(e){const t=g(),r=m();Rt({programId:t,props:e});const s=o(),[,i]=k();return a((()=>{var e;null===(e=s.current)||void 0===e||e.addEventListener("sl-select",(e=>{r.dispatchEvent(new CustomEvent("sq:update-program-id",{detail:e.detail.item.value,bubbles:!0,composed:!0}))}))}),[s.current]),{data:{programId:t},callbacks:{rerender:i},ref:s}}(T(this));return t(r,{style:{display:"contents"}},t("sl-select",{style:{paddingBottom:"var(--sl-spacing-large)"},value:e.programId,ref:e=>s.current=e},t("slot",null)))}},_t=q({Container:{borderRadius:"var(--sl-border-radius-large)",color:"var(--sl-color-neutral-900)",background:"var(--sl-color-neutral-0)",display:"flex",flexDirection:"column",rowGap:"var(--sl-spacing-large)"},EndContainer:{display:"flex",flexDirection:"column",alignItems:"center"},ColumnContainer:{"& p":{margin:"0"},display:"grid",gridAutoColumns:"minmax(0, 1fr)",gridAutoFlow:"column",gap:"calc(2 * var(--sl-spacing-medium))","@media (max-width: 499px)":{gridAutoFlow:"unset",gridAutoColumns:"unset",gridTemplateColumns:"1fr",border:"none"}}}),Nt=_t.toString();function Tt(e){return t("div",{part:"sqm-base",class:_t.classes.Container,style:{border:e.hideBorder?"none":"1px solid var(--sl-color-neutral-300)","padding-top":`var(--sl-spacing-${e.paddingTop})`,"padding-right":`var(--sl-spacing-${e.paddingRight})`,"padding-bottom":`var(--sl-spacing-${e.paddingBottom})`,"padding-left":`var(--sl-spacing-${e.paddingLeft})`,backgroundColor:e.backgroundColor,maxWidth:e.limitWidth?"600px":"none",margin:e.limitWidth?"auto":"none"}},t("style",{type:"text/css"},Nt,"\n :host{\n display: block; \n }\n "),e.hasHeader&&t("div",{class:_t.classes.EndContainer},e.slots.header),t("div",{part:"sqm-column-container",class:_t.classes.ColumnContainer,style:{alignItems:e.verticalAlignment}},e.slots.left,e.slots.right),e.hasFooter&&t("div",{class:_t.classes.EndContainer},e.slots.footer))}const Mt=class{constructor(t){e(this,t),this.ignored=!0,this.verticalAlignment="start",this.hideBorder=!1,this.paddingTop="large",this.paddingRight="large",this.paddingBottom="large",this.paddingLeft="large",this.backgroundColor="#ffffff",this.limitWidth=!1,s(this)}disconnectedCallback(){}render(){const e={left:t("slot",{name:"left"}),right:t("slot",{name:"right"}),header:t("slot",{name:"header"}),footer:t("slot",{name:"footer"})},r=D(),s=r.findIndex((e=>"header"===e.slot))>-1,a=r.findIndex((e=>"footer"===e.slot))>-1;return t(Tt,Object.assign({},T(this),{slots:e,hasHeader:s,hasFooter:a}),t("slot",null))}},qt=p.gql`
180
+ query getUser($programId: ID) {
181
+ viewer {
182
+ ... on User {
183
+ referralCode(programId: $programId)
184
+ }
185
+ }
186
+ }
187
+ `,At=class{constructor(t){e(this,t),this.ignored=!0,this.iframeHeight="100%",this.iframeWidth="100%",s(this)}disconnectedCallback(){}render(){const e=M([{attribute:"iframe-src",value:this.iframeSrc}]);if(e)return t(V,{missingProps:e,heading:"An error occured while loading this page",subheading:"A technical problem prevented this iframe from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"});const{states:s,data:a}=h()?(i=T(this),N({states:{content:{iframeSrc:"https://example.com",...i}},data:{shareCode:"SHARECODE123"}},i.demoData||{},{arrayMerge:(e,t)=>t})):function(e){var t;const r=g(),s=v(),{data:a}=b(qt,{programId:r},!(null==s?void 0:s.jwt)||!r);return{states:{content:e},data:{shareCode:null===(t=null==a?void 0:a.viewer)||void 0===t?void 0:t.referralCode}}}(T(this));var i;return t(r,{style:{display:"contents"}},t(ue,{data:a,states:s}))}};var Lt={};!function e(t,r,s,a){var i=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL);function n(){}function o(e){var s=r.exports.Promise,a=void 0!==s?s:t.Promise;return"function"==typeof a?new a(e):(e(n,n),null)}var l,c,d,u,h,m,p,v,g=(d=Math.floor(1e3/60),u={},h=0,"function"==typeof requestAnimationFrame&&"function"==typeof cancelAnimationFrame?(l=function(e){var t=Math.random();return u[t]=requestAnimationFrame((function r(s){h===s||h+d-1<s?(h=s,delete u[t],e()):u[t]=requestAnimationFrame(r)})),t},c=function(e){u[e]&&cancelAnimationFrame(u[e])}):(l=function(e){return setTimeout(e,d)},c=function(e){return clearTimeout(e)}),{frame:l,cancel:c}),f=(v={},function(){if(m)return m;if(!s&&i){var t=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join("\n");try{m=new Worker(URL.createObjectURL(new Blob([t])))}catch(e){return void 0!==typeof console&&"function"==typeof console.warn&&console.warn("🎊 Could not load worker",e),null}!function(e){function t(t,r){e.postMessage({options:t||{},callback:r})}e.init=function(t){var r=t.transferControlToOffscreen();e.postMessage({canvas:r},[r])},e.fire=function(r,s,a){if(p)return t(r,null),p;var i=Math.random().toString(36).slice(2);return p=o((function(s){function n(t){t.data.callback===i&&(delete v[i],e.removeEventListener("message",n),p=null,a(),s())}e.addEventListener("message",n),t(r,i),v[i]=n.bind(null,{data:{callback:i}})}))},e.reset=function(){for(var t in e.postMessage({reset:!0}),v)v[t](),delete v[t]}}(m)}return m}),b={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function y(e,t,r){return function(e,t){return t?t(e):e}(e&&null!=e[t]?e[t]:b[t],r)}function x(e){return e<0?0:Math.floor(e)}function w(e){return parseInt(e,16)}function k(e){return e.map(E)}function E(e){var t=String(e).replace(/[^0-9a-f]/gi,"");return t.length<6&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),{r:w(t.substring(0,2)),g:w(t.substring(2,4)),b:w(t.substring(4,6))}}function C(e){e.width=document.documentElement.clientWidth,e.height=document.documentElement.clientHeight}function I(e){var t=e.getBoundingClientRect();e.width=t.width,e.height=t.height}function R(e,r){var n,l=!e,c=!!y(r||{},"resize"),d=y(r,"disableForReducedMotion",Boolean),u=i&&y(r||{},"useWorker")?f():null,h=l?C:I,m=!(!e||!u||!e.__confetti_initialized),p="function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion)").matches;function v(t,r,i){for(var l,c,d,u,m=y(t,"particleCount",x),p=y(t,"angle",Number),v=y(t,"spread",Number),f=y(t,"startVelocity",Number),b=y(t,"decay",Number),w=y(t,"gravity",Number),E=y(t,"drift",Number),C=y(t,"colors",k),I=y(t,"ticks",Number),R=y(t,"shapes"),S=y(t,"scalar"),_=function(e){var t=y(e,"origin",Object);return t.x=y(t,"x",Number),t.y=y(t,"y",Number),t}(t),N=m,T=[],M=e.width*_.x,q=e.height*_.y;N--;)T.push((void 0,void 0,c=(l={x:M,y:q,angle:p,spread:v,startVelocity:f,color:C[N%C.length],shape:R[(0,u=R.length,Math.floor(Math.random()*(u-0))+0)],ticks:I,decay:b,gravity:w,drift:E,scalar:S}).angle*(Math.PI/180),d=l.spread*(Math.PI/180),{x:l.x,y:l.y,wobble:10*Math.random(),velocity:.5*l.startVelocity+Math.random()*l.startVelocity,angle2D:-c+(.5*d-Math.random()*d),tiltAngle:Math.random()*Math.PI,color:l.color,shape:l.shape,tick:0,totalTicks:l.ticks,decay:l.decay,drift:l.drift,random:Math.random()+5,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:3*l.gravity,ovalScalar:.6,scalar:l.scalar}));return n?n.addFettis(T):(n=function(e,t,r,i,n){var l,c,d=t.slice(),u=e.getContext("2d"),h=o((function(t){function o(){l=c=null,u.clearRect(0,0,i.width,i.height),n(),t()}l=g.frame((function t(){!s||i.width===a.width&&i.height===a.height||(i.width=e.width=a.width,i.height=e.height=a.height),i.width||i.height||(r(e),i.width=e.width,i.height=e.height),u.clearRect(0,0,i.width,i.height),(d=d.filter((function(e){return function(e,t){t.x+=Math.cos(t.angle2D)*t.velocity+t.drift,t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity,t.wobble+=.1,t.velocity*=t.decay,t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+5,t.wobbleX=t.x+10*t.scalar*Math.cos(t.wobble),t.wobbleY=t.y+10*t.scalar*Math.sin(t.wobble);var r=t.tick++/t.totalTicks,s=t.x+t.random*t.tiltCos,a=t.y+t.random*t.tiltSin,i=t.wobbleX+t.random*t.tiltCos,n=t.wobbleY+t.random*t.tiltSin;return e.fillStyle="rgba("+t.color.r+", "+t.color.g+", "+t.color.b+", "+(1-r)+")",e.beginPath(),"circle"===t.shape?e.ellipse?e.ellipse(t.x,t.y,Math.abs(i-s)*t.ovalScalar,Math.abs(n-a)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI):function(e,t,r,s,a,i,n,o){e.save(),e.translate(t,r),e.rotate(i),e.scale(s,a),e.arc(0,0,1,0,o,void 0),e.restore()}(e,t.x,t.y,Math.abs(i-s)*t.ovalScalar,Math.abs(n-a)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI):(e.moveTo(Math.floor(t.x),Math.floor(t.y)),e.lineTo(Math.floor(t.wobbleX),Math.floor(a)),e.lineTo(Math.floor(i),Math.floor(n)),e.lineTo(Math.floor(s),Math.floor(t.wobbleY))),e.closePath(),e.fill(),t.tick<t.totalTicks}(u,e)}))).length?l=g.frame(t):o()})),c=o}));return{addFettis:function(e){return d=d.concat(e),h},canvas:e,promise:h,reset:function(){l&&g.cancel(l),c&&c()}}}(e,T,h,r,i)).promise}function b(r){var s=d||y(r,"disableForReducedMotion",Boolean),a=y(r,"zIndex",Number);if(s&&p)return o((function(e){e()}));l&&n?e=n.canvas:l&&!e&&(e=function(e){var t=document.createElement("canvas");return t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.pointerEvents="none",t.style.zIndex=e,t}(a),document.body.appendChild(e)),c&&!m&&h(e);var i={width:e.width,height:e.height};function g(){if(u){var t={getBoundingClientRect:function(){if(!l)return e.getBoundingClientRect()}};return h(t),void u.postMessage({resize:{width:t.width,height:t.height}})}i.width=i.height=null}function f(){n=null,c&&t.removeEventListener("resize",g),l&&e&&(document.body.removeChild(e),e=null,m=!1)}return u&&!m&&u.init(e),m=!0,u&&(e.__confetti_initialized=!0),c&&t.addEventListener("resize",g,!1),u?u.fire(r,i,f):v(r,i,f)}return b.reset=function(){u&&u.reset(),n&&n.reset()},b}r.exports=R(null,{useWorker:!0,resize:!0}),r.exports.create=R}(function(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:this||{}}(),Lt,!1);const Dt=Lt.exports,Pt=p.gql`
188
+ query getExchangeList {
189
+ viewer {
190
+ ... on User {
191
+ visibleRewardExchangeItems(limit: 20, offset: 0) {
192
+ data {
193
+ key
194
+ name
195
+ description
196
+ imageUrl
197
+ available
198
+ unavailableReasonCode
199
+ ruleType
200
+ sourceUnit
201
+ sourceValue
202
+ prettySourceValue
203
+ sourceMinValue
204
+ prettySourceMinValue
205
+ sourceMaxValue
206
+ prettySourceMaxValue
207
+ destinationMinValue
208
+ prettyDestinationMinValue
209
+ destinationMaxValue
210
+ prettyDestinationMaxValue
211
+ globalRewardKey
212
+ destinationUnit
213
+ steps {
214
+ sourceValue
215
+ prettySourceValue
216
+ destinationValue
217
+ prettyDestinationValue
218
+ available
219
+ globalRewardKey
220
+ unavailableReasonCode
221
+ rewardInput
222
+ }
223
+ }
224
+ totalCount
225
+ }
226
+ }
227
+ }
228
+ }
229
+ `,Ft=p.gql`
230
+ mutation exchange($exchangeRewardInput: ExchangeRewardInput!) {
231
+ exchangeReward(exchangeRewardInput: $exchangeRewardInput) {
232
+ reward {
233
+ id
234
+ fuelTankCode
235
+ }
236
+ }
237
+ }
238
+ `,Ot=class{constructor(t){e(this,t),this.ignored=!0,this.notAvailableError="{unavailableReasonCode, select, US_TAX {US Tax limit} INSUFFICIENT_REDEEMABLE_CREDIT {{sourceValue} required} AVAILABILITY_PREDICATE {Not available} other {{unavailableReasonCode}} }",this.chooseRewardTitle="Rewards",this.chooseAmountTitle="Select",this.confirmationTitle="Confirm",this.rewardTitle="Choose a reward",this.cancelText="Cancel",this.backText="Back",this.continueText="Continue",this.continueToConfirmationText="Continue to confirmation",this.redeemText="Redeem",this.redeemTitle="Confirm and redeem",this.redemptionSuccessText="Redeemed {sourceValue} for {destinationValue}",this.sourceAmountMessage="{ruleType, select, FIXED_GLOBAL_REWARD {{sourceValue}} other {{sourceMinValue} to {sourceMaxValue}}}",this.tooltipText="Copied",this.doneText="Done",this.selectText="Select amount to receive",this.queryError="Unable to load reward exchange list. Please try again",this.redemptionError="An error occured trying to redeem this reward. Please try again",this.notEnoughError="Not enough {sourceUnit} to redeem for this reward",this.rewardRedeemedText="Reward redeemed",this.promoCode="Promo Code",this.skeletonCardNum=8,this.rewardNameTitle="Reward",this.rewardAmountTitle="Reward Amount",this.costTitle="Cost to Redeem",s(this)}disconnectedCallback(){}render(){const e={...T(this),empty:t(Vt,null)},{states:s,data:i,callbacks:l,refs:c}=h()?function(e){return N({states:{content:{text:e},redeemStage:"chooseReward",amount:0,selectedStep:void 0,selectedItem:void 0,open:!1,exchangeError:!1,queryError:!1,loading:!1,noExchangeOptions:!1,empty:Vt()},data:{shareCode:"SHARECODE123",exchangeList:he.data.exchangeList},callbacks:{exchangeReward:()=>{},setExchangeState:()=>{},setStage:()=>{},resetState:()=>{},copyFuelTankCode:()=>{}},refs:{canvasRef:{}}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):function(e){var t,r,s,i,l;const[c,u]=d(((e,t)=>({...e,...t})),{selectedItem:void 0,selectedStep:void 0,redeemStage:"chooseReward",amount:0,exchangeError:!1}),[h,m]=n(!1),{selectedItem:p,selectedStep:g,redeemStage:y,amount:x,exchangeError:w}=c,k=v(),[E,{data:C,loading:I,errors:S}]=f(Ft),{data:_,loading:N,refetch:T,errors:M}=b(Pt,{},!(null==k?void 0:k.jwt));a((()=>{var e,t;(null===(t=null===(e=null==C?void 0:C.exchangeReward)||void 0===e?void 0:e.reward)||void 0===t?void 0:t.id)&&u({redeemStage:"success",exchangeError:!1}),S&&u({exchangeError:!0})}),[C,S]);const q=o();a((()=>{if(!q.current)return;const e=q.current;e.confetti=e.confetti||Dt.create(e,{resize:!0}),e.confetti()}),[q.current]);const{refresh:A}=R();return{states:{content:{text:e},selectedItem:p,redeemStage:y,amount:x,selectedStep:g,exchangeError:w,queryError:!!M,loading:N||I,open:h,noExchangeOptions:0===(null===(t=null==_?void 0:_.viewer)||void 0===t?void 0:t.visibleRewardExchangeItems.totalCount)},data:{exchangeList:null===(s=null===(r=null==_?void 0:_.viewer)||void 0===r?void 0:r.visibleRewardExchangeItems)||void 0===s?void 0:s.data,fuelTankCode:null===(l=null===(i=null==C?void 0:C.exchangeReward)||void 0===i?void 0:i.reward)||void 0===l?void 0:l.fuelTankCode},callbacks:{exchangeReward:async function(){if(!p)return;let e={accountId:null==k?void 0:k.accountId,userId:k.id};switch(p.ruleType){case"FIXED_GLOBAL_REWARD":e={...e,redeemCreditInput:{amount:p.sourceValue,unit:p.sourceUnit},globalRewardKey:p.globalRewardKey};break;case"STEPPED_FIXED_GLOBAL_REWARD":e={...e,redeemCreditInput:{amount:g.sourceValue,unit:p.sourceUnit},globalRewardKey:g.globalRewardKey};break;case"VARIABLE_GLOBAL_REWARD":e={...e,redeemCreditInput:{amount:x,unit:p.sourceUnit},globalRewardKey:p.globalRewardKey,rewardInput:g.rewardInput};break;case"VARIABLE_CREDIT_REWARD":e={...e,redeemCreditInput:{amount:x,unit:p.sourceUnit},rewardInput:{type:"CREDIT",unit:p.destinationUnit,assignedCredit:g.destinationValue}};break;default:e={...e,...g.rewardInput}}await E({exchangeRewardInput:e}),A()},setExchangeState:u,setStage:function(e){u({redeemStage:e})},resetState:e=>{e&&T(),u({amount:0,selectedStep:void 0,selectedItem:void 0,exchangeError:!1,redeemStage:"chooseReward"})},copyFuelTankCode:function(){var e,t;navigator.clipboard.writeText(null===(t=null===(e=null==C?void 0:C.exchangeReward)||void 0===e?void 0:e.reward)||void 0===t?void 0:t.fuelTankCode),m(!0),setTimeout((()=>m(!1)),1e3)}},refs:{canvasRef:q}}}(e);return t(r,{style:{display:"contents"}},t(me,{states:s,data:i,callbacks:l,refs:c}))}static get assetsDirs(){return["assets"]}};function Vt(){return t("slot",{name:"empty"},t("sqm-empty",{emptyStateImage:"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_exchange2.png",emptyStateHeader:"Redeem rewards",emptyStateText:"Use your points to redeem rewards once they become available"}))}const $t=c("sq:useRouter");function jt(e,t){if(e)return P(e).exec(t)}const Ut=class{constructor(t){e(this,t),this.ignored=!0,s(this)}disconnectedCallback(){}render(){const{callbacks:e}=function(){const e=S(),t=m(),[r,s]=n(void 0),[i,o]=n(void 0),l=e.pathname;return a((()=>{const e=t.querySelectorAll("sqm-route");Array.from(e).forEach((e=>{const t=document.createElement("template");t.setAttribute("path",e.path),t.innerHTML=e.innerHTML,e.parentNode.appendChild(t),e.parentNode.removeChild(e)}))}),[]),a((()=>{var e,t;if(!i||!r)return void $t("DOM not ready for navigation rendering on:",l);const s=r.querySelectorAll("template"),a=Array.from(s).find((e=>{var t,r,s;if(null===(s=jt(null===(r=null===(t=e.attributes)||void 0===t?void 0:t.path)||void 0===r?void 0:r.nodeValue,l))||void 0===s?void 0:s.length)return e})),n=null===(t=null===(e=null==a?void 0:a.attributes)||void 0===e?void 0:e.path)||void 0===t?void 0:t.nodeValue;if($t({containerDatasetPage:i.dataset.page,templatePath:n,page:l}),!a)return $t("No matching page found for ",l,", so render nothing"),i.innerHTML="",void(i.dataset.page=l);$t("Page updated to ",l,a),jt(n,i.dataset.page)?$t("don't rerender"):a&&(i.innerHTML=a.innerHTML,i.dataset.page=l)}),[r,i,l]),{callbacks:{setSlot:s,setContainer:o}}}();return t(r,null,t("div",{ref:e.setSlot,style:{display:"none"}},t("slot",null)),t("div",{style:{display:"contents"},ref:e.setContainer}))}};Ut.style="sqm-router{display:contents}";const Bt=class{constructor(t){e(this,t),this.type="default",this.iconslot="prefix",this.hideicon=!1,this.hidetext=!1,this.undefinedLinkText="Error: message link undefined!",this.unsupportedPlatformText="Error: not on a supported device",s(this)}disconnectedCallback(){}render(){const e=T(this),r=h()?function(e){return N({...e,loading:!1,hide:!1,onClick:()=>{}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):pe(e);return t(ve,Object.assign({},r),t("slot",null))}};Bt.style=":host{display:block}:host([hidden]){display:none}sl-button{display:block}";const zt=p.gql`
239
+ query ($programId: ID) {
240
+ user: viewer {
241
+ ... on User {
242
+ referralCode(programId: $programId)
243
+ }
244
+ }
245
+ }
246
+ `,Ht=p.gql`
247
+ mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
248
+ createUserAnalyticsEvent(eventMeta: $eventMeta)
249
+ }
250
+ `,Wt=class{constructor(t){e(this,t),this.tooltiptext="Copied to Clipboard",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Code",this.buttonStyle="icon",s(this)}disconnectedCallback(){}render(){const e=T(this),r=h()?function(e){const[t,r]=n(!1),s="SHARECODE001";return N({copyString:s,tooltiptext:e.tooltiptext,textAlign:e.textAlign,copyButtonLabel:e.copyButtonLabel,buttonStyle:e.buttonStyle,rewardStatus:"AVAILABLE",open:t,onClick:()=>{navigator.clipboard.writeText(s),r(!0),setTimeout((()=>r(!1)),e.tooltiplifespan)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):function(e){var t,r;const{programId:s=g()}=e,a=v(),i=y(),{data:o}=b(zt,{programId:s},!(null==a?void 0:a.jwt)),[l]=f(Ht),c=null!==(r=null===(t=null==o?void 0:o.user)||void 0===t?void 0:t.referralCode)&&void 0!==r?r:"...",[d,u]=n(!1);return{...e,onClick:function(){navigator.clipboard.writeText(c),u(!0),setTimeout((()=>u(!1)),e.tooltiplifespan),l({eventMeta:{programId:s,id:null==a?void 0:a.id,accountId:null==a?void 0:a.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:i,shareMedium:"DIRECT"}}})},open:d,copyString:c}}(e);return t(A,Object.assign({},r))}},Gt=class{constructor(t){e(this,t),this.tooltiptext="Copied to Clipboard",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Link",this.buttonStyle="icon",s(this)}disconnectedCallback(){}render(){const e=T(this),r=h()?function(e){const[t,r]=n(!1),s="https://www.example.com/sharelink/abc";return N({copyString:s,tooltiptext:e.tooltiptext,textAlign:e.textAlign,buttonStyle:e.buttonStyle,copyButtonLabel:e.copyButtonLabel,rewardStatus:"AVAILABLE",open:t,onClick:()=>{navigator.clipboard.writeText(s),r(!0),setTimeout((()=>r(!1)),e.tooltiplifespan)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):ge(e);return t(A,Object.assign({},r))}},Kt=class{constructor(t){e(this,t),this.ignored=!0,this.space="xxx-large",this.display="grid",s(this)}disconnectedCallback(){}render(){return t(fe,Object.assign({},T(this)),t("slot",null))}},Yt=p.gql`
251
+ mutation taskCardEvent($userEventInput: UserEventInput!) {
252
+ logUserEvent(userEventInput: $userEventInput) {
253
+ userId
254
+ }
255
+ }
256
+ `,Zt=class{constructor(t){e(this,t),this.ignored=!0,this.rewardAmount="0",this.rewardUnit="Points",this.cardTitle="Title Text",this.description="",this.repeatable=!1,this.finite=0,this.showProgressBar=!1,this.goal=1,this.steps=!1,this.progressBarUnit="",this.expiryMessage="Ends {endDate}",this.startsOnMessage="Starts {startDate}",this.endedMessage="Ended {endDate}",this.completedText="Completed {finite, select, 0 {{count, plural, =1 {{count} time} other {{count} times}}} other {{count}/{finite} times}}",this.buttonText="Complete Action",this.openNewTab=!1,this.hideButton=!1,s(this)}disconnectedCallback(){}render(){const{props:e}=h()?H(this):W({...T(this),programId:this.programId}),{value:r,loading:s}=e,{states:i,callbacks:n}=h()?function(e){return N({states:{loadingEvent:!1,locale:"en"},callbacks:{sendEvent:e=>console.log(e),onClick:()=>console.log("clicked")}},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){const t=v(),r=w(),[s,{data:i,loading:n}]=f(Yt),{refresh:o}=R();function l(){e.openNewTab?window.open(e.buttonLink):window.open(e.buttonLink,"_parent")}function c(e){s({userEventInput:{userId:null==t?void 0:t.id,accountId:null==t?void 0:t.accountId,events:[{key:e,fields:{}}]}})}return a((()=>{i&&(o(),l())}),[i]),{states:{loadingEvent:n,locale:r},callbacks:{sendEvent:c,onClick:function(){e.eventKey?c(e.eventKey):l()}}}}(this);return t(be,{callbacks:n,states:{loading:s,loadingEvent:i.loadingEvent,progress:r,locale:i.locale},content:{...T(this)}})}},Qt=class{constructor(t){e(this,t),this.ignored=!0,this.icon="gift",s(this)}disconnectedCallback(){}render(){return D().forEach((e=>{try{e.setIcon(this.icon)}catch{}})),t("div",null,t("style",{type:"text/css"},"\n\t\t:host{\n\t\t\tdisplay: block; \n\t\t}\n\n\t\t::slotted(*:not(:only-child):not(:last-child)) {\n\t\t\tmargin-bottom: var(--sl-spacing-xx-large);\n\t\t}\n\t"),t("slot",null))}},Xt=()=>t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M22.5 7.5H18.6761H13.5V24H20.75C21.3023 24 21.75 23.5523 21.75 23V22.5V13.5H22.5H23C23.5523 13.5 24 13.0523 24 12.5V12V9V8.5C24 7.94772 23.5523 7.5 23 7.5H22.5Z",fill:"#F2C94C"}),t("path",{d:"M2.25 22.5V23C2.25 23.5523 2.69772 24 3.25 24H10.5V7.5H6.96363H1.5H1C0.447715 7.5 0 7.94772 0 8.5V9V12V12.5C0 13.0523 0.447715 13.5 1 13.5H1.5H2.25V22.5Z",fill:"#F2C94C"}),t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.25 13.5V15H21.75V13.5H2.25Z",fill:"#BE9720"}),t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21 4.06424C21 5.39348 19.0041 7.4062 18 7.5H13.5V24H10.5027V7.5H6.88188C4.8187 7.05273 3 5.46806 3 3.78109C3 2.1371 3.71404 0.835051 5.01276 0.273062C6.25382 -0.26398 7.68678 0.0304991 8.81964 0.817C10.2101 1.78237 10.9902 3.59446 11.6978 5.2384C11.7599 5.38268 11.8215 5.52566 11.8828 5.66667C11.9426 5.53298 12.0028 5.3969 12.0638 5.25912C12.7649 3.67422 13.5654 1.86488 14.9106 0.893444C16.0997 0.0347157 17.6114 -0.289736 18.9181 0.298417C20.2693 0.906596 21 2.3018 21 4.06424ZM15.9185 2.25C16.6392 1.72957 17.502 1.63518 18.2396 2.25C18.8819 2.78542 18.9162 3.03745 18.9987 3.64389L19.0133 3.75C19.0133 4.64776 18.2396 6 17.4659 6C16.9177 6 16.4871 5.99537 16.0836 5.99103C15.3479 5.98312 14.702 5.97618 13.5974 6C13.808 5.59179 13.9761 5.20003 14.1365 4.82641C14.5654 3.82715 14.9386 2.95763 15.9185 2.25ZM7.40792 2.25C7.05911 2.00783 6.25921 2.11591 5.92748 2.25945C5.65341 2.37805 5.24403 2.73987 5.24403 3.78109C5.24403 4.79286 6.88188 5.66667 6.88188 5.66667C6.88188 5.66667 8.18161 6 10.5027 6C9.71258 4.04177 8.59336 3.073 7.40792 2.25Z",fill:"#EB5757"})),Jt=()=>t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("circle",{cx:"12",cy:"12",r:"9",fill:"currentColor",stroke:"currentColor","stroke-width":"2"})),er=q({TimelineReward:{color:"var(--sl-color-neutral-900)",lineHeight:"var(--sl-line-height-dense)","& .container":{display:"flex"},"& .line":{display:"none",color:"transparent",userSelect:"none",background:"var(--sl-color-primary-300)",width:"4px",borderRadius:"4px",margin:"-2px",position:"relative",left:"12px",top:"34px"},"& .step":{display:"flex"},"& .icon":{position:"relative",top:"4px",zIndex:"1",color:"var(--sl-color-primary-300)",marginRight:"var(--sl-spacing-large)"},"& .reward":{marginRight:"var(--sl-spacing-x-small)",fontSize:"var(--sl-font-size-x-large)",fontWeight:"var(--sl-font-weight-semibold)"},"& .unit":{textTransform:"uppercase",fontSize:"var(--sl-font-size-small)"},"& .description":{fontSize:"var(--sl-font-size-medium)"}}}),tr=er.toString();function rr(e){var r;const s=null!==(r=e.icon)&&void 0!==r?r:e.iconState;return t("div",{class:er.classes.TimelineReward,part:"sqm-base"},t("style",{type:"text/css"},tr,"\n\t:host{\n\t\tdisplay: block; \n\t}\n\n\t:host(:not(:last-of-type)) .line {\n\t\tdisplay: block; \n\t}\n\t"),t("div",{class:"container",part:"sqm-entry-container"},t("div",{class:"line"},"/"),t("div",{class:"step"},"gift"===s&&t("div",{class:"icon"},t(Xt,null)),"circle"===s&&t("div",{class:"icon"},t(Jt,null)),t("div",null,t("div",null,t("span",{class:"reward",part:"sqm-reward"},e.reward),t("span",{class:"unit",part:"sqm-unit"},e.unit)),t("div",{class:"description",part:"sqm-description"},e.desc)))))}const sr=class{constructor(t){e(this,t),this.ignored=!0,this.iconState="gift",s(this)}async setIcon(e){this.iconState=e}disconnectedCallback(){}render(){return L([this.reward]),t(rr,Object.assign({},T(this)))}};function ar(e){return t(r,null,e.loading?e.loadingText:e.username)}const ir=p.gql`
257
+ query getUserName {
258
+ viewer {
259
+ ... on User {
260
+ firstName
261
+ lastName
262
+ }
263
+ }
264
+ }
265
+ `,nr=class{constructor(t){e(this,t),this.ignored=!0,this.fallback="Anonymous User",this.loadingText="...",s(this)}disconnectedCallback(){}render(){const e=h()?function(e){return N({loading:!1,loadingText:"...",username:"John Smith"},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){var t,r,s,a,i,n,o,l;const c=v(),d=b(ir,{},!(null==c?void 0:c.jwt)),u=(null===(r=null===(t=d.data)||void 0===t?void 0:t.viewer)||void 0===r?void 0:r.firstName)||(null===(a=null===(s=d.data)||void 0===s?void 0:s.viewer)||void 0===a?void 0:a.lastName)?`${null===(n=null===(i=d.data)||void 0===i?void 0:i.viewer)||void 0===n?void 0:n.firstName} ${null===(l=null===(o=d.data)||void 0===o?void 0:o.viewer)||void 0===l?void 0:l.lastName}`:e.fallback;return{loadingText:e.loadingText,loading:d.loading,username:u}}(this);return t(ar,Object.assign({},e))}};export{xe as sqm_big_stat,we as sqm_brand,ke as sqm_card_feed,Ce as sqm_checkbox_field,Se as sqm_coupon_code,Ne as sqm_divided_layout,Te as sqm_dropdown_field,Le as sqm_edit_profile,De as sqm_hero,Fe as sqm_hero_image,Oe as sqm_hook_story_container,$e as sqm_image,je as sqm_input_field,Be as sqm_lead_form,Ke as sqm_leaderboard,Je as sqm_link_button,et as sqm_marketing_emails_checkbox,tt as sqm_name_fields,st as sqm_navigation_menu,lt as sqm_payout_button_scroll,ht as sqm_payout_status_alert,gt as sqm_portal_change_marketing,ft as sqm_portal_change_password,bt as sqm_portal_footer,yt as sqm_portal_frame,xt as sqm_portal_login,wt as sqm_portal_register,Et as sqm_program_explainer,It as sqm_program_explainer_step,St as sqm_program_menu,Mt as sqm_referral_card,At as sqm_referral_iframe,Ot as sqm_reward_exchange_list,Ut as sqm_router,Bt as sqm_share_button,Wt as sqm_share_code,Gt as sqm_share_link,Kt as sqm_stat_container,Zt as sqm_task_card,Qt as sqm_timeline,sr as sqm_timeline_entry,nr as sqm_user_name}
@@ -0,0 +1 @@
1
+ import{r as e,h as t}from"./p-f708da7b.js";import{i as s,n as i}from"./p-cd651f81.js";import"./p-65069b66.js";import{i as r}from"./p-94a876b9.js";import{c as a}from"./p-c1086930.js";import{g as o,a as n}from"./p-9ec99ced.js";import"./p-cef45012.js";import"./p-91521e9d.js";import{L as p,R as d}from"./p-f98a4354.js";import{L as l}from"./p-506e7681.js";const m=class{constructor(t){e(this,t),this.ignored=!0,this.required=!1,this.fieldType="text",this.requiredFieldErrorMessage="Please enter a {fieldName}",this.fieldOptional=!1,i(this)}disconnectedCallback(){}render(){const e={...o(this)},i=n([{attribute:"field-name",value:this.fieldName}]);if(!r()&&i)return t(d,{missingProps:i,heading:"An error occured while loading this form",subheading:"A technical problem prevented this input field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"});const{states:m}=r()?a({states:{leadForState:{}},content:{fieldName:(c=this).fieldName,fieldLabel:c.fieldLabel,fieldType:c.fieldType,requiredFieldErrorMessage:c.requiredFieldErrorMessage,required:c.required}},c.demoData||{},{arrayMerge:(e,t)=>t}):{states:{leadFormState:s(p)}};var c;return t(l,{states:m,content:e})}};export{m as sqm_lead_input_field}
@@ -0,0 +1 @@
1
+ import{h as e}from"./p-f708da7b.js";import{k as s,y as t}from"./p-cd651f81.js";import{i as a}from"./p-65069b66.js";import{_ as i}from"./p-94a876b9.js";import{c as o}from"./p-cef45012.js";const l=o({IconStyle:{display:"block",position:"absolute",top:"23px"},DivStyle:{marginLeft:"28px"},Details:{marginLeft:"28px"},Heading:{display:"inline-block"},Children:{display:"none"}}),r=l.toString();function n({missingProps:t,heading:o="There was a problem loading this section",subheading:n="There was a technical problem that prevented this section from loading. Please contact us with the link to this page.",description:d="Error occured while loading <{tagName}>. Values for the following attributes are missing:"},c){if(!t)return!1;const p=i(),[m,u]=s(!1);return e("sl-alert",{type:"danger",open:!0},e("style",{type:"text/css"},r),e("div",{slot:"icon",class:l.classes.IconStyle},e("sl-icon",{name:"exclamation-octagon"})),e("div",{class:l.classes.DivStyle},e("h2",{class:l.classes.Heading},a.formatMessage({id:"error-heading",defaultMessage:o})),e("p",null,a.formatMessage({id:"error-subheading",defaultMessage:n}))),e("details",{class:l.classes.Details},e("summary",{onClick:()=>u(!m)},m?"Less":"More"," details"),e("p",null,a.formatMessage({id:"error-description",defaultMessage:d},{tagName:p.tagName.toLowerCase()})),e("ul",null,t.map((s=>e("li",null,e("strong",null,s.attribute)))))),e("div",{class:l.classes.Children},c))}const d="sq:lead-form-state";function c(e){const s=i(),[a,o]=t(s,"sq:lead-form-state",e);return t(s,"sq:lead-form-state-internal",[a,o]),{leadFormState:a,setLeadFormState:o}}export{d as L,n as R,c as u}
@@ -3,6 +3,7 @@ declare const _default: {
3
3
  };
4
4
  export default _default;
5
5
  export declare const Default: () => any;
6
+ export declare const LeadSubmitSuccess: () => any;
6
7
  export declare const LeadSubmitWithError: () => any;
7
8
  export declare const LeadSubmitLoading: () => any;
8
9
  export declare const FieldsHidden: () => any;
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const Default: () => any;
6
+ export declare const WithError: () => any;
7
+ export declare const Disabled: () => any;
8
+ export declare const Loading: () => any;
9
+ export declare const WithInitialValue: () => any;
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const Default: () => any;
6
+ export declare const WithError: () => any;
7
+ export declare const Disabled: () => any;
8
+ export declare const WithInitialValue: () => any;
@@ -0,0 +1,16 @@
1
+ import { VNode } from "../../stencil-public-runtime";
2
+ import { LeadFormState } from "./useLeadFormState";
3
+ export interface DropdownFieldViewProps {
4
+ states: {
5
+ leadFormState?: LeadFormState;
6
+ };
7
+ content: {
8
+ required: boolean;
9
+ dropdownName: string;
10
+ dropdownLabel: string;
11
+ dropdownOptional?: boolean;
12
+ requiredFieldErrorMessage?: string;
13
+ selectOptions?: VNode | VNode[];
14
+ };
15
+ }
16
+ export declare function LeadDropdownFieldView(props: DropdownFieldViewProps): any;
@@ -0,0 +1,42 @@
1
+ import { DemoData } from "../../global/demo";
2
+ import { DropdownFieldViewProps } from "./sqm-lead-dropdown-field-view";
3
+ /**
4
+ * @uiName Lead Form Dropdown Field
5
+ * @validParents ["sqm-lead-form"]
6
+ * @slots [{"name":"", "title":"Drop Down Option"}]
7
+ * @exampleGroup Microsite Components
8
+ * @example Lead Form Dropdown Field - <sqm-lead-dropdown-field dropdown-label="Select an option" required-field-error-message="Please select an option"><sl-menu-item value="option-1">Option 1</sl-menu-item><sl-menu-item value="option-2">Option 2</sl-menu-item><sl-menu-item value="option-3">Option 3</sl-menu-item></sqm-lead-dropdown-field>
9
+ */
10
+ export declare class LeadDropdownField {
11
+ ignored: boolean;
12
+ /**
13
+ * This name is used as the key for this form field on submission. The name must be unique within this specific form.
14
+ * @uiName Dropdown name attribute
15
+ * @required
16
+ */
17
+ dropdownName: string;
18
+ /**
19
+ * @uiName Dropdown label
20
+ */
21
+ dropdownLabel: string;
22
+ /**
23
+ * The message to be displayed when a required field is not filled.
24
+ *
25
+ * @uiName Required field message
26
+ * @uiWidget textArea
27
+ */
28
+ requiredFieldErrorMessage: string;
29
+ /**
30
+ * @uiName Optional
31
+ * @default
32
+ */
33
+ dropdownOptional?: boolean;
34
+ /**
35
+ * @undocumented
36
+ * @uiType object
37
+ */
38
+ demoData?: DemoData<DropdownFieldViewProps>;
39
+ constructor();
40
+ disconnectedCallback(): void;
41
+ render(): any;
42
+ }
@@ -3,6 +3,7 @@ import { LeadFormState } from "./useLeadFormState";
3
3
  export interface LeadFormViewProps {
4
4
  states: {
5
5
  error: string;
6
+ success: boolean;
6
7
  loading: boolean;
7
8
  leadFormState: LeadFormState;
8
9
  referralCode: string;
@@ -17,7 +18,13 @@ export interface LeadFormViewProps {
17
18
  firstNameLabel?: string;
18
19
  lastNameLabel?: string;
19
20
  submitLabel?: string;
21
+ resubmitFormLabel?: string;
20
22
  pageLabel?: string;
23
+ supportLink?: string;
24
+ submitSuccessHeader?: string;
25
+ submitSuccessDescription?: string;
26
+ submitErrorHeader?: string;
27
+ submitErrorDescription?: string;
21
28
  requiredFieldErrorMessage: string;
22
29
  invalidEmailErrorMessage: string;
23
30
  };