@authhero/widget 0.19.2 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/authhero-widget/authhero-widget.esm.js +1 -1
  2. package/dist/authhero-widget/index.esm.js +1 -1
  3. package/dist/authhero-widget/{p-5hZ8Vbm9.js → p-BFP_5sHV.js} +1 -1
  4. package/dist/authhero-widget/p-c03e5b57.entry.js +1 -0
  5. package/dist/authhero-widget/p-f3a92b50.entry.js +1 -0
  6. package/dist/cjs/authhero-node.cjs.entry.js +448 -5
  7. package/dist/cjs/authhero-widget.cjs.entry.js +200 -21
  8. package/dist/cjs/authhero-widget.cjs.js +2 -2
  9. package/dist/cjs/{index-vX5cgLV-.js → index-CUBT14z-.js} +21 -0
  10. package/dist/cjs/index.cjs.js +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/collection/components/authhero-node/authhero-node.css +74 -0
  13. package/dist/collection/components/authhero-node/authhero-node.js +219 -6
  14. package/dist/collection/components/authhero-widget/authhero-widget.css +2 -2
  15. package/dist/collection/components/authhero-widget/authhero-widget.js +102 -5
  16. package/dist/collection/utils/branding.js +98 -16
  17. package/dist/collection/utils/country-data.js +235 -0
  18. package/dist/components/authhero-node.js +1 -1
  19. package/dist/components/authhero-widget.js +1 -1
  20. package/dist/components/index.js +1 -1
  21. package/dist/components/p-D9Clv9VJ.js +1 -0
  22. package/dist/components/{p-EokuR0qI.js → p-DpfoRsj0.js} +1 -1
  23. package/dist/esm/authhero-node.entry.js +448 -5
  24. package/dist/esm/authhero-widget.entry.js +200 -21
  25. package/dist/esm/authhero-widget.js +3 -3
  26. package/dist/esm/{index-5hZ8Vbm9.js → index-BFP_5sHV.js} +21 -0
  27. package/dist/esm/index.js +1 -1
  28. package/dist/esm/loader.js +3 -3
  29. package/dist/types/components/authhero-node/authhero-node.d.ts +36 -0
  30. package/dist/types/components/authhero-widget/authhero-widget.d.ts +20 -1
  31. package/dist/types/utils/country-data.d.ts +23 -0
  32. package/hydrate/index.js +668 -25
  33. package/hydrate/index.mjs +668 -25
  34. package/package.json +2 -2
  35. package/dist/authhero-widget/p-18d0a438.entry.js +0 -1
  36. package/dist/authhero-widget/p-bb3657ce.entry.js +0 -1
  37. package/dist/components/p-NKUIiiOq.js +0 -1
