@saasquatch/mint-components 2.1.8-24 → 2.1.8-26

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 (33) hide show
  1. package/dist/cjs/{ShadowViewAddon-1ed8faf9.js → ShadowViewAddon-1bc48666.js} +11 -10
  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_45.cjs.entry.js +61 -57
  5. package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
  6. package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +6 -5
  7. package/dist/collection/components/sqm-share-link/sqm-share-link.js +153 -137
  8. package/dist/collection/components/sqm-share-link/useShareLink.js +5 -5
  9. package/dist/esm/{ShadowViewAddon-395ab799.js → ShadowViewAddon-10db3e11.js} +11 -10
  10. package/dist/esm/loader.js +1 -1
  11. package/dist/esm/mint-components.js +1 -1
  12. package/dist/esm/sqm-big-stat_45.entry.js +61 -57
  13. package/dist/esm/sqm-stencilbook.entry.js +1 -1
  14. package/dist/esm-es5/{ShadowViewAddon-395ab799.js → ShadowViewAddon-10db3e11.js} +1 -1
  15. package/dist/esm-es5/loader.js +1 -1
  16. package/dist/esm-es5/mint-components.js +1 -1
  17. package/dist/esm-es5/sqm-big-stat_45.entry.js +1 -1
  18. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  19. package/dist/mint-components/mint-components.esm.js +1 -1
  20. package/dist/mint-components/{p-d7adb7f3.system.js → p-0b5dd21b.system.js} +1 -1
  21. package/dist/mint-components/p-4b365f1f.system.js +1 -1
  22. package/dist/mint-components/{p-2b108f39.system.entry.js → p-4df9c93e.system.entry.js} +1 -1
  23. package/dist/mint-components/{p-8e5a6491.system.entry.js → p-6d10c03c.system.entry.js} +1 -1
  24. package/dist/mint-components/{p-cd79864c.js → p-72055e41.js} +2 -2
  25. package/dist/mint-components/{p-ba640335.entry.js → p-840157bd.entry.js} +2 -2
  26. package/dist/mint-components/{p-e6cf9daa.entry.js → p-a4f44c57.entry.js} +1 -1
  27. package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +59 -55
  28. package/dist/types/components/sqm-share-link/useShareLink.d.ts +5 -5
  29. package/dist/types/components.d.ts +94 -86
  30. package/docs/docs.docx +0 -0
  31. package/docs/raisins.json +1 -1
  32. package/grapesjs/grapesjs.js +1 -1
  33. package/package.json +1 -1
@@ -444,7 +444,7 @@ import{h as e,c as a,d as t,F as l,g as r}from"./p-083180bf.js";import{i}from"./
444
444
  }
445
445
  }
446
446
  }
447
- `;function Ma(e){var a,t,l,r;const{sharetitle:i,sharetext:o,medium:s}=e,n=e.programId?e.programId:c(),d=p(),u={engagementMedium:g(),programId:n,shareMedium:s.toUpperCase()},v=f(k),x=null==v?void 0:v[s],C=m(La,u,!(null==d?void 0:d.jwt)||!n||void 0!==x),[y,w]=h($),q=(null==x?void 0:x.shareLink)||(null===(t=null===(a=null==C?void 0:C.data)||void 0===a?void 0:a.viewer)||void 0===t?void 0:t.shareLink),R=b(),S="SMS"===s.toLocaleUpperCase()&&void 0===window.orientation||"DIRECT"===s.toLocaleUpperCase()&&!window.navigator.share,I=(null==x?void 0:x.messageLink)||(null===(r=null===(l=C.data)||void 0===l?void 0:l.viewer)||void 0===r?void 0:r.messageLink),E=!("FACEBOOK"===s.toLocaleUpperCase()&&"SquatchAndroid"===R.type)&&"DIRECT"!==s.toLocaleUpperCase()&&I,T=window.navigator.userAgent.toLowerCase(),L=/safari/.test(T),M=/iphone|ipod|ipad/.test(T)&&!L;return{...e,loading:C.loading&&!(null==x?void 0:x.messageLink),messageLink:I,isPlainLink:E,onClick:async function(){x&&(await y({referralCode:v.referralCode}),v.refresh()),"FACEBOOK"===s.toLocaleUpperCase()&&"SquatchAndroid"===R.type?function(e,a,t){"undefined"===a||"undefined"===e?alert(t):void 0!==SquatchAndroid.shareOnFacebook?SquatchAndroid.shareOnFacebook(e,a):function(e,a){e?window.location.href=e:alert(a)}(a,t)}(q,I,e.errorText):"DIRECT"===s.toLocaleUpperCase()&&function(e,a,t,l){const r=e.sharetitle||"Share title",i=e.sharetext||"Share text";if("undefined"===a)return alert(t);window.navigator.share?window.navigator.share({title:r,text:i,url:a}).catch((e=>console.error("Error on web share",e))):alert(l)}({sharetitle:i,sharetext:o},q,e.errorText,e.unsupportedPlatformText)},openInSameTab:M,hide:S}}const Va="\n :host {\n display: block;\n width: 100%;\n }\n";function Aa(a){const{copyTextViewProps:t,allowCustomization:l,customizeLinkLabel:r,saveLabelText:o,cancelLabelText:s,isEditing:n,editValue:d,domainPrefix:c,editsRemaining:u,limitReached:p,validationError:v,isValidating:m,isSaving:g,characterLimit:f,minCharacters:h,charactersRemaining:b,editLimitText:x,editLimitReachedText:C,supportLinkText:y,customizeDisabled:w,customizeDisabledTooltip:R,onCustomizeClick:S,onEditValueChange:k,onSave:$,onCancel:I}=a,E=q({Container:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-xx-small)",width:"100%"},CustomizeLinkText:{margin:"0",fontSize:"var(--sl-font-size-small)",fontWeight:"600",cursor:"pointer",color:"var(--sl-color-neutral-900)",textAlign:"left",padding:"var(--sl-spacing-small)","&:hover":{textDecoration:"underline"}},CustomizeLinkDisabled:{margin:"0",fontSize:"var(--sl-font-size-small)",fontWeight:"600",color:"var(--sl-color-neutral-400)",cursor:"default",textAlign:"left",padding:"var(--sl-spacing-small)"},EditContainer:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-x-small)",width:"100%"},EditInputWrapper:{display:"flex",alignItems:"center",width:"100%",border:"var(--sqm-border-thickness, 1px) solid var(--sqm-input-border-color, #d1d5db)",borderRadius:"var(--sqm-border-radius-normal, 4px)",background:"var(--sqm-input-background, #fff)",overflow:"hidden","&:focus-within":{borderColor:"#999999",boxShadow:"0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color)"}},DomainPrefix:{padding:"0 0 0 var(--sl-spacing-medium)",fontSize:"var(--sl-font-size-medium)",color:"var(--sl-color-neutral-500)",whiteSpace:"nowrap",userSelect:"none",lineHeight:"var(--sl-input-height-medium)"},EditInput:{flex:"1",border:"none",outline:"none",padding:"0 var(--sl-spacing-medium) 0 0",fontSize:"var(--sl-font-size-medium)",fontFamily:"var(--sl-font-sans)",color:"var(--sl-input-color)",background:"transparent",lineHeight:"var(--sl-input-height-medium)",minWidth:"0"},EditLabel:{margin:"0",fontSize:"var(--sl-font-size-small)",color:"var(--sl-color-neutral-500)"},HelperText:{margin:"0",fontSize:"var(--sl-font-size-small)",color:"var(--sl-color-neutral-500)"},ErrorText:{margin:"0",fontSize:"var(--sl-font-size-small)",color:"var(--sqm-danger-color-text, #dc2626)"},ActionRow:{display:"flex",gap:"var(--sl-spacing-medium)",alignItems:"center"},SaveButton:{cursor:"pointer",fontFamily:"var(--sl-font-sans)",fontSize:"var(--sl-font-size-small)",fontWeight:"600",padding:"var(--sl-spacing-x-small) var(--sl-spacing-medium)",borderRadius:"var(--sqm-border-radius-normal, 4px)",border:"1px solid var(--sl-color-neutral-900)",background:"var(--sl-color-neutral-900)",color:"#fff","&:disabled":{opacity:"0.5",cursor:"default"}},CancelButton:{margin:"0",fontSize:"var(--sl-font-size-small)",fontWeight:"600",cursor:"pointer",background:"none",border:"none",padding:"0",fontFamily:"var(--sl-font-sans)",color:"var(--sl-color-neutral-500)"},LimitReachedContainer:{display:"flex",alignItems:"center",gap:"var(--sl-spacing-x-small)"}}),T=E.toString(),L="EXISTING_CODE_CONFLICT"===(null==v?void 0:v.code)?"info":"warning",M=b<=14,A=i.formatMessage({id:"editLimitText",defaultMessage:x},{editsRemaining:u});return console.log(c,"domain prefix"),n?e("div",{class:E.classes.Container},e("style",{type:"text/css"},T,Va),e("p",{class:E.classes.EditLabel},"Enter your link"),e("div",{class:E.classes.EditInputWrapper},e("span",{class:E.classes.DomainPrefix},c),e("input",{class:E.classes.EditInput,type:"text",value:d,onInput:e=>k(e.target.value),onKeyDown:e=>{"/"!==e.key&&"@"!==e.key||e.preventDefault()},disabled:g,maxLength:f})),e("p",{class:E.classes.HelperText},A,M&&` Characters remaining: ${b}`),v&&e("sqm-form-message",{type:L,style:{paddingBottom:"var(--sl-spacing-xx-small)"}},e("p",{part:"alert-title"},v.title),v.description),m&&e("p",{class:E.classes.HelperText},"Validating..."),e("div",{class:E.classes.ActionRow},e("button",{class:E.classes.SaveButton,onClick:$,disabled:g||m||!!v||!d||d.length<h},g?"Saving...":o),e("button",{class:E.classes.CancelButton,onClick:I,disabled:g},s))):e("div",{class:E.classes.Container},e("style",{type:"text/css"},T,Va),e(V,Object.assign({},t)),l&&(w?e("sl-tooltip",{content:R,placement:"top",style:{display:"inline-block",width:"fit-content"}},e("p",{class:E.classes.CustomizeLinkDisabled},r)):e("div",{class:E.classes.LimitReachedContainer},e("p",{class:p?E.classes.CustomizeLinkDisabled:E.classes.CustomizeLinkText,onClick:p?void 0:S},r),l&&p&&e("p",{class:E.classes.HelperText},i.formatMessage({id:"editLimitReached",defaultMessage:C},{supportLink:e("a",{target:"_blank",href:"https://help.impact.com/other/readme/get-help-and-support"},y)})))))}const Da=v.gql`
447
+ `;function Ma(e){var a,t,l,r;const{sharetitle:i,sharetext:o,medium:s}=e,n=e.programId?e.programId:c(),d=p(),u={engagementMedium:g(),programId:n,shareMedium:s.toUpperCase()},v=f(k),x=null==v?void 0:v[s],C=m(La,u,!(null==d?void 0:d.jwt)||!n||void 0!==x),[y,w]=h($),q=(null==x?void 0:x.shareLink)||(null===(t=null===(a=null==C?void 0:C.data)||void 0===a?void 0:a.viewer)||void 0===t?void 0:t.shareLink),R=b(),S="SMS"===s.toLocaleUpperCase()&&void 0===window.orientation||"DIRECT"===s.toLocaleUpperCase()&&!window.navigator.share,I=(null==x?void 0:x.messageLink)||(null===(r=null===(l=C.data)||void 0===l?void 0:l.viewer)||void 0===r?void 0:r.messageLink),E=!("FACEBOOK"===s.toLocaleUpperCase()&&"SquatchAndroid"===R.type)&&"DIRECT"!==s.toLocaleUpperCase()&&I,T=window.navigator.userAgent.toLowerCase(),L=/safari/.test(T),M=/iphone|ipod|ipad/.test(T)&&!L;return{...e,loading:C.loading&&!(null==x?void 0:x.messageLink),messageLink:I,isPlainLink:E,onClick:async function(){x&&(await y({referralCode:v.referralCode}),v.refresh()),"FACEBOOK"===s.toLocaleUpperCase()&&"SquatchAndroid"===R.type?function(e,a,t){"undefined"===a||"undefined"===e?alert(t):void 0!==SquatchAndroid.shareOnFacebook?SquatchAndroid.shareOnFacebook(e,a):function(e,a){e?window.location.href=e:alert(a)}(a,t)}(q,I,e.errorText):"DIRECT"===s.toLocaleUpperCase()&&function(e,a,t,l){const r=e.sharetitle||"Share title",i=e.sharetext||"Share text";if("undefined"===a)return alert(t);window.navigator.share?window.navigator.share({title:r,text:i,url:a}).catch((e=>console.error("Error on web share",e))):alert(l)}({sharetitle:i,sharetext:o},q,e.errorText,e.unsupportedPlatformText)},openInSameTab:M,hide:S}}const Va="\n :host {\n display: block;\n width: 100%;\n }\n";function Aa(a){const{copyTextViewProps:t,allowCustomization:l,customizeLinkLabel:r,saveLabelText:o,cancelLabelText:s,isEditing:n,editValue:d,domainPrefix:c,editsRemaining:u,limitReached:p,validationError:v,isValidating:m,isSaving:g,characterLimit:f,minCharacters:h,charactersRemaining:b,editLimitText:x,editLimitReachedText:C,supportLinkText:y,customizeDisabled:w,customizeDisabledTooltip:R,onCustomizeClick:S,onEditValueChange:k,onSave:$,onCancel:I}=a,E=q({Container:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-xx-small)",width:"100%"},CustomizeLinkText:{margin:"0",fontSize:"var(--sl-font-size-small)",fontWeight:"600",cursor:"pointer",color:"var(--sl-color-neutral-900)",textAlign:"left","&:hover":{textDecoration:"underline"}},CustomizeLinkDisabled:{margin:"0",fontSize:"var(--sl-font-size-small)",fontWeight:"600",color:"var(--sl-color-neutral-400)",cursor:"default",textAlign:"left"},EditContainer:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-x-small)",width:"100%"},EditInputWrapper:{display:"flex",alignItems:"center",width:"100%",border:"var(--sqm-border-thickness, 1px) solid var(--sqm-input-border-color, #d1d5db)",borderRadius:"var(--sqm-border-radius-normal, 4px)",background:"var(--sqm-input-background, #fff)",overflow:"hidden","&:focus-within":{borderColor:"#999999",boxShadow:"0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color)"}},DomainPrefix:{padding:"0 0 0 var(--sl-spacing-medium)",fontSize:"var(--sl-font-size-medium)",color:"var(--sl-color-neutral-500)",whiteSpace:"nowrap",userSelect:"none",lineHeight:"var(--sl-input-height-medium)"},EditInput:{flex:"1",border:"none",outline:"none",padding:"0 var(--sl-spacing-medium) 0 0",fontSize:"var(--sl-font-size-medium)",fontFamily:"var(--sl-font-sans)",color:"var(--sl-input-color)",background:"transparent",lineHeight:"var(--sl-input-height-medium)",minWidth:"0"},EditLabel:{margin:"0",fontSize:"var(--sl-font-size-small)",color:"var(--sl-color-neutral-500)"},HelperText:{margin:"0",fontSize:"var(--sl-font-size-small)",color:"var(--sl-color-neutral-500)"},ErrorText:{margin:"0",fontSize:"var(--sl-font-size-small)",color:"var(--sqm-danger-color-text, #dc2626)"},ActionRow:{display:"flex",gap:"var(--sl-spacing-medium)",alignItems:"center"},SaveButton:{cursor:"pointer",fontFamily:"var(--sl-font-sans)",fontSize:"var(--sl-font-size-small)",fontWeight:"600",padding:"var(--sl-spacing-x-small) var(--sl-spacing-medium)",borderRadius:"var(--sqm-border-radius-normal, 4px)",border:"1px solid var(--sl-color-neutral-900)",background:"var(--sl-color-neutral-900)",color:"#fff","&:disabled":{opacity:"0.5",cursor:"default"}},CancelButton:{margin:"0",fontSize:"var(--sl-font-size-small)",fontWeight:"600",cursor:"pointer",background:"none",border:"none",fontFamily:"var(--sl-font-sans)",color:"var(--sl-color-neutral-500)","&::part(label)":{padding:"0"}},LimitReachedContainer:{display:"flex",alignItems:"center",gap:"var(--sl-spacing-x-small)"}}),T=E.toString(),L="EXISTING_CODE_CONFLICT"===(null==v?void 0:v.code)?"info":"warning",M=b<=14,A=i.formatMessage({id:"editLimitText",defaultMessage:x},{editsRemaining:u});return console.log(c,"domain prefix"),n?e("div",{class:E.classes.Container},e("style",{type:"text/css"},T,Va),e("p",{class:E.classes.EditLabel},"Enter your link"),e("div",{class:E.classes.EditInputWrapper},e("span",{class:E.classes.DomainPrefix},c),e("input",{class:E.classes.EditInput,type:"text",value:d,onInput:e=>k(e.target.value),onKeyDown:e=>{"/"!==e.key&&"@"!==e.key||e.preventDefault()},disabled:g,maxLength:f})),e("p",{class:E.classes.HelperText},A,M&&` Characters remaining: ${b}`),v&&e("sqm-form-message",{type:L,style:{paddingBottom:"var(--sl-spacing-xx-small)"}},e("p",{part:"alert-title"},v.title),v.description),m&&e("p",{class:E.classes.HelperText},"Validating..."),e("div",{class:E.classes.ActionRow},e("button",{class:E.classes.SaveButton,onClick:$,disabled:g||m||!!v||!d||d.length<h},g?"Saving...":o),e("sl-button",{type:"text",class:E.classes.CancelButton,onClick:I,disabled:g},s))):e("div",{class:E.classes.Container},e("style",{type:"text/css"},T,Va),e(V,Object.assign({},t)),l&&(w?e("sl-tooltip",{content:R,placement:"top",style:{display:"inline-block",width:"fit-content"}},e("p",{class:E.classes.CustomizeLinkDisabled},r)):e("div",{class:E.classes.LimitReachedContainer},e("p",{class:p?E.classes.CustomizeLinkDisabled:E.classes.CustomizeLinkText,onClick:p?void 0:S},r),l&&p&&e("p",{class:E.classes.HelperText},i.formatMessage({id:"editLimitReached",defaultMessage:C},{supportLink:e("a",{target:"_blank",href:"https://help.impact.com/other/readme/get-help-and-support"},e("p",null,y))})))))}const Da=v.gql`
448
448
  query ($programId: ID) {
449
449
  user: viewer {
450
450
  ... on User {
@@ -496,4 +496,4 @@ import{h as e,c as a,d as t,F as l,g as r}from"./p-083180bf.js";import{i}from"./
496
496
  }
497
497
  }
498
498
  }
