@authhero/widget 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authhero-widget/authhero-widget.esm.js +1 -1
- package/dist/authhero-widget/index.esm.js +1 -1
- package/dist/authhero-widget/p-1107d60e.entry.js +1 -0
- package/dist/authhero-widget/p-5hZ8Vbm9.js +2 -0
- package/dist/authhero-widget/p-b2d3d319.entry.js +1 -0
- package/dist/cjs/authhero-node.cjs.entry.js +18 -12
- package/dist/cjs/authhero-widget.cjs.entry.js +59 -37
- package/dist/cjs/authhero-widget.cjs.js +2 -2
- package/dist/cjs/{index-I1frl4Am.js → index-vX5cgLV-.js} +1803 -166
- package/dist/cjs/index.cjs.js +5 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/authhero-node/authhero-node.css +41 -0
- package/dist/collection/components/authhero-node/authhero-node.js +19 -15
- package/dist/collection/components/authhero-widget/authhero-widget.css +29 -0
- package/dist/collection/components/authhero-widget/authhero-widget.js +63 -45
- package/dist/components/authhero-node.js +1 -1
- package/dist/components/authhero-widget.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-CWVARG2s.js +1 -0
- package/dist/components/p-EokuR0qI.js +1 -0
- package/dist/esm/authhero-node.entry.js +18 -12
- package/dist/esm/authhero-widget.entry.js +59 -37
- package/dist/esm/authhero-widget.js +3 -3
- package/dist/esm/{index-ARKBiJrR.js → index-5hZ8Vbm9.js} +1803 -166
- package/dist/esm/index.js +5 -3
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/authhero-node/authhero-node.d.ts +1 -0
- package/dist/types/components/authhero-widget/authhero-widget.d.ts +5 -12
- package/dist/types/components.d.ts +6 -27
- package/dist/types/stencil-public-runtime.d.ts +2 -54
- package/hydrate/index.js +20571 -20681
- package/hydrate/index.mjs +20571 -20681
- package/package.json +3 -3
- package/dist/authhero-widget/p-130714cc.entry.js +0 -1
- package/dist/authhero-widget/p-2c7cceee.entry.js +0 -1
- package/dist/authhero-widget/p-ARKBiJrR.js +0 -2
- package/dist/components/p-BbVVe_wV.js +0 -1
- package/dist/components/p-DCgjvHcp.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t,p as e,H as r,c as i,h as o}from"./p-EokuR0qI.js";const n=e(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.fieldChange=i(this,"fieldChange"),this.buttonClick=i(this,"buttonClick")}component;value;disabled=!1;passwordVisible=!1;fieldChange;buttonClick;handleInput=t=>{this.fieldChange.emit({id:this.component.id,value:t.target.value})};handleKeyDown=t=>{"Enter"===t.key&&(t.preventDefault(),this.buttonClick.emit({id:"submit",type:"submit",value:"next"}))};handleCheckbox=t=>{this.fieldChange.emit({id:this.component.id,value:t.target.checked?"true":"false"})};sanitizeForCssToken(t){return t.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}handleButtonClick=(t,e,r)=>{t.preventDefault(),this.buttonClick.emit({id:this.component.id,type:e,value:r})};togglePasswordVisibility=()=>{this.passwordVisible=!this.passwordVisible};getErrors(){const t=this.component;return t.messages?.filter((t=>"error"===t.type))||[]}renderFloatingLabel(t,e,r,i){return t?o("label",{class:{"input-label":!0,floating:!!i},part:"label",htmlFor:e},t,r&&o("span",{class:"required"},"*")):null}renderLabel(t,e,r){return t?o("label",{class:"input-label",part:"label",htmlFor:e},t,r&&o("span",{class:"required"},"*")):null}renderPasswordToggle(){return this.passwordVisible?o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),o("line",{x1:"1",y1:"1",x2:"23",y2:"23"})):o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},o("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),o("circle",{cx:"12",cy:"12",r:"3"}))}renderErrors(){return this.getErrors().map((t=>o("span",{class:"error-text",part:"error-text",key:t.id??t.text},t.text)))}renderHint(t){return t?o("span",{class:"helper-text",part:"helper-text"},t):null}renderDivider(){return o("hr",{class:"divider",part:"divider"})}renderHtml(t){return o("div",{class:"html-content",part:"html-content",innerHTML:t.config?.content??""})}renderImage(t){const{src:e,alt:r,width:i,height:n}=t.config??{};return e?o("img",{class:"image",part:"image",src:e,alt:r??"",width:i,height:n,loading:"lazy"}):null}renderRichText(t){return o("div",{class:"rich-text",part:"rich-text",innerHTML:t.config?.content??""})}renderNextButton(t){return o("button",{type:"submit",class:"btn btn-primary",part:"button button-primary","data-primary-action-button":!0,disabled:this.disabled,onClick:t=>this.handleButtonClick(t,"submit","next")},t.config.text??"Continue")}renderPreviousButton(t){return o("button",{type:"button",class:"btn btn-secondary",part:"button button-secondary",disabled:this.disabled,onClick:t=>this.handleButtonClick(t,"previous","back")},t.config.text??"Back")}renderJumpButton(t){return o("button",{type:"button",class:"btn btn-link",part:"button button-link",disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"jump",t.config.target_step)},t.config.text??"Go")}renderResendButton(t){return o("button",{type:"button",class:"btn btn-link",part:"button button-link",disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"resend",t.config.resend_action)},t.config.text??"Resend")}renderTextField(t){const e=`input-${t.id}`,r=this.getErrors(),{multiline:i,max_length:n}=t.config??{},a=!!(this.value&&this.value.length>0);return i?o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("textarea",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input textarea",name:t.id,placeholder:" ",required:t.required,disabled:this.disabled,maxLength:n,onInput:this.handleInput},this.value??""),this.renderErrors(),0===r.length&&this.renderHint(t.hint)):o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container"},o("input",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input",type:t.sensitive?"password":"text",name:t.id,"data-input-name":t.id,value:this.value??"",placeholder:" ",required:t.required,disabled:this.disabled,maxLength:n,onInput:this.handleInput,onKeyDown:this.handleKeyDown}),this.renderFloatingLabel(t.label,e,t.required,a)),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderEmailField(t){const e=`input-${t.id}`,r=this.getErrors(),i=!!(this.value&&this.value.length>0);return o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container"},o("input",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input",type:"email",name:t.id,"data-input-name":t.id,value:this.value??"",placeholder:" ",required:t.required,disabled:this.disabled,autocomplete:"email",onInput:this.handleInput,onKeyDown:this.handleKeyDown}),this.renderFloatingLabel(t.label,e,t.required,i)),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderPasswordField(t){const e=`input-${t.id}`,r=this.getErrors(),i=!!(this.value&&this.value.length>0),n=t.config?.forgot_password_link;return o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container password-container"},o("input",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input",type:this.passwordVisible?"text":"password",name:t.id,"data-input-name":t.id,value:this.value??"",placeholder:" ",required:t.required,disabled:this.disabled,minLength:t.config?.min_length,autocomplete:"current-password",onInput:this.handleInput,onKeyDown:this.handleKeyDown}),this.renderFloatingLabel(t.label,e,t.required,i),o("button",{type:"button",class:"password-toggle",part:"password-toggle",onClick:this.togglePasswordVisibility,"aria-label":"Toggle password visibility","aria-pressed":this.passwordVisible?"true":"false"},this.renderPasswordToggle())),this.renderErrors(),0===r.length&&this.renderHint(t.hint),n&&o("div",{class:"field-link",part:"field-link"},o("a",{href:n,class:"link",part:"link"},"Forgot password?")))}renderNumberField(t){const e=`input-${t.id}`,r=this.getErrors(),{placeholder:i,min:n,max:a,step:s}=t.config??{};return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("input",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input",type:"number",name:t.id,value:this.value??"",placeholder:i,required:t.required,disabled:this.disabled,min:n,max:a,step:s,onInput:this.handleInput,onKeyDown:this.handleKeyDown}),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderTelField(t){const e=`input-${t.id}`,r=this.getErrors();return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("input",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input",type:"tel",name:t.id,value:this.value??"",placeholder:t.config?.placeholder,required:t.required,disabled:this.disabled,autocomplete:"tel",onInput:this.handleInput,onKeyDown:this.handleKeyDown}),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderUrlField(t){const e=`input-${t.id}`,r=this.getErrors();return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("input",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input",type:"url",name:t.id,value:this.value??"",placeholder:t.config?.placeholder,required:t.required,disabled:this.disabled,onInput:this.handleInput,onKeyDown:this.handleKeyDown}),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderDateField(t){const e=`input-${t.id}`,r=this.getErrors(),{min:i,max:n}=t.config??{};return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("input",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input",type:"date",name:t.id,value:this.value??"",required:t.required,disabled:this.disabled,min:i,max:n,onInput:this.handleInput,onKeyDown:this.handleKeyDown}),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderBooleanField(t){return o("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},o("input",{type:"checkbox",part:"checkbox",name:t.id,checked:"true"===this.value||!0===t.config?.default_value,required:t.required,disabled:this.disabled,onChange:this.handleCheckbox}),o("span",{class:"checkbox-label",part:"checkbox-label"},t.label))}renderLegalField(t){const e=t.config?.text??t.label??"",r=!0===t.config?.html;return o("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},o("input",{type:"checkbox",part:"checkbox",name:t.id,checked:"true"===this.value,required:t.required,disabled:this.disabled,onChange:this.handleCheckbox}),r?o("span",{class:"checkbox-label",part:"checkbox-label",innerHTML:e}):o("span",{class:"checkbox-label",part:"checkbox-label"},e))}renderDropdownField(t){const e=`input-${t.id}`,r=this.getErrors(),{options:i,placeholder:n}=t.config??{};return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(t.label,e,t.required),o("select",{id:e,class:{"input-field":!0,"has-error":r.length>0},part:"input select",name:t.id,required:t.required,disabled:this.disabled,onChange:this.handleInput},n&&o("option",{value:"",disabled:!0,selected:!this.value},n),i?.map((t=>o("option",{value:t.value,selected:this.value===t.value,key:t.value},t.label)))),this.renderErrors(),0===r.length&&this.renderHint(t.hint))}renderChoiceField(t){const e=this.getErrors(),{options:r,display:i}=t.config??{},n="checkbox"===i,a=n?"checkbox":"radio";return o("div",{class:"choice-wrapper",part:"choice-wrapper"},t.label&&o("span",{class:"choice-label",part:"choice-label"},t.label,t.required&&o("span",{class:"required"},"*")),o("div",{class:"choice-options",part:"choice-options"},r?.map((e=>o("label",{class:"choice-option",part:"choice-option",key:e.value},o("input",{type:a,part:a,name:t.id,value:e.value,checked:this.value===e.value,required:t.required&&!n,disabled:this.disabled,onChange:this.handleInput}),o("span",null,e.label))))),this.renderErrors(),0===e.length&&this.renderHint(t.hint))}renderSocialField(t){const e=t.config?.providers??[],r=t.config?.provider_details,i=new Map(r?.map((t=>[t.name,t]))??[]),n=t=>{const e=i.get(t),r=this.sanitizeForCssToken(t);return e?.icon_url?o("img",{class:"social-icon",part:`social-icon social-icon-${r}`,src:e.icon_url,alt:e.display_name||t}):null};return o("div",{class:"social-buttons",part:"social-buttons"},e.map((t=>{const e=this.sanitizeForCssToken(t),r=(t=>{const e=i.get(t);return e?.strategy??t})(t),a=n(t);return o("button",{type:"button",class:`btn btn-secondary btn-social btn-social-${e}${a?"":" no-icon"}`,part:`button button-secondary button-social button-social-${e}`,"data-connection-name":t,"data-strategy":r,disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"SOCIAL",t),key:t},a,o("span",{class:"btn-social-content",part:`button-social-content button-social-content-${e}`},o("span",{part:`button-social-text button-social-text-${e}`},(t=>{const e=i.get(t);return e?.display_name?e.display_name:t.split("-").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" ")})(t)),o("span",{class:"btn-social-subtitle",part:`button-social-subtitle button-social-subtitle-${e}`})))})))}render(){if(!this.component)return null;if(!1===this.component.visible)return null;switch(this.component.type){case"DIVIDER":return this.renderDivider();case"HTML":return this.renderHtml(this.component);case"IMAGE":return this.renderImage(this.component);case"RICH_TEXT":return this.renderRichText(this.component);case"NEXT_BUTTON":return this.renderNextButton(this.component);case"PREVIOUS_BUTTON":return this.renderPreviousButton(this.component);case"JUMP_BUTTON":return this.renderJumpButton(this.component);case"RESEND_BUTTON":return this.renderResendButton(this.component);case"TEXT":return this.renderTextField(this.component);case"EMAIL":return this.renderEmailField(this.component);case"PASSWORD":return this.renderPasswordField(this.component);case"NUMBER":return this.renderNumberField(this.component);case"TEL":return this.renderTelField(this.component);case"URL":return this.renderUrlField(this.component);case"DATE":return this.renderDateField(this.component);case"BOOLEAN":return this.renderBooleanField(this.component);case"LEGAL":return this.renderLegalField(this.component);case"DROPDOWN":return this.renderDropdownField(this.component);case"CHOICE":return this.renderChoiceField(this.component);case"SOCIAL":return this.renderSocialField(this.component);case"AUTH0_VERIFIABLE_CREDENTIALS":case"GMAPS_ADDRESS":case"RECAPTCHA":return console.warn(`Widget component "${this.component.type}" not yet implemented`),null;case"CARDS":case"CUSTOM":case"FILE":case"PAYMENT":return console.warn(`Component "${this.component.type}" not yet implemented`),null;default:return console.warn(`Unknown component type: ${this.component.type}`),null}}static get style(){return':host{display:block}.input-wrapper{display:flex;flex-direction:column;position:relative;margin-bottom:16px}.input-container{position:relative;width:100%}.input-label{position:absolute;left:16px;top:50%;transform:translateY(-50%);font-size:16px;font-weight:var(--ah-font-weight-label, 400);color:var(--ah-color-text-muted, #65676e);pointer-events:none;transition:all 0.15s ease-out;background-color:transparent;padding:0;z-index:1}.input-label.floating,.input-field:focus+.input-label,.input-field:not(:placeholder-shown)+.input-label{top:-8px;transform:translateY(0);font-size:12px;background-color:var(--ah-color-bg, #ffffff);padding:0 4px;left:12px;color:var(--ah-color-text-muted, #65676e)}.input-field:focus+.input-label{color:var(--ah-color-primary, #635dff)}.required{color:var(--ah-color-error, #d03c38);margin-left:2px}.input-field{width:100%;padding:16px;font-size:16px;font-family:inherit;color:var(--ah-color-text, #1e212a);background-color:var(--ah-color-input-bg, #ffffff);border:1px solid var(--ah-color-border, #c9cace);border-radius:var(--ah-input-radius, 3px);outline:none;transition:border-color 0.15s ease-out,\\n box-shadow 0.15s ease-out;box-sizing:border-box}.input-field::placeholder{color:transparent}.input-field:hover{border-color:var(--ah-color-border-hover, #65676e)}.input-field:focus{border-color:var(--ah-color-primary, #635dff);box-shadow:inset 0 0 0 1px var(--ah-color-primary, #635dff)}.input-field.has-error{border-color:var(--ah-color-error, #d03c38)}.input-field.has-error:focus{box-shadow:inset 0 0 0 1px var(--ah-color-error, #d03c38)}.input-field:disabled{background-color:var(--ah-color-bg-disabled, #f5f5f5);border-color:var(--ah-color-border-disabled, #e0e1e3);cursor:not-allowed;opacity:0.7}.password-container{position:relative;display:flex;align-items:center}.password-container .input-field{padding-right:48px}.password-toggle{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;color:var(--ah-color-text-muted, #65676e);transition:color 0.15s ease}.password-toggle:hover{color:var(--ah-color-text, #1e212a)}.password-toggle svg{width:20px;height:20px}.error-text{font-size:12px;color:var(--ah-color-error, #d03c38);margin-top:4px;line-height:1.4}.helper-text{font-size:12px;color:var(--ah-color-text-muted, #65676e);margin-top:4px;line-height:1.4}.field-link{display:block;text-align:left;margin-top:8px;margin-bottom:16px}.field-link a{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;font-weight:var(--ah-font-weight-link, 400)}.field-link a:hover{text-decoration:underline}.checkbox-wrapper{display:flex;align-items:flex-start;gap:10px;cursor:pointer;margin-bottom:16px}.checkbox-wrapper input[type="checkbox"]{width:18px;height:18px;margin:0;accent-color:var(--ah-color-primary, #635dff);cursor:pointer;flex-shrink:0}.checkbox-label{font-size:14px;color:var(--ah-color-text, #1e212a);line-height:1.5}.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:14px 20px;font-size:16px;font-weight:var(--ah-font-weight-btn, 400);font-family:inherit;line-height:1.25;text-align:center;text-decoration:none;border:none;border-radius:var(--ah-btn-radius, 3px);cursor:pointer;transition:background-color 0.15s ease,\\n border-color 0.15s ease,\\n transform 0.1s ease;box-sizing:border-box}.btn:disabled{opacity:0.6;cursor:not-allowed}.btn:not(:disabled):active{transform:scale(0.98)}.btn:focus-visible{outline:2px solid var(--ah-color-primary, #635dff);outline-offset:2px}.btn-primary{background-color:var(--ah-color-primary, #635dff);color:var(--ah-color-text-on-primary, #ffffff);margin-top:12px}.btn-primary:not(:disabled):hover{filter:brightness(0.85)}.btn-secondary{background-color:var(--ah-color-bg, #ffffff);color:var(--ah-color-text, #1e212a);border:1px solid var(--ah-color-border, #c9cace)}.btn-secondary:not(:disabled):hover{background-color:var(--ah-color-bg-hover, #f5f5f5);border-color:var(--ah-color-border-hover, #65676e)}.btn-link{background:none;border:none;color:var(--ah-color-link, #635dff);padding:8px 0;font-weight:var(--ah-font-weight-link, 400);text-decoration:none}.btn-link:hover{text-decoration:underline}.social-buttons{display:flex;flex-direction:column;gap:12px}.btn-social{display:flex;align-items:center;justify-content:center;gap:12px}.btn-social-content{display:flex;flex-direction:column;align-items:center;text-align:center}.btn-social-subtitle{font-size:12px;font-style:italic;opacity:0.8;margin-top:2px}.btn-social-subtitle:empty{display:none}.social-icon{width:20px;height:20px;flex-shrink:0}@media (max-width: 480px){.social-buttons:has(.btn-social:nth-child(3)){flex-direction:row;flex-wrap:nowrap;justify-content:stretch;gap:8px}.social-buttons:has(.btn-social:nth-child(3)) .btn-social{width:auto;min-width:0;padding:12px;flex:1 1 0}.social-buttons:has(.btn-social:nth-child(3)) .btn-social span{display:none}.social-buttons:has(.btn-social:nth-child(3)) .social-icon{width:24px;height:24px}}.btn-icon{width:20px;height:20px;flex-shrink:0}.btn-icon img{width:100%;height:100%;object-fit:contain}.text-title{font-size:20px;font-weight:400;color:var(--ah-color-text, #1e212a);margin:8px 0;line-height:1.3}.text-title.text-success{color:var(--ah-color-success, #13a769)}.text-description{font-size:14px;color:var(--ah-color-text-muted, #65676e);margin:4px 0;line-height:1.5}.image{display:block;max-width:100%;height:auto;border-radius:4px}.image-centered{margin:0 auto 16px;width:52px;height:52px;object-fit:contain}.link{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;transition:color 0.15s ease}.link:hover{text-decoration:underline}.link:focus-visible{outline:2px solid var(--ah-color-link, #635dff);outline-offset:2px;border-radius:2px}.node-error{padding:12px 16px;background-color:var(--ah-color-error-bg, #ffeaea);color:var(--ah-color-error, #d03c38);border-left:3px solid var(--ah-color-error, #d03c38);border-radius:0;font-size:14px;margin-bottom:16px}.node-success{padding:12px 16px;background-color:var(--ah-color-success-bg, #e6f9f1);color:var(--ah-color-success, #13a769);border-left:3px solid var(--ah-color-success, #13a769);border-radius:0;font-size:14px;margin-bottom:16px}.divider{display:flex;align-items:center;text-align:center;margin:16px 0}.divider::before,.divider::after{content:"";flex:1;border-bottom:1px solid var(--ah-color-border-muted, #c9cace)}.divider-text{padding:0 10px;font-size:12px;font-weight:400;color:var(--ah-color-text-muted, #65676e);text-transform:uppercase;letter-spacing:0.5px}.rich-text{font-size:14px;line-height:1.5;color:var(--ah-color-text, #1e212a)}.rich-text a{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);transition:color 0.15s ease}.rich-text a:hover{text-decoration:underline}.rich-text .terms-text{margin-top:16px;text-align:center;font-size:12px;color:var(--ah-color-text-muted, #65676e)}.rich-text .terms-text a{font-size:12px}.rich-text .signup-link{margin-top:16px;text-align:center;font-size:14px;color:var(--ah-color-text, #1e212a)}'}},[513,"authhero-node",{component:[16],value:[1],disabled:[4],passwordVisible:[32]}]);function a(){"undefined"!=typeof customElements&&["authhero-node"].forEach((e=>{"authhero-node"===e&&(customElements.get(t(e))||customElements.define(t(e),n))}))}a();export{n as A,a as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t,e,n,s,i,r,o,l,c,f,u,h,a,p,d,$,v,w,g,b=Object.create,m=Object.defineProperty,y=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,j=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,M=t=>{throw TypeError(t)},x=(t,e)=>function(){return e||(0,t[O(t)[0]])((e={exports:{}}).exports,e),e.exports},E=(t,e,n)=>e.has(t)||M("Cannot "+n),k=(t,e,n)=>(E(t,e,"read from private field"),n?n.call(t):e.get(t)),N=(t,e,n)=>e.has(t)?M("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),P=(t,e,n)=>(E(t,e,"write to private field"),e.set(t,n),n),W=(t,e,n)=>(E(t,e,"access private method"),n),R=x({"node_modules/balanced-match/index.js"(t,e){function n(t,e,n){t instanceof RegExp&&(t=s(t,n)),e instanceof RegExp&&(e=s(e,n));var r=i(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function s(t,e){var n=e.match(t);return n?n[0]:null}function i(t,e,n){var s,i,r,o,l,c=n.indexOf(t),f=n.indexOf(e,c+1),u=c;if(c>=0&&f>0){if(t===e)return[c,f];for(s=[],r=n.length;u>=0&&!l;)u==c?(s.push(u),c=n.indexOf(t,u+1)):1==s.length?l=[s.pop(),f]:((i=s.pop())<r&&(r=i,o=f),f=n.indexOf(e,u+1)),u=c<f&&c>=0?c:f;s.length&&(l=[r,o])}return l}e.exports=n,n.range=i}}),A=x({"node_modules/brace-expansion/index.js"(t,e){var n=R();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),$(function(t){return t.split("\\\\").join(s).split("\\{").join(i).split("\\}").join(r).split("\\,").join(o).split("\\.").join(l)}(t),!0).map(f)):[]};var s="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",r="\0CLOSE"+Math.random()+"\0",o="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function f(t){return t.split(s).join("\\").split(i).join("{").split(r).join("}").split(o).join(",").split(l).join(".")}function u(t){if(!t)return[""];var e=[],s=n("{","}",t);if(!s)return t.split(",");var i=s.body,r=s.post,o=s.pre.split(",");o[o.length-1]+="{"+i+"}";var l=u(r);return r.length&&(o[o.length-1]+=l.shift(),o.push.apply(o,l)),e.push.apply(e,o),e}function h(t){return"{"+t+"}"}function a(t){return/^-?0\d/.test(t)}function p(t,e){return t<=e}function d(t,e){return t>=e}function $(t,e){var s=[],i=n("{","}",t);if(!i)return[t];var o=i.pre,l=i.post.length?$(i.post,!1):[""];if(/\$$/.test(i.pre))for(var f=0;f<l.length;f++)s.push(A=o+"{"+i.body+"}"+l[f]);else{var v,w,g=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),b=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),m=g||b,y=i.body.indexOf(",")>=0;if(!m&&!y)return i.post.match(/,(?!,).*\}/)?$(t=i.pre+"{"+i.body+r+i.post):[t];if(m)v=i.body.split(/\.\./);else if(1===(v=u(i.body)).length&&1===(v=$(v[0],!1).map(h)).length)return l.map((function(t){return i.pre+v[0]+t}));if(m){var O=c(v[0]),j=c(v[1]),S=Math.max(v[0].length,v[1].length),M=3==v.length?Math.abs(c(v[2])):1,x=p;j<O&&(M*=-1,x=d);var E=v.some(a);w=[];for(var k=O;x(k,j);k+=M){var N;if(b)"\\"===(N=String.fromCharCode(k))&&(N="");else if(N=String(k),E){var P=S-N.length;if(P>0){var W=new Array(P+1).join("0");N=k<0?"-"+W+N.slice(1):W+N}}w.push(N)}}else{w=[];for(var R=0;R<v.length;R++)w.push.apply(w,$(v[R],!1))}for(R=0;R<w.length;R++)for(f=0;f<l.length;f++){var A=o+w[R]+l[f];(!e||m||A)&&s.push(A)}}return s}}}),L=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(L||{}),I=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(I||{}),z="type",C="value",_="serialized:",T=(t,e)=>{var n;Object.entries(null!=(n=e.i.t)?n:{}).map((([n,[s]])=>{if(31&s||32&s){const s=t[n],i=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(t,n,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.o.has(n)?e.o.get(n):s}}))},D=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},U=(t,e)=>e in t,V=(t,e)=>(0,console.error)(t,e),B=new Map,F="s-id",G="sty-id",Z="c-id",H="undefined"!=typeof window?window:{},q=H.HTMLElement||class{},J={l:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)},Y=(()=>{try{return!!H.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),K=!!Y&&(()=>!!H.document&&Object.getOwnPropertyDescriptor(H.document.adoptedStyleSheets,"length").writable)(),Q=!1,X=[],tt=[],et=(t,e)=>n=>{t.push(n),Q||(Q=!0,e&&4&J.l?it(st):J.raf(st))},nt=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){V(t)}t.length=0},st=()=>{nt(X),nt(tt),(Q=X.length>0)&&J.raf(st)},it=t=>Promise.resolve(undefined).then(t),rt=et(tt,!0),ot=t=>{const e=new URL(t,J.u);return e.origin!==H.location.origin?e.href:e.pathname},lt=t=>J.u=t,ct=t=>"object"==(t=typeof t)||"function"===t,ft=(e=null!=(t=A())?b(j(t)):{},((t,e,n,s)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of O(e))S.call(t,n)||undefined===n||m(t,n,{get:()=>e[n],enumerable:!(s=y(e,n))||s.enumerable});return t})(m(e,"default",{value:t,enumerable:!0}),t)),ut=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},ht={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},at=t=>t.replace(/[[\]\\-]/g,"\\$&"),pt=t=>t.join(""),dt=(t,e)=>{const n=e;if("["!==t.charAt(n))throw new Error("not in a brace expression");const s=[],i=[];let r=n+1,o=!1,l=!1,c=!1,f=!1,u=n,h="";t:for(;r<t.length;){const e=t.charAt(r);if("!"!==e&&"^"!==e||r!==n+1){if("]"===e&&o&&!c){u=r+1;break}if(o=!0,"\\"!==e||c){if("["===e&&!c)for(const[e,[o,c,f]]of Object.entries(ht))if(t.startsWith(e,r)){if(h)return["$.",!1,t.length-n,!0];r+=e.length,f?i.push(o):s.push(o),l=l||c;continue t}c=!1,h?(e>h?s.push(at(h)+"-"+at(e)):e===h&&s.push(at(e)),h="",r++):t.startsWith("-]",r+1)?(s.push(at(e+"-")),r+=2):t.startsWith("-",r+1)?(h=e,r+=2):(s.push(at(e)),r++)}else c=!0,r++}else f=!0,r++}if(u<r)return["",!1,0,!1];if(!s.length&&!i.length)return["$.",!1,t.length-n,!0];if(0===i.length&&1===s.length&&/^\\?.$/.test(s[0])&&!f){return[(a=2===s[0].length?s[0].slice(-1):s[0],a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,u-n,!1]}var a;const p="["+(f?"^":"")+pt(s)+"]",d="["+(f?"":"^")+pt(i)+"]";return[s.length&&i.length?"("+p+"|"+d+")":s.length?p:d,l,u-n,!0]},$t=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),vt=new Set(["!","?","+","*","@"]),wt=t=>vt.has(t),gt="(?!\\.)",bt=new Set(["[","."]),mt=new Set(["..","."]),yt=new Set("().*{}+?[]^$\\!"),Ot="[^/]",jt=Ot+"*?",St=Ot+"+?",Mt=class t{constructor(t,e,d={}){var $;N(this,p),((t,e,n)=>{e in t?m(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(this,"type"+"",$),N(this,n),N(this,s),N(this,i,!1),N(this,r,[]),N(this,o),N(this,l),N(this,c),N(this,f,!1),N(this,u),N(this,h),N(this,a,!1),this.type=t,t&&P(this,s,!0),P(this,o,e),P(this,n,k(this,o)?k(k(this,o),n):this),P(this,u,k(this,n)===this?d:k(k(this,n),u)),P(this,c,k(this,n)===this?[]:k(k(this,n),c)),"!"!==t||k(k(this,n),f)||k(this,c).push(this),P(this,l,k(this,o)?k(k(this,o),r).length:0)}get hasMagic(){if(void 0!==k(this,s))return k(this,s);for(const t of k(this,r))if("string"!=typeof t&&(t.type||t.hasMagic))return P(this,s,!0);return k(this,s)}toString(){return void 0!==k(this,h)?k(this,h):P(this,h,this.type?this.type+"("+k(this,r).map((t=>String(t))).join("|")+")":k(this,r).map((t=>String(t))).join(""))}push(...e){for(const n of e)if(""!==n){if("string"!=typeof n&&!(n instanceof t&&k(n,o)===this))throw new Error("invalid part: "+n);k(this,r).push(n)}}toJSON(){var t;const e=null===this.type?k(this,r).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...k(this,r).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===k(this,n)||k(k(this,n),f)&&"!"===(null==(t=k(this,o))?void 0:t.type))&&e.push({}),e}isStart(){var e;if(k(this,n)===this)return!0;if(!(null==(e=k(this,o))?void 0:e.isStart()))return!1;if(0===k(this,l))return!0;const s=k(this,o);for(let e=0;e<k(this,l);e++){const n=k(s,r)[e];if(!(n instanceof t&&"!"===n.type))return!1}return!0}isEnd(){var t,e,s;if(k(this,n)===this)return!0;if("!"===(null==(t=k(this,o))?void 0:t.type))return!0;if(!(null==(e=k(this,o))?void 0:e.isEnd()))return!1;if(!this.type)return null==(s=k(this,o))?void 0:s.isEnd();const i=k(this,o)?k(k(this,o),r).length:0;return k(this,l)===i-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(e){const n=new t(this.type,e);for(const t of k(this,r))n.copyIn(t);return n}static fromGlob(e,n={}){var s;const i=new t(null,void 0,n);return W(s=t,$,v).call(s,e,i,0,n),i}toMMPattern(){if(this!==k(this,n))return k(this,n).toMMPattern();const t=this.toString(),[e,i,r,o]=this.toRegExpSource();if(!(r||k(this,s)||k(this,u).nocase&&!k(this,u).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;const l=(k(this,u).nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${e}$`,l),{_src:e,_glob:t})}get options(){return k(this,u)}toRegExpSource(e){var l;const c=null!=e?e:!!k(this,u).dot;if(k(this,n)===this&&W(this,p,d).call(this),!this.type){const u=this.isStart()&&this.isEnd(),h=k(this,r).map((n=>{var r;const[o,l,c,f]="string"==typeof n?W(r=t,$,g).call(r,n,k(this,s),u):n.toRegExpSource(e);return P(this,s,k(this,s)||c),P(this,i,k(this,i)||f),o})).join("");let a="";if(this.isStart()&&"string"==typeof k(this,r)[0]&&(1!==k(this,r).length||!mt.has(k(this,r)[0]))){const t=bt,n=c&&t.has(h.charAt(0))||h.startsWith("\\.")&&t.has(h.charAt(2))||h.startsWith("\\.\\.")&&t.has(h.charAt(4)),s=!c&&!e&&t.has(h.charAt(0));a=n?"(?!(?:^|/)\\.\\.?(?:$|/))":s?gt:""}let p="";return this.isEnd()&&k(k(this,n),f)&&"!"===(null==(l=k(this,o))?void 0:l.type)&&(p="(?:$|\\/)"),[a+h+p,$t(h),P(this,s,!!k(this,s)),k(this,i)]}const h="*"===this.type||"+"===this.type,v="!"===this.type?"(?:(?!(?:":"(?:";let b=W(this,p,w).call(this,c);if(this.isStart()&&this.isEnd()&&!b&&"!"!==this.type){const t=this.toString();return P(this,r,[t]),this.type=null,P(this,s,void 0),[t,$t(this.toString()),!1,!1]}let m=!h||e||c?"":W(this,p,w).call(this,!0);m===b&&(m=""),m&&(b=`(?:${b})(?:${m})*?`);let y="";return y="!"===this.type&&k(this,a)?(this.isStart()&&!c?gt:"")+St:v+b+("!"===this.type?"))"+(!this.isStart()||c||e?"":gt)+jt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&m?")":"*"===this.type&&m?")?":`)${this.type}`),[y,$t(b),P(this,s,!!k(this,s)),k(this,i)]}};n=new WeakMap,s=new WeakMap,i=new WeakMap,r=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,f=new WeakMap,u=new WeakMap,h=new WeakMap,a=new WeakMap,p=new WeakSet,d=function(){if(this!==k(this,n))throw new Error("should only call on root");if(k(this,f))return this;let t;for(this.toString(),P(this,f,!0);t=k(this,c).pop();){if("!"!==t.type)continue;let e=t,n=k(e,o);for(;n;){for(let s=k(e,l)+1;!n.type&&s<k(n,r).length;s++)for(const e of k(t,r)){if("string"==typeof e)throw new Error("string part in extglob AST??");e.copyIn(k(n,r)[s])}e=n,n=k(e,o)}}return this},$=new WeakSet,v=function(t,e,n,i){var o,l;let c=!1,f=!1,u=-1,h=!1;if(null===e.type){let s=n,r="";for(;s<t.length;){const n=t.charAt(s++);if(c||"\\"===n)c=!c,r+=n;else if(f)s===u+1?"^"!==n&&"!"!==n||(h=!0):"]"!==n||s===u+2&&h||(f=!1),r+=n;else if("["!==n)if(i.noext||!wt(n)||"("!==t.charAt(s))r+=n;else{e.push(r),r="";const l=new Mt(n,e);s=W(o=Mt,$,v).call(o,t,l,s,i),e.push(l)}else f=!0,u=s,h=!1,r+=n}return e.push(r),s}let p=n+1,d=new Mt(null,e);const w=[];let g="";for(;p<t.length;){const n=t.charAt(p++);if(c||"\\"===n)c=!c,g+=n;else if(f)p===u+1?"^"!==n&&"!"!==n||(h=!0):"]"!==n||p===u+2&&h||(f=!1),g+=n;else if("["!==n)if(wt(n)&&"("===t.charAt(p)){d.push(g),g="";const e=new Mt(n,d);d.push(e),p=W(l=Mt,$,v).call(l,t,e,p,i)}else if("|"!==n){if(")"===n)return""===g&&0===k(e,r).length&&P(e,a,!0),d.push(g),g="",e.push(...w,d),p;g+=n}else d.push(g),g="",w.push(d),d=new Mt(null,e);else f=!0,u=p,h=!1,g+=n}return e.type=null,P(e,s,void 0),P(e,r,[t.substring(n-1)]),p},w=function(t){return k(this,r).map((e=>{if("string"==typeof e)throw new Error("string type in extglob ast??");const[n,s,r,o]=e.toRegExpSource(t);return P(this,i,k(this,i)||o),n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},g=function(t,e,n=!1){let s=!1,i="",r=!1;for(let o=0;o<t.length;o++){const l=t.charAt(o);if(s)s=!1,i+=(yt.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[n,s,l,c]=dt(t,o);if(l){i+=n,r=r||s,o+=l-1,e=e||c;continue}}"*"!==l?"?"!==l?i+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(i+=Ot,e=!0):(i+=n&&"*"===t?St:jt,e=!0)}else o===t.length-1?i+="\\\\":s=!0}return[i,$t(t),!!e,r]},N(Mt,$);var xt=Mt,Et=(t,e,n={})=>(ut(e),!(!n.nocomment&&"#"===e.charAt(0))&&new Xt(e,n).match(t)),kt=/^\*+([^+@!?\*\[\(]*)$/,Nt=t=>e=>!e.startsWith(".")&&e.endsWith(t),Pt=t=>e=>e.endsWith(t),Wt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Rt=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),At=/^\*+\.\*+$/,Lt=t=>!t.startsWith(".")&&t.includes("."),It=t=>"."!==t&&".."!==t&&t.includes("."),zt=/^\.\*+$/,Ct=t=>"."!==t&&".."!==t&&t.startsWith("."),_t=/^\*+$/,Tt=t=>0!==t.length&&!t.startsWith("."),Dt=t=>0!==t.length&&"."!==t&&".."!==t,Ut=/^\?+([^+@!?\*\[\(]*)?$/,Vt=([t,e=""])=>{const n=Zt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Bt=([t,e=""])=>{const n=Ht([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Ft=([t,e=""])=>{const n=Ht([t]);return e?t=>n(t)&&t.endsWith(e):n},Gt=([t,e=""])=>{const n=Zt([t]);return e?t=>n(t)&&t.endsWith(e):n},Zt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},Ht=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},qt="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";Et.sep="win32"===qt?"\\":"/";var Jt=Symbol("globstar **");Et.GLOBSTAR=Jt,Et.filter=(t,e={})=>n=>Et(n,t,e);var Yt=(t,e={})=>Object.assign({},t,e);Et.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return Et;const e=Et;return Object.assign(((n,s,i={})=>e(n,s,Yt(t,i))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,Yt(t,n))}static defaults(n){return e.defaults(Yt(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n,s={}){super(e,n,Yt(t,s))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Yt(t,s))}},unescape:(n,s={})=>e.unescape(n,Yt(t,s)),escape:(n,s={})=>e.escape(n,Yt(t,s)),filter:(n,s={})=>e.filter(n,Yt(t,s)),defaults:n=>e.defaults(Yt(t,n)),makeRe:(n,s={})=>e.makeRe(n,Yt(t,s)),braceExpand:(n,s={})=>e.braceExpand(n,Yt(t,s)),match:(n,s,i={})=>e.match(n,s,Yt(t,i)),sep:e.sep,GLOBSTAR:Jt})};var Kt=(t,e={})=>(ut(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,ft.default)(t));Et.braceExpand=Kt,Et.makeRe=(t,e={})=>new Xt(t,e).makeRe(),Et.match=(t,e,n={})=>{const s=new Xt(e,n);return t=t.filter((t=>s.match(t))),s.options.nonull&&!t.length&&t.push(e),t};var Qt=/[?*]|[+@!]\(.*?\)|\[|\]/,Xt=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){ut(t),this.options=e=e||{},this.pattern=t,this.platform=e.platform||qt,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((t=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&Qt.test(t[2])||Qt.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,s),this.set=s.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const s=t[n];1===n&&""===s&&""===t[0]||"."!==s&&""!==s||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const s=t[n-1];s&&"."!==s&&".."!==s&&"**"!==s&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let s=-1;for(;-1!==(s=n.indexOf("**",s+1));){let i=s;for(;"**"===n[i+1];)i++;i>s&&n.splice(s+1,i-s);const r=n[s+2],o=n[s+3];if(".."!==n[s+1])continue;if(!r||"."===r||".."===r||!o||"."===o||".."===o)continue;e=!0,n.splice(s,1);const l=n.slice(0);l[s]="**",t.push(l),s--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const s=n[t];1===t&&""===s&&""===n[0]||"."!==s&&""!==s||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let i=0;for(;-1!==(i=n.indexOf("..",i+1));){const t=n[i-1];t&&"."!==t&&".."!==t&&"**"!==t&&(e=!0,n.splice(i-1,2,...1===i&&"**"===n[i+1]?["."]:[]),0===n.length&&n.push(""),i-=2)}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const s=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);s&&(t[e]=s,t[n]=[])}return t.filter((t=>t.length))}partsMatch(t,e,n=!1){let s=0,i=0,r=[],o="";for(;s<t.length&&i<e.length;)if(t[s]===e[i])r.push("b"===o?e[i]:t[s]),s++,i++;else if(n&&"**"===t[s]&&e[i]===t[s+1])r.push(t[s]),s++;else if(n&&"**"===e[i]&&t[s]===e[i+1])r.push(e[i]),i++;else if("*"!==t[s]||!e[i]||!this.options.dot&&e[i].startsWith(".")||"**"===e[i]){if("*"!==e[i]||!t[s]||!this.options.dot&&t[s].startsWith(".")||"**"===t[s])return!1;if("a"===o)return!1;o="b",r.push(e[i]),s++,i++}else{if("b"===o)return!1;o="a",r.push(t[s]),s++,i++}return t.length===e.length&&r}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let s=0;s<t.length&&"!"===t.charAt(s);s++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const s=this.options;if(this.isWindows){const n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),s=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),i="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),r=s?3:n?0:void 0,o=!i&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:i?0:void 0;if("number"==typeof r&&"number"==typeof o){const[n,s]=[t[r],e[o]];n.toLowerCase()===s.toLowerCase()&&(e[o]=n,o>r?e=e.slice(o):r>o&&(t=t.slice(r)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var r=0,o=0,l=t.length,c=e.length;r<l&&o<c;r++,o++){this.debug("matchOne loop");var f=e[o],u=t[r];if(this.debug(e,f,u),!1===f)return!1;if(f===Jt){this.debug("GLOBSTAR",[e,f,u]);var h=r,a=o+1;if(a===c){for(this.debug("** at the end");r<l;r++)if("."===t[r]||".."===t[r]||!s.dot&&"."===t[r].charAt(0))return!1;return!0}for(;h<l;){var p=t[h];if(this.debug("\nglobstar while",t,h,e,a,p),this.matchOne(t.slice(h),e.slice(a),n))return this.debug("globstar found match!",h,l,p),!0;if("."===p||".."===p||!s.dot&&"."===p.charAt(0)){this.debug("dot detected!",t,h,e,a);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!n||(this.debug("\n>>> no match, partial?",t,h,e,a),h!==l))}let i;if("string"==typeof f?(i=u===f,this.debug("string match",f,u,i)):(i=f.test(u),this.debug("pattern match",f,u,i)),!i)return!1}if(r===l&&o===c)return!0;if(r===l)return n;if(o===c)return r===l-1&&""===t[r];throw new Error("wtf?")}braceExpand(){return Kt(this.pattern,this.options)}parse(t){ut(t);const e=this.options;if("**"===t)return Jt;if(""===t)return"";let n,s=null;(n=t.match(_t))?s=e.dot?Dt:Tt:(n=t.match(kt))?s=(e.nocase?e.dot?Rt:Wt:e.dot?Pt:Nt)(n[1]):(n=t.match(Ut))?s=(e.nocase?e.dot?Bt:Vt:e.dot?Ft:Gt)(n):(n=t.match(At))?s=e.dot?It:Lt:(n=t.match(zt))&&(s=Ct);const i=xt.fromGlob(t,this.options).toMMPattern();return s&&"object"==typeof i&&Reflect.defineProperty(i,"test",{value:s}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(e.nocase?["i"]:[]);let i=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))s.add(e);return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===Jt?Jt:t._src}));return e.forEach(((t,s)=>{const i=e[s+1],r=e[s-1];t===Jt&&r!==Jt&&(void 0===r?void 0!==i&&i!==Jt?e[s+1]="(?:\\/|"+n+"\\/)?"+i:e[s]=n:void 0===i?e[s-1]=r+"(?:\\/|"+n+")?":i!==Jt&&(e[s-1]=r+"(?:\\/|\\/"+n+"\\/)"+i,e[s+1]=Jt))})),e.filter((t=>t!==Jt)).join("/")})).join("|");const[r,o]=t.length>1?["(?:",")"]:["",""];i="^"+r+i+o+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...s].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const i=this.set;this.debug(this.pattern,"set",i);let r=s[s.length-1];if(!r)for(let t=s.length-2;!r&&t>=0;t--)r=s[t];for(let t=0;t<i.length;t++){const o=i[t];let l=s;if(n.matchBase&&1===o.length&&(l=[r]),this.matchOne(l,o,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return Et.defaults(t).Minimatch}};Et.AST=xt,Et.Minimatch=Xt,Et.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),Et.unescape=$t;var te=class t{static fromLocalValue(e){const n=e[z],s=C in e?e[C]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((e=>t.fromLocalValue(e)));case"date":return new Date(s);case"map":const e=new Map;for(const[n,i]of s){const s="object"==typeof n&&null!==n?t.fromLocalValue(n):n,r=t.fromLocalValue(i);e.set(s,r)}return e;case"object":const i={};for(const[e,n]of s)i[e]=t.fromLocalValue(n);return i;case"regexp":const{pattern:r,flags:o}=s;return new RegExp(r,o);case"set":const l=new Set;for(const e of s)l.add(t.fromLocalValue(e));return l;case"symbol":return Symbol(s);default:throw new Error(`Unsupported type: ${n}`)}}static fromLocalValueArray(e){return e.map((e=>t.fromLocalValue(e)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(z))return!1;const e=t[z];return!!Object.values({...L,...I}).includes(e)&&("null"===e||"undefined"===e||t.hasOwnProperty(C))}};((t,e)=>{for(var n in e)m(t,n,{get:e[n],enumerable:!0})})({},{err:()=>ne,map:()=>se,ok:()=>ee,unwrap:()=>re,unwrapErr:()=>oe});var ee=t=>({isOk:!0,isErr:!1,value:t}),ne=t=>({isOk:!1,isErr:!0,value:t});function se(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>ee(t))):ee(n)}if(t.isErr)return ne(t.value);throw"should never get here"}var ie,re=t=>{if(t.isOk)return t.value;throw t.value},oe=t=>{if(t.isErr)return t.value;throw t.value};function le(){const t=this.attachShadow({mode:"open"});void 0===ie&&(ie=null),ie&&(K?t.adoptedStyleSheets.push(ie):t.adoptedStyleSheets=[...t.adoptedStyleSheets,ie])}var ce=(t,e,n,s)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const i=document.createTextNode("");if(i["s-nr"]=t,!e["s-cr"]||!e["s-cr"].parentNode)return;const r=e["s-cr"].parentNode,o=fe(r,"appendChild");if(void 0!==s){i["s-oo"]=s;const t=fe(r,"childNodes"),e=[i];t.forEach((t=>{t["s-nr"]&&e.push(t)})),e.sort(((t,e)=>!t["s-oo"]||t["s-oo"]<(e["s-oo"]||0)?-1:!e["s-oo"]||e["s-oo"]<t["s-oo"]?1:0)),e.forEach((t=>o.call(r,t)))}else o.call(r,i);t["s-ol"]=i,t["s-sh"]=e["s-hn"]};function fe(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var ue=new WeakMap,he=(t,e,n)=>{let s=B.get(t);Y&&n?(s=s||new CSSStyleSheet,"string"==typeof s?s=e:s.replaceSync(e)):s=e,B.set(t,s)},ae=(t,e)=>{var n,s,i;const r=pe(e),o=B.get(r);if(!H.document)return r;if(t=11===t.nodeType?t:H.document,o)if("string"==typeof o){let i,l=ue.get(t=t.head||t);l||ue.set(t,l=new Set);const c=t.querySelector(`[${G}="${r}"]`);if(c)c.innerHTML=o;else if(!l.has(r)){i=H.document.createElement("style"),i.innerHTML=o;const c=null!=(n=J.h)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=H.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=c&&i.setAttribute("nonce",c),!(1&e.l))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(i,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(Y){const e=new(null!=(s=t.defaultView)?s:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(o),K?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=o+e.innerHTML:t.prepend(i)}else t.append(i);1&e.l&&t.insertBefore(i,null),4&e.l&&(i.innerHTML+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),l&&l.add(r)}}else{let e=ue.get(t);if(e||ue.set(t,e=new Set),!e.has(r)){const n=null!=(i=t.defaultView)?i:t.ownerDocument.defaultView;let s;if(o.constructor===n.CSSStyleSheet)s=o;else{s=new n.CSSStyleSheet;for(let t=0;t<o.cssRules.length;t++)s.insertRule(o.cssRules[t].cssText,t)}K?t.adoptedStyleSheets.push(s):t.adoptedStyleSheets=[...t.adoptedStyleSheets,s],e.add(r)}}return r},pe=t=>"sc-"+t.p,de=(t,e,...n)=>{let s=null,i=null,r=!1,o=!1;const l=[],c=e=>{for(let n=0;n<e.length;n++)s=e[n],Array.isArray(s)?c(s):null!=s&&"boolean"!=typeof s&&((r="function"!=typeof t&&!ct(s))&&(s=String(s)),r&&o?l[l.length-1].$+=s:l.push(r?$e(null,s):s),o=r)};if(c(n),e){e.key&&(i=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=$e(t,null);return f.v=e,l.length>0&&(f.m=l),f.O=i,f},$e=(t,e)=>({l:0,j:t,$:e,S:null,m:null,v:null,O:null}),ve={},we=(t,e,n,s,i,r,o,l=[])=>{let c,f,u,h;if(1===r.nodeType){if(c=r.getAttribute(Z),c&&(f=c.split("."),f[0]===o||"0"===f[0])){u=be({l:0,M:f[0],k:f[1],N:f[2],P:f[3],j:r.tagName.toLowerCase(),S:r,v:{class:r.className||""}}),e.push(u),r.removeAttribute(Z),t.m||(t.m=[]);const i=u.S.getAttribute("s-sn");"string"==typeof i&&("slot-fb"===u.j&&me(i,f[2],u,r,t,e,n,s,l),u.S["s-sn"]=i,u.S.removeAttribute("s-sn")),void 0!==u.P&&(t.m[u.P]=u),t=u,s&&"0"===u.N&&(s[u.P]=u.S)}if(r.shadowRoot)for(h=r.shadowRoot.childNodes.length-1;h>=0;h--)we(t,e,n,s,i,r.shadowRoot.childNodes[h],o,l);const a=r.__childNodes||r.childNodes;for(h=a.length-1;h>=0;h--)we(t,e,n,s,i,a[h],o,l)}else if(8===r.nodeType)f=r.nodeValue.split("."),(f[1]===o||"0"===f[1])&&(c=f[0],u=be({M:f[1],k:f[2],N:f[3],P:f[4]||"0",S:r,v:null,m:null,O:null,W:null,j:null,$:null}),"t"===c?(u.S=Oe(r,3),u.S&&3===u.S.nodeType&&(u.$=u.S.textContent,e.push(u),r.remove(),o===u.M&&(t.m||(t.m=[]),t.m[u.P]=u),s&&"0"===u.N&&(s[u.P]=u.S))):"c"===c?(u.S=Oe(r,8),u.S&&8===u.S.nodeType&&(e.push(u),r.remove())):u.M===o&&("s"===c?me(r["s-sn"]=f[5]||"",f[2],u,r,t,e,n,s,l):"r"===c&&s&&r.remove()));else if(t&&"style"===t.j){const e=$e(null,r.textContent);e.S=r,e.P="0",t.m=[e]}return t},ge=(t,e)=>{if(1===t.nodeType){const n=t[F]||t.getAttribute(F);n&&e.set(n,t);let s=0;if(t.shadowRoot)for(;s<t.shadowRoot.childNodes.length;s++)ge(t.shadowRoot.childNodes[s],e);const i=t.__childNodes||t.childNodes;for(s=0;s<i.length;s++)ge(i[s],e)}else if(8===t.nodeType){const n=t.nodeValue.split(".");"o"===n[0]&&(e.set(n[1]+"."+n[2],t),t.nodeValue="",t["s-en"]=n[3])}},be=t=>({l:0,M:null,k:null,N:null,P:"0",S:null,v:null,m:null,O:null,W:null,j:null,$:null,...t});function me(t,e,n,s,i,r,o,l,c){s["s-sr"]=!0,n.W=t||null,n.j="slot";const f=(null==i?void 0:i.S)?i.S["s-id"]||i.S.getAttribute("s-id"):"";if(l&&H.document){const r=n.S=H.document.createElement(n.j);n.W&&n.S.setAttribute("name",t),i.S.shadowRoot&&f&&f!==n.M?fe(i.S,"insertBefore")(r,fe(i.S,"children")[0]):fe(fe(s,"parentNode"),"insertBefore")(r,s),ye(c,e,t,s,n.M),s.remove(),"0"===n.N&&(l[n.P]=n.S)}else{const r=n.S,o=f&&f!==n.M&&i.S.shadowRoot;ye(c,e,t,s,o?f:n.M),function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],s=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const i=this["s-cr"].parentElement;return(i.__childNodes?i.childNodes:(t=>{const e=[];for(let n=0;n<t.length;n++){const s=t[n]["s-nr"]||void 0;s&&s.isConnected&&e.push(s)}return e})(i.childNodes)).forEach((t=>{s===(t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0)(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(s),o&&i.S.insertBefore(r,i.S.children[0])}r.push(n),o.push(n),i.m||(i.m=[]),i.m[n.P]=n}var ye=(t,e,n,s,i)=>{var r,o;let l=s.nextSibling;if(t[e]=t[e]||[],l&&!(null==(r=l.nodeValue)?void 0:r.startsWith("s.")))do{!l||(l.getAttribute&&l.getAttribute("slot")||l["s-sn"])!==n&&(""!==n||l["s-sn"]||l.getAttribute&&l.getAttribute("slot")||8!==l.nodeType&&3!==l.nodeType)||(l["s-sn"]=n,t[e].push({slot:s,node:l,hostId:i})),l=null==l?void 0:l.nextSibling}while(l&&!(null==(o=l.nodeValue)?void 0:o.startsWith("s.")))},Oe=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n},je=t=>{const e=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};je("::slotted"),je(":host"),je(":host-context");var Se,Me=(t,e)=>{return"string"==typeof t&&t.startsWith(_)?t="string"==typeof(n=t)&&n.startsWith(_)?te.fromLocalValue(JSON.parse(atob(n.slice(11)))):n:null==t||ct(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?String(t):t;var n},xe=(t,e)=>{const n=t;return{emit:t=>Ee(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Ee=(t,e,n)=>{const s=J.ce(e,n);return t.dispatchEvent(s),s},ke=(t,e,n,s,i,r,o)=>{if(n===s)return;let l=U(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,i=Pe(n);let r=Pe(s);if((t["s-si"]||t["s-sc"])&&o){const n=t["s-sc"]||t["s-si"];r.push(n),i.forEach((t=>{t.startsWith(n)&&r.push(t)})),r=[...new Set(r)].filter((t=>t)),e.add(...r)}else e.remove(...i.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!i.includes(t))))}else if("key"===e);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){const o=ct(s);if((l||o&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const i=null==s?"":s;"list"===e?l=!1:null!=n&&t[e]==i||("function"==typeof t.__lookupSetter__(e)?t[e]=i:t.setAttribute(e,i))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!l||4&r||i)&&!o&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}else if(e="-"===e[2]?e.slice(3):U(H,c)?c.slice(2):c[2]+e.slice(3),n||s){const i=e.endsWith(We);e=e.replace(Re,""),n&&J.rel(t,e,n,i),s&&J.ael(t,e,s,i)}},Ne=/\s/,Pe=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(Ne):[]),We="Capture",Re=new RegExp(We+"$"),Ae=(t,e,n,s)=>{const i=11===e.S.nodeType&&e.S.host?e.S.host:e.S,r=t&&t.v||{},o=e.v||{};for(const t of Le(Object.keys(r)))t in o||ke(i,t,r[t],void 0,n,e.l,s);for(const t of Le(Object.keys(o)))ke(i,t,r[t],o[t],n,e.l,s)};function Le(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Ie=!1,ze=(t,e,n)=>{const s=e.m[n];let i,r,o=0;if(null!==s.$)i=s.S=H.document.createTextNode(s.$);else{if(Ie||(Ie="svg"===s.j),!H.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(i=s.S=H.document.createElementNS(Ie?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.j),Ie&&"foreignObject"===s.j&&(Ie=!1),Ae(null,s,Ie),s.m){const e="template"===s.j?i.content:i;for(o=0;o<s.m.length;++o)r=ze(t,s,o),r&&e.appendChild(r)}"svg"===s.j?Ie=!1:"foreignObject"===i.tagName&&(Ie=!0)}return i["s-hn"]=Se,i},Ce=(t,e,n,s,i,r)=>{let o,l=t;for(l.shadowRoot&&l.tagName===Se&&(l=l.shadowRoot),"template"===n.j&&(l=l.content);i<=r;++i)s[i]&&(o=ze(null,n,i),o&&(s[i].S=o,Ue(l,o,e)))},_e=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.S;t&&t.remove()}}},Te=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.O&&e.O&&(t.O=e.O),!0):t.O===e.O),De=(t,e,n=!1)=>{const s=e.S=t.S,i=t.m,r=e.m,o=e.j,l=e.$;null===l?(Ae(t,e,Ie="svg"===o||"foreignObject"!==o&&Ie,n),null!==i&&null!==r?((t,e,n,s,i=!1)=>{let r,o,l=0,c=0,f=0,u=0,h=e.length-1,a=e[0],p=e[h],d=s.length-1,$=s[0],v=s[d];const w="template"===n.j?t.content:t;for(;l<=h&&c<=d;)if(null==a)a=e[++l];else if(null==p)p=e[--h];else if(null==$)$=s[++c];else if(null==v)v=s[--d];else if(Te(a,$,i))De(a,$,i),a=e[++l],$=s[++c];else if(Te(p,v,i))De(p,v,i),p=e[--h],v=s[--d];else if(Te(a,v,i))De(a,v,i),Ue(w,a.S,p.S.nextSibling),a=e[++l],v=s[--d];else if(Te(p,$,i))De(p,$,i),Ue(w,p.S,a.S),p=e[--h],$=s[++c];else{for(f=-1,u=l;u<=h;++u)if(e[u]&&null!==e[u].O&&e[u].O===$.O){f=u;break}f>=0?(o=e[f],o.j!==$.j?r=ze(e&&e[c],n,f):(De(o,$,i),e[f]=void 0,r=o.S),$=s[++c]):(r=ze(e&&e[c],n,c),$=s[++c]),r&&Ue(a.S.parentNode,r,a.S)}l>h?Ce(t,null==s[d+1]?null:s[d+1].S,n,s,c,d):c>d&&_e(e,l,h)})(s,i,e,r,n):null!==r?(null!==t.$&&(s.textContent=""),Ce(s,null,e,r,0,r.length-1)):n||null===i?n&&null!==i&&null===r&&(e.m=i):_e(i,0,i.length-1),Ie&&"svg"===o&&(Ie=!1)):t.$!==l&&(s.data=l)},Ue=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Ve=(t,e,n=!1)=>{const s=t.$hostElement$,i=t.R||$e(null,null);var r;const o=(r=e)&&r.j===ve?e:de(null,null,e);if(Se=s.tagName,n&&o.v)for(const t of Object.keys(o.v))s.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(o.v[t]=s[t]);o.j=null,o.l|=4,t.R=o,o.S=i.S=s.shadowRoot||s,De(i,o,n)},Be=(t,e)=>{if(e&&!t.A&&e["s-p"]){const n=e["s-p"].push(new Promise((s=>t.A=()=>{e["s-p"].splice(n-1,1),s()})))}},Fe=(t,e)=>{if(t.l|=16,4&t.l)return void(t.l|=512);Be(t,t.L);const n=()=>Ge(t,e);if(!e)return rt(n);queueMicrotask((()=>{n()}))},Ge=(t,e)=>{const n=t.$hostElement$,s=n;if(!s)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let i;return i=Qe(s,e?"componentWillLoad":"componentWillUpdate",void 0,n),i=Ze(i,(()=>Qe(s,"componentWillRender",void 0,n))),Ze(i,(()=>qe(t,s,e)))},Ze=(t,e)=>He(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),He=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,qe=async(t,e,n)=>{var s;const i=t.$hostElement$,r=i["s-rc"];n&&(t=>{const e=t.i,n=t.$hostElement$,s=e.l,i=ae(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&s&&(n["s-sc"]=i,n.classList.add(i+"-h"))})(t);Je(t,e,i,n),r&&(r.map((t=>t())),i["s-rc"]=void 0);{const e=null!=(s=i["s-p"])?s:[],n=()=>Ye(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},Je=(t,e,n,s)=>{try{e=e.render(),t.l&=-17,t.l|=2,Ve(t,e,s)}catch(e){V(e,t.$hostElement$)}return null},Ye=t=>{const e=t.$hostElement$,n=e,s=t.L;Qe(n,"componentDidRender",void 0,e),64&t.l?Qe(n,"componentDidUpdate",void 0,e):(t.l|=64,Xe(e),Qe(n,"componentDidLoad",void 0,e),t.I(e),s||Ke()),t.A&&(t.A(),t.A=void 0),512&t.l&&it((()=>Fe(t,!1))),t.l&=-517},Ke=()=>{var t;it((()=>Ee(H,"appload",{detail:{namespace:"authhero-widget"}}))),(null==(t=J.C)?void 0:t.size)&&J.C.clear()},Qe=(t,e,n,s)=>{if(t&&t[e])try{return t[e](n)}catch(t){V(t,s)}},Xe=t=>t.classList.add("hydrated"),tn=(t,e,n,s)=>{const i=D(t);if(!i)return;const r=t,o=i.o.get(e),l=i.l,c=r;n=Me(n,s.t[e][0]);const f=Number.isNaN(o)&&Number.isNaN(n);if(n!==o&&!f){if(i.o.set(e,n),s._){const t=s._[e];t&&t.map((t=>{try{const[[s,r]]=Object.entries(t);(128&l||1&r)&&(c?c[s](n,o,e):i.T.push((()=>{i.D[s](n,o,e)})))}catch(t){V(t,r)}}))}if(2==(18&l)){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(n,o,e))return;Fe(i,!1)}}},en=(t,e)=>{var n,s;const i=t.prototype;{t.watchers&&!e._&&(e._=t.watchers),t.deserializers&&!e.U&&(e.U=t.deserializers),t.serializers&&!e.V&&(e.V=t.serializers);const r=Object.entries(null!=(n=e.t)?n:{});r.map((([t,[n]])=>{if(31&n||32&n){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),Object.defineProperty(i,t,{get(){return s?s.apply(this):(e=t,D(this).o.get(e));var e},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=D(this);if(i){if(r)return void 0===(32&n?this[t]:i.$hostElement$[t])&&i.o.get(t)&&(s=i.o.get(t)),r.apply(this,[Me(s,n)]),void tn(this,t,s=32&n?this[t]:i.$hostElement$[t],e);tn(this,t,s,e)}}})}}));{const n=new Map;i.attributeChangedCallback=function(t,s,o){J.jmp((()=>{var l;const c=n.get(t),f=D(this);if(this.hasOwnProperty(c),i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==o)return;if(null==c){const n=null==f?void 0:f.l;if(f&&n&&!(8&n)&&o!==s){const i=this,r=null==(l=e._)?void 0:l[t];null==r||r.forEach((e=>{const[[r,l]]=Object.entries(e);null!=i[r]&&(128&n||1&l)&&i[r].call(i,o,s,t)}))}return}const u=r.find((([t])=>t===c));u&&4&u[1][0]&&(o=null!==o&&"false"!==o);const h=Object.getOwnPropertyDescriptor(i,c);o==this[c]||h.get&&!h.set||(this[c]=o)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e._)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([t,e])=>{const s=e[1]||t;return n.set(s,t),s}))]))}}return t},nn=(t,e)=>{const n={l:e[0],p:e[1]};n.t=e[2],n._=t._,n.U=t.U,n.V=t.V,(()=>{if(!H.document)return;const t=H.document.querySelectorAll(`[${G}]`);let e=0;for(;e<t.length;e++)he(t[e].getAttribute(G),t[e].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),!0)})();const s=t.prototype.connectedCallback,i=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const n={l:0,$hostElement$:t,i:e,o:new Map,B:new Map};n.F=new Promise((t=>n.I=t)),t["s-p"]=[],t["s-rc"]=[];const s=n;t.__stencil__getHostRef=()=>s,512&e.l&&T(t,n)})(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!D(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&J.l)){const e=D(t);if(!e)return;const n=e.i,s=()=>{};if(1&e.l)(null==e?void 0:e.D)||(null==e?void 0:e.F)&&e.F.then((()=>{}));else{let s;if(e.l|=1,s=t.getAttribute(F),s){if(1&n.l){const e=ae(t.shadowRoot,n);t.classList.remove(e+"-h",e+"-s")}((t,e,n,s)=>{var i,r,o,l;const c=t.shadowRoot,f=[],u=[],h=c?[]:null,a=$e(e,null);a.S=t,!H.document||J.C&&J.C.size||ge(H.document.body,J.C=new Map),t[F]=n,t.removeAttribute(F),s.R=we(a,f,[],h,t,t,n,u);let p=0;const d=f.length;let $;for(;p<d;p++){$=f[p];const n=$.M+"."+$.k,s=J.C.get(n),r=$.S;if(c){if((null==(i=$.j)?void 0:i.toString().includes("-"))&&"slot-fb"!==$.j&&!$.S.shadowRoot){const e=D($.S);if(e){const n=pe(e.i),s=H.document.querySelector(`style[sty-id="${n}"]`);s&&t.shadowRoot.append(s.cloneNode(!0))}}}else r["s-hn"]=e.toUpperCase(),"slot"===$.j&&(r["s-cr"]=t["s-cr"]);"slot"===$.j&&($.W=$.S["s-sn"]||$.S.name||null,$.m?($.l|=2,$.S.childNodes.length||$.m.forEach((t=>{$.S.appendChild(t.S)}))):$.l|=1),s&&s.isConnected&&(s.parentElement.shadowRoot&&""===s["s-en"]&&s.parentNode.insertBefore(r,s.nextSibling),s.parentNode.removeChild(s),c||(r["s-oo"]=parseInt($.k))),s&&!s["s-id"]&&J.C.delete(n)}const v=[],w=u.length;let g,b,m,y,O=0,j=0;for(;O<w;O++)if(g=u[O],g&&g.length)for(m=g.length,b=0;b<m;b++){if(y=g[b],v[y.hostId]||(v[y.hostId]=J.C.get(y.hostId)),!v[y.hostId])continue;const t=v[y.hostId];t.shadowRoot&&y.node.parentElement!==t&&t.insertBefore(y.node,null==(o=null==(r=g[b-1])?void 0:r.node)?void 0:o.nextSibling),t.shadowRoot&&c||(y.slot["s-cr"]||(y.slot["s-cr"]=t["s-cr"],y.slot["s-cr"]=!y.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),ce(y.node,y.slot,0,y.node["s-oo"]||j),(null==(l=y.node.parentElement)?void 0:l.shadowRoot)&&y.node.getAttribute&&y.node.getAttribute("slot")&&y.node.removeAttribute("slot")),j=(y.node["s-oo"]||j)+1}if(c){let e=0;const n=h.length;if(n){for(;e<n;e++){const t=h[e];t&&c.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}s.$hostElement$=t})(t,n.p,s,e)}{let n=t;for(;n=n.parentNode||n.host;)if(1===n.nodeType&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){Be(e,e.L=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let s;if(!(32&e.l)&&(e.l|=32,s=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128)),s&&s.style)){let t;"string"==typeof s.style&&(t=s.style);const e=pe(n);if(!B.has(e)){const s=()=>{};he(e,t,!!(1&n.l)),s()}}const i=e.L,r=()=>Fe(e,!0);i&&i["s-rc"]?i["s-rc"].push(r):r()})(t,e,n)}s()}})(this),s&&s.call(this)},disconnectedCallback(){(async t=>{1&J.l||D(t),ue.has(t)&&ue.delete(t),t.shadowRoot&&ue.has(t.shadowRoot)&&ue.delete(t.shadowRoot)})(this),i&&i.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${n.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else le.call(this,n)}}),t.is=n.p,en(t,n)},sn=t=>J.h=t,rn=t=>Object.assign(J,t);function on(t,e){Ve({$hostElement$:e},t)}function ln(t){return t}export{q as H,sn as a,rn as b,xe as c,ot as g,de as h,nn as p,on as r,lt as s,ln as t}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-5hZ8Vbm9.js';
|
|
2
2
|
|
|
3
|
-
const authheroNodeCss = () => `:host{display:block}.input-wrapper{display:flex;flex-direction:column;position:relative;margin-bottom:16px}.input-container{position:relative;width:100%}.input-label{position:absolute;left:16px;top:50%;transform:translateY(-50%);font-size:16px;font-weight:var(--ah-font-weight-label, 400);color:var(--ah-color-text-muted, #65676e);pointer-events:none;transition:all 0.15s ease-out;background-color:transparent;padding:0;z-index:1}.input-label.floating,.input-field:focus+.input-label,.input-field:not(:placeholder-shown)+.input-label{top:-8px;transform:translateY(0);font-size:12px;background-color:var(--ah-color-bg, #ffffff);padding:0 4px;left:12px;color:var(--ah-color-text-muted, #65676e)}.input-field:focus+.input-label{color:var(--ah-color-primary, #635dff)}.required{color:var(--ah-color-error, #d03c38);margin-left:2px}.input-field{width:100%;padding:16px;font-size:16px;font-family:inherit;color:var(--ah-color-text, #1e212a);background-color:var(--ah-color-input-bg, #ffffff);border:1px solid var(--ah-color-border, #c9cace);border-radius:var(--ah-input-radius, 3px);outline:none;transition:border-color 0.15s ease-out
|
|
3
|
+
const authheroNodeCss = () => `:host{display:block}.input-wrapper{display:flex;flex-direction:column;position:relative;margin-bottom:16px}.input-container{position:relative;width:100%}.input-label{position:absolute;left:16px;top:50%;transform:translateY(-50%);font-size:16px;font-weight:var(--ah-font-weight-label, 400);color:var(--ah-color-text-muted, #65676e);pointer-events:none;transition:all 0.15s ease-out;background-color:transparent;padding:0;z-index:1}.input-label.floating,.input-field:focus+.input-label,.input-field:not(:placeholder-shown)+.input-label{top:-8px;transform:translateY(0);font-size:12px;background-color:var(--ah-color-bg, #ffffff);padding:0 4px;left:12px;color:var(--ah-color-text-muted, #65676e)}.input-field:focus+.input-label{color:var(--ah-color-primary, #635dff)}.required{color:var(--ah-color-error, #d03c38);margin-left:2px}.input-field{width:100%;padding:16px;font-size:16px;font-family:inherit;color:var(--ah-color-text, #1e212a);background-color:var(--ah-color-input-bg, #ffffff);border:1px solid var(--ah-color-border, #c9cace);border-radius:var(--ah-input-radius, 3px);outline:none;transition:border-color 0.15s ease-out,\\n box-shadow 0.15s ease-out;box-sizing:border-box}.input-field::placeholder{color:transparent}.input-field:hover{border-color:var(--ah-color-border-hover, #65676e)}.input-field:focus{border-color:var(--ah-color-primary, #635dff);box-shadow:inset 0 0 0 1px var(--ah-color-primary, #635dff)}.input-field.has-error{border-color:var(--ah-color-error, #d03c38)}.input-field.has-error:focus{box-shadow:inset 0 0 0 1px var(--ah-color-error, #d03c38)}.input-field:disabled{background-color:var(--ah-color-bg-disabled, #f5f5f5);border-color:var(--ah-color-border-disabled, #e0e1e3);cursor:not-allowed;opacity:0.7}.password-container{position:relative;display:flex;align-items:center}.password-container .input-field{padding-right:48px}.password-toggle{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;color:var(--ah-color-text-muted, #65676e);transition:color 0.15s ease}.password-toggle:hover{color:var(--ah-color-text, #1e212a)}.password-toggle svg{width:20px;height:20px}.error-text{font-size:12px;color:var(--ah-color-error, #d03c38);margin-top:4px;line-height:1.4}.helper-text{font-size:12px;color:var(--ah-color-text-muted, #65676e);margin-top:4px;line-height:1.4}.field-link{display:block;text-align:left;margin-top:8px;margin-bottom:16px}.field-link a{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;font-weight:var(--ah-font-weight-link, 400)}.field-link a:hover{text-decoration:underline}.checkbox-wrapper{display:flex;align-items:flex-start;gap:10px;cursor:pointer;margin-bottom:16px}.checkbox-wrapper input[type="checkbox"]{width:18px;height:18px;margin:0;accent-color:var(--ah-color-primary, #635dff);cursor:pointer;flex-shrink:0}.checkbox-label{font-size:14px;color:var(--ah-color-text, #1e212a);line-height:1.5}.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:14px 20px;font-size:16px;font-weight:var(--ah-font-weight-btn, 400);font-family:inherit;line-height:1.25;text-align:center;text-decoration:none;border:none;border-radius:var(--ah-btn-radius, 3px);cursor:pointer;transition:background-color 0.15s ease,\\n border-color 0.15s ease,\\n transform 0.1s ease;box-sizing:border-box}.btn:disabled{opacity:0.6;cursor:not-allowed}.btn:not(:disabled):active{transform:scale(0.98)}.btn:focus-visible{outline:2px solid var(--ah-color-primary, #635dff);outline-offset:2px}.btn-primary{background-color:var(--ah-color-primary, #635dff);color:var(--ah-color-text-on-primary, #ffffff);margin-top:12px}.btn-primary:not(:disabled):hover{filter:brightness(0.85)}.btn-secondary{background-color:var(--ah-color-bg, #ffffff);color:var(--ah-color-text, #1e212a);border:1px solid var(--ah-color-border, #c9cace)}.btn-secondary:not(:disabled):hover{background-color:var(--ah-color-bg-hover, #f5f5f5);border-color:var(--ah-color-border-hover, #65676e)}.btn-link{background:none;border:none;color:var(--ah-color-link, #635dff);padding:8px 0;font-weight:var(--ah-font-weight-link, 400);text-decoration:none}.btn-link:hover{text-decoration:underline}.social-buttons{display:flex;flex-direction:column;gap:12px}.btn-social{display:flex;align-items:center;justify-content:center;gap:12px}.btn-social-content{display:flex;flex-direction:column;align-items:center;text-align:center}.btn-social-subtitle{font-size:12px;font-style:italic;opacity:0.8;margin-top:2px}.btn-social-subtitle:empty{display:none}.social-icon{width:20px;height:20px;flex-shrink:0}@media (max-width: 480px){.social-buttons:has(.btn-social:nth-child(3)){flex-direction:row;flex-wrap:nowrap;justify-content:stretch;gap:8px}.social-buttons:has(.btn-social:nth-child(3)) .btn-social{width:auto;min-width:0;padding:12px;flex:1 1 0}.social-buttons:has(.btn-social:nth-child(3)) .btn-social span{display:none}.social-buttons:has(.btn-social:nth-child(3)) .social-icon{width:24px;height:24px}}.btn-icon{width:20px;height:20px;flex-shrink:0}.btn-icon img{width:100%;height:100%;object-fit:contain}.text-title{font-size:20px;font-weight:400;color:var(--ah-color-text, #1e212a);margin:8px 0;line-height:1.3}.text-title.text-success{color:var(--ah-color-success, #13a769)}.text-description{font-size:14px;color:var(--ah-color-text-muted, #65676e);margin:4px 0;line-height:1.5}.image{display:block;max-width:100%;height:auto;border-radius:4px}.image-centered{margin:0 auto 16px;width:52px;height:52px;object-fit:contain}.link{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;transition:color 0.15s ease}.link:hover{text-decoration:underline}.link:focus-visible{outline:2px solid var(--ah-color-link, #635dff);outline-offset:2px;border-radius:2px}.node-error{padding:12px 16px;background-color:var(--ah-color-error-bg, #ffeaea);color:var(--ah-color-error, #d03c38);border-left:3px solid var(--ah-color-error, #d03c38);border-radius:0;font-size:14px;margin-bottom:16px}.node-success{padding:12px 16px;background-color:var(--ah-color-success-bg, #e6f9f1);color:var(--ah-color-success, #13a769);border-left:3px solid var(--ah-color-success, #13a769);border-radius:0;font-size:14px;margin-bottom:16px}.divider{display:flex;align-items:center;text-align:center;margin:16px 0}.divider::before,.divider::after{content:"";flex:1;border-bottom:1px solid var(--ah-color-border-muted, #c9cace)}.divider-text{padding:0 10px;font-size:12px;font-weight:400;color:var(--ah-color-text-muted, #65676e);text-transform:uppercase;letter-spacing:0.5px}.rich-text{font-size:14px;line-height:1.5;color:var(--ah-color-text, #1e212a)}.rich-text a{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);transition:color 0.15s ease}.rich-text a:hover{text-decoration:underline}.rich-text .terms-text{margin-top:16px;text-align:center;font-size:12px;color:var(--ah-color-text-muted, #65676e)}.rich-text .terms-text a{font-size:12px}.rich-text .signup-link{margin-top:16px;text-align:center;font-size:14px;color:var(--ah-color-text, #1e212a)}`;
|
|
4
4
|
|
|
5
5
|
const AuthheroNode = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -37,6 +37,12 @@ const AuthheroNode = class {
|
|
|
37
37
|
const target = e.target;
|
|
38
38
|
this.fieldChange.emit({ id: this.component.id, value: target.value });
|
|
39
39
|
};
|
|
40
|
+
handleKeyDown = (e) => {
|
|
41
|
+
if (e.key === "Enter") {
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
this.buttonClick.emit({ id: "submit", type: "submit", value: "next" });
|
|
44
|
+
}
|
|
45
|
+
};
|
|
40
46
|
handleCheckbox = (e) => {
|
|
41
47
|
const target = e.target;
|
|
42
48
|
this.fieldChange.emit({
|
|
@@ -56,9 +62,9 @@ const AuthheroNode = class {
|
|
|
56
62
|
.replace(/^-|-$/g, ""); // Remove leading/trailing hyphens
|
|
57
63
|
}
|
|
58
64
|
handleButtonClick = (e, type, value) => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
// Always prevent default to avoid double submissions
|
|
66
|
+
// The parent widget handles the actual form submission
|
|
67
|
+
e.preventDefault();
|
|
62
68
|
this.buttonClick.emit({ id: this.component.id, type, value });
|
|
63
69
|
};
|
|
64
70
|
togglePasswordVisibility = () => {
|
|
@@ -154,42 +160,42 @@ const AuthheroNode = class {
|
|
|
154
160
|
if (multiline) {
|
|
155
161
|
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, this.renderLabel(component.label, inputId, component.required), h("textarea", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input textarea", name: component.id, placeholder: " ", required: component.required, disabled: this.disabled, maxLength: max_length, onInput: this.handleInput }, this.value ?? ""), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint)));
|
|
156
162
|
}
|
|
157
|
-
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, h("div", { class: "input-container" }, h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: component.sensitive ? "password" : "text", name: component.id, "data-input-name": component.id, value: this.value ?? "", placeholder: " ", required: component.required, disabled: this.disabled, maxLength: max_length, onInput: this.handleInput }), this.renderFloatingLabel(component.label, inputId, component.required, hasValue)), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint)));
|
|
163
|
+
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, h("div", { class: "input-container" }, h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: component.sensitive ? "password" : "text", name: component.id, "data-input-name": component.id, value: this.value ?? "", placeholder: " ", required: component.required, disabled: this.disabled, maxLength: max_length, onInput: this.handleInput, onKeyDown: this.handleKeyDown }), this.renderFloatingLabel(component.label, inputId, component.required, hasValue)), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint)));
|
|
158
164
|
}
|
|
159
165
|
renderEmailField(component) {
|
|
160
166
|
const inputId = `input-${component.id}`;
|
|
161
167
|
const errors = this.getErrors();
|
|
162
168
|
const hasValue = !!(this.value && this.value.length > 0);
|
|
163
|
-
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, h("div", { class: "input-container" }, h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: "email", name: component.id, "data-input-name": component.id, value: this.value ?? "", placeholder: " ", required: component.required, disabled: this.disabled, autocomplete: "email", onInput: this.handleInput }), this.renderFloatingLabel(component.label, inputId, component.required, hasValue)), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint)));
|
|
169
|
+
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, h("div", { class: "input-container" }, h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: "email", name: component.id, "data-input-name": component.id, value: this.value ?? "", placeholder: " ", required: component.required, disabled: this.disabled, autocomplete: "email", onInput: this.handleInput, onKeyDown: this.handleKeyDown }), this.renderFloatingLabel(component.label, inputId, component.required, hasValue)), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint)));
|
|
164
170
|
}
|
|
165
171
|
renderPasswordField(component) {
|
|
166
172
|
const inputId = `input-${component.id}`;
|
|
167
173
|
const errors = this.getErrors();
|
|
168
174
|
const hasValue = !!(this.value && this.value.length > 0);
|
|
169
175
|
const forgotPasswordLink = component.config?.forgot_password_link;
|
|
170
|
-
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, h("div", { class: "input-container password-container" }, h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: this.passwordVisible ? "text" : "password", name: component.id, "data-input-name": component.id, value: this.value ?? "", placeholder: " ", required: component.required, disabled: this.disabled, minLength: component.config?.min_length, autocomplete: "current-password", onInput: this.handleInput }), this.renderFloatingLabel(component.label, inputId, component.required, hasValue), h("button", { type: "button", class: "password-toggle", part: "password-toggle", onClick: this.togglePasswordVisibility, "aria-label": "Toggle password visibility", "aria-pressed": this.passwordVisible ? "true" : "false" }, this.renderPasswordToggle())), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint), forgotPasswordLink && (h("div", { class: "field-link", part: "field-link" }, h("a", { href: forgotPasswordLink, class: "link", part: "link" }, "Forgot password?")))));
|
|
176
|
+
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, h("div", { class: "input-container password-container" }, h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: this.passwordVisible ? "text" : "password", name: component.id, "data-input-name": component.id, value: this.value ?? "", placeholder: " ", required: component.required, disabled: this.disabled, minLength: component.config?.min_length, autocomplete: "current-password", onInput: this.handleInput, onKeyDown: this.handleKeyDown }), this.renderFloatingLabel(component.label, inputId, component.required, hasValue), h("button", { type: "button", class: "password-toggle", part: "password-toggle", onClick: this.togglePasswordVisibility, "aria-label": "Toggle password visibility", "aria-pressed": this.passwordVisible ? "true" : "false" }, this.renderPasswordToggle())), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint), forgotPasswordLink && (h("div", { class: "field-link", part: "field-link" }, h("a", { href: forgotPasswordLink, class: "link", part: "link" }, "Forgot password?")))));
|
|
171
177
|
}
|
|
172
178
|
renderNumberField(component) {
|
|
173
179
|
const inputId = `input-${component.id}`;
|
|
174
180
|
const errors = this.getErrors();
|
|
175
181
|
const { placeholder, min, max, step } = component.config ?? {};
|
|
176
|
-
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, this.renderLabel(component.label, inputId, component.required), h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: "number", name: component.id, value: this.value ?? "", placeholder: placeholder, required: component.required, disabled: this.disabled, min: min, max: max, step: step, onInput: this.handleInput }), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint)));
|
|
182
|
+
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, this.renderLabel(component.label, inputId, component.required), h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: "number", name: component.id, value: this.value ?? "", placeholder: placeholder, required: component.required, disabled: this.disabled, min: min, max: max, step: step, onInput: this.handleInput, onKeyDown: this.handleKeyDown }), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint)));
|
|
177
183
|
}
|
|
178
184
|
renderTelField(component) {
|
|
179
185
|
const inputId = `input-${component.id}`;
|
|
180
186
|
const errors = this.getErrors();
|
|
181
|
-
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, this.renderLabel(component.label, inputId, component.required), h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: "tel", name: component.id, value: this.value ?? "", placeholder: component.config?.placeholder, required: component.required, disabled: this.disabled, autocomplete: "tel", onInput: this.handleInput }), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint)));
|
|
187
|
+
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, this.renderLabel(component.label, inputId, component.required), h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: "tel", name: component.id, value: this.value ?? "", placeholder: component.config?.placeholder, required: component.required, disabled: this.disabled, autocomplete: "tel", onInput: this.handleInput, onKeyDown: this.handleKeyDown }), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint)));
|
|
182
188
|
}
|
|
183
189
|
renderUrlField(component) {
|
|
184
190
|
const inputId = `input-${component.id}`;
|
|
185
191
|
const errors = this.getErrors();
|
|
186
|
-
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, this.renderLabel(component.label, inputId, component.required), h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: "url", name: component.id, value: this.value ?? "", placeholder: component.config?.placeholder, required: component.required, disabled: this.disabled, onInput: this.handleInput }), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint)));
|
|
192
|
+
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, this.renderLabel(component.label, inputId, component.required), h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: "url", name: component.id, value: this.value ?? "", placeholder: component.config?.placeholder, required: component.required, disabled: this.disabled, onInput: this.handleInput, onKeyDown: this.handleKeyDown }), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint)));
|
|
187
193
|
}
|
|
188
194
|
renderDateField(component) {
|
|
189
195
|
const inputId = `input-${component.id}`;
|
|
190
196
|
const errors = this.getErrors();
|
|
191
197
|
const { min, max } = component.config ?? {};
|
|
192
|
-
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, this.renderLabel(component.label, inputId, component.required), h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: "date", name: component.id, value: this.value ?? "", required: component.required, disabled: this.disabled, min: min, max: max, onInput: this.handleInput }), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint)));
|
|
198
|
+
return (h("div", { class: "input-wrapper", part: "input-wrapper" }, this.renderLabel(component.label, inputId, component.required), h("input", { id: inputId, class: { "input-field": true, "has-error": errors.length > 0 }, part: "input", type: "date", name: component.id, value: this.value ?? "", required: component.required, disabled: this.disabled, min: min, max: max, onInput: this.handleInput, onKeyDown: this.handleKeyDown }), this.renderErrors(), errors.length === 0 && this.renderHint(component.hint)));
|
|
193
199
|
}
|
|
194
200
|
renderBooleanField(component) {
|
|
195
201
|
return (h("label", { class: "checkbox-wrapper", part: "checkbox-wrapper" }, h("input", { type: "checkbox", part: "checkbox", name: component.id, checked: this.value === "true" || component.config?.default_value === true, required: component.required, disabled: this.disabled, onChange: this.handleCheckbox }), h("span", { class: "checkbox-label", part: "checkbox-label" }, component.label)));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, g as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, g as getElement, h } from './index-5hZ8Vbm9.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AuthHero Widget - Branding Utilities
|
|
@@ -421,7 +421,7 @@ function escapeAttr(value) {
|
|
|
421
421
|
.replace(/>/g, ">");
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
-
const authheroWidgetCss = () => `:host{display:block;font-family:var(--ah-font-family, 'ulp-font', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, sans-serif);font-size:var(--ah-font-size-base, 14px);line-height:var(--ah-line-height-base, 1.5);color:var(--ah-color-text, #1e212a);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.widget-container{max-width:var(--ah-widget-max-width, 400px);width:100%;margin:0 auto;background-color:var(--ah-color-bg, #ffffff);border-radius:var(--ah-widget-radius, 5px);box-shadow:var(--ah-widget-shadow, 0 4px 22px 0 rgba(0, 0, 0, 0.11));box-sizing:border-box}.widget-header{padding:var(--ah-header-padding, 40px 48px 24px)}.widget-body{padding:var(--ah-body-padding, 0 48px 40px)}.logo-wrapper{display:var(--ah-logo-display, flex);justify-content:var(--ah-logo-align, center);margin-bottom:8px}.logo{display:block;height:var(--ah-logo-height, 52px);max-width:100%;width:auto;object-fit:contain}.title{font-size:var(--ah-font-size-title, 24px);font-weight:var(--ah-font-weight-title, 700);text-align:var(--ah-title-align, center);margin:var(--ah-title-margin, 24px 0 8px);color:var(--ah-color-header, #1e212a);line-height:1.2}.description{font-size:var(--ah-font-size-description, 14px);text-align:var(--ah-title-align, center);margin:var(--ah-description-margin, 0 0 8px);color:var(--ah-color-text, #1e212a);line-height:1.5}.message{padding:12px 16px;border-radius:4px;margin-bottom:16px;font-size:14px;line-height:1.5}.message-error{background-color:var(--ah-color-error-bg, #ffeaea);color:var(--ah-color-error, #d03c38);border-left:3px solid var(--ah-color-error, #d03c38)}.message-success{background-color:var(--ah-color-success-bg, #e6f9f1);color:var(--ah-color-success, #13a769);border-left:3px solid var(--ah-color-success, #13a769)}form{display:flex;flex-direction:column}.form-content{display:flex;flex-direction:column}.social-section{display:flex;flex-direction:column;gap:8px;order:var(--ah-social-order, 2)}.fields-section{display:flex;flex-direction:column;order:var(--ah-fields-order, 0)}.divider{display:flex;align-items:center;text-align:center;margin:16px 0;order:var(--ah-divider-order, 1)}.divider::before,.divider::after{content:'';flex:1;border-bottom:1px solid var(--ah-color-border-muted, #c9cace)}.divider-text{padding:0 10px;font-size:12px;font-weight:400;color:var(--ah-color-text-muted, #65676e);text-transform:uppercase;letter-spacing:0}.links{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:16px}.link-wrapper{font-size:14px;color:var(--ah-color-text, #1e212a)}.link{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;font-weight:var(--ah-font-weight-link, 400);transition:color 150ms ease}.link:hover{text-decoration:underline}.link:focus-visible{outline:2px solid var(--ah-color-link, #635dff);outline-offset:2px;border-radius:2px}.loading-spinner{width:32px;height:32px;margin:24px auto;border:3px solid var(--ah-color-border-muted, #e0e1e3);border-top-color:var(--ah-color-primary, #635dff);border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.error-message{text-align:center;color:var(--ah-color-error, #d03c38);padding:16px;font-size:14px}@media (max-width: 480px){:host{display:block;width:100%;min-height:100vh;background-color:var(--ah-color-bg, #ffffff)}.widget-container{box-shadow:none;border-radius:0;max-width:none;width:100%;margin:0}.widget-header{padding:24px 16px 16px}.widget-body{padding:0 16px 24px}}`;
|
|
424
|
+
const authheroWidgetCss = () => `:host{display:block;font-family:var(--ah-font-family, 'ulp-font', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, sans-serif);font-size:var(--ah-font-size-base, 14px);line-height:var(--ah-line-height-base, 1.5);color:var(--ah-color-text, #1e212a);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.widget-container{max-width:var(--ah-widget-max-width, 400px);width:100%;margin:0 auto;background-color:var(--ah-color-bg, #ffffff);border-radius:var(--ah-widget-radius, 5px);box-shadow:var(--ah-widget-shadow, 0 4px 22px 0 rgba(0, 0, 0, 0.11));box-sizing:border-box}.widget-header{padding:var(--ah-header-padding, 40px 48px 24px)}.widget-body{padding:var(--ah-body-padding, 0 48px 40px)}.logo-wrapper{display:var(--ah-logo-display, flex);justify-content:var(--ah-logo-align, center);margin-bottom:8px}.logo{display:block;height:var(--ah-logo-height, 52px);max-width:100%;width:auto;object-fit:contain}.title{font-size:var(--ah-font-size-title, 24px);font-weight:var(--ah-font-weight-title, 700);text-align:var(--ah-title-align, center);margin:var(--ah-title-margin, 24px 0 8px);color:var(--ah-color-header, #1e212a);line-height:1.2}.description{font-size:var(--ah-font-size-description, 14px);text-align:var(--ah-title-align, center);margin:var(--ah-description-margin, 0 0 8px);color:var(--ah-color-text, #1e212a);line-height:1.5}.message{padding:12px 16px;border-radius:4px;margin-bottom:16px;font-size:14px;line-height:1.5}.message-error{background-color:var(--ah-color-error-bg, #ffeaea);color:var(--ah-color-error, #d03c38);border-left:3px solid var(--ah-color-error, #d03c38)}.message-success{background-color:var(--ah-color-success-bg, #e6f9f1);color:var(--ah-color-success, #13a769);border-left:3px solid var(--ah-color-success, #13a769)}form{display:flex;flex-direction:column}.form-content{display:flex;flex-direction:column}.social-section{display:flex;flex-direction:column;gap:8px;order:var(--ah-social-order, 2)}.fields-section{display:flex;flex-direction:column;order:var(--ah-fields-order, 0)}.divider{display:flex;align-items:center;text-align:center;margin:16px 0;order:var(--ah-divider-order, 1)}.divider::before,.divider::after{content:'';flex:1;border-bottom:1px solid var(--ah-color-border-muted, #c9cace)}.divider-text{padding:0 10px;font-size:12px;font-weight:400;color:var(--ah-color-text-muted, #65676e);text-transform:uppercase;letter-spacing:0}.links{display:flex;flex-direction:column;align-items:center;gap:8px;margin-top:16px}.link-wrapper{font-size:14px;color:var(--ah-color-text, #1e212a)}.link{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:14px;font-weight:var(--ah-font-weight-link, 400);transition:color 150ms ease}.link:hover{text-decoration:underline}.link:focus-visible{outline:2px solid var(--ah-color-link, #635dff);outline-offset:2px;border-radius:2px}.widget-footer{margin-top:16px;text-align:center;font-size:12px;color:var(--ah-color-text-muted, #65676e)}.widget-footer a{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none);font-size:12px;transition:color 150ms ease}.widget-footer a:hover{text-decoration:underline}.widget-footer a:focus-visible{outline:2px solid var(--ah-color-link, #635dff);outline-offset:2px;border-radius:2px}.loading-spinner{width:32px;height:32px;margin:24px auto;border:3px solid var(--ah-color-border-muted, #e0e1e3);border-top-color:var(--ah-color-primary, #635dff);border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.error-message{text-align:center;color:var(--ah-color-error, #d03c38);padding:16px;font-size:14px}@media (max-width: 480px){:host{display:block;width:100%;min-height:100vh;background-color:var(--ah-color-bg, #ffffff)}.widget-container{box-shadow:none;border-radius:0;max-width:none;width:100%;margin:0}.widget-header{padding:24px 16px 16px}.widget-body{padding:0 16px 24px}}`;
|
|
425
425
|
|
|
426
426
|
const AuthheroWidget = class {
|
|
427
427
|
constructor(hostRef) {
|
|
@@ -645,6 +645,30 @@ const AuthheroWidget = class {
|
|
|
645
645
|
const vars = mergeThemeVars(this._branding, this._theme);
|
|
646
646
|
applyCssVars(this.el, vars);
|
|
647
647
|
}
|
|
648
|
+
/**
|
|
649
|
+
* Focus the first input field in the form.
|
|
650
|
+
* Called after screen changes to ensure keyboard navigation works properly.
|
|
651
|
+
*/
|
|
652
|
+
focusFirstInput() {
|
|
653
|
+
// Use requestAnimationFrame to ensure DOM has updated
|
|
654
|
+
requestAnimationFrame(() => {
|
|
655
|
+
const shadowRoot = this.el.shadowRoot;
|
|
656
|
+
if (!shadowRoot)
|
|
657
|
+
return;
|
|
658
|
+
// Find all authhero-node components and look for inputs in their shadow DOMs
|
|
659
|
+
const nodes = shadowRoot.querySelectorAll("authhero-node");
|
|
660
|
+
for (const node of Array.from(nodes)) {
|
|
661
|
+
const nodeShadow = node.shadowRoot;
|
|
662
|
+
if (nodeShadow) {
|
|
663
|
+
const input = nodeShadow.querySelector('input:not([type="hidden"]):not([type="checkbox"]):not([disabled]), textarea:not([disabled])');
|
|
664
|
+
if (input) {
|
|
665
|
+
input.focus();
|
|
666
|
+
return;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
}
|
|
648
672
|
/**
|
|
649
673
|
* Get the effective autoNavigate value (defaults to autoSubmit if not set)
|
|
650
674
|
*/
|
|
@@ -716,11 +740,23 @@ const AuthheroWidget = class {
|
|
|
716
740
|
}
|
|
717
741
|
}
|
|
718
742
|
async componentWillLoad() {
|
|
719
|
-
// Parse initial props
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
743
|
+
// Parse initial props - this prevents unnecessary state changes during hydration that cause flashes
|
|
744
|
+
// Also check the element attribute as a fallback for hydration scenarios
|
|
745
|
+
if (!this._screen) {
|
|
746
|
+
const screenValue = this.screen || this.el?.getAttribute("screen");
|
|
747
|
+
if (screenValue) {
|
|
748
|
+
this.watchScreen(screenValue);
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
if (!this._branding) {
|
|
752
|
+
this.watchBranding(this.branding);
|
|
753
|
+
}
|
|
754
|
+
if (!this._theme) {
|
|
755
|
+
this.watchTheme(this.theme);
|
|
756
|
+
}
|
|
757
|
+
if (!this._authParams) {
|
|
758
|
+
this.watchAuthParams(this.authParams);
|
|
759
|
+
}
|
|
724
760
|
// Load persisted state if available
|
|
725
761
|
this.loadPersistedState();
|
|
726
762
|
// Fetch screen from API if URL provided and no screen prop
|
|
@@ -788,6 +824,7 @@ const AuthheroWidget = class {
|
|
|
788
824
|
this.screenChange.emit(this._screen);
|
|
789
825
|
this.updateDataScreenAttribute();
|
|
790
826
|
this.persistState();
|
|
827
|
+
this.focusFirstInput();
|
|
791
828
|
}
|
|
792
829
|
}
|
|
793
830
|
else {
|
|
@@ -880,6 +917,8 @@ const AuthheroWidget = class {
|
|
|
880
917
|
this.state = result.state;
|
|
881
918
|
this.persistState();
|
|
882
919
|
}
|
|
920
|
+
// Focus first input on new screen
|
|
921
|
+
this.focusFirstInput();
|
|
883
922
|
}
|
|
884
923
|
else if (result.complete) {
|
|
885
924
|
// Flow complete without redirect
|
|
@@ -890,6 +929,7 @@ const AuthheroWidget = class {
|
|
|
890
929
|
this._screen = result.screen;
|
|
891
930
|
this.screenChange.emit(result.screen);
|
|
892
931
|
this.updateDataScreenAttribute();
|
|
932
|
+
this.focusFirstInput();
|
|
893
933
|
}
|
|
894
934
|
}
|
|
895
935
|
}
|
|
@@ -991,28 +1031,6 @@ const AuthheroWidget = class {
|
|
|
991
1031
|
e.preventDefault();
|
|
992
1032
|
}
|
|
993
1033
|
};
|
|
994
|
-
/**
|
|
995
|
-
* Get error messages from the screen-level messages array.
|
|
996
|
-
*/
|
|
997
|
-
getScreenErrors() {
|
|
998
|
-
return this._screen?.messages?.filter((m) => m.type === "error") || [];
|
|
999
|
-
}
|
|
1000
|
-
/**
|
|
1001
|
-
* Get success messages from the screen-level messages array.
|
|
1002
|
-
*/
|
|
1003
|
-
getScreenSuccesses() {
|
|
1004
|
-
return this._screen?.messages?.filter((m) => m.type === "success") || [];
|
|
1005
|
-
}
|
|
1006
|
-
/**
|
|
1007
|
-
* Sort components by order.
|
|
1008
|
-
*/
|
|
1009
|
-
getOrderedComponents() {
|
|
1010
|
-
if (!this._screen)
|
|
1011
|
-
return [];
|
|
1012
|
-
return [...this._screen.components]
|
|
1013
|
-
.filter((c) => c.visible !== false)
|
|
1014
|
-
.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
1015
|
-
}
|
|
1016
1034
|
/**
|
|
1017
1035
|
* Check if a component is a social button.
|
|
1018
1036
|
*/
|
|
@@ -1028,15 +1046,19 @@ const AuthheroWidget = class {
|
|
|
1028
1046
|
return component.type === "DIVIDER";
|
|
1029
1047
|
}
|
|
1030
1048
|
render() {
|
|
1031
|
-
|
|
1049
|
+
const screen = this._screen;
|
|
1050
|
+
if (this.loading && !screen) {
|
|
1032
1051
|
return (h("div", { class: "widget-container" }, h("div", { class: "loading-spinner" })));
|
|
1033
1052
|
}
|
|
1034
|
-
if (!
|
|
1053
|
+
if (!screen) {
|
|
1035
1054
|
return (h("div", { class: "widget-container" }, h("div", { class: "error-message" }, "No screen configuration provided")));
|
|
1036
1055
|
}
|
|
1037
|
-
|
|
1038
|
-
const
|
|
1039
|
-
const
|
|
1056
|
+
// Use the local screen variable for all rendering
|
|
1057
|
+
const screenErrors = screen.messages?.filter((m) => m.type === "error") || [];
|
|
1058
|
+
const screenSuccesses = screen.messages?.filter((m) => m.type === "success") || [];
|
|
1059
|
+
const components = [...(screen.components ?? [])]
|
|
1060
|
+
.filter((c) => c.visible !== false)
|
|
1061
|
+
.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
1040
1062
|
// Separate social, divider, and field components for layout ordering
|
|
1041
1063
|
const socialComponents = components.filter((c) => this.isSocialComponent(c));
|
|
1042
1064
|
const fieldComponents = components.filter((c) => !this.isSocialComponent(c) && !this.isDividerComponent(c));
|
|
@@ -1069,9 +1091,9 @@ const AuthheroWidget = class {
|
|
|
1069
1091
|
};
|
|
1070
1092
|
// Get logo URL from theme.widget (takes precedence) or branding
|
|
1071
1093
|
const logoUrl = this._theme?.widget?.logo_url || this._branding?.logo_url;
|
|
1072
|
-
return (h("div", { class: "widget-container", part: "container", "data-authstack-container": true }, h("header", { class: "widget-header", part: "header" }, logoUrl && (h("div", { class: "logo-wrapper", part: "logo-wrapper" }, h("img", { class: "logo", part: "logo", src: logoUrl, alt: "Logo" }))),
|
|
1094
|
+
return (h("div", { class: "widget-container", part: "container", "data-authstack-container": true }, h("header", { class: "widget-header", part: "header" }, logoUrl && (h("div", { class: "logo-wrapper", part: "logo-wrapper" }, h("img", { class: "logo", part: "logo", src: logoUrl, alt: "Logo" }))), screen.title && (h("h1", { class: "title", part: "title", innerHTML: sanitizeHtml(screen.title) })), screen.description && (h("p", { class: "description", part: "description", innerHTML: sanitizeHtml(screen.description) }))), h("div", { class: "widget-body", part: "body" }, screenErrors.map((err) => (h("div", { class: "message message-error", part: "message message-error", key: err.id ?? err.text }, err.text))), screenSuccesses.map((msg) => (h("div", { class: "message message-success", part: "message message-success", key: msg.id ?? msg.text }, msg.text))), h("form", { onSubmit: this.handleSubmit, part: "form" }, h("div", { class: "form-content" }, socialComponents.length > 0 && (h("div", { class: "social-section", part: "social-section" }, socialComponents.map((component) => (h("authhero-node", { key: component.id, component: component, value: this.formData[component.id], onFieldChange: (e) => this.handleInputChange(e.detail.id, e.detail.value), onButtonClick: (e) => this.handleButtonClick(e.detail), disabled: this.loading, exportparts: getExportParts(component) }))))), socialComponents.length > 0 &&
|
|
1073
1095
|
fieldComponents.length > 0 &&
|
|
1074
|
-
hasDivider && (h("div", { class: "divider", part: "divider" }, h("span", { class: "divider-text" }, "Or"))), h("div", { class: "fields-section", part: "fields-section" }, fieldComponents.map((component) => (h("authhero-node", { key: component.id, component: component, value: this.formData[component.id], onFieldChange: (e) => this.handleInputChange(e.detail.id, e.detail.value), onButtonClick: (e) => this.handleButtonClick(e.detail), disabled: this.loading })))))),
|
|
1096
|
+
hasDivider && (h("div", { class: "divider", part: "divider" }, h("span", { class: "divider-text" }, "Or"))), h("div", { class: "fields-section", part: "fields-section" }, fieldComponents.map((component) => (h("authhero-node", { key: component.id, component: component, value: this.formData[component.id], onFieldChange: (e) => this.handleInputChange(e.detail.id, e.detail.value), onButtonClick: (e) => this.handleButtonClick(e.detail), disabled: this.loading })))))), screen.links && screen.links.length > 0 && (h("div", { class: "links", part: "links" }, screen.links.map((link) => (h("span", { class: "link-wrapper", part: "link-wrapper", key: link.id ?? link.href }, link.linkText ? (h("span", null, link.text, " ", h("a", { href: link.href, class: "link", part: "link", onClick: (e) => this.handleLinkClick(e, {
|
|
1075
1097
|
id: link.id,
|
|
1076
1098
|
href: link.href,
|
|
1077
1099
|
text: link.linkText || link.text,
|
|
@@ -1079,7 +1101,7 @@ const AuthheroWidget = class {
|
|
|
1079
1101
|
id: link.id,
|
|
1080
1102
|
href: link.href,
|
|
1081
1103
|
text: link.text,
|
|
1082
|
-
}) }, link.text))))))))));
|
|
1104
|
+
}) }, link.text))))))), screen.footer && (h("div", { class: "widget-footer", part: "footer", innerHTML: sanitizeHtml(screen.footer) })))));
|
|
1083
1105
|
}
|
|
1084
1106
|
static get watchers() { return {
|
|
1085
1107
|
"screenId": [{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-5hZ8Vbm9.js';
|
|
2
|
+
export { s as setNonce } from './index-5hZ8Vbm9.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.
|
|
6
|
+
Stencil Client Patch Browser v4.40.1 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
var patchBrowser = () => {
|