@clerk/ui 1.0.0-canary.v20251219163248 → 1.0.0-canary.v20251219203758

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 (103) hide show
  1. package/dist/ClerkUi.js +2 -2
  2. package/dist/{checkout_ui_ae56aa_1.0.0-canary.v20251219163248.js → checkout_ui_2b38db_1.0.0-canary.v20251219203758.js} +1 -1
  3. package/dist/{checkout_ui_6ee94f_1.0.0-canary.v20251219163248.js → checkout_ui_a99bf1_1.0.0-canary.v20251219203758.js} +1 -1
  4. package/dist/components/Checkout/CheckoutPage.js +1 -1
  5. package/dist/components/Checkout/CheckoutPage.js.map +1 -1
  6. package/dist/components/Checkout/parts.js +1 -1
  7. package/dist/components/Checkout/parts.js.map +1 -1
  8. package/dist/foundations/defaultFoundations.d.ts +153 -153
  9. package/dist/index.js +1 -1
  10. package/dist/internal/index.js +1 -1
  11. package/dist/{ui-common_ui_ae56aa_1.0.0-canary.v20251219163248.js → ui-common_ui_2b38db_1.0.0-canary.v20251219203758.js} +6 -6
  12. package/dist/{ui-common_ui_6ee94f_1.0.0-canary.v20251219163248.js → ui-common_ui_a99bf1_1.0.0-canary.v20251219203758.js} +1 -1
  13. package/dist/ui.browser.js +2 -2
  14. package/dist/ui.legacy.browser.js +1 -1
  15. package/package.json +3 -3
  16. /package/dist/{207_ui_ae56aa_1.0.0-canary.v20251219163248.js → 207_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  17. /package/dist/{207_ui_6ee94f_1.0.0-canary.v20251219163248.js → 207_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  18. /package/dist/{217_ui_ae56aa_1.0.0-canary.v20251219163248.js → 217_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  19. /package/dist/{217_ui_6ee94f_1.0.0-canary.v20251219163248.js → 217_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  20. /package/dist/{360_ui_ae56aa_1.0.0-canary.v20251219163248.js → 360_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  21. /package/dist/{360_ui_6ee94f_1.0.0-canary.v20251219163248.js → 360_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  22. /package/dist/{444_ui_ae56aa_1.0.0-canary.v20251219163248.js → 444_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  23. /package/dist/{444_ui_6ee94f_1.0.0-canary.v20251219163248.js → 444_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  24. /package/dist/{573_ui_ae56aa_1.0.0-canary.v20251219163248.js → 573_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  25. /package/dist/{573_ui_6ee94f_1.0.0-canary.v20251219163248.js → 573_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  26. /package/dist/{970_ui_ae56aa_1.0.0-canary.v20251219163248.js → 970_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  27. /package/dist/{970_ui_6ee94f_1.0.0-canary.v20251219163248.js → 970_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  28. /package/dist/{apiKeys_ui_ae56aa_1.0.0-canary.v20251219163248.js → apiKeys_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  29. /package/dist/{apiKeys_ui_6ee94f_1.0.0-canary.v20251219163248.js → apiKeys_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  30. /package/dist/{blankcaptcha_ui_ae56aa_1.0.0-canary.v20251219163248.js → blankcaptcha_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  31. /package/dist/{blankcaptcha_ui_6ee94f_1.0.0-canary.v20251219163248.js → blankcaptcha_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  32. /package/dist/{copy-api-key-modal_ui_ae56aa_1.0.0-canary.v20251219163248.js → copy-api-key-modal_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  33. /package/dist/{copy-api-key-modal_ui_6ee94f_1.0.0-canary.v20251219163248.js → copy-api-key-modal_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  34. /package/dist/{createorganization_ui_ae56aa_1.0.0-canary.v20251219163248.js → createorganization_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  35. /package/dist/{createorganization_ui_6ee94f_1.0.0-canary.v20251219163248.js → createorganization_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  36. /package/dist/{enableOrganizationsPrompt_ui_ae56aa_1.0.0-canary.v20251219163248.js → enableOrganizationsPrompt_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  37. /package/dist/{enableOrganizationsPrompt_ui_6ee94f_1.0.0-canary.v20251219163248.js → enableOrganizationsPrompt_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  38. /package/dist/{framework_ui_ae56aa_1.0.0-canary.v20251219163248.js → framework_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  39. /package/dist/{framework_ui_6ee94f_1.0.0-canary.v20251219163248.js → framework_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  40. /package/dist/{impersonationfab_ui_ae56aa_1.0.0-canary.v20251219163248.js → impersonationfab_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  41. /package/dist/{impersonationfab_ui_6ee94f_1.0.0-canary.v20251219163248.js → impersonationfab_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  42. /package/dist/{keylessPrompt_ui_ae56aa_1.0.0-canary.v20251219163248.js → keylessPrompt_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  43. /package/dist/{keylessPrompt_ui_6ee94f_1.0.0-canary.v20251219163248.js → keylessPrompt_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  44. /package/dist/{oauthConsent_ui_ae56aa_1.0.0-canary.v20251219163248.js → oauthConsent_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  45. /package/dist/{oauthConsent_ui_6ee94f_1.0.0-canary.v20251219163248.js → oauthConsent_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  46. /package/dist/{onetap_ui_ae56aa_1.0.0-canary.v20251219163248.js → onetap_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  47. /package/dist/{onetap_ui_6ee94f_1.0.0-canary.v20251219163248.js → onetap_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  48. /package/dist/{op-api-keys-page_ui_ae56aa_1.0.0-canary.v20251219163248.js → op-api-keys-page_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  49. /package/dist/{op-api-keys-page_ui_6ee94f_1.0.0-canary.v20251219163248.js → op-api-keys-page_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  50. /package/dist/{op-billing-page_ui_ae56aa_1.0.0-canary.v20251219163248.js → op-billing-page_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  51. /package/dist/{op-billing-page_ui_6ee94f_1.0.0-canary.v20251219163248.js → op-billing-page_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  52. /package/dist/{op-plans-page_ui_ae56aa_1.0.0-canary.v20251219163248.js → op-plans-page_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  53. /package/dist/{op-plans-page_ui_6ee94f_1.0.0-canary.v20251219163248.js → op-plans-page_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  54. /package/dist/{organizationlist_ui_ae56aa_1.0.0-canary.v20251219163248.js → organizationlist_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  55. /package/dist/{organizationlist_ui_6ee94f_1.0.0-canary.v20251219163248.js → organizationlist_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  56. /package/dist/{organizationprofile_ui_ae56aa_1.0.0-canary.v20251219163248.js → organizationprofile_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  57. /package/dist/{organizationprofile_ui_6ee94f_1.0.0-canary.v20251219163248.js → organizationprofile_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  58. /package/dist/{organizationswitcher_ui_ae56aa_1.0.0-canary.v20251219163248.js → organizationswitcher_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  59. /package/dist/{organizationswitcher_ui_6ee94f_1.0.0-canary.v20251219163248.js → organizationswitcher_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  60. /package/dist/{payment-attempt-page_ui_ae56aa_1.0.0-canary.v20251219163248.js → payment-attempt-page_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  61. /package/dist/{payment-attempt-page_ui_6ee94f_1.0.0-canary.v20251219163248.js → payment-attempt-page_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  62. /package/dist/{planDetails_ui_ae56aa_1.0.0-canary.v20251219163248.js → planDetails_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  63. /package/dist/{planDetails_ui_6ee94f_1.0.0-canary.v20251219163248.js → planDetails_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  64. /package/dist/{prefetchorganizationlist_ui_ae56aa_1.0.0-canary.v20251219163248.js → prefetchorganizationlist_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  65. /package/dist/{prefetchorganizationlist_ui_6ee94f_1.0.0-canary.v20251219163248.js → prefetchorganizationlist_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  66. /package/dist/{pricingTable_ui_ae56aa_1.0.0-canary.v20251219163248.js → pricingTable_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  67. /package/dist/{pricingTable_ui_6ee94f_1.0.0-canary.v20251219163248.js → pricingTable_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  68. /package/dist/{revoke-api-key-modal_ui_ae56aa_1.0.0-canary.v20251219163248.js → revoke-api-key-modal_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  69. /package/dist/{revoke-api-key-modal_ui_6ee94f_1.0.0-canary.v20251219163248.js → revoke-api-key-modal_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  70. /package/dist/{sessionTasks_ui_ae56aa_1.0.0-canary.v20251219163248.js → sessionTasks_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  71. /package/dist/{sessionTasks_ui_6ee94f_1.0.0-canary.v20251219163248.js → sessionTasks_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  72. /package/dist/{signin_ui_ae56aa_1.0.0-canary.v20251219163248.js → signin_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  73. /package/dist/{signin_ui_6ee94f_1.0.0-canary.v20251219163248.js → signin_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  74. /package/dist/{signup_ui_ae56aa_1.0.0-canary.v20251219163248.js → signup_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  75. /package/dist/{signup_ui_6ee94f_1.0.0-canary.v20251219163248.js → signup_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  76. /package/dist/{statement-page_ui_ae56aa_1.0.0-canary.v20251219163248.js → statement-page_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  77. /package/dist/{statement-page_ui_6ee94f_1.0.0-canary.v20251219163248.js → statement-page_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  78. /package/dist/{subscriptionDetails_ui_ae56aa_1.0.0-canary.v20251219163248.js → subscriptionDetails_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  79. /package/dist/{subscriptionDetails_ui_6ee94f_1.0.0-canary.v20251219163248.js → subscriptionDetails_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  80. /package/dist/{taskChooseOrganization_ui_ae56aa_1.0.0-canary.v20251219163248.js → taskChooseOrganization_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  81. /package/dist/{taskChooseOrganization_ui_6ee94f_1.0.0-canary.v20251219163248.js → taskChooseOrganization_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  82. /package/dist/{taskResetPassword_ui_ae56aa_1.0.0-canary.v20251219163248.js → taskResetPassword_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  83. /package/dist/{taskResetPassword_ui_6ee94f_1.0.0-canary.v20251219163248.js → taskResetPassword_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  84. /package/dist/{up-api-keys-page_ui_ae56aa_1.0.0-canary.v20251219163248.js → up-api-keys-page_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  85. /package/dist/{up-api-keys-page_ui_6ee94f_1.0.0-canary.v20251219163248.js → up-api-keys-page_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  86. /package/dist/{up-billing-page_ui_ae56aa_1.0.0-canary.v20251219163248.js → up-billing-page_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  87. /package/dist/{up-billing-page_ui_6ee94f_1.0.0-canary.v20251219163248.js → up-billing-page_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  88. /package/dist/{up-plans-page_ui_ae56aa_1.0.0-canary.v20251219163248.js → up-plans-page_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  89. /package/dist/{up-plans-page_ui_6ee94f_1.0.0-canary.v20251219163248.js → up-plans-page_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  90. /package/dist/{useravatar_ui_ae56aa_1.0.0-canary.v20251219163248.js → useravatar_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  91. /package/dist/{useravatar_ui_6ee94f_1.0.0-canary.v20251219163248.js → useravatar_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  92. /package/dist/{userbutton_ui_ae56aa_1.0.0-canary.v20251219163248.js → userbutton_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  93. /package/dist/{userbutton_ui_6ee94f_1.0.0-canary.v20251219163248.js → userbutton_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  94. /package/dist/{userprofile_ui_ae56aa_1.0.0-canary.v20251219163248.js → userprofile_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  95. /package/dist/{userprofile_ui_6ee94f_1.0.0-canary.v20251219163248.js → userprofile_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  96. /package/dist/{userverification_ui_ae56aa_1.0.0-canary.v20251219163248.js → userverification_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  97. /package/dist/{userverification_ui_6ee94f_1.0.0-canary.v20251219163248.js → userverification_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  98. /package/dist/{vendors_ui_ae56aa_1.0.0-canary.v20251219163248.js → vendors_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  99. /package/dist/{vendors_ui_6ee94f_1.0.0-canary.v20251219163248.js → vendors_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  100. /package/dist/{waitlist_ui_ae56aa_1.0.0-canary.v20251219163248.js → waitlist_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  101. /package/dist/{waitlist_ui_6ee94f_1.0.0-canary.v20251219163248.js → waitlist_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
  102. /package/dist/{web3-solana-wallet-buttons_ui_ae56aa_1.0.0-canary.v20251219163248.js → web3-solana-wallet-buttons_ui_2b38db_1.0.0-canary.v20251219203758.js} +0 -0
  103. /package/dist/{web3-solana-wallet-buttons_ui_6ee94f_1.0.0-canary.v20251219163248.js → web3-solana-wallet-buttons_ui_a99bf1_1.0.0-canary.v20251219203758.js} +0 -0
@@ -115,25 +115,25 @@ print-color-adjust: exact !important;
115
115
  - any valid hex color
116
116
  - any valid hwb color
117
117
  - ${Object.keys(d).join(", ")}
118
- `);return t})(e);switch(t){case"hsl":return{h:r[0],s:r[1],l:r[2],a:r[3]??1};case"hwb":return h((e=>{let t,r,n,o,a=e[0]/360,i=e[1]/100,l=e[2]/100,s=e[3]??1,c=i+l;c>1&&(i/=c,l/=c);let d=Math.floor(6*a),u=1-l;t=6*a-d,(1&d)!=0&&(t=1-t);let p=i+t*(u-i);switch(d){default:case 6:case 0:r=u,n=p,o=i;break;case 1:r=p,n=u,o=i;break;case 2:r=i,n=u,o=p;break;case 3:r=i,n=p,o=u;break;case 4:r=p,n=i,o=u;break;case 5:r=u,n=i,o=p}return[255*r,255*n,255*o,s]})(r));case"rgb":return h(r)}},b=e=>"string"==typeof e?f(g(e)):f(e),v=(e,t)=>({...e,l:e.l+t}),y=(e,t)=>({...e,a:t}),w={toHslaColor:g,toHslaString:b,adjustForLightness:(e,t=5)=>{if(!e)return;let r=w.toHslaColor(e);return r?(100===r.l?r.l=95:r.l=Math.min(r.l+2*t,100),w.toHslaString(r)):e},changeHslaLightness:v,setHslaAlpha:y,lighten:(e,t=0)=>{if(!e)return;let r=g(e);return b(v(r,r.l*t))},makeTransparent:(e,t=0)=>{let r;if(!e||""===e.toString())return;let n=g(e);return b((r=(n.a??1)*t,{...n,a:n.a?n.a-r:void 0}))},makeSolid:e=>{if(e)return b({...g(e),a:1})},setAlpha:(e,t)=>e.toString()?b(y(g(e),t)):e}},5576:function(e,t,r){r.d(t,{D3:()=>c,H5:()=>i,LL:()=>s,Nw:()=>d,lD:()=>u,nm:()=>l});var n=r(4803),o=r(2464);let a=Object.freeze(o.X2.reduce((e,t)=>(e[t]=void 0,e),{})),i=()=>({...a});function l(e,t,r){return`color-mix(in srgb, ${e}, ${t} ${r}%)`}function s(e,t,r,n,o){return`hsl(from ${e} ${t} ${r} ${n}${o?` / ${o}`:""})`}function c(e,t){return`color-mix(in srgb, transparent, ${e} ${t}%)`}function d(e,t){return c(e,o.NO[t])}function u(e,t){if(500===t)return e;if(n.a.relativeColorSyntax())return function(e,t){if(500===t)return e;let r=o.XW[t];if(!r)return e;let{TARGET_LIGHT:n,TARGET_DARK:a,LIGHT_STEPS:i,DARK_STEPS:l}=o.Pg;return t<500?s(e,"h","s",`calc(l + (${r} * ((${n} - l) / ${i})))`):s(e,"h","s",`calc(l - (${r} * ((l - ${a}) / ${l})))`)}(e,t);if(n.a.colorMix()){if(500===t)return e;let r=o.q5[t];return r.mixColor?l(e,r.mixColor,r.percentage):e}return e}},856:function(e,t,r){r.d(t,{K:()=>u});var n=r(4518),o=r(1227),a=r(8813),i=r(7240),l=r(2861),s=r(2293),c=r(3907),d=r(5845);let u=(e,t)=>p({customMenuItems:e,getDefaultMenuItems:h},t),p=({customMenuItems:e,getDefaultMenuItems:t},r)=>{let{INITIAL_MENU_ITEMS:n,validReorderItemLabels:o}=t(),a=e.filter(e=>!!f(e,o)||((0,c.w)(r)&&console.error("Clerk: Invalid custom menu item:",e),!1));(0,c.w)(r)&&(w(e,o),$(a));let{menuItems:i}=m({customMenuItems:a,defaultMenuItems:n});return i},m=({customMenuItems:e,defaultMenuItems:t})=>{let r=t.map(e=>e),a=[...e.map((e,o)=>{if(v(e))return{name:e.label,id:`custom-menutItem-${o}`,icon:t=>(0,n.Y)(s.c,{mount:e.mountIcon,unmount:e.unmountIcon,...t}),path:(0,d.K)(e.href)};if(g(e))return{name:e.label,id:`custom-menutItem-${o}`,icon:t=>(0,n.Y)(s.c,{mount:e.mountIcon,unmount:e.unmountIcon,...t}),onClick:e?.onClick};if(b(e))return{name:e.label,id:`custom-menutItem-${o}`,icon:t=>(0,n.Y)(s.c,{mount:e.mountIcon,unmount:e.unmountIcon,...t}),open:e.open};let a=t.find(t=>t.id===e.label);return r=r.filter(t=>t.id!==e.label),{...a}}),...r];return e.some(e=>e.label===o.dY.MANAGE_ACCOUNT)||a.sort(e=>e.id===o.dY.MANAGE_ACCOUNT?-1:0),{menuItems:a}},h=()=>{let e=[{name:(0,l.G)("userButton.action__manageAccount"),id:o.dY.MANAGE_ACCOUNT,icon:a.A},{name:(0,l.G)("userButton.action__signOut"),id:o.dY.SIGN_OUT,icon:i.A}],t=e.map(e=>e.id);return{INITIAL_MENU_ITEMS:e,validReorderItemLabels:t}},f=(e,t)=>(v(e)||g(e)||b(e)||y(e,t))&&"string"==typeof e.label,g=e=>!!e.label&&!!e.onClick&&!e.mount&&!e.unmount&&!!e.mountIcon&&!!e.unmountIcon,b=e=>!!e.label&&!!e.open&&!e.mount&&!e.unmount&&!!e.mountIcon&&!!e.unmountIcon,v=e=>!!e.href&&!!e.label&&!e.mount&&!e.unmount&&!!e.mountIcon&&!!e.unmountIcon,y=(e,t)=>!e.mount&&!e.unmount&&!e.mountIcon&&!e.unmountIcon&&t.some(t=>t===e.label),w=(e,t)=>{e.filter(e=>y(e,t)).reduce((e,t)=>(e.includes(t.label)&&console.error(`Clerk: The "${t.label}" item is used more than once when reordering pages. This may cause unexpected behavior.`),[...e,t.label]),[])},$=e=>{let t=e.map(e=>e.label),r=t.filter((e,r)=>t.indexOf(e)!==r);r.length>0&&console.warn(`Clerk: Duplicate custom menu item labels found: ${r.join(", ")}`)}},3121:function(e,t,r){r.d(t,{q:()=>C,M:()=>k});var n,o,a,i,l=r(4518),s=r(1841),c=r(4173),d=r(1227),u=r(5074);function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let m=function(e){return u.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},e),n||(n=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0Zm-2.585 2.894c.154.25.107.568-.083.792A5.675 5.675 0 0 1 8 13.688a5.675 5.675 0 0 1-4.332-2.002c-.19-.224-.237-.543-.083-.792.087-.14.189-.271.306-.392.46-.469 1.087-.986 1.703-1.102.514-.097.899.056 1.298.214.331.132.673.267 1.108.267.435 0 .777-.135 1.108-.267.4-.158.784-.31 1.298-.214.616.116 1.243.633 1.703 1.102.117.12.22.252.306.392ZM8 8.919c1.329 0 2.406-1.559 2.406-2.888a2.406 2.406 0 1 0-4.812 0C5.594 7.361 6.67 8.92 8 8.92Z"})))};var h=r(7358),f=r(4967);function g(){return(g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let b=function(e){return u.createElement("svg",g({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 8"},e),o||(o=u.createElement("path",{d:"M7.22 6.47a.75.75 0 0 0 1.06 1.06l3-3a.75.75 0 0 0 0-1.06l-3-3a.75.75 0 0 0-1.06 1.06L9.69 4 7.22 6.47ZM4.78 6.47a.75.75 0 0 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 0 1 1.06 1.06L2.31 4l2.47 2.47Z",fill:"currentColor"})))};var v=r(9830);function y(){return(y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let w=function(e){return u.createElement("svg",y({fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},e),a||(a=u.createElement("path",{d:"M9.167 5.035c0 1.503-1.22 3.266-2.723 3.266S3.722 6.538 3.722 5.035a2.722 2.722 0 0 1 5.445 0ZM1 12.736c0-.797.12-1.804.796-2.643.562-.698 1.23-1.116 1.926-1.247 1.066-.2 1.638.544 2.722.544 1.085 0 1.657-.745 2.723-.544.697.13 1.364.55 1.926 1.247.676.84.796 1.846.796 2.643a.95.95 0 0 1-.95.951H1.95A.95.95 0 0 1 1 12.736Z"})),i||(i=u.createElement("path",{d:"M8.982 7.712c-.088.111-.182.22-.282.324a2.698 2.698 0 0 1 1.21.232c1.336-.247 2.368-1.85 2.368-3.233a2.722 2.722 0 0 0-3.5-2.61 3.491 3.491 0 0 1 1.166 2.61c0 .945-.375 1.927-.962 2.677ZM12.382 13.688c.18-.274.285-.6.285-.952 0-.942-.152-2.21-1.019-3.187-.21-.239-.377-.371-.598-.555.37-.138.75-.238 1.228-.148.697.13 1.364.55 1.926 1.247.676.84.796 1.846.796 2.643a.95.95 0 0 1-.95.951h-1.668Z"})))};var $=r(2861),x=r(2293),_=r(3907),S=r(5845);let k=(e,t,r,n)=>P({customPages:e,getDefaultRoutes:B,setFirstPathToRoot:z,excludedPathsFromDuplicateWarning:[]},t,r,n),C=(e,t,r,n)=>P({customPages:e,getDefaultRoutes:O,setFirstPathToRoot:I,excludedPathsFromDuplicateWarning:[]},t,r,n,!0),P=({customPages:e,getDefaultRoutes:t,setFirstPathToRoot:r,excludedPathsFromDuplicateWarning:n},o,a,i,l)=>{let{INITIAL_ROUTES:c,pageToRootNavbarRouteMap:d,validReorderItemLabels:u}=t({commerce:l?!(0,s.NW)(o,i)&&a:!(0,s.B_)(o,i)&&a,apiKeys:l?!(0,s.s$)(o,i):!(0,s.ui)(o,i)});(0,_.w)(o)&&D(e,u);let{allRoutes:p,contents:m}=A({customPages:e.filter(e=>!!Y(e,u)||((0,_.w)(o)&&console.error("Clerk: Invalid custom page data: ",e),!1)),defaultRoutes:c});M(p);let h=r(p);return(0,_.w)(o)&&R(h,n),{routes:h,contents:m,pageToRootNavbarRouteMap:d}},A=({customPages:e,defaultRoutes:t})=>{let r=t.map(e=>e),n=[],o=e.map((e,o)=>{if(T(e))return{name:e.label,id:`custom-page-${o}`,icon:t=>(0,l.Y)(x.c,{mount:e.mountIcon,unmount:e.unmountIcon,...t}),path:(0,S.K)(e.url),external:!0};if(E(e)){let t=L(e.url);return n.push({url:t,mount:e.mount,unmount:e.unmount}),{name:e.label,id:`custom-page-${o}`,icon:t=>(0,l.Y)(x.c,{mount:e.mountIcon,unmount:e.unmountIcon,...t}),path:t}}let a=t.find(t=>t.id===e.label);return r=r.filter(({id:t})=>t!==e.label),{...a}});return{allRoutes:[...r,...o],contents:n}},z=e=>e.map((e,t)=>0===t?{...e,path:"/"}:e),I=e=>e.map((e,t)=>0===t?{...e,path:"/"}:e),D=(e,t)=>{e.filter(e=>F(e,t)).reduce((e,t)=>(e.includes(t.label)&&console.error(`Clerk: The "${t.label}" item is used more than once when reordering pages. This may cause unexpected behavior.`),[...e,t.label]),[])},R=(e,t)=>{let r=e.filter(({external:e,path:r})=>!e&&t.every(e=>e!==r)).map(({path:e})=>e);r.filter((e,t)=>r.indexOf(e)!==t).forEach(e=>{console.error(`Clerk: Duplicate path "${e}" found in custom pages. This may cause unexpected behavior.`)})},Y=(e,t)=>E(e)||T(e)||F(e,t),E=e=>!!e.url&&!!e.label&&!!e.mount&&!!e.unmount&&!!e.mountIcon&&!!e.unmountIcon,T=e=>!!e.url&&!!e.label&&!e.mount&&!e.unmount&&!!e.mountIcon&&!!e.unmountIcon,F=(e,t)=>!e.url&&!e.mount&&!e.unmount&&!e.mountIcon&&!e.unmountIcon&&t.some(t=>t===e.label),L=e=>{if(!e)throw Error("Clerk: URL is required for custom pages");if((0,c.AY)(e))throw Error("Clerk: Absolute URLs are not supported for custom pages");return"/"===e.charAt(0)&&e.length>1?e.substring(1):e},M=e=>{if(e[0].external)throw Error("Clerk: The first route cannot be a custom external link component")},B=({commerce:e,apiKeys:t})=>{let r=[{name:(0,$.G)("userProfile.navbar.account"),id:d.j2.ACCOUNT,icon:m,path:"account"},{name:(0,$.G)("userProfile.navbar.security"),id:d.j2.SECURITY,icon:h.A,path:"security"}];e&&r.push({name:(0,$.G)("userProfile.navbar.billing"),id:d.j2.BILLING,icon:f.A,path:"billing"}),t&&r.push({name:(0,$.G)("userProfile.navbar.apiKeys"),id:d.j2.API_KEYS,icon:b,path:"api-keys"});let n={profile:r.find(e=>e.id===d.j2.ACCOUNT),"email-address":r.find(e=>e.id===d.j2.ACCOUNT),"phone-number":r.find(e=>e.id===d.j2.ACCOUNT),"connected-account":r.find(e=>e.id===d.j2.ACCOUNT),"web3-wallet":r.find(e=>e.id===d.j2.ACCOUNT),username:r.find(e=>e.id===d.j2.ACCOUNT),"multi-factor":r.find(e=>e.id===d.j2.SECURITY),password:r.find(e=>e.id===d.j2.SECURITY)},o=r.map(e=>e.id);return{INITIAL_ROUTES:r,pageToRootNavbarRouteMap:n,validReorderItemLabels:o}},O=({commerce:e,apiKeys:t})=>{let r=[{name:(0,$.G)("organizationProfile.navbar.general"),id:d.jc.GENERAL,icon:v.A,path:"organization-general"},{name:(0,$.G)("organizationProfile.navbar.members"),id:d.jc.MEMBERS,icon:w,path:"organization-members"}];e&&r.push({name:(0,$.G)("organizationProfile.navbar.billing"),id:d.j2.BILLING,icon:f.A,path:"organization-billing"}),t&&r.push({name:(0,$.G)("organizationProfile.navbar.apiKeys"),id:d.jc.API_KEYS,icon:b,path:"organization-api-keys"});let n={"invite-members":r.find(e=>e.id===d.jc.MEMBERS),domain:r.find(e=>e.id===d.jc.GENERAL),profile:r.find(e=>e.id===d.jc.GENERAL),leave:r.find(e=>e.id===d.jc.GENERAL),delete:r.find(e=>e.id===d.jc.GENERAL)},o=r.map(e=>e.id);return{INITIAL_ROUTES:r,pageToRootNavbarRouteMap:n,validReorderItemLabels:o}}},5485:function(e,t,r){r.d(t,{e:()=>n});let n=e=>e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-")},4803:function(e,t,r){let n,o,a;r.d(t,{a:()=>i});let i={relativeColorSyntax:()=>{if(void 0!==n)return n;try{n=CSS.supports("color: hsl(from white h s l)")}catch{n=!1}return n},colorMix:()=>{if(void 0!==o)return o;try{o=CSS.supports("color: color-mix(in srgb, white, black)")}catch{o=!1}return o},modernColor(){if(void 0!==a)return a;try{a=this.relativeColorSyntax()||this.colorMix()}catch{a=!1}return a}}},8930:function(e,t,r){function n(e){if(!e||"string"!=typeof e)return!1;let t=e.trim();if(!t.startsWith("var(")||!t.endsWith(")"))return!1;let r=t.slice(4,-1).trim();if(!r.startsWith("--"))return!1;let n=r.indexOf(","),o=-1===n?r:r.slice(0,n).trim();return/^--[a-zA-Z0-9-_]+$/.test(o)}function o(e,t,r){let n=document.createElement("div");n.style.setProperty(t,r),e.appendChild(n);let o=window.getComputedStyle(n).getPropertyValue(t);return e.removeChild(n),o.trim()}function a(e,t,r="white"){let n=o(e,"color",t),i=o(e,"color",r),l=document.createElement("canvas");l.width=1,l.height=1;let s=l.getContext("2d");if(!s)return n;s.fillStyle=i,s.fillRect(0,0,1,1),s.fillStyle=n,s.fillRect(0,0,1,1);let{data:c}=s.getImageData(0,0,1,1);return`#${c[0].toString(16).padStart(2,"0")}${c[1].toString(16).padStart(2,"0")}${c[2].toString(16).padStart(2,"0")}`}r.d(t,{AY:()=>i,G3:()=>a,cQ:()=>function e(t,r){let o;if(!n(t))return null;let a=t.trim().slice(4,-1).trim(),i=a.indexOf(","),l=null;-1===i?o=a:(o=a.slice(0,i).trim(),l=a.slice(i+1).trim());let s=function(e,t){let r,n;if("undefined"==typeof window||"undefined"==typeof getComputedStyle)return null;r=e.startsWith("var(")&&e.endsWith(")")?e.slice(4,-1).trim():e.startsWith("--")?e:`--${e}`;try{if(t)n=t;else{if("undefined"==typeof document||!document.documentElement)return null;n=document.documentElement}}catch{return null}try{return getComputedStyle(n).getPropertyValue(r).trim()||null}catch{return null}}(o,r);return s?s:l?n(l)?e(l,r):l:null},yJ:()=>o});let i=(e,t)=>`var(--clerk-${e}, ${t})`},4468:function(e,t,r){r.d(t,{H4:()=>i});var n=r(3610),o=r(1044);let a=e=>e[0],i=(e,t,r)=>{if(!(0,n.ux)(e))throw e;return(0,n.si)(e)?l(e,t,r):(0,n.$R)(e)?s(e,t,r):(!(0,n.Cm)(e)||"reverification_cancelled"!==e.code)&&(0,n.Cm)(e)?c(e,t,r):void 0},l=(e,t,r)=>r?.(e.message),s=(e,t,r)=>{if(!(0,n.$R)(e))return;let{fieldErrors:i,globalErrors:l}=(e.errors||[]).reduce((e,t)=>(t.meta?.paramName?e.fieldErrors.push(t):e.globalErrors.push(t),e),{fieldErrors:[],globalErrors:[]});if(i&&!(i.length<1)&&t.forEach(e=>{let t=e?.buildErrorMessage;t||(t=a);let r=i.filter(t=>t.meta?.paramName===e.id||(0,o.sF)(t.meta?.paramName)===e.id),n=t(r);r.length&&n?e.setError(n):e.clearFeedback()}),r){r(void 0);let e=l[0];e&&r(e)}},c=(e,t,r)=>{(0,n.Cm)(e)&&r&&(r(void 0),e&&r(e))}},8289:function(e,t,r){r.d(t,{Ih:()=>d,Kn:()=>c,Wy:()=>u,aR:()=>p});let n=e=>e.reduce((e,t,r)=>(e[t]=r,e),{}),o=n(["passkey","password","email_link","email_code","phone_code"]),a=n(["email_link","email_code","phone_code","passkey","password"]),i=n(["email_link","email_code","phone_code","passkey","password"]),l=n(["totp","phone_code","backup_code"]),s=e=>(t,r)=>{let n=e[t.strategy],o=e[r.strategy];return void 0===n||void 0===o?0:n-o},c=s(o),d=s(a),u=s(l),p=s(i)},137:function(e,t,r){r.d(t,{Y:()=>n});function n(e,t="long",r="en-US"){let o={month:"short"===t?"short":"long",..."monthyear"!==t&&{day:"numeric"},..."short"!==t&&{year:"numeric"}};return new Intl.DateTimeFormat(r,o).format(e)}},9835:function(e,t,r){r.d(t,{R:()=>o,u:()=>a});var n=r(7651);let o=e=>e&&e.includes("**"),a=e=>!e||e.includes("@")||o(e)||e.match(/[a-zA-Z]/)?e:(0,n.Om)(e)},1020:function(e,t,r){r.d(t,{P:()=>n});let n=e=>[...e].reduce((e,[t,r])=>(e[t]=r,e),{})},5424:function(e,t,r){r.d(t,{J:()=>n});function n(e,t){if(t&&"mounted"!==e)return t?.target?.closest("[data-clerk-profile-scroll-box-root]")}},7806:function(e,t,r){r.d(t,{T:()=>a});var n=r(6988),o=r(2861);let a=e=>{let t=(0,n.om)({date:e||new Date,relativeTo:new Date});if(!t)return"";switch(t.relativeDateCase){case"previous6Days":return(0,o.G)("dates.previous6Days",{date:t.date});case"lastDay":return(0,o.G)("dates.lastDay",{date:t.date});case"sameDay":return(0,o.G)("dates.sameDay",{date:t.date});case"nextDay":return(0,o.G)("dates.nextDay",{date:t.date});case"next6Days":return(0,o.G)("dates.next6Days",{date:t.date});default:return(0,o.G)("dates.numeric",{date:t.date})}}},8225:function(e,t,r){r.d(t,{p:()=>n});let n=e=>{if((e||"").includes("gravatar")||(e||"").includes("avatar_placeholder"))return!0;try{var t;let r=(t=new URL(e).pathname.replace("/",""),"undefined"!=typeof atob&&"function"==typeof atob?atob(t):"undefined"!=typeof global&&global.Buffer?new global.Buffer(t,"base64").toString():t),n=JSON.parse(r);return"default"===n.type}catch{return!1}}},1089:function(e,t,r){function n(e){return"ListFormat"in Intl&&function(e){if(!e)return!1;let t=Array.isArray(e)?e:[e];return Intl.ListFormat.supportedLocalesOf(t).length===t.length}(e)}function o(e,t){return"NumberFormat"in Intl&&function(e){if(!e)return!1;try{return Intl.NumberFormat.supportedLocalesOf(e).length>0}catch{return!1}}(t)?new Intl.NumberFormat(t,{notation:"compact"}).format(e):e.toString()}r.d(t,{L1:()=>o,bI:()=>n})},958:function(e,t,r){r.d(t,{X:()=>o});let n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i,o=()=>"undefined"!=typeof window&&void 0!==window.document&&!!(window.matchMedia("only screen and (max-width: 760px)").matches||n.test(navigator.userAgent)||"ontouchstart"in document.documentElement&&navigator.userAgent.match(/Mobi/))},4692:function(e,t,r){r.d(t,{C:()=>o});var n=r(2950);let o=({routing:e,path:t})=>t&&!e?{routing:"path",path:t}:"path"!==e&&t?(0,n.c)(e):{routing:e,path:t}},3202:function(e,t,r){r.d(t,{u:()=>c});var n=r(2950);let o={initialDelay:125,maxDelayBetweenRetries:0,factor:2,shouldRetry:(e,t)=>t<5,retryImmediately:!1,jitter:!0},a=async e=>new Promise(t=>setTimeout(t,e)),i=(e,t)=>t?e*(1+Math.random()):e,l=async(e,t={})=>{var r;let n,l=0,{shouldRetry:s,initialDelay:c,maxDelayBetweenRetries:d,factor:u,retryImmediately:p,jitter:m,onBeforeRetry:h}={...o,...t},f=(r={initialDelay:c,maxDelayBetweenRetries:d,factor:u,jitter:m},n=0,async()=>{let e;await a((e=i(e=r.initialDelay*Math.pow(r.factor,n),r.jitter),Math.min(r.maxDelayBetweenRetries||e,e))),n++});for(;;)try{return await e()}catch(e){if(!s(e,++l))throw e;h&&await h(l),p&&1===l?await a(i(100,m)):await f()}};async function s(e="",t){let{async:r,defer:n,beforeLoad:o,crossOrigin:a,nonce:i}=t||{};return l(()=>new Promise((t,l)=>{e||l(Error("loadScript cannot be called without a src")),document&&document.body||l(Error("loadScript cannot be called when document does not exist"));let s=document.createElement("script");a&&s.setAttribute("crossorigin",a),s.async=r||!1,s.defer=n||!1,s.addEventListener("load",()=>{s.remove(),t(s)}),s.addEventListener("error",t=>{s.remove(),l(t.error??Error(`failed to load script: ${e}`))}),s.src=e,s.nonce=i,o?.(s),document.body.appendChild(s)}),{shouldRetry:(e,t)=>t<=5})}async function c(){if(!window.google)try{await s("https://accounts.google.com/gsi/client",{defer:!0})}catch{(0,n.o)("Google Identity Services")}return window.google}},44:function(e,t,r){r.d(t,{C:()=>o});let n=[".lovable.app",".lovableproject.com",".webcontainer-api.io",".vusercontent.net",".v0.dev",".v0.app",".lp.dev"];function o(){return function(){if(void 0===globalThis.document)return!1;try{return window.self!==window.top}catch{return!0}}()||n.some(e=>window.location.origin.endsWith(e))}},3990:function(e,t,r){r.d(t,{C5:()=>a,kS:()=>l,zJ:()=>i});var n=r(2861),o=r(1089);let a=(e,t)=>{if(!t)return e[0].longMessage;let{t:r,locale:o,passwordSettings:a}=t;if(e?.[0]?.code==="form_password_size_in_bytes_exceeded"||e?.[0]?.code==="form_password_pwned"||e?.[0]?.code==="form_new_password_matches_current")return`${r((0,n.G)(`unstable__errors.${e?.[0]?.code}`))||e?.[0]?.message}`;if(e?.[0]?.code==="form_password_not_strong_enough"){let t=e[0].meta?.zxcvbn?.suggestions?.map(e=>r((0,n.G)(`unstable__errors.zxcvbn.suggestions.${e.code}`))).join(" ");return`${r((0,n.G)("unstable__errors.zxcvbn.notEnough"))} ${t}`}let s=e.filter(e=>"form_password_length_too_short"===e.code),c=l((s.length?s:e).map(e=>{let t={form_password_length_too_long:["unstable__errors.passwordComplexity.maximumLength","length",a.max_length],form_password_length_too_short:["unstable__errors.passwordComplexity.minimumLength","length",a.min_length],form_password_no_uppercase:"unstable__errors.passwordComplexity.requireUppercase",form_password_no_lowercase:"unstable__errors.passwordComplexity.requireLowercase",form_password_no_number:"unstable__errors.passwordComplexity.requireNumbers",form_password_no_special_char:"unstable__errors.passwordComplexity.requireSpecialCharacter"}[e.code];if(Array.isArray(t)){let[e,o,a]=t;return r((0,n.G)(e,{[o]:a}))}return r((0,n.G)(t))}),o);return i(`${r((0,n.G)("unstable__errors.passwordComplexity.sentencePrefix"))} ${c}`)},i=e=>e?e.endsWith(".")?e:`${e}.`:"",l=(e,t)=>(0,o.bI)(t)?new Intl.ListFormat(t,{style:"long",type:"conjunction"}).format(e):e.join(", ")},7651:function(e,t,r){r.d(t,{Mz:()=>p,Om:()=>d,TV:()=>m,Xd:()=>c,eL:()=>a,n4:()=>i,sH:()=>l});var n=r(1820);let o={};function a(e,t="us"){if(o[e=e||t])return o[e];let r=String.fromCodePoint(...[...e.toUpperCase()].map(e=>e.codePointAt(0)+127397));return o[e]=r,r}function i(e,t,r){var n;if(!e||!t)return e;let o=[...l(e)].slice(0,15-((n=(n=r)||"1").includes("+")?n:"+"+n).length);if(o.length<=3)return o.join("");let a="";for(let e=0;o.length>0;e++)e>t.length-1?a+=o.shift():a+="."===t[e]?o.shift():t[e];return a}function l(e){return(e||"").replace(/[^\d]/g,"")}function s(e,t){if(!e||!n.nU.get(e)||!t)return!1;let r=t[0],o=t.substring(1,4);return r===n.nU.get(e)?.code&&t.length-1===((n.nU.get(e)?.pattern||"").match(/\./g)||[]).length&&n.mK[e].has(o)}function c(e){let t=l(e),r=function(e,t="us"){let r=l(e);return!r||r.length<4?t:r.startsWith("1")&&s("us",r)?"us":r.startsWith("1")&&s("ca",r)?"ca":p(r).country.iso}(t),o=n.nU.get(r)?.pattern||"",a=n.nU.get(r)?.code||"",c=t.slice(a.length),d=`+${a} ${i(c,o,a)}`;return{iso:r,pattern:o,code:a,number:c,formattedNumberWithCode:d}}function d(e){let t=c(e);return`+${t.code} ${i(t.number,t.pattern,t.code)}`}let u=(e,t)=>t.priority-e.priority;function p(e){let t=l(e),r=[];for(let e of[4,3,2,1]){let o=t.substring(0,e),a=n.zh.get(o)||[];a.length&&r.push(...a)}let o=n.nU.get("us"),a=r.sort(u)[0]||o;return{number:t.slice(a?.code.length||0),country:a}}function m(e,t){if(!t)return null;let{country:r}=p(e);return t[r.iso.toUpperCase()]||null}},3907:function(e,t,r){r.d(t,{w:()=>o});var n=r(4653);let o=e=>(0,n.t)()||e.sdkMetadata?.environment==="development"},5845:function(e,t,r){r.d(t,{K:()=>o});var n=r(4173);let o=e=>{if(!e)throw Error("Clerk: URL is required for custom links");return(0,n.AY)(e)||"/"===e.charAt(0)?e:`/${e}`}},6735:function(e,t,r){r.d(t,{y:()=>n});let n=e=>new Promise(t=>setTimeout(t,e))},7198:function(e,t,r){r.d(t,{f:()=>o});var n=r(2861);function o(e){let t=new Date,r=new Date(e);if(isNaN(r.getTime()))return"";let o=Math.floor((t.getTime()-r.getTime())/1e3);if(o<60)return(0,n.G)("apiKeys.lastUsed__seconds",{seconds:o});let a=Math.floor(o/60);if(a<60)return(0,n.G)("apiKeys.lastUsed__minutes",{minutes:a});let i=Math.floor(a/60);if(i<24)return(0,n.G)("apiKeys.lastUsed__hours",{hours:i});let l=Math.floor(i/24);if(l<30)return(0,n.G)("apiKeys.lastUsed__days",{days:l});let s=Math.floor(l/30);if(s<12)return(0,n.G)("apiKeys.lastUsed__months",{months:s});let c=Math.floor(s/12);return(0,n.G)("apiKeys.lastUsed__years",{years:c})}},9606:function(e,t,r){r.d(t,{W:()=>n});function n(e,t=20,r=5){if(!e||e.length<=t)return e;if(t<=r+3)return"..."+e.slice(-r);let o=Array.from(e);return o.length<=t?e:o.slice(0,t-r-3).join("")+"..."+o.slice(-r).join("")}},8640:function(e,t,r){r.d(t,{eW:()=>d,mK:()=>c,tJ:()=>s});var n=r(5074),o=r(4317),a=r(78);let i=e=>e.trim(),l=(e,t)=>{let r=e;for(let e=0;e<t.length;e++)r=t[e](r);return r},s=(e,t,r)=>{let o=r||{type:"text",label:"",isRequired:!1,placeholder:"",options:[],defaultChecked:!1},s=[];o.transformer&&s.push(o.transformer),"email"===o.type&&s.push(i);let{translateError:c,t:d}=(0,a._)(),[u,p]=(0,n.useState)(l(t,s)),[m,h]=(0,n.useState)(!1),[f,g]=(0,n.useState)(o?.defaultChecked||!1),[b,v]=(0,n.useState)(!1),[y,w]=(0,n.useState)({message:"",type:"info"}),$=e=>{w({message:c(e),type:"error"})},{defaultChecked:x,validatePassword:_,buildErrorMessage:S,...k}=o,C={id:e,name:e,value:u,checked:f,setSuccess:e=>{w({message:e,type:"success"})},setError:$,onChange:e=>o?.type==="checkbox"?g(e.target.checked):p(l(e.target.value||"",s)),onBlur:()=>{h(!1)},onFocus:()=>{h(!0)},setWarning:e=>{w({message:c(e),type:"warning"})},feedback:y.message||d(o.infoText),feedbackType:y.type,setInfo:e=>{w({message:e,type:"info"})},clearFeedback:()=>{w({message:"",type:"info"})},hasPassedComplexity:b,setHasPassedComplexity:v,validatePassword:"password"===o.type?o.validatePassword:void 0,isFocused:m,...k};return{props:C,...C,buildErrorMessage:S,setError:$,setValue:e=>p(e||""),setChecked:e=>g(e)}},c=e=>{let t={};return e.forEach(e=>{t[e.id]="checkbox"!==e.type?e.value:e.checked}),t},d=e=>{let{feedback:t="",delayInMs:r=100,feedbackType:n="info",isFocused:a=!1}=e||{},i=!a&&["info","warning"].includes(n);return{debounced:(0,o.d)({feedback:i?"":t,feedbackType:i?"info":n},r)}}},4557:function(e,t,r){r.d(t,{Z:()=>i});var n=r(2861);let o="form_username_invalid_length",a="form_username_needs_non_number_char",i=(e,t)=>{let{t:r,usernameSettings:i}=t,l=e[0];return t?l?.code===o?r((0,n.G)(`unstable__errors.${o}`,{min_length:i.min_length,max_length:i.max_length})):l?.code===a?r((0,n.G)(`unstable__errors.${a}`)):l:l}},9236:function(e,t,r){r.d(t,{f:()=>a});var n=r(3610),o=r(4468);let a=(e,t)=>{if((0,n.$R)(e)&&e.errors?.[0]?.meta?.paramName==="identifier"&&e.errors?.[0]?.code==="form_param_nil"){let e=new n.cR("A Web3 Wallet extension cannot be found. Please install one to continue.",{code:"web3_missing_identifier"});return(0,o.H4)(e,[],t)}return(0,o.H4)(e,[],t)}},1652:function(e,t,r){r.d(t,{c:()=>n,y:()=>o});let n=[{channel:"whatsapp",name:"WhatsApp"}],o=e=>e&&n.find(t=>t.channel===e)||null},6435:function(e,t,r){r.d(t,{l:()=>o,n:()=>n});let n=[".lcl.dev",".stg.dev",".lclstage.dev",".stgstage.dev",".dev.lclclerk.com",".stg.lclclerk.com",".accounts.lclclerk.com","accountsstage.dev","accounts.dev"];function o(e,t="svg"){return`https://img.clerk.com/static/${e}.${t}`}},6988:function(e,t,r){function n(e){try{return new Date(e||new Date)}catch{return new Date}}function o(e){let{date:t,relativeTo:r}=e;if(!t||!r)return null;let o=n(t),a=function(e,t,{absolute:r=!0}={}){if(!e||!t)return 0;let n=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),o=Math.floor((Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-n)/864e5);return r?Math.abs(o):o}(n(r),o,{absolute:!1});return a<-6?{relativeDateCase:"other",date:o}:a<-1?{relativeDateCase:"previous6Days",date:o}:-1===a?{relativeDateCase:"lastDay",date:o}:0===a?{relativeDateCase:"sameDay",date:o}:1===a?{relativeDateCase:"nextDay",date:o}:a<7?{relativeDateCase:"next6Days",date:o}:{relativeDateCase:"other",date:o}}r.d(t,{OG:()=>n,om:()=>o})},5273:function(e,t,r){function n(e){return function(t){let r=t??this;if(!r)throw TypeError(`${e.kind||e.name} type guard requires an error object`);return r instanceof e}}r.d(t,{a:()=>p,b:()=>l,c:()=>h,d:()=>g,f:()=>m,g:()=>c,i:()=>u,m:()=>f,o:()=>v,s:()=>d,u:()=>b,y:()=>s});var o=class{static kind="ClerkApiError";code;message;longMessage;meta;constructor(e){const t={code:e.code,message:e.message,longMessage:e.long_message,meta:{paramName:e.meta?.param_name,sessionId:e.meta?.session_id,emailAddresses:e.meta?.email_addresses,identifiers:e.meta?.identifiers,zxcvbn:e.meta?.zxcvbn,plan:e.meta?.plan,isPlanUpgradePossible:e.meta?.is_plan_upgrade_possible}};this.code=t.code,this.message=t.message,this.longMessage=t.longMessage,this.meta=t.meta}};n(o);var a=class e extends Error{static kind="ClerkError";clerkError=!0;code;longMessage;docsUrl;cause;get name(){return this.constructor.name}constructor(t){super(new.target.formatMessage(new.target.kind,t.message,t.code,t.docsUrl),{cause:t.cause}),Object.setPrototypeOf(this,e.prototype),this.code=t.code,this.docsUrl=t.docsUrl,this.longMessage=t.longMessage,this.cause=t.cause}toString(){return`[${this.name}]
118
+ `);return t})(e);switch(t){case"hsl":return{h:r[0],s:r[1],l:r[2],a:r[3]??1};case"hwb":return h((e=>{let t,r,n,o,a=e[0]/360,i=e[1]/100,l=e[2]/100,s=e[3]??1,c=i+l;c>1&&(i/=c,l/=c);let d=Math.floor(6*a),u=1-l;t=6*a-d,(1&d)!=0&&(t=1-t);let p=i+t*(u-i);switch(d){default:case 6:case 0:r=u,n=p,o=i;break;case 1:r=p,n=u,o=i;break;case 2:r=i,n=u,o=p;break;case 3:r=i,n=p,o=u;break;case 4:r=p,n=i,o=u;break;case 5:r=u,n=i,o=p}return[255*r,255*n,255*o,s]})(r));case"rgb":return h(r)}},b=e=>"string"==typeof e?f(g(e)):f(e),v=(e,t)=>({...e,l:e.l+t}),y=(e,t)=>({...e,a:t}),w={toHslaColor:g,toHslaString:b,adjustForLightness:(e,t=5)=>{if(!e)return;let r=w.toHslaColor(e);return r?(100===r.l?r.l=95:r.l=Math.min(r.l+2*t,100),w.toHslaString(r)):e},changeHslaLightness:v,setHslaAlpha:y,lighten:(e,t=0)=>{if(!e)return;let r=g(e);return b(v(r,r.l*t))},makeTransparent:(e,t=0)=>{let r;if(!e||""===e.toString())return;let n=g(e);return b((r=(n.a??1)*t,{...n,a:n.a?n.a-r:void 0}))},makeSolid:e=>{if(e)return b({...g(e),a:1})},setAlpha:(e,t)=>e.toString()?b(y(g(e),t)):e}},5576:function(e,t,r){r.d(t,{D3:()=>c,H5:()=>i,LL:()=>s,Nw:()=>d,lD:()=>u,nm:()=>l});var n=r(4803),o=r(2464);let a=Object.freeze(o.X2.reduce((e,t)=>(e[t]=void 0,e),{})),i=()=>({...a});function l(e,t,r){return`color-mix(in srgb, ${e}, ${t} ${r}%)`}function s(e,t,r,n,o){return`hsl(from ${e} ${t} ${r} ${n}${o?` / ${o}`:""})`}function c(e,t){return`color-mix(in srgb, transparent, ${e} ${t}%)`}function d(e,t){return c(e,o.NO[t])}function u(e,t){if(500===t)return e;if(n.a.relativeColorSyntax())return function(e,t){if(500===t)return e;let r=o.XW[t];if(!r)return e;let{TARGET_LIGHT:n,TARGET_DARK:a,LIGHT_STEPS:i,DARK_STEPS:l}=o.Pg;return t<500?s(e,"h","s",`calc(l + (${r} * ((${n} - l) / ${i})))`):s(e,"h","s",`calc(l - (${r} * ((l - ${a}) / ${l})))`)}(e,t);if(n.a.colorMix()){if(500===t)return e;let r=o.q5[t];return r.mixColor?l(e,r.mixColor,r.percentage):e}return e}},856:function(e,t,r){r.d(t,{K:()=>u});var n=r(4518),o=r(1227),a=r(8813),i=r(7240),l=r(2861),s=r(2293),c=r(3907),d=r(5845);let u=(e,t)=>p({customMenuItems:e,getDefaultMenuItems:h},t),p=({customMenuItems:e,getDefaultMenuItems:t},r)=>{let{INITIAL_MENU_ITEMS:n,validReorderItemLabels:o}=t(),a=e.filter(e=>!!f(e,o)||((0,c.w)(r)&&console.error("Clerk: Invalid custom menu item:",e),!1));(0,c.w)(r)&&(w(e,o),$(a));let{menuItems:i}=m({customMenuItems:a,defaultMenuItems:n});return i},m=({customMenuItems:e,defaultMenuItems:t})=>{let r=t.map(e=>e),a=[...e.map((e,o)=>{if(v(e))return{name:e.label,id:`custom-menutItem-${o}`,icon:t=>(0,n.Y)(s.c,{mount:e.mountIcon,unmount:e.unmountIcon,...t}),path:(0,d.K)(e.href)};if(g(e))return{name:e.label,id:`custom-menutItem-${o}`,icon:t=>(0,n.Y)(s.c,{mount:e.mountIcon,unmount:e.unmountIcon,...t}),onClick:e?.onClick};if(b(e))return{name:e.label,id:`custom-menutItem-${o}`,icon:t=>(0,n.Y)(s.c,{mount:e.mountIcon,unmount:e.unmountIcon,...t}),open:e.open};let a=t.find(t=>t.id===e.label);return r=r.filter(t=>t.id!==e.label),{...a}}),...r];return e.some(e=>e.label===o.dY.MANAGE_ACCOUNT)||a.sort(e=>e.id===o.dY.MANAGE_ACCOUNT?-1:0),{menuItems:a}},h=()=>{let e=[{name:(0,l.G)("userButton.action__manageAccount"),id:o.dY.MANAGE_ACCOUNT,icon:a.A},{name:(0,l.G)("userButton.action__signOut"),id:o.dY.SIGN_OUT,icon:i.A}],t=e.map(e=>e.id);return{INITIAL_MENU_ITEMS:e,validReorderItemLabels:t}},f=(e,t)=>(v(e)||g(e)||b(e)||y(e,t))&&"string"==typeof e.label,g=e=>!!e.label&&!!e.onClick&&!e.mount&&!e.unmount&&!!e.mountIcon&&!!e.unmountIcon,b=e=>!!e.label&&!!e.open&&!e.mount&&!e.unmount&&!!e.mountIcon&&!!e.unmountIcon,v=e=>!!e.href&&!!e.label&&!e.mount&&!e.unmount&&!!e.mountIcon&&!!e.unmountIcon,y=(e,t)=>!e.mount&&!e.unmount&&!e.mountIcon&&!e.unmountIcon&&t.some(t=>t===e.label),w=(e,t)=>{e.filter(e=>y(e,t)).reduce((e,t)=>(e.includes(t.label)&&console.error(`Clerk: The "${t.label}" item is used more than once when reordering pages. This may cause unexpected behavior.`),[...e,t.label]),[])},$=e=>{let t=e.map(e=>e.label),r=t.filter((e,r)=>t.indexOf(e)!==r);r.length>0&&console.warn(`Clerk: Duplicate custom menu item labels found: ${r.join(", ")}`)}},3121:function(e,t,r){r.d(t,{q:()=>C,M:()=>k});var n,o,a,i,l=r(4518),s=r(1841),c=r(4173),d=r(1227),u=r(5074);function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let m=function(e){return u.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},e),n||(n=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0Zm-2.585 2.894c.154.25.107.568-.083.792A5.675 5.675 0 0 1 8 13.688a5.675 5.675 0 0 1-4.332-2.002c-.19-.224-.237-.543-.083-.792.087-.14.189-.271.306-.392.46-.469 1.087-.986 1.703-1.102.514-.097.899.056 1.298.214.331.132.673.267 1.108.267.435 0 .777-.135 1.108-.267.4-.158.784-.31 1.298-.214.616.116 1.243.633 1.703 1.102.117.12.22.252.306.392ZM8 8.919c1.329 0 2.406-1.559 2.406-2.888a2.406 2.406 0 1 0-4.812 0C5.594 7.361 6.67 8.92 8 8.92Z"})))};var h=r(7358),f=r(4967);function g(){return(g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let b=function(e){return u.createElement("svg",g({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 8"},e),o||(o=u.createElement("path",{d:"M7.22 6.47a.75.75 0 0 0 1.06 1.06l3-3a.75.75 0 0 0 0-1.06l-3-3a.75.75 0 0 0-1.06 1.06L9.69 4 7.22 6.47ZM4.78 6.47a.75.75 0 0 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 0 1 1.06 1.06L2.31 4l2.47 2.47Z",fill:"currentColor"})))};var v=r(9830);function y(){return(y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let w=function(e){return u.createElement("svg",y({fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},e),a||(a=u.createElement("path",{d:"M9.167 5.035c0 1.503-1.22 3.266-2.723 3.266S3.722 6.538 3.722 5.035a2.722 2.722 0 0 1 5.445 0ZM1 12.736c0-.797.12-1.804.796-2.643.562-.698 1.23-1.116 1.926-1.247 1.066-.2 1.638.544 2.722.544 1.085 0 1.657-.745 2.723-.544.697.13 1.364.55 1.926 1.247.676.84.796 1.846.796 2.643a.95.95 0 0 1-.95.951H1.95A.95.95 0 0 1 1 12.736Z"})),i||(i=u.createElement("path",{d:"M8.982 7.712c-.088.111-.182.22-.282.324a2.698 2.698 0 0 1 1.21.232c1.336-.247 2.368-1.85 2.368-3.233a2.722 2.722 0 0 0-3.5-2.61 3.491 3.491 0 0 1 1.166 2.61c0 .945-.375 1.927-.962 2.677ZM12.382 13.688c.18-.274.285-.6.285-.952 0-.942-.152-2.21-1.019-3.187-.21-.239-.377-.371-.598-.555.37-.138.75-.238 1.228-.148.697.13 1.364.55 1.926 1.247.676.84.796 1.846.796 2.643a.95.95 0 0 1-.95.951h-1.668Z"})))};var $=r(2861),x=r(2293),_=r(3907),S=r(5845);let k=(e,t,r,n)=>P({customPages:e,getDefaultRoutes:B,setFirstPathToRoot:z,excludedPathsFromDuplicateWarning:[]},t,r,n),C=(e,t,r,n)=>P({customPages:e,getDefaultRoutes:O,setFirstPathToRoot:I,excludedPathsFromDuplicateWarning:[]},t,r,n,!0),P=({customPages:e,getDefaultRoutes:t,setFirstPathToRoot:r,excludedPathsFromDuplicateWarning:n},o,a,i,l)=>{let{INITIAL_ROUTES:c,pageToRootNavbarRouteMap:d,validReorderItemLabels:u}=t({commerce:l?!(0,s.NW)(o,i)&&a:!(0,s.B_)(o,i)&&a,apiKeys:l?!(0,s.s$)(o,i):!(0,s.ui)(o,i)});(0,_.w)(o)&&D(e,u);let{allRoutes:p,contents:m}=A({customPages:e.filter(e=>!!Y(e,u)||((0,_.w)(o)&&console.error("Clerk: Invalid custom page data: ",e),!1)),defaultRoutes:c});M(p);let h=r(p);return(0,_.w)(o)&&R(h,n),{routes:h,contents:m,pageToRootNavbarRouteMap:d}},A=({customPages:e,defaultRoutes:t})=>{let r=t.map(e=>e),n=[],o=e.map((e,o)=>{if(T(e))return{name:e.label,id:`custom-page-${o}`,icon:t=>(0,l.Y)(x.c,{mount:e.mountIcon,unmount:e.unmountIcon,...t}),path:(0,S.K)(e.url),external:!0};if(E(e)){let t=L(e.url);return n.push({url:t,mount:e.mount,unmount:e.unmount}),{name:e.label,id:`custom-page-${o}`,icon:t=>(0,l.Y)(x.c,{mount:e.mountIcon,unmount:e.unmountIcon,...t}),path:t}}let a=t.find(t=>t.id===e.label);return r=r.filter(({id:t})=>t!==e.label),{...a}});return{allRoutes:[...r,...o],contents:n}},z=e=>e.map((e,t)=>0===t?{...e,path:"/"}:e),I=e=>e.map((e,t)=>0===t?{...e,path:"/"}:e),D=(e,t)=>{e.filter(e=>F(e,t)).reduce((e,t)=>(e.includes(t.label)&&console.error(`Clerk: The "${t.label}" item is used more than once when reordering pages. This may cause unexpected behavior.`),[...e,t.label]),[])},R=(e,t)=>{let r=e.filter(({external:e,path:r})=>!e&&t.every(e=>e!==r)).map(({path:e})=>e);r.filter((e,t)=>r.indexOf(e)!==t).forEach(e=>{console.error(`Clerk: Duplicate path "${e}" found in custom pages. This may cause unexpected behavior.`)})},Y=(e,t)=>E(e)||T(e)||F(e,t),E=e=>!!e.url&&!!e.label&&!!e.mount&&!!e.unmount&&!!e.mountIcon&&!!e.unmountIcon,T=e=>!!e.url&&!!e.label&&!e.mount&&!e.unmount&&!!e.mountIcon&&!!e.unmountIcon,F=(e,t)=>!e.url&&!e.mount&&!e.unmount&&!e.mountIcon&&!e.unmountIcon&&t.some(t=>t===e.label),L=e=>{if(!e)throw Error("Clerk: URL is required for custom pages");if((0,c.AY)(e))throw Error("Clerk: Absolute URLs are not supported for custom pages");return"/"===e.charAt(0)&&e.length>1?e.substring(1):e},M=e=>{if(e[0].external)throw Error("Clerk: The first route cannot be a custom external link component")},B=({commerce:e,apiKeys:t})=>{let r=[{name:(0,$.G)("userProfile.navbar.account"),id:d.j2.ACCOUNT,icon:m,path:"account"},{name:(0,$.G)("userProfile.navbar.security"),id:d.j2.SECURITY,icon:h.A,path:"security"}];e&&r.push({name:(0,$.G)("userProfile.navbar.billing"),id:d.j2.BILLING,icon:f.A,path:"billing"}),t&&r.push({name:(0,$.G)("userProfile.navbar.apiKeys"),id:d.j2.API_KEYS,icon:b,path:"api-keys"});let n={profile:r.find(e=>e.id===d.j2.ACCOUNT),"email-address":r.find(e=>e.id===d.j2.ACCOUNT),"phone-number":r.find(e=>e.id===d.j2.ACCOUNT),"connected-account":r.find(e=>e.id===d.j2.ACCOUNT),"web3-wallet":r.find(e=>e.id===d.j2.ACCOUNT),username:r.find(e=>e.id===d.j2.ACCOUNT),"multi-factor":r.find(e=>e.id===d.j2.SECURITY),password:r.find(e=>e.id===d.j2.SECURITY)},o=r.map(e=>e.id);return{INITIAL_ROUTES:r,pageToRootNavbarRouteMap:n,validReorderItemLabels:o}},O=({commerce:e,apiKeys:t})=>{let r=[{name:(0,$.G)("organizationProfile.navbar.general"),id:d.jc.GENERAL,icon:v.A,path:"organization-general"},{name:(0,$.G)("organizationProfile.navbar.members"),id:d.jc.MEMBERS,icon:w,path:"organization-members"}];e&&r.push({name:(0,$.G)("organizationProfile.navbar.billing"),id:d.j2.BILLING,icon:f.A,path:"organization-billing"}),t&&r.push({name:(0,$.G)("organizationProfile.navbar.apiKeys"),id:d.jc.API_KEYS,icon:b,path:"organization-api-keys"});let n={"invite-members":r.find(e=>e.id===d.jc.MEMBERS),domain:r.find(e=>e.id===d.jc.GENERAL),profile:r.find(e=>e.id===d.jc.GENERAL),leave:r.find(e=>e.id===d.jc.GENERAL),delete:r.find(e=>e.id===d.jc.GENERAL)},o=r.map(e=>e.id);return{INITIAL_ROUTES:r,pageToRootNavbarRouteMap:n,validReorderItemLabels:o}}},5485:function(e,t,r){r.d(t,{e:()=>n});let n=e=>e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-")},4803:function(e,t,r){let n,o,a;r.d(t,{a:()=>i});let i={relativeColorSyntax:()=>{if(void 0!==n)return n;try{n=CSS.supports("color: hsl(from white h s l)")}catch{n=!1}return n},colorMix:()=>{if(void 0!==o)return o;try{o=CSS.supports("color: color-mix(in srgb, white, black)")}catch{o=!1}return o},modernColor(){if(void 0!==a)return a;try{a=this.relativeColorSyntax()||this.colorMix()}catch{a=!1}return a}}},8930:function(e,t,r){function n(e){if(!e||"string"!=typeof e)return!1;let t=e.trim();if(!t.startsWith("var(")||!t.endsWith(")"))return!1;let r=t.slice(4,-1).trim();if(!r.startsWith("--"))return!1;let n=r.indexOf(","),o=-1===n?r:r.slice(0,n).trim();return/^--[a-zA-Z0-9-_]+$/.test(o)}function o(e,t,r){let n=document.createElement("div");n.style.setProperty(t,r),e.appendChild(n);let o=window.getComputedStyle(n).getPropertyValue(t);return e.removeChild(n),o.trim()}function a(e,t,r="white"){let n=o(e,"color",t),i=o(e,"color",r),l=document.createElement("canvas");l.width=1,l.height=1;let s=l.getContext("2d");if(!s)return n;s.fillStyle=i,s.fillRect(0,0,1,1),s.fillStyle=n,s.fillRect(0,0,1,1);let{data:c}=s.getImageData(0,0,1,1);return`#${c[0].toString(16).padStart(2,"0")}${c[1].toString(16).padStart(2,"0")}${c[2].toString(16).padStart(2,"0")}`}r.d(t,{AY:()=>i,G3:()=>a,cQ:()=>function e(t,r){let o;if(!n(t))return null;let a=t.trim().slice(4,-1).trim(),i=a.indexOf(","),l=null;-1===i?o=a:(o=a.slice(0,i).trim(),l=a.slice(i+1).trim());let s=function(e,t){let r,n;if("undefined"==typeof window||"undefined"==typeof getComputedStyle)return null;r=e.startsWith("var(")&&e.endsWith(")")?e.slice(4,-1).trim():e.startsWith("--")?e:`--${e}`;try{if(t)n=t;else{if("undefined"==typeof document||!document.documentElement)return null;n=document.documentElement}}catch{return null}try{return getComputedStyle(n).getPropertyValue(r).trim()||null}catch{return null}}(o,r);return s?s:l?n(l)?e(l,r):l:null},yJ:()=>o});let i=(e,t)=>`var(--clerk-${e}, ${t})`},4468:function(e,t,r){r.d(t,{H4:()=>i});var n=r(3610),o=r(1044);let a=e=>e[0],i=(e,t,r)=>{if(!(0,n.ux)(e))throw e;return(0,n.si)(e)?l(e,t,r):(0,n.$R)(e)?s(e,t,r):(!(0,n.Cm)(e)||"reverification_cancelled"!==e.code)&&(0,n.Cm)(e)?c(e,t,r):void 0},l=(e,t,r)=>r?.(e.message),s=(e,t,r)=>{if(!(0,n.$R)(e))return;let{fieldErrors:i,globalErrors:l}=(e.errors||[]).reduce((e,t)=>(t.meta?.paramName?e.fieldErrors.push(t):e.globalErrors.push(t),e),{fieldErrors:[],globalErrors:[]});if(i&&!(i.length<1)&&t.forEach(e=>{let t=e?.buildErrorMessage;t||(t=a);let r=i.filter(t=>t.meta?.paramName===e.id||(0,o.sF)(t.meta?.paramName)===e.id),n=t(r);r.length&&n?e.setError(n):e.clearFeedback()}),r){r(void 0);let e=l[0];e&&r(e)}},c=(e,t,r)=>{(0,n.Cm)(e)&&r&&(r(void 0),e&&r(e))}},8289:function(e,t,r){r.d(t,{Ih:()=>d,Kn:()=>c,Wy:()=>u,aR:()=>p});let n=e=>e.reduce((e,t,r)=>(e[t]=r,e),{}),o=n(["passkey","password","email_link","email_code","phone_code"]),a=n(["email_link","email_code","phone_code","passkey","password"]),i=n(["email_link","email_code","phone_code","passkey","password"]),l=n(["totp","phone_code","backup_code"]),s=e=>(t,r)=>{let n=e[t.strategy],o=e[r.strategy];return void 0===n||void 0===o?0:n-o},c=s(o),d=s(a),u=s(l),p=s(i)},137:function(e,t,r){r.d(t,{Y:()=>n});function n(e,t="long",r="en-US"){let o={month:"short"===t?"short":"long",..."monthyear"!==t&&{day:"numeric"},..."short"!==t&&{year:"numeric"}};return new Intl.DateTimeFormat(r,o).format(e)}},9835:function(e,t,r){r.d(t,{R:()=>o,u:()=>a});var n=r(7651);let o=e=>e&&e.includes("**"),a=e=>!e||e.includes("@")||o(e)||e.match(/[a-zA-Z]/)?e:(0,n.Om)(e)},1020:function(e,t,r){r.d(t,{P:()=>n});let n=e=>[...e].reduce((e,[t,r])=>(e[t]=r,e),{})},5424:function(e,t,r){r.d(t,{J:()=>n});function n(e,t){if(t&&"mounted"!==e)return t?.target?.closest("[data-clerk-profile-scroll-box-root]")}},7806:function(e,t,r){r.d(t,{T:()=>a});var n=r(6988),o=r(2861);let a=e=>{let t=(0,n.om)({date:e||new Date,relativeTo:new Date});if(!t)return"";switch(t.relativeDateCase){case"previous6Days":return(0,o.G)("dates.previous6Days",{date:t.date});case"lastDay":return(0,o.G)("dates.lastDay",{date:t.date});case"sameDay":return(0,o.G)("dates.sameDay",{date:t.date});case"nextDay":return(0,o.G)("dates.nextDay",{date:t.date});case"next6Days":return(0,o.G)("dates.next6Days",{date:t.date});default:return(0,o.G)("dates.numeric",{date:t.date})}}},8225:function(e,t,r){r.d(t,{p:()=>n});let n=e=>{if((e||"").includes("gravatar")||(e||"").includes("avatar_placeholder"))return!0;try{var t;let r=(t=new URL(e).pathname.replace("/",""),"undefined"!=typeof atob&&"function"==typeof atob?atob(t):"undefined"!=typeof global&&global.Buffer?new global.Buffer(t,"base64").toString():t),n=JSON.parse(r);return"default"===n.type}catch{return!1}}},1089:function(e,t,r){function n(e){return"ListFormat"in Intl&&function(e){if(!e)return!1;let t=Array.isArray(e)?e:[e];return Intl.ListFormat.supportedLocalesOf(t).length===t.length}(e)}function o(e,t){return"NumberFormat"in Intl&&function(e){if(!e)return!1;try{return Intl.NumberFormat.supportedLocalesOf(e).length>0}catch{return!1}}(t)?new Intl.NumberFormat(t,{notation:"compact"}).format(e):e.toString()}r.d(t,{L1:()=>o,bI:()=>n})},958:function(e,t,r){r.d(t,{X:()=>o});let n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i,o=()=>"undefined"!=typeof window&&void 0!==window.document&&!!(window.matchMedia("only screen and (max-width: 760px)").matches||n.test(navigator.userAgent)||"ontouchstart"in document.documentElement&&navigator.userAgent.match(/Mobi/))},4692:function(e,t,r){r.d(t,{C:()=>o});var n=r(2950);let o=({routing:e,path:t})=>t&&!e?{routing:"path",path:t}:"path"!==e&&t?(0,n.c)(e):{routing:e,path:t}},3202:function(e,t,r){r.d(t,{u:()=>c});var n=r(2950);let o={initialDelay:125,maxDelayBetweenRetries:0,factor:2,shouldRetry:(e,t)=>t<5,retryImmediately:!1,jitter:!0},a=async e=>new Promise(t=>setTimeout(t,e)),i=(e,t)=>t?e*(1+Math.random()):e,l=async(e,t={})=>{var r;let n,l=0,{shouldRetry:s,initialDelay:c,maxDelayBetweenRetries:d,factor:u,retryImmediately:p,jitter:m,onBeforeRetry:h}={...o,...t},f=(r={initialDelay:c,maxDelayBetweenRetries:d,factor:u,jitter:m},n=0,async()=>{let e;await a((e=i(e=r.initialDelay*Math.pow(r.factor,n),r.jitter),Math.min(r.maxDelayBetweenRetries||e,e))),n++});for(;;)try{return await e()}catch(e){if(!s(e,++l))throw e;h&&await h(l),p&&1===l?await a(i(100,m)):await f()}};async function s(e="",t){let{async:r,defer:n,beforeLoad:o,crossOrigin:a,nonce:i}=t||{};return l(()=>new Promise((t,l)=>{e||l(Error("loadScript cannot be called without a src")),document&&document.body||l(Error("loadScript cannot be called when document does not exist"));let s=document.createElement("script");a&&s.setAttribute("crossorigin",a),s.async=r||!1,s.defer=n||!1,s.addEventListener("load",()=>{s.remove(),t(s)}),s.addEventListener("error",t=>{s.remove(),l(t.error??Error(`failed to load script: ${e}`))}),s.src=e,s.nonce=i,o?.(s),document.body.appendChild(s)}),{shouldRetry:(e,t)=>t<=5})}async function c(){if(!window.google)try{await s("https://accounts.google.com/gsi/client",{defer:!0})}catch{(0,n.o)("Google Identity Services")}return window.google}},44:function(e,t,r){r.d(t,{C:()=>o});let n=[".lovable.app",".lovableproject.com",".webcontainer-api.io",".vusercontent.net",".v0.dev",".v0.app",".lp.dev"];function o(){return function(){if(void 0===globalThis.document)return!1;try{return window.self!==window.top}catch{return!0}}()||n.some(e=>window.location.origin.endsWith(e))}},3990:function(e,t,r){r.d(t,{C5:()=>a,kS:()=>l,zJ:()=>i});var n=r(2861),o=r(1089);let a=(e,t)=>{if(!t)return e[0].longMessage;let{t:r,locale:o,passwordSettings:a}=t;if(e?.[0]?.code==="form_password_size_in_bytes_exceeded"||e?.[0]?.code==="form_password_pwned"||e?.[0]?.code==="form_new_password_matches_current")return`${r((0,n.G)(`unstable__errors.${e?.[0]?.code}`))||e?.[0]?.message}`;if(e?.[0]?.code==="form_password_not_strong_enough"){let t=e[0].meta?.zxcvbn?.suggestions?.map(e=>r((0,n.G)(`unstable__errors.zxcvbn.suggestions.${e.code}`))).join(" ");return`${r((0,n.G)("unstable__errors.zxcvbn.notEnough"))} ${t}`}let s=e.filter(e=>"form_password_length_too_short"===e.code),c=l((s.length?s:e).map(e=>{let t={form_password_length_too_long:["unstable__errors.passwordComplexity.maximumLength","length",a.max_length],form_password_length_too_short:["unstable__errors.passwordComplexity.minimumLength","length",a.min_length],form_password_no_uppercase:"unstable__errors.passwordComplexity.requireUppercase",form_password_no_lowercase:"unstable__errors.passwordComplexity.requireLowercase",form_password_no_number:"unstable__errors.passwordComplexity.requireNumbers",form_password_no_special_char:"unstable__errors.passwordComplexity.requireSpecialCharacter"}[e.code];if(Array.isArray(t)){let[e,o,a]=t;return r((0,n.G)(e,{[o]:a}))}return r((0,n.G)(t))}),o);return i(`${r((0,n.G)("unstable__errors.passwordComplexity.sentencePrefix"))} ${c}`)},i=e=>e?e.endsWith(".")?e:`${e}.`:"",l=(e,t)=>(0,o.bI)(t)?new Intl.ListFormat(t,{style:"long",type:"conjunction"}).format(e):e.join(", ")},7651:function(e,t,r){r.d(t,{Mz:()=>p,Om:()=>d,TV:()=>m,Xd:()=>c,eL:()=>a,n4:()=>i,sH:()=>l});var n=r(1820);let o={};function a(e,t="us"){if(o[e=e||t])return o[e];let r=String.fromCodePoint(...[...e.toUpperCase()].map(e=>e.codePointAt(0)+127397));return o[e]=r,r}function i(e,t,r){var n;if(!e||!t)return e;let o=[...l(e)].slice(0,15-((n=(n=r)||"1").includes("+")?n:"+"+n).length);if(o.length<=3)return o.join("");let a="";for(let e=0;o.length>0;e++)e>t.length-1?a+=o.shift():a+="."===t[e]?o.shift():t[e];return a}function l(e){return(e||"").replace(/[^\d]/g,"")}function s(e,t){if(!e||!n.nU.get(e)||!t)return!1;let r=t[0],o=t.substring(1,4);return r===n.nU.get(e)?.code&&t.length-1===((n.nU.get(e)?.pattern||"").match(/\./g)||[]).length&&n.mK[e].has(o)}function c(e){let t=l(e),r=function(e,t="us"){let r=l(e);return!r||r.length<4?t:r.startsWith("1")&&s("us",r)?"us":r.startsWith("1")&&s("ca",r)?"ca":p(r).country.iso}(t),o=n.nU.get(r)?.pattern||"",a=n.nU.get(r)?.code||"",c=t.slice(a.length),d=`+${a} ${i(c,o,a)}`;return{iso:r,pattern:o,code:a,number:c,formattedNumberWithCode:d}}function d(e){let t=c(e);return`+${t.code} ${i(t.number,t.pattern,t.code)}`}let u=(e,t)=>t.priority-e.priority;function p(e){let t=l(e),r=[];for(let e of[4,3,2,1]){let o=t.substring(0,e),a=n.zh.get(o)||[];a.length&&r.push(...a)}let o=n.nU.get("us"),a=r.sort(u)[0]||o;return{number:t.slice(a?.code.length||0),country:a}}function m(e,t){if(!t)return null;let{country:r}=p(e);return t[r.iso.toUpperCase()]||null}},3907:function(e,t,r){r.d(t,{w:()=>o});var n=r(4653);let o=e=>(0,n.t)()||e.sdkMetadata?.environment==="development"},5845:function(e,t,r){r.d(t,{K:()=>o});var n=r(4173);let o=e=>{if(!e)throw Error("Clerk: URL is required for custom links");return(0,n.AY)(e)||"/"===e.charAt(0)?e:`/${e}`}},6735:function(e,t,r){r.d(t,{y:()=>n});let n=e=>new Promise(t=>setTimeout(t,e))},7198:function(e,t,r){r.d(t,{f:()=>o});var n=r(2861);function o(e){let t=new Date,r=new Date(e);if(isNaN(r.getTime()))return"";let o=Math.floor((t.getTime()-r.getTime())/1e3);if(o<60)return(0,n.G)("apiKeys.lastUsed__seconds",{seconds:o});let a=Math.floor(o/60);if(a<60)return(0,n.G)("apiKeys.lastUsed__minutes",{minutes:a});let i=Math.floor(a/60);if(i<24)return(0,n.G)("apiKeys.lastUsed__hours",{hours:i});let l=Math.floor(i/24);if(l<30)return(0,n.G)("apiKeys.lastUsed__days",{days:l});let s=Math.floor(l/30);if(s<12)return(0,n.G)("apiKeys.lastUsed__months",{months:s});let c=Math.floor(s/12);return(0,n.G)("apiKeys.lastUsed__years",{years:c})}},9606:function(e,t,r){r.d(t,{W:()=>n});function n(e,t=20,r=5){if(!e||e.length<=t)return e;if(t<=r+3)return"..."+e.slice(-r);let o=Array.from(e);return o.length<=t?e:o.slice(0,t-r-3).join("")+"..."+o.slice(-r).join("")}},8640:function(e,t,r){r.d(t,{eW:()=>d,mK:()=>c,tJ:()=>s});var n=r(5074),o=r(4317),a=r(78);let i=e=>e.trim(),l=(e,t)=>{let r=e;for(let e=0;e<t.length;e++)r=t[e](r);return r},s=(e,t,r)=>{let o=r||{type:"text",label:"",isRequired:!1,placeholder:"",options:[],defaultChecked:!1},s=[];o.transformer&&s.push(o.transformer),"email"===o.type&&s.push(i);let{translateError:c,t:d}=(0,a._)(),[u,p]=(0,n.useState)(l(t,s)),[m,h]=(0,n.useState)(!1),[f,g]=(0,n.useState)(o?.defaultChecked||!1),[b,v]=(0,n.useState)(!1),[y,w]=(0,n.useState)({message:"",type:"info"}),$=e=>{w({message:c(e),type:"error"})},{defaultChecked:x,validatePassword:_,buildErrorMessage:S,...k}=o,C={id:e,name:e,value:u,checked:f,setSuccess:e=>{w({message:e,type:"success"})},setError:$,onChange:e=>o?.type==="checkbox"?g(e.target.checked):p(l(e.target.value||"",s)),onBlur:()=>{h(!1)},onFocus:()=>{h(!0)},setWarning:e=>{w({message:c(e),type:"warning"})},feedback:y.message||d(o.infoText),feedbackType:y.type,setInfo:e=>{w({message:e,type:"info"})},clearFeedback:()=>{w({message:"",type:"info"})},hasPassedComplexity:b,setHasPassedComplexity:v,validatePassword:"password"===o.type?o.validatePassword:void 0,isFocused:m,...k};return{props:C,...C,buildErrorMessage:S,setError:$,setValue:e=>p(e||""),setChecked:e=>g(e)}},c=e=>{let t={};return e.forEach(e=>{t[e.id]="checkbox"!==e.type?e.value:e.checked}),t},d=e=>{let{feedback:t="",delayInMs:r=100,feedbackType:n="info",isFocused:a=!1}=e||{},i=!a&&["info","warning"].includes(n);return{debounced:(0,o.d)({feedback:i?"":t,feedbackType:i?"info":n},r)}}},4557:function(e,t,r){r.d(t,{Z:()=>i});var n=r(2861);let o="form_username_invalid_length",a="form_username_needs_non_number_char",i=(e,t)=>{let{t:r,usernameSettings:i}=t,l=e[0];return t?l?.code===o?r((0,n.G)(`unstable__errors.${o}`,{min_length:i.min_length,max_length:i.max_length})):l?.code===a?r((0,n.G)(`unstable__errors.${a}`)):l:l}},9236:function(e,t,r){r.d(t,{f:()=>a});var n=r(3610),o=r(4468);let a=(e,t)=>{if((0,n.$R)(e)&&e.errors?.[0]?.meta?.paramName==="identifier"&&e.errors?.[0]?.code==="form_param_nil"){let e=new n.cR("A Web3 Wallet extension cannot be found. Please install one to continue.",{code:"web3_missing_identifier"});return(0,o.H4)(e,[],t)}return(0,o.H4)(e,[],t)}},1652:function(e,t,r){r.d(t,{c:()=>n,y:()=>o});let n=[{channel:"whatsapp",name:"WhatsApp"}],o=e=>e&&n.find(t=>t.channel===e)||null},6435:function(e,t,r){r.d(t,{l:()=>o,n:()=>n});let n=[".lcl.dev",".stg.dev",".lclstage.dev",".stgstage.dev",".dev.lclclerk.com",".stg.lclclerk.com",".accounts.lclclerk.com","accountsstage.dev","accounts.dev"];function o(e,t="svg"){return`https://img.clerk.com/static/${e}.${t}`}},6988:function(e,t,r){function n(e){try{return new Date(e||new Date)}catch{return new Date}}function o(e){let{date:t,relativeTo:r}=e;if(!t||!r)return null;let o=n(t),a=function(e,t,{absolute:r=!0}={}){if(!e||!t)return 0;let n=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),o=Math.floor((Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-n)/864e5);return r?Math.abs(o):o}(n(r),o,{absolute:!1});return a<-6?{relativeDateCase:"other",date:o}:a<-1?{relativeDateCase:"previous6Days",date:o}:-1===a?{relativeDateCase:"lastDay",date:o}:0===a?{relativeDateCase:"sameDay",date:o}:1===a?{relativeDateCase:"nextDay",date:o}:a<7?{relativeDateCase:"next6Days",date:o}:{relativeDateCase:"other",date:o}}r.d(t,{OG:()=>n,om:()=>o})},2522:function(e,t,r){function n(e){return function(t){let r=t??this;if(!r)throw TypeError(`${e.kind||e.name} type guard requires an error object`);return!!e.kind&&"object"==typeof r&&null!==r&&"constructor"in r&&r.constructor?.kind===e.kind||r instanceof e}}r.d(t,{S:()=>i,a:()=>p,c:()=>b,f:()=>f,h:()=>u,i:()=>v,l:()=>g,m:()=>d,o:()=>h,u:()=>m,v:()=>c,y:()=>s});var o=class{static kind="ClerkAPIError";code;message;longMessage;meta;constructor(e){const t={code:e.code,message:e.message,longMessage:e.long_message,meta:{paramName:e.meta?.param_name,sessionId:e.meta?.session_id,emailAddresses:e.meta?.email_addresses,identifiers:e.meta?.identifiers,zxcvbn:e.meta?.zxcvbn,plan:e.meta?.plan,isPlanUpgradePossible:e.meta?.is_plan_upgrade_possible}};this.code=t.code,this.message=t.message,this.longMessage=t.longMessage,this.meta=t.meta}};n(o);var a=class e extends Error{static kind="ClerkError";clerkError=!0;code;longMessage;docsUrl;cause;get name(){return this.constructor.name}constructor(t){super(new.target.formatMessage(new.target.kind,t.message,t.code,t.docsUrl),{cause:t.cause}),Object.setPrototypeOf(this,e.prototype),this.code=t.code,this.docsUrl=t.docsUrl,this.longMessage=t.longMessage,this.cause=t.cause}toString(){return`[${this.name}]
119
119
  Message:${this.message}`}static formatMessage(e,t,r,n){let o="Clerk:",a=RegExp(o.replace(" ","\\s*"),"i");return t=t.replace(a,""),t=`${o} ${t.trim()}
120
120
 
121
121
  (code="${r}")
122
122
 
123
123
  `,n&&(t+=`
124
124
 
125
- Docs: ${n}`),t}};n(class e extends a{static kind="ClerkAPIResponseError";status;clerkTraceId;retryAfter;errors;constructor(t,r){const{data:n,status:a,clerkTraceId:i,retryAfter:l}=r;super({...r,message:t,code:"api_response_error"}),Object.setPrototypeOf(this,e.prototype),this.status=a,this.clerkTraceId=i,this.retryAfter=l,this.errors=(n||[]).map(e=>new o(e))}toString(){let e=`[${this.name}]
125
+ Docs: ${n}`),t}};let i=n(class e extends a{static kind="ClerkAPIResponseError";status;clerkTraceId;retryAfter;errors;constructor(t,r){const{data:n,status:a,clerkTraceId:i,retryAfter:l}=r;super({...r,message:t,code:"api_response_error"}),Object.setPrototypeOf(this,e.prototype),this.status=a,this.clerkTraceId=i,this.retryAfter=l,this.errors=(n||[]).map(e=>new o(e))}toString(){let e=`[${this.name}]
126
126
  Message:${this.message}
127
127
  Status:${this.status}
128
128
  Serialized errors: ${this.errors.map(e=>JSON.stringify(e))}`;return this.clerkTraceId&&(e+=`
129
- Clerk Trace ID: ${this.clerkTraceId}`),e}static formatMessage(e,t,r,n){return t}});let i=Object.freeze({InvalidProxyUrlErrorMessage:"The proxyUrl passed to Clerk is invalid. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})",MissingPublishableKeyErrorMessage:"Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingSecretKeyErrorMessage:"Missing secretKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingClerkProvider:"{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider"});function l({packageName:e,customMessages:t}){let r=e;function n(e,t){if(!t)return`${r}: ${e}`;let n=e;for(let r of e.matchAll(/{{([a-zA-Z0-9-_]+)}}/g)){let e=(t[r[1]]||"").toString();n=n.replace(`{{${r[1]}}}`,e)}return`${r}: ${n}`}let o={...i,...t};return{setPackageName({packageName:e}){return"string"==typeof e&&(r=e),this},setMessages({customMessages:e}){return Object.assign(o,e||{}),this},throwInvalidPublishableKeyError(e){throw Error(n(o.InvalidPublishableKeyErrorMessage,e))},throwInvalidProxyUrl(e){throw Error(n(o.InvalidProxyUrlErrorMessage,e))},throwMissingPublishableKeyError(){throw Error(n(o.MissingPublishableKeyErrorMessage))},throwMissingSecretKeyError(){throw Error(n(o.MissingSecretKeyErrorMessage))},throwMissingClerkProviderError(e){throw Error(n(o.MissingClerkProvider,e))},throw(e){throw Error(n(e))}}}let s={Expired:"expired",Failed:"failed",ClientMismatch:"client_mismatch"};var c=class e extends a{static kind="ClerkRuntimeError";clerkRuntimeError=!0;constructor(t,r){super({...r,message:t}),Object.setPrototypeOf(this,e.prototype)}};function d(e){return u(e)||h(e)||p(e)}function u(e){return e&&"clerkError"in e}function p(e){return"clerkRuntimeError"in e}function m(e){return p(e)&&"reverification_cancelled"===e.code}function h(e){return"code"in e&&[4001,32602,32603].includes(e.code)&&"message"in e}function f(e){return u(e)&&e.errors?.[0]?.code==="user_locked"}function g(e){return u(e)&&e.errors?.[0]?.code==="form_password_pwned"}function b(e){return u(e)&&e.errors?.[0]?.code==="form_password_compromised"}function v(e){return"EmailLinkError"===e.name}n(c)},3610:function(e,t,r){r.d(t,{$R:()=>n.i,Au:()=>n.d,Cm:()=>n.a,I3:()=>n.f,_d:()=>n.m,cR:()=>n.g,hl:()=>n.o,kl:()=>n.y,qY:()=>n.u,si:()=>n.c,ux:()=>n.s});var n=r(5273)},4076:function(e,t,r){let n,o;r.d(t,{getWallets:()=>d});var a,i=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},l=function(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r};let s=new Set,c={};function d(){if(o||(o=Object.freeze({register:u,get:p,on:m}),"undefined"==typeof window))return o;let e=Object.freeze({register:u});try{window.addEventListener("wallet-standard:register-wallet",({detail:t})=>t(e))}catch(e){console.error("wallet-standard:register-wallet event listener could not be added\n",e)}try{window.dispatchEvent(new f(e))}catch(e){console.error("wallet-standard:app-ready event could not be dispatched\n",e)}return o}function u(...e){return(e=e.filter(e=>!s.has(e))).length?(e.forEach(e=>{n=void 0,s.add(e)}),c.register?.forEach(t=>h(()=>t(...e))),function(){e.forEach(e=>{n=void 0,s.delete(e)}),c.unregister?.forEach(t=>h(()=>t(...e)))}):()=>{}}function p(){return n||(n=[...s]),n}function m(e,t){return c[e]?.push(t)||(c[e]=[t]),function(){c[e]=c[e]?.filter(e=>t!==e)}}function h(e){try{e()}catch(e){console.error(e)}}var f=class extends Event{get detail(){return i(this,a,"f")}get type(){return"wallet-standard:app-ready"}constructor(e){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),a.set(this,void 0),l(this,a,e,"f")}preventDefault(){throw Error("preventDefault cannot be called")}stopImmediatePropagation(){throw Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw Error("stopPropagation cannot be called")}};a=new WeakMap},212:function(e,t,r){r.d(t,{t:()=>o});var n=r(1006);let o={toRegexp:e=>{try{return n(e)}catch(t){throw Error(`Invalid pattern: ${e}.
129
+ Clerk Trace ID: ${this.clerkTraceId}`),e}static formatMessage(e,t,r,n){return t}}),l=Object.freeze({InvalidProxyUrlErrorMessage:"The proxyUrl passed to Clerk is invalid. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})",MissingPublishableKeyErrorMessage:"Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingSecretKeyErrorMessage:"Missing secretKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingClerkProvider:"{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider"});function s({packageName:e,customMessages:t}){let r=e;function n(e,t){if(!t)return`${r}: ${e}`;let n=e;for(let r of e.matchAll(/{{([a-zA-Z0-9-_]+)}}/g)){let e=(t[r[1]]||"").toString();n=n.replace(`{{${r[1]}}}`,e)}return`${r}: ${n}`}let o={...l,...t};return{setPackageName({packageName:e}){return"string"==typeof e&&(r=e),this},setMessages({customMessages:e}){return Object.assign(o,e||{}),this},throwInvalidPublishableKeyError(e){throw Error(n(o.InvalidPublishableKeyErrorMessage,e))},throwInvalidProxyUrl(e){throw Error(n(o.InvalidProxyUrlErrorMessage,e))},throwMissingPublishableKeyError(){throw Error(n(o.MissingPublishableKeyErrorMessage))},throwMissingSecretKeyError(){throw Error(n(o.MissingSecretKeyErrorMessage))},throwMissingClerkProviderError(e){throw Error(n(o.MissingClerkProvider,e))},throw(e){throw Error(n(e))}}}let c={Expired:"expired",Failed:"failed",ClientMismatch:"client_mismatch"};var d=class e extends a{static kind="ClerkRuntimeError";clerkRuntimeError=!0;constructor(t,r){super({...r,message:t}),Object.setPrototypeOf(this,e.prototype)}};let u=n(d);function p(e){return i(e)||h(e)||u(e)}function m(e){return u(e)&&"reverification_cancelled"===e.code}function h(e){return"code"in e&&[4001,32602,32603].includes(e.code)&&"message"in e}function f(e){return i(e)&&e.errors?.[0]?.code==="user_locked"}function g(e){return i(e)&&e.errors?.[0]?.code==="form_password_pwned"}function b(e){return i(e)&&e.errors?.[0]?.code==="form_password_compromised"}function v(e){return"EmailLinkError"===e.name}},3610:function(e,t,r){r.d(t,{$R:()=>n.S,Au:()=>n.l,Cm:()=>n.h,I3:()=>n.u,_d:()=>n.f,cR:()=>n.m,hl:()=>n.i,kl:()=>n.v,qY:()=>n.c,si:()=>n.o,ux:()=>n.a});var n=r(2522)},4076:function(e,t,r){let n,o;r.d(t,{getWallets:()=>d});var a,i=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},l=function(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r};let s=new Set,c={};function d(){if(o||(o=Object.freeze({register:u,get:p,on:m}),"undefined"==typeof window))return o;let e=Object.freeze({register:u});try{window.addEventListener("wallet-standard:register-wallet",({detail:t})=>t(e))}catch(e){console.error("wallet-standard:register-wallet event listener could not be added\n",e)}try{window.dispatchEvent(new f(e))}catch(e){console.error("wallet-standard:app-ready event could not be dispatched\n",e)}return o}function u(...e){return(e=e.filter(e=>!s.has(e))).length?(e.forEach(e=>{n=void 0,s.add(e)}),c.register?.forEach(t=>h(()=>t(...e))),function(){e.forEach(e=>{n=void 0,s.delete(e)}),c.unregister?.forEach(t=>h(()=>t(...e)))}):()=>{}}function p(){return n||(n=[...s]),n}function m(e,t){return c[e]?.push(t)||(c[e]=[t]),function(){c[e]=c[e]?.filter(e=>t!==e)}}function h(e){try{e()}catch(e){console.error(e)}}var f=class extends Event{get detail(){return i(this,a,"f")}get type(){return"wallet-standard:app-ready"}constructor(e){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),a.set(this,void 0),l(this,a,e,"f")}preventDefault(){throw Error("preventDefault cannot be called")}stopImmediatePropagation(){throw Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw Error("stopPropagation cannot be called")}};a=new WeakMap},212:function(e,t,r){r.d(t,{t:()=>o});var n=r(1006);let o={toRegexp:e=>{try{return n(e)}catch(t){throw Error(`Invalid pattern: ${e}.
130
130
  Consult the documentation of glob-to-regexp here: https://www.npmjs.com/package/glob-to-regexp.
131
- ${t.message}`)}}}},1687:function(e,t,r){r.d(t,{A:()=>o});var n=r(4670);let o=({signUp:e,verifyEmailPath:t,verifyPhonePath:r,continuePath:o,navigate:a,handleComplete:i,redirectUrl:l="",redirectUrlComplete:s="",oidcPrompt:c})=>{if("complete"===e.status)return i&&i();if("missing_requirements"===e.status){if(e.missingFields.some(e=>"enterprise_sso"===e))return e.authenticateWithRedirect({strategy:"enterprise_sso",redirectUrl:l,redirectUrlComplete:s,continueSignUp:!0,oidcPrompt:c});let i=(0,n.t)();if(e.unverifiedFields?.includes("email_address")&&t)return a(t,{searchParams:i});if(e.unverifiedFields?.includes("phone_number")&&r)return a(r,{searchParams:i});if(o)return a(o,{searchParams:i})}}},1841:function(e,t,r){r.d(t,{B_:()=>o,NW:()=>a,Xu:()=>n,s$:()=>l,ui:()=>i});let n=(e,t)=>!!(e.isSignedIn&&t?.authConfig.singleSessionMode),o=(e,t)=>!t?.commerceSettings.billing.user.enabled,a=(e,t)=>!t?.commerceSettings.billing.organization.enabled,i=(e,t)=>!t?.apiKeysSettings?.user_api_keys_enabled,l=(e,t)=>!t?.apiKeysSettings?.orgs_api_keys_enabled},6739:function(e,t,r){r.d(t,{n:()=>n});function n(e){return"string"==typeof e&&e.startsWith("org_")}},5653:function(e,t,r){r.d(t,{sv:()=>o}),r(5273);var n=class{static encode(e){return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}static decode(e){let t=atob(e.replace(/-/g,"+").replace(/_/g,"/")),r=t.length,n=new Uint8Array(r);for(let e=0;e<r;e++)n[e]=t.charCodeAt(e);return n.buffer}};let o=new class{controller;__abort(){if(!this.controller)return;let e=Error();e.name="AbortError",this.controller.abort(e)}createAbortSignal(){this.__abort();let e=new AbortController;return this.controller=e,e.signal}abort(){this.__abort(),this.controller=void 0}};n.encode.bind(n),n.decode.bind(n)},8380:function(e,t,r){r.d(t,{n:()=>l}),r(212),r(4210);let n=(e,t)=>{let r={};for(let n in e)r[n]=t(e[n],n);return r},o=(e,t)=>{let r={};for(let n in e)e[n]&&t(e[n])&&(r[n]=e[n]);return r};var a=r(1302);r(2779);var i=r(6308),l=class e{static keys=["signInForceRedirectUrl","signInFallbackRedirectUrl","signUpForceRedirectUrl","signUpFallbackRedirectUrl","redirectUrl"];static preserved=["redirectUrl"];options;fromOptions;fromProps;fromSearchParams;mode;constructor(e,t={},r={},n){this.options=e,this.fromOptions=this.#e(e||{}),this.fromProps=this.#e(t||{}),this.fromSearchParams=this.#t(r||{}),this.mode=n}getAfterSignInUrl(){return this.#r("signIn")}getAfterSignUpUrl(){return this.#r("signUp")}getPreservedSearchParams(){return this.#n(this.#o())}toSearchParams(){return this.#n(this.#a())}#n(e){return new URLSearchParams(Object.entries(Object.fromEntries(Object.entries(e).map(([e,t])=>[(0,a.t)(e),t]))).reduce((e,[t,r])=>(null!=r&&(e[t]=r),e),{}))}#o(){return Object.fromEntries(Object.entries({...this.fromSearchParams}).filter(([t])=>e.preserved.includes(t)))}#a(){let e=this.fromSearchParams.signUpForceRedirectUrl||this.fromProps.signUpForceRedirectUrl||this.fromOptions.signUpForceRedirectUrl,t=this.fromSearchParams.signUpFallbackRedirectUrl||this.fromProps.signUpFallbackRedirectUrl||this.fromOptions.signUpFallbackRedirectUrl,r=this.fromSearchParams.signInForceRedirectUrl||this.fromProps.signInForceRedirectUrl||this.fromOptions.signInForceRedirectUrl,n={signUpForceRedirectUrl:e,signUpFallbackRedirectUrl:t,signInFallbackRedirectUrl:this.fromSearchParams.signInFallbackRedirectUrl||this.fromProps.signInFallbackRedirectUrl||this.fromOptions.signInFallbackRedirectUrl,signInForceRedirectUrl:r,redirectUrl:this.fromSearchParams.redirectUrl};return e&&delete n.signUpFallbackRedirectUrl,r&&delete n.signInFallbackRedirectUrl,n}#r(e){let t,r=`${e}ForceRedirectUrl`,n=`${e}FallbackRedirectUrl`;return(t=this.fromSearchParams[r]||this.fromProps[r]||this.fromOptions[r],t||=this.fromSearchParams.redirectUrl,(t||=this.fromSearchParams[n]||this.fromProps[n]||this.fromOptions[n])||"modal"!==this.mode)?t||"/":window.location.href}#e(t){let r={};return e.keys.forEach(e=>{r[e]=t[e]}),n(this.#i(this.#l(o(r,Boolean))),e=>e.toString())}#t(t){let r={};return e.keys.forEach(e=>{t instanceof URLSearchParams?r[e]=t.get((0,a.t)(e)):r[e]=t[(0,a.t)(e)]}),n(this.#i(this.#l(o(r,Boolean))),e=>e.toString())}#l(e){return n(e,e=>(0,i.v)(e,window.location.origin))}#i=e=>o(e,(0,i.l)(this.options?.allowedRedirectOrigins,window.location.origin))}},5580:function(e,t,r){r.d(t,{KA:()=>l,ru:()=>i,tk:()=>a}),r(212),r(4210),r(1302);var n=r(4670);r(2779);var o=r(6308);let a={"choose-organization":"choose-organization","reset-password":"reset-password"},i=e=>`/tasks/${a[e.key]}`;function l(e,{navigate:t,baseUrl:r}){let a=e.currentTask;if(a){var l;let e;return t((l={base:r},e=(0,n.t)(),(0,o.t)({base:l.base,hashPath:i(a),searchParams:e},{stringify:!0})))}}},4173:function(e,t,r){r.d(t,{AY:()=>n.h,FV:()=>n.x,Kj:()=>n.w,V0:()=>n.u,d3:()=>n.b,kZ:()=>n.t,tL:()=>n.c,vU:()=>n.l,yR:()=>n.g,yY:()=>n._}),r(212),r(4210),r(1302),r(2779);var n=r(6308)},8095:function(e,t,r){r.d(t,{Cm:()=>a,IM:()=>o,dS:()=>n});let n=({firstName:e,lastName:t,name:r})=>r||[e,t].join(" ").trim()||"",o=({firstName:e,lastName:t,name:r})=>[(e||"")[0],(t||"")[0]].join("").trim()||(r||"")[0],a=e=>e.username?e.username:e.primaryEmailAddress?e.primaryEmailAddress.emailAddress:e.primaryPhoneNumber?e.primaryPhoneNumber.phoneNumber:e.primaryWeb3Wallet?e.primaryWeb3Wallet.web3Wallet:""},2049:function(e,t,r){r.d(t,{A:()=>o});let n=e=>`🔒 Clerk:
131
+ ${t.message}`)}}}},1687:function(e,t,r){r.d(t,{A:()=>o});var n=r(4670);let o=({signUp:e,verifyEmailPath:t,verifyPhonePath:r,continuePath:o,navigate:a,handleComplete:i,redirectUrl:l="",redirectUrlComplete:s="",oidcPrompt:c})=>{if("complete"===e.status)return i&&i();if("missing_requirements"===e.status){if(e.missingFields.some(e=>"enterprise_sso"===e))return e.authenticateWithRedirect({strategy:"enterprise_sso",redirectUrl:l,redirectUrlComplete:s,continueSignUp:!0,oidcPrompt:c});let i=(0,n.t)();if(e.unverifiedFields?.includes("email_address")&&t)return a(t,{searchParams:i});if(e.unverifiedFields?.includes("phone_number")&&r)return a(r,{searchParams:i});if(o)return a(o,{searchParams:i})}}},1841:function(e,t,r){r.d(t,{B_:()=>o,NW:()=>a,Xu:()=>n,s$:()=>l,ui:()=>i});let n=(e,t)=>!!(e.isSignedIn&&t?.authConfig.singleSessionMode),o=(e,t)=>!t?.commerceSettings.billing.user.enabled,a=(e,t)=>!t?.commerceSettings.billing.organization.enabled,i=(e,t)=>!t?.apiKeysSettings?.user_api_keys_enabled,l=(e,t)=>!t?.apiKeysSettings?.orgs_api_keys_enabled},6739:function(e,t,r){r.d(t,{n:()=>n});function n(e){return"string"==typeof e&&e.startsWith("org_")}},5653:function(e,t,r){r.d(t,{sv:()=>o}),r(2522);var n=class{static encode(e){return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}static decode(e){let t=atob(e.replace(/-/g,"+").replace(/_/g,"/")),r=t.length,n=new Uint8Array(r);for(let e=0;e<r;e++)n[e]=t.charCodeAt(e);return n.buffer}};let o=new class{controller;__abort(){if(!this.controller)return;let e=Error();e.name="AbortError",this.controller.abort(e)}createAbortSignal(){this.__abort();let e=new AbortController;return this.controller=e,e.signal}abort(){this.__abort(),this.controller=void 0}};n.encode.bind(n),n.decode.bind(n)},8380:function(e,t,r){r.d(t,{n:()=>l}),r(212),r(4210);let n=(e,t)=>{let r={};for(let n in e)r[n]=t(e[n],n);return r},o=(e,t)=>{let r={};for(let n in e)e[n]&&t(e[n])&&(r[n]=e[n]);return r};var a=r(1302);r(2779);var i=r(6308),l=class e{static keys=["signInForceRedirectUrl","signInFallbackRedirectUrl","signUpForceRedirectUrl","signUpFallbackRedirectUrl","redirectUrl"];static preserved=["redirectUrl"];options;fromOptions;fromProps;fromSearchParams;mode;constructor(e,t={},r={},n){this.options=e,this.fromOptions=this.#e(e||{}),this.fromProps=this.#e(t||{}),this.fromSearchParams=this.#t(r||{}),this.mode=n}getAfterSignInUrl(){return this.#r("signIn")}getAfterSignUpUrl(){return this.#r("signUp")}getPreservedSearchParams(){return this.#n(this.#o())}toSearchParams(){return this.#n(this.#a())}#n(e){return new URLSearchParams(Object.entries(Object.fromEntries(Object.entries(e).map(([e,t])=>[(0,a.t)(e),t]))).reduce((e,[t,r])=>(null!=r&&(e[t]=r),e),{}))}#o(){return Object.fromEntries(Object.entries({...this.fromSearchParams}).filter(([t])=>e.preserved.includes(t)))}#a(){let e=this.fromSearchParams.signUpForceRedirectUrl||this.fromProps.signUpForceRedirectUrl||this.fromOptions.signUpForceRedirectUrl,t=this.fromSearchParams.signUpFallbackRedirectUrl||this.fromProps.signUpFallbackRedirectUrl||this.fromOptions.signUpFallbackRedirectUrl,r=this.fromSearchParams.signInForceRedirectUrl||this.fromProps.signInForceRedirectUrl||this.fromOptions.signInForceRedirectUrl,n={signUpForceRedirectUrl:e,signUpFallbackRedirectUrl:t,signInFallbackRedirectUrl:this.fromSearchParams.signInFallbackRedirectUrl||this.fromProps.signInFallbackRedirectUrl||this.fromOptions.signInFallbackRedirectUrl,signInForceRedirectUrl:r,redirectUrl:this.fromSearchParams.redirectUrl};return e&&delete n.signUpFallbackRedirectUrl,r&&delete n.signInFallbackRedirectUrl,n}#r(e){let t,r=`${e}ForceRedirectUrl`,n=`${e}FallbackRedirectUrl`;return(t=this.fromSearchParams[r]||this.fromProps[r]||this.fromOptions[r],t||=this.fromSearchParams.redirectUrl,(t||=this.fromSearchParams[n]||this.fromProps[n]||this.fromOptions[n])||"modal"!==this.mode)?t||"/":window.location.href}#e(t){let r={};return e.keys.forEach(e=>{r[e]=t[e]}),n(this.#i(this.#l(o(r,Boolean))),e=>e.toString())}#t(t){let r={};return e.keys.forEach(e=>{t instanceof URLSearchParams?r[e]=t.get((0,a.t)(e)):r[e]=t[(0,a.t)(e)]}),n(this.#i(this.#l(o(r,Boolean))),e=>e.toString())}#l(e){return n(e,e=>(0,i.v)(e,window.location.origin))}#i=e=>o(e,(0,i.l)(this.options?.allowedRedirectOrigins,window.location.origin))}},5580:function(e,t,r){r.d(t,{KA:()=>l,ru:()=>i,tk:()=>a}),r(212),r(4210),r(1302);var n=r(4670);r(2779);var o=r(6308);let a={"choose-organization":"choose-organization","reset-password":"reset-password"},i=e=>`/tasks/${a[e.key]}`;function l(e,{navigate:t,baseUrl:r}){let a=e.currentTask;if(a){var l;let e;return t((l={base:r},e=(0,n.t)(),(0,o.t)({base:l.base,hashPath:i(a),searchParams:e},{stringify:!0})))}}},4173:function(e,t,r){r.d(t,{AY:()=>n.h,FV:()=>n.x,Kj:()=>n.w,V0:()=>n.u,d3:()=>n.b,kZ:()=>n.t,tL:()=>n.c,vU:()=>n.l,yR:()=>n.g,yY:()=>n._}),r(212),r(4210),r(1302),r(2779);var n=r(6308)},8095:function(e,t,r){r.d(t,{Cm:()=>a,IM:()=>o,dS:()=>n});let n=({firstName:e,lastName:t,name:r})=>r||[e,t].join(" ").trim()||"",o=({firstName:e,lastName:t,name:r})=>[(e||"")[0],(t||"")[0]].join("").trim()||(r||"")[0],a=e=>e.username?e.username:e.primaryEmailAddress?e.primaryEmailAddress.emailAddress:e.primaryPhoneNumber?e.primaryPhoneNumber.phoneNumber:e.primaryWeb3Wallet?e.primaryWeb3Wallet.web3Wallet:""},2049:function(e,t,r){r.d(t,{A:()=>o});let n=e=>`🔒 Clerk:
132
132
  ${e.trim()}
133
- (This notice only appears in development)`,o={cannotRenderComponentWhenSessionExists:"The <SignUp/> and <SignIn/> components cannot render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the Home URL instead.",cannotRenderSignUpComponentWhenSessionExists:"The <SignUp/> component cannot render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the value set in `afterSignUp` URL instead.",cannotRenderSignUpComponentWhenTaskExists:"The <SignUp/> component cannot render when a user has a pending task, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the task instead.",cannotRenderComponentWhenTaskDoesNotExist:"<TaskChooseOrganization/> cannot render unless a session task is pending. Clerk is redirecting to the value set in `redirectUrlComplete` instead.",cannotRenderSignInComponentWhenSessionExists:"The <SignIn/> component cannot render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the `afterSignIn` URL instead.",cannotRenderSignInComponentWhenTaskExists:"The <SignIn/> component cannot render when a user has a pending task, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the task instead.",cannotRenderComponentWhenUserDoesNotExist:"<UserProfile/> cannot render unless a user is signed in. Since no user is signed in, this is no-op.",cannotRenderComponentWhenOrgDoesNotExist:"<OrganizationProfile/> cannot render unless an organization is active. Since no organization is currently active, this is no-op.",cannotRenderAnyOrganizationComponent:e=>n(`The <${e}/> cannot be rendered when the feature is turned off. Visit 'dashboard.clerk.com' to enable the feature. Since the feature is turned off, this is no-op.`),cannotRenderAnyBillingComponent:e=>n(`The <${e}/> component cannot be rendered when billing is disabled. Visit 'https://dashboard.clerk.com/last-active?path=billing/settings' to follow the necessary steps to enable billing. Since billing is disabled, this is no-op.`),cannotOpenUserProfile:"The UserProfile modal cannot render unless a user is signed in. Since no user is signed in, this is no-op.",cannotOpenCheckout:"The Checkout drawer cannot render unless a user is signed in. Since no user is signed in, this is no-op.",cannotOpenSignInOrSignUp:"The SignIn or SignUp modals do not render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, this is no-op.",cannotRenderAPIKeysComponent:"The <APIKeys/> component cannot be rendered when API keys is disabled. Since API keys is disabled, this is no-op.",cannotRenderAPIKeysComponentForOrgWhenUnauthorized:"The <APIKeys/> component cannot be rendered for an organization unless a user has the required permissions. Since the user does not have the necessary permissions, this is no-op.",cannotRenderAPIKeysComponentForUserWhenDisabled:"The <APIKeys/> component cannot be rendered when user API keys are disabled. Since user API keys are disabled, this is no-op.",cannotRenderAPIKeysComponentForOrgWhenDisabled:"The <APIKeys/> component cannot be rendered when organization API keys are disabled. Since organization API keys are disabled, this is no-op."};for(let e of Object.keys(o)){let t=o[e];"function"!=typeof t&&(o[e]=n(t))}},6463:function(e,t,r){r.d(t,{U:()=>i});var n=r(5273),o=class e{#s=[];#c={metamask:"MetaMask",okx_wallet:"OKX Wallet"};static #d=null;constructor(){if("undefined"==typeof window)return;window.addEventListener("eip6963:announceProvider",this.#u),window.dispatchEvent(new Event("eip6963:requestProvider"))}static getInstance(){return e.#d||(e.#d=new e),e.#d}get=e=>{let t=this.#s.find(t=>t.info.name===this.#c[e])?.provider;return void 0!==t?t:window.ethereum};#u=e=>{this.#s.some(t=>t.info.uuid===e.detail.info.uuid)||this.#s.push(e.detail)}},a=class e{#p=void 0;#m=!1;static #d=null;constructor(){}async #h(){if(this.#m)return;this.#m=!0;let e=await r.e("666").then(r.bind(r,4076)).then(e=>e.getWallets());this.#p=e.get(),e.on("register",()=>{this.#p=e.get()}),e.on("unregister",()=>{this.#p=e.get()})}#f(e){return e.chains?.some(e=>e.startsWith("solana:"))??!1}#g(e){return"solana:signMessage"in e.features}static getInstance(){return e.#d||(e.#d=new e),e.#d}get=async e=>{await this.#h();let t=(this.#p||[]).find(t=>t.name===e&&this.#f(t)&&this.#g(t));if(t&&this.#f(t))return t;if("undefined"==typeof window)return;let r=window.solana;if(r&&"function"==typeof r.connect&&"function"==typeof r.signMessage)return r}};function i(e){let t=(0,n.b)({packageName:"@clerk/shared"});async function r(e){let{provider:t,walletName:r}=e,n=await b(t,r);if(!n)return"";if("solana"===t){let e=await n.features["standard:connect"].connect();return e&&e.accounts[0].address||""}let o=await n.request({method:"eth_requestAccounts"});return o&&o[0]||""}let i=async e=>{let{identifier:t,nonce:r,provider:o,walletName:a=""}=e,i=await b(o,a);if(!i)return"";if("solana"===o)try{let e=i.accounts.find(e=>e.address===t);if(!e)return console.warn(`Wallet account with address ${t} not found`),"";let n=await i.features["solana:signMessage"]?.signMessage({account:e,message:new TextEncoder().encode(r)});return n?.[0]?.signature?btoa(String.fromCharCode(...n[0].signature)):""}catch(e){if(e instanceof Error&&e.message.includes("User rejected the request."))throw new n.g("Web3 signature request was rejected by the user.",{code:"web3_signature_request_rejected"});throw new n.g("An error occurred while generating the Solana signature.",{code:"web3_solana_signature_generation_failed",cause:e instanceof Error?e:void 0})}return await i.request({method:"personal_sign",params:[`0x${r.split("").map(e=>e.charCodeAt(0).toString(16).padStart(2,"0")).join("")}`,t]})};async function l(){return await r({provider:"metamask"})}async function s(){return await r({provider:"coinbase_wallet"})}async function c(){return await r({provider:"okx_wallet"})}async function d(){return await r({provider:"base"})}async function u(e){return await r({provider:"solana",walletName:e})}async function p(e){return await i({...e,provider:"metamask"})}async function m(e){return await i({...e,provider:"coinbase_wallet"})}async function h(e){return await i({...e,provider:"okx_wallet"})}async function f(e){return await i({...e,provider:"base"})}async function g(e){return await i({...e,provider:"solana"})}async function b(r,n){if("coinbase_wallet"===r){let t=await e.import("@coinbase/wallet-sdk");return t?t.createCoinbaseWalletSDK({preference:{options:"all"}}).getProvider():null}if("base"===r)try{let t=await e.import("@base-org/account");if(!t)return null;return t.createBaseAccountSDK({appName:"undefined"!=typeof window&&window.Clerk?.__internal_environment?.displayConfig?.applicationName||"undefined"!=typeof document&&document.title||"Web3 Application"}).getProvider()}catch{return null}return"solana"===r?n&&0!==n.length?await a.getInstance().get(n):void t.throw("Wallet name must be provided to get Solana wallet provider"):o.getInstance().get(r)}return{getWeb3Identifier:r,generateWeb3Signature:i,getMetamaskIdentifier:l,getCoinbaseWalletIdentifier:s,getOKXWalletIdentifier:c,getBaseIdentifier:d,getSolanaIdentifier:u,generateSignatureWithMetamask:p,generateSignatureWithCoinbaseWallet:m,generateSignatureWithOKXWallet:h,generateSignatureWithBase:f,generateSignatureWithSolana:g}}},5483:function(e,t,r){r.d(t,{y7:()=>n});function n(e){let t=new URL(e,window.location.href);window.dispatchEvent(new CustomEvent("clerk:beforeunload")),window.location.href=t.href}},2311:function(e,t,r){r.d(t,{a:()=>a,n:()=>o});var n=r(6435);function o(){let e=new Map;return{isDevOrStagingUrl:t=>{if(!t)return!1;let r="string"==typeof t?t:t.hostname,o=e.get(r);return void 0===o&&(o=n.n.some(e=>r.endsWith(e)),e.set(r,o)),o}}}function a(e){return e.startsWith("test_")||e.startsWith("pk_test_")}},4210:function(e,t,r){r.d(t,{t:()=>o});let n=new Set,o={warnOnce:e=>{n.has(e)||(n.add(e),console.warn(e))},logOnce:e=>{n.has(e)||(console.log(e),n.add(e))}}},2779:function(e,t,r){r.d(t,{t:()=>o});let n=RegExp("/{1,}","g");function o(e,t){return[e,t].filter(e=>e).join("/").replace(n,"/")}},8902:function(e,t,r){r.d(t,{n:()=>o,t:()=>n});let n=e=>{let t={};return new URLSearchParams(e).forEach((e,r)=>{if(r in t){let n=t[r];Array.isArray(n)?n.push(e):t[r]=[n,e]}else t[r]=e}),t},o=(e,t={})=>{if(null==e||!e||"object"!=typeof e)return"";let r=new URLSearchParams;return Object.keys(e).forEach(n=>{let o=t.keyEncoder?t.keyEncoder(n):n,a=e[n];if(Array.isArray(a))a.forEach(e=>void 0!==e&&r.append(o,e||""));else{if(void 0===a)return;"object"==typeof a&&null!==a?r.append(o,JSON.stringify(a)):r.append(o,String(a??""))}}),r.toString()}},1210:function(e,t,r){let n,o;r.d(t,{WD:()=>A,Fm:()=>eh,Rs:()=>k,IC:()=>z,D_:()=>X,kH:()=>ep,Z5:()=>Z,UQ:()=>J,ur:()=>C,Lg:()=>I,ho:()=>K,Jd:()=>er,ED:()=>_,Wp:()=>ea,TS:()=>F,cl:()=>eU,Rx:()=>Y,hZ:()=>N,e3:()=>$,rg:()=>ed,Wf:()=>T,Jl:()=>eH,wV:()=>ee,t7:()=>es,pc:()=>P,hl:()=>eg,tr:()=>el,Dc:()=>ef,_x:()=>w,Tn:()=>eO,X$:()=>ec,Oc:()=>en,v$:()=>em});let a="reverification-error",i={strict_mfa:{afterMinutes:10,level:"multi_factor"},strict:{afterMinutes:10,level:"second_factor"},moderate:{afterMinutes:60,level:"second_factor"},lax:{afterMinutes:1440,level:"second_factor"}},l=new Set(["first_factor","second_factor","multi_factor"]),s=new Set(["strict_mfa","strict","moderate","lax"]);var c,d,u=r(5273);r(1302);var p=r(1483),m=r(6451),h=r(5074),f=r(6651),g=r(1839),b=r(2951),v=r(7447),y=r(5530);function w(e,t){if(!e)throw"string"==typeof t?Error(t):Error(`${t.displayName} not found`)}let $=(e,t)=>{let{assertCtxFn:r=w}=t||{},n=h.createContext(void 0);return n.displayName=e,[n,()=>{let t=h.useContext(n);return r(t,`${e} not found`),t.value},()=>{let e=h.useContext(n);return e?e.value:{}}]};function x({swrConfig:e,children:t}){return h.createElement(f.BE,{value:e},t)}let[_,S]=$("ClerkInstanceContext"),[k,C]=$("UserContext"),[P,A]=$("ClientContext"),[z,I]=$("SessionContext");h.createContext({});let[D,R]=$("CheckoutContext"),Y=({children:e,...t})=>h.createElement(D.Provider,{value:{value:t}},e),[E,T]=$("OrganizationContext"),F=({children:e,organization:t,swrConfig:r})=>h.createElement(x,{swrConfig:r},h.createElement(E.Provider,{value:{value:{organization:t}}},e));function L(e){if(!h.useContext(_)){if("function"==typeof e)return void e();throw Error(`${e} can only be used within the <ClerkProvider /> component.
133
+ (This notice only appears in development)`,o={cannotRenderComponentWhenSessionExists:"The <SignUp/> and <SignIn/> components cannot render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the Home URL instead.",cannotRenderSignUpComponentWhenSessionExists:"The <SignUp/> component cannot render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the value set in `afterSignUp` URL instead.",cannotRenderSignUpComponentWhenTaskExists:"The <SignUp/> component cannot render when a user has a pending task, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the task instead.",cannotRenderComponentWhenTaskDoesNotExist:"<TaskChooseOrganization/> cannot render unless a session task is pending. Clerk is redirecting to the value set in `redirectUrlComplete` instead.",cannotRenderSignInComponentWhenSessionExists:"The <SignIn/> component cannot render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the `afterSignIn` URL instead.",cannotRenderSignInComponentWhenTaskExists:"The <SignIn/> component cannot render when a user has a pending task, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the task instead.",cannotRenderComponentWhenUserDoesNotExist:"<UserProfile/> cannot render unless a user is signed in. Since no user is signed in, this is no-op.",cannotRenderComponentWhenOrgDoesNotExist:"<OrganizationProfile/> cannot render unless an organization is active. Since no organization is currently active, this is no-op.",cannotRenderAnyOrganizationComponent:e=>n(`The <${e}/> cannot be rendered when the feature is turned off. Visit 'dashboard.clerk.com' to enable the feature. Since the feature is turned off, this is no-op.`),cannotRenderAnyBillingComponent:e=>n(`The <${e}/> component cannot be rendered when billing is disabled. Visit 'https://dashboard.clerk.com/last-active?path=billing/settings' to follow the necessary steps to enable billing. Since billing is disabled, this is no-op.`),cannotOpenUserProfile:"The UserProfile modal cannot render unless a user is signed in. Since no user is signed in, this is no-op.",cannotOpenCheckout:"The Checkout drawer cannot render unless a user is signed in. Since no user is signed in, this is no-op.",cannotOpenSignInOrSignUp:"The SignIn or SignUp modals do not render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, this is no-op.",cannotRenderAPIKeysComponent:"The <APIKeys/> component cannot be rendered when API keys is disabled. Since API keys is disabled, this is no-op.",cannotRenderAPIKeysComponentForOrgWhenUnauthorized:"The <APIKeys/> component cannot be rendered for an organization unless a user has the required permissions. Since the user does not have the necessary permissions, this is no-op.",cannotRenderAPIKeysComponentForUserWhenDisabled:"The <APIKeys/> component cannot be rendered when user API keys are disabled. Since user API keys are disabled, this is no-op.",cannotRenderAPIKeysComponentForOrgWhenDisabled:"The <APIKeys/> component cannot be rendered when organization API keys are disabled. Since organization API keys are disabled, this is no-op."};for(let e of Object.keys(o)){let t=o[e];"function"!=typeof t&&(o[e]=n(t))}},6463:function(e,t,r){r.d(t,{U:()=>i});var n=r(2522),o=class e{#s=[];#c={metamask:"MetaMask",okx_wallet:"OKX Wallet"};static #d=null;constructor(){if("undefined"==typeof window)return;window.addEventListener("eip6963:announceProvider",this.#u),window.dispatchEvent(new Event("eip6963:requestProvider"))}static getInstance(){return e.#d||(e.#d=new e),e.#d}get=e=>{let t=this.#s.find(t=>t.info.name===this.#c[e])?.provider;return void 0!==t?t:window.ethereum};#u=e=>{this.#s.some(t=>t.info.uuid===e.detail.info.uuid)||this.#s.push(e.detail)}},a=class e{#p=void 0;#m=!1;static #d=null;constructor(){}async #h(){if(this.#m)return;this.#m=!0;let e=await r.e("666").then(r.bind(r,4076)).then(e=>e.getWallets());this.#p=e.get(),e.on("register",()=>{this.#p=e.get()}),e.on("unregister",()=>{this.#p=e.get()})}#f(e){return e.chains?.some(e=>e.startsWith("solana:"))??!1}#g(e){return"solana:signMessage"in e.features}static getInstance(){return e.#d||(e.#d=new e),e.#d}get=async e=>{await this.#h();let t=(this.#p||[]).find(t=>t.name===e&&this.#f(t)&&this.#g(t));if(t&&this.#f(t))return t;if("undefined"==typeof window)return;let r=window.solana;if(r&&"function"==typeof r.connect&&"function"==typeof r.signMessage)return r}};function i(e){let t=(0,n.y)({packageName:"@clerk/shared"});async function r(e){let{provider:t,walletName:r}=e,n=await b(t,r);if(!n)return"";if("solana"===t){let e=await n.features["standard:connect"].connect();return e&&e.accounts[0].address||""}let o=await n.request({method:"eth_requestAccounts"});return o&&o[0]||""}let i=async e=>{let{identifier:t,nonce:r,provider:o,walletName:a=""}=e,i=await b(o,a);if(!i)return"";if("solana"===o)try{let e=i.accounts.find(e=>e.address===t);if(!e)return console.warn(`Wallet account with address ${t} not found`),"";let n=await i.features["solana:signMessage"]?.signMessage({account:e,message:new TextEncoder().encode(r)});return n?.[0]?.signature?btoa(String.fromCharCode(...n[0].signature)):""}catch(e){if(e instanceof Error&&e.message.includes("User rejected the request."))throw new n.m("Web3 signature request was rejected by the user.",{code:"web3_signature_request_rejected"});throw new n.m("An error occurred while generating the Solana signature.",{code:"web3_solana_signature_generation_failed",cause:e instanceof Error?e:void 0})}return await i.request({method:"personal_sign",params:[`0x${r.split("").map(e=>e.charCodeAt(0).toString(16).padStart(2,"0")).join("")}`,t]})};async function l(){return await r({provider:"metamask"})}async function s(){return await r({provider:"coinbase_wallet"})}async function c(){return await r({provider:"okx_wallet"})}async function d(){return await r({provider:"base"})}async function u(e){return await r({provider:"solana",walletName:e})}async function p(e){return await i({...e,provider:"metamask"})}async function m(e){return await i({...e,provider:"coinbase_wallet"})}async function h(e){return await i({...e,provider:"okx_wallet"})}async function f(e){return await i({...e,provider:"base"})}async function g(e){return await i({...e,provider:"solana"})}async function b(r,n){if("coinbase_wallet"===r){let t=await e.import("@coinbase/wallet-sdk");return t?t.createCoinbaseWalletSDK({preference:{options:"all"}}).getProvider():null}if("base"===r)try{let t=await e.import("@base-org/account");if(!t)return null;return t.createBaseAccountSDK({appName:"undefined"!=typeof window&&window.Clerk?.__internal_environment?.displayConfig?.applicationName||"undefined"!=typeof document&&document.title||"Web3 Application"}).getProvider()}catch{return null}return"solana"===r?n&&0!==n.length?await a.getInstance().get(n):void t.throw("Wallet name must be provided to get Solana wallet provider"):o.getInstance().get(r)}return{getWeb3Identifier:r,generateWeb3Signature:i,getMetamaskIdentifier:l,getCoinbaseWalletIdentifier:s,getOKXWalletIdentifier:c,getBaseIdentifier:d,getSolanaIdentifier:u,generateSignatureWithMetamask:p,generateSignatureWithCoinbaseWallet:m,generateSignatureWithOKXWallet:h,generateSignatureWithBase:f,generateSignatureWithSolana:g}}},5483:function(e,t,r){r.d(t,{y7:()=>n});function n(e){let t=new URL(e,window.location.href);window.dispatchEvent(new CustomEvent("clerk:beforeunload")),window.location.href=t.href}},2311:function(e,t,r){r.d(t,{a:()=>a,n:()=>o});var n=r(6435);function o(){let e=new Map;return{isDevOrStagingUrl:t=>{if(!t)return!1;let r="string"==typeof t?t:t.hostname,o=e.get(r);return void 0===o&&(o=n.n.some(e=>r.endsWith(e)),e.set(r,o)),o}}}function a(e){return e.startsWith("test_")||e.startsWith("pk_test_")}},4210:function(e,t,r){r.d(t,{t:()=>o});let n=new Set,o={warnOnce:e=>{n.has(e)||(n.add(e),console.warn(e))},logOnce:e=>{n.has(e)||(console.log(e),n.add(e))}}},2779:function(e,t,r){r.d(t,{t:()=>o});let n=RegExp("/{1,}","g");function o(e,t){return[e,t].filter(e=>e).join("/").replace(n,"/")}},8902:function(e,t,r){r.d(t,{n:()=>o,t:()=>n});let n=e=>{let t={};return new URLSearchParams(e).forEach((e,r)=>{if(r in t){let n=t[r];Array.isArray(n)?n.push(e):t[r]=[n,e]}else t[r]=e}),t},o=(e,t={})=>{if(null==e||!e||"object"!=typeof e)return"";let r=new URLSearchParams;return Object.keys(e).forEach(n=>{let o=t.keyEncoder?t.keyEncoder(n):n,a=e[n];if(Array.isArray(a))a.forEach(e=>void 0!==e&&r.append(o,e||""));else{if(void 0===a)return;"object"==typeof a&&null!==a?r.append(o,JSON.stringify(a)):r.append(o,String(a??""))}}),r.toString()}},1210:function(e,t,r){let n,o;r.d(t,{WD:()=>A,Fm:()=>eh,Rs:()=>k,IC:()=>z,D_:()=>X,kH:()=>ep,Z5:()=>Z,UQ:()=>J,ur:()=>C,Lg:()=>I,ho:()=>K,Jd:()=>er,ED:()=>_,Wp:()=>ea,TS:()=>F,cl:()=>eU,Rx:()=>Y,hZ:()=>N,e3:()=>$,rg:()=>ed,Wf:()=>T,Jl:()=>eH,wV:()=>ee,t7:()=>es,pc:()=>P,hl:()=>eg,tr:()=>el,Dc:()=>ef,_x:()=>w,Tn:()=>eO,X$:()=>ec,Oc:()=>en,v$:()=>em});let a="reverification-error",i={strict_mfa:{afterMinutes:10,level:"multi_factor"},strict:{afterMinutes:10,level:"second_factor"},moderate:{afterMinutes:60,level:"second_factor"},lax:{afterMinutes:1440,level:"second_factor"}},l=new Set(["first_factor","second_factor","multi_factor"]),s=new Set(["strict_mfa","strict","moderate","lax"]);var c,d,u=r(2522);r(1302);var p=r(1483),m=r(526),h=r(5074),f=r(6651),g=r(1839),b=r(2951),v=r(7447),y=r(5530);function w(e,t){if(!e)throw"string"==typeof t?Error(t):Error(`${t.displayName} not found`)}let $=(e,t)=>{let{assertCtxFn:r=w}=t||{},n=h.createContext(void 0);return n.displayName=e,[n,()=>{let t=h.useContext(n);return r(t,`${e} not found`),t.value},()=>{let e=h.useContext(n);return e?e.value:{}}]};function x({swrConfig:e,children:t}){return h.createElement(f.BE,{value:e},t)}let[_,S]=$("ClerkInstanceContext"),[k,C]=$("UserContext"),[P,A]=$("ClientContext"),[z,I]=$("SessionContext");h.createContext({});let[D,R]=$("CheckoutContext"),Y=({children:e,...t})=>h.createElement(D.Provider,{value:{value:t}},e),[E,T]=$("OrganizationContext"),F=({children:e,organization:t,swrConfig:r})=>h.createElement(x,{swrConfig:r},h.createElement(E.Provider,{value:{value:{organization:t}}},e));function L(e){if(!h.useContext(_)){if("function"==typeof e)return void e();throw Error(`${e} can only be used within the <ClerkProvider /> component.
134
134
 
135
135
  Possible fixes:
136
136
  1. Ensure that the <ClerkProvider /> is correctly wrapping your application where this component is used.
137
137
  2. Check for multiple versions of the \`@clerk/shared\` package in your project. Use a tool like \`npm ls @clerk/shared\` to identify multiple versions, and update your dependencies to only rely on one.
138
138
 
139
- Learn more: https://clerk.com/docs/components/clerk-provider`.trim())}}function M(e){return{queryKey:[e.stablePrefix,e.authenticated,e.tracked,e.untracked],invalidationKey:[e.stablePrefix,e.authenticated,e.tracked],stableKey:e.stablePrefix,authenticated:e.authenticated}}function B(e){let{queryKey:t}=e;return{type:t[0],...t[2],...t[3].args}}let O=(e,t)=>{let r="boolean"==typeof e&&e,n=(0,h.useRef)(r?t.initialPage:e?.initialPage??t.initialPage),o=(0,h.useRef)(r?t.pageSize:e?.pageSize??t.pageSize),a={};for(let n of Object.keys(t))a[n]=r?t[n]:e?.[n]??t[n];return{...a,initialPage:n.current,pageSize:o.current}};function j(e,t){let r=new Set(Object.keys(t)),n={};for(let t of Object.keys(e))r.has(t)||(n[t]=e[t]);return n}let U={dedupingInterval:6e4,focusThrottleInterval:12e4},W={...U,revalidateFirstPage:!1},H=e=>{let t,r,{fetcher:n,config:o,keys:a}=e,[i,l]=(0,h.useState)(o.initialPage??1),s=(0,h.useRef)(o.initialPage??1),c=(0,h.useRef)(o.pageSize??10),d=o.enabled??!0,u="cache"===o.__experimental_mode,p=o.infinite??!1,m=o.keepPreviousData??!1,g=o.isSignedIn,v={...B(a),initialPage:i,pageSize:c.current},y=(t=(0,h.useRef)(g),r=(0,h.useRef)(null),t.current!==g&&(r.current=t.current,t.current=g),r.current),w=!p&&d&&(!!u||!!n),{data:$,isValidating:x,isLoading:_,error:S,mutate:k}=(0,f.Ay)("boolean"==typeof g?!0===y&&!1===g||g&&w?v:null:w?v:null,!u&&n?e=>!1===g||!1===w?null:n(j(e,{type:a.queryKey[0],...a.queryKey[2]})):null,{keepPreviousData:m,...U}),{data:C,isLoading:P,isValidating:A,error:z,size:I,setSize:D,mutate:R}=(0,b.Ay)(e=>p&&d&&!1!==g?{...B(a),initialPage:s.current+e,pageSize:c.current}:null,e=>{let t=j(e,{type:a.queryKey[0],...a.queryKey[2]});return n?.(t)},W),Y=(0,h.useMemo)(()=>p?I:i,[p,I,i]),E=(0,h.useCallback)(e=>p?void D(e):l(e),[D,p]),T=(0,h.useMemo)(()=>p?C?.map(e=>e?.data).flat()??[]:$?.data??[],[p,$,C]),F=(0,h.useMemo)(()=>p?C?.[C?.length-1]?.total_count||0:$?.total_count??0,[p,$,C]),L=p?P:_,M=p?A:x,O=(p?z:S)??null,H=(0,h.useCallback)(()=>{E(e=>Math.max(0,e+1))},[E]),N=(0,h.useCallback)(()=>{E(e=>Math.max(0,e-1))},[E]),K=(s.current-1)*c.current;return{data:T,count:F,error:O,isLoading:L,isFetching:M,isError:!!O,page:Y,pageCount:Math.ceil((F-K)/c.current),fetchPage:E,fetchNext:H,fetchPrevious:N,hasNextPage:F-K*c.current>Y*c.current,hasPreviousPage:(Y-1)*c.current>K*c.current,revalidate:p?()=>R():()=>k(),setData:p?e=>R(e,{revalidate:!1}):e=>k(e,{revalidate:!1})}};function N(e){L("useAPIKeys");let t=O(e,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1,subject:"",query:"",enabled:!0}),r=S();r.telemetry?.record((0,p.a)("useAPIKeys"));let n={initialPage:t.initialPage,pageSize:t.pageSize,...t.subject?{subject:t.subject}:{},...t.query?{query:t.query}:{}},o=(t.enabled??!0)&&r.loaded,a=H({fetcher:r.apiKeys?.getAll?e=>r.apiKeys.getAll({...e,subject:t.subject}):void 0,config:{keepPreviousData:t.keepPreviousData,infinite:t.infinite,enabled:o,isSignedIn:!!r.user,initialPage:t.initialPage,pageSize:t.pageSize},keys:M({stablePrefix:"apiKeys",authenticated:!!r.user,tracked:{subject:t.subject},untracked:{args:n}})}),{mutate:i}=(0,g.iX)(),l=(0,h.useCallback)(()=>i(e=>!!e&&"object"==typeof e&&"type"in e&&"apiKeys"===e.type&&"subject"in e&&e.subject===t.subject),[i,t.subject]);return{...a,revalidate:l}}let K=()=>(L("useClerk"),S());function V(e){let t=K(),r=(0,h.useRef)(!1);(0,h.useEffect)(()=>{r.current||(r.current=!0,t.__internal_attemptToEnableEnvironmentSetting?.({for:"organizations",caller:e}))},[t,e])}let G={data:void 0,count:void 0,error:void 0,isLoading:!1,isFetching:!1,isError:!1,page:void 0,pageCount:void 0,fetchPage:void 0,fetchNext:void 0,fetchPrevious:void 0,hasNextPage:!1,hasPreviousPage:!1,revalidate:void 0,setData:void 0};function Z(e){var t,r;let{domains:n,membershipRequests:o,memberships:a,invitations:i}=e||{};L("useOrganization"),V("useOrganization");let{organization:l}=T(),s=I(),c=O(n,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1,enrollmentMode:void 0}),d=O(o,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),u=O(a,{initialPage:1,pageSize:10,role:void 0,keepPreviousData:!1,infinite:!1,query:void 0}),m=O(i,{initialPage:1,pageSize:10,status:["pending"],keepPreviousData:!1,infinite:!1}),h=S();h.telemetry?.record((0,p.a)("useOrganization"));let f=void 0===n?void 0:{initialPage:c.initialPage,pageSize:c.pageSize,enrollmentMode:c.enrollmentMode},g=void 0===o?void 0:{initialPage:d.initialPage,pageSize:d.pageSize,status:d.status},b=void 0===a?void 0:{initialPage:u.initialPage,pageSize:u.pageSize,role:u.role,query:u.query},v=void 0===i?void 0:{initialPage:m.initialPage,pageSize:m.pageSize,status:m.status},y=H({fetcher:l?.getDomains,config:{keepPreviousData:c.keepPreviousData,infinite:c.infinite,enabled:!!f,isSignedIn:!!l,initialPage:c.initialPage,pageSize:c.pageSize},keys:M({stablePrefix:"domains",authenticated:!!l,tracked:{organizationId:l?.id},untracked:{args:f}})}),w=H({fetcher:l?.getMembershipRequests,config:{keepPreviousData:d.keepPreviousData,infinite:d.infinite,enabled:!!g,isSignedIn:!!l,initialPage:d.initialPage,pageSize:d.pageSize},keys:M({stablePrefix:"membershipRequests",authenticated:!!l,tracked:{organizationId:l?.id},untracked:{args:g}})}),$=H({fetcher:l?.getMemberships,config:{keepPreviousData:u.keepPreviousData,infinite:u.infinite,enabled:!!b,isSignedIn:!!l,initialPage:u.initialPage,pageSize:u.pageSize},keys:M({stablePrefix:"memberships",authenticated:!!l,tracked:{organizationId:l?.id},untracked:{args:b}})}),x=H({fetcher:l?.getInvitations,config:{keepPreviousData:m.keepPreviousData,infinite:m.infinite,enabled:!!v,isSignedIn:!!l,initialPage:m.initialPage,pageSize:m.pageSize},keys:M({stablePrefix:"invitations",authenticated:!!l,tracked:{organizationId:l?.id},untracked:{args:v}})});return void 0===l?{isLoaded:!1,organization:void 0,membership:void 0,domains:G,membershipRequests:G,memberships:G,invitations:G}:null===l?{isLoaded:!0,organization:null,membership:null,domains:null,membershipRequests:null,memberships:null,invitations:null}:!h.loaded&&l?{isLoaded:!0,organization:l,membership:void 0,domains:G,membershipRequests:G,memberships:G,invitations:G}:{isLoaded:h.loaded,organization:l,membership:(t=s.user.organizationMemberships,r=l.id,t.find(e=>e.organization.id===r)),domains:y,membershipRequests:w,memberships:$,invitations:x}}let q={data:void 0,count:void 0,error:void 0,isLoading:!1,isFetching:!1,isError:!1,page:void 0,pageCount:void 0,fetchPage:void 0,fetchNext:void 0,fetchPrevious:void 0,hasNextPage:!1,hasPreviousPage:!1,revalidate:void 0,setData:void 0};function X(e){let{userMemberships:t,userInvitations:r,userSuggestions:n}=e||{};L("useOrganizationList"),V("useOrganizationList");let o=O(t,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1}),a=O(r,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),i=O(n,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),l=S(),s=C();l.telemetry?.record((0,p.a)("useOrganizationList"));let c=void 0===t?void 0:{initialPage:o.initialPage,pageSize:o.pageSize},d=void 0===r?void 0:{initialPage:a.initialPage,pageSize:a.pageSize,status:a.status},u=void 0===n?void 0:{initialPage:i.initialPage,pageSize:i.pageSize,status:i.status},m=!!(l.loaded&&s),h=H({fetcher:s?.getOrganizationMemberships,config:{keepPreviousData:o.keepPreviousData,infinite:o.infinite,enabled:!!c,isSignedIn:!!s,initialPage:o.initialPage,pageSize:o.pageSize},keys:M({stablePrefix:"userMemberships",authenticated:!!s,tracked:{userId:s?.id},untracked:{args:c}})}),f=H({fetcher:s?.getOrganizationInvitations,config:{keepPreviousData:a.keepPreviousData,infinite:a.infinite,enabled:!!d,isSignedIn:!!s,initialPage:a.initialPage,pageSize:a.pageSize},keys:M({stablePrefix:"userInvitations",authenticated:!!s,tracked:{userId:s?.id},untracked:{args:d}})}),g=H({fetcher:s?.getOrganizationSuggestions,config:{keepPreviousData:i.keepPreviousData,infinite:i.infinite,enabled:!!u,isSignedIn:!!s,initialPage:i.initialPage,pageSize:i.pageSize},keys:M({stablePrefix:"userSuggestions",authenticated:!!s,tracked:{userId:s?.id},untracked:{args:u}})});return m?{isLoaded:m,setActive:l.setActive,createOrganization:l.createOrganization,userMemberships:h,userInvitations:f,userSuggestions:g}:{isLoaded:!1,createOrganization:void 0,setActive:void 0,userMemberships:q,userInvitations:q,userSuggestions:q}}let J="undefined"!=typeof window?h.useLayoutEffect:h.useEffect,Q="useSession",ee=()=>{L(Q);let e=I(),t=S();return(t.telemetry?.record((0,p.a)(Q)),void 0===e)?{isLoaded:!1,isSignedIn:void 0,session:void 0}:null===e?{isLoaded:!0,isSignedIn:!1,session:null}:{isLoaded:!0,isSignedIn:t.isSignedIn,session:e}},et="useUser";function er(){L(et);let e=C();return(S().telemetry?.record((0,p.a)(et)),void 0===e)?{isLoaded:!1,isSignedIn:void 0,user:void 0}:null===e?{isLoaded:!0,isSignedIn:!1,user:null}:{isLoaded:!0,isSignedIn:!0,user:e}}let en=(e,t)=>{let r;return h.useMemo(e,(r=h.useRef(t),(0,v.j)(t,r.current)||(r.current=t),h.useMemo(()=>r.current,[r.current])))};async function eo(e){try{let t=await e;if(t instanceof Response)return t.json();return t}catch(e){if((0,u.i)(e)&&e.errors.find(({code:e})=>"session_reverification_required"===e))return{clerk_error:{type:"forbidden",reason:a,metadata:{reverification:void 0}}};throw e}}let ea=(e,t)=>{let{__internal_openReverification:r,telemetry:n}=K(),o=(0,h.useRef)(e),c=(0,h.useRef)(t);return n?.record((0,p.a)("useReverification",{onNeedsReverification:!!t?.onNeedsReverification})),J(()=>{o.current=e,c.current=t}),(0,h.useCallback)((...e)=>{var t;return(t={openUIComponent:r,telemetry:n,...c.current},function(e){return async(...r)=>{let n,o=await eo(e(...r));if((n=o)&&"object"==typeof n&&"clerk_error"in n&&n.clerk_error?.type==="forbidden"&&n.clerk_error?.reason===a){let n=(0,m.t)(),a=(e=>{let t,r;if(!e)return!1;let n="string"==typeof e&&s.has(e),o="object"==typeof e&&(t=e.level,l.has(t))&&"number"==typeof(r=e.afterMinutes)&&r>0;return(!!n||!!o)&&(e=>"string"==typeof e?i[e]:e).bind(null,e)})(o.clerk_error.metadata?.reverification),c=a?a().level:void 0,d=()=>{n.reject(new u.g("User cancelled attempted verification",{code:"reverification_cancelled"}))},p=()=>{n.resolve(!0)};void 0===t.onNeedsReverification?t.openUIComponent?.({level:c,afterVerification:p,afterVerificationCancelled:d}):t.onNeedsReverification({cancel:d,complete:p,level:c}),await n.promise,o=await eo(e(...r))}return o}})(o.current)(...e)},[r,n])};function ei({hookName:e,resourceType:t,useFetcher:r,options:n}){return function(o){let{for:a,enabled:i,...l}=o||{},s=a||"user";L(e);let c=r(s),d=O(l,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1,__experimental_mode:void 0}),u=S(),m=C(),{organization:h}=T();u.telemetry?.record((0,p.a)(e));let f="organization"===s,g=function(e){let t=S(),r=e?.enabled??!0,n=t.__internal_environment,o=C(),{organization:a}=T(),i=e?.for==="organization",l=i?n?.commerceSettings.billing.organization.enabled:n?.commerceSettings.billing.user.enabled,s=!(e?.authenticated??!0)||(!i||!!a?.id)&&!!o?.id;return l&&r&&t.loaded&&s}({for:s,enabled:i,authenticated:!n?.unauthenticated}),b=void 0===l?void 0:{initialPage:d.initialPage,pageSize:d.pageSize,...n?.unauthenticated?{}:f?{orgId:h?.id}:{}},v=!!b&&u.loaded&&!!g;return H({fetcher:c,config:{keepPreviousData:d.keepPreviousData,infinite:d.infinite,enabled:v,...n?.unauthenticated?{}:{isSignedIn:null!==m},__experimental_mode:d.__experimental_mode,initialPage:d.initialPage,pageSize:d.pageSize},keys:M({stablePrefix:t,authenticated:!n?.unauthenticated,tracked:n?.unauthenticated?{for:s}:{userId:m?.id,...f?{_orgId:h?.id}:{}},untracked:{args:b}})})}}let el=ei({hookName:"useStatements",resourceType:"billing-statements",useFetcher:()=>{let e=S();if(e.loaded)return e.billing.getStatements}}),es=ei({hookName:"usePaymentAttempts",resourceType:"billing-payment-attempts",useFetcher:()=>{let e=S();if(e.loaded)return e.billing.getPaymentAttempts}}),ec=ei({hookName:"usePaymentMethods",resourceType:"billing-payment-methods",useFetcher:e=>{let{organization:t}=T(),r=C();return"organization"===e?t?.getPaymentMethods:r?.getPaymentMethods}}),ed=ei({hookName:"usePlans",resourceType:"billing-plans",useFetcher:e=>{let t=S();if(t.loaded)return r=>t.billing.getPlans({...r,for:e})},options:{unauthenticated:!0}}),eu="useSubscription";function ep(e){L(eu);let t=S(),r=C(),{organization:n}=T(),o=t.__internal_environment;t.telemetry?.record((0,p.a)(eu));let a=e?.for==="organization"?o?.commerceSettings.billing.organization.enabled:o?.commerceSettings.billing.user.enabled,i=(e?.enabled??!0)&&a,{queryKey:l}=function(e){let{userId:t,orgId:r,for:n}=e;return(0,h.useMemo)(()=>{let e="organization"===n?r:void 0;return M({stablePrefix:"billing-subscription",authenticated:!0,tracked:{userId:t,orgId:e},untracked:{args:{orgId:e}}})},[t,r,n])}({userId:r?.id,orgId:n?.id,for:e?.for}),s=(0,f.Ay)(i?{queryKey:l}:null,({queryKey:e})=>{let r=e[3].args;return e[2].userId?t.billing.getSubscription(r):null},{dedupingInterval:6e4,keepPreviousData:e?.keepPreviousData}),c=(0,h.useCallback)(()=>{s.mutate()},[s]);return{data:s.data,error:s.error,isLoading:s.isLoading,isFetching:s.isValidating,revalidate:c}}let em=e=>{let t=R(),{for:r,planId:n,planPeriod:o}=e||t,{organization:a}=T(),{isLoaded:i,user:l}=er(),s=S();if(null===l&&i)throw Error("Clerk: Ensure that `useCheckout` is inside a component wrapped with `<SignedIn />`.");if(i&&"organization"===r&&null===a)throw Error("Clerk: Ensure your flow checks for an active organization. Retrieve `orgId` from `useAuth()` and confirm it is defined. For SSR, see: https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object");let c=(0,h.useCallback)(()=>s.__experimental_checkout({planId:n,planPeriod:o,for:r}),[l?.id,a?.id,n,o,r]),d=(0,h.useCallback)(e=>s.loaded?s.__internal_state.__internal_effect(()=>{c(),e()}):()=>{},[c,s.loaded,s.__internal_state]),u=(0,h.useCallback)(()=>c(),[c]);return(0,h.useSyncExternalStore)(d,u,u)};function eh(e={}){let{statementId:t=null,enabled:r=!0,keepPreviousData:n=!1,for:o="user"}=e,a=S(),i=C(),{organization:l}=T(),s="organization"===o?l?.id??null:null,{queryKey:c}=function(e){let{statementId:t,userId:r,orgId:n,for:o}=e;return(0,h.useMemo)(()=>M({stablePrefix:"billing-statement",authenticated:!0,tracked:{statementId:t,forType:o,userId:r,orgId:n},untracked:{args:{id:t??void 0,orgId:n??void 0}}}),[t,o,r,n])}({statementId:t,userId:i?.id??null,orgId:s,for:o}),d=(0,f.Ay)(t&&r&&("organization"!==o||s)?c:null,()=>{if(!t)throw Error("statementId is required to fetch a statement");return a.billing.getStatement({id:t,orgId:s??void 0})},{dedupingInterval:6e4,keepPreviousData:n});return{data:d.data,error:d.error??null,isLoading:d.isLoading,isFetching:d.isValidating}}function ef(e={}){let{planId:t,initialPlan:r=null,enabled:n=!0,keepPreviousData:o=!0}=e,a=S(),i=t??r?.id??null,{queryKey:l}=function(e){let{planId:t}=e;return(0,h.useMemo)(()=>M({stablePrefix:"billing-plan",authenticated:!1,tracked:{planId:t??null},untracked:{args:{id:t??void 0}}}),[t])}({planId:i}),s=(0,f.Ay)(i&&n?l:null,()=>{if(!i)throw Error("planId is required to fetch plan details");return a.billing.getPlan({id:i})},{dedupingInterval:6e4,keepPreviousData:o,fallbackData:r??void 0});return{data:s.data,error:s.error??null,isLoading:s.isLoading,isFetching:s.isValidating}}function eg(e){let{paymentAttemptId:t,enabled:r=!0,keepPreviousData:n=!1,for:o="user"}=e,a=S(),i=C(),{organization:l}=T(),s="organization"===o?l?.id??null:null,{queryKey:c}=function(e){let{paymentAttemptId:t,userId:r,orgId:n,for:o}=e;return(0,h.useMemo)(()=>M({stablePrefix:"billing-payment-attempt",authenticated:!0,tracked:{paymentAttemptId:t,forType:o,userId:r,orgId:n},untracked:{args:{id:t??void 0,orgId:n??void 0}}}),[t,o,r,n])}({paymentAttemptId:t,userId:i?.id??null,orgId:s,for:o}),d=(0,f.Ay)(t&&r&&("organization"!==o||s)?{queryKey:c}:null,({queryKey:e})=>{let t=e[3].args;return a.billing.getPaymentAttempt(t)},{dedupingInterval:6e4,keepPreviousData:n});return{data:d.data,error:d.error??null,isLoading:d.isLoading,isFetching:d.isValidating}}let eb=e=>{let t=(0,h.useRef)(e);return(0,h.useEffect)(()=>{t.current=e},[e]),t.current},ev=(e,t,r)=>{let n=!!r,o=(0,h.useRef)(r);(0,h.useEffect)(()=>{o.current=r},[r]),(0,h.useEffect)(()=>{if(!n||!e)return()=>{};let r=(...e)=>{o.current&&o.current(...e)};return e.on(t,r),()=>{e.off(t,r)}},[n,t,e,o])},ey=h.createContext(null);ey.displayName="ElementsContext";let ew=(e,t)=>{if(!e)throw Error(`Could not find Elements context; You need to wrap the part of your app that ${t} in an <Elements> provider.`);return e},e$=({stripe:e,options:t,children:r})=>{let n=h.useMemo(()=>eS(e),[e]),[o,a]=h.useState(()=>({stripe:"sync"===n.tag?n.stripe:null,elements:"sync"===n.tag?n.stripe.elements(t):null}));h.useEffect(()=>{let e=!0,r=e=>{a(r=>r.stripe?r:{stripe:e,elements:e.elements(t)})};return"async"!==n.tag||o.stripe?"sync"!==n.tag||o.stripe||r(n.stripe):n.stripePromise.then(t=>{t&&e&&r(t)}),()=>{e=!1}},[n,o,t]);let i=eb(e);h.useEffect(()=>{null!==i&&i!==e&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[i,e]);let l=eb(t);return h.useEffect(()=>{if(!o.elements)return;let e=eA(t,l,["clientSecret","fonts"]);e&&o.elements.update(e)},[t,l,o.elements]),h.createElement(ey.Provider,{value:o},r)},ex="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",e_=(e,t=ex)=>{if(null===e||eP(e))return e;throw Error(t)},eS=(e,t=ex)=>{if(eC(e))return{tag:"async",stripePromise:Promise.resolve(e).then(e=>e_(e,t))};let r=e_(e,t);return null===r?{tag:"empty"}:{tag:"sync",stripe:r}},ek=e=>null!==e&&"object"==typeof e,eC=e=>ek(e)&&"function"==typeof e.then,eP=e=>ek(e)&&"function"==typeof e.elements&&"function"==typeof e.createToken&&"function"==typeof e.createPaymentMethod&&"function"==typeof e.confirmCardPayment,eA=(e,t,r)=>ek(e)?Object.keys(e).reduce((n,o)=>{let a=!ek(t)||!eI(e[o],t[o]);return r.includes(o)?(a&&console.warn(`Unsupported prop change: options.${o} is not a mutable property.`),n):a?{...n||{},[o]:e[o]}:n},null):null,ez="[object Object]",eI=(e,t)=>{if(!ek(e)||!ek(t))return e===t;let r=Array.isArray(e);if(r!==Array.isArray(t))return!1;let n=Object.prototype.toString.call(e)===ez;if(n!==(Object.prototype.toString.call(t)===ez))return!1;if(!n&&!r)return e===t;let o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;let i={};for(let e=0;e<o.length;e+=1)i[o[e]]=!0;for(let e=0;e<a.length;e+=1)i[a[e]]=!0;let l=Object.keys(i);return l.length===o.length&&l.every(r=>eI(e[r],t[r]))},eD=e=>ew(h.useContext(ey),e),eR=(c="payment",d="undefined"==typeof window,n=`${c.charAt(0).toUpperCase()+c.slice(1)}Element`,(o=d?e=>{eD(`mounts <${n}>`);let{id:t,className:r}=e;return h.createElement("div",{id:t,className:r})}:({id:e,className:t,fallback:r,options:o={},onBlur:a,onFocus:i,onReady:l,onChange:s,onEscape:d,onClick:u,onLoadError:p,onLoaderStart:m,onNetworksChange:f,onConfirm:g,onCancel:b,onShippingAddressChange:v,onShippingRateChange:y})=>{let w,$=eD(`mounts <${n}>`),x="elements"in $?$.elements:null,[_,S]=h.useState(null),k=h.useRef(null),C=h.useRef(null),[P,A]=(0,h.useState)(!1);ev(_,"blur",a),ev(_,"focus",i),ev(_,"escape",d),ev(_,"click",u),ev(_,"loaderror",p),ev(_,"loaderstart",m),ev(_,"networkschange",f),ev(_,"confirm",g),ev(_,"cancel",b),ev(_,"shippingaddresschange",v),ev(_,"shippingratechange",y),ev(_,"change",s),l&&(w=()=>{A(!0),l(_)}),ev(_,"ready",w),h.useLayoutEffect(()=>{if(null===k.current&&null!==C.current&&x){let e=null;x&&(e=x.create(c,o)),k.current=e,S(e),e&&e.mount(C.current)}},[x,o]);let z=eb(o);return h.useEffect(()=>{if(!k.current)return;let e=eA(o,z,["paymentRequest"]);e&&"update"in k.current&&k.current.update(e)},[o,z]),h.useLayoutEffect(()=>()=>{if(k.current&&"function"==typeof k.current.destroy)try{k.current.destroy(),k.current=null}catch{}},[]),h.createElement(h.Fragment,null,!P&&r,h.createElement("div",{id:e,style:{height:P?"unset":"0px",visibility:P?"visible":"hidden"},className:t,ref:C}))}).displayName=n,o.__elementType=c,o),[eY,eE]=$("PaymentElementContext"),[eT,eF]=$("StripeUtilsContext"),eL=({children:e})=>{let t=(()=>{let{stripe:e}=eD("calls useStripe()");return e})(),r=(()=>{let{elements:e}=ew(h.useContext(ey),"calls useElements()");return e})();return h.createElement(eT.Provider,{value:{value:{stripe:t,elements:r}}},e)},eM=({children:e})=>h.createElement(eT.Provider,{value:{value:{}}},e),eB=({children:e,...t})=>{let r=((e="user")=>{let t,r=(t=K(),(0,f.Ay)("clerk-stripe-sdk",async()=>({loadStripe:await t.__internal_loadStripeJs()}),{keepPreviousData:!0,revalidateOnFocus:!1,dedupingInterval:1/0}).data??null),n=K().__internal_environment,{initializedPaymentMethod:o,initializePaymentMethod:a}=function(e){let{for:t="user"}=e??{},{organization:r}=T(),n=C(),o="organization"===t?r:n,{data:a,trigger:i}=(0,y.A)(o?.id?{key:"billing-payment-method-initialize",resourceId:o.id,for:t}:null,()=>o?.initializePaymentMethod({gateway:"stripe"}));return(0,h.useEffect)(()=>{o?.id&&i().catch(()=>{})},[o?.id,i]),{initializedPaymentMethod:a,initializePaymentMethod:i}}({for:e}),i=n?.commerceSettings.billing.stripePublishableKey??void 0;return{stripe:function(e){let{stripeClerkLibs:t,externalGatewayId:r,stripePublishableKey:n}=e;return(0,f.Ay)(t&&r&&n?{key:"stripe-sdk",externalGatewayId:r,stripePublishableKey:n}:null,({stripePublishableKey:e,externalGatewayId:r})=>t?.loadStripe(e,{stripeAccount:r}),{keepPreviousData:!0,revalidateOnFocus:!1,dedupingInterval:6e4}).data}({stripeClerkLibs:r,externalGatewayId:o?.externalGatewayId,stripePublishableKey:i}),initializePaymentMethod:a,externalClientSecret:o?.externalClientSecret,paymentMethodOrder:o?.paymentMethodOrder}})(t.for),[n,o]=(0,h.useState)(!1);return h.createElement(eY.Provider,{value:{value:{...t,...r,setIsPaymentElementReady:o,isPaymentElementReady:n}}},e)},eO=({children:e,...t})=>h.createElement(eB,t,h.createElement(ej,null,e)),ej=e=>{let{stripe:t,externalClientSecret:r,stripeAppearance:n}=eE(),o=(()=>{let e=K(),t="en";try{t=e.__internal_getOption("localization")?.locale||"en"}catch{}return t.split("-")[0]})();return t&&r?h.createElement(e$,{key:r,stripe:t,options:{loader:"never",clientSecret:r,appearance:{variables:n},locale:o}},h.createElement(eL,null,e.children)):h.createElement(eM,null,e.children)},eU=({fallback:e})=>{let{setIsPaymentElementReady:t,paymentMethodOrder:r,checkout:n,stripe:o,externalClientSecret:a,paymentDescription:i,for:l}=eE(),s=K().__internal_environment,c=(0,h.useMemo)(()=>{if(n&&n.totals&&n.plan)return{recurringPaymentRequest:{paymentDescription:i||"",managementURL:"organization"===l?s?.displayConfig.organizationProfileUrl||"":s?.displayConfig.userProfileUrl||"",regularBilling:{amount:n.totals.totalDueNow?.amount||n.totals.grandTotal.amount,label:n.plan.name,recurringPaymentIntervalUnit:"annual"===n.planPeriod?"year":"month"}}}},[n,i,l,s]),d=(0,h.useMemo)(()=>({layout:{type:"tabs",defaultCollapsed:!1},paymentMethodOrder:r,applePay:c}),[c,r]),u=(0,h.useCallback)(()=>{t(!0)},[t]);return o&&a?h.createElement(eR,{fallback:e,onReady:u,options:d}):h.createElement(h.Fragment,null,e)},eW=()=>{throw Error("Clerk: Unable to submit, Stripe libraries are not yet loaded. Be sure to check `isFormReady` before calling `submit`.")},eH=()=>{let{isPaymentElementReady:e,initializePaymentMethod:t}=eE(),{stripe:r,elements:n}=eF(),{externalClientSecret:o}=eE(),a=(0,h.useCallback)(async()=>{if(!r||!n)return eW();let{setupIntent:e,error:t}=await r.confirmSetup({elements:n,confirmParams:{return_url:window.location.href},redirect:"if_required"});return t?{data:null,error:{gateway:"stripe",error:{code:t.code,message:t.message,type:t.type}}}:{data:{gateway:"stripe",paymentToken:e.payment_method},error:null}},[r,n]),i=(0,h.useCallback)(async()=>{if(!r||!n)return eW();await t()},[r,n,t]),l=!!(r&&o);return l?{submit:a,reset:i,isFormReady:e,provider:{name:"stripe"},isProviderReady:l}:{submit:eW,reset:eW,isFormReady:!1,provider:void 0,isProviderReady:!1}}},1483:function(e,t,r){r.d(t,{a:()=>a,o:()=>o}),r(1302);let n=new Set(["SignIn","SignUp"]);function o(e,t={}){return{event:"COMPONENT_MOUNTED",eventSamplingRate:n.has(e)?1:.1,payload:{component:e,...t}}}function a(e,t){return{event:"METHOD_CALLED",eventSamplingRate:.1,payload:{method:e,...t}}}},4525:function(e,t,r){r.d(t,{we:()=>n.o}),r(1302);var n=r(1483)},1302:function(e,t,r){function n(e){let t=e||"";return t.charAt(0).toUpperCase()+t.slice(1)}function o(e){return e?e.replace(/([-_][a-z])/g,e=>e.toUpperCase().replace(/-|_/,"")):""}function a(e){return e?e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`):""}r.d(t,{c:()=>n,s:()=>o,t:()=>a});let i=e=>{let t=r=>{if(!r)return r;if(Array.isArray(r))return r.map(e=>"object"==typeof e||Array.isArray(e)?t(e):e);let n={...r};for(let r of Object.keys(n)){let o=e(r.toString());o!==r&&(n[o]=n[r],delete n[r]),"object"==typeof n[o]&&(n[o]=t(n[o]))}return n};return t};i(a),i(o)},1044:function(e,t,r){r.d(t,{C8:()=>n.t,Ns:()=>n.c,sF:()=>n.s});var n=r(1302)},6308:function(e,t,r){r.d(t,{_:()=>_,b:()=>w,c:()=>$,g:()=>x,h:()=>g,l:()=>S,t:()=>m,u:()=>y,v:()=>b,w:()=>f,x:()=>h});var n=r(2311),o=r(212),a=r(4210),i=r(1302),l=r(2779),s=r(8902);let c="http://clerk-dummy",d=["javascript:"],u=["javascript:","data:","vbscript:","blob:"],{isDevOrStagingUrl:p}=(0,n.n)();function m(e,t={}){let{base:r,hashPath:n,hashSearch:o,searchParams:a,hashSearchParams:d,...u}=e,p=new URL(r||"","undefined"!=typeof window&&window.location?window.location.href:"http://react-native-fake-base-url");if(a instanceof URLSearchParams&&a.forEach((e,t)=>{null!=e&&p.searchParams.set((0,i.t)(t),e)}),Object.assign(p,u),n||o||d){let e=new URL(c+p.hash.substring(1));for(let[t,r]of(e.pathname=(0,l.t)(e.pathname,n||""),Object.entries((0,s.t)(o||""))))e.searchParams.append(t,r);if(d)for(let t of Array.isArray(d)?d:[d])(t instanceof URLSearchParams||"object"==typeof t)&&new URLSearchParams(t).forEach((t,r)=>{null!=t&&e.searchParams.set((0,i.t)(r),t)});let t=e.href.replace(c,"");"/"!==t&&(p.hash=t)}let{stringify:h,skipOrigin:f}=t;return h?f?p.href.replace(p.origin,""):p.href:p}function h(e){return void 0===window.location&&"string"==typeof e?e:(e=new URL(e.toString(),window.location.origin)).href.replace(e.origin,"")}let f=e=>(e||"").replace(/\/+$/,"");function g(e){if(!e)return!1;try{return new URL(e),!0}catch{return!1}}function b(e,t){try{return new URL(e)}catch{return new URL(e,t)}}let v=[/\0/,/^\/\//,/[\x00-\x1F]/];function y(e){return!!e&&!!g(e)&&"data:"===new URL(e).protocol}function w(e){if(!e||""===e.trim())return null;if(e.startsWith("/")||e.startsWith("#")||e.startsWith("?")||!e.includes(":"))return e;try{if(function(e){if(!g(e))return!1;let t=new URL(e).protocol;return u.some(e=>e===t)}(new URL(e)))return null;return e}catch{return e}}let $=e=>new URL(e,c).hash.startsWith("#/"),x=e=>{let t=new URL(e);if(!$(t))return t;let r=new URL(t.hash.replace("#/","/"),t.href),n=new URL([t.pathname,r.pathname].map(e=>e.split("/")).flat().filter(Boolean).join("/"),t.origin);return t.searchParams.forEach((e,t)=>{n.searchParams.set(t,e)}),r.searchParams.forEach((e,t)=>{n.searchParams.set(t,e)}),n},_=e=>e.replace(/CLERK-ROUTER\/(.*?)\//,""),S=(e,t)=>r=>{let n=r;if("string"==typeof n&&(n=b(n,t)),!e)return!0;let i=t===n.origin,l=!function(e){if(function(e){if(!g(e))return!1;let t=new URL(e).protocol;return d.some(e=>e===t)}(e))return!0;for(let t of v)if(t.test(e.pathname))return!0;return!1}(n)&&(i||e.map(e=>"string"==typeof e?o.t.toRegexp(f(e)):e).some(e=>e.test(f(n.origin))));return l||a.t.warnOnce(`Clerk: Redirect URL ${n} is not on one of the allowedRedirectOrigins, falling back to the default redirect URL.`),l}},5993:function(e,t,r){r.d(t,{s:()=>o});let n=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=e=>n.test(e)},9869:function(e,t,r){r.d(t,{n:()=>n});let n=(e,t)=>{if(e&&t)for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&null!==e[r]&&"object"==typeof e[r]?(void 0===t[r]&&(t[r]=new(Object.getPrototypeOf(e[r])).constructor),n(e[r],t[r])):Object.prototype.hasOwnProperty.call(e,r)&&void 0!==e[r]&&(t[r]=e[r])}},2620:function(e,t,r){r.d(t,{Bz:()=>o,nn:()=>a});let n=RegExp("bot|spider|crawl|APIs-Google|AdsBot|Googlebot|mediapartners|Google Favicon|FeedFetcher|Google-Read-Aloud|DuplexWeb-Google|googleweblight|bing|yandex|baidu|duckduck|yahoo|ecosia|ia_archiver|facebook|instagram|pinterest|reddit|slack|twitter|whatsapp|youtube|semrush","i");function o(){var e;let t;return!!(t="undefined"!=typeof window?window?.navigator:null)&&!((e=t?.userAgent)&&n.test(e))&&!t?.webdriver&&"function"==typeof window.PublicKeyCredential}async function a(){try{return o()&&await window.PublicKeyCredential.isConditionalMediationAvailable()}catch{return!1}}}}]);
139
+ Learn more: https://clerk.com/docs/components/clerk-provider`.trim())}}function M(e){return{queryKey:[e.stablePrefix,e.authenticated,e.tracked,e.untracked],invalidationKey:[e.stablePrefix,e.authenticated,e.tracked],stableKey:e.stablePrefix,authenticated:e.authenticated}}function B(e){let{queryKey:t}=e;return{type:t[0],...t[2],...t[3].args}}let O=(e,t)=>{let r="boolean"==typeof e&&e,n=(0,h.useRef)(r?t.initialPage:e?.initialPage??t.initialPage),o=(0,h.useRef)(r?t.pageSize:e?.pageSize??t.pageSize),a={};for(let n of Object.keys(t))a[n]=r?t[n]:e?.[n]??t[n];return{...a,initialPage:n.current,pageSize:o.current}};function j(e,t){let r=new Set(Object.keys(t)),n={};for(let t of Object.keys(e))r.has(t)||(n[t]=e[t]);return n}let U={dedupingInterval:6e4,focusThrottleInterval:12e4},W={...U,revalidateFirstPage:!1},H=e=>{let t,r,{fetcher:n,config:o,keys:a}=e,[i,l]=(0,h.useState)(o.initialPage??1),s=(0,h.useRef)(o.initialPage??1),c=(0,h.useRef)(o.pageSize??10),d=o.enabled??!0,u="cache"===o.__experimental_mode,p=o.infinite??!1,m=o.keepPreviousData??!1,g=o.isSignedIn,v={...B(a),initialPage:i,pageSize:c.current},y=(t=(0,h.useRef)(g),r=(0,h.useRef)(null),t.current!==g&&(r.current=t.current,t.current=g),r.current),w=!p&&d&&(!!u||!!n),{data:$,isValidating:x,isLoading:_,error:S,mutate:k}=(0,f.Ay)("boolean"==typeof g?!0===y&&!1===g||g&&w?v:null:w?v:null,!u&&n?e=>!1===g||!1===w?null:n(j(e,{type:a.queryKey[0],...a.queryKey[2]})):null,{keepPreviousData:m,...U}),{data:C,isLoading:P,isValidating:A,error:z,size:I,setSize:D,mutate:R}=(0,b.Ay)(e=>p&&d&&!1!==g?{...B(a),initialPage:s.current+e,pageSize:c.current}:null,e=>{let t=j(e,{type:a.queryKey[0],...a.queryKey[2]});return n?.(t)},W),Y=(0,h.useMemo)(()=>p?I:i,[p,I,i]),E=(0,h.useCallback)(e=>p?void D(e):l(e),[D,p]),T=(0,h.useMemo)(()=>p?C?.map(e=>e?.data).flat()??[]:$?.data??[],[p,$,C]),F=(0,h.useMemo)(()=>p?C?.[C?.length-1]?.total_count||0:$?.total_count??0,[p,$,C]),L=p?P:_,M=p?A:x,O=(p?z:S)??null,H=(0,h.useCallback)(()=>{E(e=>Math.max(0,e+1))},[E]),N=(0,h.useCallback)(()=>{E(e=>Math.max(0,e-1))},[E]),K=(s.current-1)*c.current;return{data:T,count:F,error:O,isLoading:L,isFetching:M,isError:!!O,page:Y,pageCount:Math.ceil((F-K)/c.current),fetchPage:E,fetchNext:H,fetchPrevious:N,hasNextPage:F-K*c.current>Y*c.current,hasPreviousPage:(Y-1)*c.current>K*c.current,revalidate:p?()=>R():()=>k(),setData:p?e=>R(e,{revalidate:!1}):e=>k(e,{revalidate:!1})}};function N(e){L("useAPIKeys");let t=O(e,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1,subject:"",query:"",enabled:!0}),r=S();r.telemetry?.record((0,p.a)("useAPIKeys"));let n={initialPage:t.initialPage,pageSize:t.pageSize,...t.subject?{subject:t.subject}:{},...t.query?{query:t.query}:{}},o=(t.enabled??!0)&&r.loaded,a=H({fetcher:r.apiKeys?.getAll?e=>r.apiKeys.getAll({...e,subject:t.subject}):void 0,config:{keepPreviousData:t.keepPreviousData,infinite:t.infinite,enabled:o,isSignedIn:!!r.user,initialPage:t.initialPage,pageSize:t.pageSize},keys:M({stablePrefix:"apiKeys",authenticated:!!r.user,tracked:{subject:t.subject},untracked:{args:n}})}),{mutate:i}=(0,g.iX)(),l=(0,h.useCallback)(()=>i(e=>!!e&&"object"==typeof e&&"type"in e&&"apiKeys"===e.type&&"subject"in e&&e.subject===t.subject),[i,t.subject]);return{...a,revalidate:l}}let K=()=>(L("useClerk"),S());function V(e){let t=K(),r=(0,h.useRef)(!1);(0,h.useEffect)(()=>{r.current||(r.current=!0,t.__internal_attemptToEnableEnvironmentSetting?.({for:"organizations",caller:e}))},[t,e])}let G={data:void 0,count:void 0,error:void 0,isLoading:!1,isFetching:!1,isError:!1,page:void 0,pageCount:void 0,fetchPage:void 0,fetchNext:void 0,fetchPrevious:void 0,hasNextPage:!1,hasPreviousPage:!1,revalidate:void 0,setData:void 0};function Z(e){var t,r;let{domains:n,membershipRequests:o,memberships:a,invitations:i}=e||{};L("useOrganization"),V("useOrganization");let{organization:l}=T(),s=I(),c=O(n,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1,enrollmentMode:void 0}),d=O(o,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),u=O(a,{initialPage:1,pageSize:10,role:void 0,keepPreviousData:!1,infinite:!1,query:void 0}),m=O(i,{initialPage:1,pageSize:10,status:["pending"],keepPreviousData:!1,infinite:!1}),h=S();h.telemetry?.record((0,p.a)("useOrganization"));let f=void 0===n?void 0:{initialPage:c.initialPage,pageSize:c.pageSize,enrollmentMode:c.enrollmentMode},g=void 0===o?void 0:{initialPage:d.initialPage,pageSize:d.pageSize,status:d.status},b=void 0===a?void 0:{initialPage:u.initialPage,pageSize:u.pageSize,role:u.role,query:u.query},v=void 0===i?void 0:{initialPage:m.initialPage,pageSize:m.pageSize,status:m.status},y=H({fetcher:l?.getDomains,config:{keepPreviousData:c.keepPreviousData,infinite:c.infinite,enabled:!!f,isSignedIn:!!l,initialPage:c.initialPage,pageSize:c.pageSize},keys:M({stablePrefix:"domains",authenticated:!!l,tracked:{organizationId:l?.id},untracked:{args:f}})}),w=H({fetcher:l?.getMembershipRequests,config:{keepPreviousData:d.keepPreviousData,infinite:d.infinite,enabled:!!g,isSignedIn:!!l,initialPage:d.initialPage,pageSize:d.pageSize},keys:M({stablePrefix:"membershipRequests",authenticated:!!l,tracked:{organizationId:l?.id},untracked:{args:g}})}),$=H({fetcher:l?.getMemberships,config:{keepPreviousData:u.keepPreviousData,infinite:u.infinite,enabled:!!b,isSignedIn:!!l,initialPage:u.initialPage,pageSize:u.pageSize},keys:M({stablePrefix:"memberships",authenticated:!!l,tracked:{organizationId:l?.id},untracked:{args:b}})}),x=H({fetcher:l?.getInvitations,config:{keepPreviousData:m.keepPreviousData,infinite:m.infinite,enabled:!!v,isSignedIn:!!l,initialPage:m.initialPage,pageSize:m.pageSize},keys:M({stablePrefix:"invitations",authenticated:!!l,tracked:{organizationId:l?.id},untracked:{args:v}})});return void 0===l?{isLoaded:!1,organization:void 0,membership:void 0,domains:G,membershipRequests:G,memberships:G,invitations:G}:null===l?{isLoaded:!0,organization:null,membership:null,domains:null,membershipRequests:null,memberships:null,invitations:null}:!h.loaded&&l?{isLoaded:!0,organization:l,membership:void 0,domains:G,membershipRequests:G,memberships:G,invitations:G}:{isLoaded:h.loaded,organization:l,membership:(t=s.user.organizationMemberships,r=l.id,t.find(e=>e.organization.id===r)),domains:y,membershipRequests:w,memberships:$,invitations:x}}let q={data:void 0,count:void 0,error:void 0,isLoading:!1,isFetching:!1,isError:!1,page:void 0,pageCount:void 0,fetchPage:void 0,fetchNext:void 0,fetchPrevious:void 0,hasNextPage:!1,hasPreviousPage:!1,revalidate:void 0,setData:void 0};function X(e){let{userMemberships:t,userInvitations:r,userSuggestions:n}=e||{};L("useOrganizationList"),V("useOrganizationList");let o=O(t,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1}),a=O(r,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),i=O(n,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),l=S(),s=C();l.telemetry?.record((0,p.a)("useOrganizationList"));let c=void 0===t?void 0:{initialPage:o.initialPage,pageSize:o.pageSize},d=void 0===r?void 0:{initialPage:a.initialPage,pageSize:a.pageSize,status:a.status},u=void 0===n?void 0:{initialPage:i.initialPage,pageSize:i.pageSize,status:i.status},m=!!(l.loaded&&s),h=H({fetcher:s?.getOrganizationMemberships,config:{keepPreviousData:o.keepPreviousData,infinite:o.infinite,enabled:!!c,isSignedIn:!!s,initialPage:o.initialPage,pageSize:o.pageSize},keys:M({stablePrefix:"userMemberships",authenticated:!!s,tracked:{userId:s?.id},untracked:{args:c}})}),f=H({fetcher:s?.getOrganizationInvitations,config:{keepPreviousData:a.keepPreviousData,infinite:a.infinite,enabled:!!d,isSignedIn:!!s,initialPage:a.initialPage,pageSize:a.pageSize},keys:M({stablePrefix:"userInvitations",authenticated:!!s,tracked:{userId:s?.id},untracked:{args:d}})}),g=H({fetcher:s?.getOrganizationSuggestions,config:{keepPreviousData:i.keepPreviousData,infinite:i.infinite,enabled:!!u,isSignedIn:!!s,initialPage:i.initialPage,pageSize:i.pageSize},keys:M({stablePrefix:"userSuggestions",authenticated:!!s,tracked:{userId:s?.id},untracked:{args:u}})});return m?{isLoaded:m,setActive:l.setActive,createOrganization:l.createOrganization,userMemberships:h,userInvitations:f,userSuggestions:g}:{isLoaded:!1,createOrganization:void 0,setActive:void 0,userMemberships:q,userInvitations:q,userSuggestions:q}}let J="undefined"!=typeof window?h.useLayoutEffect:h.useEffect,Q="useSession",ee=()=>{L(Q);let e=I(),t=S();return(t.telemetry?.record((0,p.a)(Q)),void 0===e)?{isLoaded:!1,isSignedIn:void 0,session:void 0}:null===e?{isLoaded:!0,isSignedIn:!1,session:null}:{isLoaded:!0,isSignedIn:t.isSignedIn,session:e}},et="useUser";function er(){L(et);let e=C();return(S().telemetry?.record((0,p.a)(et)),void 0===e)?{isLoaded:!1,isSignedIn:void 0,user:void 0}:null===e?{isLoaded:!0,isSignedIn:!1,user:null}:{isLoaded:!0,isSignedIn:!0,user:e}}let en=(e,t)=>{let r;return h.useMemo(e,(r=h.useRef(t),(0,v.j)(t,r.current)||(r.current=t),h.useMemo(()=>r.current,[r.current])))};async function eo(e){try{let t=await e;if(t instanceof Response)return t.json();return t}catch(e){if((0,u.S)(e)&&e.errors.find(({code:e})=>"session_reverification_required"===e))return{clerk_error:{type:"forbidden",reason:a,metadata:{reverification:void 0}}};throw e}}let ea=(e,t)=>{let{__internal_openReverification:r,telemetry:n}=K(),o=(0,h.useRef)(e),c=(0,h.useRef)(t);return n?.record((0,p.a)("useReverification",{onNeedsReverification:!!t?.onNeedsReverification})),J(()=>{o.current=e,c.current=t}),(0,h.useCallback)((...e)=>{var t;return(t={openUIComponent:r,telemetry:n,...c.current},function(e){return async(...r)=>{let n,o=await eo(e(...r));if((n=o)&&"object"==typeof n&&"clerk_error"in n&&n.clerk_error?.type==="forbidden"&&n.clerk_error?.reason===a){let n=(0,m.t)(),a=(e=>{let t,r;if(!e)return!1;let n="string"==typeof e&&s.has(e),o="object"==typeof e&&(t=e.level,l.has(t))&&"number"==typeof(r=e.afterMinutes)&&r>0;return(!!n||!!o)&&(e=>"string"==typeof e?i[e]:e).bind(null,e)})(o.clerk_error.metadata?.reverification),c=a?a().level:void 0,d=()=>{n.reject(new u.m("User cancelled attempted verification",{code:"reverification_cancelled"}))},p=()=>{n.resolve(!0)};void 0===t.onNeedsReverification?t.openUIComponent?.({level:c,afterVerification:p,afterVerificationCancelled:d}):t.onNeedsReverification({cancel:d,complete:p,level:c}),await n.promise,o=await eo(e(...r))}return o}})(o.current)(...e)},[r,n])};function ei({hookName:e,resourceType:t,useFetcher:r,options:n}){return function(o){let{for:a,enabled:i,...l}=o||{},s=a||"user";L(e);let c=r(s),d=O(l,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1,__experimental_mode:void 0}),u=S(),m=C(),{organization:h}=T();u.telemetry?.record((0,p.a)(e));let f="organization"===s,g=function(e){let t=S(),r=e?.enabled??!0,n=t.__internal_environment,o=C(),{organization:a}=T(),i=e?.for==="organization",l=i?n?.commerceSettings.billing.organization.enabled:n?.commerceSettings.billing.user.enabled,s=!(e?.authenticated??!0)||(!i||!!a?.id)&&!!o?.id;return l&&r&&t.loaded&&s}({for:s,enabled:i,authenticated:!n?.unauthenticated}),b=void 0===l?void 0:{initialPage:d.initialPage,pageSize:d.pageSize,...n?.unauthenticated?{}:f?{orgId:h?.id}:{}},v=!!b&&u.loaded&&!!g;return H({fetcher:c,config:{keepPreviousData:d.keepPreviousData,infinite:d.infinite,enabled:v,...n?.unauthenticated?{}:{isSignedIn:null!==m},__experimental_mode:d.__experimental_mode,initialPage:d.initialPage,pageSize:d.pageSize},keys:M({stablePrefix:t,authenticated:!n?.unauthenticated,tracked:n?.unauthenticated?{for:s}:{userId:m?.id,...f?{_orgId:h?.id}:{}},untracked:{args:b}})})}}let el=ei({hookName:"useStatements",resourceType:"billing-statements",useFetcher:()=>{let e=S();if(e.loaded)return e.billing.getStatements}}),es=ei({hookName:"usePaymentAttempts",resourceType:"billing-payment-attempts",useFetcher:()=>{let e=S();if(e.loaded)return e.billing.getPaymentAttempts}}),ec=ei({hookName:"usePaymentMethods",resourceType:"billing-payment-methods",useFetcher:e=>{let{organization:t}=T(),r=C();return"organization"===e?t?.getPaymentMethods:r?.getPaymentMethods}}),ed=ei({hookName:"usePlans",resourceType:"billing-plans",useFetcher:e=>{let t=S();if(t.loaded)return r=>t.billing.getPlans({...r,for:e})},options:{unauthenticated:!0}}),eu="useSubscription";function ep(e){L(eu);let t=S(),r=C(),{organization:n}=T(),o=t.__internal_environment;t.telemetry?.record((0,p.a)(eu));let a=e?.for==="organization"?o?.commerceSettings.billing.organization.enabled:o?.commerceSettings.billing.user.enabled,i=(e?.enabled??!0)&&a,{queryKey:l}=function(e){let{userId:t,orgId:r,for:n}=e;return(0,h.useMemo)(()=>{let e="organization"===n?r:void 0;return M({stablePrefix:"billing-subscription",authenticated:!0,tracked:{userId:t,orgId:e},untracked:{args:{orgId:e}}})},[t,r,n])}({userId:r?.id,orgId:n?.id,for:e?.for}),s=(0,f.Ay)(i?{queryKey:l}:null,({queryKey:e})=>{let r=e[3].args;return e[2].userId?t.billing.getSubscription(r):null},{dedupingInterval:6e4,keepPreviousData:e?.keepPreviousData}),c=(0,h.useCallback)(()=>{s.mutate()},[s]);return{data:s.data,error:s.error,isLoading:s.isLoading,isFetching:s.isValidating,revalidate:c}}let em=e=>{let t=R(),{for:r,planId:n,planPeriod:o}=e||t,{organization:a}=T(),{isLoaded:i,user:l}=er(),s=S();if(null===l&&i)throw Error("Clerk: Ensure that `useCheckout` is inside a component wrapped with `<SignedIn />`.");if(i&&"organization"===r&&null===a)throw Error("Clerk: Ensure your flow checks for an active organization. Retrieve `orgId` from `useAuth()` and confirm it is defined. For SSR, see: https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object");let c=(0,h.useCallback)(()=>s.__experimental_checkout({planId:n,planPeriod:o,for:r}),[l?.id,a?.id,n,o,r]),d=(0,h.useCallback)(e=>s.loaded?s.__internal_state.__internal_effect(()=>{c(),e()}):()=>{},[c,s.loaded,s.__internal_state]),u=(0,h.useCallback)(()=>c(),[c]);return(0,h.useSyncExternalStore)(d,u,u)};function eh(e={}){let{statementId:t=null,enabled:r=!0,keepPreviousData:n=!1,for:o="user"}=e,a=S(),i=C(),{organization:l}=T(),s="organization"===o?l?.id??null:null,{queryKey:c}=function(e){let{statementId:t,userId:r,orgId:n,for:o}=e;return(0,h.useMemo)(()=>M({stablePrefix:"billing-statement",authenticated:!0,tracked:{statementId:t,forType:o,userId:r,orgId:n},untracked:{args:{id:t??void 0,orgId:n??void 0}}}),[t,o,r,n])}({statementId:t,userId:i?.id??null,orgId:s,for:o}),d=(0,f.Ay)(t&&r&&("organization"!==o||s)?c:null,()=>{if(!t)throw Error("statementId is required to fetch a statement");return a.billing.getStatement({id:t,orgId:s??void 0})},{dedupingInterval:6e4,keepPreviousData:n});return{data:d.data,error:d.error??null,isLoading:d.isLoading,isFetching:d.isValidating}}function ef(e={}){let{planId:t,initialPlan:r=null,enabled:n=!0,keepPreviousData:o=!0}=e,a=S(),i=t??r?.id??null,{queryKey:l}=function(e){let{planId:t}=e;return(0,h.useMemo)(()=>M({stablePrefix:"billing-plan",authenticated:!1,tracked:{planId:t??null},untracked:{args:{id:t??void 0}}}),[t])}({planId:i}),s=(0,f.Ay)(i&&n?l:null,()=>{if(!i)throw Error("planId is required to fetch plan details");return a.billing.getPlan({id:i})},{dedupingInterval:6e4,keepPreviousData:o,fallbackData:r??void 0});return{data:s.data,error:s.error??null,isLoading:s.isLoading,isFetching:s.isValidating}}function eg(e){let{paymentAttemptId:t,enabled:r=!0,keepPreviousData:n=!1,for:o="user"}=e,a=S(),i=C(),{organization:l}=T(),s="organization"===o?l?.id??null:null,{queryKey:c}=function(e){let{paymentAttemptId:t,userId:r,orgId:n,for:o}=e;return(0,h.useMemo)(()=>M({stablePrefix:"billing-payment-attempt",authenticated:!0,tracked:{paymentAttemptId:t,forType:o,userId:r,orgId:n},untracked:{args:{id:t??void 0,orgId:n??void 0}}}),[t,o,r,n])}({paymentAttemptId:t,userId:i?.id??null,orgId:s,for:o}),d=(0,f.Ay)(t&&r&&("organization"!==o||s)?{queryKey:c}:null,({queryKey:e})=>{let t=e[3].args;return a.billing.getPaymentAttempt(t)},{dedupingInterval:6e4,keepPreviousData:n});return{data:d.data,error:d.error??null,isLoading:d.isLoading,isFetching:d.isValidating}}let eb=e=>{let t=(0,h.useRef)(e);return(0,h.useEffect)(()=>{t.current=e},[e]),t.current},ev=(e,t,r)=>{let n=!!r,o=(0,h.useRef)(r);(0,h.useEffect)(()=>{o.current=r},[r]),(0,h.useEffect)(()=>{if(!n||!e)return()=>{};let r=(...e)=>{o.current&&o.current(...e)};return e.on(t,r),()=>{e.off(t,r)}},[n,t,e,o])},ey=h.createContext(null);ey.displayName="ElementsContext";let ew=(e,t)=>{if(!e)throw Error(`Could not find Elements context; You need to wrap the part of your app that ${t} in an <Elements> provider.`);return e},e$=({stripe:e,options:t,children:r})=>{let n=h.useMemo(()=>eS(e),[e]),[o,a]=h.useState(()=>({stripe:"sync"===n.tag?n.stripe:null,elements:"sync"===n.tag?n.stripe.elements(t):null}));h.useEffect(()=>{let e=!0,r=e=>{a(r=>r.stripe?r:{stripe:e,elements:e.elements(t)})};return"async"!==n.tag||o.stripe?"sync"!==n.tag||o.stripe||r(n.stripe):n.stripePromise.then(t=>{t&&e&&r(t)}),()=>{e=!1}},[n,o,t]);let i=eb(e);h.useEffect(()=>{null!==i&&i!==e&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[i,e]);let l=eb(t);return h.useEffect(()=>{if(!o.elements)return;let e=eA(t,l,["clientSecret","fonts"]);e&&o.elements.update(e)},[t,l,o.elements]),h.createElement(ey.Provider,{value:o},r)},ex="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",e_=(e,t=ex)=>{if(null===e||eP(e))return e;throw Error(t)},eS=(e,t=ex)=>{if(eC(e))return{tag:"async",stripePromise:Promise.resolve(e).then(e=>e_(e,t))};let r=e_(e,t);return null===r?{tag:"empty"}:{tag:"sync",stripe:r}},ek=e=>null!==e&&"object"==typeof e,eC=e=>ek(e)&&"function"==typeof e.then,eP=e=>ek(e)&&"function"==typeof e.elements&&"function"==typeof e.createToken&&"function"==typeof e.createPaymentMethod&&"function"==typeof e.confirmCardPayment,eA=(e,t,r)=>ek(e)?Object.keys(e).reduce((n,o)=>{let a=!ek(t)||!eI(e[o],t[o]);return r.includes(o)?(a&&console.warn(`Unsupported prop change: options.${o} is not a mutable property.`),n):a?{...n||{},[o]:e[o]}:n},null):null,ez="[object Object]",eI=(e,t)=>{if(!ek(e)||!ek(t))return e===t;let r=Array.isArray(e);if(r!==Array.isArray(t))return!1;let n=Object.prototype.toString.call(e)===ez;if(n!==(Object.prototype.toString.call(t)===ez))return!1;if(!n&&!r)return e===t;let o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;let i={};for(let e=0;e<o.length;e+=1)i[o[e]]=!0;for(let e=0;e<a.length;e+=1)i[a[e]]=!0;let l=Object.keys(i);return l.length===o.length&&l.every(r=>eI(e[r],t[r]))},eD=e=>ew(h.useContext(ey),e),eR=(c="payment",d="undefined"==typeof window,n=`${c.charAt(0).toUpperCase()+c.slice(1)}Element`,(o=d?e=>{eD(`mounts <${n}>`);let{id:t,className:r}=e;return h.createElement("div",{id:t,className:r})}:({id:e,className:t,fallback:r,options:o={},onBlur:a,onFocus:i,onReady:l,onChange:s,onEscape:d,onClick:u,onLoadError:p,onLoaderStart:m,onNetworksChange:f,onConfirm:g,onCancel:b,onShippingAddressChange:v,onShippingRateChange:y})=>{let w,$=eD(`mounts <${n}>`),x="elements"in $?$.elements:null,[_,S]=h.useState(null),k=h.useRef(null),C=h.useRef(null),[P,A]=(0,h.useState)(!1);ev(_,"blur",a),ev(_,"focus",i),ev(_,"escape",d),ev(_,"click",u),ev(_,"loaderror",p),ev(_,"loaderstart",m),ev(_,"networkschange",f),ev(_,"confirm",g),ev(_,"cancel",b),ev(_,"shippingaddresschange",v),ev(_,"shippingratechange",y),ev(_,"change",s),l&&(w=()=>{A(!0),l(_)}),ev(_,"ready",w),h.useLayoutEffect(()=>{if(null===k.current&&null!==C.current&&x){let e=null;x&&(e=x.create(c,o)),k.current=e,S(e),e&&e.mount(C.current)}},[x,o]);let z=eb(o);return h.useEffect(()=>{if(!k.current)return;let e=eA(o,z,["paymentRequest"]);e&&"update"in k.current&&k.current.update(e)},[o,z]),h.useLayoutEffect(()=>()=>{if(k.current&&"function"==typeof k.current.destroy)try{k.current.destroy(),k.current=null}catch{}},[]),h.createElement(h.Fragment,null,!P&&r,h.createElement("div",{id:e,style:{height:P?"unset":"0px",visibility:P?"visible":"hidden"},className:t,ref:C}))}).displayName=n,o.__elementType=c,o),[eY,eE]=$("PaymentElementContext"),[eT,eF]=$("StripeUtilsContext"),eL=({children:e})=>{let t=(()=>{let{stripe:e}=eD("calls useStripe()");return e})(),r=(()=>{let{elements:e}=ew(h.useContext(ey),"calls useElements()");return e})();return h.createElement(eT.Provider,{value:{value:{stripe:t,elements:r}}},e)},eM=({children:e})=>h.createElement(eT.Provider,{value:{value:{}}},e),eB=({children:e,...t})=>{let r=((e="user")=>{let t,r=(t=K(),(0,f.Ay)("clerk-stripe-sdk",async()=>({loadStripe:await t.__internal_loadStripeJs()}),{keepPreviousData:!0,revalidateOnFocus:!1,dedupingInterval:1/0}).data??null),n=K().__internal_environment,{initializedPaymentMethod:o,initializePaymentMethod:a}=function(e){let{for:t="user"}=e??{},{organization:r}=T(),n=C(),o="organization"===t?r:n,{data:a,trigger:i}=(0,y.A)(o?.id?{key:"billing-payment-method-initialize",resourceId:o.id,for:t}:null,()=>o?.initializePaymentMethod({gateway:"stripe"}));return(0,h.useEffect)(()=>{o?.id&&i().catch(()=>{})},[o?.id,i]),{initializedPaymentMethod:a,initializePaymentMethod:i}}({for:e}),i=n?.commerceSettings.billing.stripePublishableKey??void 0;return{stripe:function(e){let{stripeClerkLibs:t,externalGatewayId:r,stripePublishableKey:n}=e;return(0,f.Ay)(t&&r&&n?{key:"stripe-sdk",externalGatewayId:r,stripePublishableKey:n}:null,({stripePublishableKey:e,externalGatewayId:r})=>t?.loadStripe(e,{stripeAccount:r}),{keepPreviousData:!0,revalidateOnFocus:!1,dedupingInterval:6e4}).data}({stripeClerkLibs:r,externalGatewayId:o?.externalGatewayId,stripePublishableKey:i}),initializePaymentMethod:a,externalClientSecret:o?.externalClientSecret,paymentMethodOrder:o?.paymentMethodOrder}})(t.for),[n,o]=(0,h.useState)(!1);return h.createElement(eY.Provider,{value:{value:{...t,...r,setIsPaymentElementReady:o,isPaymentElementReady:n}}},e)},eO=({children:e,...t})=>h.createElement(eB,t,h.createElement(ej,null,e)),ej=e=>{let{stripe:t,externalClientSecret:r,stripeAppearance:n}=eE(),o=(()=>{let e=K(),t="en";try{t=e.__internal_getOption("localization")?.locale||"en"}catch{}return t.split("-")[0]})();return t&&r?h.createElement(e$,{key:r,stripe:t,options:{loader:"never",clientSecret:r,appearance:{variables:n},locale:o}},h.createElement(eL,null,e.children)):h.createElement(eM,null,e.children)},eU=({fallback:e})=>{let{setIsPaymentElementReady:t,paymentMethodOrder:r,checkout:n,stripe:o,externalClientSecret:a,paymentDescription:i,for:l}=eE(),s=K().__internal_environment,c=(0,h.useMemo)(()=>{if(n&&n.totals&&n.plan)return{recurringPaymentRequest:{paymentDescription:i||"",managementURL:"organization"===l?s?.displayConfig.organizationProfileUrl||"":s?.displayConfig.userProfileUrl||"",regularBilling:{amount:n.totals.totalDueNow?.amount||n.totals.grandTotal.amount,label:n.plan.name,recurringPaymentIntervalUnit:"annual"===n.planPeriod?"year":"month"}}}},[n,i,l,s]),d=(0,h.useMemo)(()=>({layout:{type:"tabs",defaultCollapsed:!1},paymentMethodOrder:r,applePay:c}),[c,r]),u=(0,h.useCallback)(()=>{t(!0)},[t]);return o&&a?h.createElement(eR,{fallback:e,onReady:u,options:d}):h.createElement(h.Fragment,null,e)},eW=()=>{throw Error("Clerk: Unable to submit, Stripe libraries are not yet loaded. Be sure to check `isFormReady` before calling `submit`.")},eH=()=>{let{isPaymentElementReady:e,initializePaymentMethod:t}=eE(),{stripe:r,elements:n}=eF(),{externalClientSecret:o}=eE(),a=(0,h.useCallback)(async()=>{if(!r||!n)return eW();let{setupIntent:e,error:t}=await r.confirmSetup({elements:n,confirmParams:{return_url:window.location.href},redirect:"if_required"});return t?{data:null,error:{gateway:"stripe",error:{code:t.code,message:t.message,type:t.type}}}:{data:{gateway:"stripe",paymentToken:e.payment_method},error:null}},[r,n]),i=(0,h.useCallback)(async()=>{if(!r||!n)return eW();await t()},[r,n,t]),l=!!(r&&o);return l?{submit:a,reset:i,isFormReady:e,provider:{name:"stripe"},isProviderReady:l}:{submit:eW,reset:eW,isFormReady:!1,provider:void 0,isProviderReady:!1}}},1483:function(e,t,r){r.d(t,{a:()=>a,o:()=>o}),r(1302);let n=new Set(["SignIn","SignUp"]);function o(e,t={}){return{event:"COMPONENT_MOUNTED",eventSamplingRate:n.has(e)?1:.1,payload:{component:e,...t}}}function a(e,t){return{event:"METHOD_CALLED",eventSamplingRate:.1,payload:{method:e,...t}}}},4525:function(e,t,r){r.d(t,{we:()=>n.o}),r(1302);var n=r(1483)},1302:function(e,t,r){function n(e){let t=e||"";return t.charAt(0).toUpperCase()+t.slice(1)}function o(e){return e?e.replace(/([-_][a-z])/g,e=>e.toUpperCase().replace(/-|_/,"")):""}function a(e){return e?e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`):""}r.d(t,{c:()=>n,s:()=>o,t:()=>a});let i=e=>{let t=r=>{if(!r)return r;if(Array.isArray(r))return r.map(e=>"object"==typeof e||Array.isArray(e)?t(e):e);let n={...r};for(let r of Object.keys(n)){let o=e(r.toString());o!==r&&(n[o]=n[r],delete n[r]),"object"==typeof n[o]&&(n[o]=t(n[o]))}return n};return t};i(a),i(o)},1044:function(e,t,r){r.d(t,{C8:()=>n.t,Ns:()=>n.c,sF:()=>n.s});var n=r(1302)},6308:function(e,t,r){r.d(t,{_:()=>_,b:()=>w,c:()=>$,g:()=>x,h:()=>g,l:()=>S,t:()=>m,u:()=>y,v:()=>b,w:()=>f,x:()=>h});var n=r(2311),o=r(212),a=r(4210),i=r(1302),l=r(2779),s=r(8902);let c="http://clerk-dummy",d=["javascript:"],u=["javascript:","data:","vbscript:","blob:"],{isDevOrStagingUrl:p}=(0,n.n)();function m(e,t={}){let{base:r,hashPath:n,hashSearch:o,searchParams:a,hashSearchParams:d,...u}=e,p=new URL(r||"","undefined"!=typeof window&&window.location?window.location.href:"http://react-native-fake-base-url");if(a instanceof URLSearchParams&&a.forEach((e,t)=>{null!=e&&p.searchParams.set((0,i.t)(t),e)}),Object.assign(p,u),n||o||d){let e=new URL(c+p.hash.substring(1));for(let[t,r]of(e.pathname=(0,l.t)(e.pathname,n||""),Object.entries((0,s.t)(o||""))))e.searchParams.append(t,r);if(d)for(let t of Array.isArray(d)?d:[d])(t instanceof URLSearchParams||"object"==typeof t)&&new URLSearchParams(t).forEach((t,r)=>{null!=t&&e.searchParams.set((0,i.t)(r),t)});let t=e.href.replace(c,"");"/"!==t&&(p.hash=t)}let{stringify:h,skipOrigin:f}=t;return h?f?p.href.replace(p.origin,""):p.href:p}function h(e){return void 0===window.location&&"string"==typeof e?e:(e=new URL(e.toString(),window.location.origin)).href.replace(e.origin,"")}let f=e=>(e||"").replace(/\/+$/,"");function g(e){if(!e)return!1;try{return new URL(e),!0}catch{return!1}}function b(e,t){try{return new URL(e)}catch{return new URL(e,t)}}let v=[/\0/,/^\/\//,/[\x00-\x1F]/];function y(e){return!!e&&!!g(e)&&"data:"===new URL(e).protocol}function w(e){if(!e||""===e.trim())return null;if(e.startsWith("/")||e.startsWith("#")||e.startsWith("?")||!e.includes(":"))return e;try{if(function(e){if(!g(e))return!1;let t=new URL(e).protocol;return u.some(e=>e===t)}(new URL(e)))return null;return e}catch{return e}}let $=e=>new URL(e,c).hash.startsWith("#/"),x=e=>{let t=new URL(e);if(!$(t))return t;let r=new URL(t.hash.replace("#/","/"),t.href),n=new URL([t.pathname,r.pathname].map(e=>e.split("/")).flat().filter(Boolean).join("/"),t.origin);return t.searchParams.forEach((e,t)=>{n.searchParams.set(t,e)}),r.searchParams.forEach((e,t)=>{n.searchParams.set(t,e)}),n},_=e=>e.replace(/CLERK-ROUTER\/(.*?)\//,""),S=(e,t)=>r=>{let n=r;if("string"==typeof n&&(n=b(n,t)),!e)return!0;let i=t===n.origin,l=!function(e){if(function(e){if(!g(e))return!1;let t=new URL(e).protocol;return d.some(e=>e===t)}(e))return!0;for(let t of v)if(t.test(e.pathname))return!0;return!1}(n)&&(i||e.map(e=>"string"==typeof e?o.t.toRegexp(f(e)):e).some(e=>e.test(f(n.origin))));return l||a.t.warnOnce(`Clerk: Redirect URL ${n} is not on one of the allowedRedirectOrigins, falling back to the default redirect URL.`),l}},5993:function(e,t,r){r.d(t,{s:()=>o});let n=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=e=>n.test(e)},9869:function(e,t,r){r.d(t,{n:()=>n});let n=(e,t)=>{if(e&&t)for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&null!==e[r]&&"object"==typeof e[r]?(void 0===t[r]&&(t[r]=new(Object.getPrototypeOf(e[r])).constructor),n(e[r],t[r])):Object.prototype.hasOwnProperty.call(e,r)&&void 0!==e[r]&&(t[r]=e[r])}},2620:function(e,t,r){r.d(t,{Bz:()=>o,nn:()=>a});let n=RegExp("bot|spider|crawl|APIs-Google|AdsBot|Googlebot|mediapartners|Google Favicon|FeedFetcher|Google-Read-Aloud|DuplexWeb-Google|googleweblight|bing|yandex|baidu|duckduck|yahoo|ecosia|ia_archiver|facebook|instagram|pinterest|reddit|slack|twitter|whatsapp|youtube|semrush","i");function o(){var e;let t;return!!(t="undefined"!=typeof window?window?.navigator:null)&&!((e=t?.userAgent)&&n.test(e))&&!t?.webdriver&&"function"==typeof window.PublicKeyCredential}async function a(){try{return o()&&await window.PublicKeyCredential.isConditionalMediationAvailable()}catch{return!1}}}}]);