499
- `;function Pa(e){var a,t,l,r,i,o,s;const{programId:u=c()}=e,v=p(),b=g(),y=f(k),{data:w,refetch:q}=m(Da,{programId:u},!(null==v?void 0:v.jwt)||!!e.linkOverride||void 0!==(null==y?void 0:y.shareLink)),[R]=h(Ha),[S]=h($),[I,{loading:E}]=h(za),[T]=x(Ba),{refresh:L}=C(),{data:M}=m(Fa,{},!(null==v?void 0:v.jwt)||!e.allowCustomization),{data:V,refetch:A}=m(_a,{},!(null==v?void 0:v.jwt)||!e.allowCustomization),{url:D,domain:H,path:z}=function(e){try{const a=new URL(e);return{url:a.origin+a.pathname,domain:a.origin+"/",path:a.pathname.slice(1)}}catch{return{url:e,domain:e,path:""}}}(null!==(t=(null==y?void 0:y.shareLink)||(null===(a=null==w?void 0:w.user)||void 0===a?void 0:a.shareLink))&&void 0!==t?t:"..."),[B,F]=n(!1),[_,P]=n(!1),[U,W]=n(""),[N,Z]=n(null),[O,j]=n(!1),G=d(void 0),X=!(null!=(null===(l=null==M?void 0:M.tenantSettings)||void 0===l?void 0:l.primaryLinkDomain)),Q=null!==(s=null===(o=null===(i=null===(r=null==V?void 0:V.viewer)||void 0===r?void 0:r.shareLinkCodes)||void 0===i?void 0:i.data)||void 0===o?void 0:o.filter((e=>e.isVanity)).length)&&void 0!==s?s:0,K=Math.max(0,5-Q),Y=K<=0;function J(a){return a?{EXISTING_CODE_CONFLICT:{code:"EXISTING_CODE_CONFLICT",title:e.existingCodeConflictErrorTitle,description:e.existingCodeConflictErrorDescription},INVALID_CHARACTER:{code:"INVALID_CHARACTER",title:e.invalidCharactersErrorTitle,description:e.invalidCharactersErrorDescription},BLOCKED_WORD:{code:"BLOCKED_WORD",title:e.profanityErrorTitle,description:e.profanityErrorDescription}}[a]:null}return console.log(N,"validation error state"),{copyTextViewProps:{...e,onClick:async function(){y&&(await S({referralCode:y.referralCode}),y.refresh()),navigator.clipboard.writeText(D),F(!0),setTimeout((()=>F(!1)),e.tooltiplifespan),R({eventMeta:{programId:u,id:null==v?void 0:v.id,accountId:null==v?void 0:v.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:b,shareMedium:"DIRECT"}}})},open:B,copyString:D},allowCustomization:e.allowCustomization,customizeLinkLabel:e.customizeLinkLabel,saveLabelText:e.saveLabelText,cancelLabelText:e.cancelLabelText,isEditing:_,editValue:U,domainPrefix:H,editsRemaining:K,maxEdits:5,limitReached:Y,validationError:N,isValidating:O,isSaving:E,characterLimit:15,minCharacters:3,charactersRemaining:15-U.length,editLimitText:e.editLimitText,editLimitReachedText:e.editLimitReachedText,supportLinkText:e.supportLinkText,customizeDisabled:X,customizeDisabledTooltip:e.customizeDisabledTooltip,onCustomizeClick:function(){Y||X||(P(!0),W(0===Q?"":z),Z(null))},onEditValueChange:function(e){const a=e.slice(0,15);W(a),Z(null),G.current&&clearTimeout(G.current),!a||a.length<3?j(!1):(j(!0),G.current=setTimeout((async()=>{var e,t;try{const l=await T({linkCode:a});if(!(null===(e=null==l?void 0:l.validateLinkCode)||void 0===e?void 0:e.valid)){const e=null===(t=null==l?void 0:l.validateLinkCode)||void 0===t?void 0:t.invalidReason;console.log(e,"validation error reason from validateLinkCode query"),Z(J(e))}}catch{}j(!1)}),2e3))},onSave:async function(){var e,a;if(!(!U||U.length<3||N||O))try{await I({addShareLinkCodeInput:{userId:null==v?void 0:v.id,accountId:null==v?void 0:v.accountId,programId:u,linkCode:U,makeShareLinkCodePrimaryForReferralCode:!0}}),P(!1),await Promise.all([q(),A()]),L()}catch(t){const l=null===(e=null==t?void 0:t.extensions)||void 0===e?void 0:e.code;console.log(l,"errorCode from addSharelInkCodeMutation"),Z(null!==(a=J(l))&&void 0!==a?a:{code:null,title:"Error",description:(null==t?void 0:t.message)||"Failed to save custom link. Please try again."})}},onCancel:function(){P(!1),W(""),Z(null),j(!1)}}}const Ua={Wrapper:{...E,"max-width":"600px",border:"none",margin:"0"},Column:T,HostBlock:I,":host":{margin:"0 auto",width:"100%"},NameFieldWrapper:{display:"flex",gap:"var(--sl-spacing-medium)",marginBottom:"0 !important"},ContinueButton:{maxWidth:"169px"},ButtonsContainer:L,SuccessAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-green-100)",borderTop:"none"}},ErrorAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-red-100)",borderTop:"none"}},NameInput:{marginBottom:"0",width:"50%"},ErrorStyle:M},Wa="\nsqm-portal-register {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\n\n:host{\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n",Na=q(Ua),Za=Na.toString();function Oa(a){var t,r,o,s;const{states:n,refs:d,callbacks:c,content:u}=a;return n.error&&window.scrollTo({top:0,left:0,behavior:"smooth"}),e(l,null,n.success&&e("div",{class:Na.classes.Wrapper,part:"sqm-base"},e("style",{type:"text/css"},Wa,Za),e(A,{type:"h3"},u.pageLabel),e("sqm-form-message",{loading:n.loading,exportparts:"success-icon"},e("b",null,u.submitSuccessHeader),e("br",null),e("div",{part:"successalert-text"},u.submitSuccessDescription)),e("sl-button",{class:Na.classes.ContinueButton,onClick:c.resetForm,loading:n.loading,exportparts:"base: primarybutton-base",type:"default"},u.resubmitFormLabel)),e("div",{class:Na.classes.Wrapper,part:"sqm-base",style:{display:n.success?"none":"block"}},e("style",{type:"text/css"},Wa,Za),e(A,{type:"h3"},u.pageLabel),e("sl-form",{class:Na.classes.Column,"onSl-submit":c.submit,ref:e=>d.formRef.current=e,novalidate:!0},n.error&&e("sqm-form-message",{type:"error"},e("p",{part:"alert-title"},u.submitErrorHeader),e("p",{part:"alert-description"},i.formatMessage({id:"submitErrorDescription",defaultMessage:u.submitErrorDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},u.supportLinkText)}))),e("div",{class:Na.classes.NameFieldWrapper},e("sqm-lead-input-field",{class:Na.classes.NameInput,"field-label":u.firstNameLabel||"First Name","field-name":"firstName"}),e("sqm-lead-input-field",{class:Na.classes.NameInput,"field-label":u.lastNameLabel||"Last Name","field-name":"lastName"})),e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"email",name:"/email",label:u.emailLabel||"Email",disabled:n.loading,required:!0,validationError:({value:e})=>e?e.includes("@")?void 0:u.invalidEmailErrorMessage:(({fieldLabel:e})=>i.formatMessage({id:"requiredFieldErrorMessage",defaultMessage:u.requiredFieldErrorMessage},{fieldLabel:e}))({fieldLabel:u.emailLabel||"Email"})},(null===(r=null===(t=n.leadFormState)||void 0===t?void 0:t.validationErrors)||void 0===r?void 0:r.email)?{class:Na.classes.ErrorStyle,helpText:(null===(s=null===(o=n.leadFormState)||void 0===o?void 0:o.validationErrors)||void 0===s?void 0:s.email)||u.requiredFieldErrorMessage}:[])),e("input",{type:"hidden",hidden:!0,name:"/referralCode",value:n.referralCode}),u.formData,e("div",{class:Na.classes.ButtonsContainer},e("sl-button",{submit:!0,loading:n.loading,exportparts:"base: primarybutton-base",type:"primary"},u.submitLabel||"Register")))))}R.setup(S());const ja=R.createStyleSheet({ErrorStyle:{"--sl-input-border-color":"var(--sl-color-danger-500)","--sl-input-background-color":"var(--sl-color-danger-10)","--sl-input-border-color-focus":"var(--sl-color-danger-500)","--sl-input-border-color-hover":"var(--sl-color-danger-500)"},ErrorMessageStyle:{margin:0,color:"var(--sl-color-danger-500)",fontSize:"var(--sl-input-help-text-font-size-medium)"},FieldContainer:{"margin-bottom":"var(--sl-spacing-large)"}}),Ga=ja.toString();function Xa(a){var t,l,r,o,s;const{states:n,content:d}=a,c=null===(t=null==n?void 0:n.leadFormState)||void 0===t?void 0:t.validationErrors,u=({dropdownLabel:e})=>i.formatMessage({id:`requiredFieldErrorMessage-${e}`,defaultMessage:d.requiredFieldErrorMessage},{dropdownLabel:e});return e("div",{class:ja.classes.FieldContainer,part:"sqm-base"},e("style",{type:"text/css"},"\n:host {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\nsl-select::part(label){\n font-size: var(--sl-input-label-font-size-small);\n font-weight: var(--sl-font-weight-semibold);\n}\nsl-select::part(menu){\n max-height: 300px;\n}\n",Ga),e("sl-select",Object.assign({style:{maxHeight:"100px"},exportparts:"label: input-label, base: input-base",label:`${d.dropdownLabel}${d.dropdownOptional?` ${d.optionalLabel}`:""}`,name:`/${d.dropdownName}`,multiple:d.multiple},d.dropdownOptional?[]:{required:!0},{disabled:(null===(l=n.leadFormState)||void 0===l?void 0:l.loading)||(null===(r=n.leadFormState)||void 0===r?void 0:r.disabled),validationError:({value:e})=>{if(!e&&!d.dropdownOptional)return u({dropdownLabel:d.dropdownLabel})}},(null===(s=null===(o=n.leadFormState)||void 0===o?void 0:o.validationErrors)||void 0===s?void 0:s[d.dropdownName])?{class:ja.classes.ErrorStyle}:[]),d.selectOptions),(null==c?void 0:c[d.dropdownName])&&e("p",{class:ja.classes.ErrorMessageStyle},u({dropdownLabel:d.dropdownLabel})))}const Qa=new Map;function Ka(e){const a=r(e);let t=e.render.bind(e);e.render=()=>{const e=a.getAttribute("stencilbook-shadow-view");if(e){const a=Qa.get(e);if(a)return a}return t()}}const Ya=({story:a},t)=>{var l;let r=null===(l=a.parent.parameters)||void 0===l?void 0:l.tagname;if(!r)return t;const i=Math.round(1e5*Math.random());return Qa.set(i+"",t),e("stencilbook-shawdow-view-"+i,null,e(r,{"stencilbook-shadow-view":i}))};export{Ta as A,W as B,de as C,ke as D,$e as E,ua as F,Ma as G,Le as H,De as I,Aa as J,Pa as K,Ie as L,he as M,Be as N,Xe as O,X as P,Oa as Q,Ue as R,G as S,xe as T,Xa as U,Ya as V,se as W,Ka as X,pa as Y,j as a,Q as b,ee as c,we as d,qe as e,Fe as f,_e as g,Pe as h,Je as i,va as j,ga as k,ya as l,wa as m,ha as n,ba as o,xa as p,Ca as q,ma as r,qa as s,Ra as t,ne as u,Sa as v,ka as w,$a as x,Ia as y,Ea as z}
499
+ `;function Pa(e){var a,t,l,r,i,o,s;const{programId:u=c()}=e,v=p(),b=g(),y=f(k),{data:w,refetch:q}=m(Da,{programId:u},!(null==v?void 0:v.jwt)||!!e.linkOverride||void 0!==(null==y?void 0:y.shareLink)),[R]=h(Ha),[S]=h($),[I,{loading:E}]=h(za),[T]=x(Ba),{refresh:L}=C(),{data:M}=m(Fa,{},!(null==v?void 0:v.jwt)||!e.allowCustomization),{data:V,refetch:A}=m(_a,{},!(null==v?void 0:v.jwt)||!e.allowCustomization),{url:D,domain:H,path:z}=function(e){try{const a=new URL(e);return{url:a.origin+a.pathname,domain:a.origin+"/",path:a.pathname.slice(1)}}catch{return{url:e,domain:e,path:""}}}(null!==(t=(null==y?void 0:y.shareLink)||(null===(a=null==w?void 0:w.user)||void 0===a?void 0:a.shareLink))&&void 0!==t?t:"..."),[B,F]=n(!1),[_,P]=n(!1),[U,W]=n(""),[N,Z]=n(null),[O,j]=n(!1),G=d(void 0),X=!(null!=(null===(l=null==M?void 0:M.tenantSettings)||void 0===l?void 0:l.primaryLinkDomain)),Q=null!==(s=null===(o=null===(i=null===(r=null==V?void 0:V.viewer)||void 0===r?void 0:r.shareLinkCodes)||void 0===i?void 0:i.data)||void 0===o?void 0:o.filter((e=>e.isVanity)).length)&&void 0!==s?s:0,K=Math.max(0,5-Q),Y=K<=0;function J(a){return a?{EXISTING_CODE_CONFLICT:{code:"EXISTING_CODE_CONFLICT",title:e.linkTakenErrorTitle,description:e.linkTakenErrorDescription},INVALID_CHARACTER:{code:"INVALID_CHARACTER",title:e.invalidCharactersErrorTitle,description:e.invalidCharactersErrorDescription},BLOCKED_WORD:{code:"BLOCKED_WORD",title:e.restrictedWordsErrorTitle,description:e.restrictedWordsErrorDescription}}[a]:null}return console.log(N,"validation error state"),{copyTextViewProps:{...e,onClick:async function(){y&&(await S({referralCode:y.referralCode}),y.refresh()),navigator.clipboard.writeText(D),F(!0),setTimeout((()=>F(!1)),e.tooltiplifespan),R({eventMeta:{programId:u,id:null==v?void 0:v.id,accountId:null==v?void 0:v.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:b,shareMedium:"DIRECT"}}})},open:B,copyString:D},allowCustomization:e.allowCustomization,customizeLinkLabel:e.customizeLinkButtonLabel,saveLabelText:e.saveLabelText,cancelLabelText:e.cancelLabelText,isEditing:_,editValue:U,domainPrefix:H,editsRemaining:K,maxEdits:5,limitReached:Y,validationError:N,isValidating:O,isSaving:E,characterLimit:15,minCharacters:3,charactersRemaining:15-U.length,editLimitText:e.editLimitText,editLimitReachedText:e.editLimitReachedText,supportLinkText:e.supportLinkText,customizeDisabled:X,customizeDisabledTooltip:e.customizeDisabledTooltip,onCustomizeClick:function(){Y||X||(P(!0),W(0===Q?"":z),Z(null))},onEditValueChange:function(e){const a=e.slice(0,15);W(a),Z(null),G.current&&clearTimeout(G.current),!a||a.length<3?j(!1):(j(!0),G.current=setTimeout((async()=>{var e,t;try{const l=await T({linkCode:a});if(!(null===(e=null==l?void 0:l.validateLinkCode)||void 0===e?void 0:e.valid)){const e=null===(t=null==l?void 0:l.validateLinkCode)||void 0===t?void 0:t.invalidReason;console.log(e,"validation error reason from validateLinkCode query"),Z(J(e))}}catch{}j(!1)}),2e3))},onSave:async function(){var e,a;if(!(!U||U.length<3||N||O))try{await I({addShareLinkCodeInput:{userId:null==v?void 0:v.id,accountId:null==v?void 0:v.accountId,programId:u,linkCode:U,makeShareLinkCodePrimaryForReferralCode:!0}}),P(!1),await Promise.all([q(),A()]),L()}catch(t){const l=null===(e=null==t?void 0:t.extensions)||void 0===e?void 0:e.code;console.log(l,"errorCode from addSharelInkCodeMutation"),Z(null!==(a=J(l))&&void 0!==a?a:{code:null,title:"Error",description:(null==t?void 0:t.message)||"Failed to save custom link. Please try again."})}},onCancel:function(){P(!1),W(""),Z(null),j(!1)}}}const Ua={Wrapper:{...E,"max-width":"600px",border:"none",margin:"0"},Column:T,HostBlock:I,":host":{margin:"0 auto",width:"100%"},NameFieldWrapper:{display:"flex",gap:"var(--sl-spacing-medium)",marginBottom:"0 !important"},ContinueButton:{maxWidth:"169px"},ButtonsContainer:L,SuccessAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-green-100)",borderTop:"none"}},ErrorAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-red-100)",borderTop:"none"}},NameInput:{marginBottom:"0",width:"50%"},ErrorStyle:M},Wa="\nsqm-portal-register {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\n\n:host{\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n",Na=q(Ua),Za=Na.toString();function Oa(a){var t,r,o,s;const{states:n,refs:d,callbacks:c,content:u}=a;return n.error&&window.scrollTo({top:0,left:0,behavior:"smooth"}),e(l,null,n.success&&e("div",{class:Na.classes.Wrapper,part:"sqm-base"},e("style",{type:"text/css"},Wa,Za),e(A,{type:"h3"},u.pageLabel),e("sqm-form-message",{loading:n.loading,exportparts:"success-icon"},e("b",null,u.submitSuccessHeader),e("br",null),e("div",{part:"successalert-text"},u.submitSuccessDescription)),e("sl-button",{class:Na.classes.ContinueButton,onClick:c.resetForm,loading:n.loading,exportparts:"base: primarybutton-base",type:"default"},u.resubmitFormLabel)),e("div",{class:Na.classes.Wrapper,part:"sqm-base",style:{display:n.success?"none":"block"}},e("style",{type:"text/css"},Wa,Za),e(A,{type:"h3"},u.pageLabel),e("sl-form",{class:Na.classes.Column,"onSl-submit":c.submit,ref:e=>d.formRef.current=e,novalidate:!0},n.error&&e("sqm-form-message",{type:"error"},e("p",{part:"alert-title"},u.submitErrorHeader),e("p",{part:"alert-description"},i.formatMessage({id:"submitErrorDescription",defaultMessage:u.submitErrorDescription},{supportLink:e("a",{target:"_blank",href:"mailto:advocate-support@impact.com"},u.supportLinkText)}))),e("div",{class:Na.classes.NameFieldWrapper},e("sqm-lead-input-field",{class:Na.classes.NameInput,"field-label":u.firstNameLabel||"First Name","field-name":"firstName"}),e("sqm-lead-input-field",{class:Na.classes.NameInput,"field-label":u.lastNameLabel||"Last Name","field-name":"lastName"})),e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"email",name:"/email",label:u.emailLabel||"Email",disabled:n.loading,required:!0,validationError:({value:e})=>e?e.includes("@")?void 0:u.invalidEmailErrorMessage:(({fieldLabel:e})=>i.formatMessage({id:"requiredFieldErrorMessage",defaultMessage:u.requiredFieldErrorMessage},{fieldLabel:e}))({fieldLabel:u.emailLabel||"Email"})},(null===(r=null===(t=n.leadFormState)||void 0===t?void 0:t.validationErrors)||void 0===r?void 0:r.email)?{class:Na.classes.ErrorStyle,helpText:(null===(s=null===(o=n.leadFormState)||void 0===o?void 0:o.validationErrors)||void 0===s?void 0:s.email)||u.requiredFieldErrorMessage}:[])),e("input",{type:"hidden",hidden:!0,name:"/referralCode",value:n.referralCode}),u.formData,e("div",{class:Na.classes.ButtonsContainer},e("sl-button",{submit:!0,loading:n.loading,exportparts:"base: primarybutton-base",type:"primary"},u.submitLabel||"Register")))))}R.setup(S());const ja=R.createStyleSheet({ErrorStyle:{"--sl-input-border-color":"var(--sl-color-danger-500)","--sl-input-background-color":"var(--sl-color-danger-10)","--sl-input-border-color-focus":"var(--sl-color-danger-500)","--sl-input-border-color-hover":"var(--sl-color-danger-500)"},ErrorMessageStyle:{margin:0,color:"var(--sl-color-danger-500)",fontSize:"var(--sl-input-help-text-font-size-medium)"},FieldContainer:{"margin-bottom":"var(--sl-spacing-large)"}}),Ga=ja.toString();function Xa(a){var t,l,r,o,s;const{states:n,content:d}=a,c=null===(t=null==n?void 0:n.leadFormState)||void 0===t?void 0:t.validationErrors,u=({dropdownLabel:e})=>i.formatMessage({id:`requiredFieldErrorMessage-${e}`,defaultMessage:d.requiredFieldErrorMessage},{dropdownLabel:e});return e("div",{class:ja.classes.FieldContainer,part:"sqm-base"},e("style",{type:"text/css"},"\n:host {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\nsl-select::part(label){\n font-size: var(--sl-input-label-font-size-small);\n font-weight: var(--sl-font-weight-semibold);\n}\nsl-select::part(menu){\n max-height: 300px;\n}\n",Ga),e("sl-select",Object.assign({style:{maxHeight:"100px"},exportparts:"label: input-label, base: input-base",label:`${d.dropdownLabel}${d.dropdownOptional?` ${d.optionalLabel}`:""}`,name:`/${d.dropdownName}`,multiple:d.multiple},d.dropdownOptional?[]:{required:!0},{disabled:(null===(l=n.leadFormState)||void 0===l?void 0:l.loading)||(null===(r=n.leadFormState)||void 0===r?void 0:r.disabled),validationError:({value:e})=>{if(!e&&!d.dropdownOptional)return u({dropdownLabel:d.dropdownLabel})}},(null===(s=null===(o=n.leadFormState)||void 0===o?void 0:o.validationErrors)||void 0===s?void 0:s[d.dropdownName])?{class:ja.classes.ErrorStyle}:[]),d.selectOptions),(null==c?void 0:c[d.dropdownName])&&e("p",{class:ja.classes.ErrorMessageStyle},u({dropdownLabel:d.dropdownLabel})))}const Qa=new Map;function Ka(e){const a=r(e);let t=e.render.bind(e);e.render=()=>{const e=a.getAttribute("stencilbook-shadow-view");if(e){const a=Qa.get(e);if(a)return a}return t()}}const Ya=({story:a},t)=>{var l;let r=null===(l=a.parent.parameters)||void 0===l?void 0:l.tagname;if(!r)return t;const i=Math.round(1e5*Math.random());return Qa.set(i+"",t),e("stencilbook-shawdow-view-"+i,null,e(r,{"stencilbook-shadow-view":i}))};export{Ta as A,W as B,de as C,ke as D,$e as E,ua as F,Ma as G,Le as H,De as I,Aa as J,Pa as K,Ie as L,he as M,Be as N,Xe as O,X as P,Oa as Q,Ue as R,G as S,xe as T,Xa as U,Ya as V,se as W,Ka as X,pa as Y,j as a,Q as b,ee as c,we as d,qe as e,Fe as f,_e as g,Pe as h,Je as i,va as j,ga as k,ya as l,wa as m,ha as n,ba as o,xa as p,Ca as q,ma as r,qa as s,Ra as t,ne as u,Sa as v,ka as w,$a as x,Ia as y,Ea as z}
@@ -1,4 +1,4 @@
1
- import{r as e,h as t,c as r}from"./p-083180bf.js";import{b as o,i as a}from"./p-e7a9ce16.js";import{n as i,f as n,i as s,k as l,m as d,u as c,b as u,j as h}from"./p-a7fc1e02.js";import{i as m,_ as p,d as f,J as g,H as v,B as b,$ as y,w as x,b as w,L as k,y as C,j as E,r as _,e as F,Q as I,k as S,M as T,I as R,S as A}from"./p-1d450b85.js";import{j as q}from"./p-e7e129ac.js";import{c as N}from"./p-c1086930.js";import{g as M,a as D}from"./p-9ec99ced.js";import{c as L}from"./p-cef45012.js";import"./p-21851092.js";import"./p-49b20dae.js";import{C as P}from"./p-d276468c.js";import"./p-cabf6326.js";import{A as B,u as O}from"./p-33a6ab09.js";import{R as j,a as z}from"./p-e5e8e13e.js";import{P as V}from"./p-669d52c4.js";import{a as $}from"./p-30967f75.js";import{u as U}from"./p-a03189bd.js";import"./p-2786819c.js";import{p as H}from"./p-8d363802.js";import{o as Y}from"./p-f75de169.js";import{E as W}from"./p-7010498f.js";import{u as G}from"./p-bd804f4c.js";import{R as K,L as J,u as Z}from"./p-6684e9ad.js";import{i as X}from"./p-fca34d77.js";import{E as Q}from"./p-044a76f1.js";import{u as ee,W as te,B as re,C as oe,d as ae,e as ie,D as ne,E as se,H as le,I as de,U as ce,Q as ue,X as he,L as me,N as pe,f as fe,P as ge,g as ve,h as be,c as ye,R as xe,i as we,Y as ke,G as Ce,a as Ee,K as _e,J as Fe,S as Ie,T as Se}from"./p-cd79864c.js";import"./p-b6a1e2ac.js";import{T as Te,a as Re,U as Ae,C as qe,b as Ne,S as Me,g as De,c as Le,G as Pe,d as Be,e as Oe,h as je,i as ze,j as Ve,k as $e,L as Ue}from"./p-9fa6606e.js";import{p as He,e as Ye}from"./p-0797a946.js";import{u as We}from"./p-df9cfdc9.js";const Ge={main:{brandFont:"Netflix Sans, Arial, sans-serif",brandColor:"#E50914"},border:{borderColor:"#333333",borderRadius:4,borderThickness:1},color:{loadingSkeleton:{background:"#272727",animationBackground:"#E50914"},textColorShades:{mainText:"white",subduedText:"#B3B3B3"},backgroundColor:"#101010",accentColorShades:{text:"#E50914",icon:"#E50914",border:"#E50914",background:"#300609"},success:{text:"#66BB6A",border:"#4CAF50",background:"#1B5E20",iconAndBadge:"#4CAF50"},warning:{text:"#FFCA28",border:"#FFA726",background:"#F57C00",iconAndBadge:"#FFA726"},critical:{text:"#EF9A9A",border:"#E50914",background:"#B71C1C",iconAndBadge:"#E50914"},informative:{text:"#64B5F6",border:"#42A5F5",background:"#1976D2",iconAndBadge:"#42A5F5"},neutral:{text:"white",iconAndBadge:"#B3B3B3",border:"#333333",background:"#222222"}},primaryButton:{buttonColor:{background:"#E50914",border:"transparent",label:"#FFFFFF"},buttonHoverColor:{background:"#CC0000",border:"transparent",label:"#FFFFFF"},borderRadius:4},secondaryButton:{buttonColor:{background:"transparent",border:"#B3B3B3",label:"#FFFFFF"},buttonHoverColor:{background:"#333333",border:"#B3B3B3",label:"#FFFFFF"},borderRadius:4},formFields:{formFieldColor:{background:"#222222",border:"#B3B3B3",inputText:"#B3B3B3"},hoverStateColor:"#777777",selectedStateColor:"#E50914",borderRadius:4}},Ke=Object.freeze({__proto__:null,Default:null,Netflix:Ge,Amazon:{main:{brandFont:"Amazon Ember, Arial, sans-serif",brandColor:"#FF9900"},border:{borderColor:"#D5D9D9",borderRadius:4,borderThickness:1},color:{backgroundColor:"#ffffff",loadingSkeleton:{background:"hsl(240 4.8% 95.9%)",animationBackground:"#FF9900"},textColorShades:{mainText:"#2f2f2f",subduedText:"#565959"},accentColorShades:{text:"#FF9900",icon:"#FF9900",border:"#FFBF66",background:"#FFF4DD"},success:{text:"#198754",border:"#BCE8B2",background:"#D4EDDA",iconAndBadge:"#28A745"},warning:{text:"#856404",border:"#FFEBA2",background:"#FFF3CD",iconAndBadge:"#FFC107"},critical:{text:"#721C24",border:"#F5C6CB",background:"#F8D7DA",iconAndBadge:"#DC3545"},informative:{text:"#004085",border:"#B8DAFF",background:"#CCE5FF",iconAndBadge:"#007BFF"},neutral:{text:"#232F3E",iconAndBadge:"#565959",border:"#D5D9D9",background:"#F0F2F2"}},primaryButton:{buttonColor:{background:"#FF9900",border:"transparent",label:"#FFFFFF"},buttonHoverColor:{background:"#EB9100",border:"transparent",label:"#FFFFFF"},borderRadius:4},secondaryButton:{buttonColor:{background:"#FFFFFF",border:"#888C8C",label:"#232F3E"},buttonHoverColor:{background:"#F0F2F2",border:"#888C8C",label:"#232F3E"},borderRadius:4},formFields:{formFieldColor:{background:"#FFFFFF",border:"#D5D9D9",inputText:"#2f2f2f"},borderRadius:4,hoverStateColor:"#A2A2A2",selectedStateColor:"#007185"}},Spotify:{main:{brandColor:"#1ed760"},border:{borderColor:"#f4f4f4",borderRadius:18,borderThickness:1},color:{loadingSkeleton:{background:"#282928",animationBackground:"#1ed760"},textColorShades:{mainText:"white",subduedText:"white"},backgroundColor:"#121212",accentColorShades:{icon:"#1ed760"}},primaryButton:{buttonColor:{background:"#1ed760",border:"transparent",label:"#121212"},buttonHoverColor:{background:"#1DB954",border:"transparent",label:"#121212"},borderRadius:30},secondaryButton:{buttonColor:{background:"#191414",border:"#FFFFFF",label:"#FFFFFF"},buttonHoverColor:{background:"#282828",border:"#FFFFFF",label:"#121212"},borderRadius:30},formFields:{formFieldColor:{background:"#121212",border:"#7c7c7c",inputText:"#fff"},borderRadius:30,hoverStateColor:"white",selectedStateColor:"white"}},Google:{main:{brandColor:"#4285F4",brandFont:"Roboto, Arial, sans-serif"},border:{borderColor:"#DADCE0",borderRadius:4,borderThickness:1},color:{textColorShades:{mainText:"#212124",subduedText:"#5F6368"},backgroundColor:"#FFFFFF",accentColorShades:{text:"#1A73E8",border:"#8AB4F8",background:"#E8F0FE",icon:"#4285F4"},success:{text:"#044e1d",border:"#A8DCD7",background:"#E6F4EA",iconAndBadge:"#34A853"},warning:{text:"#996a3d",border:"#FCD667",background:"#FFF7EE",iconAndBadge:"#FBBC04"},critical:{text:"#760b09",border:"#F28B82",background:"#FCE8E6",iconAndBadge:"#EA4335"},informative:{text:"#01368c",border:"#BFDBFE",background:"#E8F0FE",iconAndBadge:"#4285F4"},neutral:{text:"#202124",border:"#DADCE0",background:"#F8F9FA",iconAndBadge:"#5F6368"}},primaryButton:{buttonColor:{background:"#4285F4",border:"transparent",label:"#FFFFFF"},buttonHoverColor:{background:"#3C7CD1",border:"transparent",label:"#FFFFFF"},borderRadius:4},secondaryButton:{buttonColor:{background:"#FFFFFF",border:"#DADCE0",label:"#4285F4"},buttonHoverColor:{background:"#E8F0FE",border:"#DADCE0",label:"#4285F4"},borderRadius:4},formFields:{formFieldColor:{background:"#FFFFFF",border:"#DADCE0",inputText:"#202124"},borderRadius:4,hoverStateColor:"#9AA0A6",selectedStateColor:"#4285F4"}}}),Je=class{constructor(t){e(this,t),this.flexReverse=!1,this.alignment="center",this.ignored=!0,i(this)}disconnectedCallback(){}render(){var e;const{props:r,label:o}=m()?ee(this):te(this),a=!!(null===(e=p().innerHTML)||void 0===e?void 0:e.trim()),i=t("slot",{name:"label"},a?t("slot",null):o);return t(re,Object.assign({},r,{labelSlot:i}))}};function Ze(e,t,r){return Math.min(Math.max(e,r),t)}class Xe extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}}function Qe(e){if("string"!=typeof e)throw new Xe(e);if("transparent"===e.trim().toLowerCase())return[0,0,0,0];let t=e.trim();t=st.test(e)?function(e){const t=e.toLowerCase().trim(),r=tt[function(e){let t=5381,r=e.length;for(;r;)t=33*t^e.charCodeAt(--r);return(t>>>0)%2341}(t)];if(!r)throw new Xe(e);return`#${r}`}(e):e;const r=ot.exec(t);if(r){const e=Array.from(r).slice(1);return[...e.slice(0,3).map((e=>parseInt(rt(e,2),16))),parseInt(rt(e[3]||"f",2),16)/255]}const o=at.exec(t);if(o){const e=Array.from(o).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,16))),parseInt(e[3]||"ff",16)/255]}const a=it.exec(t);if(a){const e=Array.from(a).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,10))),parseFloat(e[3]||"1")]}const i=nt.exec(t);if(i){const[t,r,o,a]=Array.from(i).slice(1).map(parseFloat);if(Ze(0,100,r)!==r)throw new Xe(e);if(Ze(0,100,o)!==o)throw new Xe(e);return[...dt(t,r,o),a||1]}throw new Xe(e)}const et=e=>parseInt(e.replace(/_/g,""),36),tt="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((e,t)=>{const r=et(t.substring(0,3)),o=et(t.substring(3)).toString(16);let a="";for(let e=0;e<6-o.length;e++)a+="0";return e[r]=`${a}${o}`,e}),{}),rt=(e,t)=>Array.from(Array(t)).map((()=>e)).join(""),ot=new RegExp(`^#${rt("([a-f0-9])",3)}([a-f0-9])?$`,"i"),at=new RegExp(`^#${rt("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),it=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${rt(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),nt=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,st=/^[a-z]+$/i,lt=e=>Math.round(255*e),dt=(e,t,r)=>{let o=r/100;if(0===t)return[o,o,o].map(lt);const a=(e%360+360)%360/60,i=(1-Math.abs(2*o-1))*(t/100),n=i*(1-Math.abs(a%2-1));let s=0,l=0,d=0;a>=0&&a<1?(s=i,l=n):a>=1&&a<2?(s=n,l=i):a>=2&&a<3?(l=i,d=n):a>=3&&a<4?(l=n,d=i):a>=4&&a<5?(s=n,d=i):a>=5&&a<6&&(s=i,d=n);const c=o-i/2;return[s+c,l+c,d+c].map(lt)},ct=[50,100,200,300,400,500,600,700,800,900,950],ut=[.95,.86,.76,.66,.56,.46,.39,.32,.25,.18,.15],ht=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;function mt(e,t="primary"){const[r,o,a,i]=function(e){const t=e.trim(),r=ht.exec(t);if(r){const[t,o,a,i]=Array.from(r).slice(1).map(parseFloat);if(Ze(0,100,o)!==o)throw new Xe(e);if(Ze(0,100,a)!==a)throw new Xe(e);return[t,o/100,a,i||1]}return function(e){const[t,r,o,a]=Qe(e).map(((e,t)=>3===t?e:e/255)),i=Math.max(t,r,o),n=Math.min(t,r,o),s=(i+n)/2;if(i===n)return[0,0,s,a];const l=i-n;return[60*(t===i?(r-o)/l+(r<o?6:0):r===i?(o-t)/l+2:(t-r)/l+4),s>.5?l/(2-i-n):l/(i+n),s,a]}(e)}(e);return ut.map((e=>function(e,t,r,o){return`hsla(${(e%360).toFixed()}, ${Ze(0,100,100*t).toFixed()}%, ${Ze(0,100,100*r).toFixed()}%, ${parseFloat(Ze(0,1,o).toFixed(3))})`}(r,o,e,i))).map(((e,r)=>`--sl-color-${t}-${ct[r]}: ${e};\n`))}const pt=class{constructor(t){e(this,t),i(this)}disconnectedCallback(){}render(){var e,a,i,s,l,d;const c=null===(a=null===(e=window.SquatchBrandingConfig)||void 0===e?void 0:e.main)||void 0===a?void 0:a.brandFont,u=(null===(s=null===(i=window.SquatchBrandingConfig)||void 0===i?void 0:i.main)||void 0===s?void 0:s.brandColor)?"":null!==(l=function(e){if(e)try{return function(e,t="primary"){return mt(e,t).join("\n")}(e)}catch{}}(this.brandColor))&&void 0!==l?l:"",h=(null!==(d=this.brandFont)&&void 0!==d?d:"Nunito Sans").trim()||void 0;n((()=>{if(!h||c)return;const e=document.createElement("link");return e.setAttribute("href",o(h)),e.setAttribute("rel","stylesheet"),document.head.appendChild(e),()=>document.head.removeChild(e)}),[h]);const m=null!=h?h:"";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\n ${c?"":`\n ::slotted(*) {\n --sl-font-sans: "${m}", arial;\n --sl-input-font-family: "${m}", arial;\n --sl-tooltip-font-family: "${m}", arial;\n font-family: "${m}", arial;\n\t\t\t\n ${u}\n `}\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))}},ft=class{constructor(t){e(this,t),this.selectedBrand="Netflix",this.brands=[{name:"Netflix",logoUrl:"https://res.cloudinary.com/saasquatch-staging/image/upload/v1750803365/netflix_ftjbrr.png"},{name:"Amazon",logoUrl:"https://res.cloudinary.com/saasquatch-staging/image/upload/v1750803366/amazon_mc22fr.png"},{name:"Spotify",logoUrl:"https://res.cloudinary.com/saasquatch-staging/image/upload/v1750803510/spotify_j5qi1r.png"},{name:"Google",logoUrl:"https://res.cloudinary.com/saasquatch-staging/image/upload/v1750803168/pngimg.com_-_google_PNG19644_jvypwl.png"}];const r=localStorage.getItem("localStorageBrandKey");this.selectedBrand=r,window.SquatchBrandingConfig=Ke[r]||Ge;const o=new CustomEvent("brandingConfigUpdated",{detail:window.SquatchBrandingConfig});window.dispatchEvent(o)}componentDidLoad(){const e=localStorage.getItem("localStorageBrandKey");this.selectedBrand=e}disconnectedCallback(){}updateBrand(e){this.selectedBrand=e;const t=Ke[e]||Ge,r=JSON.stringify(t);localStorage.setItem("localStorageBrandKey",e),localStorage.setItem("localStorageBrandConfigKey",r),window.SquatchBrandingConfig=t,window.location.reload();const o=new CustomEvent("brandingConfigUpdated",{detail:window.SquatchBrandingConfig});window.dispatchEvent(o)}render(){return t(r,null,t("style",null,"\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');\n\n :host {\n display: block; /* Ensure the custom element itself is a block-level element */\n font-family: 'Inter', sans-serif;\n }\n\n .card-container {\n background-color: #fff !important; \n border-radius: 18px; \n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); \n width: 100%;\n max-width: 350px;\n overflow: hidden;\n padding: 10px;\n position: fixed;\n bottom: 0;\n right: 0;\n z-index: 999999;\n border: 1px solid #ccc;\n margin: 10px;\n }\n\n .card-heading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding-bottom: 10px;\n color: black;\n margin: 0;\n font-size: 16px;\n }\n\n .segmented-control-container {\n display: flex;\n background-color: #e5e7eb !important; \n border-radius: 9999px; \n padding: 0.25rem; \n margin-left: auto;\n margin-right: auto;\n max-width: 28rem;\n box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05); \n }\n\n .brand-segment {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n flex: 1;\n padding: 0px 8px; \n cursor: pointer;\n transition: all 300ms ease-in-out;\n border-radius: 9999px;\n color: #4b5563; \n cursor: pointer;\n }\n\n .brand-segment:hover {\n background-color: #f3f4f6 !important;\n }\n\n .brand-segment.active {\n background-color: #fff !important;\n color: #1f2937; \n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n }\n\n .brand-logo {\n height: 40px;\n width: 40px; \n object-fit: contain;\n }\n\n .brand-name {\n font-size: 0.75rem; \n line-height: 1rem; \n font-weight: 600; \n color: #4b5563;\n }\n\n .brand-segment.active .brand-name {\n color: #1f2937; \n }\n\n .content-area {\n padding: 2rem; \n }\n\n .selected-text {\n color: #4b5563; \n text-align: center;\n font-size: 1.125rem; \n line-height: 1.75rem; \n }\n\n .selected-brand-name {\n font-weight: 700; /* font-bold */\n color: #6d28d9; /* text-purple-700 */\n }\n\n .dynamic-content-box {\n margin-top: 1.5rem; /* mt-6 */\n padding: 1rem; /* p-4 */\n background-color: #f9fafb; /* bg-gray-50 */\n border-radius: 0.5rem; /* rounded-lg */\n color: #374151; /* text-gray-700 */\n font-size: 0.875rem; /* text-sm */\n line-height: 1.25rem; /* text-sm */\n font-style: italic;\n }\n\n /* Responsive adjustments for smaller screens if needed */\n @media (max-width: 640px) {\n .segmented-control-container {\n max-width: 100%; /* Allows it to take full width on small screens */\n padding: 0.15rem; /* Slightly less padding */\n }\n .brand-segment {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n }\n .brand-logo {\n height: 1.8rem; /* Slightly smaller on mobile */\n }\n }\n "),t("div",{class:"card-container"},t("h2",{class:"card-heading"},"Select Branding"),t("div",{class:"segmented-control-container"},this.brands.map((e=>t("div",{key:e.name,class:"brand-segment "+(this.selectedBrand===e.name?"active":""),onClick:()=>this.updateBrand(e.name)},t("img",{src:e.logoUrl,alt:`${e.name} Logo`,class:"brand-logo",onError:e=>{e.target.src="https://placehold.co/80x40/cccccc/000000?text=Logo"}})))))))}},gt=class{constructor(t){e(this,t),this.ignored=!0,this.width=347,this.gap=24,i(this)}disconnectedCallback(){}render(){return t(oe,Object.assign({},M(this)),t("slot",null))}};function vt(e){var t;const r=s(j),[o,a]=l(!1);return n((()=>{var t,o;(null===(t=null==r?void 0:r.initialData)||void 0===t?void 0:t[e.checkboxName])&&a(!!(null===(o=null==r?void 0:r.initialData)||void 0===o?void 0:o[e.checkboxName]))}),[null===(t=null==r?void 0:r.initialData)||void 0===t?void 0:t[e.checkboxName]]),{states:{registrationFormState:r,checked:o},callbacks:{setChecked:a}}}const bt=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,i(this)}disconnectedCallback(){}render(){const e=D([{attribute:"checkbox-name",value:this.checkboxName}]);if(!m()&&e)return t(K,{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={...M(this)},{states:o,callbacks:a}=m()?N({states:{registrationFormState:{},checked:!1},callbacks:{setChecked:()=>{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):vt(this);return t(ae,{states:o,content:r,callbacks:a})}},yt=f.gql`
1
+ import{r as e,h as t,c as r}from"./p-083180bf.js";import{b as o,i as a}from"./p-e7a9ce16.js";import{n as i,f as n,i as s,k as l,m as d,u as c,b as u,j as h}from"./p-a7fc1e02.js";import{i as m,_ as p,d as f,J as g,H as v,B as b,$ as y,w as x,b as w,L as k,y as C,j as E,r as _,e as F,Q as I,k as S,M as T,I as R,S as A}from"./p-1d450b85.js";import{j as q}from"./p-e7e129ac.js";import{c as N}from"./p-c1086930.js";import{g as M,a as D}from"./p-9ec99ced.js";import{c as L}from"./p-cef45012.js";import"./p-21851092.js";import"./p-49b20dae.js";import{C as P}from"./p-d276468c.js";import"./p-cabf6326.js";import{A as B,u as O}from"./p-33a6ab09.js";import{R as j,a as z}from"./p-e5e8e13e.js";import{P as V}from"./p-669d52c4.js";import{a as $}from"./p-30967f75.js";import{u as U}from"./p-a03189bd.js";import"./p-2786819c.js";import{p as H}from"./p-8d363802.js";import{o as Y}from"./p-f75de169.js";import{E as W}from"./p-7010498f.js";import{u as G}from"./p-bd804f4c.js";import{R as K,L as J,u as Z}from"./p-6684e9ad.js";import{i as X}from"./p-fca34d77.js";import{E as Q}from"./p-044a76f1.js";import{u as ee,W as te,B as re,C as oe,d as ae,e as ie,D as ne,E as se,H as le,I as de,U as ce,Q as ue,X as he,L as me,N as pe,f as fe,P as ge,g as ve,h as be,c as ye,R as xe,i as we,Y as ke,G as Ce,a as Ee,K as _e,J as Fe,S as Ie,T as Se}from"./p-72055e41.js";import"./p-b6a1e2ac.js";import{T as Te,a as Re,U as Ae,C as qe,b as Ne,S as Me,g as De,c as Le,G as Pe,d as Be,e as Oe,h as je,i as ze,j as Ve,k as $e,L as Ue}from"./p-9fa6606e.js";import{p as He,e as Ye}from"./p-0797a946.js";import{u as We}from"./p-df9cfdc9.js";const Ge={main:{brandFont:"Netflix Sans, Arial, sans-serif",brandColor:"#E50914"},border:{borderColor:"#333333",borderRadius:4,borderThickness:1},color:{loadingSkeleton:{background:"#272727",animationBackground:"#E50914"},textColorShades:{mainText:"white",subduedText:"#B3B3B3"},backgroundColor:"#101010",accentColorShades:{text:"#E50914",icon:"#E50914",border:"#E50914",background:"#300609"},success:{text:"#66BB6A",border:"#4CAF50",background:"#1B5E20",iconAndBadge:"#4CAF50"},warning:{text:"#FFCA28",border:"#FFA726",background:"#F57C00",iconAndBadge:"#FFA726"},critical:{text:"#EF9A9A",border:"#E50914",background:"#B71C1C",iconAndBadge:"#E50914"},informative:{text:"#64B5F6",border:"#42A5F5",background:"#1976D2",iconAndBadge:"#42A5F5"},neutral:{text:"white",iconAndBadge:"#B3B3B3",border:"#333333",background:"#222222"}},primaryButton:{buttonColor:{background:"#E50914",border:"transparent",label:"#FFFFFF"},buttonHoverColor:{background:"#CC0000",border:"transparent",label:"#FFFFFF"},borderRadius:4},secondaryButton:{buttonColor:{background:"transparent",border:"#B3B3B3",label:"#FFFFFF"},buttonHoverColor:{background:"#333333",border:"#B3B3B3",label:"#FFFFFF"},borderRadius:4},formFields:{formFieldColor:{background:"#222222",border:"#B3B3B3",inputText:"#B3B3B3"},hoverStateColor:"#777777",selectedStateColor:"#E50914",borderRadius:4}},Ke=Object.freeze({__proto__:null,Default:null,Netflix:Ge,Amazon:{main:{brandFont:"Amazon Ember, Arial, sans-serif",brandColor:"#FF9900"},border:{borderColor:"#D5D9D9",borderRadius:4,borderThickness:1},color:{backgroundColor:"#ffffff",loadingSkeleton:{background:"hsl(240 4.8% 95.9%)",animationBackground:"#FF9900"},textColorShades:{mainText:"#2f2f2f",subduedText:"#565959"},accentColorShades:{text:"#FF9900",icon:"#FF9900",border:"#FFBF66",background:"#FFF4DD"},success:{text:"#198754",border:"#BCE8B2",background:"#D4EDDA",iconAndBadge:"#28A745"},warning:{text:"#856404",border:"#FFEBA2",background:"#FFF3CD",iconAndBadge:"#FFC107"},critical:{text:"#721C24",border:"#F5C6CB",background:"#F8D7DA",iconAndBadge:"#DC3545"},informative:{text:"#004085",border:"#B8DAFF",background:"#CCE5FF",iconAndBadge:"#007BFF"},neutral:{text:"#232F3E",iconAndBadge:"#565959",border:"#D5D9D9",background:"#F0F2F2"}},primaryButton:{buttonColor:{background:"#FF9900",border:"transparent",label:"#FFFFFF"},buttonHoverColor:{background:"#EB9100",border:"transparent",label:"#FFFFFF"},borderRadius:4},secondaryButton:{buttonColor:{background:"#FFFFFF",border:"#888C8C",label:"#232F3E"},buttonHoverColor:{background:"#F0F2F2",border:"#888C8C",label:"#232F3E"},borderRadius:4},formFields:{formFieldColor:{background:"#FFFFFF",border:"#D5D9D9",inputText:"#2f2f2f"},borderRadius:4,hoverStateColor:"#A2A2A2",selectedStateColor:"#007185"}},Spotify:{main:{brandColor:"#1ed760"},border:{borderColor:"#f4f4f4",borderRadius:18,borderThickness:1},color:{loadingSkeleton:{background:"#282928",animationBackground:"#1ed760"},textColorShades:{mainText:"white",subduedText:"white"},backgroundColor:"#121212",accentColorShades:{icon:"#1ed760"}},primaryButton:{buttonColor:{background:"#1ed760",border:"transparent",label:"#121212"},buttonHoverColor:{background:"#1DB954",border:"transparent",label:"#121212"},borderRadius:30},secondaryButton:{buttonColor:{background:"#191414",border:"#FFFFFF",label:"#FFFFFF"},buttonHoverColor:{background:"#282828",border:"#FFFFFF",label:"#121212"},borderRadius:30},formFields:{formFieldColor:{background:"#121212",border:"#7c7c7c",inputText:"#fff"},borderRadius:30,hoverStateColor:"white",selectedStateColor:"white"}},Google:{main:{brandColor:"#4285F4",brandFont:"Roboto, Arial, sans-serif"},border:{borderColor:"#DADCE0",borderRadius:4,borderThickness:1},color:{textColorShades:{mainText:"#212124",subduedText:"#5F6368"},backgroundColor:"#FFFFFF",accentColorShades:{text:"#1A73E8",border:"#8AB4F8",background:"#E8F0FE",icon:"#4285F4"},success:{text:"#044e1d",border:"#A8DCD7",background:"#E6F4EA",iconAndBadge:"#34A853"},warning:{text:"#996a3d",border:"#FCD667",background:"#FFF7EE",iconAndBadge:"#FBBC04"},critical:{text:"#760b09",border:"#F28B82",background:"#FCE8E6",iconAndBadge:"#EA4335"},informative:{text:"#01368c",border:"#BFDBFE",background:"#E8F0FE",iconAndBadge:"#4285F4"},neutral:{text:"#202124",border:"#DADCE0",background:"#F8F9FA",iconAndBadge:"#5F6368"}},primaryButton:{buttonColor:{background:"#4285F4",border:"transparent",label:"#FFFFFF"},buttonHoverColor:{background:"#3C7CD1",border:"transparent",label:"#FFFFFF"},borderRadius:4},secondaryButton:{buttonColor:{background:"#FFFFFF",border:"#DADCE0",label:"#4285F4"},buttonHoverColor:{background:"#E8F0FE",border:"#DADCE0",label:"#4285F4"},borderRadius:4},formFields:{formFieldColor:{background:"#FFFFFF",border:"#DADCE0",inputText:"#202124"},borderRadius:4,hoverStateColor:"#9AA0A6",selectedStateColor:"#4285F4"}}}),Je=class{constructor(t){e(this,t),this.flexReverse=!1,this.alignment="center",this.ignored=!0,i(this)}disconnectedCallback(){}render(){var e;const{props:r,label:o}=m()?ee(this):te(this),a=!!(null===(e=p().innerHTML)||void 0===e?void 0:e.trim()),i=t("slot",{name:"label"},a?t("slot",null):o);return t(re,Object.assign({},r,{labelSlot:i}))}};function Ze(e,t,r){return Math.min(Math.max(e,r),t)}class Xe extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}}function Qe(e){if("string"!=typeof e)throw new Xe(e);if("transparent"===e.trim().toLowerCase())return[0,0,0,0];let t=e.trim();t=st.test(e)?function(e){const t=e.toLowerCase().trim(),r=tt[function(e){let t=5381,r=e.length;for(;r;)t=33*t^e.charCodeAt(--r);return(t>>>0)%2341}(t)];if(!r)throw new Xe(e);return`#${r}`}(e):e;const r=ot.exec(t);if(r){const e=Array.from(r).slice(1);return[...e.slice(0,3).map((e=>parseInt(rt(e,2),16))),parseInt(rt(e[3]||"f",2),16)/255]}const o=at.exec(t);if(o){const e=Array.from(o).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,16))),parseInt(e[3]||"ff",16)/255]}const a=it.exec(t);if(a){const e=Array.from(a).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,10))),parseFloat(e[3]||"1")]}const i=nt.exec(t);if(i){const[t,r,o,a]=Array.from(i).slice(1).map(parseFloat);if(Ze(0,100,r)!==r)throw new Xe(e);if(Ze(0,100,o)!==o)throw new Xe(e);return[...dt(t,r,o),a||1]}throw new Xe(e)}const et=e=>parseInt(e.replace(/_/g,""),36),tt="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((e,t)=>{const r=et(t.substring(0,3)),o=et(t.substring(3)).toString(16);let a="";for(let e=0;e<6-o.length;e++)a+="0";return e[r]=`${a}${o}`,e}),{}),rt=(e,t)=>Array.from(Array(t)).map((()=>e)).join(""),ot=new RegExp(`^#${rt("([a-f0-9])",3)}([a-f0-9])?$`,"i"),at=new RegExp(`^#${rt("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),it=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${rt(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),nt=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,st=/^[a-z]+$/i,lt=e=>Math.round(255*e),dt=(e,t,r)=>{let o=r/100;if(0===t)return[o,o,o].map(lt);const a=(e%360+360)%360/60,i=(1-Math.abs(2*o-1))*(t/100),n=i*(1-Math.abs(a%2-1));let s=0,l=0,d=0;a>=0&&a<1?(s=i,l=n):a>=1&&a<2?(s=n,l=i):a>=2&&a<3?(l=i,d=n):a>=3&&a<4?(l=n,d=i):a>=4&&a<5?(s=n,d=i):a>=5&&a<6&&(s=i,d=n);const c=o-i/2;return[s+c,l+c,d+c].map(lt)},ct=[50,100,200,300,400,500,600,700,800,900,950],ut=[.95,.86,.76,.66,.56,.46,.39,.32,.25,.18,.15],ht=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;function mt(e,t="primary"){const[r,o,a,i]=function(e){const t=e.trim(),r=ht.exec(t);if(r){const[t,o,a,i]=Array.from(r).slice(1).map(parseFloat);if(Ze(0,100,o)!==o)throw new Xe(e);if(Ze(0,100,a)!==a)throw new Xe(e);return[t,o/100,a,i||1]}return function(e){const[t,r,o,a]=Qe(e).map(((e,t)=>3===t?e:e/255)),i=Math.max(t,r,o),n=Math.min(t,r,o),s=(i+n)/2;if(i===n)return[0,0,s,a];const l=i-n;return[60*(t===i?(r-o)/l+(r<o?6:0):r===i?(o-t)/l+2:(t-r)/l+4),s>.5?l/(2-i-n):l/(i+n),s,a]}(e)}(e);return ut.map((e=>function(e,t,r,o){return`hsla(${(e%360).toFixed()}, ${Ze(0,100,100*t).toFixed()}%, ${Ze(0,100,100*r).toFixed()}%, ${parseFloat(Ze(0,1,o).toFixed(3))})`}(r,o,e,i))).map(((e,r)=>`--sl-color-${t}-${ct[r]}: ${e};\n`))}const pt=class{constructor(t){e(this,t),i(this)}disconnectedCallback(){}render(){var e,a,i,s,l,d;const c=null===(a=null===(e=window.SquatchBrandingConfig)||void 0===e?void 0:e.main)||void 0===a?void 0:a.brandFont,u=(null===(s=null===(i=window.SquatchBrandingConfig)||void 0===i?void 0:i.main)||void 0===s?void 0:s.brandColor)?"":null!==(l=function(e){if(e)try{return function(e,t="primary"){return mt(e,t).join("\n")}(e)}catch{}}(this.brandColor))&&void 0!==l?l:"",h=(null!==(d=this.brandFont)&&void 0!==d?d:"Nunito Sans").trim()||void 0;n((()=>{if(!h||c)return;const e=document.createElement("link");return e.setAttribute("href",o(h)),e.setAttribute("rel","stylesheet"),document.head.appendChild(e),()=>document.head.removeChild(e)}),[h]);const m=null!=h?h:"";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\n ${c?"":`\n ::slotted(*) {\n --sl-font-sans: "${m}", arial;\n --sl-input-font-family: "${m}", arial;\n --sl-tooltip-font-family: "${m}", arial;\n font-family: "${m}", arial;\n\t\t\t\n ${u}\n `}\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))}},ft=class{constructor(t){e(this,t),this.selectedBrand="Netflix",this.brands=[{name:"Netflix",logoUrl:"https://res.cloudinary.com/saasquatch-staging/image/upload/v1750803365/netflix_ftjbrr.png"},{name:"Amazon",logoUrl:"https://res.cloudinary.com/saasquatch-staging/image/upload/v1750803366/amazon_mc22fr.png"},{name:"Spotify",logoUrl:"https://res.cloudinary.com/saasquatch-staging/image/upload/v1750803510/spotify_j5qi1r.png"},{name:"Google",logoUrl:"https://res.cloudinary.com/saasquatch-staging/image/upload/v1750803168/pngimg.com_-_google_PNG19644_jvypwl.png"}];const r=localStorage.getItem("localStorageBrandKey");this.selectedBrand=r,window.SquatchBrandingConfig=Ke[r]||Ge;const o=new CustomEvent("brandingConfigUpdated",{detail:window.SquatchBrandingConfig});window.dispatchEvent(o)}componentDidLoad(){const e=localStorage.getItem("localStorageBrandKey");this.selectedBrand=e}disconnectedCallback(){}updateBrand(e){this.selectedBrand=e;const t=Ke[e]||Ge,r=JSON.stringify(t);localStorage.setItem("localStorageBrandKey",e),localStorage.setItem("localStorageBrandConfigKey",r),window.SquatchBrandingConfig=t,window.location.reload();const o=new CustomEvent("brandingConfigUpdated",{detail:window.SquatchBrandingConfig});window.dispatchEvent(o)}render(){return t(r,null,t("style",null,"\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');\n\n :host {\n display: block; /* Ensure the custom element itself is a block-level element */\n font-family: 'Inter', sans-serif;\n }\n\n .card-container {\n background-color: #fff !important; \n border-radius: 18px; \n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); \n width: 100%;\n max-width: 350px;\n overflow: hidden;\n padding: 10px;\n position: fixed;\n bottom: 0;\n right: 0;\n z-index: 999999;\n border: 1px solid #ccc;\n margin: 10px;\n }\n\n .card-heading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding-bottom: 10px;\n color: black;\n margin: 0;\n font-size: 16px;\n }\n\n .segmented-control-container {\n display: flex;\n background-color: #e5e7eb !important; \n border-radius: 9999px; \n padding: 0.25rem; \n margin-left: auto;\n margin-right: auto;\n max-width: 28rem;\n box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05); \n }\n\n .brand-segment {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n flex: 1;\n padding: 0px 8px; \n cursor: pointer;\n transition: all 300ms ease-in-out;\n border-radius: 9999px;\n color: #4b5563; \n cursor: pointer;\n }\n\n .brand-segment:hover {\n background-color: #f3f4f6 !important;\n }\n\n .brand-segment.active {\n background-color: #fff !important;\n color: #1f2937; \n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n }\n\n .brand-logo {\n height: 40px;\n width: 40px; \n object-fit: contain;\n }\n\n .brand-name {\n font-size: 0.75rem; \n line-height: 1rem; \n font-weight: 600; \n color: #4b5563;\n }\n\n .brand-segment.active .brand-name {\n color: #1f2937; \n }\n\n .content-area {\n padding: 2rem; \n }\n\n .selected-text {\n color: #4b5563; \n text-align: center;\n font-size: 1.125rem; \n line-height: 1.75rem; \n }\n\n .selected-brand-name {\n font-weight: 700; /* font-bold */\n color: #6d28d9; /* text-purple-700 */\n }\n\n .dynamic-content-box {\n margin-top: 1.5rem; /* mt-6 */\n padding: 1rem; /* p-4 */\n background-color: #f9fafb; /* bg-gray-50 */\n border-radius: 0.5rem; /* rounded-lg */\n color: #374151; /* text-gray-700 */\n font-size: 0.875rem; /* text-sm */\n line-height: 1.25rem; /* text-sm */\n font-style: italic;\n }\n\n /* Responsive adjustments for smaller screens if needed */\n @media (max-width: 640px) {\n .segmented-control-container {\n max-width: 100%; /* Allows it to take full width on small screens */\n padding: 0.15rem; /* Slightly less padding */\n }\n .brand-segment {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n }\n .brand-logo {\n height: 1.8rem; /* Slightly smaller on mobile */\n }\n }\n "),t("div",{class:"card-container"},t("h2",{class:"card-heading"},"Select Branding"),t("div",{class:"segmented-control-container"},this.brands.map((e=>t("div",{key:e.name,class:"brand-segment "+(this.selectedBrand===e.name?"active":""),onClick:()=>this.updateBrand(e.name)},t("img",{src:e.logoUrl,alt:`${e.name} Logo`,class:"brand-logo",onError:e=>{e.target.src="https://placehold.co/80x40/cccccc/000000?text=Logo"}})))))))}},gt=class{constructor(t){e(this,t),this.ignored=!0,this.width=347,this.gap=24,i(this)}disconnectedCallback(){}render(){return t(oe,Object.assign({},M(this)),t("slot",null))}};function vt(e){var t;const r=s(j),[o,a]=l(!1);return n((()=>{var t,o;(null===(t=null==r?void 0:r.initialData)||void 0===t?void 0:t[e.checkboxName])&&a(!!(null===(o=null==r?void 0:r.initialData)||void 0===o?void 0:o[e.checkboxName]))}),[null===(t=null==r?void 0:r.initialData)||void 0===t?void 0:t[e.checkboxName]]),{states:{registrationFormState:r,checked:o},callbacks:{setChecked:a}}}const bt=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,i(this)}disconnectedCallback(){}render(){const e=D([{attribute:"checkbox-name",value:this.checkboxName}]);if(!m()&&e)return t(K,{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={...M(this)},{states:o,callbacks:a}=m()?N({states:{registrationFormState:{},checked:!1},callbacks:{setChecked:()=>{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):vt(this);return t(ae,{states:o,content:r,callbacks:a})}},yt=f.gql`
2
2
  query fuelTankRewardsQuery($programId: ID!) {
3
3
  user: viewer {
4
4
  ... on User {
@@ -255,7 +255,7 @@ import{r as e,h as t,c as r}from"./p-083180bf.js";import{b as o,i as a}from"./p-
255
255
  mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
256
256
  createUserAnalyticsEvent(eventMeta: $eventMeta)
257
257
  }
258
- `,Vr=class{constructor(t){e(this,t),this.tooltiptext="Copied to Clipboard",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Code",this.buttonStyle="icon",this.buttonType="primary",i(this)}disconnectedCallback(){}render(){const e=M(this),r=m()?function(e){const[t,r]=l(!1),o="SHARECODE001";return N({copyString:o,tooltiptext:e.tooltiptext,textAlign:e.textAlign,copyButtonLabel:e.copyButtonLabel,buttonStyle:e.buttonStyle,backgroundColor:e.backgroundColor,textColor:e.textColor,borderRadius:e.borderRadius,borderColor:e.borderColor,buttonType:e.buttonType,open:t,onClick:()=>{navigator.clipboard.writeText(o),r(!0),setTimeout((()=>r(!1)),e.tooltiplifespan)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):function(e){var t,r;const{programId:o=v()}=e,a=g(),i=b(),{data:n}=x(jr,{programId:o},!(null==a?void 0:a.jwt)),[s]=y(zr),d=null!==(r=null===(t=null==n?void 0:n.user)||void 0===t?void 0:t.referralCode)&&void 0!==r?r:"...",[c,u]=l(!1);return{...e,onClick:function(){navigator.clipboard.writeText(d),u(!0),setTimeout((()=>u(!1)),e.tooltiplifespan),s({eventMeta:{programId:o,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:c,copyString:d}}(e);return t(P,Object.assign({},r))}},$r=class{constructor(t){e(this,t),this.tooltiptext="Copied to Clipboard",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Link",this.buttonType="primary",this.buttonStyle="icon",this.allowCustomization=!1,this.customizeLinkLabel="Customize Link",this.saveLabelText="Save",this.cancelLabelText="Cancel",this.existingCodeConflictErrorTitle="This link is already taken",this.existingCodeConflictErrorDescription="Try adding numbers, a dash or underscore to create a unique link.",this.invalidCharactersErrorTitle="Please use only letters, numbers, dashes and underscores",this.invalidCharactersErrorDescription="Special characters can break the link when sharing.",this.profanityErrorTitle="Please try a different link",this.profanityErrorDescription="This link contains a restricted word.",this.editLimitText="You can edit your link up to {editsRemaining} more times.",this.editLimitReachedText="5 edit limit reached. To make more changes, please contact {supportLink}.",this.supportLinkText="Support",this.customizeDisabledTooltip="Link customization is not available.",i(this)}disconnectedCallback(){}render(){const e=M(this),r=m()?function(e){var t;const[r,o]=l(!1),[a,i]=l(!1),[n,s]=l(""),d="https://www.example.com/sharelink/abc",c={copyTextViewProps:{copyString:d,tooltiptext:e.tooltiptext,textAlign:e.textAlign,buttonStyle:e.buttonStyle,backgroundColor:e.backgroundColor,textColor:e.textColor,borderRadius:e.borderRadius,buttonType:e.buttonType,copyButtonLabel:e.copyButtonLabel,borderColor:e.borderColor,open:r,onClick:()=>{navigator.clipboard.writeText(d),o(!0),setTimeout((()=>o(!1)),e.tooltiplifespan)}},allowCustomization:e.allowCustomization,customizeLinkLabel:e.customizeLinkLabel,saveLabelText:e.saveLabelText,cancelLabelText:e.cancelLabelText,isEditing:a,editValue:n,domainPrefix:"https://www.example.com/",editsRemaining:5,maxEdits:5,limitReached:!1,validationError:null,isValidating:!1,isSaving:!1,characterLimit:15,minCharacters:3,charactersRemaining:15-n.length,editLimitText:e.editLimitText,editLimitReachedText:e.editLimitReachedText,supportLinkText:e.supportLinkText,customizeDisabled:!1,customizeDisabledTooltip:null!==(t=e.customizeDisabledTooltip)&&void 0!==t?t:"Link customization is not available.",onCustomizeClick:()=>{i(!0),s("")},onEditValueChange:e=>{s(e)},onSave:()=>{i(!1)},onCancel:()=>{i(!1),s("")}};return N(c,e.demoData||{},{arrayMerge:(e,t)=>t})}(e):_e(e);return t(Fe,Object.assign({},r))}},Ur=class{constructor(t){e(this,t),this.ignored=!0,this.space="xxx-large",this.display="flex",this.alignment="center",this.gap="x-large",i(this)}disconnectedCallback(){}render(){return t(Ie,Object.assign({},M(this)),t("slot",null))}},Hr=f.gql`
258
+ `,Vr=class{constructor(t){e(this,t),this.tooltiptext="Copied to Clipboard",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Code",this.buttonStyle="icon",this.buttonType="primary",i(this)}disconnectedCallback(){}render(){const e=M(this),r=m()?function(e){const[t,r]=l(!1),o="SHARECODE001";return N({copyString:o,tooltiptext:e.tooltiptext,textAlign:e.textAlign,copyButtonLabel:e.copyButtonLabel,buttonStyle:e.buttonStyle,backgroundColor:e.backgroundColor,textColor:e.textColor,borderRadius:e.borderRadius,borderColor:e.borderColor,buttonType:e.buttonType,open:t,onClick:()=>{navigator.clipboard.writeText(o),r(!0),setTimeout((()=>r(!1)),e.tooltiplifespan)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):function(e){var t,r;const{programId:o=v()}=e,a=g(),i=b(),{data:n}=x(jr,{programId:o},!(null==a?void 0:a.jwt)),[s]=y(zr),d=null!==(r=null===(t=null==n?void 0:n.user)||void 0===t?void 0:t.referralCode)&&void 0!==r?r:"...",[c,u]=l(!1);return{...e,onClick:function(){navigator.clipboard.writeText(d),u(!0),setTimeout((()=>u(!1)),e.tooltiplifespan),s({eventMeta:{programId:o,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:c,copyString:d}}(e);return t(P,Object.assign({},r))}},$r=class{constructor(t){e(this,t),this.tooltiptext="Copied to Clipboard",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Link",this.buttonType="primary",this.buttonStyle="icon",this.allowCustomization=!1,this.cancelLabelText="Cancel",this.customizeDisabledTooltip="Link customization is not available.",this.customizeLinkButtonLabel="Customize Link",this.editLimitReachedText="5 edit limit reached. To make more changes, please contact {supportLink}.",this.editLimitText="You can edit your link up to {editsRemaining} more times.",this.invalidCharactersErrorDescription="Special characters can break the link when sharing.",this.invalidCharactersErrorTitle="Please use only letters, numbers, dashes and underscores",this.linkTakenErrorDescription="Try adding numbers, a dash or underscore to create a unique link.",this.linkTakenErrorTitle="This link is already taken",this.restrictedWordsErrorDescription="This link contains a restricted word.",this.restrictedWordsErrorTitle="Please try a different link",this.saveLabelText="Save",this.supportLinkText="Support",i(this)}disconnectedCallback(){}render(){const e=M(this),r=m()?function(e){var t;const[r,o]=l(!1),[a,i]=l(!1),[n,s]=l(""),d="https://www.example.com/sharelink/abc",c={copyTextViewProps:{copyString:d,tooltiptext:e.tooltiptext,textAlign:e.textAlign,buttonStyle:e.buttonStyle,backgroundColor:e.backgroundColor,textColor:e.textColor,borderRadius:e.borderRadius,buttonType:e.buttonType,copyButtonLabel:e.copyButtonLabel,borderColor:e.borderColor,open:r,onClick:()=>{navigator.clipboard.writeText(d),o(!0),setTimeout((()=>o(!1)),e.tooltiplifespan)}},allowCustomization:e.allowCustomization,customizeLinkLabel:e.customizeLinkButtonLabel,saveLabelText:e.saveLabelText,cancelLabelText:e.cancelLabelText,isEditing:a,editValue:n,domainPrefix:"https://www.example.com/",editsRemaining:5,maxEdits:5,limitReached:!1,validationError:null,isValidating:!1,isSaving:!1,characterLimit:15,minCharacters:3,charactersRemaining:15-n.length,editLimitText:e.editLimitText,editLimitReachedText:e.editLimitReachedText,supportLinkText:e.supportLinkText,customizeDisabled:!1,customizeDisabledTooltip:null!==(t=e.customizeDisabledTooltip)&&void 0!==t?t:"Link customization is not available.",onCustomizeClick:()=>{i(!0),s("")},onEditValueChange:e=>{s(e)},onSave:()=>{i(!1)},onCancel:()=>{i(!1),s("")}};return N(c,e.demoData||{},{arrayMerge:(e,t)=>t})}(e):_e(e);return t(Fe,Object.assign({},r))}},Ur=class{constructor(t){e(this,t),this.ignored=!0,this.space="xxx-large",this.display="flex",this.alignment="center",this.gap="x-large",i(this)}disconnectedCallback(){}render(){return t(Ie,Object.assign({},M(this)),t("slot",null))}},Hr=f.gql`
259
259
  mutation taskCardEvent($userEventInput: UserEventInput!) {
260
260
  logUserEvent(userEventInput: $userEventInput) {
261
261
  userId