@@ -1,2 +1,2 @@
1
- var t,e,n,s,i,r,o,l,c,u,f,a,h,p,d,v,$,m=Object.create,b=Object.defineProperty,g=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,y=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,O=t=>{throw TypeError(t)},S=(t,e)=>function(){return e||(0,t[w(t)[0]])((e={exports:{}}).exports,e),e.exports},M=(t,e,n)=>e.has(t)||O("Cannot "+n),k=(t,e,n)=>(M(t,e,"read from private field"),n?n.call(t):e.get(t)),E=(t,e,n)=>e.has(t)?O("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),x=(t,e,n)=>(M(t,e,"write to private field"),e.set(t,n),n),N=(t,e,n)=>(M(t,e,"access private method"),n),P=S({"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),u=n.indexOf(e,c+1),f=c;if(c>=0&&u>0){if(t===e)return[c,u];for(s=[],r=n.length;f>=0&&!l;)f==c?(s.push(f),c=n.indexOf(t,f+1)):1==s.length?l=[s.pop(),u]:((i=s.pop())<r&&(r=i,o=u),u=n.indexOf(e,f+1)),f=c<u&&c>=0?c:u;s.length&&(l=[r,o])}return l}e.exports=n,n.range=i}}),R=S({"node_modules/brace-expansion/index.js"(t,e){var n=P();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),v(function(t){return t.split("\\\\").join(s).split("\\{").join(i).split("\\}").join(r).split("\\,").join(o).split("\\.").join(l)}(t),!0).map(u)):[]};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 u(t){return t.split(s).join("\\").split(i).join("{").split(r).join("}").split(o).join(",").split(l).join(".")}function f(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=f(r);return r.length&&(o[o.length-1]+=l.shift(),o.push.apply(o,l)),e.push.apply(e,o),e}function a(t){return"{"+t+"}"}function h(t){return/^-?0\d/.test(t)}function p(t,e){return t<=e}function d(t,e){return t>=e}function v(t,e){var s=[],i=n("{","}",t);if(!i)return[t];var o=i.pre,l=i.post.length?v(i.post,!1):[""];if(/\$$/.test(i.pre))for(var u=0;u<l.length;u++)s.push(C=o+"{"+i.body+"}"+l[u]);else{var $,m,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),g=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),w=b||g,y=i.body.indexOf(",")>=0;if(!w&&!y)return i.post.match(/,(?!,).*\}/)?v(t=i.pre+"{"+i.body+r+i.post):[t];if(w)$=i.body.split(/\.\./);else if(1===($=f(i.body)).length&&1===($=v($[0],!1).map(a)).length)return l.map((function(t){return i.pre+$[0]+t}));if(w){var j=c($[0]),O=c($[1]),S=Math.max($[0].length,$[1].length),M=3==$.length?Math.abs(c($[2])):1,k=p;O<j&&(M*=-1,k=d);var E=$.some(h);m=[];for(var x=j;k(x,O);x+=M){var N;if(g)"\\"===(N=String.fromCharCode(x))&&(N="");else if(N=x+"",E){var P=S-N.length;if(P>0){var R=Array(P+1).join("0");N=x<0?"-"+R+N.slice(1):R+N}}m.push(N)}}else{m=[];for(var W=0;W<$.length;W++)m.push.apply(m,v($[W],!1))}for(W=0;W<m.length;W++)for(u=0;u<l.length;u++){var C=o+m[W]+l[u];(!e||w||C)&&s.push(C)}}return s}}}),W=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(W||{}),C=(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))(C||{}),A="type",L="value",z="serialized:",I=(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}}))},T=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},_=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.l=t,512&e.i.u&&I(t,e))},D=(t,e)=>e in t,U=(t,e)=>(0,console.error)(t,e),G=new Map,V=new Map,B="s-id",F="sty-id",Z="c-id",H="slot-fb{display:contents}slot-fb[hidden]{display:none}",q="undefined"!=typeof window?window:{},J={u:0,h:"",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=t=>Promise.resolve(t),K=(()=>{try{return!!q.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),Q=!!K&&(()=>!!q.document&&Object.getOwnPropertyDescriptor(q.document.adoptedStyleSheets,"length").writable)(),X=!1,tt=[],et=[],nt=(t,e)=>n=>{t.push(n),X||(X=!0,e&&4&J.u?rt(it):J.raf(it))},st=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){U(t)}t.length=0},it=()=>{st(tt),st(et),(X=tt.length>0)&&J.raf(it)},rt=t=>Y().then(t),ot=nt(et,!0),lt=t=>"object"==(t=typeof t)||"function"===t,ct=((t,e,n)=>(n=null!=t?m(y(t)):{},((t,e,n,s)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of w(e))j.call(t,n)||undefined===n||b(t,n,{get:()=>e[n],enumerable:!(s=g(e,n))||s.enumerable});return t})(b(n,"default",{value:t,enumerable:!0}),t)))(R()),ut=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},ft={"[: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,"\\$&"),ht=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),pt=t=>t.join(""),dt=(t,e)=>{const n=e;if("["!==t.charAt(n))throw Error("not in a brace expression");const s=[],i=[];let r=n+1,o=!1,l=!1,c=!1,u=!1,f=n,a="";t:for(;r<t.length;){const e=t.charAt(r);if("!"!==e&&"^"!==e||r!==n+1){if("]"===e&&o&&!c){f=r+1;break}if(o=!0,"\\"!==e||c){if("["===e&&!c)for(const[e,[o,c,u]]of Object.entries(ft))if(t.startsWith(e,r)){if(a)return["$.",!1,t.length-n,!0];r+=e.length,u?i.push(o):s.push(o),l=l||c;continue t}c=!1,a?(e>a?s.push(at(a)+"-"+at(e)):e===a&&s.push(at(e)),a="",r++):t.startsWith("-]",r+1)?(s.push(at(e+"-")),r+=2):t.startsWith("-",r+1)?(a=e,r+=2):(s.push(at(e)),r++)}else c=!0,r++}else u=!0,r++}if(f<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])&&!u){const t=2===s[0].length?s[0].slice(-1):s[0];return[ht(t),!1,f-n,!1]}const h="["+(u?"^":"")+pt(s)+"]",p="["+(u?"":"^")+pt(i)+"]";return[s.length&&i.length?"("+h+"|"+p+")":s.length?h:p,l,f-n,!0]},vt=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),$t=new Set(["!","?","+","*","@"]),mt=t=>$t.has(t),bt="(?!\\.)",gt=new Set(["[","."]),wt=new Set(["..","."]),yt=new Set("().*{}+?[]^$\\!"),jt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ot="[^/]",St=Ot+"*?",Mt=Ot+"+?",kt=class m{constructor(h,p,d={}){E(this,a),((t,e,n)=>{((t,e,n)=>{e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,e+"",n)})(this,"type"),E(this,t),E(this,e),E(this,n,!1),E(this,s,[]),E(this,i),E(this,r),E(this,o),E(this,l,!1),E(this,c),E(this,u),E(this,f,!1),this.type=h,h&&x(this,e,!0),x(this,i,p),x(this,t,k(this,i)?k(k(this,i),t):this),x(this,c,k(this,t)===this?d:k(k(this,t),c)),x(this,o,k(this,t)===this?[]:k(k(this,t),o)),"!"!==h||k(k(this,t),l)||k(this,o).push(this),x(this,r,k(this,i)?k(k(this,i),s).length:0)}get hasMagic(){if(void 0!==k(this,e))return k(this,e);for(const t of k(this,s))if("string"!=typeof t&&(t.type||t.hasMagic))return x(this,e,!0);return k(this,e)}toString(){return void 0!==k(this,u)?k(this,u):x(this,u,this.type?this.type+"("+k(this,s).map((t=>t+"")).join("|")+")":k(this,s).map((t=>t+"")).join(""))}push(...t){for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof m&&k(e,i)===this))throw Error("invalid part: "+e);k(this,s).push(e)}}toJSON(){var e;const n=null===this.type?k(this,s).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...k(this,s).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&n.unshift([]),this.isEnd()&&(this===k(this,t)||k(k(this,t),l)&&"!"===(null==(e=k(this,i))?void 0:e.type))&&n.push({}),n}isStart(){var e;if(k(this,t)===this)return!0;if(!(null==(e=k(this,i))?void 0:e.isStart()))return!1;if(0===k(this,r))return!0;const n=k(this,i);for(let t=0;t<k(this,r);t++){const e=k(n,s)[t];if(!(e instanceof m&&"!"===e.type))return!1}return!0}isEnd(){var e,n,o;if(k(this,t)===this)return!0;if("!"===(null==(e=k(this,i))?void 0:e.type))return!0;if(!(null==(n=k(this,i))?void 0:n.isEnd()))return!1;if(!this.type)return null==(o=k(this,i))?void 0:o.isEnd();const l=k(this,i)?k(k(this,i),s).length:0;return k(this,r)===l-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(t){const e=new m(this.type,t);for(const t of k(this,s))e.copyIn(t);return e}static fromGlob(t,e={}){var n;const s=new m(null,void 0,e);return N(n=m,p,d).call(n,t,s,0,e),s}toMMPattern(){if(this!==k(this,t))return k(this,t).toMMPattern();const n=""+this,[s,i,r,o]=this.toRegExpSource();if(!(r||k(this,e)||k(this,c).nocase&&!k(this,c).nocaseMagicOnly&&n.toUpperCase()!==n.toLowerCase()))return i;const l=(k(this,c).nocase?"i":"")+(o?"u":"");return Object.assign(RegExp(`^${s}$`,l),{_src:s,_glob:n})}get options(){return k(this,c)}toRegExpSource(r){var o;const u=null!=r?r:!!k(this,c).dot;if(k(this,t)===this&&N(this,a,h).call(this),!this.type){const c=this.isStart()&&this.isEnd(),f=k(this,s).map((t=>{var s;const[i,o,l,u]="string"==typeof t?N(s=m,p,$).call(s,t,k(this,e),c):t.toRegExpSource(r);return x(this,e,k(this,e)||l),x(this,n,k(this,n)||u),i})).join("");let a="";if(this.isStart()&&"string"==typeof k(this,s)[0]&&(1!==k(this,s).length||!wt.has(k(this,s)[0]))){const t=gt,e=u&&t.has(f.charAt(0))||f.startsWith("\\.")&&t.has(f.charAt(2))||f.startsWith("\\.\\.")&&t.has(f.charAt(4)),n=!u&&!r&&t.has(f.charAt(0));a=e?"(?!(?:^|/)\\.\\.?(?:$|/))":n?bt:""}let h="";return this.isEnd()&&k(k(this,t),l)&&"!"===(null==(o=k(this,i))?void 0:o.type)&&(h="(?:$|\\/)"),[a+f+h,vt(f),x(this,e,!!k(this,e)),k(this,n)]}const d="*"===this.type||"+"===this.type,b="!"===this.type?"(?:(?!(?:":"(?:";let g=N(this,a,v).call(this,u);if(this.isStart()&&this.isEnd()&&!g&&"!"!==this.type){const t=""+this;return x(this,s,[t]),this.type=null,x(this,e,void 0),[t,vt(""+this),!1,!1]}let w=!d||r||u?"":N(this,a,v).call(this,!0);w===g&&(w=""),w&&(g=`(?:${g})(?:${w})*?`);let y="";return y="!"===this.type&&k(this,f)?(this.isStart()&&!u?bt:"")+Mt:b+g+("!"===this.type?"))"+(!this.isStart()||u||r?"":bt)+St+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&w?")":"*"===this.type&&w?")?":")"+this.type),[y,vt(g),x(this,e,!!k(this,e)),k(this,n)]}};t=new WeakMap,e=new WeakMap,n=new WeakMap,s=new WeakMap,i=new WeakMap,r=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,f=new WeakMap,a=new WeakSet,h=function(){if(this!==k(this,t))throw Error("should only call on root");if(k(this,l))return this;let e;for(x(this,l,!0);e=k(this,o).pop();){if("!"!==e.type)continue;let t=e,n=k(t,i);for(;n;){for(let i=k(t,r)+1;!n.type&&i<k(n,s).length;i++)for(const t of k(e,s)){if("string"==typeof t)throw Error("string part in extglob AST??");t.copyIn(k(n,s)[i])}t=n,n=k(t,i)}}return this},p=new WeakSet,d=function(t,n,i,r){var o,l;let c=!1,u=!1,a=-1,h=!1;if(null===n.type){let e=i,s="";for(;e<t.length;){const i=t.charAt(e++);if(c||"\\"===i)c=!c,s+=i;else if(u)e===a+1?"^"!==i&&"!"!==i||(h=!0):"]"!==i||e===a+2&&h||(u=!1),s+=i;else if("["!==i)if(r.noext||!mt(i)||"("!==t.charAt(e))s+=i;else{n.push(s),s="";const l=new kt(i,n);e=N(o=kt,p,d).call(o,t,l,e,r),n.push(l)}else u=!0,a=e,h=!1,s+=i}return n.push(s),e}let v=i+1,$=new kt(null,n);const m=[];let b="";for(;v<t.length;){const e=t.charAt(v++);if(c||"\\"===e)c=!c,b+=e;else if(u)v===a+1?"^"!==e&&"!"!==e||(h=!0):"]"!==e||v===a+2&&h||(u=!1),b+=e;else if("["!==e)if(mt(e)&&"("===t.charAt(v)){$.push(b),b="";const n=new kt(e,$);$.push(n),v=N(l=kt,p,d).call(l,t,n,v,r)}else if("|"!==e){if(")"===e)return""===b&&0===k(n,s).length&&x(n,f,!0),$.push(b),b="",n.push(...m,$),v;b+=e}else $.push(b),b="",m.push($),$=new kt(null,n);else u=!0,a=v,h=!1,b+=e}return n.type=null,x(n,e,void 0),x(n,s,[t.substring(i-1)]),v},v=function(t){return k(this,s).map((e=>{if("string"==typeof e)throw Error("string type in extglob ast??");const[s,i,r,o]=e.toRegExpSource(t);return x(this,n,k(this,n)||o),s})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},$=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+=jt(l):(i+=Ot,e=!0):(i+=n&&"*"===t?Mt:St,e=!0)}else o===t.length-1?i+="\\\\":s=!0}return[i,vt(t),!!e,r]},E(kt,p);var Et=kt,xt=(t,e,n={})=>(ut(e),!(!n.nocomment&&"#"===e.charAt(0))&&new te(e,n).match(t)),Nt=/^\*+([^+@!?\*\[\(]*)$/,Pt=t=>e=>!e.startsWith(".")&&e.endsWith(t),Rt=t=>e=>e.endsWith(t),Wt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Ct=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),At=/^\*+\.\*+$/,Lt=t=>!t.startsWith(".")&&t.includes("."),zt=t=>"."!==t&&".."!==t&&t.includes("."),It=/^\.\*+$/,Tt=t=>"."!==t&&".."!==t&&t.startsWith("."),_t=/^\*+$/,Dt=t=>0!==t.length&&!t.startsWith("."),Ut=t=>0!==t.length&&"."!==t&&".."!==t,Gt=/^\?+([^+@!?\*\[\(]*)?$/,Vt=([t,e=""])=>{const n=Ht([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Bt=([t,e=""])=>{const n=qt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Ft=([t,e=""])=>{const n=qt([t]);return e?t=>n(t)&&t.endsWith(e):n},Zt=([t,e=""])=>{const n=Ht([t]);return e?t=>n(t)&&t.endsWith(e):n},Ht=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},qt=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},Jt="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";xt.sep="win32"===Jt?"\\":"/";var Yt=Symbol("globstar **");xt.GLOBSTAR=Yt,xt.filter=(t,e={})=>n=>xt(n,t,e);var Kt=(t,e={})=>Object.assign({},t,e);xt.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return xt;const e=xt;return Object.assign(((n,s,i={})=>e(n,s,Kt(t,i))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,Kt(t,n))}static defaults(n){return e.defaults(Kt(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n,s={}){super(e,n,Kt(t,s))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Kt(t,s))}},unescape:(n,s={})=>e.unescape(n,Kt(t,s)),escape:(n,s={})=>e.escape(n,Kt(t,s)),filter:(n,s={})=>e.filter(n,Kt(t,s)),defaults:n=>e.defaults(Kt(t,n)),makeRe:(n,s={})=>e.makeRe(n,Kt(t,s)),braceExpand:(n,s={})=>e.braceExpand(n,Kt(t,s)),match:(n,s,i={})=>e.match(n,s,Kt(t,i)),sep:e.sep,GLOBSTAR:Yt})};var Qt=(t,e={})=>(ut(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,ct.default)(t));xt.braceExpand=Qt,xt.makeRe=(t,e={})=>new te(t,e).makeRe(),xt.match=(t,e,n={})=>{const s=new te(e,n);return t=t.filter((t=>s.match(t))),s.options.nonull&&!t.length&&t.push(e),t};var Xt=/[?*]|[+@!]\(.*?\)|\[|\]/,te=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||Jt,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]&&Xt.test(t[2])||Xt.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 u=e[o],f=t[r];if(this.debug(e,u,f),!1===u)return!1;if(u===Yt){this.debug("GLOBSTAR",[e,u,f]);var a=r,h=o+1;if(h===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(;a<l;){var p=t[a];if(this.debug("\nglobstar while",t,a,e,h,p),this.matchOne(t.slice(a),e.slice(h),n))return this.debug("globstar found match!",a,l,p),!0;if("."===p||".."===p||!s.dot&&"."===p.charAt(0)){this.debug("dot detected!",t,a,e,h);break}this.debug("globstar swallow a segment, and continue"),a++}return!(!n||(this.debug("\n>>> no match, partial?",t,a,e,h),a!==l))}let i;if("string"==typeof u?(i=f===u,this.debug("string match",u,f,i)):(i=u.test(f),this.debug("pattern match",u,f,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 Error("wtf?")}braceExpand(){return Qt(this.pattern,this.options)}parse(t){ut(t);const e=this.options;if("**"===t)return Yt;if(""===t)return"";let n,s=null;(n=t.match(_t))?s=e.dot?Ut:Dt:(n=t.match(Nt))?s=(e.nocase?e.dot?Ct:Wt:e.dot?Rt:Pt)(n[1]):(n=t.match(Gt))?s=(e.nocase?e.dot?Bt:Vt:e.dot?Ft:Zt)(n):(n=t.match(At))?s=e.dot?zt:Lt:(n=t.match(It))&&(s=Tt);const i=Et.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=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))(t):t===Yt?Yt:t._src}));return e.forEach(((t,s)=>{const i=e[s+1],r=e[s-1];t===Yt&&r!==Yt&&(void 0===r?void 0!==i&&i!==Yt?e[s+1]="(?:\\/|"+n+"\\/)?"+i:e[s]=n:void 0===i?e[s-1]=r+"(?:\\/|"+n+")?":i!==Yt&&(e[s-1]=r+"(?:\\/|\\/"+n+"\\/)"+i,e[s+1]=Yt))})),e.filter((t=>t!==Yt)).join("/")})).join("|");const[r,o]=t.length>1?["(?:",")"]:["",""];i="^"+r+i+o+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=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 xt.defaults(t).Minimatch}};function ee(t){var e,n,s;return null!=(s=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?s:void 0}xt.AST=Et,xt.Minimatch=te,xt.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),xt.unescape=vt;var ne=class t{static fromLocalValue(e){const n=e[A],s=L in e?e[L]: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 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 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(A))return!1;const e=t[A];return!!Object.values({...W,...C}).includes(e)&&("null"===e||"undefined"===e||t.hasOwnProperty(L))}};((t,e)=>{for(var n in e)b(t,n,{get:e[n],enumerable:!0})})({},{err:()=>ie,map:()=>re,ok:()=>se,unwrap:()=>le,unwrapErr:()=>ce});var se=t=>({isOk:!0,isErr:!1,value:t}),ie=t=>({isOk:!1,isErr:!0,value:t});function re(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>se(t))):se(n)}if(t.isErr)return ie(t.value);throw"should never get here"}var oe,le=t=>{if(t.isOk)return t.value;throw t.value},ce=t=>{if(t.isErr)return t.value;throw t.value};function ue(){const t=this.attachShadow({mode:"open"});void 0===oe&&(oe=null),oe&&(Q?t.adoptedStyleSheets.push(oe):t.adoptedStyleSheets=[...t.adoptedStyleSheets,oe])}var fe=(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=ae(r,"appendChild");if(void 0!==s){i["s-oo"]=s;const t=ae(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 ae(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 he=new WeakMap,pe=(t,e,n)=>{let s=V.get(t);K&&n?(s=s||new CSSStyleSheet,"string"==typeof s?s=e:s.replaceSync(e)):s=e,V.set(t,s)},de=(t,e)=>{var n,s,i;const r=ve(e),o=V.get(r);if(!q.document)return r;if(t=11===t.nodeType?t:q.document,o)if("string"==typeof o){let i,l=he.get(t=t.head||t);l||he.set(t,l=new Set);const c=t.querySelector(`[${F}="${r}"]`);if(c)c.innerHTML=o;else if(!l.has(r)){i=q.document.createElement("style"),i.innerHTML=o;const c=null!=(n=J.p)?n:ee(q.document);if(null!=c&&i.setAttribute("nonce",c),!(1&e.u))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(K){const e=new(null!=(s=t.defaultView)?s:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(o),Q?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.u&&t.insertBefore(i,null),4&e.u&&(i.innerHTML+=H),l&&l.add(r)}}else{let e=he.get(t);if(e||he.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)}Q?t.adoptedStyleSheets.push(s):t.adoptedStyleSheets=[...t.adoptedStyleSheets,s],e.add(r)}}return r},ve=t=>"sc-"+t.v,$e=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),me=(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&&!lt(s))&&(s+=""),r&&o?l[l.length-1].$+=s:l.push(r?be(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 u=be(t,null);return u.m=e,l.length>0&&(u.j=l),u.O=i,u},be=(t,e)=>({u:0,S:t,$:e,M:null,j:null,m:null,O:null}),ge={},we=(t,e,n,s,i,r,o,l=[])=>{let c,u,f,a;if(1===r.nodeType){if(c=r.getAttribute(Z),c&&(u=c.split("."),u[0]===o||"0"===u[0])){f=je({u:0,k:u[0],N:u[1],P:u[2],R:u[3],S:r.tagName.toLowerCase(),M:r,m:{class:r.className||""}}),e.push(f),r.removeAttribute(Z),t.j||(t.j=[]);const i=f.M.getAttribute("s-sn");"string"==typeof i&&("slot-fb"===f.S&&Oe(i,u[2],f,r,t,e,n,s,l),f.M["s-sn"]=i,f.M.removeAttribute("s-sn")),void 0!==f.R&&(t.j[f.R]=f),t=f,s&&"0"===f.P&&(s[f.R]=f.M)}if(r.shadowRoot)for(a=r.shadowRoot.childNodes.length-1;a>=0;a--)we(t,e,n,s,i,r.shadowRoot.childNodes[a],o,l);const h=r.__childNodes||r.childNodes;for(a=h.length-1;a>=0;a--)we(t,e,n,s,i,h[a],o,l)}else if(8===r.nodeType)u=r.nodeValue.split("."),(u[1]===o||"0"===u[1])&&(c=u[0],f=je({k:u[1],N:u[2],P:u[3],R:u[4]||"0",M:r,m:null,j:null,O:null,W:null,S:null,$:null}),"t"===c?(f.M=Me(r,3),f.M&&3===f.M.nodeType&&(f.$=f.M.textContent,e.push(f),r.remove(),o===f.k&&(t.j||(t.j=[]),t.j[f.R]=f),s&&"0"===f.P&&(s[f.R]=f.M))):"c"===c?(f.M=Me(r,8),f.M&&8===f.M.nodeType&&(e.push(f),r.remove())):f.k===o&&("s"===c?Oe(r["s-sn"]=u[5]||"",u[2],f,r,t,e,n,s,l):"r"===c&&s&&r.remove()));else if(t&&"style"===t.S){const e=be(null,r.textContent);e.M=r,e.R="0",t.j=[e]}return t},ye=(t,e)=>{if(1===t.nodeType){const n=t[B]||t.getAttribute(B);n&&e.set(n,t);let s=0;if(t.shadowRoot)for(;s<t.shadowRoot.childNodes.length;s++)ye(t.shadowRoot.childNodes[s],e);const i=t.__childNodes||t.childNodes;for(s=0;s<i.length;s++)ye(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])}},je=t=>({u:0,k:null,N:null,P:null,R:"0",M:null,m:null,j:null,O:null,W:null,S:null,$:null,...t});function Oe(t,e,n,s,i,r,o,l,c){s["s-sr"]=!0,n.W=t||null,n.S="slot";const u=(null==i?void 0:i.M)?i.M["s-id"]||i.M.getAttribute("s-id"):"";if(l&&q.document){const r=n.M=q.document.createElement(n.S);n.W&&n.M.setAttribute("name",t),i.M.shadowRoot&&u&&u!==n.k?ae(i.M,"insertBefore")(r,ae(i.M,"children")[0]):ae(ae(s,"parentNode"),"insertBefore")(r,s),Se(c,e,t,s,n.k),s.remove(),"0"===n.P&&(l[n.R]=n.M)}else{const r=n.M,o=u&&u!==n.k&&i.M.shadowRoot;Se(c,e,t,s,o?u:n.k),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.M.insertBefore(r,i.M.children[0])}r.push(n),o.push(n),i.j||(i.j=[]),i.j[n.R]=n}var Se=(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.")))},Me=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n},ke=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};ke("::slotted"),ke(":host"),ke(":host-context");var Ee,xe=(t,e)=>"string"==typeof t&&t.startsWith(z)?t=function(t){return"string"==typeof t&&t.startsWith(z)?ne.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||lt(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t,Ne=t=>{var e;return null==(e=T(t))?void 0:e.$hostElement$},Pe=(t,e)=>{const n=Ne(t);return{emit:t=>Re(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Re=(t,e,n)=>{const s=J.ce(e,n);return t.dispatchEvent(s),s},We=(t,e,n,s,i,r,o)=>{if(n===s)return;let l=D(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,i=Ae(n);let r=Ae(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(l||"o"!==e[0]||"n"!==e[1]){const o=lt(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):D(q,c)?c.slice(2):c[2]+e.slice(3),n||s){const i=e.endsWith(Le);e=e.replace(ze,""),n&&J.rel(t,e,n,i),s&&J.ael(t,e,s,i)}},Ce=/\s/,Ae=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(Ce):[]),Le="Capture",ze=RegExp(Le+"$"),Ie=(t,e,n,s)=>{const i=11===e.M.nodeType&&e.M.host?e.M.host:e.M,r=t&&t.m||{},o=e.m||{};for(const t of Te(Object.keys(r)))t in o||We(i,t,r[t],void 0,n,e.u,s);for(const t of Te(Object.keys(o)))We(i,t,r[t],o[t],n,e.u,s)};function Te(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var _e=!1,De=(t,e,n)=>{const s=e.j[n];let i,r,o=0;if(null!==s.$)i=s.M=q.document.createTextNode(s.$);else{if(_e||(_e="svg"===s.S),!q.document)throw 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.M=q.document.createElementNS(_e?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.S),_e&&"foreignObject"===s.S&&(_e=!1),Ie(null,s,_e),s.j){const e="template"===s.S?i.content:i;for(o=0;o<s.j.length;++o)r=De(t,s,o),r&&e.appendChild(r)}"svg"===s.S?_e=!1:"foreignObject"===i.tagName&&(_e=!0)}return i["s-hn"]=Ee,i},Ue=(t,e,n,s,i,r)=>{let o,l=t;for(l.shadowRoot&&l.tagName===Ee&&(l=l.shadowRoot),"template"===n.S&&(l=l.content);i<=r;++i)s[i]&&(o=De(null,n,i),o&&(s[i].M=o,Fe(l,o,e)))},Ge=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.M;t&&t.remove()}}},Ve=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.O&&e.O&&(t.O=e.O),!0):t.O===e.O),Be=(t,e,n=!1)=>{const s=e.M=t.M,i=t.j,r=e.j,o=e.S,l=e.$;null===l?(Ie(t,e,_e="svg"===o||"foreignObject"!==o&&_e,n),null!==i&&null!==r?((t,e,n,s,i=!1)=>{let r,o,l=0,c=0,u=0,f=0,a=e.length-1,h=e[0],p=e[a],d=s.length-1,v=s[0],$=s[d];const m="template"===n.S?t.content:t;for(;l<=a&&c<=d;)if(null==h)h=e[++l];else if(null==p)p=e[--a];else if(null==v)v=s[++c];else if(null==$)$=s[--d];else if(Ve(h,v,i))Be(h,v,i),h=e[++l],v=s[++c];else if(Ve(p,$,i))Be(p,$,i),p=e[--a],$=s[--d];else if(Ve(h,$,i))Be(h,$,i),Fe(m,h.M,p.M.nextSibling),h=e[++l],$=s[--d];else if(Ve(p,v,i))Be(p,v,i),Fe(m,p.M,h.M),p=e[--a],v=s[++c];else{for(u=-1,f=l;f<=a;++f)if(e[f]&&null!==e[f].O&&e[f].O===v.O){u=f;break}u>=0?(o=e[u],o.S!==v.S?r=De(e&&e[c],n,u):(Be(o,v,i),e[u]=void 0,r=o.M),v=s[++c]):(r=De(e&&e[c],n,c),v=s[++c]),r&&Fe(h.M.parentNode,r,h.M)}l>a?Ue(t,null==s[d+1]?null:s[d+1].M,n,s,c,d):c>d&&Ge(e,l,a)})(s,i,e,r,n):null!==r?(null!==t.$&&(s.textContent=""),Ue(s,null,e,r,0,r.length-1)):n||null===i?n&&null!==i&&null===r&&(e.j=i):Ge(i,0,i.length-1),_e&&"svg"===o&&(_e=!1)):t.$!==l&&(s.data=l)},Fe=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Ze=(t,e)=>{if(e&&!t.C&&e["s-p"]){const n=e["s-p"].push(new Promise((s=>t.C=()=>{e["s-p"].splice(n-1,1),s()})))}},He=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);Ze(t,t.A);const n=()=>qe(t,e);if(!e)return ot(n);queueMicrotask((()=>{n()}))},qe=(t,e)=>{const n=t.$hostElement$,s=t.l;if(!s)throw 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 e?(t.L.length&&t.L.forEach((t=>t(n))),i=en(s,"componentWillLoad",void 0,n)):i=en(s,"componentWillUpdate",void 0,n),i=Je(i,(()=>en(s,"componentWillRender",void 0,n))),Je(i,(()=>Ke(t,s,e)))},Je=(t,e)=>Ye(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Ye=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ke=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.u,i=de(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&s&&(n["s-sc"]=i,n.classList.add(i+"-h"))})(t);Qe(t,e,i,n),r&&(r.map((t=>t())),i["s-rc"]=void 0);{const e=null!=(s=i["s-p"])?s:[],n=()=>Xe(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},Qe=(t,e,n,s)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const s=t.$hostElement$,i=t.I||be(null,null),r=(t=>t&&t.S===ge)(e)?e:me(null,null,e);if(Ee=s.tagName,n&&r.m)for(const t of Object.keys(r.m))s.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.m[t]=s[t]);r.S=null,r.u|=4,t.I=r,r.M=i.M=s.shadowRoot||s,Be(i,r,n)})(t,e,s)}catch(e){U(e,t.$hostElement$)}return null},Xe=t=>{const e=t.$hostElement$,n=t.l,s=t.A;en(n,"componentDidRender",void 0,e),64&t.u?en(n,"componentDidUpdate",void 0,e):(t.u|=64,nn(e),en(n,"componentDidLoad",void 0,e),t.T(e),s||tn()),t.C&&(t.C(),t.C=void 0),512&t.u&&rt((()=>He(t,!1))),t.u&=-517},tn=()=>{var t;rt((()=>Re(q,"appload",{detail:{namespace:"authhero-widget"}}))),(null==(t=J._)?void 0:t.size)&&J._.clear()},en=(t,e,n,s)=>{if(t&&t[e])try{return t[e](n)}catch(t){U(t,s)}},nn=t=>t.classList.add("hydrated"),sn=(t,e,n,s)=>{const i=T(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${s.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,o=i.o.get(e),l=i.u,c=i.l;if(n=xe(n,s.t[e][0]),!(8&l&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n))){if(i.o.set(e,n),s.D){const t=s.D[e];t&&t.map((t=>{try{const[[s,r]]=Object.entries(t);(128&l||1&r)&&(c?c[s](n,o,e):i.L.push((()=>{i.l[s](n,o,e)})))}catch(t){U(t,r)}}))}if(2==(18&l)){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(n,o,e))return;He(i,!1)}}},rn=(t,e,n)=>{var s,i;const r=t.prototype;{t.watchers&&!e.D&&(e.D=t.watchers),t.deserializers&&!e.U&&(e.U=t.deserializers),t.serializers&&!e.G&&(e.G=t.serializers);const o=Object.entries(null!=(s=e.t)?s:{});if(o.map((([t,[s]])=>{if(31&s||2&n&&32&s){const{get:i,set:o}=Object.getOwnPropertyDescriptor(r,t)||{};i&&(e.t[t][0]|=2048),o&&(e.t[t][0]|=4096),(1&n||!i)&&Object.defineProperty(r,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>T(this).o.get(e))(0,t);const n=T(this),s=n?n.l:r;if(!s)return;return s[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,t,{set(i){const r=T(this);if(r){if(o)return void 0===(32&s?this[t]:r.$hostElement$[t])&&r.o.get(t)&&(i=r.o.get(t)),o.call(this,xe(i,s)),void sn(this,t,i=32&s?this[t]:r.$hostElement$[t],e);{if(!(1&n&&4096&e.t[t][0]))return sn(this,t,i,e),void(1&n&&!r.l&&r.L.push((()=>{4096&e.t[t][0]&&r.l[t]!==r.o.get(t)&&(r.l[t]=i)})));const o=()=>{const n=r.l[t];!r.o.get(t)&&n&&r.o.set(t,n),r.l[t]=xe(i,s),sn(this,t,r.l[t],e)};r.l?o():r.L.push((()=>{o()}))}}}})}})),1&n){const n=new Map;r.attributeChangedCallback=function(t,s,i){J.jmp((()=>{var l;const c=n.get(t),u=T(this);if(this.hasOwnProperty(c)&&(i=this[c],delete this[c]),r.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==i)return;if(null==c){const n=null==u?void 0:u.u;if(u&&n&&!(8&n)&&i!==s){const r=u.l,o=null==(l=e.D)?void 0:l[t];null==o||o.forEach((e=>{const[[o,l]]=Object.entries(e);null!=r[o]&&(128&n||1&l)&&r[o].call(r,i,s,t)}))}return}const f=o.find((([t])=>t===c));f&&4&f[1][0]&&(i=null!==i&&"false"!==i);const a=Object.getOwnPropertyDescriptor(r,c);i==this[c]||a.get&&!a.set||(this[c]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=e.D)?i:{}),...o.filter((([t,e])=>31&e[0])).map((([t,e])=>{const s=e[1]||t;return n.set(s,t),s}))]))}}return t},on=(t,e)=>{en(t,"connectedCallback",void 0,e)},ln=t=>{if(!(1&J.u)){const e=T(t);if(!e)return;const n=e.i,s=()=>{};if(1&e.u)(null==e?void 0:e.l)?on(e.l,t):(null==e?void 0:e.V)&&e.V.then((()=>on(e.l,t)));else{let s;if(e.u|=1,s=t.getAttribute(B),s){if(1&n.u){const e=de(t.shadowRoot,n);t.classList.remove(e+"-h",e+"-s")}((t,e,n,s)=>{var i,r,o,l;const c=t.shadowRoot,u=[],f=[],a=c?[]:null,h=be(e,null);h.M=t,!q.document||J._&&J._.size||ye(q.document.body,J._=new Map),t[B]=n,t.removeAttribute(B),s.I=we(h,u,[],a,t,t,n,f);let p=0;const d=u.length;let v;for(;p<d;p++){v=u[p];const n=v.k+"."+v.N,s=J._.get(n),r=v.M;if(c){if((null==(i=v.S)?void 0:(""+i).includes("-"))&&"slot-fb"!==v.S&&!v.M.shadowRoot){const e=T(v.M);if(e){const n=ve(e.i),s=q.document.querySelector(`style[sty-id="${n}"]`);s&&t.shadowRoot.append(s.cloneNode(!0))}}}else r["s-hn"]=e.toUpperCase(),"slot"===v.S&&(r["s-cr"]=t["s-cr"]);"slot"===v.S&&(v.W=v.M["s-sn"]||v.M.name||null,v.j?(v.u|=2,v.M.childNodes.length||v.j.forEach((t=>{v.M.appendChild(t.M)}))):v.u|=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(v.N))),s&&!s["s-id"]&&J._.delete(n)}const $=[],m=f.length;let b,g,w,y,j=0,O=0;for(;j<m;j++)if(b=f[j],b&&b.length)for(w=b.length,g=0;g<w;g++){if(y=b[g],$[y.hostId]||($[y.hostId]=J._.get(y.hostId)),!$[y.hostId])continue;const t=$[y.hostId];t.shadowRoot&&y.node.parentElement!==t&&t.insertBefore(y.node,null==(o=null==(r=b[g-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]),fe(y.node,y.slot,0,y.node["s-oo"]||O),(null==(l=y.node.parentElement)?void 0:l.shadowRoot)&&y.node.getAttribute&&y.node.getAttribute("slot")&&y.node.removeAttribute("slot")),O=(y.node["s-oo"]||O)+1}if(c){let e=0;const n=a.length;if(n){for(;e<n;e++){const t=a[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.v,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"]){Ze(e,e.A=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.u)){if(e.u|=32,n.B){const i=((t,e)=>{const n=t.v.replace(/-/g,"_"),s=t.B;if(!s)return;const i=G.get(s);return i?i[n]:import(`./${s}.entry.js`).then((t=>(G.set(s,t),t[n])),(t=>{U(t,e.$hostElement$)}))
1
+ var t,e,n,s,i,r,o,l,c,u,f,a,h,p,d,v,$,m=Object.create,b=Object.defineProperty,g=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,y=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,O=t=>{throw TypeError(t)},S=(t,e)=>function(){return e||(0,t[w(t)[0]])((e={exports:{}}).exports,e),e.exports},M=(t,e,n)=>e.has(t)||O("Cannot "+n),k=(t,e,n)=>(M(t,e,"read from private field"),n?n.call(t):e.get(t)),E=(t,e,n)=>e.has(t)?O("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),x=(t,e,n)=>(M(t,e,"write to private field"),e.set(t,n),n),N=(t,e,n)=>(M(t,e,"access private method"),n),P=S({"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),u=n.indexOf(e,c+1),f=c;if(c>=0&&u>0){if(t===e)return[c,u];for(s=[],r=n.length;f>=0&&!l;)f==c?(s.push(f),c=n.indexOf(t,f+1)):1==s.length?l=[s.pop(),u]:((i=s.pop())<r&&(r=i,o=u),u=n.indexOf(e,f+1)),f=c<u&&c>=0?c:u;s.length&&(l=[r,o])}return l}e.exports=n,n.range=i}}),R=S({"node_modules/brace-expansion/index.js"(t,e){var n=P();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),v(function(t){return t.split("\\\\").join(s).split("\\{").join(i).split("\\}").join(r).split("\\,").join(o).split("\\.").join(l)}(t),!0).map(u)):[]};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 u(t){return t.split(s).join("\\").split(i).join("{").split(r).join("}").split(o).join(",").split(l).join(".")}function f(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=f(r);return r.length&&(o[o.length-1]+=l.shift(),o.push.apply(o,l)),e.push.apply(e,o),e}function a(t){return"{"+t+"}"}function h(t){return/^-?0\d/.test(t)}function p(t,e){return t<=e}function d(t,e){return t>=e}function v(t,e){var s=[],i=n("{","}",t);if(!i)return[t];var o=i.pre,l=i.post.length?v(i.post,!1):[""];if(/\$$/.test(i.pre))for(var u=0;u<l.length;u++)s.push(C=o+"{"+i.body+"}"+l[u]);else{var $,m,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),g=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),w=b||g,y=i.body.indexOf(",")>=0;if(!w&&!y)return i.post.match(/,(?!,).*\}/)?v(t=i.pre+"{"+i.body+r+i.post):[t];if(w)$=i.body.split(/\.\./);else if(1===($=f(i.body)).length&&1===($=v($[0],!1).map(a)).length)return l.map((function(t){return i.pre+$[0]+t}));if(w){var j=c($[0]),O=c($[1]),S=Math.max($[0].length,$[1].length),M=3==$.length?Math.abs(c($[2])):1,k=p;O<j&&(M*=-1,k=d);var E=$.some(h);m=[];for(var x=j;k(x,O);x+=M){var N;if(g)"\\"===(N=String.fromCharCode(x))&&(N="");else if(N=x+"",E){var P=S-N.length;if(P>0){var R=Array(P+1).join("0");N=x<0?"-"+R+N.slice(1):R+N}}m.push(N)}}else{m=[];for(var W=0;W<$.length;W++)m.push.apply(m,v($[W],!1))}for(W=0;W<m.length;W++)for(u=0;u<l.length;u++){var C=o+m[W]+l[u];(!e||w||C)&&s.push(C)}}return s}}}),W=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(W||{}),C=(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))(C||{}),A="type",L="value",z="serialized:",I=(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}}))},T=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},_=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.l=t,512&e.i.u&&I(t,e))},D=(t,e)=>e in t,U=(t,e)=>(0,console.error)(t,e),G=new Map,V=new Map,B="s-id",F="sty-id",Z="c-id",H="slot-fb{display:contents}slot-fb[hidden]{display:none}",q="undefined"!=typeof window?window:{},J={u:0,h:"",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=t=>Promise.resolve(t),K=(()=>{try{return!!q.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),Q=!!K&&(()=>!!q.document&&Object.getOwnPropertyDescriptor(q.document.adoptedStyleSheets,"length").writable)(),X=!1,tt=[],et=[],nt=(t,e)=>n=>{t.push(n),X||(X=!0,e&&4&J.u?rt(it):J.raf(it))},st=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){U(t)}t.length=0},it=()=>{st(tt),st(et),(X=tt.length>0)&&J.raf(it)},rt=t=>Y().then(t),ot=nt(et,!0),lt=t=>"object"==(t=typeof t)||"function"===t,ct=((t,e,n)=>(n=null!=t?m(y(t)):{},((t,e,n,s)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of w(e))j.call(t,n)||undefined===n||b(t,n,{get:()=>e[n],enumerable:!(s=g(e,n))||s.enumerable});return t})(b(n,"default",{value:t,enumerable:!0}),t)))(R()),ut=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},ft={"[: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,"\\$&"),ht=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),pt=t=>t.join(""),dt=(t,e)=>{const n=e;if("["!==t.charAt(n))throw Error("not in a brace expression");const s=[],i=[];let r=n+1,o=!1,l=!1,c=!1,u=!1,f=n,a="";t:for(;r<t.length;){const e=t.charAt(r);if("!"!==e&&"^"!==e||r!==n+1){if("]"===e&&o&&!c){f=r+1;break}if(o=!0,"\\"!==e||c){if("["===e&&!c)for(const[e,[o,c,u]]of Object.entries(ft))if(t.startsWith(e,r)){if(a)return["$.",!1,t.length-n,!0];r+=e.length,u?i.push(o):s.push(o),l=l||c;continue t}c=!1,a?(e>a?s.push(at(a)+"-"+at(e)):e===a&&s.push(at(e)),a="",r++):t.startsWith("-]",r+1)?(s.push(at(e+"-")),r+=2):t.startsWith("-",r+1)?(a=e,r+=2):(s.push(at(e)),r++)}else c=!0,r++}else u=!0,r++}if(f<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])&&!u){const t=2===s[0].length?s[0].slice(-1):s[0];return[ht(t),!1,f-n,!1]}const h="["+(u?"^":"")+pt(s)+"]",p="["+(u?"":"^")+pt(i)+"]";return[s.length&&i.length?"("+h+"|"+p+")":s.length?h:p,l,f-n,!0]},vt=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),$t=new Set(["!","?","+","*","@"]),mt=t=>$t.has(t),bt="(?!\\.)",gt=new Set(["[","."]),wt=new Set(["..","."]),yt=new Set("().*{}+?[]^$\\!"),jt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ot="[^/]",St=Ot+"*?",Mt=Ot+"+?",kt=class m{constructor(h,p,d={}){E(this,a),((t,e,n)=>{((t,e,n)=>{e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,e+"",n)})(this,"type"),E(this,t),E(this,e),E(this,n,!1),E(this,s,[]),E(this,i),E(this,r),E(this,o),E(this,l,!1),E(this,c),E(this,u),E(this,f,!1),this.type=h,h&&x(this,e,!0),x(this,i,p),x(this,t,k(this,i)?k(k(this,i),t):this),x(this,c,k(this,t)===this?d:k(k(this,t),c)),x(this,o,k(this,t)===this?[]:k(k(this,t),o)),"!"!==h||k(k(this,t),l)||k(this,o).push(this),x(this,r,k(this,i)?k(k(this,i),s).length:0)}get hasMagic(){if(void 0!==k(this,e))return k(this,e);for(const t of k(this,s))if("string"!=typeof t&&(t.type||t.hasMagic))return x(this,e,!0);return k(this,e)}toString(){return void 0!==k(this,u)?k(this,u):x(this,u,this.type?this.type+"("+k(this,s).map((t=>t+"")).join("|")+")":k(this,s).map((t=>t+"")).join(""))}push(...t){for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof m&&k(e,i)===this))throw Error("invalid part: "+e);k(this,s).push(e)}}toJSON(){var e;const n=null===this.type?k(this,s).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...k(this,s).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&n.unshift([]),this.isEnd()&&(this===k(this,t)||k(k(this,t),l)&&"!"===(null==(e=k(this,i))?void 0:e.type))&&n.push({}),n}isStart(){var e;if(k(this,t)===this)return!0;if(!(null==(e=k(this,i))?void 0:e.isStart()))return!1;if(0===k(this,r))return!0;const n=k(this,i);for(let t=0;t<k(this,r);t++){const e=k(n,s)[t];if(!(e instanceof m&&"!"===e.type))return!1}return!0}isEnd(){var e,n,o;if(k(this,t)===this)return!0;if("!"===(null==(e=k(this,i))?void 0:e.type))return!0;if(!(null==(n=k(this,i))?void 0:n.isEnd()))return!1;if(!this.type)return null==(o=k(this,i))?void 0:o.isEnd();const l=k(this,i)?k(k(this,i),s).length:0;return k(this,r)===l-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(t){const e=new m(this.type,t);for(const t of k(this,s))e.copyIn(t);return e}static fromGlob(t,e={}){var n;const s=new m(null,void 0,e);return N(n=m,p,d).call(n,t,s,0,e),s}toMMPattern(){if(this!==k(this,t))return k(this,t).toMMPattern();const n=""+this,[s,i,r,o]=this.toRegExpSource();if(!(r||k(this,e)||k(this,c).nocase&&!k(this,c).nocaseMagicOnly&&n.toUpperCase()!==n.toLowerCase()))return i;const l=(k(this,c).nocase?"i":"")+(o?"u":"");return Object.assign(RegExp(`^${s}$`,l),{_src:s,_glob:n})}get options(){return k(this,c)}toRegExpSource(r){var o;const u=null!=r?r:!!k(this,c).dot;if(k(this,t)===this&&N(this,a,h).call(this),!this.type){const c=this.isStart()&&this.isEnd(),f=k(this,s).map((t=>{var s;const[i,o,l,u]="string"==typeof t?N(s=m,p,$).call(s,t,k(this,e),c):t.toRegExpSource(r);return x(this,e,k(this,e)||l),x(this,n,k(this,n)||u),i})).join("");let a="";if(this.isStart()&&"string"==typeof k(this,s)[0]&&(1!==k(this,s).length||!wt.has(k(this,s)[0]))){const t=gt,e=u&&t.has(f.charAt(0))||f.startsWith("\\.")&&t.has(f.charAt(2))||f.startsWith("\\.\\.")&&t.has(f.charAt(4)),n=!u&&!r&&t.has(f.charAt(0));a=e?"(?!(?:^|/)\\.\\.?(?:$|/))":n?bt:""}let h="";return this.isEnd()&&k(k(this,t),l)&&"!"===(null==(o=k(this,i))?void 0:o.type)&&(h="(?:$|\\/)"),[a+f+h,vt(f),x(this,e,!!k(this,e)),k(this,n)]}const d="*"===this.type||"+"===this.type,b="!"===this.type?"(?:(?!(?:":"(?:";let g=N(this,a,v).call(this,u);if(this.isStart()&&this.isEnd()&&!g&&"!"!==this.type){const t=""+this;return x(this,s,[t]),this.type=null,x(this,e,void 0),[t,vt(""+this),!1,!1]}let w=!d||r||u?"":N(this,a,v).call(this,!0);w===g&&(w=""),w&&(g=`(?:${g})(?:${w})*?`);let y="";return y="!"===this.type&&k(this,f)?(this.isStart()&&!u?bt:"")+Mt:b+g+("!"===this.type?"))"+(!this.isStart()||u||r?"":bt)+St+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&w?")":"*"===this.type&&w?")?":")"+this.type),[y,vt(g),x(this,e,!!k(this,e)),k(this,n)]}};t=new WeakMap,e=new WeakMap,n=new WeakMap,s=new WeakMap,i=new WeakMap,r=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,f=new WeakMap,a=new WeakSet,h=function(){if(this!==k(this,t))throw Error("should only call on root");if(k(this,l))return this;let e;for(x(this,l,!0);e=k(this,o).pop();){if("!"!==e.type)continue;let t=e,n=k(t,i);for(;n;){for(let i=k(t,r)+1;!n.type&&i<k(n,s).length;i++)for(const t of k(e,s)){if("string"==typeof t)throw Error("string part in extglob AST??");t.copyIn(k(n,s)[i])}t=n,n=k(t,i)}}return this},p=new WeakSet,d=function(t,n,i,r){var o,l;let c=!1,u=!1,a=-1,h=!1;if(null===n.type){let e=i,s="";for(;e<t.length;){const i=t.charAt(e++);if(c||"\\"===i)c=!c,s+=i;else if(u)e===a+1?"^"!==i&&"!"!==i||(h=!0):"]"!==i||e===a+2&&h||(u=!1),s+=i;else if("["!==i)if(r.noext||!mt(i)||"("!==t.charAt(e))s+=i;else{n.push(s),s="";const l=new kt(i,n);e=N(o=kt,p,d).call(o,t,l,e,r),n.push(l)}else u=!0,a=e,h=!1,s+=i}return n.push(s),e}let v=i+1,$=new kt(null,n);const m=[];let b="";for(;v<t.length;){const e=t.charAt(v++);if(c||"\\"===e)c=!c,b+=e;else if(u)v===a+1?"^"!==e&&"!"!==e||(h=!0):"]"!==e||v===a+2&&h||(u=!1),b+=e;else if("["!==e)if(mt(e)&&"("===t.charAt(v)){$.push(b),b="";const n=new kt(e,$);$.push(n),v=N(l=kt,p,d).call(l,t,n,v,r)}else if("|"!==e){if(")"===e)return""===b&&0===k(n,s).length&&x(n,f,!0),$.push(b),b="",n.push(...m,$),v;b+=e}else $.push(b),b="",m.push($),$=new kt(null,n);else u=!0,a=v,h=!1,b+=e}return n.type=null,x(n,e,void 0),x(n,s,[t.substring(i-1)]),v},v=function(t){return k(this,s).map((e=>{if("string"==typeof e)throw Error("string type in extglob ast??");const[s,i,r,o]=e.toRegExpSource(t);return x(this,n,k(this,n)||o),s})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},$=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+=jt(l):(i+=Ot,e=!0):(i+=n&&"*"===t?Mt:St,e=!0)}else o===t.length-1?i+="\\\\":s=!0}return[i,vt(t),!!e,r]},E(kt,p);var Et=kt,xt=(t,e,n={})=>(ut(e),!(!n.nocomment&&"#"===e.charAt(0))&&new te(e,n).match(t)),Nt=/^\*+([^+@!?\*\[\(]*)$/,Pt=t=>e=>!e.startsWith(".")&&e.endsWith(t),Rt=t=>e=>e.endsWith(t),Wt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Ct=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),At=/^\*+\.\*+$/,Lt=t=>!t.startsWith(".")&&t.includes("."),zt=t=>"."!==t&&".."!==t&&t.includes("."),It=/^\.\*+$/,Tt=t=>"."!==t&&".."!==t&&t.startsWith("."),_t=/^\*+$/,Dt=t=>0!==t.length&&!t.startsWith("."),Ut=t=>0!==t.length&&"."!==t&&".."!==t,Gt=/^\?+([^+@!?\*\[\(]*)?$/,Vt=([t,e=""])=>{const n=Ht([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Bt=([t,e=""])=>{const n=qt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Ft=([t,e=""])=>{const n=qt([t]);return e?t=>n(t)&&t.endsWith(e):n},Zt=([t,e=""])=>{const n=Ht([t]);return e?t=>n(t)&&t.endsWith(e):n},Ht=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},qt=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},Jt="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";xt.sep="win32"===Jt?"\\":"/";var Yt=Symbol("globstar **");xt.GLOBSTAR=Yt,xt.filter=(t,e={})=>n=>xt(n,t,e);var Kt=(t,e={})=>Object.assign({},t,e);xt.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return xt;const e=xt;return Object.assign(((n,s,i={})=>e(n,s,Kt(t,i))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,Kt(t,n))}static defaults(n){return e.defaults(Kt(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n,s={}){super(e,n,Kt(t,s))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Kt(t,s))}},unescape:(n,s={})=>e.unescape(n,Kt(t,s)),escape:(n,s={})=>e.escape(n,Kt(t,s)),filter:(n,s={})=>e.filter(n,Kt(t,s)),defaults:n=>e.defaults(Kt(t,n)),makeRe:(n,s={})=>e.makeRe(n,Kt(t,s)),braceExpand:(n,s={})=>e.braceExpand(n,Kt(t,s)),match:(n,s,i={})=>e.match(n,s,Kt(t,i)),sep:e.sep,GLOBSTAR:Yt})};var Qt=(t,e={})=>(ut(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,ct.default)(t));xt.braceExpand=Qt,xt.makeRe=(t,e={})=>new te(t,e).makeRe(),xt.match=(t,e,n={})=>{const s=new te(e,n);return t=t.filter((t=>s.match(t))),s.options.nonull&&!t.length&&t.push(e),t};var Xt=/[?*]|[+@!]\(.*?\)|\[|\]/,te=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||Jt,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]&&Xt.test(t[2])||Xt.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 u=e[o],f=t[r];if(this.debug(e,u,f),!1===u)return!1;if(u===Yt){this.debug("GLOBSTAR",[e,u,f]);var a=r,h=o+1;if(h===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(;a<l;){var p=t[a];if(this.debug("\nglobstar while",t,a,e,h,p),this.matchOne(t.slice(a),e.slice(h),n))return this.debug("globstar found match!",a,l,p),!0;if("."===p||".."===p||!s.dot&&"."===p.charAt(0)){this.debug("dot detected!",t,a,e,h);break}this.debug("globstar swallow a segment, and continue"),a++}return!(!n||(this.debug("\n>>> no match, partial?",t,a,e,h),a!==l))}let i;if("string"==typeof u?(i=f===u,this.debug("string match",u,f,i)):(i=u.test(f),this.debug("pattern match",u,f,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 Error("wtf?")}braceExpand(){return Qt(this.pattern,this.options)}parse(t){ut(t);const e=this.options;if("**"===t)return Yt;if(""===t)return"";let n,s=null;(n=t.match(_t))?s=e.dot?Ut:Dt:(n=t.match(Nt))?s=(e.nocase?e.dot?Ct:Wt:e.dot?Rt:Pt)(n[1]):(n=t.match(Gt))?s=(e.nocase?e.dot?Bt:Vt:e.dot?Ft:Zt)(n):(n=t.match(At))?s=e.dot?zt:Lt:(n=t.match(It))&&(s=Tt);const i=Et.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=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))(t):t===Yt?Yt:t._src}));return e.forEach(((t,s)=>{const i=e[s+1],r=e[s-1];t===Yt&&r!==Yt&&(void 0===r?void 0!==i&&i!==Yt?e[s+1]="(?:\\/|"+n+"\\/)?"+i:e[s]=n:void 0===i?e[s-1]=r+"(?:\\/|"+n+")?":i!==Yt&&(e[s-1]=r+"(?:\\/|\\/"+n+"\\/)"+i,e[s+1]=Yt))})),e.filter((t=>t!==Yt)).join("/")})).join("|");const[r,o]=t.length>1?["(?:",")"]:["",""];i="^"+r+i+o+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=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 xt.defaults(t).Minimatch}};function ee(t){var e,n,s;return null!=(s=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?s:void 0}xt.AST=Et,xt.Minimatch=te,xt.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),xt.unescape=vt;var ne=class t{static fromLocalValue(e){const n=e[A],s=L in e?e[L]: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 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 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(A))return!1;const e=t[A];return!!Object.values({...W,...C}).includes(e)&&("null"===e||"undefined"===e||t.hasOwnProperty(L))}};((t,e)=>{for(var n in e)b(t,n,{get:e[n],enumerable:!0})})({},{err:()=>ie,map:()=>re,ok:()=>se,unwrap:()=>le,unwrapErr:()=>ce});var se=t=>({isOk:!0,isErr:!1,value:t}),ie=t=>({isOk:!1,isErr:!0,value:t});function re(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>se(t))):se(n)}if(t.isErr)return ie(t.value);throw"should never get here"}var oe,le=t=>{if(t.isOk)return t.value;throw t.value},ce=t=>{if(t.isErr)return t.value;throw t.value};function ue(){const t=this.attachShadow({mode:"open"});void 0===oe&&(oe=null),oe&&(Q?t.adoptedStyleSheets.push(oe):t.adoptedStyleSheets=[...t.adoptedStyleSheets,oe])}var fe=(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=ae(r,"appendChild");if(void 0!==s){i["s-oo"]=s;const t=ae(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 ae(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 he=new WeakMap,pe=(t,e,n)=>{let s=V.get(t);K&&n?(s=s||new CSSStyleSheet,"string"==typeof s?s=e:s.replaceSync(e)):s=e,V.set(t,s)},de=(t,e)=>{var n,s,i;const r=ve(e),o=V.get(r);if(!q.document)return r;if(t=11===t.nodeType?t:q.document,o)if("string"==typeof o){let i,l=he.get(t=t.head||t);l||he.set(t,l=new Set);const c=t.querySelector(`[${F}="${r}"]`);if(c)c.innerHTML=o;else if(!l.has(r)){i=q.document.createElement("style"),i.innerHTML=o;const c=null!=(n=J.p)?n:ee(q.document);if(null!=c&&i.setAttribute("nonce",c),!(1&e.u))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(K){const e=new(null!=(s=t.defaultView)?s:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(o),Q?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.u&&t.insertBefore(i,null),4&e.u&&(i.innerHTML+=H),l&&l.add(r)}}else{let e=he.get(t);if(e||he.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)}Q?t.adoptedStyleSheets.push(s):t.adoptedStyleSheets=[...t.adoptedStyleSheets,s],e.add(r)}}return r},ve=t=>"sc-"+t.v,$e=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),me=(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&&!lt(s))&&(s+=""),r&&o?l[l.length-1].$+=s:l.push(r?be(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 u=be(t,null);return u.m=e,l.length>0&&(u.j=l),u.O=i,u},be=(t,e)=>({u:0,S:t,$:e,M:null,j:null,m:null,O:null}),ge={},we=(t,e,n,s,i,r,o,l=[])=>{let c,u,f,a;if(1===r.nodeType){if(c=r.getAttribute(Z),c&&(u=c.split("."),u[0]===o||"0"===u[0])){f=je({u:0,k:u[0],N:u[1],P:u[2],R:u[3],S:r.tagName.toLowerCase(),M:r,m:{class:r.className||""}}),e.push(f),r.removeAttribute(Z),t.j||(t.j=[]);const i=f.M.getAttribute("s-sn");"string"==typeof i&&("slot-fb"===f.S&&Oe(i,u[2],f,r,t,e,n,s,l),f.M["s-sn"]=i,f.M.removeAttribute("s-sn")),void 0!==f.R&&(t.j[f.R]=f),t=f,s&&"0"===f.P&&(s[f.R]=f.M)}if(r.shadowRoot)for(a=r.shadowRoot.childNodes.length-1;a>=0;a--)we(t,e,n,s,i,r.shadowRoot.childNodes[a],o,l);const h=r.__childNodes||r.childNodes;for(a=h.length-1;a>=0;a--)we(t,e,n,s,i,h[a],o,l)}else if(8===r.nodeType)u=r.nodeValue.split("."),(u[1]===o||"0"===u[1])&&(c=u[0],f=je({k:u[1],N:u[2],P:u[3],R:u[4]||"0",M:r,m:null,j:null,O:null,W:null,S:null,$:null}),"t"===c?(f.M=Me(r,3),f.M&&3===f.M.nodeType&&(f.$=f.M.textContent,e.push(f),r.remove(),o===f.k&&(t.j||(t.j=[]),t.j[f.R]=f),s&&"0"===f.P&&(s[f.R]=f.M))):"c"===c?(f.M=Me(r,8),f.M&&8===f.M.nodeType&&(e.push(f),r.remove())):f.k===o&&("s"===c?Oe(r["s-sn"]=u[5]||"",u[2],f,r,t,e,n,s,l):"r"===c&&s&&r.remove()));else if(t&&"style"===t.S){const e=be(null,r.textContent);e.M=r,e.R="0",t.j=[e]}return t},ye=(t,e)=>{if(1===t.nodeType){const n=t[B]||t.getAttribute(B);n&&e.set(n,t);let s=0;if(t.shadowRoot)for(;s<t.shadowRoot.childNodes.length;s++)ye(t.shadowRoot.childNodes[s],e);const i=t.__childNodes||t.childNodes;for(s=0;s<i.length;s++)ye(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])}},je=t=>({u:0,k:null,N:null,P:null,R:"0",M:null,m:null,j:null,O:null,W:null,S:null,$:null,...t});function Oe(t,e,n,s,i,r,o,l,c){s["s-sr"]=!0,n.W=t||null,n.S="slot";const u=(null==i?void 0:i.M)?i.M["s-id"]||i.M.getAttribute("s-id"):"";if(l&&q.document){const r=n.M=q.document.createElement(n.S);n.W&&n.M.setAttribute("name",t),i.M.shadowRoot&&u&&u!==n.k?ae(i.M,"insertBefore")(r,ae(i.M,"children")[0]):ae(ae(s,"parentNode"),"insertBefore")(r,s),Se(c,e,t,s,n.k),s.remove(),"0"===n.P&&(l[n.R]=n.M)}else{const r=n.M,o=u&&u!==n.k&&i.M.shadowRoot;Se(c,e,t,s,o?u:n.k),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.M.insertBefore(r,i.M.children[0])}r.push(n),o.push(n),i.j||(i.j=[]),i.j[n.R]=n}var Se=(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.")))},Me=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n},ke=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};ke("::slotted"),ke(":host"),ke(":host-context");var Ee,xe=(t,e)=>"string"==typeof t&&t.startsWith(z)?t=function(t){return"string"==typeof t&&t.startsWith(z)?ne.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||lt(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t,Ne=t=>{var e;return null==(e=T(t))?void 0:e.$hostElement$},Pe=(t,e)=>{const n=Ne(t);return{emit:t=>Re(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Re=(t,e,n)=>{const s=J.ce(e,n);return t.dispatchEvent(s),s},We=(t,e,n,s,i,r,o)=>{if(n===s)return;let l=D(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,i=Ae(n);let r=Ae(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("style"===e){for(const e in n)s&&null!=s[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in s)n&&s[e]===n[e]||(e.includes("-")?t.style.setProperty(e,s[e]):t.style[e]=s[e])}else if("key"===e);else if(l||"o"!==e[0]||"n"!==e[1]){const o=lt(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):D(q,c)?c.slice(2):c[2]+e.slice(3),n||s){const i=e.endsWith(Le);e=e.replace(ze,""),n&&J.rel(t,e,n,i),s&&J.ael(t,e,s,i)}},Ce=/\s/,Ae=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(Ce):[]),Le="Capture",ze=RegExp(Le+"$"),Ie=(t,e,n,s)=>{const i=11===e.M.nodeType&&e.M.host?e.M.host:e.M,r=t&&t.m||{},o=e.m||{};for(const t of Te(Object.keys(r)))t in o||We(i,t,r[t],void 0,n,e.u,s);for(const t of Te(Object.keys(o)))We(i,t,r[t],o[t],n,e.u,s)};function Te(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var _e=!1,De=(t,e,n)=>{const s=e.j[n];let i,r,o=0;if(null!==s.$)i=s.M=q.document.createTextNode(s.$);else{if(_e||(_e="svg"===s.S),!q.document)throw 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.M=q.document.createElementNS(_e?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.S),_e&&"foreignObject"===s.S&&(_e=!1),Ie(null,s,_e),s.j){const e="template"===s.S?i.content:i;for(o=0;o<s.j.length;++o)r=De(t,s,o),r&&e.appendChild(r)}"svg"===s.S?_e=!1:"foreignObject"===i.tagName&&(_e=!0)}return i["s-hn"]=Ee,i},Ue=(t,e,n,s,i,r)=>{let o,l=t;for(l.shadowRoot&&l.tagName===Ee&&(l=l.shadowRoot),"template"===n.S&&(l=l.content);i<=r;++i)s[i]&&(o=De(null,n,i),o&&(s[i].M=o,Fe(l,o,e)))},Ge=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.M;t&&t.remove()}}},Ve=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.O&&e.O&&(t.O=e.O),!0):t.O===e.O),Be=(t,e,n=!1)=>{const s=e.M=t.M,i=t.j,r=e.j,o=e.S,l=e.$;null===l?(Ie(t,e,_e="svg"===o||"foreignObject"!==o&&_e,n),null!==i&&null!==r?((t,e,n,s,i=!1)=>{let r,o,l=0,c=0,u=0,f=0,a=e.length-1,h=e[0],p=e[a],d=s.length-1,v=s[0],$=s[d];const m="template"===n.S?t.content:t;for(;l<=a&&c<=d;)if(null==h)h=e[++l];else if(null==p)p=e[--a];else if(null==v)v=s[++c];else if(null==$)$=s[--d];else if(Ve(h,v,i))Be(h,v,i),h=e[++l],v=s[++c];else if(Ve(p,$,i))Be(p,$,i),p=e[--a],$=s[--d];else if(Ve(h,$,i))Be(h,$,i),Fe(m,h.M,p.M.nextSibling),h=e[++l],$=s[--d];else if(Ve(p,v,i))Be(p,v,i),Fe(m,p.M,h.M),p=e[--a],v=s[++c];else{for(u=-1,f=l;f<=a;++f)if(e[f]&&null!==e[f].O&&e[f].O===v.O){u=f;break}u>=0?(o=e[u],o.S!==v.S?r=De(e&&e[c],n,u):(Be(o,v,i),e[u]=void 0,r=o.M),v=s[++c]):(r=De(e&&e[c],n,c),v=s[++c]),r&&Fe(h.M.parentNode,r,h.M)}l>a?Ue(t,null==s[d+1]?null:s[d+1].M,n,s,c,d):c>d&&Ge(e,l,a)})(s,i,e,r,n):null!==r?(null!==t.$&&(s.textContent=""),Ue(s,null,e,r,0,r.length-1)):n||null===i?n&&null!==i&&null===r&&(e.j=i):Ge(i,0,i.length-1),_e&&"svg"===o&&(_e=!1)):t.$!==l&&(s.data=l)},Fe=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Ze=(t,e)=>{if(e&&!t.C&&e["s-p"]){const n=e["s-p"].push(new Promise((s=>t.C=()=>{e["s-p"].splice(n-1,1),s()})))}},He=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);Ze(t,t.A);const n=()=>qe(t,e);if(!e)return ot(n);queueMicrotask((()=>{n()}))},qe=(t,e)=>{const n=t.$hostElement$,s=t.l;if(!s)throw 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 e?(t.L.length&&t.L.forEach((t=>t(n))),i=en(s,"componentWillLoad",void 0,n)):i=en(s,"componentWillUpdate",void 0,n),i=Je(i,(()=>en(s,"componentWillRender",void 0,n))),Je(i,(()=>Ke(t,s,e)))},Je=(t,e)=>Ye(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Ye=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ke=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.u,i=de(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&s&&(n["s-sc"]=i,n.classList.add(i+"-h"))})(t);Qe(t,e,i,n),r&&(r.map((t=>t())),i["s-rc"]=void 0);{const e=null!=(s=i["s-p"])?s:[],n=()=>Xe(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},Qe=(t,e,n,s)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const s=t.$hostElement$,i=t.I||be(null,null),r=(t=>t&&t.S===ge)(e)?e:me(null,null,e);if(Ee=s.tagName,n&&r.m)for(const t of Object.keys(r.m))s.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.m[t]=s[t]);r.S=null,r.u|=4,t.I=r,r.M=i.M=s.shadowRoot||s,Be(i,r,n)})(t,e,s)}catch(e){U(e,t.$hostElement$)}return null},Xe=t=>{const e=t.$hostElement$,n=t.l,s=t.A;en(n,"componentDidRender",void 0,e),64&t.u?en(n,"componentDidUpdate",void 0,e):(t.u|=64,nn(e),en(n,"componentDidLoad",void 0,e),t.T(e),s||tn()),t.C&&(t.C(),t.C=void 0),512&t.u&&rt((()=>He(t,!1))),t.u&=-517},tn=()=>{var t;rt((()=>Re(q,"appload",{detail:{namespace:"authhero-widget"}}))),(null==(t=J._)?void 0:t.size)&&J._.clear()},en=(t,e,n,s)=>{if(t&&t[e])try{return t[e](n)}catch(t){U(t,s)}},nn=t=>t.classList.add("hydrated"),sn=(t,e,n,s)=>{const i=T(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${s.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,o=i.o.get(e),l=i.u,c=i.l;if(n=xe(n,s.t[e][0]),!(8&l&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n))){if(i.o.set(e,n),s.D){const t=s.D[e];t&&t.map((t=>{try{const[[s,r]]=Object.entries(t);(128&l||1&r)&&(c?c[s](n,o,e):i.L.push((()=>{i.l[s](n,o,e)})))}catch(t){U(t,r)}}))}if(2==(18&l)){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(n,o,e))return;He(i,!1)}}},rn=(t,e,n)=>{var s,i;const r=t.prototype;{t.watchers&&!e.D&&(e.D=t.watchers),t.deserializers&&!e.U&&(e.U=t.deserializers),t.serializers&&!e.G&&(e.G=t.serializers);const o=Object.entries(null!=(s=e.t)?s:{});if(o.map((([t,[s]])=>{if(31&s||2&n&&32&s){const{get:i,set:o}=Object.getOwnPropertyDescriptor(r,t)||{};i&&(e.t[t][0]|=2048),o&&(e.t[t][0]|=4096),(1&n||!i)&&Object.defineProperty(r,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>T(this).o.get(e))(0,t);const n=T(this),s=n?n.l:r;if(!s)return;return s[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,t,{set(i){const r=T(this);if(r){if(o)return void 0===(32&s?this[t]:r.$hostElement$[t])&&r.o.get(t)&&(i=r.o.get(t)),o.call(this,xe(i,s)),void sn(this,t,i=32&s?this[t]:r.$hostElement$[t],e);{if(!(1&n&&4096&e.t[t][0]))return sn(this,t,i,e),void(1&n&&!r.l&&r.L.push((()=>{4096&e.t[t][0]&&r.l[t]!==r.o.get(t)&&(r.l[t]=i)})));const o=()=>{const n=r.l[t];!r.o.get(t)&&n&&r.o.set(t,n),r.l[t]=xe(i,s),sn(this,t,r.l[t],e)};r.l?o():r.L.push((()=>{o()}))}}}})}})),1&n){const n=new Map;r.attributeChangedCallback=function(t,s,i){J.jmp((()=>{var l;const c=n.get(t),u=T(this);if(this.hasOwnProperty(c)&&(i=this[c],delete this[c]),r.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==i)return;if(null==c){const n=null==u?void 0:u.u;if(u&&n&&!(8&n)&&i!==s){const r=u.l,o=null==(l=e.D)?void 0:l[t];null==o||o.forEach((e=>{const[[o,l]]=Object.entries(e);null!=r[o]&&(128&n||1&l)&&r[o].call(r,i,s,t)}))}return}const f=o.find((([t])=>t===c));f&&4&f[1][0]&&(i=null!==i&&"false"!==i);const a=Object.getOwnPropertyDescriptor(r,c);i==this[c]||a.get&&!a.set||(this[c]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=e.D)?i:{}),...o.filter((([t,e])=>31&e[0])).map((([t,e])=>{const s=e[1]||t;return n.set(s,t),s}))]))}}return t},on=(t,e)=>{en(t,"connectedCallback",void 0,e)},ln=t=>{if(!(1&J.u)){const e=T(t);if(!e)return;const n=e.i,s=()=>{};if(1&e.u)(null==e?void 0:e.l)?on(e.l,t):(null==e?void 0:e.V)&&e.V.then((()=>on(e.l,t)));else{let s;if(e.u|=1,s=t.getAttribute(B),s){if(1&n.u){const e=de(t.shadowRoot,n);t.classList.remove(e+"-h",e+"-s")}((t,e,n,s)=>{var i,r,o,l;const c=t.shadowRoot,u=[],f=[],a=c?[]:null,h=be(e,null);h.M=t,!q.document||J._&&J._.size||ye(q.document.body,J._=new Map),t[B]=n,t.removeAttribute(B),s.I=we(h,u,[],a,t,t,n,f);let p=0;const d=u.length;let v;for(;p<d;p++){v=u[p];const n=v.k+"."+v.N,s=J._.get(n),r=v.M;if(c){if((null==(i=v.S)?void 0:(""+i).includes("-"))&&"slot-fb"!==v.S&&!v.M.shadowRoot){const e=T(v.M);if(e){const n=ve(e.i),s=q.document.querySelector(`style[sty-id="${n}"]`);s&&t.shadowRoot.append(s.cloneNode(!0))}}}else r["s-hn"]=e.toUpperCase(),"slot"===v.S&&(r["s-cr"]=t["s-cr"]);"slot"===v.S&&(v.W=v.M["s-sn"]||v.M.name||null,v.j?(v.u|=2,v.M.childNodes.length||v.j.forEach((t=>{v.M.appendChild(t.M)}))):v.u|=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(v.N))),s&&!s["s-id"]&&J._.delete(n)}const $=[],m=f.length;let b,g,w,y,j=0,O=0;for(;j<m;j++)if(b=f[j],b&&b.length)for(w=b.length,g=0;g<w;g++){if(y=b[g],$[y.hostId]||($[y.hostId]=J._.get(y.hostId)),!$[y.hostId])continue;const t=$[y.hostId];t.shadowRoot&&y.node.parentElement!==t&&t.insertBefore(y.node,null==(o=null==(r=b[g-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]),fe(y.node,y.slot,0,y.node["s-oo"]||O),(null==(l=y.node.parentElement)?void 0:l.shadowRoot)&&y.node.getAttribute&&y.node.getAttribute("slot")&&y.node.removeAttribute("slot")),O=(y.node["s-oo"]||O)+1}if(c){let e=0;const n=a.length;if(n){for(;e<n;e++){const t=a[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.v,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"]){Ze(e,e.A=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.u)){if(e.u|=32,n.B){const i=((t,e)=>{const n=t.v.replace(/-/g,"_"),s=t.B;if(!s)return;const i=G.get(s);return i?i[n]:import(`./${s}.entry.js`).then((t=>(G.set(s,t),t[n])),(t=>{U(t,e.$hostElement$)}))
2
2
  /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(i&&"then"in i){const t=()=>{};s=await i,t()}else s=i;if(!s)throw Error(`Constructor for "${n.v}#${e.F}" was not found`);s.isProxied||(n.D=s.watchers,n.G=s.serializers,n.U=s.deserializers,rn(s,n,2),s.isProxied=!0);const r=()=>{};e.u|=8;try{new s(e)}catch(e){U(e,t)}e.u&=-9,e.u|=128,r(),on(e.l,t)}else s=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(s&&s.style){let t;"string"==typeof s.style&&(t=s.style);const e=ve(n);if(!V.has(e)){const s=()=>{};pe(e,t,!!(1&n.u)),s()}}}const i=e.A,r=()=>He(e,!0);i&&i["s-rc"]?i["s-rc"].push(r):r()})(t,e,n)}s()}},cn=(t,e)=>{en(t,"disconnectedCallback",void 0,e||t)},un=(t,e={})=>{var n;if(!q.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const s=[],i=e.exclude||[],r=q.customElements,o=q.document.head,l=o.querySelector("meta[charset]"),c=q.document.createElement("style"),u=[];let f,a=!0;Object.assign(J,e),J.h=new URL(e.resourcesUrl||"./",q.document.baseURI).href,J.u|=2,(()=>{if(!q.document)return;const t=q.document.querySelectorAll(`[${F}]`);let e=0;for(;e<t.length;e++)pe(t[e].getAttribute(F),$e(t[e].innerHTML),!0)})();let h=!1;if(t.map((t=>{t[1].map((e=>{var n,o,l;const c={u:e[0],v:e[1],t:e[2],Z:e[3]};4&c.u&&(h=!0),c.t=e[2],c.D=null!=(n=e[4])?n:{},c.G=null!=(o=e[5])?o:{},c.U=null!=(l=e[6])?l:{};const p=c.v,d=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,e)=>{const n={u:0,$hostElement$:t,i:e,o:new Map,H:new Map};n.V=new Promise((t=>n.T=t)),t["s-p"]=[],t["s-rc"]=[],n.L=[];const s=n;t.__stencil__getHostRef=()=>s})(t=this,c),1&c.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else ue.call(t,c)}connectedCallback(){T(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),f&&(clearTimeout(f),f=null),a?u.push(this):J.jmp((()=>ln(this))))}disconnectedCallback(){J.jmp((()=>(async t=>{if(!(1&J.u)){const e=T(t);(null==e?void 0:e.l)?cn(e.l,t):(null==e?void 0:e.V)&&e.V.then((()=>cn(e.l,t)))}he.has(t)&&he.delete(t),t.shadowRoot&&he.has(t.shadowRoot)&&he.delete(t.shadowRoot)})(this))),J.raf((()=>{var t;const e=T(this);if(!e)return;const n=u.findIndex((t=>t===this));n>-1&&u.splice(n,1),(null==(t=null==e?void 0:e.I)?void 0:t.M)instanceof Node&&!e.I.M.isConnected&&delete e.I.M}))}componentOnReady(){var t;return null==(t=T(this))?void 0:t.V}};c.B=t[0],i.includes(p)||r.get(p)||(s.push(p),r.define(p,rn(d,c,1)))}))})),s.length>0&&(h&&(c.textContent+=H),c.textContent+=s.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",c.innerHTML.length)){c.setAttribute("data-styles","");const t=null!=(n=J.p)?n:ee(q.document);null!=t&&c.setAttribute("nonce",t),o.insertBefore(c,l?l.nextSibling:o.firstChild)}a=!1,u.length?u.map((t=>t.connectedCallback())):J.jmp((()=>f=setTimeout(tn,30)))},fn=t=>J.p=t;export{un as b,Pe as c,Ne as g,me as h,Y as p,_ as r,fn as s}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,g as i,h as s}from"./p-BFP_5sHV.js";function o(t){const e=t.match(/^#([0-9a-f]{3})$/i)||t.match(/^#([0-9a-f]{6})$/i);if(!e)return null;let i=e[1];3===i.length&&(i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]);const s=parseInt(i,16);return[s>>16&255,s>>8&255,255&s]}function n(t){const e=o(t);if(!e)return NaN;const[i,s,n]=e.map((t=>{const e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*i+.7152*s+.0722*n}function r(t,e){const i=n(t),s=n(e);return isNaN(i)||isNaN(s)?NaN:(Math.max(i,s)+.05)/(Math.min(i,s)+.05)}function a(t,e="light"){const i=r(t,"#000000"),s=r(t,"#ffffff");return"light"===e?i>1.35*s?"#000000":"#ffffff":1.35*i>s?"#000000":"#ffffff"}function c(t,e){const i=o(t);if(!i)return t;const[s,n,r]=i,a=t=>Math.max(0,Math.round(t*(1-e))).toString(16).padStart(2,"0");return`#${a(s)}${a(n)}${a(r)}`}function h(t,e){const i=o(t);if(!i)return t;const[s,n,r]=i,a=t=>Math.min(255,Math.round(t+(255-t)*e)).toString(16).padStart(2,"0");return`#${a(s)}${a(n)}${a(r)}`}function l(t,e){if(void 0!==e)return`${e}px`;switch(t){case"pill":return"9999px";case"rounded":return"8px";case"sharp":return"0";default:return}}function d(t){if(!t)return{};const e={};if(t.colors?.primary&&(e["--ah-color-primary"]=t.colors.primary,e["--ah-color-primary-hover"]=t.colors.primary),t.colors?.page_background){const i=t.colors.page_background;"solid"===i.type&&i.start?e["--ah-page-bg"]=i.start:"gradient"===i.type&&i.start&&i.end&&(e["--ah-page-bg"]=`linear-gradient(${i.angle_deg??180}deg, ${i.start}, ${i.end})`)}return t.logo_url&&(e["--ah-logo-url"]=`url(${t.logo_url})`),t.font?.url&&(e["--ah-font-url"]=t.font.url),e}function f(t){if(!t)return{};const e={};if(t.borders){const i=t.borders;void 0!==i.widget_corner_radius&&(e["--ah-widget-radius"]=`${i.widget_corner_radius}px`),void 0!==i.widget_border_weight&&(e["--ah-widget-border-width"]=`${i.widget_border_weight}px`),!1===i.show_widget_shadow&&(e["--ah-widget-shadow"]="none");const s=l(i.buttons_style,i.button_border_radius);s&&(e["--ah-btn-radius"]=s),void 0!==i.button_border_weight&&(e["--ah-btn-border-width"]=`${i.button_border_weight}px`);const o=l(i.inputs_style,i.input_border_radius);o&&(e["--ah-input-radius"]=o),void 0!==i.input_border_weight&&(e["--ah-input-border-width"]=`${i.input_border_weight}px`)}if(t.colors){const i=t.colors;if(i.primary_button)if(e["--ah-color-primary"]=i.primary_button,e["--ah-color-primary-hover"]=i.primary_button,i.primary_button_label&&r(i.primary_button_label,i.primary_button)>=4.5)e["--ah-color-text-on-primary"]=i.primary_button_label;else{e["--ah-color-text-on-primary"]=a(i.primary_button,"light");const t=a(i.primary_button,"dark");t!==e["--ah-color-text-on-primary"]&&(e["--ah-color-text-on-primary-dark"]=t)}else i.primary_button_label&&(e["--ah-color-text-on-primary"]=i.primary_button_label);i.secondary_button_border&&(e["--ah-btn-secondary-border"]=i.secondary_button_border),i.secondary_button_label&&(e["--ah-btn-secondary-text"]=i.secondary_button_label),i.body_text&&(e["--ah-color-text"]=i.body_text),i.header&&(e["--ah-color-text-header"]=i.header),i.input_labels_placeholders&&(e["--ah-color-text-label"]=i.input_labels_placeholders,e["--ah-color-text-muted"]=i.input_labels_placeholders),i.input_filled_text&&(e["--ah-color-input-text"]=i.input_filled_text),i.widget_background&&(e["--ah-color-bg"]=i.widget_background),i.input_background&&(e["--ah-color-input-bg"]=i.input_background),i.widget_border&&(e["--ah-widget-border-color"]=i.widget_border),i.input_border&&(e["--ah-color-border"]=i.input_border),i.links_focused_components&&(e["--ah-color-link"]=function(t,e,i=4.5){if(r(t,e)>=i)return t;const s=n(e)>.5;let o=t;for(let n=1;n<=10;n++)if(o=s?c(t,.1*n):h(t,.1*n),r(o,e)>=i)return o;return s?"#000000":"#ffffff"}(i.links_focused_components,i.widget_background||"#ffffff")),i.base_focus_color&&(e["--ah-color-focus-ring"]=i.base_focus_color),i.base_hover_color&&(e["--ah-color-primary-hover"]=i.base_hover_color),i.error&&(e["--ah-color-error"]=i.error),i.success&&(e["--ah-color-success"]=i.success),i.icons&&(e["--ah-color-icon"]=i.icons)}if(t.fonts){const i=t.fonts,s=i.reference_text_size||16,o=t=>t>=50?Math.round(t/100*s):t;i.font_url&&(e["--ah-font-url"]=i.font_url),i.reference_text_size&&(e["--ah-font-size-base"]=`${i.reference_text_size}px`),i.title?.size&&(e["--ah-font-size-title"]=`${o(i.title.size)}px`),i.subtitle?.size&&(e["--ah-font-size-subtitle"]=`${o(i.subtitle.size)}px`),i.body_text?.size&&(e["--ah-font-size-body"]=`${o(i.body_text.size)}px`),i.input_labels?.size&&(e["--ah-font-size-label"]=`${o(i.input_labels.size)}px`),i.buttons_text?.size&&(e["--ah-font-size-btn"]=`${o(i.buttons_text.size)}px`),i.links?.size&&(e["--ah-font-size-link"]=`${o(i.links.size)}px`),"underlined"===i.links_style&&(e["--ah-link-decoration"]="underline"),void 0!==i.title?.bold&&(e["--ah-font-weight-title"]=i.title.bold?"700":"400"),void 0!==i.subtitle?.bold&&(e["--ah-font-weight-subtitle"]=i.subtitle.bold?"700":"400"),void 0!==i.body_text?.bold&&(e["--ah-font-weight-body"]=i.body_text.bold?"700":"400"),void 0!==i.input_labels?.bold&&(e["--ah-font-weight-label"]=i.input_labels.bold?"700":"400"),void 0!==i.buttons_text?.bold&&(e["--ah-font-weight-btn"]=i.buttons_text.bold?"600":"400"),void 0!==i.links?.bold&&(e["--ah-font-weight-link"]=i.links.bold?"700":"400")}if(t.widget){const i=t.widget;if(i.header_text_alignment&&(e["--ah-title-align"]=i.header_text_alignment),i.logo_height&&(e["--ah-logo-height"]=`${i.logo_height}px`),i.logo_position){const t={center:"center",left:"flex-start",right:"flex-end"};"none"===i.logo_position?e["--ah-logo-display"]="none":e["--ah-logo-align"]=t[i.logo_position]??"center"}i.social_buttons_layout&&("top"===i.social_buttons_layout?(e["--ah-social-order"]="0",e["--ah-divider-order"]="1",e["--ah-fields-order"]="2"):(e["--ah-social-order"]="2",e["--ah-divider-order"]="1",e["--ah-fields-order"]="0"))}if(t.page_background){const i=t.page_background;i.background_color&&(e["--ah-page-bg"]=i.background_color),i.background_image_url&&(e["--ah-page-bg-image"]=`url(${i.background_image_url})`)}return e}const p={br:[],em:[],i:[],strong:[],b:[],u:[],span:["class"],a:["href","class"]};function u(t){if(!t)return"";if(!t.includes("<"))return t;let e=t;e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;");for(const[t,i]of Object.entries(p)){if("br"===t){e=e.replace(/&lt;br\s*\/?&gt;/gi,"<br>");continue}const s=new RegExp(`&lt;${t}((?:\\s+[a-z-]+(?:=&quot;[^&]*&quot;|=&#39;[^&]*&#39;)?)*)\\s*&gt;`,"gi");e=e.replace(s,((e,s)=>{const o=[];if(s){const t=s.replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">"),e=/([a-z-]+)=["']([^"']*)["']/gi;let n;for(;null!==(n=e.exec(t));){const[,t,e]=n;t&&i.includes(t.toLowerCase())&&("href"===t.toLowerCase()?g(e||"")&&o.push(`${t}="${x(e||"")}"`):o.push(`${t}="${x(e||"")}"`))}}"a"===t&&(o.push('target="_blank"'),o.push('rel="noopener noreferrer"'));const n=o.length?" "+o.join(" "):"";return`<${t}${n}>`}));const o=new RegExp(`&lt;/${t}&gt;`,"gi");e=e.replace(o,`</${t}>`)}return e}function g(t){if(!t)return!1;if(t.startsWith("/")||t.startsWith("#")||t.startsWith("?"))return!0;try{const e=new URL(t,"https://example.com");return"http:"===e.protocol||"https:"===e.protocol}catch{return!1}}function x(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const m=class{constructor(i){t(this,i),this.formSubmit=e(this,"formSubmit"),this.buttonClick=e(this,"buttonClick"),this.linkClick=e(this,"linkClick"),this.navigate=e(this,"navigate"),this.flowComplete=e(this,"flowComplete"),this.flowError=e(this,"flowError"),this.screenChange=e(this,"screenChange")}get el(){return i(this)}screen;apiUrl;baseUrl;state;screenId;watchScreenId(){this.updateDataScreenAttribute()}authParams;statePersistence="memory";storageKey="authhero_widget";branding;theme;loading=!1;autoSubmit=!1;autoNavigate;_screen;_authParams;_branding;_theme;formData={};formSubmit;buttonClick;linkClick;navigate;flowComplete;flowError;screenChange;watchScreen(t){if("string"==typeof t)try{this._screen=JSON.parse(t)}catch{console.error("Failed to parse screen JSON")}else this._screen=t;this._screen&&(this.formData={},this.initFormDataFromDefaults(this._screen),this.screenChange.emit(this._screen),this.updateDataScreenAttribute())}initFormDataFromDefaults(t){const e={};for(const i of t.components||[])if("config"in i&&i.config&&"default_value"in i.config&&i.config.default_value){const t=i.config.default_value;"string"==typeof t&&""!==t&&(e[i.id]=t)}Object.keys(e).length>0&&(this.formData={...e,...this.formData})}updateDataScreenAttribute(){const t=this._screen?.name||this.screenId;t?this.el.setAttribute("data-screen",t):this.el.removeAttribute("data-screen");const e=this.el.closest("[data-authhero-widget-container]");e&&(t?e.setAttribute("data-screen",t):e.removeAttribute("data-screen"))}watchBranding(t){if("string"==typeof t)try{this._branding=JSON.parse(t)}catch{console.error("Failed to parse branding JSON")}else this._branding=t;this.applyThemeStyles()}watchTheme(t){if("string"==typeof t)try{this._theme=JSON.parse(t)}catch{console.error("Failed to parse theme JSON")}else this._theme=t;this.applyThemeStyles()}watchAuthParams(t){if("string"==typeof t)try{this._authParams=JSON.parse(t)}catch{console.error("Failed to parse authParams JSON")}else this._authParams=t}applyThemeStyles(){const t=(e=this._theme,{...d(this._branding),...f(e)});var e;!function(t,e){Object.entries(e).forEach((([e,i])=>{t.style.setProperty(e,i)}))}(this.el,t)}focusFirstInput(){requestAnimationFrame((()=>{const t=this.el.shadowRoot;if(!t)return;const e=t.querySelectorAll("authhero-node");for(const t of Array.from(e)){const e=t.shadowRoot;if(e){const t=e.querySelector('input:not([type="hidden"]):not([type="checkbox"]):not([disabled]), textarea:not([disabled])');if(t)return void t.focus()}}}))}get shouldAutoNavigate(){return this.autoNavigate??this.autoSubmit}buildUrl(t){return this.baseUrl?new URL(t,this.baseUrl).toString():t}loadPersistedState(){if("url"===this.statePersistence){const t=new URL(window.location.href).searchParams.get("state");t&&!this.state&&(this.state=t)}else if("session"===this.statePersistence)try{const t=sessionStorage.getItem(`${this.storageKey}_state`);t&&!this.state&&(this.state=t);const e=sessionStorage.getItem(`${this.storageKey}_screenId`);e&&!this.screenId&&(this.screenId=e)}catch{}}persistState(){if("url"===this.statePersistence){const t=new URL(window.location.href);this.state&&t.searchParams.set("state",this.state),this.screenId&&t.searchParams.set("screen",this.screenId),window.history.replaceState({},"",t.toString())}else if("session"===this.statePersistence)try{this.state&&sessionStorage.setItem(`${this.storageKey}_state`,this.state),this.screenId&&sessionStorage.setItem(`${this.storageKey}_screenId`,this.screenId)}catch{}}handlePopState=t=>{if(!this.apiUrl)return;t.state?.state&&(this.state=t.state.state);const e=t.state?.screen??this.extractScreenIdFromHref(location.href);e&&this.fetchScreen(e)};connectedCallback(){window.addEventListener("popstate",this.handlePopState)}disconnectedCallback(){window.removeEventListener("popstate",this.handlePopState)}async componentWillLoad(){if(!this._screen){const t=this.screen||this.el?.getAttribute("screen");t&&this.watchScreen(t)}this._branding||this.watchBranding(this.branding),this._theme||this.watchTheme(this.theme),this._authParams||this.watchAuthParams(this.authParams),this.loadPersistedState(),this.apiUrl&&!this._screen&&await this.fetchScreen(this.screenId)}async fetchScreen(t,e){if(!this.apiUrl)return!1;const i=t||this.screenId;let s=this.apiUrl;i&&s.includes("{screenId}")&&(s=s.replace("{screenId}",encodeURIComponent(i)));const o=new URL(s,this.baseUrl||window.location.origin);this.state&&o.searchParams.set("state",this.state),e&&o.searchParams.set("nodeId",e),this.loading=!0;try{const t=await fetch(this.buildUrl(o.pathname+o.search),{credentials:"include",headers:{Accept:"application/json"}});if(t.ok){const e=await t.json();if(e.screen?(this._screen=e.screen,e.branding&&(this._branding=e.branding,this.applyThemeStyles()),e.state&&(this.state=e.state),e.screenId&&(this.screenId=e.screenId)):this._screen=e,this._screen)return i&&i!==this.screenId&&(this.screenId=i),this.initFormDataFromDefaults(this._screen),this.screenChange.emit(this._screen),this.updateDataScreenAttribute(),this.persistState(),this.focusFirstInput(),!0}else{const e=await t.json().catch((()=>({message:"Failed to load screen"})));this.flowError.emit({message:e.message||"Failed to load screen"})}}catch(t){console.error("Failed to fetch screen:",t),this.flowError.emit({message:t instanceof Error?t.message:"Failed to fetch screen"})}finally{this.loading=!1}return!1}handleInputChange=(t,e)=>{this.formData={...this.formData,[t]:e}};handleSubmit=async t=>{if(t.preventDefault(),this._screen&&(this.formSubmit.emit({screen:this._screen,data:this.formData}),this.autoSubmit)){this.loading=!0;try{const t=await fetch(this.buildUrl(this._screen.action),{method:this._screen.method,credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({data:this.formData})}),e=t.headers.get("content-type");if(e?.includes("application/json")){const e=await t.json();e.redirect?(this.flowComplete.emit({redirectUrl:e.redirect}),this.navigate.emit({url:e.redirect}),this.shouldAutoNavigate&&(window.location.href=e.redirect)):!t.ok&&e.screen?(this._screen=e.screen,this.initFormDataFromDefaults(e.screen),this.screenChange.emit(e.screen),this.updateDataScreenAttribute(),this.focusFirstInput()):e.screen?(this._screen=e.screen,this.formData={},this.initFormDataFromDefaults(e.screen),this.screenChange.emit(e.screen),this.updateDataScreenAttribute(),e.screenId&&(this.screenId=e.screenId),this.persistState(),e.navigateUrl&&this.shouldAutoNavigate&&window.history.pushState({screen:e.screenId,state:this.state},"",e.navigateUrl),e.branding&&(this._branding=e.branding,this.applyThemeStyles()),e.state&&(this.state=e.state,this.persistState()),this.focusFirstInput()):e.complete&&this.flowComplete.emit({})}}catch(t){console.error("Form submission failed:",t),this.flowError.emit({message:t instanceof Error?t.message:"Form submission failed"})}finally{this.loading=!1}}};handleButtonClick=t=>{if("submit"!==t.type)if(this.buttonClick.emit(t),"SOCIAL"===t.type&&t.value&&this.shouldAutoNavigate){const e=this.getProviderHref(t.value);if(e){const t=this.extractScreenIdFromHref(e);return void(t&&this.apiUrl?this.navigateToScreen(t,e):window.location.href=e)}this.handleSocialLogin(t.value)}else"RESEND_BUTTON"===t.type&&this.shouldAutoNavigate&&this.handleResend();else this.handleSubmit({preventDefault:()=>{}})};handleSocialLogin(t){const e=this._authParams||{},i={connection:t};this.state?i.state=this.state:e.state&&(i.state=e.state),e.client_id&&(i.client_id=e.client_id),e.redirect_uri&&(i.redirect_uri=e.redirect_uri),e.scope&&(i.scope=e.scope),e.audience&&(i.audience=e.audience),e.nonce&&(i.nonce=e.nonce),e.response_type&&(i.response_type=e.response_type);const s=this.buildUrl("/authorize?"+new URLSearchParams(i).toString());this.navigate.emit({url:s}),window.location.href=s}async handleResend(){if(this._screen?.action)try{const t=this._screen.action+(this._screen.action.includes("?")?"&":"?")+"action=resend";await fetch(this.buildUrl(t),{method:"POST",credentials:"include"})}catch(t){console.error("Resend failed:",t)}}extractScreenIdFromHref(t){try{const e=new URL(t,window.location.origin).pathname,i=e.match(/\/u2\/login\/([^/]+)$/);if(i)return i[1];const s=e.match(/\/u2\/([^/]+)$/);return s&&"login"!==s[1]&&"screen"!==s[1]?s[1]:null}catch{return null}}handleLinkClick=(t,e)=>{if(this.linkClick.emit({id:e.id,href:e.href,text:e.text}),!this.shouldAutoNavigate)return void t.preventDefault();const i=this.extractScreenIdFromHref(e.href);return i&&this.apiUrl?(t.preventDefault(),void this.navigateToScreen(i,e.href)):void 0};async navigateToScreen(t,e){await this.fetchScreen(t)?window.history.pushState({screen:t,state:this.state},"",e):window.location.href=e}getProviderHref(t){if(!this._screen)return null;for(const e of this._screen.components){const i=e;if("SOCIAL"===i.type&&i.config?.provider_details){const e=i.config.provider_details.find((e=>e.name===t));if(e?.href)return e.href}}return null}isSocialComponent(t){return"SOCIAL"===t.type}isDividerComponent(t){return"DIVIDER"===t.type}render(){const t=this._screen;if(this.loading&&!t)return s("div",{class:"widget-container"},s("div",{class:"loading-spinner"}));if(!t)return s("div",{class:"widget-container"},s("div",{class:"error-message"},"No screen configuration provided"));const e=t.messages?.filter((t=>"error"===t.type))||[],i=t.messages?.filter((t=>"success"===t.type))||[],o=[...t.components??[]].filter((t=>!1!==t.visible)).sort(((t,e)=>(t.order??0)-(e.order??0))),n=o.filter((t=>this.isSocialComponent(t))),r=o.filter((t=>!this.isSocialComponent(t)&&!this.isDividerComponent(t))),a=o.find((t=>this.isDividerComponent(t))),c=!!a,h=a?.config?.text||"Or",l=t=>{const e=t.config;return["social-buttons","button","button-secondary","button-social","button-social-content","button-social-text","button-social-subtitle","social-icon",...(e?.providers??[]).flatMap((t=>{const e=t.replace(/[^a-zA-Z0-9-]/g,"-");return[`button-social-${e}`,`button-social-content-${e}`,`button-social-text-${e}`,`button-social-subtitle-${e}`,`social-icon-${e}`]}))].join(", ")},d=this._theme?.widget?.logo_url||this._branding?.logo_url;return s("div",{class:"widget-container",part:"container","data-authstack-container":!0},s("header",{class:"widget-header",part:"header"},d&&s("div",{class:"logo-wrapper",part:"logo-wrapper"},s("img",{class:"logo",part:"logo",src:d,alt:"Logo"})),t.title&&s("h1",{class:"title",part:"title",innerHTML:u(t.title)}),t.description&&s("p",{class:"description",part:"description",innerHTML:u(t.description)})),s("div",{class:"widget-body",part:"body"},e.map((t=>s("div",{class:"message message-error",part:"message message-error",key:t.id??t.text},t.text))),i.map((t=>s("div",{class:"message message-success",part:"message message-success",key:t.id??t.text},t.text))),s("form",{onSubmit:this.handleSubmit,part:"form"},s("div",{class:"form-content"},n.length>0&&s("div",{class:"social-section",part:"social-section"},n.map((t=>s("authhero-node",{key:t.id,component:t,value:this.formData[t.id],onFieldChange:t=>this.handleInputChange(t.detail.id,t.detail.value),onButtonClick:t=>this.handleButtonClick(t.detail),disabled:this.loading,exportparts:l(t)})))),n.length>0&&r.length>0&&c&&s("div",{class:"divider",part:"divider"},s("span",{class:"divider-text"},h)),s("div",{class:"fields-section",part:"fields-section"},r.map((t=>s("authhero-node",{key:t.id,component:t,value:this.formData[t.id],onFieldChange:t=>this.handleInputChange(t.detail.id,t.detail.value),onButtonClick:t=>this.handleButtonClick(t.detail),disabled:this.loading})))))),t.links&&t.links.length>0&&s("div",{class:"links",part:"links"},t.links.map((t=>s("span",{class:"link-wrapper",part:"link-wrapper",key:t.id??t.href},t.linkText?s("span",null,t.text," ",s("a",{href:t.href,class:"link",part:"link",onClick:e=>this.handleLinkClick(e,{id:t.id,href:t.href,text:t.linkText||t.text})},t.linkText)):s("a",{href:t.href,class:"link",part:"link",onClick:e=>this.handleLinkClick(e,{id:t.id,href:t.href,text:t.text})},t.text))))),t.footer&&s("div",{class:"widget-footer",part:"footer",innerHTML:u(t.footer)})))}static get watchers(){return{screenId:[{watchScreenId:0}],screen:[{watchScreen:0}],branding:[{watchBranding:0}],theme:[{watchTheme:0}],authParams:[{watchAuthParams:0}]}}};m.style=":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, 16px);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 24px);color:var(--ah-color-header, #1e212a);line-height:1.2}.description{font-size:var(--ah-font-size-subtitle, 16px);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}}";export{m as authhero_widget}
@@ -0,0 +1 @@
1
+ import{r as e,c as a,h as o}from"./p-BFP_5sHV.js";const i=[{code:"US",dialCode:"+1",name:"United States"},{code:"CA",dialCode:"+1",name:"Canada"},{code:"AG",dialCode:"+1",name:"Antigua and Barbuda"},{code:"BS",dialCode:"+1",name:"Bahamas"},{code:"BB",dialCode:"+1",name:"Barbados"},{code:"DM",dialCode:"+1",name:"Dominica"},{code:"DO",dialCode:"+1",name:"Dominican Republic"},{code:"GD",dialCode:"+1",name:"Grenada"},{code:"JM",dialCode:"+1",name:"Jamaica"},{code:"KN",dialCode:"+1",name:"Saint Kitts and Nevis"},{code:"LC",dialCode:"+1",name:"Saint Lucia"},{code:"VC",dialCode:"+1",name:"Saint Vincent and the Grenadines"},{code:"TT",dialCode:"+1",name:"Trinidad and Tobago"},{code:"PR",dialCode:"+1",name:"Puerto Rico"},{code:"KZ",dialCode:"+7",name:"Kazakhstan"},{code:"RU",dialCode:"+7",name:"Russia"},{code:"EG",dialCode:"+20",name:"Egypt"},{code:"ZA",dialCode:"+27",name:"South Africa"},{code:"GR",dialCode:"+30",name:"Greece"},{code:"NL",dialCode:"+31",name:"Netherlands"},{code:"BE",dialCode:"+32",name:"Belgium"},{code:"FR",dialCode:"+33",name:"France"},{code:"ES",dialCode:"+34",name:"Spain"},{code:"HU",dialCode:"+36",name:"Hungary"},{code:"IT",dialCode:"+39",name:"Italy"},{code:"RO",dialCode:"+40",name:"Romania"},{code:"CH",dialCode:"+41",name:"Switzerland"},{code:"AT",dialCode:"+43",name:"Austria"},{code:"GB",dialCode:"+44",name:"United Kingdom"},{code:"DK",dialCode:"+45",name:"Denmark"},{code:"SE",dialCode:"+46",name:"Sweden"},{code:"NO",dialCode:"+47",name:"Norway"},{code:"PL",dialCode:"+48",name:"Poland"},{code:"DE",dialCode:"+49",name:"Germany"},{code:"PE",dialCode:"+51",name:"Peru"},{code:"MX",dialCode:"+52",name:"Mexico"},{code:"CU",dialCode:"+53",name:"Cuba"},{code:"AR",dialCode:"+54",name:"Argentina"},{code:"BR",dialCode:"+55",name:"Brazil"},{code:"CL",dialCode:"+56",name:"Chile"},{code:"CO",dialCode:"+57",name:"Colombia"},{code:"VE",dialCode:"+58",name:"Venezuela"},{code:"MY",dialCode:"+60",name:"Malaysia"},{code:"AU",dialCode:"+61",name:"Australia"},{code:"ID",dialCode:"+62",name:"Indonesia"},{code:"PH",dialCode:"+63",name:"Philippines"},{code:"NZ",dialCode:"+64",name:"New Zealand"},{code:"SG",dialCode:"+65",name:"Singapore"},{code:"TH",dialCode:"+66",name:"Thailand"},{code:"JP",dialCode:"+81",name:"Japan"},{code:"KR",dialCode:"+82",name:"South Korea"},{code:"VN",dialCode:"+84",name:"Vietnam"},{code:"CN",dialCode:"+86",name:"China"},{code:"TR",dialCode:"+90",name:"Turkey"},{code:"IN",dialCode:"+91",name:"India"},{code:"PK",dialCode:"+92",name:"Pakistan"},{code:"AF",dialCode:"+93",name:"Afghanistan"},{code:"LK",dialCode:"+94",name:"Sri Lanka"},{code:"MM",dialCode:"+95",name:"Myanmar"},{code:"IR",dialCode:"+98",name:"Iran"},{code:"SS",dialCode:"+211",name:"South Sudan"},{code:"MA",dialCode:"+212",name:"Morocco"},{code:"DZ",dialCode:"+213",name:"Algeria"},{code:"TN",dialCode:"+216",name:"Tunisia"},{code:"LY",dialCode:"+218",name:"Libya"},{code:"GM",dialCode:"+220",name:"Gambia"},{code:"SN",dialCode:"+221",name:"Senegal"},{code:"MR",dialCode:"+222",name:"Mauritania"},{code:"ML",dialCode:"+223",name:"Mali"},{code:"GN",dialCode:"+224",name:"Guinea"},{code:"CI",dialCode:"+225",name:"Ivory Coast"},{code:"BF",dialCode:"+226",name:"Burkina Faso"},{code:"NE",dialCode:"+227",name:"Niger"},{code:"TG",dialCode:"+228",name:"Togo"},{code:"BJ",dialCode:"+229",name:"Benin"},{code:"MU",dialCode:"+230",name:"Mauritius"},{code:"LR",dialCode:"+231",name:"Liberia"},{code:"SL",dialCode:"+232",name:"Sierra Leone"},{code:"GH",dialCode:"+233",name:"Ghana"},{code:"NG",dialCode:"+234",name:"Nigeria"},{code:"TD",dialCode:"+235",name:"Chad"},{code:"CF",dialCode:"+236",name:"Central African Republic"},{code:"CM",dialCode:"+237",name:"Cameroon"},{code:"CV",dialCode:"+238",name:"Cape Verde"},{code:"ST",dialCode:"+239",name:"São Tomé and Príncipe"},{code:"GQ",dialCode:"+240",name:"Equatorial Guinea"},{code:"GA",dialCode:"+241",name:"Gabon"},{code:"CG",dialCode:"+242",name:"Congo"},{code:"CD",dialCode:"+243",name:"Congo (DRC)"},{code:"AO",dialCode:"+244",name:"Angola"},{code:"GW",dialCode:"+245",name:"Guinea-Bissau"},{code:"SC",dialCode:"+248",name:"Seychelles"},{code:"SD",dialCode:"+249",name:"Sudan"},{code:"RW",dialCode:"+250",name:"Rwanda"},{code:"ET",dialCode:"+251",name:"Ethiopia"},{code:"SO",dialCode:"+252",name:"Somalia"},{code:"DJ",dialCode:"+253",name:"Djibouti"},{code:"KE",dialCode:"+254",name:"Kenya"},{code:"TZ",dialCode:"+255",name:"Tanzania"},{code:"UG",dialCode:"+256",name:"Uganda"},{code:"BI",dialCode:"+257",name:"Burundi"},{code:"MZ",dialCode:"+258",name:"Mozambique"},{code:"ZM",dialCode:"+260",name:"Zambia"},{code:"MG",dialCode:"+261",name:"Madagascar"},{code:"RE",dialCode:"+262",name:"Réunion"},{code:"ZW",dialCode:"+263",name:"Zimbabwe"},{code:"NA",dialCode:"+264",name:"Namibia"},{code:"MW",dialCode:"+265",name:"Malawi"},{code:"LS",dialCode:"+266",name:"Lesotho"},{code:"BW",dialCode:"+267",name:"Botswana"},{code:"SZ",dialCode:"+268",name:"Eswatini"},{code:"KM",dialCode:"+269",name:"Comoros"},{code:"ER",dialCode:"+291",name:"Eritrea"},{code:"PT",dialCode:"+351",name:"Portugal"},{code:"LU",dialCode:"+352",name:"Luxembourg"},{code:"IE",dialCode:"+353",name:"Ireland"},{code:"IS",dialCode:"+354",name:"Iceland"},{code:"AL",dialCode:"+355",name:"Albania"},{code:"MT",dialCode:"+356",name:"Malta"},{code:"CY",dialCode:"+357",name:"Cyprus"},{code:"FI",dialCode:"+358",name:"Finland"},{code:"BG",dialCode:"+359",name:"Bulgaria"},{code:"LT",dialCode:"+370",name:"Lithuania"},{code:"LV",dialCode:"+371",name:"Latvia"},{code:"EE",dialCode:"+372",name:"Estonia"},{code:"MD",dialCode:"+373",name:"Moldova"},{code:"AM",dialCode:"+374",name:"Armenia"},{code:"BY",dialCode:"+375",name:"Belarus"},{code:"AD",dialCode:"+376",name:"Andorra"},{code:"MC",dialCode:"+377",name:"Monaco"},{code:"SM",dialCode:"+378",name:"San Marino"},{code:"UA",dialCode:"+380",name:"Ukraine"},{code:"RS",dialCode:"+381",name:"Serbia"},{code:"ME",dialCode:"+382",name:"Montenegro"},{code:"XK",dialCode:"+383",name:"Kosovo"},{code:"HR",dialCode:"+385",name:"Croatia"},{code:"SI",dialCode:"+386",name:"Slovenia"},{code:"BA",dialCode:"+387",name:"Bosnia and Herzegovina"},{code:"MK",dialCode:"+389",name:"North Macedonia"},{code:"CZ",dialCode:"+420",name:"Czech Republic"},{code:"SK",dialCode:"+421",name:"Slovakia"},{code:"LI",dialCode:"+423",name:"Liechtenstein"},{code:"FK",dialCode:"+500",name:"Falkland Islands"},{code:"BZ",dialCode:"+501",name:"Belize"},{code:"GT",dialCode:"+502",name:"Guatemala"},{code:"SV",dialCode:"+503",name:"El Salvador"},{code:"HN",dialCode:"+504",name:"Honduras"},{code:"NI",dialCode:"+505",name:"Nicaragua"},{code:"CR",dialCode:"+506",name:"Costa Rica"},{code:"PA",dialCode:"+507",name:"Panama"},{code:"HT",dialCode:"+509",name:"Haiti"},{code:"GP",dialCode:"+590",name:"Guadeloupe"},{code:"BO",dialCode:"+591",name:"Bolivia"},{code:"GY",dialCode:"+592",name:"Guyana"},{code:"EC",dialCode:"+593",name:"Ecuador"},{code:"GF",dialCode:"+594",name:"French Guiana"},{code:"PY",dialCode:"+595",name:"Paraguay"},{code:"MQ",dialCode:"+596",name:"Martinique"},{code:"SR",dialCode:"+597",name:"Suriname"},{code:"UY",dialCode:"+598",name:"Uruguay"},{code:"TL",dialCode:"+670",name:"Timor-Leste"},{code:"BN",dialCode:"+673",name:"Brunei"},{code:"NR",dialCode:"+674",name:"Nauru"},{code:"PG",dialCode:"+675",name:"Papua New Guinea"},{code:"TO",dialCode:"+676",name:"Tonga"},{code:"SB",dialCode:"+677",name:"Solomon Islands"},{code:"VU",dialCode:"+678",name:"Vanuatu"},{code:"FJ",dialCode:"+679",name:"Fiji"},{code:"PW",dialCode:"+680",name:"Palau"},{code:"WS",dialCode:"+685",name:"Samoa"},{code:"KI",dialCode:"+686",name:"Kiribati"},{code:"FM",dialCode:"+691",name:"Micronesia"},{code:"MH",dialCode:"+692",name:"Marshall Islands"},{code:"KP",dialCode:"+850",name:"North Korea"},{code:"HK",dialCode:"+852",name:"Hong Kong"},{code:"MO",dialCode:"+853",name:"Macau"},{code:"KH",dialCode:"+855",name:"Cambodia"},{code:"LA",dialCode:"+856",name:"Laos"},{code:"BD",dialCode:"+880",name:"Bangladesh"},{code:"TW",dialCode:"+886",name:"Taiwan"},{code:"MV",dialCode:"+960",name:"Maldives"},{code:"LB",dialCode:"+961",name:"Lebanon"},{code:"JO",dialCode:"+962",name:"Jordan"},{code:"SY",dialCode:"+963",name:"Syria"},{code:"IQ",dialCode:"+964",name:"Iraq"},{code:"KW",dialCode:"+965",name:"Kuwait"},{code:"SA",dialCode:"+966",name:"Saudi Arabia"},{code:"YE",dialCode:"+967",name:"Yemen"},{code:"OM",dialCode:"+968",name:"Oman"},{code:"PS",dialCode:"+970",name:"Palestine"},{code:"AE",dialCode:"+971",name:"United Arab Emirates"},{code:"IL",dialCode:"+972",name:"Israel"},{code:"BH",dialCode:"+973",name:"Bahrain"},{code:"QA",dialCode:"+974",name:"Qatar"},{code:"BT",dialCode:"+975",name:"Bhutan"},{code:"MN",dialCode:"+976",name:"Mongolia"},{code:"NP",dialCode:"+977",name:"Nepal"},{code:"TJ",dialCode:"+992",name:"Tajikistan"},{code:"TM",dialCode:"+993",name:"Turkmenistan"},{code:"AZ",dialCode:"+994",name:"Azerbaijan"},{code:"GE",dialCode:"+995",name:"Georgia"},{code:"KG",dialCode:"+996",name:"Kyrgyzstan"},{code:"UZ",dialCode:"+998",name:"Uzbekistan"}].map((e=>{return{...e,flag:(a=e.code,String.fromCodePoint(...a.toUpperCase().split("").map((e=>127397+e.charCodeAt(0)))))};var a}));function t(e){const a=e.toUpperCase();return i.find((e=>e.code===a))||i.find((e=>"US"===e.code))}const n=class{constructor(o){e(this,o),this.fieldChange=a(this,"fieldChange"),this.buttonClick=a(this,"buttonClick")}component;value;disabled=!1;passwordVisible=!1;selectedCountry=t("US");localPhoneNumber="";countryDropdownOpen=!1;telEmailMode=!1;fieldChange;buttonClick;componentChanged(){this.initCountryFromConfig(),this.initTelValue()}valueChanged(){this.initTelValue()}componentWillLoad(){this.initCountryFromConfig(),this.initTelValue()}initCountryFromConfig(){if("TEL"===this.component?.type){const e=this.component.config,a=e?.default_country;a&&(this.selectedCountry=t(a)),!0===e?.allow_email&&(this.telEmailMode=!0)}}initTelValue(){if("TEL"!==this.component?.type)return;const e=this.component.config,a=!0===e?.allow_email,o=this.getEffectiveValue();if(!o)return this.localPhoneNumber="",void(a&&(this.telEmailMode=!0));if(o.startsWith("+")){const e=[...i].sort(((e,a)=>a.dialCode.length-e.dialCode.length));for(const i of e)if(o.startsWith(i.dialCode))return this.selectedCountry=i,this.localPhoneNumber=o.slice(i.dialCode.length),void(a&&(this.telEmailMode=!1))}if(this.localPhoneNumber=o,a){const e=/^[+\d]/.test(o);this.telEmailMode=!e}}handleCountryChange=e=>{this.selectedCountry=t(e.target.value),this.fieldChange.emit({id:this.component.id,value:this.localPhoneNumber?`${this.selectedCountry.dialCode}${this.localPhoneNumber}`:""})};detectDialCodeFromInput(e){const a=e.startsWith("00")?"+"+e.slice(2):e;if(!a.startsWith("+"))return null;const o=[...i].sort(((e,a)=>a.dialCode.length-e.dialCode.length));for(const e of o)if(a.startsWith(e.dialCode))return this.selectedCountry=e,a.slice(e.dialCode.length);return null}handlePhoneInput=e=>{const a=e.target,o=a.value,i=this.component.config;if(!0===i?.allow_email){const e=o.length>0&&/^[+\d]/.test(o)&&!o.includes("@");if(this.telEmailMode=!e,this.telEmailMode)this.localPhoneNumber=o,this.fieldChange.emit({id:this.component.id,value:o});else{const e=this.detectDialCodeFromInput(o);if(null!==e){const o=e.replace(/[^+\d\s\-()]/g,"").replace(/\+/g,"");a.value=o,this.localPhoneNumber=o,this.fieldChange.emit({id:this.component.id,value:`${this.selectedCountry.dialCode}${o}`})}else{const e=o.replace(/[^+\d\s\-()]/g,"").replace(/\+/g,"");e!==o&&(a.value=e),this.localPhoneNumber=e,this.fieldChange.emit({id:this.component.id,value:e?`${this.selectedCountry.dialCode}${e}`:""})}}return}const t=o.replace(/[^\d\s\-()]/g,"");t!==o&&(a.value=t),this.localPhoneNumber=t,this.fieldChange.emit({id:this.component.id,value:t?`${this.selectedCountry.dialCode}${t}`:""})};handleInput=e=>{this.fieldChange.emit({id:this.component.id,value:e.target.value})};handleKeyDown=e=>{if("Enter"===e.key&&(e.preventDefault(),this.buttonClick.emit({id:"submit",type:"submit",value:"next"})),"Backspace"===e.key&&!this.telEmailMode){const a=e.target,o=this.component.config;!0===o?.allow_email&&0===a.value.length&&(this.telEmailMode=!0,this.localPhoneNumber="",this.fieldChange.emit({id:this.component.id,value:""}))}};handleCheckbox=e=>{this.fieldChange.emit({id:this.component.id,value:e.target.checked?"true":"false"})};getEffectiveValue(){if(null!=this.value)return this.value;const e=this.component;if(e.config&&"default_value"in e.config){const a=e.config.default_value;if("string"==typeof a&&""!==a)return a}}sanitizeForCssToken(e){return e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}handleButtonClick=(e,a,o)=>{e.preventDefault(),this.buttonClick.emit({id:this.component.id,type:a,value:o})};togglePasswordVisibility=()=>{this.passwordVisible=!this.passwordVisible};getErrors(){const e=this.component;return e.messages?.filter((e=>"error"===e.type))||[]}renderFloatingLabel(e,a,i,t){return e?o("label",{class:t?"input-label floating":"input-label",part:"label",htmlFor:a},e,i&&o("span",{class:"required"},"*")):null}renderLabel(e,a,i){return e?o("label",{class:"input-label",part:"label",htmlFor:a},e,i&&o("span",{class:"required"},"*")):null}getInputFieldClass(e){return e?"input-field has-error":"input-field"}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((e=>o("span",{class:"error-text",part:"error-text",key:e.id??e.text},e.text)))}renderHint(e){return e?o("span",{class:"helper-text",part:"helper-text"},e):null}renderDivider(){return o("hr",{class:"divider",part:"divider"})}renderHtml(e){return o("div",{class:"html-content",part:"html-content",innerHTML:e.config?.content??""})}renderImage(e){const{src:a,alt:i,width:t,height:n}=e.config??{};return a?o("img",{class:"image",part:"image",src:a,alt:i??"",width:t,height:n,loading:"lazy"}):null}renderRichText(e){return o("div",{class:"rich-text",part:"rich-text",innerHTML:e.config?.content??""})}renderNextButton(e){return o("button",{type:"submit",class:"btn btn-primary",part:"button button-primary","data-primary-action-button":!0,disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"submit","next")},e.config.text??"Continue")}renderPreviousButton(e){return o("button",{type:"button",class:"btn btn-secondary",part:"button button-secondary",disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"previous","back")},e.config.text??"Back")}renderJumpButton(e){return o("button",{type:"button",class:"btn btn-link",part:"button button-link",disabled:this.disabled,onClick:a=>this.handleButtonClick(a,"jump",e.config.target_step)},e.config.text??"Go")}renderResendButton(e){return o("button",{type:"button",class:"btn btn-link",part:"button button-link",disabled:this.disabled,onClick:a=>this.handleButtonClick(a,"resend",e.config.resend_action)},e.config.text??"Resend")}renderTextField(e){const a=`input-${e.id}`,i=this.getErrors(),{multiline:t,max_length:n}=e.config??{},d=this.getEffectiveValue(),r=!!(d&&d.length>0);return t?o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(e.label,a,e.required),o("textarea",{id:a,class:this.getInputFieldClass(i.length>0),part:"input textarea",name:e.id,placeholder:" ",required:e.required,disabled:this.disabled,maxLength:n,onInput:this.handleInput},d??""),this.renderErrors(),0===i.length&&this.renderHint(e.hint)):o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container"},o("input",{id:a,class:this.getInputFieldClass(i.length>0),part:"input",type:e.sensitive?"password":"text",name:e.id,"data-input-name":e.id,value:d??"",placeholder:" ",required:e.required,disabled:this.disabled,maxLength:n,onInput:this.handleInput,onKeyDown:this.handleKeyDown}),this.renderFloatingLabel(e.label,a,e.required,r)),this.renderErrors(),0===i.length&&this.renderHint(e.hint))}renderEmailField(e){const a=`input-${e.id}`,i=this.getErrors(),t=this.getEffectiveValue(),n=!!(t&&t.length>0);return o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container"},o("input",{id:a,class:this.getInputFieldClass(i.length>0),part:"input",type:"email",name:e.id,"data-input-name":e.id,value:t??"",placeholder:" ",required:e.required,disabled:this.disabled,autocomplete:"email",onInput:this.handleInput,onKeyDown:this.handleKeyDown}),this.renderFloatingLabel(e.label,a,e.required,n)),this.renderErrors(),0===i.length&&this.renderHint(e.hint))}renderPasswordField(e){const a=`input-${e.id}`,i=this.getErrors(),t=this.getEffectiveValue(),n=!!(t&&t.length>0),d=e.config?.forgot_password_link;return o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container password-container"},o("input",{id:a,class:this.getInputFieldClass(i.length>0),part:"input",type:this.passwordVisible?"text":"password",name:e.id,"data-input-name":e.id,value:t??"",placeholder:" ",required:e.required,disabled:this.disabled,minLength:e.config?.min_length,autocomplete:"current-password",onInput:this.handleInput,onKeyDown:this.handleKeyDown}),this.renderFloatingLabel(e.label,a,e.required,n),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===i.length&&this.renderHint(e.hint),d&&o("div",{class:"field-link",part:"field-link"},o("a",{href:d,class:"link",part:"link"},"Forgot password?")))}renderNumberField(e){const a=`input-${e.id}`,i=this.getErrors(),{placeholder:t,min:n,max:d,step:r}=e.config??{},l=this.getEffectiveValue();return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(e.label,a,e.required),o("input",{id:a,class:this.getInputFieldClass(i.length>0),part:"input",type:"number",name:e.id,value:l??"",placeholder:t,required:e.required,disabled:this.disabled,min:n,max:d,step:r,onInput:this.handleInput,onKeyDown:this.handleKeyDown}),this.renderErrors(),0===i.length&&this.renderHint(e.hint))}renderTelField(e){const a=`input-${e.id}`,t=this.getErrors(),n=e.config,d=!0===n?.allow_email,r=this.localPhoneNumber.length>0,l=!d||!this.telEmailMode,s=l?o("select",{class:"country-select",part:"country-select",style:{width:`${`${this.selectedCountry.flag} ${this.selectedCountry.dialCode}`.length+1}ch`,minWidth:"0"},onChange:this.handleCountryChange,disabled:this.disabled,"aria-label":"Country code"},i.map((e=>o("option",{value:e.code,selected:this.selectedCountry.code===e.code,key:e.code},`${e.flag} ${e.dialCode}`)))):null,c=d&&this.telEmailMode?"text":"tel";return o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:l?"phone-input-wrapper":"",part:"phone-input-wrapper"},s,o("div",{class:"input-container"},o("input",{id:a,class:this.getInputFieldClass(t.length>0),part:"input",type:c,name:e.id,"data-input-name":e.id,value:this.localPhoneNumber,placeholder:" ",required:e.required,disabled:this.disabled,autocomplete:d&&this.telEmailMode?"email":"tel-national",onInput:this.handlePhoneInput,onKeyDown:this.handleKeyDown}),this.renderFloatingLabel(e.label,a,e.required,r))),this.renderErrors(),0===t.length&&this.renderHint(e.hint))}renderUrlField(e){const a=`input-${e.id}`,i=this.getErrors(),t=this.getEffectiveValue();return o("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(e.label,a,e.required),o("input",{id:a,class:this.getInputFieldClass(i.length>0),part:"input",type:"url",name:e.id,value:t??"",placeholder:e.config?.placeholder,required:e.required,disabled:this.disabled,onInput:this.handleInput,onKeyDown:this.handleKeyDown}),this.renderErrors(),0===i.length&&this.renderHint(e.hint))}renderDateField(e){const a=`input-${e.id}`,i=this.getErrors(),{min:t,max:n}=e.config??{},d=this.getEffectiveValue();return o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container"},o("input",{id:a,class:this.getInputFieldClass(i.length>0),part:"input",type:"date",name:e.id,"data-input-name":e.id,value:d??"",placeholder:" ",required:e.required,disabled:this.disabled,min:t,max:n,onInput:this.handleInput,onKeyDown:this.handleKeyDown}),this.renderFloatingLabel(e.label,a,e.required,!0)),this.renderErrors(),0===i.length&&this.renderHint(e.hint))}renderBooleanField(e){return o("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},o("input",{type:"checkbox",part:"checkbox",name:e.id,checked:"true"===this.value||!0===e.config?.default_value,required:e.required,disabled:this.disabled,onChange:this.handleCheckbox}),o("span",{class:"checkbox-label",part:"checkbox-label"},e.label))}renderLegalField(e){const a=e.config?.text??e.label??"",i=!0===e.config?.html;return o("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},o("input",{type:"checkbox",part:"checkbox",name:e.id,checked:"true"===this.value,required:e.required,disabled:this.disabled,onChange:this.handleCheckbox}),i?o("span",{class:"checkbox-label",part:"checkbox-label",innerHTML:a}):o("span",{class:"checkbox-label",part:"checkbox-label"},a))}renderDropdownField(e){const a=`input-${e.id}`,i=this.getErrors(),{options:t,placeholder:n}=e.config??{},d=this.getEffectiveValue();return o("div",{class:"input-wrapper",part:"input-wrapper"},o("div",{class:"input-container"},o("select",{id:a,class:this.getInputFieldClass(i.length>0),part:"input select",name:e.id,required:e.required,disabled:this.disabled,onChange:this.handleInput},n&&o("option",{value:"",disabled:!0,selected:!d},n),t?.map((e=>o("option",{value:e.value,selected:d===e.value,key:e.value},e.label)))),this.renderFloatingLabel(e.label,a,e.required,!0)),this.renderErrors(),0===i.length&&this.renderHint(e.hint))}renderChoiceField(e){const a=this.getErrors(),{options:i,display:t}=e.config??{},n="checkbox"===t,d=n?"checkbox":"radio";return o("div",{class:"choice-wrapper",part:"choice-wrapper"},e.label&&o("span",{class:"choice-label",part:"choice-label"},e.label,e.required&&o("span",{class:"required"},"*")),o("div",{class:"choice-options",part:"choice-options"},i?.map((a=>o("label",{class:"choice-option",part:"choice-option",key:a.value},o("input",{type:d,part:d,name:e.id,value:a.value,checked:this.getEffectiveValue()===a.value,required:e.required&&!n,disabled:this.disabled,onChange:this.handleInput}),o("span",null,a.label))))),this.renderErrors(),0===a.length&&this.renderHint(e.hint))}renderSocialField(e){const a=e.config?.providers??[],i=e.config?.provider_details,t=new Map(i?.map((e=>[e.name,e]))??[]),n=e=>{const a=t.get(e);return a?.display_name?a.display_name:e.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")},d=e=>{const a=t.get(e),i=this.sanitizeForCssToken(e);return a?.icon_url?o("img",{class:"social-icon",part:`social-icon social-icon-${i}`,src:a.icon_url,alt:a.display_name||e}):null};return o("div",{class:"social-buttons",part:"social-buttons"},a.map((e=>{const a=this.sanitizeForCssToken(e),i=(e=>{const a=t.get(e);return a?.strategy??e})(e),r=d(e),l=t.get(e),s=`btn btn-secondary btn-social btn-social-${a}${r?"":" no-icon"}`,c=`button button-secondary button-social button-social-${a}`,p=[r,o("span",{class:"btn-social-content",part:`button-social-content button-social-content-${a}`},o("span",{part:`button-social-text button-social-text-${a}`},n(e)),o("span",{class:"btn-social-subtitle",part:`button-social-subtitle button-social-subtitle-${a}`}))];return l?.href?o("a",{href:this.disabled?void 0:l.href,class:s,part:c,"data-connection-name":e,"data-strategy":i,key:e,"aria-disabled":this.disabled?"true":void 0,tabindex:this.disabled?-1:void 0,onClick:e=>{this.disabled&&e.preventDefault()}},p):o("button",{type:"button",class:s,part:c,"data-connection-name":e,"data-strategy":i,disabled:this.disabled,onClick:a=>this.handleButtonClick(a,"SOCIAL",e),key:e},p)})))}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 watchers(){return{component:[{componentChanged:0}],value:[{valueChanged:0}]}}};n.style=":host{display:block}.input-wrapper{display:flex;flex-direction:column;position:relative;margin-top:8px;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,select.input-field+.input-label,input[type=\"date\"].input-field+.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}.phone-input-wrapper{display:flex;align-items:stretch;gap:0;width:100%}.country-select{flex-shrink:0;width:auto;padding:12px 8px;font-size:var(--ah-font-size-body, 16px);font-family:var(--ah-font-family, inherit);border:1px solid var(--ah-color-border, #c9cace);border-right:none;border-radius:var(--ah-border-radius-input, 4px) 0 0 var(--ah-border-radius-input, 4px);background-color:var(--ah-color-surface, #fff);color:var(--ah-color-text, #1e212a);cursor:pointer;appearance:none;-webkit-appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 6px center;padding-right:22px}.country-select:focus{outline:none;border-color:var(--ah-color-primary, #635dff);box-shadow:0 0 0 1px var(--ah-color-primary, #635dff)}.country-select:disabled{opacity:0.5;cursor:not-allowed}.phone-input-wrapper .input-container{flex:1;min-width:0}.phone-input-wrapper .input-field{border-radius:0 var(--ah-border-radius-input, 4px) var(--ah-border-radius-input, 4px) 0}.phone-input-wrapper .input-label.floating,.phone-input-wrapper .input-field:focus+.input-label,.phone-input-wrapper .input-field:not(:placeholder-shown)+.input-label{left:8px}.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 .forgot-password-link{text-align:right;font-size:13px;margin-top:4px}.rich-text .forgot-password-link a{font-size:13px;color:var(--ah-color-link, #635dff)}.rich-text .passwordless-link{margin-top:16px;text-align:center;font-size:14px}.rich-text .passwordless-link a{color:var(--ah-color-link, #635dff);text-decoration:var(--ah-link-decoration, none)}.rich-text .passwordless-link a:hover{text-decoration:underline}.rich-text .signup-link{margin-top:16px;text-align:center;font-size:14px;color:var(--ah-color-text, #1e212a)}";export{n as authhero_node}