solid-ui 5.0.1-0 → 5.0.1-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +21 -0
  2. package/dist/_virtual/~icons/lucide/square-arrow-out-up-right.cjs.js +2 -0
  3. package/dist/_virtual/~icons/lucide/square-arrow-out-up-right.cjs.js.map +1 -0
  4. package/dist/_virtual/~icons/lucide/square-arrow-out-up-right.esm.js +11 -0
  5. package/dist/_virtual/~icons/lucide/square-arrow-out-up-right.esm.js.map +1 -0
  6. package/dist/chunks/{access-control-modal-C9ECFvn0.js → access-control-modal-eOv2-U27.js} +3 -3
  7. package/dist/chunks/{access-control-modal-C9ECFvn0.js.map → access-control-modal-eOv2-U27.js.map} +1 -1
  8. package/dist/chunks/{account-BUnArMjm.js → account-DpmYJEd-.js} +6 -6
  9. package/dist/chunks/{account-BUnArMjm.js.map → account-DpmYJEd-.js.map} +1 -1
  10. package/dist/chunks/{auth-BgEyix2g.js → auth-Hp8M6TQf.js} +2 -2
  11. package/dist/chunks/{auth-BgEyix2g.js.map → auth-Hp8M6TQf.js.map} +1 -1
  12. package/dist/chunks/{avatar-DiGyEwvL.js → avatar-D5rcw6gN.js} +2 -2
  13. package/dist/chunks/{avatar-DiGyEwvL.js.map → avatar-D5rcw6gN.js.map} +1 -1
  14. package/dist/chunks/{combobox-a0vVnPo8.js → combobox-Dmv-TZtI.js} +2 -2
  15. package/dist/chunks/combobox-Dmv-TZtI.js.map +1 -0
  16. package/dist/chunks/{guard-c6JOj8UM.js → guard-FbhNrJGh.js} +2 -2
  17. package/dist/chunks/{guard-c6JOj8UM.js.map → guard-FbhNrJGh.js.map} +1 -1
  18. package/dist/chunks/{login-button-gUZbphp9.js → login-button-DCq4Gi3_.js} +2 -2
  19. package/dist/chunks/{login-button-gUZbphp9.js.map → login-button-DCq4Gi3_.js.map} +1 -1
  20. package/dist/chunks/{logout-button-GWQMrdx4.js → logout-button-D3dJrsV4.js} +2 -2
  21. package/dist/chunks/{logout-button-GWQMrdx4.js.map → logout-button-D3dJrsV4.js.map} +1 -1
  22. package/dist/chunks/{provider-DLNWLlfX.js → provider-D9UgRI4G.js} +2 -2
  23. package/dist/chunks/{provider-DLNWLlfX.js.map → provider-D9UgRI4G.js.map} +1 -1
  24. package/dist/chunks/{signup-button-i9d5eTUY.js → signup-button-BQ4AWem2.js} +2 -2
  25. package/dist/chunks/{signup-button-i9d5eTUY.js.map → signup-button-BQ4AWem2.js.map} +1 -1
  26. package/dist/chunks/{src-B9ABTiyW.js → src-DQMZZG1B.js} +2319 -2281
  27. package/dist/chunks/src-DQMZZG1B.js.map +1 -0
  28. package/dist/chunks/{widgets-CQOLuw3A.js → widgets-CVLwnfkU.js} +122 -74
  29. package/dist/chunks/widgets-CVLwnfkU.js.map +1 -0
  30. package/dist/components/access-control-modal.js +1 -1
  31. package/dist/components/account.js +1 -1
  32. package/dist/components/avatar.js +1 -1
  33. package/dist/components/combobox/Combobox.styles.cjs.js +1 -1
  34. package/dist/components/combobox/Combobox.styles.cjs.js.map +1 -1
  35. package/dist/components/combobox/Combobox.styles.esm.js +1 -1
  36. package/dist/components/combobox/Combobox.styles.esm.js.map +1 -1
  37. package/dist/components/combobox.js +1 -1
  38. package/dist/components/guard.js +1 -1
  39. package/dist/components/login-button.js +1 -1
  40. package/dist/components/login-modal.js +1 -1
  41. package/dist/components/logout-button.js +1 -1
  42. package/dist/components/provider.js +1 -1
  43. package/dist/components/signup-button.js +1 -1
  44. package/dist/components.js +10 -10
  45. package/dist/index.js +3 -3
  46. package/dist/lib/iconBase.cjs.js +1 -1
  47. package/dist/lib/iconBase.cjs.js.map +1 -1
  48. package/dist/lib/iconBase.esm.js +3 -2
  49. package/dist/lib/iconBase.esm.js.map +1 -1
  50. package/dist/loader.js +3 -3
  51. package/dist/solid-ui.js +30 -30
  52. package/dist/solid-ui.min.js +30 -30
  53. package/dist/solid-ui.min.js.map +1 -1
  54. package/dist/widgets/buttons/iconLinks.cjs.js +1 -1
  55. package/dist/widgets/buttons/iconLinks.cjs.js.map +1 -1
  56. package/dist/widgets/buttons/iconLinks.d.ts.map +1 -1
  57. package/dist/widgets/buttons/iconLinks.esm.js +16 -10
  58. package/dist/widgets/buttons/iconLinks.esm.js.map +1 -1
  59. package/dist/widgets/buttons.cjs.js +1 -1
  60. package/dist/widgets/buttons.cjs.js.map +1 -1
  61. package/dist/widgets/buttons.d.ts +5 -1
  62. package/dist/widgets/buttons.d.ts.map +1 -1
  63. package/dist/widgets/buttons.esm.js +67 -34
  64. package/dist/widgets/buttons.esm.js.map +1 -1
  65. package/package.json +1 -1
  66. package/dist/chunks/combobox-a0vVnPo8.js.map +0 -1
  67. package/dist/chunks/src-B9ABTiyW.js.map +0 -1
  68. package/dist/chunks/widgets-CQOLuw3A.js.map +0 -1
@@ -1,13 +1,13 @@
1
- import { a as e, o as t } from "./auth-BgEyix2g.js";
1
+ import { a as e, o as t } from "./auth-Hp8M6TQf.js";
2
2
  import { b as n, c as r, g as i, i as a, o, p as s, u as c } from "./components-Bdqizu8x.js";
3
3
  import "./chevron-down-ujxRg3MD.js";
4
4
  import "./button-lol95DqR.js";
5
- import "./avatar-DiGyEwvL.js";
6
- import "./login-button-gUZbphp9.js";
7
- import "./logout-button-GWQMrdx4.js";
5
+ import "./avatar-D5rcw6gN.js";
6
+ import "./login-button-DCq4Gi3_.js";
7
+ import "./logout-button-D3dJrsV4.js";
8
8
  import "./menu-item-C2e0qj-v.js";
9
9
  import "./menu-RJklqKQE.js";
10
- import "./signup-button-i9d5eTUY.js";
10
+ import "./signup-button-BQ4AWem2.js";
11
11
  //#region ~icons/lucide/log-in
12
12
  var l = class extends HTMLElement {
13
13
  constructor() {
@@ -291,4 +291,4 @@ var z = R;
291
291
  //#endregion
292
292
  export { R as n, z as t };
293
293
 
294
- //# sourceMappingURL=account-BUnArMjm.js.map
294
+ //# sourceMappingURL=account-DpmYJEd-.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"account-BUnArMjm.js","names":["consume","html","nothing","property","customElement","WebComponent","authContext","DEFAULT_AUTH_CONTEXT","styles","_classDecs","_Account","_Account2","_A","WeakMap","_B","_ref","_menuItemsDecs","type","Array","_authDecs","context","subscribe","_Account3","Account","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_menuItems","_init_auth","_defineProperty","_classPrivateFieldGet","menuItems","v","_classPrivateFieldSet","auth","connectedCallback","unsubscribeSessionUpdated","onSessionUpdated","requestUpdate","disconnectedCallback","render","initialized","account","map","menuItem","href","selected","onSelected","label","e","c","_initClass","_applyDecs","_Class","_identity","initializing","component","loggedIn","default","property","consume","nothing","styles","Account","Account","DEFAULT_AUTH_CONTEXT","authContext","c","A","customElement","n","i","b","iconlucidelogin","iconlucidelogout","iconlucideuser","Account_styles_default","_Class","_Account3","_A","_B","_initProto","_initClass","_classDecs","_menuItemsDecs","_init_menuItems","_authDecs","_init_auth","_Account2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","o","applyDec","m","h","y","v","g","u","w","S","d","p","_setFunctionName","P","j","D","I","F","l","f","N","_checkInRHS","_toPrimitive","e","_identity","_Account","WebComponent","args","menuItem","component","account_default"],"sources":["../../src/components/account/Account.styles.css","../../src/components/account/Account.ts","../../src/components/account/index.ts"],"sourcesContent":[":host {\n --image-size: 1.875rem; /* 30px */\n\n display: inline-flex;\n flex-direction: row;\n gap: 10px;\n}\n\n:host([data-state-initializing]) {\n icon-svg-spinners-180-ring {\n width: var(--image-size);\n height: var(--image-size);\n }\n}\n\n:host([data-state-loggedIn]) {\n --padding: 4px;\n --border-width: 1px;\n\n button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n background-color: var(--solid-ui-color-body-grey);\n padding: var(--padding);\n border-radius: calc((var(--image-size) + 2 * var(--padding) + 2 * var(--border-width)) / 2);\n color: var(--solid-ui-color-white);\n\n solid-ui-avatar {\n width: var(--image-size);\n height: var(--image-size);\n border: var(--border-width) solid var(--solid-ui-color-white);\n border-radius: 50%;\n }\n\n icon-lucide-chevron-down {\n width: 16px;\n height: 16px;\n }\n }\n}\n","import { consume } from '@lit/context'\nimport { html, nothing, TemplateResult } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport { customElement, WebComponent } from '@/lib/components'\nimport { authContext, AuthContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\n\nimport '@/components/avatar'\nimport '@/components/button'\nimport '@/components/login-button'\nimport '@/components/logout-button'\nimport '@/components/menu-item'\nimport '@/components/menu'\nimport '@/components/signup-button'\nimport '~icons/lucide/chevron-down'\nimport '~icons/lucide/log-in'\nimport '~icons/lucide/log-out'\nimport '~icons/lucide/user'\nimport '~icons/svg-spinners/180-ring'\n\nimport styles from './Account.styles.css'\n\nexport interface AccountMenuItem {\n label: string | TemplateResult\n href?: string\n selected?: boolean\n onSelected?(): void\n}\n\n@customElement('solid-ui-account')\nexport default class Account extends WebComponent {\n static styles = styles\n static states = {\n initializing: (component: Account) => !component.auth.initialized,\n loggedIn: (component: Account) => !!component.auth.account,\n }\n\n @property({ type: Array })\n accessor menuItems: AccountMenuItem[] = []\n\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n private unsubscribeSessionUpdated?: () => void\n\n connectedCallback () {\n super.connectedCallback()\n\n this.unsubscribeSessionUpdated = this.auth.onSessionUpdated(() => this.requestUpdate())\n }\n\n disconnectedCallback () {\n super.disconnectedCallback()\n\n this.unsubscribeSessionUpdated?.()\n }\n\n protected render () {\n if (!this.auth.initialized) {\n return html`\n <icon-svg-spinners-180-ring></icon-svg-spinners-180-ring>\n `\n }\n\n if (!this.auth.account) {\n return html`\n <solid-ui-login-button>\n <solid-ui-button slot=\"trigger\">\n <icon-lucide-user slot=\"left-icon\"></icon-lucide-user>\n Log In\n </solid-ui-button>\n </solid-ui-login-button>\n <solid-ui-signup-button>\n <solid-ui-button slot=\"trigger\" variant=\"outline\">\n <icon-lucide-log-in slot=\"left-icon\"></icon-lucide-log-in>\n Sign Up\n </solid-ui-button>\n </solid-ui-signup-button>\n `\n }\n\n return html`\n <solid-ui-menu placement=\"bottom-end\">\n <button type=\"button\" slot=\"trigger\">\n <solid-ui-avatar></solid-ui-avatar>\n <icon-lucide-chevron-down slot=\"right-icon\"></icon-lucide-chevron-down>\n </button>\n\n ${this.menuItems.map(menuItem => html`\n <solid-ui-menu-item .href=${menuItem.href ?? nothing} ?selected=${menuItem.selected} @solid-ui-select=${() => menuItem.onSelected?.()}>\n ${menuItem.label}\n </solid-ui-menu-item>\n `)}\n <solid-ui-logout-button>\n <solid-ui-menu-item slot=\"trigger\">\n <icon-lucide-log-out slot=\"left-icon\"></icon-lucide-log-out>\n Sign out\n </solid-ui-menu-item>\n </solid-ui-logout-button>\n </solid-ui-menu>\n `\n }\n}\n","import Account, { type AccountMenuItem } from './Account'\n\nexport { Account, type AccountMenuItem }\nexport default Account\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACmByCS,IAAA,CASxCL,EAAc,kBAAkB,CAAC;AAAA,IAAAM;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,kBAAA,IAAAD,QAAA,GAAAE,KAAAC,IAQ/Bb,EAAS,EAAEc,MAAMC,MAAM,CAAC,GAACC,IAGzBnB,EAAQ;CAAEoB,SAASd;CAAae,WAAW;AAAK,CAAC,GAAC,cAAAC,IAXrD,cACqCjB,EAAa;CAAAmB,YAAA,GAAAC,GAAA;EAWSK,AAXT,MAAA,GAAAL,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AAA,MAAA,UAC/BtB,CAAM,GAAAsB,EAAA,MAAA,UACN;GACd0B,eAAeC,MAAuB,CAACA,EAAUtB,KAAKO;GACtDgB,WAAWD,MAAuB,CAAC,CAACA,EAAUtB,KAAKQ;EACrD,CAAC,GAAAS,EAAA;CAAA;AAAA,GAAAtB,EAAAwB,GAAA3C,GAAA,KAAA,CAAA,GAAA2C,GAAA;;;AC/BH,IAAA+E,IAAerE"}
1
+ {"version":3,"file":"account-DpmYJEd-.js","names":["consume","html","nothing","property","customElement","WebComponent","authContext","DEFAULT_AUTH_CONTEXT","styles","_classDecs","_Account","_Account2","_A","WeakMap","_B","_ref","_menuItemsDecs","type","Array","_authDecs","context","subscribe","_Account3","Account","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_menuItems","_init_auth","_defineProperty","_classPrivateFieldGet","menuItems","v","_classPrivateFieldSet","auth","connectedCallback","unsubscribeSessionUpdated","onSessionUpdated","requestUpdate","disconnectedCallback","render","initialized","account","map","menuItem","href","selected","onSelected","label","e","c","_initClass","_applyDecs","_Class","_identity","initializing","component","loggedIn","default","property","consume","nothing","styles","Account","Account","DEFAULT_AUTH_CONTEXT","authContext","c","A","customElement","n","i","b","iconlucidelogin","iconlucidelogout","iconlucideuser","Account_styles_default","_Class","_Account3","_A","_B","_initProto","_initClass","_classDecs","_menuItemsDecs","_init_menuItems","_authDecs","_init_auth","_Account2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","o","applyDec","m","h","y","v","g","u","w","S","d","p","_setFunctionName","P","j","D","I","F","l","f","N","_checkInRHS","_toPrimitive","e","_identity","_Account","WebComponent","args","menuItem","component","account_default"],"sources":["../../src/components/account/Account.styles.css","../../src/components/account/Account.ts","../../src/components/account/index.ts"],"sourcesContent":[":host {\n --image-size: 1.875rem; /* 30px */\n\n display: inline-flex;\n flex-direction: row;\n gap: 10px;\n}\n\n:host([data-state-initializing]) {\n icon-svg-spinners-180-ring {\n width: var(--image-size);\n height: var(--image-size);\n }\n}\n\n:host([data-state-loggedIn]) {\n --padding: 4px;\n --border-width: 1px;\n\n button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n background-color: var(--solid-ui-color-body-grey);\n padding: var(--padding);\n border-radius: calc((var(--image-size) + 2 * var(--padding) + 2 * var(--border-width)) / 2);\n color: var(--solid-ui-color-white);\n\n solid-ui-avatar {\n width: var(--image-size);\n height: var(--image-size);\n border: var(--border-width) solid var(--solid-ui-color-white);\n border-radius: 50%;\n }\n\n icon-lucide-chevron-down {\n width: 16px;\n height: 16px;\n }\n }\n}\n","import { consume } from '@lit/context'\nimport { html, nothing, TemplateResult } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport { customElement, WebComponent } from '@/lib/components'\nimport { authContext, AuthContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\n\nimport '@/components/avatar'\nimport '@/components/button'\nimport '@/components/login-button'\nimport '@/components/logout-button'\nimport '@/components/menu-item'\nimport '@/components/menu'\nimport '@/components/signup-button'\nimport '~icons/lucide/chevron-down'\nimport '~icons/lucide/log-in'\nimport '~icons/lucide/log-out'\nimport '~icons/lucide/user'\nimport '~icons/svg-spinners/180-ring'\n\nimport styles from './Account.styles.css'\n\nexport interface AccountMenuItem {\n label: string | TemplateResult\n href?: string\n selected?: boolean\n onSelected?(): void\n}\n\n@customElement('solid-ui-account')\nexport default class Account extends WebComponent {\n static styles = styles\n static states = {\n initializing: (component: Account) => !component.auth.initialized,\n loggedIn: (component: Account) => !!component.auth.account,\n }\n\n @property({ type: Array })\n accessor menuItems: AccountMenuItem[] = []\n\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n private unsubscribeSessionUpdated?: () => void\n\n connectedCallback () {\n super.connectedCallback()\n\n this.unsubscribeSessionUpdated = this.auth.onSessionUpdated(() => this.requestUpdate())\n }\n\n disconnectedCallback () {\n super.disconnectedCallback()\n\n this.unsubscribeSessionUpdated?.()\n }\n\n protected render () {\n if (!this.auth.initialized) {\n return html`\n <icon-svg-spinners-180-ring></icon-svg-spinners-180-ring>\n `\n }\n\n if (!this.auth.account) {\n return html`\n <solid-ui-login-button>\n <solid-ui-button slot=\"trigger\">\n <icon-lucide-user slot=\"left-icon\"></icon-lucide-user>\n Log In\n </solid-ui-button>\n </solid-ui-login-button>\n <solid-ui-signup-button>\n <solid-ui-button slot=\"trigger\" variant=\"outline\">\n <icon-lucide-log-in slot=\"left-icon\"></icon-lucide-log-in>\n Sign Up\n </solid-ui-button>\n </solid-ui-signup-button>\n `\n }\n\n return html`\n <solid-ui-menu placement=\"bottom-end\">\n <button type=\"button\" slot=\"trigger\">\n <solid-ui-avatar></solid-ui-avatar>\n <icon-lucide-chevron-down slot=\"right-icon\"></icon-lucide-chevron-down>\n </button>\n\n ${this.menuItems.map(menuItem => html`\n <solid-ui-menu-item .href=${menuItem.href ?? nothing} ?selected=${menuItem.selected} @solid-ui-select=${() => menuItem.onSelected?.()}>\n ${menuItem.label}\n </solid-ui-menu-item>\n `)}\n <solid-ui-logout-button>\n <solid-ui-menu-item slot=\"trigger\">\n <icon-lucide-log-out slot=\"left-icon\"></icon-lucide-log-out>\n Sign out\n </solid-ui-menu-item>\n </solid-ui-logout-button>\n </solid-ui-menu>\n `\n }\n}\n","import Account, { type AccountMenuItem } from './Account'\n\nexport { Account, type AccountMenuItem }\nexport default Account\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACmByCS,IAAA,CASxCL,EAAc,kBAAkB,CAAC;AAAA,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AC,CAAAiD,GAAA,CAAAtB,GAAAC,GAAAF,IAAAwB,GAAA,CAAAzC,GAAA0C,MAAAC,EAAA/B,GAAA,CAAA;CAAAN;CAAA;CAAA;AAAA,GAAA;CAAAG;CAAA;CAAA;AAAA,CAAA,GAAAV,GAAA,GAAA,KAAA,GAxEoCJ,CAAY,GAAAiB,IAAAgC,IAAA,cAAAC,EAAA;CAAA/B,cAAA;EAAA,MAAAd,CAAA,GAAAoB,EAAA,MAAA,UAC/BtB,CAAM,GAAAsB,EAAA,MAAA,UACN;GACd0B,eAAeC,MAAuB,CAACA,EAAUtB,KAAKO;GACtDgB,WAAWD,MAAuB,CAAC,CAACA,EAAUtB,KAAKQ;EACrD,CAAC,GAAAS,EAAA;CAAA;AAAA,GAAAtB,EAAAwB,GAAA3C,GAAA,KAAA,CAAA,GAAA2C,GAAA;;;AC/BH,IAAA+E,IAAerE"}
@@ -7,7 +7,7 @@ import "./button-lol95DqR.js";
7
7
  import "./dialog-DYgcCurb.js";
8
8
  import "./dialog-content-jx08y2Oa.js";
9
9
  import "./dialog-footer-Bhl8k1PX.js";
10
- import "./combobox-a0vVnPo8.js";
10
+ import "./combobox-Dmv-TZtI.js";
11
11
  import "./combobox-option-B-Hksiq2.js";
12
12
  //#region node_modules/solid-logic/dist/issuer/issuerLogic.esm.js
13
13
  var g = [
@@ -424,4 +424,4 @@ var ue = class {
424
424
  //#endregion
425
425
  export { b as a, v as c, $ as i, _ as l, ue as n, x as o, se as r, y as s, ce as t };
426
426
 
427
- //# sourceMappingURL=auth-BgEyix2g.js.map
427
+ //# sourceMappingURL=auth-Hp8M6TQf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-BgEyix2g.js","names":["Account","webId","avatarUrl","constructor","NoopAuth","initialized","account","login","Error","signup","logout","onSessionUpdated","undefined","createContext","NoopAuth","DEFAULT_AUTH_CONTEXT","authContext","Symbol","createContext","customElement","WebComponent","html","nothing","consume","property","query","state","authContext","DEFAULT_AUTH_CONTEXT","getSuggestedIssuers","styles","_classDecs","_LoginModal","_LoginModal2","_A","WeakMap","_B","_C","_D","_E","_F","_ref","_issuerUrlDecs","type","String","reflect","_issuerInputValueDecs","_failedDecs","_submittingDecs","_authDecs","context","subscribe","_dialogDecs","_LoginModal3","LoginModal","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_issuerUrl","_init_issuerInputValue","_init_failed","_init_submitting","_init_auth","_init_dialog","_classPrivateFieldGet","issuerUrl","v","_classPrivateFieldSet","issuerInputValue","failed","submitting","auth","dialog","connectedCallback","localStorage","getItem","uri","render","suggestedIssuers","onSubmit","onIssuerInputChange","map","issuer","name","close","e","target","value","preventDefault","login","error","console","c","_initClass","_applyDecs","_Class","_identity","_defineProperty","default","property","state","consume","query","getSuggestedIssuers","nothing","styles","LoginModal","LoginModal","Account","ns","authn","authSession","reloadOnIdentityReplaced","solidLogicSingleton","showDialog","LoginModal","DEFAULT_SIGNUP_URL","findAccountImage","webId","store","me","sym","image","any","sioc","foaf","vcard","value","undefined","SolidAuth","_initialized","profileLoaded","listeners","constructor","signupUrl","initialize","events","on","updater","flagAuthorizationMetadata","info","isLoggedIn","window","location","reload","checkUser","forEach","listener","loadProfile","account","profile","loadMe","initialized","isActive","Boolean","avatarUrl","login","loginUrl","preLoginRedirectHash","URL","href","hash","localStorage","setItem","locationUrl","signup","open","logout","onSessionUpdated","callback","sessionEventTarget","push","addEventListener","filter","_listener","removeEventListener","off","solidLogicSingleton","ns","authSession","authn","LoginModal","ns_default","c","C","C$1","c$1","A","customElement","n$1","WebComponent","i","b","n","e$1","showDialog","e","t","r","Account","webId","avatarUrl","NoopAuth","DEFAULT_AUTH_CONTEXT","authContext","LoginModal_styles_default","_Class","_LoginModal3","_A","_B","_C","_D","_E","_F","_initProto","_initClass","_classDecs","_issuerUrlDecs","_init_issuerUrl","_issuerInputValueDecs","_init_issuerInputValue","_failedDecs","_init_failed","_submittingDecs","_init_submitting","_authDecs","_init_auth","_dialogDecs","_init_dialog","_LoginModal2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","_classPrivateFieldGet","_defineProperty","_toPropertyKey","_applyDecs","o","applyDec","m","h","y","v","g","u","w","S","d","p","_setFunctionName","P","j","D","I","F","l","f","N","_checkInRHS","_toPrimitive","_identity","_LoginModal","args","suggestedIssuers","issuer","error","login_modal_default","DEFAULT_SIGNUP_URL","findAccountImage","store","me","image","SolidAuth","signupUrl","listener","loginUrl","preLoginRedirectHash","locationUrl","sessionEventTarget","_listener"],"sources":["../../node_modules/solid-logic/dist/issuer/issuerLogic.esm.js","../../src/lib/auth/Account.ts","../../src/lib/auth/NoopAuth.ts","../../src/lib/auth/context.ts","../../src/components/login-modal/LoginModal.styles.css","../../src/components/login-modal/LoginModal.ts","../../src/components/login-modal/index.ts","../../src/lib/auth/SolidAuth.ts"],"sourcesContent":["//#region src/issuer/issuerLogic.ts\nvar e = [\n\t{\n\t\tname: \"Solid Community\",\n\t\turi: \"https://solidcommunity.net\"\n\t},\n\t{\n\t\tname: \"Solid Web\",\n\t\turi: \"https://solidweb.org\"\n\t},\n\t{\n\t\tname: \"Solid Web ME\",\n\t\turi: \"https://solidweb.me\"\n\t},\n\t{\n\t\tname: \"Inrupt.com\",\n\t\turi: \"https://login.inrupt.com\"\n\t}\n];\nfunction t() {\n\tlet t = [...e], { host: n, origin: r } = new URL(location.href);\n\treturn t.map(({ uri: e }) => new URL(e).host).includes(n) || t.unshift({\n\t\tname: n,\n\t\turi: r\n\t}), t;\n}\n//#endregion\nexport { t as getSuggestedIssuers };\n\n//# sourceMappingURL=issuerLogic.esm.js.map","export default class Account {\n public readonly webId: string\n public readonly avatarUrl?: string\n\n constructor (webId: string, avatarUrl?: string) {\n this.webId = webId\n this.avatarUrl = avatarUrl\n }\n}\n","import { AuthContext } from './context'\n\nexport default class NoopAuth implements AuthContext {\n public readonly initialized = false\n public readonly account = null\n\n async login () {\n throw new Error('Can\\'t use auth, missing context provider')\n }\n\n async signup () {\n throw new Error('Can\\'t use auth, missing context provider')\n }\n\n async logout () {\n throw new Error('Can\\'t use auth, missing context provider')\n }\n\n onSessionUpdated () {\n return () => undefined\n }\n}\n","import { createContext } from '@lit/context'\nimport NoopAuth from './NoopAuth'\nimport Account from './Account'\n\nexport interface AuthContext {\n initialized: boolean;\n account: Account | null;\n login(loginUrl?: string): Promise<void>;\n loadProfile?(): Promise<void>;\n signup(): Promise<void>;\n logout(): Promise<void>;\n onSessionUpdated(callback: () => unknown): () => void;\n}\n\nexport const DEFAULT_AUTH_CONTEXT = new NoopAuth()\nexport const authContext = createContext<AuthContext>(Symbol('auth'))\n",".error-message {\n color: var(--solid-ui-color-error);\n font-size: var(--solid-ui-font-size-sm);\n font-weight: 500;\n text-align: center;\n width: 100%;\n}\n\nsolid-ui-combobox {\n width: 100%;\n}\n\nsolid-ui-button {\n flex: 1;\n}\n","import { customElement, WebComponent } from '@/lib/components'\nimport { html, nothing } from 'lit'\nimport { consume } from '@lit/context'\nimport { property, query, state } from 'lit/decorators.js'\nimport { AuthContext, authContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\nimport { getSuggestedIssuers } from 'solid-logic'\nimport type Dialog from '@/components/dialog'\nimport type Combobox from '@/components/combobox'\n\nimport '~icons/lucide/chevron-down'\nimport '@/components/dialog'\nimport '@/components/dialog-content'\nimport '@/components/dialog-footer'\nimport '@/components/button'\nimport '@/components/combobox'\nimport '@/components/combobox-option'\n\nimport styles from './LoginModal.styles.css'\n\n@customElement('solid-ui-login-modal')\nexport default class LoginModal extends WebComponent {\n static styles = styles\n\n @property({ type: String, reflect: true })\n accessor issuerUrl = ''\n\n @state()\n private accessor issuerInputValue = ''\n\n @state()\n private accessor failed: boolean = false\n\n @state()\n private accessor submitting: boolean = false\n\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n @query('solid-ui-dialog')\n private accessor dialog: Dialog | null = null\n\n connectedCallback () {\n super.connectedCallback()\n\n this.issuerInputValue =\n (typeof localStorage !== 'undefined' && localStorage.getItem('loginIssuer')) ||\n this.issuerUrl ||\n getSuggestedIssuers()[0]?.uri ||\n ''\n }\n\n protected render () {\n const suggestedIssuers = getSuggestedIssuers()\n\n return html`\n <solid-ui-dialog title=\"Select an identity provider\">\n <form @submit=${this.onSubmit}>\n <solid-ui-dialog-content>\n <solid-ui-combobox label=\"Solid Identity Provider\" .value=${this.issuerInputValue} @input=${this.onIssuerInputChange}>\n ${suggestedIssuers.map(issuer => html`<solid-ui-combobox-option value=\"${issuer.uri}\">${issuer.name}</solid-ui-combobox-option>`)}\n </solid-ui-combobox>\n\n ${this.failed ? html`<p class=\"error-message\">Something went wrong</p>` : nothing}\n </solid-ui-dialog-content>\n\n <solid-ui-dialog-footer>\n <solid-ui-button\n variant=\"secondary\"\n @click=\"${() => this.dialog?.close()}\"\n >\n Cancel\n </solid-ui-button>\n <solid-ui-button\n ?disabled=${!this.issuerInputValue || this.submitting}\n ?loading=${this.submitting}\n type=\"submit\"\n >\n Login\n </solid-ui-button>\n </solid-ui-dialog-footer>\n </form>\n </solid-ui-dialog>\n `\n }\n\n private onIssuerInputChange (e: Event) {\n this.issuerInputValue = String((e.target as Combobox).value)\n }\n\n private async onSubmit (e: Event) {\n e.preventDefault()\n\n this.failed = false\n\n if (!this.issuerInputValue) {\n return\n }\n\n this.submitting = true\n\n try {\n await this.auth.login(this.issuerInputValue)\n } catch (error) {\n console.error(error)\n\n this.failed = true\n } finally {\n this.submitting = false\n }\n }\n}\n","import LoginModal from './LoginModal'\n\nexport { LoginModal }\nexport default LoginModal\n","import Account from '@/lib/auth/Account'\nimport ns from '@/lib/ns'\nimport { authn, authSession, reloadOnIdentityReplaced, solidLogicSingleton } from 'solid-logic'\nimport { AuthContext } from '@/lib/auth'\nimport { showDialog } from '@/lib/dialogs'\n\nimport LoginModal from '@/components/login-modal'\n\nexport const DEFAULT_SIGNUP_URL = 'https://solidproject.org/get_a_pod'\n\nfunction findAccountImage (webId: string): string | undefined {\n const store = solidLogicSingleton.store\n const me = store.sym(webId)\n const image =\n store.any(me, ns.sioc('avatar')) ||\n store.any(me, ns.foaf('img')) ||\n store.any(me, ns.vcard('logo')) ||\n store.any(me, ns.vcard('hasPhoto')) ||\n store.any(me, ns.vcard('photo')) ||\n store.any(me, ns.foaf('depiction'))\n\n return image ? (image as any).value : undefined\n}\n\nexport default class SolidAuth implements AuthContext {\n private _initialized = false\n private profileLoaded = false\n private listeners: (() => unknown)[] = []\n\n constructor (public signupUrl: string = DEFAULT_SIGNUP_URL) {}\n\n async initialize () {\n authSession.events.on('sessionRestore', () => {\n ;(solidLogicSingleton.store.updater as any).flagAuthorizationMetadata()\n })\n\n // An identity that was actively established was replaced while the session\n // stayed active (A -> B, e.g. from another tab): everything fetched under\n // the previous identity is stale, so the app reloads. A logout is not a\n // reload case here — the derived info already reports logged out and the\n // logout path runs its own cleanup and navigation.\n reloadOnIdentityReplaced(authSession.events, () => {\n if (authSession.info?.isLoggedIn) window.location.reload()\n })\n\n await authn.checkUser()\n\n this._initialized = true\n this.listeners.forEach(listener => listener())\n }\n\n async loadProfile () {\n if (this.profileLoaded || !this.account) {\n return\n }\n\n this.profileLoaded = true\n\n await solidLogicSingleton.profile.loadMe()\n\n this.listeners.forEach(listener => listener())\n }\n\n get initialized (): boolean {\n return this._initialized\n }\n\n get account (): Account | null {\n const webId: string | undefined = authSession.webId ?? authSession.info?.webId\n const isActive: boolean = authSession.isActive ?? authSession.info?.isLoggedIn ?? Boolean(webId)\n\n if (!isActive || !webId) {\n return null\n }\n\n const avatarUrl = findAccountImage(webId)\n\n return new Account(webId, avatarUrl)\n }\n\n async login (loginUrl?: string) {\n if (!loginUrl) {\n showDialog(LoginModal)\n\n return\n }\n\n // clear authorization metadata from store\n ;(solidLogicSingleton.store.updater as any).flagAuthorizationMetadata()\n\n const preLoginRedirectHash = new URL(window.location.href).hash\n if (preLoginRedirectHash) {\n window.localStorage.setItem('preLoginRedirectHash', preLoginRedirectHash)\n }\n window.localStorage.setItem('loginIssuer', loginUrl)\n\n const locationUrl = new URL(window.location.href)\n\n locationUrl.hash = ''\n\n await authSession.login(loginUrl, locationUrl.href)\n }\n\n async signup () {\n window.open(this.signupUrl, '_blank', 'noopener,noreferrer')\n }\n\n async logout () {\n await authSession.logout()\n }\n\n onSessionUpdated (callback: () => unknown) {\n const sessionEventTarget = authSession as unknown as EventTarget\n const listener = () => {\n callback()\n }\n\n this.listeners.push(listener)\n\n if (typeof sessionEventTarget.addEventListener === 'function') {\n sessionEventTarget.addEventListener('sessionStateChange', listener)\n } else {\n authSession.events.on('login', listener)\n authSession.events.on('logout', listener)\n authSession.events.on('sessionRestore', listener)\n }\n\n return () => {\n this.listeners = this.listeners.filter(_listener => _listener !== listener)\n\n if (typeof sessionEventTarget.removeEventListener === 'function') {\n sessionEventTarget.removeEventListener('sessionStateChange', listener)\n } else {\n authSession.events.off('login', listener)\n authSession.events.off('logout', listener)\n authSession.events.off('sessionRestore', listener)\n }\n }\n }\n}\n"],"ignoreList":[0],"mappings":";;;;;;;;;;;;AACA,IAAIqM,IAAI;CACP;EACC,MAAM;EACN,KAAK;CACN;CACA;EACC,MAAM;EACN,KAAK;CACN;CACA;EACC,MAAM;EACN,KAAK;CACN;CACA;EACC,MAAM;EACN,KAAK;CACN;AACD;AACA,SAASC,IAAI;CACZ,IAAIA,IAAI,CAAC,GAAGD,CAAC,GAAG,EAAE,MAAMH,GAAG,QAAQK,MAAM,IAAI,IAAI,SAAS,IAAI;CAC9D,OAAOD,EAAE,KAAK,EAAE,KAAK,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,SAASJ,CAAC,KAAKI,EAAE,QAAQ;EACtE,MAAMJ;EACN,KAAKK;CACN,CAAC,GAAGD;AACL;;;ACzBA,IAAqBtM,IAArB,MAA6B;CACXC;CACAC;CAEhBC,YAAaF,GAAeC,GAAoB;EAE9C,AADA,KAAKD,QAAQA,GACb,KAAKC,YAAYA;CAC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,MAAc3B,CAAQ,GAEtE,OAAOuB,EAAmBK,uBAAwB,aACpDL,EAAmBK,oBAAoB,sBAAsB5B,CAAQ,KAErEpC,EAAYyB,OAAOwC,IAAI,SAAS7B,CAAQ,GACxCpC,EAAYyB,OAAOwC,IAAI,UAAU7B,CAAQ,GACzCpC,EAAYyB,OAAOwC,IAAI,kBAAkB7B,CAAQ;EAErD;CACF;AACF"}
1
+ {"version":3,"file":"auth-Hp8M6TQf.js","names":["Account","webId","avatarUrl","constructor","NoopAuth","initialized","account","login","Error","signup","logout","onSessionUpdated","undefined","createContext","NoopAuth","DEFAULT_AUTH_CONTEXT","authContext","Symbol","createContext","customElement","WebComponent","html","nothing","consume","property","query","state","authContext","DEFAULT_AUTH_CONTEXT","getSuggestedIssuers","styles","_classDecs","_LoginModal","_LoginModal2","_A","WeakMap","_B","_C","_D","_E","_F","_ref","_issuerUrlDecs","type","String","reflect","_issuerInputValueDecs","_failedDecs","_submittingDecs","_authDecs","context","subscribe","_dialogDecs","_LoginModal3","LoginModal","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_issuerUrl","_init_issuerInputValue","_init_failed","_init_submitting","_init_auth","_init_dialog","_classPrivateFieldGet","issuerUrl","v","_classPrivateFieldSet","issuerInputValue","failed","submitting","auth","dialog","connectedCallback","localStorage","getItem","uri","render","suggestedIssuers","onSubmit","onIssuerInputChange","map","issuer","name","close","e","target","value","preventDefault","login","error","console","c","_initClass","_applyDecs","_Class","_identity","_defineProperty","default","property","state","consume","query","getSuggestedIssuers","nothing","styles","LoginModal","LoginModal","Account","ns","authn","authSession","reloadOnIdentityReplaced","solidLogicSingleton","showDialog","LoginModal","DEFAULT_SIGNUP_URL","findAccountImage","webId","store","me","sym","image","any","sioc","foaf","vcard","value","undefined","SolidAuth","_initialized","profileLoaded","listeners","constructor","signupUrl","initialize","events","on","updater","flagAuthorizationMetadata","info","isLoggedIn","window","location","reload","checkUser","forEach","listener","loadProfile","account","profile","loadMe","initialized","isActive","Boolean","avatarUrl","login","loginUrl","preLoginRedirectHash","URL","href","hash","localStorage","setItem","locationUrl","signup","open","logout","onSessionUpdated","callback","sessionEventTarget","push","addEventListener","filter","_listener","removeEventListener","off","solidLogicSingleton","ns","authSession","authn","LoginModal","ns_default","c","C","C$1","c$1","A","customElement","n$1","WebComponent","i","b","n","e$1","showDialog","e","t","r","Account","webId","avatarUrl","NoopAuth","DEFAULT_AUTH_CONTEXT","authContext","LoginModal_styles_default","_Class","_LoginModal3","_A","_B","_C","_D","_E","_F","_initProto","_initClass","_classDecs","_issuerUrlDecs","_init_issuerUrl","_issuerInputValueDecs","_init_issuerInputValue","_failedDecs","_init_failed","_submittingDecs","_init_submitting","_authDecs","_init_auth","_dialogDecs","_init_dialog","_LoginModal2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","_classPrivateFieldGet","_defineProperty","_toPropertyKey","_applyDecs","o","applyDec","m","h","y","v","g","u","w","S","d","p","_setFunctionName","P","j","D","I","F","l","f","N","_checkInRHS","_toPrimitive","_identity","_LoginModal","args","suggestedIssuers","issuer","error","login_modal_default","DEFAULT_SIGNUP_URL","findAccountImage","store","me","image","SolidAuth","signupUrl","listener","loginUrl","preLoginRedirectHash","locationUrl","sessionEventTarget","_listener"],"sources":["../../node_modules/solid-logic/dist/issuer/issuerLogic.esm.js","../../src/lib/auth/Account.ts","../../src/lib/auth/NoopAuth.ts","../../src/lib/auth/context.ts","../../src/components/login-modal/LoginModal.styles.css","../../src/components/login-modal/LoginModal.ts","../../src/components/login-modal/index.ts","../../src/lib/auth/SolidAuth.ts"],"sourcesContent":["//#region src/issuer/issuerLogic.ts\nvar e = [\n\t{\n\t\tname: \"Solid Community\",\n\t\turi: \"https://solidcommunity.net\"\n\t},\n\t{\n\t\tname: \"Solid Web\",\n\t\turi: \"https://solidweb.org\"\n\t},\n\t{\n\t\tname: \"Solid Web ME\",\n\t\turi: \"https://solidweb.me\"\n\t},\n\t{\n\t\tname: \"Inrupt.com\",\n\t\turi: \"https://login.inrupt.com\"\n\t}\n];\nfunction t() {\n\tlet t = [...e], { host: n, origin: r } = new URL(location.href);\n\treturn t.map(({ uri: e }) => new URL(e).host).includes(n) || t.unshift({\n\t\tname: n,\n\t\turi: r\n\t}), t;\n}\n//#endregion\nexport { t as getSuggestedIssuers };\n\n//# sourceMappingURL=issuerLogic.esm.js.map","export default class Account {\n public readonly webId: string\n public readonly avatarUrl?: string\n\n constructor (webId: string, avatarUrl?: string) {\n this.webId = webId\n this.avatarUrl = avatarUrl\n }\n}\n","import { AuthContext } from './context'\n\nexport default class NoopAuth implements AuthContext {\n public readonly initialized = false\n public readonly account = null\n\n async login () {\n throw new Error('Can\\'t use auth, missing context provider')\n }\n\n async signup () {\n throw new Error('Can\\'t use auth, missing context provider')\n }\n\n async logout () {\n throw new Error('Can\\'t use auth, missing context provider')\n }\n\n onSessionUpdated () {\n return () => undefined\n }\n}\n","import { createContext } from '@lit/context'\nimport NoopAuth from './NoopAuth'\nimport Account from './Account'\n\nexport interface AuthContext {\n initialized: boolean;\n account: Account | null;\n login(loginUrl?: string): Promise<void>;\n loadProfile?(): Promise<void>;\n signup(): Promise<void>;\n logout(): Promise<void>;\n onSessionUpdated(callback: () => unknown): () => void;\n}\n\nexport const DEFAULT_AUTH_CONTEXT = new NoopAuth()\nexport const authContext = createContext<AuthContext>(Symbol('auth'))\n",".error-message {\n color: var(--solid-ui-color-error);\n font-size: var(--solid-ui-font-size-sm);\n font-weight: 500;\n text-align: center;\n width: 100%;\n}\n\nsolid-ui-combobox {\n width: 100%;\n}\n\nsolid-ui-button {\n flex: 1;\n}\n","import { customElement, WebComponent } from '@/lib/components'\nimport { html, nothing } from 'lit'\nimport { consume } from '@lit/context'\nimport { property, query, state } from 'lit/decorators.js'\nimport { AuthContext, authContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\nimport { getSuggestedIssuers } from 'solid-logic'\nimport type Dialog from '@/components/dialog'\nimport type Combobox from '@/components/combobox'\n\nimport '~icons/lucide/chevron-down'\nimport '@/components/dialog'\nimport '@/components/dialog-content'\nimport '@/components/dialog-footer'\nimport '@/components/button'\nimport '@/components/combobox'\nimport '@/components/combobox-option'\n\nimport styles from './LoginModal.styles.css'\n\n@customElement('solid-ui-login-modal')\nexport default class LoginModal extends WebComponent {\n static styles = styles\n\n @property({ type: String, reflect: true })\n accessor issuerUrl = ''\n\n @state()\n private accessor issuerInputValue = ''\n\n @state()\n private accessor failed: boolean = false\n\n @state()\n private accessor submitting: boolean = false\n\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n @query('solid-ui-dialog')\n private accessor dialog: Dialog | null = null\n\n connectedCallback () {\n super.connectedCallback()\n\n this.issuerInputValue =\n (typeof localStorage !== 'undefined' && localStorage.getItem('loginIssuer')) ||\n this.issuerUrl ||\n getSuggestedIssuers()[0]?.uri ||\n ''\n }\n\n protected render () {\n const suggestedIssuers = getSuggestedIssuers()\n\n return html`\n <solid-ui-dialog title=\"Select an identity provider\">\n <form @submit=${this.onSubmit}>\n <solid-ui-dialog-content>\n <solid-ui-combobox label=\"Solid Identity Provider\" .value=${this.issuerInputValue} @input=${this.onIssuerInputChange}>\n ${suggestedIssuers.map(issuer => html`<solid-ui-combobox-option value=\"${issuer.uri}\">${issuer.name}</solid-ui-combobox-option>`)}\n </solid-ui-combobox>\n\n ${this.failed ? html`<p class=\"error-message\">Something went wrong</p>` : nothing}\n </solid-ui-dialog-content>\n\n <solid-ui-dialog-footer>\n <solid-ui-button\n variant=\"secondary\"\n @click=\"${() => this.dialog?.close()}\"\n >\n Cancel\n </solid-ui-button>\n <solid-ui-button\n ?disabled=${!this.issuerInputValue || this.submitting}\n ?loading=${this.submitting}\n type=\"submit\"\n >\n Login\n </solid-ui-button>\n </solid-ui-dialog-footer>\n </form>\n </solid-ui-dialog>\n `\n }\n\n private onIssuerInputChange (e: Event) {\n this.issuerInputValue = String((e.target as Combobox).value)\n }\n\n private async onSubmit (e: Event) {\n e.preventDefault()\n\n this.failed = false\n\n if (!this.issuerInputValue) {\n return\n }\n\n this.submitting = true\n\n try {\n await this.auth.login(this.issuerInputValue)\n } catch (error) {\n console.error(error)\n\n this.failed = true\n } finally {\n this.submitting = false\n }\n }\n}\n","import LoginModal from './LoginModal'\n\nexport { LoginModal }\nexport default LoginModal\n","import Account from '@/lib/auth/Account'\nimport ns from '@/lib/ns'\nimport { authn, authSession, reloadOnIdentityReplaced, solidLogicSingleton } from 'solid-logic'\nimport { AuthContext } from '@/lib/auth'\nimport { showDialog } from '@/lib/dialogs'\n\nimport LoginModal from '@/components/login-modal'\n\nexport const DEFAULT_SIGNUP_URL = 'https://solidproject.org/get_a_pod'\n\nfunction findAccountImage (webId: string): string | undefined {\n const store = solidLogicSingleton.store\n const me = store.sym(webId)\n const image =\n store.any(me, ns.sioc('avatar')) ||\n store.any(me, ns.foaf('img')) ||\n store.any(me, ns.vcard('logo')) ||\n store.any(me, ns.vcard('hasPhoto')) ||\n store.any(me, ns.vcard('photo')) ||\n store.any(me, ns.foaf('depiction'))\n\n return image ? (image as any).value : undefined\n}\n\nexport default class SolidAuth implements AuthContext {\n private _initialized = false\n private profileLoaded = false\n private listeners: (() => unknown)[] = []\n\n constructor (public signupUrl: string = DEFAULT_SIGNUP_URL) {}\n\n async initialize () {\n authSession.events.on('sessionRestore', () => {\n ;(solidLogicSingleton.store.updater as any).flagAuthorizationMetadata()\n })\n\n // An identity that was actively established was replaced while the session\n // stayed active (A -> B, e.g. from another tab): everything fetched under\n // the previous identity is stale, so the app reloads. A logout is not a\n // reload case here — the derived info already reports logged out and the\n // logout path runs its own cleanup and navigation.\n reloadOnIdentityReplaced(authSession.events, () => {\n if (authSession.info?.isLoggedIn) window.location.reload()\n })\n\n await authn.checkUser()\n\n this._initialized = true\n this.listeners.forEach(listener => listener())\n }\n\n async loadProfile () {\n if (this.profileLoaded || !this.account) {\n return\n }\n\n this.profileLoaded = true\n\n await solidLogicSingleton.profile.loadMe()\n\n this.listeners.forEach(listener => listener())\n }\n\n get initialized (): boolean {\n return this._initialized\n }\n\n get account (): Account | null {\n const webId: string | undefined = authSession.webId ?? authSession.info?.webId\n const isActive: boolean = authSession.isActive ?? authSession.info?.isLoggedIn ?? Boolean(webId)\n\n if (!isActive || !webId) {\n return null\n }\n\n const avatarUrl = findAccountImage(webId)\n\n return new Account(webId, avatarUrl)\n }\n\n async login (loginUrl?: string) {\n if (!loginUrl) {\n showDialog(LoginModal)\n\n return\n }\n\n // clear authorization metadata from store\n ;(solidLogicSingleton.store.updater as any).flagAuthorizationMetadata()\n\n const preLoginRedirectHash = new URL(window.location.href).hash\n if (preLoginRedirectHash) {\n window.localStorage.setItem('preLoginRedirectHash', preLoginRedirectHash)\n }\n window.localStorage.setItem('loginIssuer', loginUrl)\n\n const locationUrl = new URL(window.location.href)\n\n locationUrl.hash = ''\n\n await authSession.login(loginUrl, locationUrl.href)\n }\n\n async signup () {\n window.open(this.signupUrl, '_blank', 'noopener,noreferrer')\n }\n\n async logout () {\n await authSession.logout()\n }\n\n onSessionUpdated (callback: () => unknown) {\n const sessionEventTarget = authSession as unknown as EventTarget\n const listener = () => {\n callback()\n }\n\n this.listeners.push(listener)\n\n if (typeof sessionEventTarget.addEventListener === 'function') {\n sessionEventTarget.addEventListener('sessionStateChange', listener)\n } else {\n authSession.events.on('login', listener)\n authSession.events.on('logout', listener)\n authSession.events.on('sessionRestore', listener)\n }\n\n return () => {\n this.listeners = this.listeners.filter(_listener => _listener !== listener)\n\n if (typeof sessionEventTarget.removeEventListener === 'function') {\n sessionEventTarget.removeEventListener('sessionStateChange', listener)\n } else {\n authSession.events.off('login', listener)\n authSession.events.off('logout', listener)\n authSession.events.off('sessionRestore', listener)\n }\n }\n }\n}\n"],"ignoreList":[0],"mappings":";;;;;;;;;;;;AACA,IAAIqM,IAAI;CACP;EACC,MAAM;EACN,KAAK;CACN;CACA;EACC,MAAM;EACN,KAAK;CACN;CACA;EACC,MAAM;EAC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qBAAqB;CAC7D;CAEA,MAAMiC,SAAU;EACd,MAAMxD,EAAYwD,OAAO;CAC3B;CAEAC,iBAAkBC,GAAyB;EACzC,IAAMC,IAAqB3D,GACrBoC,UAAiB;GACrBsB,EAAS;EACX;EAYA,OAVA,KAAKrC,UAAUuC,KAAKxB,CAAQ,GAExB,OAAOuB,EAAmBE,oBAAqB,aACjDF,EAAmBE,iBAAiB,sBAAsBzB,CAAQ,KAElEpC,EAAYyB,OAAOC,GAAG,SAASU,CAAQ,GACvCpC,EAAYyB,OAAOC,GAAG,UAAUU,CAAQ,GACxCpC,EAAYyB,OAAOC,GAAG,kBAAkBU,CAAQ,UAGrC;GAGX,AAFA,KAAKf,YAAY,KAAKA,UAAUyC,QAAOC,MAAaA,MAAc3B,CAAQ,GAEtE,OAAOuB,EAAmBK,uBAAwB,aACpDL,EAAmBK,oBAAoB,sBAAsB5B,CAAQ,KAErEpC,EAAYyB,OAAOwC,IAAI,SAAS7B,CAAQ,GACxCpC,EAAYyB,OAAOwC,IAAI,UAAU7B,CAAQ,GACzCpC,EAAYyB,OAAOwC,IAAI,kBAAkB7B,CAAQ;EAErD;CACF;AACF"}
@@ -1,4 +1,4 @@
1
- import { a as e, o as t } from "./auth-BgEyix2g.js";
1
+ import { a as e, o as t } from "./auth-Hp8M6TQf.js";
2
2
  import { b as n, g as r, o as i, p as a, u as o } from "./components-Bdqizu8x.js";
3
3
  //#region ~icons/lucide/circle-user
4
4
  var s = class extends HTMLElement {
@@ -226,4 +226,4 @@ var M = j;
226
226
  //#endregion
227
227
  export { j as n, M as t };
228
228
 
229
- //# sourceMappingURL=avatar-DiGyEwvL.js.map
229
+ //# sourceMappingURL=avatar-D5rcw6gN.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar-DiGyEwvL.js","names":["customElement","WebComponent","consume","html","authContext","DEFAULT_AUTH_CONTEXT","styles","_classDecs","_Avatar","_Avatar2","_A","WeakMap","_ref","_authDecs","context","subscribe","_Avatar3","Avatar","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_auth","_defineProperty","_classPrivateFieldGet","auth","v","_classPrivateFieldSet","connectedCallback","loadProfile","unsubscribeSessionUpdated","onSessionUpdated","requestUpdate","disconnectedCallback","render","account","avatarUrl","e","c","_initClass","_applyDecs","_Class","_identity","fallback","component","default","consume","styles","Avatar","Avatar","DEFAULT_AUTH_CONTEXT","authContext","c","customElement","WebComponent","i","b","iconlucidecircleuser","Avatar_styles_default","_Class","_Avatar3","_A","_initProto","_initClass","_classDecs","_authDecs","_init_auth","_Avatar2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","n","o","applyDec","m","h","y","v","g","u","w","S","A","d","p","_setFunctionName","P","j","D","I","O","k","F","l","f","N","_checkInRHS","_toPrimitive","e","_identity","_Avatar","args","component","avatar_default"],"sources":["../../src/components/avatar/Avatar.styles.css","../../src/components/avatar/Avatar.ts","../../src/components/avatar/index.ts"],"sourcesContent":[":host {\n --size: 150px;\n\n display: inline-flex;\n overflow: hidden;\n width: var(--size);\n height: var(--size);\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n}\n\n:host([data-state-fallback]) {\n background: var(--solid-ui-color-gray-100);\n justify-content: center;\n align-items: center;\n\n icon-lucide-circle-user {\n color: var(--solid-ui-color-gray-200);\n width: 50%;\n height: 50%;\n }\n}\n","import { customElement, WebComponent } from '@/lib/components'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport { authContext, AuthContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\n\nimport '~icons/lucide/circle-user'\n\nimport styles from './Avatar.styles.css'\n\n@customElement('solid-ui-avatar')\nexport default class Avatar extends WebComponent {\n static styles = styles\n static states = {\n fallback: (component: Avatar) => !component.auth.account?.avatarUrl,\n }\n\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n private unsubscribeSessionUpdated?: () => void\n\n connectedCallback () {\n super.connectedCallback()\n\n this.auth.loadProfile?.()\n\n this.unsubscribeSessionUpdated = this.auth.onSessionUpdated(() => {\n this.auth.loadProfile?.()\n this.requestUpdate()\n })\n }\n\n disconnectedCallback () {\n super.disconnectedCallback()\n\n this.unsubscribeSessionUpdated?.()\n }\n\n protected render () {\n if (!this.auth.account?.avatarUrl) {\n return html`\n <icon-lucide-circle-user></icon-lucide-circle-user>\n `\n }\n\n return html`\n <img src=\"${this.auth.account?.avatarUrl}\" alt=\"\" />\n `\n }\n}\n","import Avatar from './Avatar'\n\nexport { Avatar }\nexport default Avatar\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACOwCO,IAAA,CAEvCP,EAAc,iBAAiB,CAAC;AAAA,IAAAQ;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,KAAAC,IAO9BX,EAAQ;CAAEY,SAASV;CAAaW,WAAW;AAAK,CAAC,GAAC,SAAAC,IAPrD,cACoCf,EAAa;CAAAiB,YAAA,GAAAC,GAAA;EAOUI,AAPV,MAAA,GAAAJ,CAAA,GAAAC,EAAA,MAAAV,IAAAW,EAAA,IAAA,GAAAC,EAAA,MAOVjB,CAAoB,EAAA,GAAAkB,EAAA,MAAA,6BAAA,KAAA,CAAA;CAAA;CAAA,KAAAX,KAAA;EAAA,OAAAY,EAAAd,GAAA,IAAA;CAAA;CAAA,IAAxCe,KAAIC,GAAA;EAAAC,EAAAjB,GAAA,MAAAgB,CAAA;CAAA;CAIrBE,oBAAqB;EAKnB,AAJA,MAAMA,kBAAkB,GAExB,KAAKH,KAAKI,cAAc,GAExB,KAAKC,4BAA4B,KAAKL,KAAKM,uBAAuB;GAEhE,AADA,KAAKN,KAAKI,cAAc,GACxB,KAAKG,cAAc;EACrB,CAAC;CACH;CAEAC,uBAAwB;EAGtB,AAFA,MAAMA,qBAAqB,GAE3B,KAAKH,4BAA4B;CACnC;CAEUI,SAAU;EAOlB,OANK,KAAKT,KAAKU,SAASC,YAMjBjC,CAAI;oBACK,KAAKsB,KAAKU,SAASC,UAAS;QANnCjC,CAAI;;;CAQf;AACF,GAAC,CAAAkC,GAAA,CAAAf,GAAAD,IAAAiB,GAAA,CAAA9B,GAAA+B,MAAAC,EAAAxB,GAAA,CAAA;CAAAH;CAAA;CAAA;AAAA,CAAA,GAAAN,GAAA,GAAA,KAAA,GAvCmCN,CAAY,GAAAe,IAAAyB,IAAA,cAAAC,EAAA;CAAAxB,cAAA;EAAA,MAAAV,CAAA,GAAAe,EAAA,MAAA,UAC9BjB,CAAM,GAAAiB,EAAA,MAAA,UACN,EACdoB,WAAWC,MAAsB,CAACA,EAAUnB,KAAKU,SAASC,UAC5D,CAAC,GAAAG,EAAA;CAAA;AAAA,GAAAhB,EAAAkB,GAAAhC,GAAA,KAAA,CAAA,GAAAgC,GAAA;;;ACXH,IAAAwE,IAAejE"}
1
+ {"version":3,"file":"avatar-D5rcw6gN.js","names":["customElement","WebComponent","consume","html","authContext","DEFAULT_AUTH_CONTEXT","styles","_classDecs","_Avatar","_Avatar2","_A","WeakMap","_ref","_authDecs","context","subscribe","_Avatar3","Avatar","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_auth","_defineProperty","_classPrivateFieldGet","auth","v","_classPrivateFieldSet","connectedCallback","loadProfile","unsubscribeSessionUpdated","onSessionUpdated","requestUpdate","disconnectedCallback","render","account","avatarUrl","e","c","_initClass","_applyDecs","_Class","_identity","fallback","component","default","consume","styles","Avatar","Avatar","DEFAULT_AUTH_CONTEXT","authContext","c","customElement","WebComponent","i","b","iconlucidecircleuser","Avatar_styles_default","_Class","_Avatar3","_A","_initProto","_initClass","_classDecs","_authDecs","_init_auth","_Avatar2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","n","o","applyDec","m","h","y","v","g","u","w","S","A","d","p","_setFunctionName","P","j","D","I","O","k","F","l","f","N","_checkInRHS","_toPrimitive","e","_identity","_Avatar","args","component","avatar_default"],"sources":["../../src/components/avatar/Avatar.styles.css","../../src/components/avatar/Avatar.ts","../../src/components/avatar/index.ts"],"sourcesContent":[":host {\n --size: 150px;\n\n display: inline-flex;\n overflow: hidden;\n width: var(--size);\n height: var(--size);\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n}\n\n:host([data-state-fallback]) {\n background: var(--solid-ui-color-gray-100);\n justify-content: center;\n align-items: center;\n\n icon-lucide-circle-user {\n color: var(--solid-ui-color-gray-200);\n width: 50%;\n height: 50%;\n }\n}\n","import { customElement, WebComponent } from '@/lib/components'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport { authContext, AuthContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\n\nimport '~icons/lucide/circle-user'\n\nimport styles from './Avatar.styles.css'\n\n@customElement('solid-ui-avatar')\nexport default class Avatar extends WebComponent {\n static styles = styles\n static states = {\n fallback: (component: Avatar) => !component.auth.account?.avatarUrl,\n }\n\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n private unsubscribeSessionUpdated?: () => void\n\n connectedCallback () {\n super.connectedCallback()\n\n this.auth.loadProfile?.()\n\n this.unsubscribeSessionUpdated = this.auth.onSessionUpdated(() => {\n this.auth.loadProfile?.()\n this.requestUpdate()\n })\n }\n\n disconnectedCallback () {\n super.disconnectedCallback()\n\n this.unsubscribeSessionUpdated?.()\n }\n\n protected render () {\n if (!this.auth.account?.avatarUrl) {\n return html`\n <icon-lucide-circle-user></icon-lucide-circle-user>\n `\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C,CAAAkC,GAAA,CAAAf,GAAAD,IAAAiB,GAAA,CAAA9B,GAAA+B,MAAAC,EAAAxB,GAAA,CAAA;CAAAH;CAAA;CAAA;AAAA,CAAA,GAAAN,GAAA,GAAA,KAAA,GAvCmCN,CAAY,GAAAe,IAAAyB,IAAA,cAAAC,EAAA;CAAAxB,cAAA;EAAA,MAAAV,CAAA,GAAAe,EAAA,MAAA,UAC9BjB,CAAM,GAAAiB,EAAA,MAAA,UACN,EACdoB,WAAWC,MAAsB,CAACA,EAAUnB,KAAKU,SAASC,UAC5D,CAAC,GAAAG,EAAA;CAAA;AAAA,GAAAhB,EAAAkB,GAAAhC,GAAA,KAAA,CAAA,GAAAgC,GAAA;;;ACXH,IAAAwE,IAAejE"}
@@ -105,7 +105,7 @@ var p = class extends HTMLElement {
105
105
  customElements.get("icon-svg-spinners-3-dots-fade") || customElements.define("icon-svg-spinners-3-dots-fade", p);
106
106
  //#endregion
107
107
  //#region src/components/combobox/Combobox.styles.css
108
- var m = i`:host{--solid-ui-input-border-color:var(--solid-ui-color-gray-400);flex-direction:column;align-items:flex-start;gap:5px;display:inline-flex;& label{color:var(--solid-ui-color-gray-600);font-size:var(--solid-ui-font-size-sm);font-weight:400}& wa-popup{width:100%;display:block}& wa-popup::part(popup){border:1px solid var(--solid-ui-color-gray-100);background:#fff;border-radius:5px;padding:4px;overflow:hidden;box-shadow:0 4px 16px #00000059}& .input-wrapper{width:100%;position:relative;& input{border:1px solid var(--solid-ui-input-border-color);border-radius:5px;width:100%;padding:10px 40px 10px 10px}& icon-lucide-chevron-down{color:var(--solid-ui-color-gray-500);width:var(--solid-ui-font-size-lg);height:var(--solid-ui-font-size-lg);pointer-events:none;position:absolute;top:50%;right:15px;transform:translateY(-50%)}}& .listbox{max-height:min(28rem, calc(100dvh - 6rem), var(--auto-size-available-height,28rem));overscroll-behavior:contain;scrollbar-width:thin;flex-direction:column;gap:2px;display:flex;overflow:hidden auto;&::-webkit-scrollbar{width:4px}& [role=option],& .non-selectable-option{color:var(--solid-ui-color-gray-700);border-radius:5px;padding:12px 8px}& [role=option]{cursor:pointer;&:hover,&[data-active]{background:var(--solid-ui-color-primary-hover)}&[aria-selected=true]{background:var(--solid-ui-color-primary-selected)}}& .non-selectable-option{justify-content:center;align-items:center;display:flex;& icon-svg-spinners-3-dots-fade{width:2rem}& .message--error{color:var(--solid-ui-color-error)}}}}`, h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, ee, te, ne, re, ie, ae, oe, se, M, N, P, F, I, L, R, z, B, V, H, U, W, G, K, ce, le, ue, de, fe, pe;
108
+ var m = i`:host{--solid-ui-input-border-color:var(--solid-ui-color-gray-400);flex-direction:column;align-items:flex-start;gap:5px;display:inline-flex;& label{color:var(--solid-ui-color-gray-600);font-size:var(--solid-ui-font-size-sm);font-weight:400}& wa-popup{width:100%;display:block}& wa-popup::part(popup){border:1px solid var(--solid-ui-color-gray-100);background:#fff;border-radius:5px;padding:4px;overflow:hidden;box-shadow:0 4px 16px #00000059}& .input-wrapper{width:100%;position:relative;& input{border:1px solid var(--solid-ui-input-border-color);border-radius:5px;width:100%;padding:10px 40px 10px 10px;&:focus-visible{outline:var(--focus-indicator-width,2px) solid var(--color-primary,var(--solid-ui-color-primary,#7c4dff));outline-offset:2px;box-shadow:0 0 0 1px var(--color-background,#f8f9fb), 0 0 0 4px #7c4dff33;transition:none}}& icon-lucide-chevron-down{color:var(--solid-ui-color-gray-500);width:var(--solid-ui-font-size-lg);height:var(--solid-ui-font-size-lg);pointer-events:none;position:absolute;top:50%;right:15px;transform:translateY(-50%)}}& .listbox{max-height:min(28rem, calc(100dvh - 6rem), var(--auto-size-available-height,28rem));overscroll-behavior:contain;scrollbar-width:thin;flex-direction:column;gap:2px;display:flex;overflow:hidden auto;&::-webkit-scrollbar{width:4px}& [role=option],& .non-selectable-option{color:var(--solid-ui-color-gray-700);border-radius:5px;padding:12px 8px}& [role=option]{cursor:pointer;&:hover,&[data-active]{background:var(--solid-ui-color-primary-hover)}&[aria-selected=true]{background:var(--solid-ui-color-primary-selected)}}& .non-selectable-option{justify-content:center;align-items:center;display:flex;& icon-svg-spinners-3-dots-fade{width:2rem}& .message--error{color:var(--solid-ui-color-error)}}}}`, h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, ee, te, ne, re, ie, ae, oe, se, M, N, P, F, I, L, R, z, B, V, H, U, W, G, K, ce, le, ue, de, fe, pe;
109
109
  function q(e, t, n) {
110
110
  me(e, t), t.set(e, n);
111
111
  }
@@ -673,4 +673,4 @@ var Se = $;
673
673
  //#endregion
674
674
  export { $ as n, xe as r, Se as t };
675
675
 
676
- //# sourceMappingURL=combobox-a0vVnPo8.js.map
676
+ //# sourceMappingURL=combobox-Dmv-TZtI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combobox-Dmv-TZtI.js","names":["t","debounce","delay","callback","timeout","debouncedCallback","args","cancel","setTimeout","clearTimeout","customElement","FormControlComponent","Task","html","nothing","property","query","state","debounce","styles","AsyncOptionsInfo","Error","defineAsyncComboboxOptionsProvider","provider","_classDecs","_Combobox","_Combobox2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_ref","_selectOnlyDecs","type","Boolean","reflect","attribute","_asyncOptionsUrlDecs","String","_asyncOptionsResultsFieldDecs","_asyncOptionsLabelFieldDecs","_asyncOptionsValueFieldDecs","_asyncOptionsProviderDecs","Function","_optionsFallbackDecs","Array","_controlElementDecs","_readonlyDecs","_filterDecs","_displayValueDecs","_openDecs","_activeIndexDecs","_Combobox3","Combobox","_classPrivateFieldGet","selectOnly","v","_classPrivateFieldSet","asyncOptionsUrl","asyncOptionsResultsField","asyncOptionsLabelField","asyncOptionsValueField","asyncOptionsProvider","optionsFallback","controlElement","readonly","filter","displayValue","open","activeIndex","constructor","_classPrivateFieldInitSpec","_initProto","_init_selectOnly","_init_asyncOptionsUrl","_init_asyncOptionsResultsField","_init_asyncOptionsLabelField","_init_asyncOptionsValueField","_init_asyncOptionsProvider","_init_optionsFallback","_init_controlElement","_init_readonly","_init_filter","_init_displayValue","_init_open","_init_activeIndex","_defineProperty","value","event","path","composedPath","includes","hide","listboxId","controlTrait","controlId","selectedOption","_selectedOption","disconnectedCallback","removeOpenListeners","willUpdate","changedProperties","has","updateAsyncOptionsTask","options","getFilteredOptions","option","find","selectable","optionLabel","label","updateDisplayValue","getInitialActiveIndex","undefined","render","activeOption","activeDescendant","getOptionId","accessibleName","placeholder","renderLabel","onAnchorMouseDown","name","labelId","required","onInputKeyDown","onInputFocus","onInputClick","onInput","onListboxMouseDown","map","index","setActiveIndex","template","asyncOptionsTask","initial","complete","pending","error","isError","message","Object","getOptionsFromDOM","toLowerCase","querySelectorAll","from","textContent","selectedIndex","findIndex","length","getNextIndex","currentIndex","direction","updateDebouncedFilter","results","response","fetch","replace","encodeURIComponent","data","json","labelField","valueField","result","show","filteredOptions","focusLast","addOpenListeners","requestAnimationFrame","scrollActiveOptionIntoView","cancel","selectOption","previousValue","setValue","focus","preventScroll","dispatchEvent","CustomEvent","bubbles","composed","detail","shadowRoot","querySelector","scrollIntoView","block","openListenersAttached","document","addEventListener","handleDocumentFocusIn","handleDocumentMouseDown","root","getRootNode","removeEventListener","target","preventDefault","openPopupFromKey","key","onSubmit","stopPropagation","HTMLElement","optionElement","closest","optionId","id","Number","parseInt","e","c","_initClass","_applyDecs","_Class","_identity","default","property","query","state","nothing","Task","styles","Combobox","Combobox","A","customElement","n","i$1","r$1","FormControlComponent","b","e","i","h","t","s","r","f","debounce","timeout","debouncedCallback","args","callback","delay","iconsvgspinners3dotsfade","Combobox_styles_default","_Class","_Combobox3","_A","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_initProto","_initClass","_classDecs","_selectOnlyDecs","_init_selectOnly","_asyncOptionsUrlDecs","_init_asyncOptionsUrl","_asyncOptionsResultsFieldDecs","_init_asyncOptionsResultsField","_asyncOptionsLabelFieldDecs","_init_asyncOptionsLabelField","_asyncOptionsValueFieldDecs","_init_asyncOptionsValueField","_asyncOptionsProviderDecs","_init_asyncOptionsProvider","_optionsFallbackDecs","_init_optionsFallback","_controlElementDecs","_init_controlElement","_readonlyDecs","_init_readonly","_filterDecs","_init_filter","_displayValueDecs","_init_displayValue","_openDecs","_init_open","_activeIndexDecs","_init_activeIndex","_Combobox2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","_assertClassBrand","_classPrivateFieldGet","_defineProperty","_toPropertyKey","_applyDecs","o","c","applyDec","m","y","v","g","u","w","S","d","p","_setFunctionName","P","j","D","I","F","l","N","_checkInRHS","_toPrimitive","_identity","AsyncOptionsInfo","defineAsyncComboboxOptionsProvider","provider","_Combobox","value","event","changedProperties","options","option","optionLabel","activeDescendant","accessibleName","index","isError","error","message","selectedIndex","currentIndex","direction","filter","results","data","labelField","valueField","result","filteredOptions","previousValue","root","optionElement","optionId","combobox_default"],"sources":["../../node_modules/@lit/task/task.js","../../src/lib/timing.ts","../../src/components/combobox/Combobox.styles.css","../../src/components/combobox/Combobox.ts","../../src/components/combobox/index.ts"],"sourcesContent":["import{notEqual as t}from\"@lit/reactive-element\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},i=Symbol();class h{get taskComplete(){return this.t||(1===this.i?this.t=new Promise(((t,s)=>{this.o=t,this.h=s})):3===this.i?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,s,i){this.p=0,this.i=0,(this._=t).addController(this);const h=\"object\"==typeof s?s:{task:s,args:i};this.v=h.task,this.j=h.args,this.m=h.argsEqual??r,this.k=h.onComplete,this.A=h.onError,this.autoRun=h.autoRun??!0,\"initialValue\"in h&&(this.u=h.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){!0===this.autoRun&&this.S()}hostUpdated(){\"afterUpdate\"===this.autoRun&&this.S()}T(){if(void 0===this.j)return;const t=this.j();if(!Array.isArray(t))throw Error(\"The args function must return an array\");return t}async S(){const t=this.T(),s=this.O;this.O=t,t===s||void 0===t||void 0!==s&&this.m(s,t)||await this.run(t)}async run(t){let s,h;t??=this.T(),this.O=t,1===this.i?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,\"afterUpdate\"===this.autoRun?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();const r=++this.p;this.q=new AbortController;let e=!1;try{s=await this.v(t,{signal:this.q.signal})}catch(t){e=!0,h=t}if(this.p===r){if(s===i)this.i=0;else{if(!1===e){try{this.k?.(s)}catch{}this.i=2,this.o?.(s)}else{try{this.A?.(h)}catch{}this.i=3,this.h?.(h)}this.u=s,this.l=h}this._.requestUpdate()}}abort(t){1===this.i&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error(\"Unexpected status: \"+this.i)}}}const r=(s,i)=>s===i||s.length===i.length&&s.every(((s,h)=>!t(s,i[h])));export{h as Task,s as TaskStatus,i as initialState,r as shallowArrayEquals};\n//# sourceMappingURL=task.js.map\n","export interface DebouncedFunction<Args extends any[]> {\n (...args: Args): void;\n cancel(): void;\n}\n\nexport function debounce<Args extends any[]> (\n delay: number,\n callback: (...args: Args) => unknown\n): DebouncedFunction<Args> {\n let timeout: ReturnType<typeof setTimeout> | null = null\n\n const debouncedCallback: DebouncedFunction<Args> = (...args: Args) => {\n debouncedCallback.cancel()\n timeout = setTimeout(() => callback(...args), delay)\n }\n\n debouncedCallback.cancel = () => {\n if (timeout === null) {\n return\n }\n\n clearTimeout(timeout)\n timeout = null\n }\n\n return debouncedCallback\n}\n",":host {\n --solid-ui-input-border-color: var(--solid-ui-color-gray-400);\n\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 5px;\n\n label {\n color: var(--solid-ui-color-gray-600);\n font-size: var(--solid-ui-font-size-sm);\n font-weight: 400;\n }\n\n wa-popup {\n display: block;\n width: 100%;\n }\n\n wa-popup::part(popup) {\n background: white;\n border: 1px solid var(--solid-ui-color-gray-100);\n border-radius: 5px;\n box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.35);\n overflow: hidden;\n padding: 4px;\n }\n\n .input-wrapper {\n position: relative;\n width: 100%;\n\n input {\n border: 1px solid var(--solid-ui-input-border-color);\n border-radius: 5px;\n padding: 10px;\n padding-right: 40px;\n width: 100%;\n\n /* Global focus styles don't reach into the shadow DOM, so mirror them here. */\n &:focus-visible {\n outline: var(--focus-indicator-width, 2px) solid var(--color-primary, var(--solid-ui-color-primary, #7C4DFF));\n outline-offset: 2px;\n box-shadow: 0 0 0 1px var(--color-background, #F8F9FB), 0 0 0 4px rgba(124, 77, 255, 0.2);\n transition: none;\n }\n }\n\n icon-lucide-chevron-down {\n position: absolute;\n right: 15px;\n top: 50%;\n transform: translateY(-50%);\n color: var(--solid-ui-color-gray-500);\n width: var(--solid-ui-font-size-lg);\n height: var(--solid-ui-font-size-lg);\n pointer-events: none;\n }\n }\n\n .listbox {\n display: flex;\n flex-direction: column;\n gap: 2px;\n max-height: min(28rem, calc(100dvh - 6rem), var(--auto-size-available-height, 28rem));\n overflow-x: hidden;\n overflow-y: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n\n &::-webkit-scrollbar {\n width: 4px;\n }\n\n [role=\"option\"], .non-selectable-option {\n color: var(--solid-ui-color-gray-700);\n padding: 12px 8px;\n border-radius: 5px;\n }\n\n [role=\"option\"] {\n cursor: pointer;\n\n &:hover,\n &[data-active] {\n background: var(--solid-ui-color-primary-hover);\n }\n\n &[aria-selected=\"true\"] {\n background: var(--solid-ui-color-primary-selected);\n }\n }\n\n .non-selectable-option {\n display: flex;\n justify-content: center;\n align-items: center;\n\n icon-svg-spinners-3-dots-fade {\n width: 2rem;\n }\n\n .message--error {\n color: var(--solid-ui-color-error);\n }\n }\n }\n}\n","import { customElement, FormControlComponent, FormControlValue } from '@/lib/components'\nimport { Task } from '@lit/task'\nimport { html, nothing, TemplateResult, type PropertyValues } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { debounce } from '@/lib/timing'\nimport type ComboboxOption from '@/components/combobox-option/ComboboxOption'\n\nimport '~icons/lucide/chevron-down'\nimport '~icons/svg-spinners/3-dots-fade'\nimport '@awesome.me/webawesome/dist/components/popup/popup.js'\n\nimport styles from './Combobox.styles.css'\n\nclass AsyncOptionsInfo extends Error {}\n\nexport type ComboboxOptionData = {\n value: FormControlValue;\n label: string;\n template?: TemplateResult;\n selectable?: boolean;\n}\n\nexport type ComboboxChangeEvent = CustomEvent<{ option: ComboboxOptionData }>\n\nexport type AsyncComboboxOptionsProvider = (query: string) => Promise<ComboboxOptionData[]>\n\nexport function defineAsyncComboboxOptionsProvider<T extends AsyncComboboxOptionsProvider> (provider: T): T {\n return provider\n}\n\n@customElement('solid-ui-combobox')\nexport default class Combobox extends FormControlComponent {\n static styles = styles\n\n @property({ type: Boolean, reflect: true, attribute: 'select-only' })\n accessor selectOnly = false\n\n @property({ type: String, attribute: 'async-options-url' })\n accessor asyncOptionsUrl = ''\n\n @property({ type: String, attribute: 'async-options-results-field' })\n accessor asyncOptionsResultsField = ''\n\n @property({ type: String, attribute: 'async-options-label-field' })\n accessor asyncOptionsLabelField = ''\n\n @property({ type: String, attribute: 'async-options-value-field' })\n accessor asyncOptionsValueField = ''\n\n @property({ type: Function })\n accessor asyncOptionsProvider: AsyncComboboxOptionsProvider | null = null\n\n @property({ type: Array })\n accessor optionsFallback: ComboboxOptionData[] | null = null\n\n @query('input')\n protected accessor controlElement: HTMLInputElement | null = null\n\n @property({ type: Boolean, reflect: true })\n accessor readonly = false\n\n @state()\n private accessor filter = ''\n\n @state()\n private accessor displayValue = ''\n\n @state()\n private accessor open = false\n\n @state()\n private accessor activeIndex = -1\n\n private openListenersAttached = false\n private updateDebouncedFilter = debounce(300, (value) => (this.filter = value))\n private asyncOptionsTask?: Task<readonly [string], ComboboxOptionData[]>\n private _selectedOption: ComboboxOptionData | undefined\n private readonly listboxId: string\n\n constructor () {\n super()\n\n this.listboxId = `listbox-${this.controlTrait.controlId}`\n }\n\n get selectedOption (): ComboboxOptionData | undefined {\n return this._selectedOption\n }\n\n disconnectedCallback () {\n super.disconnectedCallback()\n\n this.removeOpenListeners()\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n super.willUpdate(changedProperties)\n\n if (changedProperties.has('asyncOptionsUrl') || changedProperties.has('asyncOptionsProvider')) {\n this.updateAsyncOptionsTask()\n }\n\n if (changedProperties.has('value')) {\n const options = this.getFilteredOptions()\n const option = options.find((option) => option.selectable !== false && option.value === this.value) ??\n this.optionsFallback?.find((option) => option.value === this.value)\n const optionLabel = option?.selectable !== false && option?.label\n\n this.updateDisplayValue(optionLabel || this.value)\n\n if (this.open) {\n this.activeIndex = this.getInitialActiveIndex(options)\n }\n\n if (this._selectedOption && this._selectedOption.value !== this.value) {\n this._selectedOption = undefined\n }\n }\n }\n\n protected render () {\n const options = this.getFilteredOptions()\n const activeOption =\n this.open && this.activeIndex >= 0 ? options[this.activeIndex] : undefined\n const activeDescendant =\n activeOption !== undefined ? this.getOptionId(this.activeIndex) : undefined\n const accessibleName = this.placeholder || 'Combobox'\n\n return html`\n ${this.controlTrait.renderLabel()}\n <wa-popup\n placement=\"bottom\"\n flip\n shift\n sync=\"width\"\n auto-size=\"vertical\"\n auto-size-padding=\"10\"\n ?active=${this.open}\n >\n <div class=\"input-wrapper\" slot=\"anchor\" @mousedown=${this.onAnchorMouseDown}>\n <input\n id=\"${this.controlTrait.controlId}\"\n type=\"text\"\n name=${this.name}\n placeholder=${this.placeholder}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-controls=${this.listboxId}\n aria-activedescendant=${activeDescendant ?? nothing}\n aria-labelledby=${this.label ? this.controlTrait.labelId : nothing}\n aria-label=${this.label ? nothing : accessibleName}\n aria-required=${this.required ? 'true' : nothing}\n autocomplete=\"off\"\n spellcheck=\"false\"\n ?required=${this.required}\n .value=${this.displayValue}\n @keydown=${this.onInputKeyDown}\n @focus=${this.onInputFocus}\n @click=${this.onInputClick}\n @input=${() => this.selectOnly ? this.updateDisplayValue(this.controlElement?.value ?? '') : this.controlTrait.onInput()}\n />\n <icon-lucide-chevron-down></icon-lucide-chevron-down>\n </div>\n <div\n id=${this.listboxId}\n class=\"listbox\"\n role=\"listbox\"\n aria-orientation=\"vertical\"\n aria-labelledby=${this.label ? this.controlTrait.labelId : nothing}\n aria-label=${this.label ? nothing : accessibleName}\n ?hidden=${!this.open}\n @mousedown=${this.onListboxMouseDown}\n >\n ${options.map((option, index) => {\n return option.selectable !== false\n ? html`<div\n id=${this.getOptionId(index)}\n role=\"option\"\n aria-selected=${option.value === this.value ? 'true' : 'false'}\n data-active=${index === this.activeIndex || nothing}\n @mousemove=${() => this.setActiveIndex(index)}\n >\n ${option.template ?? option.label}\n </div>`\n : html`<div class=\"non-selectable-option\">${option.template ?? option.label}</div>`\n })}\n </div>\n </wa-popup>\n `\n }\n\n private getFilteredOptions (): ComboboxOptionData[] {\n if (this.asyncOptionsTask) {\n return this.asyncOptionsTask.render({\n initial: () => this.optionsFallback ?? [],\n complete: (options) => options,\n pending: () => [\n {\n value: '',\n label: 'Loading...',\n template: html`<icon-svg-spinners-3-dots-fade></icon-svg-spinners-3-dots-fade>`,\n selectable: false\n } as const,\n ],\n error: (error) => {\n const isError = !(error instanceof AsyncOptionsInfo)\n const message = Object(error).message ?? 'Something went wrong'\n\n return [\n {\n value: '',\n label: message,\n template: html`<span class=\"message message--${isError ? 'error' : 'info'}\">${message}</span>`,\n selectable: false\n } as const,\n ]\n },\n })\n }\n\n return this.getOptionsFromDOM().filter((option) =>\n String(option.label).toLowerCase().includes(this.filter)\n )\n }\n\n private getOptionsFromDOM (): ComboboxOptionData[] {\n const options = this.querySelectorAll<ComboboxOption>(\n 'solid-ui-combobox-option'\n )\n\n return Array.from(options).map((option) => ({\n value: option.value,\n label: option.textContent ?? '',\n }))\n }\n\n private getOptionId (index: number): string {\n return `${this.listboxId}-option-${index}`\n }\n\n private getInitialActiveIndex (options: ComboboxOptionData[]): number {\n const selectedIndex = options.findIndex((option) => option.value === this.value)\n\n if (selectedIndex >= 0) {\n return selectedIndex\n }\n\n return options.length > 0 ? 0 : -1\n }\n\n private getNextIndex (\n currentIndex: number,\n options: ComboboxOptionData[],\n direction: 1 | -1\n ): number {\n if (options.length === 0) {\n return -1\n }\n\n return (currentIndex + direction + options.length) % options.length\n }\n\n private setActiveIndex (index: number) {\n this.activeIndex = index\n }\n\n private updateDisplayValue (value: unknown) {\n this.displayValue = value ? String(value) : ''\n\n if (this.open) {\n const filter = this.displayValue.toLowerCase()\n\n if (this.asyncOptionsTask) {\n this.updateDebouncedFilter(filter)\n } else {\n this.filter = filter\n }\n }\n }\n\n private updateAsyncOptionsTask () {\n if (!this.asyncOptionsUrl && !this.asyncOptionsProvider) {\n this.asyncOptionsTask = undefined\n\n return\n }\n\n this.asyncOptionsTask ??= new Task(\n this,\n async ([filter]) => {\n if (this.asyncOptionsProvider) {\n const results = await this.asyncOptionsProvider(filter)\n\n if (results.length === 0) {\n throw new AsyncOptionsInfo('No results found')\n }\n\n return results\n }\n\n const response = await fetch(\n this.asyncOptionsUrl.replace('%search%', encodeURIComponent(filter))\n )\n const data = await response.json()\n const results = Array.from(\n this.asyncOptionsResultsField\n ? data[this.asyncOptionsResultsField]\n : data\n )\n\n if (results.length === 0) {\n throw new AsyncOptionsInfo('No results found')\n }\n\n const labelField = this.asyncOptionsLabelField || 'label'\n const valueField = this.asyncOptionsValueField || 'value'\n\n return results.map((result) => ({\n label: String(Object(result)[labelField]),\n value: Object(result)[valueField],\n }))\n },\n () => [this.filter]\n )\n }\n\n private show (options?: { focusLast?: boolean }) {\n if (this.open) {\n return\n }\n\n const filteredOptions = this.getFilteredOptions()\n\n if (filteredOptions.length === 0) {\n return\n }\n\n this.open = true\n this.activeIndex = options?.focusLast\n ? filteredOptions.length - 1\n : this.getInitialActiveIndex(filteredOptions)\n this.addOpenListeners()\n\n requestAnimationFrame(() => this.scrollActiveOptionIntoView())\n }\n\n private hide () {\n if (!this.open) {\n return\n }\n\n this.filter = ''\n this.open = false\n this.activeIndex = -1\n this.removeOpenListeners()\n this.updateDebouncedFilter.cancel()\n }\n\n private selectOption (option: ComboboxOptionData) {\n const previousValue = this.value\n\n this._selectedOption = option\n\n this.hide()\n this.controlTrait.setValue(option.value)\n this.controlElement?.focus({ preventScroll: true })\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: { option } }))\n\n if (previousValue === this.value) {\n this.updateDisplayValue(option.label)\n }\n }\n\n private scrollActiveOptionIntoView () {\n if (this.activeIndex < 0) {\n return\n }\n\n this.shadowRoot\n ?.querySelector(`#${this.getOptionId(this.activeIndex)}`)\n ?.scrollIntoView({ block: 'nearest' })\n }\n\n private addOpenListeners () {\n if (this.openListenersAttached) {\n return\n }\n\n document.addEventListener('focusin', this.handleDocumentFocusIn)\n document.addEventListener('mousedown', this.handleDocumentMouseDown)\n\n const root = this.getRootNode()\n\n if (root !== document) {\n root.addEventListener('focusin', this.handleDocumentFocusIn)\n }\n\n this.openListenersAttached = true\n }\n\n private removeOpenListeners () {\n if (!this.openListenersAttached) {\n return\n }\n\n document.removeEventListener('focusin', this.handleDocumentFocusIn)\n document.removeEventListener('mousedown', this.handleDocumentMouseDown)\n\n const root = this.getRootNode()\n\n if (root !== document) {\n root.removeEventListener('focusin', this.handleDocumentFocusIn)\n }\n\n this.openListenersAttached = false\n }\n\n private handleDocumentFocusIn = (event: Event) => {\n const path = event.composedPath()\n\n if (!path.includes(this)) {\n this.hide()\n }\n }\n\n private handleDocumentMouseDown = (event: MouseEvent) => {\n const path = event.composedPath()\n\n if (!path.includes(this)) {\n this.hide()\n }\n }\n\n private onAnchorMouseDown (event: MouseEvent) {\n if (event.target === this.controlElement) {\n return\n }\n\n event.preventDefault()\n this.controlElement?.focus({ preventScroll: true })\n }\n\n private onInputFocus () {\n this.show()\n }\n\n private onInputClick () {\n this.show()\n }\n\n private openPopupFromKey (focusLast: boolean) {\n if (!this.open) {\n this.show({ focusLast })\n }\n }\n\n private onInputKeyDown (event: KeyboardEvent) {\n const options = this.getFilteredOptions()\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault()\n\n if (!this.open) {\n this.openPopupFromKey(false)\n } else {\n this.activeIndex = this.getNextIndex(this.activeIndex, options, 1)\n this.scrollActiveOptionIntoView()\n }\n break\n case 'ArrowUp':\n event.preventDefault()\n\n if (!this.open) {\n this.openPopupFromKey(true)\n } else {\n this.activeIndex = this.getNextIndex(this.activeIndex, options, -1)\n this.scrollActiveOptionIntoView()\n }\n break\n case 'Enter':\n if (this.open && this.activeIndex >= 0 && options[this.activeIndex]) {\n event.preventDefault()\n this.selectOption(options[this.activeIndex])\n } else if (!this.open) {\n event.preventDefault()\n this.controlTrait.onSubmit()\n }\n break\n case 'Escape':\n if (this.open) {\n event.preventDefault()\n event.stopPropagation()\n this.hide()\n this.controlElement?.focus({ preventScroll: true })\n }\n break\n case 'Tab':\n this.hide()\n break\n default:\n if (!this.open) {\n this.show()\n }\n }\n }\n\n private onListboxMouseDown (event: MouseEvent) {\n event.preventDefault()\n\n if (!(event.target instanceof HTMLElement)) {\n return\n }\n\n const optionElement = event.target.closest('[role=\"option\"]')\n\n if (!optionElement) {\n return\n }\n\n const optionId = optionElement.id\n const index = Number.parseInt(optionId.replace(`${this.listboxId}-option-`, ''), 10)\n const option = this.getFilteredOptions()[index]\n\n if (option) {\n this.selectOption(option)\n }\n }\n}\n","import Combobox from './Combobox'\n\nexport * from './Combobox'\nexport { Combobox }\nexport default Combobox\n"],"ignoreList":[0],"mappings":";;;;;AAKoD,IAAA+O,IAAE,OAAO,GAAQC,IAAN,MAAO;CAAC,IAAI,eAAc;EAAC,OAAO,AAA8G,KAAK,MAAtG,KAAK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Q,GAAG,KAAKhE,UAAS,WAAY,EAAE,GAAG,EAAE,GAC7Ea,IAAS,KAAKD,mBAAmB,CAAC,CAAC0B;EAEzC,AAAIzB,KACF,KAAKiE,aAAajE,CAAM;CAE5B;AACF,GAAC,CAAAoG,GAAA,CAAArI,IAAAC,IAAAC,IAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,IAAAC,IAAAb,IAAAuI,GAAA,CAAAhM,GAAAiM,MAAAC,GAAA7J,GAAA;CAAA;EAAApB;EAAA;EAAA;CAAA;CAAA;EAAAK;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAArC,IAAA,GAAA,KAAA,GAnfqCb,CAAoB,GAAAmD,IAAA8J,IAAA,cAAAC,GAAA;CAAA7I,cAAA;EAAA,MAAAvD,CAAA,GAAAuE,EAAA,MAAA,UACxC7E,CAAM,GAAAuM,EAAA;CAAA;AAAA,GAAA1H,EAAA4H,GAAAlM,IAAA,KAAA,CAAA,GAAAkM,GAAA;;;AC5BxB,IAAA6I,KAAepI"}
@@ -1,4 +1,4 @@
1
- import { a as e, o as t } from "./auth-BgEyix2g.js";
1
+ import { a as e, o as t } from "./auth-Hp8M6TQf.js";
2
2
  import { b as n, g as r, o as i, u as a } from "./components-Bdqizu8x.js";
3
3
  //#region src/components/guard/Guard.ts
4
4
  var o, s, c, l, u, d, f, p, m, h;
@@ -221,4 +221,4 @@ var k = O;
221
221
  //#endregion
222
222
  export { O as n, k as t };
223
223
 
224
- //# sourceMappingURL=guard-c6JOj8UM.js.map
224
+ //# sourceMappingURL=guard-FbhNrJGh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"guard-c6JOj8UM.js","names":["customElement","WebComponent","consume","html","authContext","DEFAULT_AUTH_CONTEXT","_classDecs","_Guard","_Guard2","_A","WeakMap","_ref","_authDecs","context","subscribe","_Guard3","Guard","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_auth","_defineProperty","_classPrivateFieldGet","auth","v","_classPrivateFieldSet","connectedCallback","unsubscribeSessionUpdated","onSessionUpdated","requestUpdate","disconnectedCallback","render","initialized","account","e","c","_initClass","_applyDecs","_Class","_identity","initializing","component","loggedIn","default","consume","Guard","Guard","DEFAULT_AUTH_CONTEXT","authContext","c","customElement","WebComponent","b","_Class","_Guard3","_A","_initProto","_initClass","_classDecs","_authDecs","_init_auth","_Guard2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","applyDec","m","h","y","v","g","u","w","S","A","d","p","_setFunctionName","P","j","D","E","I","O","k","F","l","f","N","_checkInRHS","_toPrimitive","e","_identity","_Guard","args","component","guard_default"],"sources":["../../src/components/guard/Guard.ts","../../src/components/guard/index.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport { authContext, AuthContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\n\n@customElement('solid-ui-guard')\nexport default class Guard extends WebComponent {\n static states = {\n initializing: (component: Guard) => !component.auth.initialized,\n loggedIn: (component: Guard) => !!component.auth.account,\n }\n\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n private unsubscribeSessionUpdated?: () => void\n\n connectedCallback () {\n super.connectedCallback()\n\n this.unsubscribeSessionUpdated = this.auth.onSessionUpdated(() => this.requestUpdate())\n }\n\n disconnectedCallback () {\n super.disconnectedCallback()\n\n this.unsubscribeSessionUpdated?.()\n }\n\n protected render () {\n if (!this.auth.initialized) {\n return html`\n <slot name=\"initializing\"></slot>\n `\n }\n\n if (!this.auth.account) {\n return html`\n <slot name=\"guest\"></slot>\n `\n }\n\n return html`\n <slot></slot>\n `\n }\n}\n","import Guard from './Guard'\n\nexport { Guard }\nexport default Guard\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG2EM,IAAA,CAE1EN,EAAc,gBAAgB,CAAC;AAAA,IAAAO;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,KAAAC,IAO7BV,EAAQ;CAAEW,SAAST;CAAaU,WAAW;AAAK,CAAC,GAAC,SAAAC,IAPrD,cACmCd,EAAa;CAAAgB,YAAA,GAAAC,GAAA;EAOWI,AAPX,MAAA,GAAAJ,CAAA,GAAAC,EAAA,MAAAV,IAAAW,EAAA,IAAA,GAAAC,EAAA,MAOThB,CAAoB,EAAA,GAAAiB,EAAA,MAAA,6BAAA,KAAA,CAAA;CAAA;CAAA,KAAAX,KAAA;EAAA,OAAAY,EAAAd,GAAA,IAAA;CAAA;CAAA,IAAxCe,KAAIC,GAAA;EAAAC,EAAAjB,GAAA,MAAAgB,CAAA;CAAA;CAIrBE,oBAAqB;EAGnB,AAFA,MAAMA,kBAAkB,GAExB,KAAKC,4BAA4B,KAAKJ,KAAKK,uBAAuB,KAAKC,cAAc,CAAC;CACxF;CAEAC,uBAAwB;EAGtB,AAFA,MAAMA,qBAAqB,GAE3B,KAAKH,4BAA4B;CACnC;CAEUI,SAAU;EAalB,OAZK,KAAKR,KAAKS,cAMV,KAAKT,KAAKU,UAMR/B,CAAI;;QALFA,CAAI;;UANJA,CAAI;;;CAcf;AACF,GAAC,CAAAgC,GAAA,CAAAd,GAAAD,IAAAgB,GAAA,CAAA7B,GAAA8B,MAAAC,EAAAvB,GAAA,CAAA;CAAAH;CAAA;CAAA;AAAA,CAAA,GAAAN,GAAA,GAAA,KAAA,GAxCkCL,CAAY,GAAAc,IAAAwB,IAAA,cAAAC,EAAA;CAAAvB,cAAA;EAAA,MAAAV,CAAA,GAAAe,EAAA,MAAA,UAC7B;GACdmB,eAAeC,MAAqB,CAACA,EAAUlB,KAAKS;GACpDU,WAAWD,MAAqB,CAAC,CAACA,EAAUlB,KAAKU;EACnD,CAAC,GAAAG,EAAA;CAAA;AAAA,GAAAf,EAAAiB,GAAA/B,GAAA,KAAA,CAAA,GAAA+B,GAAA;;;ACPH,IAAAuE,IAAehE"}
1
+ {"version":3,"file":"guard-FbhNrJGh.js","names":["customElement","WebComponent","consume","html","authContext","DEFAULT_AUTH_CONTEXT","_classDecs","_Guard","_Guard2","_A","WeakMap","_ref","_authDecs","context","subscribe","_Guard3","Guard","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_auth","_defineProperty","_classPrivateFieldGet","auth","v","_classPrivateFieldSet","connectedCallback","unsubscribeSessionUpdated","onSessionUpdated","requestUpdate","disconnectedCallback","render","initialized","account","e","c","_initClass","_applyDecs","_Class","_identity","initializing","component","loggedIn","default","consume","Guard","Guard","DEFAULT_AUTH_CONTEXT","authContext","c","customElement","WebComponent","b","_Class","_Guard3","_A","_initProto","_initClass","_classDecs","_authDecs","_init_auth","_Guard2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","applyDec","m","h","y","v","g","u","w","S","A","d","p","_setFunctionName","P","j","D","E","I","O","k","F","l","f","N","_checkInRHS","_toPrimitive","e","_identity","_Guard","args","component","guard_default"],"sources":["../../src/components/guard/Guard.ts","../../src/components/guard/index.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport { authContext, AuthContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\n\n@customElement('solid-ui-guard')\nexport default class Guard extends WebComponent {\n static states = {\n initializing: (component: Guard) => !component.auth.initialized,\n loggedIn: (component: Guard) => !!component.auth.account,\n }\n\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n private unsubscribeSessionUpdated?: () => void\n\n connectedCallback () {\n super.connectedCallback()\n\n this.unsubscribeSessionUpdated = this.auth.onSessionUpdated(() => this.requestUpdate())\n }\n\n disconnectedCallback () {\n super.disconnectedCallback()\n\n this.unsubscribeSessionUpdated?.()\n }\n\n protected render () {\n if (!this.auth.initialized) {\n return html`\n <slot name=\"initializing\"></slot>\n `\n }\n\n if (!this.auth.account) {\n return html`\n <slot name=\"guest\"></slot>\n `\n }\n\n return html`\n <slot></slot>\n `\n }\n}\n","import Guard from './Guard'\n\nexport { Guard }\nexport default Guard\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG2EM,IAAA,CAE1EN,EAAc,gBAAgB,CAAC;AAAA,IAAAO;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,KAAAC,IAO7BV,EAAQ;CAAEW,SAAST;CAAaU,WAAW;AAAK,CAAC,GAAC,SAAAC,IAPrD,cACmCd,EAAa;CAAAgB,YAAA,GAAAC,GAAA;EAOWI,AAPX,MAAA,GAAAJ,CAAA,GAAAC,EAAA,MAAAV,IAAAW,EAAA,IAAA,GAAAC,EAAA,MAOThB,CAAoB,EAAA,GAAAiB,EAAA,MAAA,6BAAA,KAAA,CAAA;CAAA;CAAA,KAAAX,KAAA;EAAA,OAAAY,EAAAd,GAAA,IAAA;CAAA;CAAA,IAAxCe,KAAIC,GAAA;EAAAC,EAAAjB,GAAA,MAAAgB,CAAA;CAAA;CAIrBE,oBAAqB;EAGnB,AAFA,MAAMA,kBAAkB,GAExB,KAAKC,4BAA4B,KAAKJ,KAAKK,uBAAuB,KAAKC,cAAc,CAAC;CACxF;CAEAC,uBAAwB;EAGtB,AAFA,MAAMA,qBAAqB,GAE3B,KAAKH,4BAA4B;CACnC;CAEUI,SAAU;EAalB,OAZK,KAAKR,KAAKS,cAMV,KAAKT,KAAKU,UAMR/B,CAAI;;QALFA,CAAI;;UANJA,CAAI;;;CAcf;AACF,GAAC,CAAAgC,GAAA,CAAAd,GAAAD,IAAAgB,GAAA,CAAA7B,GAAA8B,MAAAC,EAAAvB,GAAA,CAAA;CAAAH;CAAA;CAAA;AAAA,CAAA,GAAAN,GAAA,GAAA,KAAA,GAxCkCL,CAAY,GAAAc,IAAAwB,IAAA,cAAAC,EAAA;CAAAvB,cAAA;EAAA,MAAAV,CAAA,GAAAe,EAAA,MAAA,UAC7B;GACdmB,eAAeC,MAAqB,CAACA,EAAUlB,KAAKS;GACpDU,WAAWD,MAAqB,CAAC,CAACA,EAAUlB,KAAKU;EACnD,CAAC,GAAAG,EAAA;CAAA;AAAA,GAAAf,EAAAiB,GAAA/B,GAAA,KAAA,CAAA,GAAA+B,GAAA;;;ACPH,IAAAuE,IAAehE"}
@@ -1,4 +1,4 @@
1
- import { a as e, o as t } from "./auth-BgEyix2g.js";
1
+ import { a as e, o as t } from "./auth-Hp8M6TQf.js";
2
2
  import { b as n, g as r, o as i, u as a } from "./components-Bdqizu8x.js";
3
3
  import "./button-lol95DqR.js";
4
4
  //#region src/components/login-button/LoginButton.ts
@@ -206,4 +206,4 @@ var T = C;
206
206
  //#endregion
207
207
  export { C as n, T as t };
208
208
 
209
- //# sourceMappingURL=login-button-gUZbphp9.js.map
209
+ //# sourceMappingURL=login-button-DCq4Gi3_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"login-button-gUZbphp9.js","names":["customElement","WebComponent","consume","html","authContext","DEFAULT_AUTH_CONTEXT","_classDecs","_LoginButton","_A","WeakMap","_ref","_authDecs","context","subscribe","LoginButton","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_auth","_classPrivateFieldGet","auth","v","_classPrivateFieldSet","render","onClick","click","login","e","preventDefault","_LoginButton2","c","_initClass","_applyDecs","default","consume","LoginButton","LoginButton","DEFAULT_AUTH_CONTEXT","authContext","c","customElement","WebComponent","b","_LoginButton2","_initProto","_initClass","_classDecs","_authDecs","_init_auth","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_applyDecs","i","n","o","applyDec","m","h","y","v","g","u","w","A","d","p","_setFunctionName","P","j","D","E","I","O","k","F","l","f","N","_checkInRHS","_toPropertyKey","_toPrimitive","t","e","_LoginButton","_A","args","login_button_default"],"sources":["../../src/components/login-button/LoginButton.ts","../../src/components/login-button/index.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport { authContext, AuthContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\n\nimport '@/components/button'\n\n@customElement('solid-ui-login-button')\nexport default class LoginButton extends WebComponent {\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n protected render () {\n return html`\n <slot name=\"trigger\" @click=${this.onClick}>\n <solid-ui-button>\n <slot>\n Log In\n </slot>\n </solid-ui-button>\n </slot>\n `\n }\n\n click () {\n this.auth.login()\n }\n\n private onClick (e: MouseEvent) {\n e.preventDefault()\n\n this.click()\n }\n}\n","import LoginButton from './LoginButton'\n\nexport { LoginButton }\nexport default LoginButton\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAK4BM,IAAA,CAE3BN,EAAc,uBAAuB,CAAC;AAAA,IAAAO,GAAAC,kBAAA,IAAAC,QAAA;AAAAC,KAAAC,IAEpCT,EAAQ;CAAEU,SAASR;CAAaS,WAAW;AAAK,CAAC,GAAC,SAwBpDiB,IAAAhB,cAzBwCb,EAAa;CAAAc,YAAA,GAAAC,GAAA;EAAAC,AAAA,MAAA,GAAAD,CAAA,GAAAC,EAAA,MAAAT,IAAAU,EAAA,IAAA,GAAAC,EAAA,MAEfd,CAAoB,EAAA;CAAA;CAAA,KAAAK,KAAA;EAAA,OAAAU,EAAAZ,GAAA,IAAA;CAAA;CAAA,IAAxCa,KAAIC,GAAA;EAAAC,EAAAf,GAAA,MAAAc,CAAA;CAAA;CAEXE,SAAU;EAClB,OAAOrB,CAAI;oCACqB,KAAKsB,QAAO;;;;;;;;CAQ9C;CAEAC,QAAS;EACP,KAAKL,KAAKM,MAAM;CAClB;CAEQF,QAASG,GAAe;EAG9B,AAFAA,EAAEC,eAAe,GAEjB,KAAKH,MAAM;CACb;AACF,GAAC,CAAAE,GAAA,CAAAT,GAAAD,IAAAa,GAAA,CAAAxB,GAAAyB,MAAAC,EAAAH,GAAA,CAAA;CAAAnB;CAAA;CAAA;AAAA,CAAA,GAAAL,GAAA,GAAA,KAAA,GAzBwCL,CAAY,GAAA+B,EAAA;;;ACLrD,IAAA8D,IAAe1D"}
1
+ {"version":3,"file":"login-button-DCq4Gi3_.js","names":["customElement","WebComponent","consume","html","authContext","DEFAULT_AUTH_CONTEXT","_classDecs","_LoginButton","_A","WeakMap","_ref","_authDecs","context","subscribe","LoginButton","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_auth","_classPrivateFieldGet","auth","v","_classPrivateFieldSet","render","onClick","click","login","e","preventDefault","_LoginButton2","c","_initClass","_applyDecs","default","consume","LoginButton","LoginButton","DEFAULT_AUTH_CONTEXT","authContext","c","customElement","WebComponent","b","_LoginButton2","_initProto","_initClass","_classDecs","_authDecs","_init_auth","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_applyDecs","i","n","o","applyDec","m","h","y","v","g","u","w","A","d","p","_setFunctionName","P","j","D","E","I","O","k","F","l","f","N","_checkInRHS","_toPropertyKey","_toPrimitive","t","e","_LoginButton","_A","args","login_button_default"],"sources":["../../src/components/login-button/LoginButton.ts","../../src/components/login-button/index.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport { authContext, AuthContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\n\nimport '@/components/button'\n\n@customElement('solid-ui-login-button')\nexport default class LoginButton extends WebComponent {\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n protected render () {\n return html`\n <slot name=\"trigger\" @click=${this.onClick}>\n <solid-ui-button>\n <slot>\n Log In\n </slot>\n </solid-ui-button>\n </slot>\n `\n }\n\n click () {\n this.auth.login()\n }\n\n private onClick (e: MouseEvent) {\n e.preventDefault()\n\n this.click()\n }\n}\n","import LoginButton from './LoginButton'\n\nexport { LoginButton }\nexport default LoginButton\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAK4BM,IAAA,CAE3BN,EAAc,uBAAuB,CAAC;AAAA,IAAAO,GAAAC,kBAAA,IAAAC,QAAA;AAAAC,KAAAC,IAEpCT,EAAQ;CAAEU,SAASR;CAAaS,WAAW;AAAK,CAAC,GAAC,SAwBpDiB,IAAAhB,cAzBwCb,EAAa;CAAAc,YAAA,GAAAC,GAAA;EAAAC,AAAA,MAAA,GAAAD,CAAA,GAAAC,EAAA,MAAAT,IAAAU,EAAA,IAAA,GAAAC,EAAA,MAEfd,CAAoB,EAAA;CAAA;CAAA,KAAAK,KAAA;EAAA,OAAAU,EAAAZ,GAAA,IAAA;CAAA;CAAA,IAAxCa,KAAIC,GAAA;EAAAC,EAAAf,GAAA,MAAAc,CAAA;CAAA;CAEXE,SAAU;EAClB,OAAOrB,CAAI;oCACqB,KAAKsB,QAAO;;;;;;;;CAQ9C;CAEAC,QAAS;EACP,KAAKL,KAAKM,MAAM;CAClB;CAEQF,QAASG,GAAe;EAG9B,AAFAA,EAAEC,eAAe,GAEjB,KAAKH,MAAM;CACb;AACF,GAAC,CAAAE,GAAA,CAAAT,GAAAD,IAAAa,GAAA,CAAAxB,GAAAyB,MAAAC,EAAAH,GAAA,CAAA;CAAAnB;CAAA;CAAA;AAAA,CAAA,GAAAL,GAAA,GAAA,KAAA,GAzBwCL,CAAY,GAAA+B,EAAA;;;ACLrD,IAAA8D,IAAe1D"}
@@ -1,4 +1,4 @@
1
- import { a as e, o as t } from "./auth-BgEyix2g.js";
1
+ import { a as e, o as t } from "./auth-Hp8M6TQf.js";
2
2
  import { b as n, g as r, o as i, u as a } from "./components-Bdqizu8x.js";
3
3
  import "./button-lol95DqR.js";
4
4
  //#region src/components/logout-button/LogoutButton.ts
@@ -206,4 +206,4 @@ var T = C;
206
206
  //#endregion
207
207
  export { C as n, T as t };
208
208
 
209
- //# sourceMappingURL=logout-button-GWQMrdx4.js.map
209
+ //# sourceMappingURL=logout-button-D3dJrsV4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logout-button-GWQMrdx4.js","names":["customElement","WebComponent","consume","html","authContext","DEFAULT_AUTH_CONTEXT","_classDecs","_LogoutButton","_A","WeakMap","_ref","_authDecs","context","subscribe","LogoutButton","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_auth","_classPrivateFieldGet","auth","v","_classPrivateFieldSet","render","onClick","click","logout","e","preventDefault","_LogoutButton2","c","_initClass","_applyDecs","default","consume","LogoutButton","LogoutButton","DEFAULT_AUTH_CONTEXT","authContext","c","customElement","WebComponent","b","_LogoutButton2","_initProto","_initClass","_classDecs","_authDecs","_init_auth","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_applyDecs","i","n","o","applyDec","m","h","y","v","g","u","w","A","d","p","_setFunctionName","P","j","D","E","I","O","k","F","l","f","N","_checkInRHS","_toPropertyKey","_toPrimitive","t","e","_LogoutButton","_A","args","logout_button_default"],"sources":["../../src/components/logout-button/LogoutButton.ts","../../src/components/logout-button/index.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport { authContext, AuthContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\n\nimport '@/components/button'\n\n@customElement('solid-ui-logout-button')\nexport default class LogoutButton extends WebComponent {\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n protected render () {\n return html`\n <slot name=\"trigger\" @click=${this.onClick}>\n <solid-ui-button>\n <slot>\n Log Out\n </slot>\n </solid-ui-button>\n </slot>\n `\n }\n\n click () {\n this.auth.logout()\n }\n\n private onClick (e: MouseEvent) {\n e.preventDefault()\n\n this.click()\n }\n}\n","import LogoutButton from './LogoutButton'\n\nexport { LogoutButton }\nexport default LogoutButton\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAK4BM,IAAA,CAE3BN,EAAc,wBAAwB,CAAC;AAAA,IAAAO,GAAAC,kBAAA,IAAAC,QAAA;AAAAC,KAAAC,IAErCT,EAAQ;CAAEU,SAASR;CAAaS,WAAW;AAAK,CAAC,GAAC,SAwBpDiB,IAAAhB,cAzByCb,EAAa;CAAAc,YAAA,GAAAC,GAAA;EAAAC,AAAA,MAAA,GAAAD,CAAA,GAAAC,EAAA,MAAAT,IAAAU,EAAA,IAAA,GAAAC,EAAA,MAEhBd,CAAoB,EAAA;CAAA;CAAA,KAAAK,KAAA;EAAA,OAAAU,EAAAZ,GAAA,IAAA;CAAA;CAAA,IAAxCa,KAAIC,GAAA;EAAAC,EAAAf,GAAA,MAAAc,CAAA;CAAA;CAEXE,SAAU;EAClB,OAAOrB,CAAI;oCACqB,KAAKsB,QAAO;;;;;;;;CAQ9C;CAEAC,QAAS;EACP,KAAKL,KAAKM,OAAO;CACnB;CAEQF,QAASG,GAAe;EAG9B,AAFAA,EAAEC,eAAe,GAEjB,KAAKH,MAAM;CACb;AACF,GAAC,CAAAE,GAAA,CAAAT,GAAAD,IAAAa,GAAA,CAAAxB,GAAAyB,MAAAC,EAAAH,GAAA,CAAA;CAAAnB;CAAA;CAAA;AAAA,CAAA,GAAAL,GAAA,GAAA,KAAA,GAzByCL,CAAY,GAAA+B,EAAA;;;ACLtD,IAAA8D,IAAe1D"}
1
+ {"version":3,"file":"logout-button-D3dJrsV4.js","names":["customElement","WebComponent","consume","html","authContext","DEFAULT_AUTH_CONTEXT","_classDecs","_LogoutButton","_A","WeakMap","_ref","_authDecs","context","subscribe","LogoutButton","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_auth","_classPrivateFieldGet","auth","v","_classPrivateFieldSet","render","onClick","click","logout","e","preventDefault","_LogoutButton2","c","_initClass","_applyDecs","default","consume","LogoutButton","LogoutButton","DEFAULT_AUTH_CONTEXT","authContext","c","customElement","WebComponent","b","_LogoutButton2","_initProto","_initClass","_classDecs","_authDecs","_init_auth","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_applyDecs","i","n","o","applyDec","m","h","y","v","g","u","w","A","d","p","_setFunctionName","P","j","D","E","I","O","k","F","l","f","N","_checkInRHS","_toPropertyKey","_toPrimitive","t","e","_LogoutButton","_A","args","logout_button_default"],"sources":["../../src/components/logout-button/LogoutButton.ts","../../src/components/logout-button/index.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport { authContext, AuthContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\n\nimport '@/components/button'\n\n@customElement('solid-ui-logout-button')\nexport default class LogoutButton extends WebComponent {\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n protected render () {\n return html`\n <slot name=\"trigger\" @click=${this.onClick}>\n <solid-ui-button>\n <slot>\n Log Out\n </slot>\n </solid-ui-button>\n </slot>\n `\n }\n\n click () {\n this.auth.logout()\n }\n\n private onClick (e: MouseEvent) {\n e.preventDefault()\n\n this.click()\n }\n}\n","import LogoutButton from './LogoutButton'\n\nexport { LogoutButton }\nexport default LogoutButton\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAK4BM,IAAA,CAE3BN,EAAc,wBAAwB,CAAC;AAAA,IAAAO,GAAAC,kBAAA,IAAAC,QAAA;AAAAC,KAAAC,IAErCT,EAAQ;CAAEU,SAASR;CAAaS,WAAW;AAAK,CAAC,GAAC,SAwBpDiB,IAAAhB,cAzByCb,EAAa;CAAAc,YAAA,GAAAC,GAAA;EAAAC,AAAA,MAAA,GAAAD,CAAA,GAAAC,EAAA,MAAAT,IAAAU,EAAA,IAAA,GAAAC,EAAA,MAEhBd,CAAoB,EAAA;CAAA;CAAA,KAAAK,KAAA;EAAA,OAAAU,EAAAZ,GAAA,IAAA;CAAA;CAAA,IAAxCa,KAAIC,GAAA;EAAAC,EAAAf,GAAA,MAAAc,CAAA;CAAA;CAEXE,SAAU;EAClB,OAAOrB,CAAI;oCACqB,KAAKsB,QAAO;;;;;;;;CAQ9C;CAEAC,QAAS;EACP,KAAKL,KAAKM,OAAO;CACnB;CAEQF,QAASG,GAAe;EAG9B,AAFAA,EAAEC,eAAe,GAEjB,KAAKH,MAAM;CACb;AACF,GAAC,CAAAE,GAAA,CAAAT,GAAAD,IAAAa,GAAA,CAAAxB,GAAAyB,MAAAC,EAAAH,GAAA,CAAA;CAAAnB;CAAA;CAAA;AAAA,CAAA,GAAAL,GAAA,GAAA,KAAA,GAzByCL,CAAY,GAAA+B,EAAA;;;ACLtD,IAAA8D,IAAe1D"}
@@ -1,4 +1,4 @@
1
- import { n as e, o as t } from "./auth-BgEyix2g.js";
1
+ import { n as e, o as t } from "./auth-Hp8M6TQf.js";
2
2
  import { g as n, i as r, o as i, u as a } from "./components-Bdqizu8x.js";
3
3
  import { n as o } from "./DialogProvider-B7oVYKJO.js";
4
4
  import "./dialogs-root-Qiucjj9u.js";
@@ -212,4 +212,4 @@ var k = E;
212
212
  //#endregion
213
213
  export { E as n, k as t };
214
214
 
215
- //# sourceMappingURL=provider-DLNWLlfX.js.map
215
+ //# sourceMappingURL=provider-D9UgRI4G.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider-DLNWLlfX.js","names":["customElement","WebComponent","provide","html","property","authContext","SolidAuth","DEFAULT_SIGNUP_URL","_classDecs","_Provider","_A","WeakMap","_B","_ref","_signupUrlDecs","type","String","reflect","_authDecs","context","Provider","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_signupUrl","_init_auth","_classPrivateFieldGet","signupUrl","v","_classPrivateFieldSet","auth","connectedCallback","initialize","willUpdate","changedProperties","has","render","_Provider2","e","c","_initClass","_applyDecs","default","property","provide","Provider","Provider","SolidAuth","authContext","customElement","n","WebComponent","b","e","_Provider2","_initProto","_initClass","_classDecs","_signupUrlDecs","_init_signupUrl","_authDecs","_init_auth","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_applyDecs","i","o","c","applyDec","m","h","y","v","g","u","w","S","A","d","p","_setFunctionName","P","j","D","E","I","O","k","F","l","f","N","_checkInRHS","_toPropertyKey","_toPrimitive","t","_Provider","_A","_B","args","changedProperties","provider_default"],"sources":["../../src/components/provider/Provider.ts","../../src/components/provider/index.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { provide } from '@lit/context'\nimport { html, type PropertyValues } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport { authContext } from '@/lib/auth'\nimport { SolidAuth, DEFAULT_SIGNUP_URL } from '@/lib/auth'\n\nimport '@/components/dialogs-root'\n\n@customElement('solid-ui-provider')\nexport default class Provider extends WebComponent {\n @property({ type: String, reflect: true })\n accessor signupUrl: string | undefined\n\n @provide({ context: authContext })\n private accessor auth = new SolidAuth()\n\n async connectedCallback () {\n super.connectedCallback()\n\n await this.auth.initialize()\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n super.willUpdate(changedProperties)\n\n if (changedProperties.has('signupUrl')) {\n this.auth.signupUrl = this.signupUrl ?? DEFAULT_SIGNUP_URL\n }\n }\n\n protected render () {\n return html`\n <slot></slot>\n <solid-ui-dialogs-root></solid-ui-dialogs-root>\n `\n }\n}\n","import Provider from './Provider'\n\nexport { Provider }\nexport default Provider\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAA;AAAA,CAAA,GAAAV,GAAA,GAAA,KAAA,GA3BqCP,CAAY,GAAAwC,EAAA;;;ACPlD,IAAAoE,IAAe/D"}
1
+ {"version":3,"file":"provider-D9UgRI4G.js","names":["customElement","WebComponent","provide","html","property","authContext","SolidAuth","DEFAULT_SIGNUP_URL","_classDecs","_Provider","_A","WeakMap","_B","_ref","_signupUrlDecs","type","String","reflect","_authDecs","context","Provider","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_signupUrl","_init_auth","_classPrivateFieldGet","signupUrl","v","_classPrivateFieldSet","auth","connectedCallback","initialize","willUpdate","changedProperties","has","render","_Provider2","e","c","_initClass","_applyDecs","default","property","provide","Provider","Provider","SolidAuth","authContext","customElement","n","WebComponent","b","e","_Provider2","_initProto","_initClass","_classDecs","_signupUrlDecs","_init_signupUrl","_authDecs","_init_auth","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_applyDecs","i","o","c","applyDec","m","h","y","v","g","u","w","S","A","d","p","_setFunctionName","P","j","D","E","I","O","k","F","l","f","N","_checkInRHS","_toPropertyKey","_toPrimitive","t","_Provider","_A","_B","args","changedProperties","provider_default"],"sources":["../../src/components/provider/Provider.ts","../../src/components/provider/index.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { provide } from '@lit/context'\nimport { html, type PropertyValues } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport { authContext } from '@/lib/auth'\nimport { SolidAuth, DEFAULT_SIGNUP_URL } from '@/lib/auth'\n\nimport '@/components/dialogs-root'\n\n@customElement('solid-ui-provider')\nexport default class Provider extends WebComponent {\n @property({ type: String, reflect: true })\n accessor signupUrl: string | undefined\n\n @provide({ context: authContext })\n private accessor auth = new SolidAuth()\n\n async connectedCallback () {\n super.connectedCallback()\n\n await this.auth.initialize()\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n super.willUpdate(changedProperties)\n\n if (changedProperties.has('signupUrl')) {\n this.auth.signupUrl = this.signupUrl ?? DEFAULT_SIGNUP_URL\n }\n }\n\n protected render () {\n return html`\n <slot></slot>\n <solid-ui-dialogs-root></solid-ui-dialogs-root>\n `\n }\n}\n","import Provider from './Provider'\n\nexport { Provider }\nexport default Provider\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOkCQ,IAAA,CAEjCR,EAAc,mBAAmB,CAAC;AAAA,IAAAS,GAAAC,kBAAA,IAAAC,QAAA,GAAAC,kBAAA,IAAAD,QAAA;AAAAE,KAAAC,IAEhCV,EAAS;CAAEW,MAAMC;CAAQC,SAAS;AAAK,CAAC,GAACC,IAGzChB,EAAQ,EAAEiB,SAASd,EAAY,CAAC,GAAC,cAuBnCiC,IAAAlB,cA3BqCnB,EAAa;CAAAoB,YAAA,GAAAC,GAAA;EAAAC,AAAA,MAAA,GAAAD,CAAA,GAAAC,EAAA,MAAAb,IAAAc,EAAA,IAAA,GAAAC,EAAA,IAAA,EAAA,GAAAF,EAAA,MAAAX,GAAAc,EAAA,MAKzB,IAAIpB,EAAU,CAAC,CAAA;CAAA;CAAA,KAAAO,KAAA;EAAA,OAAAc,EAAAjB,GAAA,IAAA;CAAA;CAAA,IAH9BkB,UAASC,GAAA;EAAAC,EAAApB,GAAA,MAAAmB,CAAA;CAAA;CAAA,IAGDE,OAAI;EAAA,OAAAJ,EAAAf,GAAA,IAAA;CAAA;CAAA,IAAJmB,KAAIF,GAAA;EAAAC,EAAAlB,GAAA,MAAAiB,CAAA;CAAA;CAErB,MAAMG,oBAAqB;EAGzB,AAFA,MAAMA,kBAAkB,GAExB,MAAM,KAAKD,KAAKE,WAAW;CAC7B;CAEUC,WAAYC,GAAyC;EAG7D,AAFA,MAAMD,WAAWC,CAAiB,GAE9BA,EAAkBC,IAAI,WAAW,MACnC,KAAKL,KAAKH,YAAY,KAAKA,aAAAA;CAE/B;CAEUS,SAAU;EAClB,OAAOlC,CAAI;;;;CAIb;AACF,GAAC,CAAAoC,GAAA,CAAAd,GAAAC,GAAAF,IAAAgB,GAAA,CAAA/B,GAAAgC,MAAAC,EAAAJ,GAAA,CAAA;CAAAxB;CAAA;CAAA;AAAA,GAAA;CAAAI;CAAA;CAAA;AAAA,CAAA,GAAAV,GAAA,GAAA,KAAA,GA3BqCP,CAAY,GAAAwC,EAAA;;;ACPlD,IAAAoE,IAAe/D"}
@@ -1,4 +1,4 @@
1
- import { a as e, o as t } from "./auth-BgEyix2g.js";
1
+ import { a as e, o as t } from "./auth-Hp8M6TQf.js";
2
2
  import { b as n, g as r, o as i, u as a } from "./components-Bdqizu8x.js";
3
3
  import "./button-lol95DqR.js";
4
4
  //#region src/components/signup-button/SignupButton.ts
@@ -206,4 +206,4 @@ var T = C;
206
206
  //#endregion
207
207
  export { C as n, T as t };
208
208
 
209
- //# sourceMappingURL=signup-button-i9d5eTUY.js.map
209
+ //# sourceMappingURL=signup-button-BQ4AWem2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"signup-button-i9d5eTUY.js","names":["customElement","WebComponent","consume","html","authContext","DEFAULT_AUTH_CONTEXT","_classDecs","_SignupButton","_A","WeakMap","_ref","_authDecs","context","subscribe","SignupButton","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_auth","_classPrivateFieldGet","auth","v","_classPrivateFieldSet","render","onClick","click","signup","e","preventDefault","_SignupButton2","c","_initClass","_applyDecs","default","consume","SignupButton","SignupButton","DEFAULT_AUTH_CONTEXT","authContext","c","customElement","WebComponent","b","_SignupButton2","_initProto","_initClass","_classDecs","_authDecs","_init_auth","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_applyDecs","i","n","o","applyDec","m","h","y","v","g","u","w","A","d","p","_setFunctionName","P","j","D","E","I","O","k","F","l","f","N","_checkInRHS","_toPropertyKey","_toPrimitive","t","e","_SignupButton","_A","args","signup_button_default"],"sources":["../../src/components/signup-button/SignupButton.ts","../../src/components/signup-button/index.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport { authContext, AuthContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\n\nimport '@/components/button'\n\n@customElement('solid-ui-signup-button')\nexport default class SignupButton extends WebComponent {\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n protected render () {\n return html`\n <slot name=\"trigger\" @click=${this.onClick}>\n <solid-ui-button>\n <slot>\n Sign Up\n </slot>\n </solid-ui-button>\n </slot>\n `\n }\n\n click () {\n this.auth.signup()\n }\n\n private onClick (e: MouseEvent) {\n e.preventDefault()\n\n this.click()\n }\n}\n","import SignupButton from './SignupButton'\n\nexport { SignupButton }\nexport default SignupButton\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAK4BM,IAAA,CAE3BN,EAAc,wBAAwB,CAAC;AAAA,IAAAO,GAAAC,kBAAA,IAAAC,QAAA;AAAAC,KAAAC,IAErCT,EAAQ;CAAEU,SAASR;CAAaS,WAAW;AAAK,CAAC,GAAC,SAwBpDiB,IAAAhB,cAzByCb,EAAa;CAAAc,YAAA,GAAAC,GAAA;EAAAC,AAAA,MAAA,GAAAD,CAAA,GAAAC,EAAA,MAAAT,IAAAU,EAAA,IAAA,GAAAC,EAAA,MAEhBd,CAAoB,EAAA;CAAA;CAAA,KAAAK,KAAA;EAAA,OAAAU,EAAAZ,GAAA,IAAA;CAAA;CAAA,IAAxCa,KAAIC,GAAA;EAAAC,EAAAf,GAAA,MAAAc,CAAA;CAAA;CAEXE,SAAU;EAClB,OAAOrB,CAAI;oCACqB,KAAKsB,QAAO;;;;;;;;CAQ9C;CAEAC,QAAS;EACP,KAAKL,KAAKM,OAAO;CACnB;CAEQF,QAASG,GAAe;EAG9B,AAFAA,EAAEC,eAAe,GAEjB,KAAKH,MAAM;CACb;AACF,GAAC,CAAAE,GAAA,CAAAT,GAAAD,IAAAa,GAAA,CAAAxB,GAAAyB,MAAAC,EAAAH,GAAA,CAAA;CAAAnB;CAAA;CAAA;AAAA,CAAA,GAAAL,GAAA,GAAA,KAAA,GAzByCL,CAAY,GAAA+B,EAAA;;;ACLtD,IAAA8D,IAAe1D"}
1
+ {"version":3,"file":"signup-button-BQ4AWem2.js","names":["customElement","WebComponent","consume","html","authContext","DEFAULT_AUTH_CONTEXT","_classDecs","_SignupButton","_A","WeakMap","_ref","_authDecs","context","subscribe","SignupButton","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_auth","_classPrivateFieldGet","auth","v","_classPrivateFieldSet","render","onClick","click","signup","e","preventDefault","_SignupButton2","c","_initClass","_applyDecs","default","consume","SignupButton","SignupButton","DEFAULT_AUTH_CONTEXT","authContext","c","customElement","WebComponent","b","_SignupButton2","_initProto","_initClass","_classDecs","_authDecs","_init_auth","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_applyDecs","i","n","o","applyDec","m","h","y","v","g","u","w","A","d","p","_setFunctionName","P","j","D","E","I","O","k","F","l","f","N","_checkInRHS","_toPropertyKey","_toPrimitive","t","e","_SignupButton","_A","args","signup_button_default"],"sources":["../../src/components/signup-button/SignupButton.ts","../../src/components/signup-button/index.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport { authContext, AuthContext, DEFAULT_AUTH_CONTEXT } from '@/lib/auth'\n\nimport '@/components/button'\n\n@customElement('solid-ui-signup-button')\nexport default class SignupButton extends WebComponent {\n @consume({ context: authContext, subscribe: true })\n private accessor auth: AuthContext = DEFAULT_AUTH_CONTEXT\n\n protected render () {\n return html`\n <slot name=\"trigger\" @click=${this.onClick}>\n <solid-ui-button>\n <slot>\n Sign Up\n </slot>\n </solid-ui-button>\n </slot>\n `\n }\n\n click () {\n this.auth.signup()\n }\n\n private onClick (e: MouseEvent) {\n e.preventDefault()\n\n this.click()\n }\n}\n","import SignupButton from './SignupButton'\n\nexport { SignupButton }\nexport default SignupButton\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAK4BM,IAAA,CAE3BN,EAAc,wBAAwB,CAAC;AAAA,IAAAO,GAAAC,kBAAA,IAAAC,QAAA;AAAAC,KAAAC,IAErCT,EAAQ;CAAEU,SAASR;CAAaS,WAAW;AAAK,CAAC,GAAC,SAwBpDiB,IAAAhB,cAzByCb,EAAa;CAAAc,YAAA,GAAAC,GAAA;EAAAC,AAAA,MAAA,GAAAD,CAAA,GAAAC,EAAA,MAAAT,IAAAU,EAAA,IAAA,GAAAC,EAAA,MAEhBd,CAAoB,EAAA;CAAA;CAAA,KAAAK,KAAA;EAAA,OAAAU,EAAAZ,GAAA,IAAA;CAAA;CAAA,IAAxCa,KAAIC,GAAA;EAAAC,EAAAf,GAAA,MAAAc,CAAA;CAAA;CAEXE,SAAU;EAClB,OAAOrB,CAAI;oCACqB,KAAKsB,QAAO;;;;;;;;CAQ9C;CAEAC,QAAS;EACP,KAAKL,KAAKM,OAAO;CACnB;CAEQF,QAASG,GAAe;EAG9B,AAFAA,EAAEC,eAAe,GAEjB,KAAKH,MAAM;CACb;AACF,GAAC,CAAAE,GAAA,CAAAT,GAAAD,IAAAa,GAAA,CAAAxB,GAAAyB,MAAAC,EAAAH,GAAA,CAAA;CAAAnB;CAAA;CAAA;AAAA,CAAA,GAAAL,GAAA,GAAA,KAAA,GAzByCL,CAAY,GAAA+B,EAAA;;;ACLtD,IAAA8D,IAAe1D"}