@atproto/oauth-provider-ui 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-page-BWF2SB1c.js +20 -0
- package/dist/account-page-BWF2SB1c.js.map +1 -0
- package/dist/{admonition-CynrBtB4.js → admonition-yRjCycmU.js} +14 -14
- package/dist/admonition-yRjCycmU.js.map +1 -0
- package/dist/authorization-page-CVdjW3kW.js +6 -0
- package/dist/authorization-page-CVdjW3kW.js.map +1 -0
- package/dist/bundle-manifest.json +101 -101
- package/dist/{cookie-error-page-BaAfiN7q.js → cookie-error-page-Bkn1GFNn.js} +2 -2
- package/dist/cookie-error-page-Bkn1GFNn.js.map +1 -0
- package/dist/did-document-YkmTdTdF.js +60 -0
- package/dist/did-document-YkmTdTdF.js.map +1 -0
- package/dist/{error-page-BJWyhSsa.js → error-page-BNXmA0-7.js} +2 -2
- package/dist/{error-page-BJWyhSsa.js.map → error-page-BNXmA0-7.js.map} +1 -1
- package/dist/error-view-C10M9k8v.js +2 -0
- package/dist/{error-view-Bn_MnV68.js.map → error-view-C10M9k8v.js.map} +1 -1
- package/dist/{form-card-BodfR5wP.js → form-card-CGJ-DqBg.js} +2 -2
- package/dist/{form-card-BodfR5wP.js.map → form-card-CGJ-DqBg.js.map} +1 -1
- package/package.json +9 -9
- package/dist/account-page-Do28ZzQf.js +0 -20
- package/dist/account-page-Do28ZzQf.js.map +0 -1
- package/dist/admonition-CynrBtB4.js.map +0 -1
- package/dist/authorization-page-XxpDhuMt.js +0 -6
- package/dist/authorization-page-XxpDhuMt.js.map +0 -1
- package/dist/cookie-error-page-BaAfiN7q.js.map +0 -1
- package/dist/error-view-Bn_MnV68.js +0 -2
- package/dist/index-BtIdBUOA.js +0 -60
- package/dist/index-BtIdBUOA.js.map +0 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import{l as _c,m as gc,r as c,p as xe,j as f,R as et,n as ai,c as X,u as re,f as vc,L as yc,T as N,B as ge,o as Ec,A as si,b as ga,q as Pr}from"./admonition-yRjCycmU.js";import{A as xc,U as bc,a as Sc,b as wc,S as Tc,I as Cc}from"./error-view-C10M9k8v.js";import{F as ii,u as Rc}from"./form-card-CGJ-DqBg.js";var va=gc();const kc=_c(va),oi=c.createContext(null),vr={didCatch:!1,error:null};class nm extends c.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=vr}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:s,reason:"imperative-api"}),this.setState(vr)}}componentDidCatch(t,n){var r,a;(r=(a=this.props).onError)===null||r===void 0||r.call(a,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:a}=this.props;if(r&&n.error!==null&&Nc(t.resetKeys,a)){var s,i;(s=(i=this.props).onReset)===null||s===void 0||s.call(i,{next:a,prev:t.resetKeys,reason:"keys"}),this.setState(vr)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:a}=this.props,{didCatch:s,error:i}=this.state;let o=t;if(s){const l={error:i,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")o=n(l);else if(r)o=c.createElement(r,l);else if(a!==void 0)o=a;else throw i}return c.createElement(oi.Provider,{value:{didCatch:s,error:i,resetErrorBoundary:this.resetErrorBoundary}},o)}}function Nc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function Ac(e){if(e==null||typeof e.didCatch!="boolean"||typeof e.resetErrorBoundary!="function")throw new Error("ErrorBoundaryContext not found")}function jc(){const e=c.useContext(oi);Ac(e);const[t,n]=c.useState({error:null,hasError:!1}),r=c.useMemo(()=>({resetBoundary:()=>{e.resetErrorBoundary(),n({error:null,hasError:!1})},showBoundary:a=>n({error:a,hasError:!0})}),[e.resetErrorBoundary]);if(t.hasError)throw t.error;return r}const Dc=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,20a108,108,0,0,0,0,216c22.27,0,45.69-6.73,62.64-18a12,12,0,1,0-13.29-20c-13,8.63-31.89,14-49.35,14a84,84,0,1,1,84-84c0,9.29-1.67,17.08-4.69,21.95-2.64,4.24-6,6.05-11.31,6.05s-8.67-1.81-11.31-6.05c-3-4.87-4.69-12.66-4.69-21.95V88a12,12,0,0,0-23.49-3.46,52,52,0,1,0,8.86,79.57C172.3,174.3,182.81,180,196,180c24.67,0,40-19.92,40-52A108.12,108.12,0,0,0,128,20Zm0,136a28,28,0,1,1,28-28A28,28,0,0,1,128,156Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),c.createElement("path",{d:"M128,24a104,104,0,0,0,0,208c21.51,0,44.1-6.48,60.43-17.33a8,8,0,0,0-8.86-13.33C166,210.38,146.21,216,128,216a88,88,0,1,1,88-88c0,26.45-10.88,32-20,32s-20-5.55-20-32V88a8,8,0,0,0-16,0v4.26a48,48,0,1,0,5.93,65.1c6,12,16.35,18.64,30.07,18.64,22.54,0,36-17.94,36-48A104.11,104.11,0,0,0,128,24Zm0,136a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232,128c0,.51,0,1,0,1.52-.34,14.26-5.63,30.48-28,30.48-23.14,0-28-17.4-28-32V88a8,8,0,0,0-8.53-8A8.17,8.17,0,0,0,160,88.27v4a48,48,0,1,0,6.73,64.05,40.19,40.19,0,0,0,3.38,5C175.48,168,185.71,176,204,176a54.81,54.81,0,0,0,9.22-.75,4,4,0,0,1,4.09,6A104.05,104.05,0,0,1,125.91,232C71.13,230.9,26.2,186.86,24.08,132.11A104,104,0,1,1,232,128ZM96,128a32,32,0,1,0,32-32A32,32,0,0,0,96,128Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,26a102,102,0,0,0,0,204c21.13,0,43.31-6.35,59.32-17a6,6,0,0,0-6.65-10c-13.9,9.25-34.09,15-52.67,15a90,90,0,1,1,90-90c0,29.58-13.78,34-22,34s-22-4.42-22-34V88a6,6,0,0,0-12,0v9a46,46,0,1,0,4.34,56.32C171.76,166.6,182,174,196,174c21.29,0,34-17.2,34-46A102.12,102.12,0,0,0,128,26Zm0,136a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,24a104,104,0,0,0,0,208c21.51,0,44.1-6.48,60.43-17.33a8,8,0,0,0-8.86-13.33C166,210.38,146.21,216,128,216a88,88,0,1,1,88-88c0,26.45-10.88,32-20,32s-20-5.55-20-32V88a8,8,0,0,0-16,0v4.26a48,48,0,1,0,5.93,65.1c6,12,16.35,18.64,30.07,18.64,22.54,0,36-17.94,36-48A104.11,104.11,0,0,0,128,24Zm0,136a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,28a100,100,0,0,0,0,200c20.76,0,42.52-6.23,58.21-16.66a4,4,0,1,0-4.43-6.67C167.35,214.27,147.24,220,128,220a92,92,0,1,1,92-92c0,31.32-15,36-24,36s-24-4.68-24-36V88a4,4,0,0,0-8,0v14.75a44,44,0,1,0,2.82,45.94C171.46,163.58,181.66,172,196,172c20,0,32-16.45,32-44A100.11,100.11,0,0,0,128,28Zm0,136a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),Ic=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),c.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),Oc=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),c.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),Mc=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),c.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),Pc=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),c.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M96.68,57.87a4,4,0,0,1,2.08-6.6A130.13,130.13,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41a8,8,0,0,1,0,6.5c-.35.79-8.82,19.57-27.65,38.4q-4.28,4.26-8.79,8.07a4,4,0,0,1-5.55-.36ZM213.92,210.62a8,8,0,1,1-11.84,10.76L180,197.13A127.21,127.21,0,0,1,128,208c-34.88,0-66.57-13.26-91.66-38.34C17.51,150.83,9,132.05,8.69,131.26a8,8,0,0,1,0-6.5C9,124,17.51,105.18,36.34,86.35a135,135,0,0,1,25-19.78L42.08,45.38A8,8,0,1,1,53.92,34.62Zm-65.49-48.25-52.69-58a40,40,0,0,0,52.69,58Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M52.44,36A6,6,0,0,0,43.56,44L64.44,67c-37.28,21.9-53.23,57-53.92,58.57a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206a124.91,124.91,0,0,0,52.57-11.25l23,25.29a6,6,0,0,0,8.88-8.08Zm48.62,71.32,45,49.52a34,34,0,0,1-45-49.52ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.57,134.57,0,0,1,22.69,128c4.29-8.2,20.1-35.18,50-51.91L92.89,98.3a46,46,0,0,0,61.35,67.48l17.81,19.6A113.47,113.47,0,0,1,128,194Zm6.4-99.4a6,6,0,0,1,2.25-11.79,46.17,46.17,0,0,1,37.15,40.87,6,6,0,0,1-5.42,6.53l-.56,0a6,6,0,0,1-6-5.45A34.1,34.1,0,0,0,134.4,94.6Zm111.08,35.85c-.41.92-10.37,23-32.86,43.12a6,6,0,1,1-8-8.94A134.07,134.07,0,0,0,233.31,128a134.67,134.67,0,0,0-23.86-32.07C186.78,73.42,159.38,62,128,62a120.19,120.19,0,0,0-19.69,1.6,6,6,0,1,1-2-11.83A131.12,131.12,0,0,1,128,50c43.38,0,73,20.54,90.24,37.76,18.58,18.58,26.9,37,27.24,37.81A6,6,0,0,1,245.48,130.45Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M51,37.31A4,4,0,0,0,45,42.69L67.59,67.5C29.34,89,13,124.81,12.34,126.38a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17a122.59,122.59,0,0,0,53.06-11.69l24,26.38a4,4,0,1,0,5.92-5.38ZM149.1,157.16A36,36,0,0,1,101,104.22ZM128,196c-32,0-59.89-11.65-83-34.62A135.81,135.81,0,0,1,20.44,128c3.65-7.23,20.09-36.81,52.68-54.43l22.45,24.7a44,44,0,0,0,59,64.83l20.89,23A114.94,114.94,0,0,1,128,196Zm6.78-103.36a4,4,0,0,1,1.49-7.86,44.15,44.15,0,0,1,35.54,39.09,4,4,0,0,1-3.61,4.35l-.38,0a4,4,0,0,1-4-3.63A36.1,36.1,0,0,0,134.78,92.64Zm108.88,37c-.41.91-10.2,22.58-32.38,42.45a4,4,0,0,1-2.67,1,4,4,0,0,1-2.67-7A136.71,136.71,0,0,0,235.56,128,136.07,136.07,0,0,0,211,94.62C187.89,71.65,160,60,128,60a122,122,0,0,0-20,1.63,4,4,0,0,1-1.32-7.89A129.3,129.3,0,0,1,128,52c42.7,0,71.87,20.22,88.83,37.18,18.31,18.31,26.49,36.44,26.83,37.2A4.08,4.08,0,0,1,243.66,129.63Z"}))]]),Lc=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M196,76a16,16,0,1,1-16-16A16,16,0,0,1,196,76Zm48,22.74A84.3,84.3,0,0,1,160.11,180H160a83.52,83.52,0,0,1-23.65-3.38l-7.86,7.87A12,12,0,0,1,120,188H108v12a12,12,0,0,1-12,12H84v12a12,12,0,0,1-12,12H40a20,20,0,0,1-20-20V187.31a19.86,19.86,0,0,1,5.86-14.14l53.52-53.52A84,84,0,1,1,244,98.74ZM202.43,53.57A59.48,59.48,0,0,0,158,36c-32,1-58,27.89-58,59.89a59.69,59.69,0,0,0,4.2,22.19,12,12,0,0,1-2.55,13.21L44,189v23H60V200a12,12,0,0,1,12-12H84V176a12,12,0,0,1,12-12h19l9.65-9.65a12,12,0,0,1,13.22-2.55A59.58,59.58,0,0,0,160,156h.08c32,0,58.87-26.07,59.89-58A59.55,59.55,0,0,0,202.43,53.57Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232,98.36C230.73,136.92,198.67,168,160.09,168a71.68,71.68,0,0,1-26.92-5.17h0L120,176H96v24H72v24H40a8,8,0,0,1-8-8V187.31a8,8,0,0,1,2.34-5.65l58.83-58.83h0A71.68,71.68,0,0,1,88,95.91c0-38.58,31.08-70.64,69.64-71.87A72,72,0,0,1,232,98.36Z",opacity:"0.2"}),c.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM180,92a16,16,0,1,1,16-16A16,16,0,0,1,180,92Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M215.15,40.85A78,78,0,0,0,86.2,121.31l-56.1,56.1a13.94,13.94,0,0,0-4.1,9.9V216a14,14,0,0,0,14,14H72a6,6,0,0,0,6-6V206H96a6,6,0,0,0,6-6V182h18a6,6,0,0,0,4.24-1.76l10.45-10.44A77.59,77.59,0,0,0,160,174h.1A78,78,0,0,0,215.15,40.85ZM226,98.16c-1.12,35.16-30.67,63.8-65.88,63.84a65.93,65.93,0,0,1-24.51-4.67,6,6,0,0,0-6.64,1.26L117.51,170H96a6,6,0,0,0-6,6v18H72a6,6,0,0,0-6,6v18H40a2,2,0,0,1-2-2V187.31a2,2,0,0,1,.58-1.41l58.83-58.83a6,6,0,0,0,1.26-6.64A65.61,65.61,0,0,1,94,95.92C94,60.71,122.68,31.16,157.83,30A66,66,0,0,1,226,98.16ZM190,76a10,10,0,1,1-10-10A10,10,0,0,1,190,76Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M213.74,42.26A76,76,0,0,0,88.51,121.84l-57,57A11.93,11.93,0,0,0,28,187.31V216a12,12,0,0,0,12,12H72a4,4,0,0,0,4-4V204H96a4,4,0,0,0,4-4V180h20a4,4,0,0,0,2.83-1.17l11.33-11.34A75.72,75.72,0,0,0,160,172h.1A76,76,0,0,0,213.74,42.26Zm14.22,56c-1.15,36.22-31.6,65.72-67.87,65.77H160a67.52,67.52,0,0,1-25.21-4.83,4,4,0,0,0-4.45.83l-12,12H96a4,4,0,0,0-4,4v20H72a4,4,0,0,0-4,4v20H40a4,4,0,0,1-4-4V187.31a4.06,4.06,0,0,1,1.17-2.83L96,125.66a4,4,0,0,0,.83-4.45A67.51,67.51,0,0,1,92,95.91C92,59.64,121.55,29.19,157.77,28A68,68,0,0,1,228,98.23ZM188,76a8,8,0,1,1-8-8A8,8,0,0,1,188,76Z"}))]]),Zc=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M84,48A20,20,0,1,1,64,28,20,20,0,0,1,84,48Zm44-20a20,20,0,1,0,20,20A20,20,0,0,0,128,28Zm64,40a20,20,0,1,0-20-20A20,20,0,0,0,192,68ZM64,84a20,20,0,1,0,20,20A20,20,0,0,0,64,84Zm64,0a20,20,0,1,0,20,20A20,20,0,0,0,128,84Zm64,0a20,20,0,1,0,20,20A20,20,0,0,0,192,84ZM64,140a20,20,0,1,0,20,20A20,20,0,0,0,64,140Zm64,0a20,20,0,1,0,20,20A20,20,0,0,0,128,140Zm0,56a20,20,0,1,0,20,20A20,20,0,0,0,128,196Zm64-56a20,20,0,1,0,20,20A20,20,0,0,0,192,140Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M192,48V200a16,16,0,0,1-16,16H80a16,16,0,0,1-16-16V48Z",opacity:"0.2"}),c.createElement("path",{d:"M80,48A16,16,0,1,1,64,32,16,16,0,0,1,80,48Zm48-16a16,16,0,1,0,16,16A16,16,0,0,0,128,32Zm64,32a16,16,0,1,0-16-16A16,16,0,0,0,192,64ZM64,88a16,16,0,1,0,16,16A16,16,0,0,0,64,88Zm64,0a16,16,0,1,0,16,16A16,16,0,0,0,128,88Zm64,0a16,16,0,1,0,16,16A16,16,0,0,0,192,88ZM64,144a16,16,0,1,0,16,16A16,16,0,0,0,64,144Zm64,0a16,16,0,1,0,16,16A16,16,0,0,0,128,144Zm0,56a16,16,0,1,0,16,16A16,16,0,0,0,128,200Zm64-56a16,16,0,1,0,16,16A16,16,0,0,0,192,144Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24ZM80,164a12,12,0,1,1,12-12A12,12,0,0,1,80,164Zm0-40a12,12,0,1,1,12-12A12,12,0,0,1,80,124Zm0-40A12,12,0,1,1,92,72,12,12,0,0,1,80,84Zm48,120a12,12,0,1,1,12-12A12,12,0,0,1,128,204Zm0-40a12,12,0,1,1,12-12A12,12,0,0,1,128,164Zm0-40a12,12,0,1,1,12-12A12,12,0,0,1,128,124Zm0-40a12,12,0,1,1,12-12A12,12,0,0,1,128,84Zm48,80a12,12,0,1,1,12-12A12,12,0,0,1,176,164Zm0-40a12,12,0,1,1,12-12A12,12,0,0,1,176,124Zm0-40a12,12,0,1,1,12-12A12,12,0,0,1,176,84Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M78,48A14,14,0,1,1,64,34,14,14,0,0,1,78,48Zm50-14a14,14,0,1,0,14,14A14,14,0,0,0,128,34Zm64,28a14,14,0,1,0-14-14A14,14,0,0,0,192,62ZM64,90a14,14,0,1,0,14,14A14,14,0,0,0,64,90Zm64,0a14,14,0,1,0,14,14A14,14,0,0,0,128,90Zm64,0a14,14,0,1,0,14,14A14,14,0,0,0,192,90ZM64,146a14,14,0,1,0,14,14A14,14,0,0,0,64,146Zm64,0a14,14,0,1,0,14,14A14,14,0,0,0,128,146Zm0,56a14,14,0,1,0,14,14A14,14,0,0,0,128,202Zm64-56a14,14,0,1,0,14,14A14,14,0,0,0,192,146Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M80,48A16,16,0,1,1,64,32,16,16,0,0,1,80,48Zm48-16a16,16,0,1,0,16,16A16,16,0,0,0,128,32Zm64,32a16,16,0,1,0-16-16A16,16,0,0,0,192,64ZM64,88a16,16,0,1,0,16,16A16,16,0,0,0,64,88Zm64,0a16,16,0,1,0,16,16A16,16,0,0,0,128,88Zm64,0a16,16,0,1,0,16,16A16,16,0,0,0,192,88ZM64,144a16,16,0,1,0,16,16A16,16,0,0,0,64,144Zm64,0a16,16,0,1,0,16,16A16,16,0,0,0,128,144Zm0,56a16,16,0,1,0,16,16A16,16,0,0,0,128,200Zm64-56a16,16,0,1,0,16,16A16,16,0,0,0,192,144Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M76,48A12,12,0,1,1,64,36,12,12,0,0,1,76,48Zm52-12a12,12,0,1,0,12,12A12,12,0,0,0,128,36Zm64,24a12,12,0,1,0-12-12A12,12,0,0,0,192,60ZM64,92a12,12,0,1,0,12,12A12,12,0,0,0,64,92Zm64,0a12,12,0,1,0,12,12A12,12,0,0,0,128,92Zm64,0a12,12,0,1,0,12,12A12,12,0,0,0,192,92ZM64,148a12,12,0,1,0,12,12A12,12,0,0,0,64,148Zm64,0a12,12,0,1,0,12,12A12,12,0,0,0,128,148Zm0,56a12,12,0,1,0,12,12A12,12,0,0,0,128,204Zm64-56a12,12,0,1,0,12,12A12,12,0,0,0,192,148Z"}))]]),$c=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M144,180a16,16,0,1,1-16-16A16,16,0,0,1,144,180Zm92-52A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128ZM128,64c-24.26,0-44,17.94-44,40v4a12,12,0,0,0,24,0v-4c0-8.82,9-16,20-16s20,7.18,20,16-9,16-20,16a12,12,0,0,0-12,12v8a12,12,0,0,0,23.73,2.56C158.31,137.88,172,122.37,172,104,172,81.94,152.26,64,128,64Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),c.createElement("path",{d:"M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,168a12,12,0,1,1,12-12A12,12,0,0,1,128,192Zm8-48.72V144a8,8,0,0,1-16,0v-8a8,8,0,0,1,8-8c13.23,0,24-9,24-20s-10.77-20-24-20-24,9-24,20v4a8,8,0,0,1-16,0v-4c0-19.85,17.94-36,40-36s40,16.15,40,36C168,125.38,154.24,139.93,136,143.28Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M138,180a10,10,0,1,1-10-10A10,10,0,0,1,138,180ZM128,74c-21,0-38,15.25-38,34v4a6,6,0,0,0,12,0v-4c0-12.13,11.66-22,26-22s26,9.87,26,22-11.66,22-26,22a6,6,0,0,0-6,6v8a6,6,0,0,0,12,0v-2.42c18.11-2.58,32-16.66,32-33.58C166,89.25,149,74,128,74Zm102,54A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M136,180a8,8,0,1,1-8-8A8,8,0,0,1,136,180ZM128,76c-19.85,0-36,14.36-36,32v4a4,4,0,0,0,8,0v-4c0-13.23,12.56-24,28-24s28,10.77,28,24-12.56,24-28,24a4,4,0,0,0-4,4v8a4,4,0,0,0,8,0v-4.2c18-1.77,32-15.36,32-31.8C164,90.36,147.85,76,128,76Zm100,52A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),Uc=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232,108a12,12,0,0,0,12-12V64a20,20,0,0,0-20-20H32A20,20,0,0,0,12,64V96a12,12,0,0,0,12,12,20,20,0,0,1,0,40,12,12,0,0,0-12,12v32a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V160a12,12,0,0,0-12-12,20,20,0,0,1,0-40ZM36,170.34a44,44,0,0,0,0-84.68V68H88V188H36Zm184,0V188H112V68H220V85.66a44,44,0,0,0,0,84.68Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,128a32,32,0,0,0,32,32v32a8,8,0,0,1-8,8H96V56H224a8,8,0,0,1,8,8V96A32,32,0,0,0,200,128Z",opacity:"0.2"}),c.createElement("path",{d:"M232,104a8,8,0,0,0,8-8V64a16,16,0,0,0-16-16H32A16,16,0,0,0,16,64V96a8,8,0,0,0,8,8,24,24,0,0,1,0,48,8,8,0,0,0-8,8v32a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V160a8,8,0,0,0-8-8,24,24,0,0,1,0-48ZM32,167.2a40,40,0,0,0,0-78.4V64H88V192H32Zm192,0V192H104V64H224V88.8a40,40,0,0,0,0,78.4Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232,104a8,8,0,0,0,8-8V64a16,16,0,0,0-16-16H32A16,16,0,0,0,16,64V96a8,8,0,0,0,8,8,24,24,0,0,1,0,48,8,8,0,0,0-8,8v32a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V160a8,8,0,0,0-8-8,24,24,0,0,1,0-48ZM32,167.2a40,40,0,0,0,0-78.4V64H88V192H32Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232,102a6,6,0,0,0,6-6V64a14,14,0,0,0-14-14H32A14,14,0,0,0,18,64V96a6,6,0,0,0,6,6,26,26,0,0,1,0,52,6,6,0,0,0-6,6v32a14,14,0,0,0,14,14H224a14,14,0,0,0,14-14V160a6,6,0,0,0-6-6,26,26,0,0,1,0-52ZM30,192V165.53a38,38,0,0,0,0-75.06V64a2,2,0,0,1,2-2H90V194H32A2,2,0,0,1,30,192Zm196-26.47V192a2,2,0,0,1-2,2H102V62H224a2,2,0,0,1,2,2V90.47a38,38,0,0,0,0,75.06Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232,104a8,8,0,0,0,8-8V64a16,16,0,0,0-16-16H32A16,16,0,0,0,16,64V96a8,8,0,0,0,8,8,24,24,0,0,1,0,48,8,8,0,0,0-8,8v32a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V160a8,8,0,0,0-8-8,24,24,0,0,1,0-48ZM32,167.2a40,40,0,0,0,0-78.4V64H88V192H32Zm192,0V192H104V64H224V88.8a40,40,0,0,0,0,78.4Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232,100a4,4,0,0,0,4-4V64a12,12,0,0,0-12-12H32A12,12,0,0,0,20,64V96a4,4,0,0,0,4,4,28,28,0,0,1,0,56,4,4,0,0,0-4,4v32a12,12,0,0,0,12,12H224a12,12,0,0,0,12-12V160a4,4,0,0,0-4-4,28,28,0,0,1,0-56ZM28,192V163.78a36,36,0,0,0,0-71.56V64a4,4,0,0,1,4-4H92V196H32A4,4,0,0,1,28,192Zm168-64a36.06,36.06,0,0,0,32,35.78V192a4,4,0,0,1-4,4H100V60H224a4,4,0,0,1,4,4V92.22A36.06,36.06,0,0,0,196,128Z"}))]]),Bc=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M234.38,210a123.36,123.36,0,0,0-60.78-53.23,76,76,0,1,0-91.2,0A123.36,123.36,0,0,0,21.62,210a12,12,0,1,0,20.77,12c18.12-31.32,50.12-50,85.61-50s67.49,18.69,85.61,50a12,12,0,0,0,20.77-12ZM76,96a52,52,0,1,1,52,52A52.06,52.06,0,0,1,76,96Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M192,96a64,64,0,1,1-64-64A64,64,0,0,1,192,96Z",opacity:"0.2"}),c.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M230.93,220a8,8,0,0,1-6.93,4H32a8,8,0,0,1-6.92-12c15.23-26.33,38.7-45.21,66.09-54.16a72,72,0,1,1,73.66,0c27.39,8.95,50.86,27.83,66.09,54.16A8,8,0,0,1,230.93,220Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M229.19,213c-15.81-27.32-40.63-46.49-69.47-54.62a70,70,0,1,0-63.44,0C67.44,166.5,42.62,185.67,26.81,213a6,6,0,1,0,10.38,6C56.4,185.81,90.34,166,128,166s71.6,19.81,90.81,53a6,6,0,1,0,10.38-6ZM70,96a58,58,0,1,1,58,58A58.07,58.07,0,0,1,70,96Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M227.46,214c-16.52-28.56-43-48.06-73.68-55.09a68,68,0,1,0-51.56,0c-30.64,7-57.16,26.53-73.68,55.09a4,4,0,0,0,6.92,4C55,184.19,89.62,164,128,164s73,20.19,92.54,54a4,4,0,0,0,3.46,2,3.93,3.93,0,0,0,2-.54A4,4,0,0,0,227.46,214ZM68,96a60,60,0,1,1,60,60A60.07,60.07,0,0,1,68,96Z"}))]]),Fc=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),c.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),It=c.forwardRef((e,t)=>c.createElement(xe,{ref:t,...e,weights:Dc}));It.displayName="AtIcon";const Lr=c.forwardRef((e,t)=>c.createElement(xe,{ref:t,...e,weights:Ic}));Lr.displayName="CaretRightIcon";const ci=c.forwardRef((e,t)=>c.createElement(xe,{ref:t,...e,weights:Oc}));ci.displayName="CheckIcon";const li=c.forwardRef((e,t)=>c.createElement(xe,{ref:t,...e,weights:Mc}));li.displayName="EyeIcon";const ui=c.forwardRef((e,t)=>c.createElement(xe,{ref:t,...e,weights:Pc}));ui.displayName="EyeSlashIcon";const di=c.forwardRef((e,t)=>c.createElement(xe,{ref:t,...e,weights:Lc}));di.displayName="KeyIcon";const fi=c.forwardRef((e,t)=>c.createElement(xe,{ref:t,...e,weights:Zc}));fi.displayName="NumpadIcon";const Vc=c.forwardRef((e,t)=>c.createElement(xe,{ref:t,...e,weights:$c}));Vc.displayName="QuestionIcon";const hi=c.forwardRef((e,t)=>c.createElement(xe,{ref:t,...e,weights:Uc}));hi.displayName="TicketIcon";const pi=c.forwardRef((e,t)=>c.createElement(xe,{ref:t,...e,weights:Bc}));pi.displayName="UserIcon";const ya=c.forwardRef((e,t)=>c.createElement(xe,{ref:t,...e,weights:Fc}));ya.displayName="XIcon";function le(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Ka(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mi(...e){return t=>{let n=!1;const r=e.map(a=>{const s=Ka(a,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let a=0;a<r.length;a++){const s=r[a];typeof s=="function"?s():Ka(e[a],null)}}}}function Ge(...e){return c.useCallback(mi(...e),e)}function rm(e,t){const n=c.createContext(t),r=s=>{const{children:i,...o}=s,l=c.useMemo(()=>o,Object.values(o));return f.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function a(s){const i=c.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,a]}function _i(e,t=[]){let n=[];function r(s,i){const o=c.createContext(i),l=n.length;n=[...n,i];const u=h=>{var E;const{scope:p,children:_,...v}=h,g=((E=p==null?void 0:p[e])==null?void 0:E[l])||o,m=c.useMemo(()=>v,Object.values(v));return f.jsx(g.Provider,{value:m,children:_})};u.displayName=s+"Provider";function d(h,p){var g;const _=((g=p==null?void 0:p[e])==null?void 0:g[l])||o,v=c.useContext(_);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[u,d]}const a=()=>{const s=n.map(i=>c.createContext(i));return function(o){const l=(o==null?void 0:o[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return a.scopeName=e,[r,Hc(a,...t)]}function Hc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const i=r.reduce((o,{useScope:l,scopeName:u})=>{const h=l(s)[`__scope${u}`];return{...o,...h}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Zr(e){const t=Yc(e),n=c.forwardRef((r,a)=>{const{children:s,...i}=r,o=c.Children.toArray(s),l=o.find(zc);if(l){const u=l.props.children,d=o.map(h=>h===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:h);return f.jsx(t,{...i,ref:a,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:a,children:s})});return n.displayName=`${e}.Slot`,n}function Yc(e){const t=c.forwardRef((n,r)=>{const{children:a,...s}=n;if(c.isValidElement(a)){const i=qc(a),o=Wc(s,a.props);return a.type!==c.Fragment&&(o.ref=r?mi(r,i):i),c.cloneElement(a,o)}return c.Children.count(a)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gc=Symbol("radix.slottable");function zc(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gc}function Wc(e,t){const n={...t};for(const r in t){const a=e[r],s=t[r];/^on[A-Z]/.test(r)?a&&s?n[r]=(...o)=>{const l=s(...o);return a(...o),l}:a&&(n[r]=a):r==="style"?n[r]={...a,...s}:r==="className"&&(n[r]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}function qc(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Kc(e){const t=e+"CollectionProvider",[n,r]=_i(t),[a,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:m,children:E}=g,x=et.useRef(null),b=et.useRef(new Map).current;return f.jsx(a,{scope:m,itemMap:b,collectionRef:x,children:E})};i.displayName=t;const o=e+"CollectionSlot",l=Zr(o),u=et.forwardRef((g,m)=>{const{scope:E,children:x}=g,b=s(o,E),w=Ge(m,b.collectionRef);return f.jsx(l,{ref:w,children:x})});u.displayName=o;const d=e+"CollectionItemSlot",h="data-radix-collection-item",p=Zr(d),_=et.forwardRef((g,m)=>{const{scope:E,children:x,...b}=g,w=et.useRef(null),R=Ge(m,w),A=s(d,E);return et.useEffect(()=>(A.itemMap.set(w,{ref:w,...b}),()=>void A.itemMap.delete(w))),f.jsx(p,{[h]:"",ref:R,children:x})});_.displayName=d;function v(g){const m=s(e+"CollectionConsumer",g);return et.useCallback(()=>{const x=m.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${h}]`));return Array.from(m.itemMap.values()).sort((A,j)=>b.indexOf(A.ref.current)-b.indexOf(j.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:i,Slot:u,ItemSlot:_},v,r]}var Xc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],be=Xc.reduce((e,t)=>{const n=Zr(`Primitive.${t}`),r=c.forwardRef((a,s)=>{const{asChild:i,...o}=a,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(l,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function gi(e,t){e&&va.flushSync(()=>e.dispatchEvent(t))}function $e(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Jc(e,t=globalThis==null?void 0:globalThis.document){const n=$e(e);c.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Qc="DismissableLayer",$r="dismissableLayer.update",el="dismissableLayer.pointerDownOutside",tl="dismissableLayer.focusOutside",Xa,vi=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yi=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:i,onDismiss:o,...l}=e,u=c.useContext(vi),[d,h]=c.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,_]=c.useState({}),v=Ge(t,j=>h(j)),g=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),E=g.indexOf(m),x=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,w=x>=E,R=rl(j=>{const U=j.target,z=[...u.branches].some(O=>O.contains(U));!w||z||(a==null||a(j),i==null||i(j),j.defaultPrevented||o==null||o())},p),A=al(j=>{const U=j.target;[...u.branches].some(O=>O.contains(U))||(s==null||s(j),i==null||i(j),j.defaultPrevented||o==null||o())},p);return Jc(j=>{x===u.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&o&&(j.preventDefault(),o()))},p),c.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Xa=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ja(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Xa)}},[d,p,n,u]),c.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ja())},[d,u]),c.useEffect(()=>{const j=()=>_({});return document.addEventListener($r,j),()=>document.removeEventListener($r,j)},[]),f.jsx(be.div,{...l,ref:v,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:le(e.onFocusCapture,A.onFocusCapture),onBlurCapture:le(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:le(e.onPointerDownCapture,R.onPointerDownCapture)})});yi.displayName=Qc;var nl="DismissableLayerBranch",Ei=c.forwardRef((e,t)=>{const n=c.useContext(vi),r=c.useRef(null),a=Ge(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsx(be.div,{...e,ref:a})});Ei.displayName=nl;function rl(e,t=globalThis==null?void 0:globalThis.document){const n=$e(e),r=c.useRef(!1),a=c.useRef(()=>{});return c.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let l=function(){xi(el,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=l,t.addEventListener("click",a.current,{once:!0})):l()}else t.removeEventListener("click",a.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function al(e,t=globalThis==null?void 0:globalThis.document){const n=$e(e),r=c.useRef(!1);return c.useEffect(()=>{const a=s=>{s.target&&!r.current&&xi(tl,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ja(){const e=new CustomEvent($r);document.dispatchEvent(e)}function xi(e,t,n,{discrete:r}){const a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?gi(a,s):a.dispatchEvent(s)}var sl=yi,il=Ei,wt=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},ol="Portal",bi=c.forwardRef((e,t)=>{var o;const{container:n,...r}=e,[a,s]=c.useState(!1);wt(()=>s(!0),[]);const i=n||a&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return i?kc.createPortal(f.jsx(be.div,{...r,ref:t}),i):null});bi.displayName=ol;function cl(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Si=e=>{const{present:t,children:n}=e,r=ll(t),a=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=Ge(r.ref,ul(a));return typeof n=="function"||r.isPresent?c.cloneElement(a,{ref:s}):null};Si.displayName="Presence";function ll(e){const[t,n]=c.useState(),r=c.useRef(null),a=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[o,l]=cl(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=_n(r.current);s.current=o==="mounted"?u:"none"},[o]),wt(()=>{const u=r.current,d=a.current;if(d!==e){const p=s.current,_=_n(u);e?l("MOUNT"):_==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&p!==_?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),wt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=_=>{const g=_n(r.current).includes(CSS.escape(_.animationName));if(_.target===t&&g&&(l("ANIMATION_END"),!a.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},p=_=>{_.target===t&&(s.current=_n(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:c.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function _n(e){return(e==null?void 0:e.animationName)||"none"}function ul(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var dl=ai[" useInsertionEffect ".trim().toString()]||wt;function fl({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,s,i]=hl({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:a;{const d=c.useRef(e!==void 0);c.useEffect(()=>{const h=d.current;h!==o&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=o},[o,r])}const u=c.useCallback(d=>{var h;if(o){const p=pl(d)?d(e):d;p!==e&&((h=i.current)==null||h.call(i,p))}else s(d)},[o,e,s,i]);return[l,u]}function hl({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),a=c.useRef(n),s=c.useRef(t);return dl(()=>{s.current=t},[t]),c.useEffect(()=>{var i;a.current!==n&&((i=s.current)==null||i.call(s,n),a.current=n)},[n,a]),[n,r,s]}function pl(e){return typeof e=="function"}var ml=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),_l="VisuallyHidden",Ea=c.forwardRef((e,t)=>f.jsx(be.span,{...e,ref:t,style:{...ml,...e.style}}));Ea.displayName=_l;var xa="ToastProvider",[ba,gl,vl]=Kc("Toast"),[wi,am]=_i("Toast",[vl]),[yl,nr]=wi(xa),Ti=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:s=50,children:i}=e,[o,l]=c.useState(null),[u,d]=c.useState(0),h=c.useRef(!1),p=c.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${xa}\`. Expected non-empty \`string\`.`),f.jsx(ba.Provider,{scope:t,children:f.jsx(yl,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:s,toastCount:u,viewport:o,onViewportChange:l,onToastAdd:c.useCallback(()=>d(_=>_+1),[]),onToastRemove:c.useCallback(()=>d(_=>_-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:i})})};Ti.displayName=xa;var Ci="ToastViewport",El=["F8"],Ur="toast.viewportPause",Br="toast.viewportResume",Ri=c.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=El,label:a="Notifications ({hotkey})",...s}=e,i=nr(Ci,n),o=gl(n),l=c.useRef(null),u=c.useRef(null),d=c.useRef(null),h=c.useRef(null),p=Ge(t,h,i.onViewportChange),_=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=i.toastCount>0;c.useEffect(()=>{const m=E=>{var b;r.length!==0&&r.every(w=>E[w]||E.code===w)&&((b=h.current)==null||b.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[r]),c.useEffect(()=>{const m=l.current,E=h.current;if(v&&m&&E){const x=()=>{if(!i.isClosePausedRef.current){const A=new CustomEvent(Ur);E.dispatchEvent(A),i.isClosePausedRef.current=!0}},b=()=>{if(i.isClosePausedRef.current){const A=new CustomEvent(Br);E.dispatchEvent(A),i.isClosePausedRef.current=!1}},w=A=>{!m.contains(A.relatedTarget)&&b()},R=()=>{m.contains(document.activeElement)||b()};return m.addEventListener("focusin",x),m.addEventListener("focusout",w),m.addEventListener("pointermove",x),m.addEventListener("pointerleave",R),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{m.removeEventListener("focusin",x),m.removeEventListener("focusout",w),m.removeEventListener("pointermove",x),m.removeEventListener("pointerleave",R),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[v,i.isClosePausedRef]);const g=c.useCallback(({tabbingDirection:m})=>{const x=o().map(b=>{const w=b.ref.current,R=[w,...Ol(w)];return m==="forwards"?R:R.reverse()});return(m==="forwards"?x.reverse():x).flat()},[o]);return c.useEffect(()=>{const m=h.current;if(m){const E=x=>{var R,A,j;const b=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!b){const U=document.activeElement,z=x.shiftKey;if(x.target===m&&z){(R=u.current)==null||R.focus();return}const H=g({tabbingDirection:z?"backwards":"forwards"}),de=H.findIndex(L=>L===U);yr(H.slice(de+1))?x.preventDefault():z?(A=u.current)==null||A.focus():(j=d.current)==null||j.focus()}};return m.addEventListener("keydown",E),()=>m.removeEventListener("keydown",E)}},[o,g]),f.jsxs(il,{ref:l,role:"region","aria-label":a.replace("{hotkey}",_),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&f.jsx(Fr,{ref:u,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"forwards"});yr(m)}}),f.jsx(ba.Slot,{scope:n,children:f.jsx(be.ol,{tabIndex:-1,...s,ref:p})}),v&&f.jsx(Fr,{ref:d,onFocusFromOutsideViewport:()=>{const m=g({tabbingDirection:"backwards"});yr(m)}})]})});Ri.displayName=Ci;var ki="ToastFocusProxy",Fr=c.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,s=nr(ki,n);return f.jsx(Ea,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const o=i.relatedTarget;!((u=s.viewport)!=null&&u.contains(o))&&r()}})});Fr.displayName=ki;var sn="Toast",xl="toast.swipeStart",bl="toast.swipeMove",Sl="toast.swipeCancel",wl="toast.swipeEnd",Ni=c.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:s,...i}=e,[o,l]=fl({prop:r,defaultProp:a??!0,onChange:s,caller:sn});return f.jsx(Si,{present:n||o,children:f.jsx(Rl,{open:o,...i,ref:t,onClose:()=>l(!1),onPause:$e(e.onPause),onResume:$e(e.onResume),onSwipeStart:le(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:le(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:le(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:le(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});Ni.displayName=sn;var[Tl,Cl]=wi(sn,{onClose(){}}),Rl=c.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:a,open:s,onClose:i,onEscapeKeyDown:o,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:_,...v}=e,g=nr(sn,n),[m,E]=c.useState(null),x=Ge(t,L=>E(L)),b=c.useRef(null),w=c.useRef(null),R=a||g.duration,A=c.useRef(0),j=c.useRef(R),U=c.useRef(0),{onToastAdd:z,onToastRemove:O}=g,I=$e(()=>{var se;(m==null?void 0:m.contains(document.activeElement))&&((se=g.viewport)==null||se.focus()),i()}),H=c.useCallback(L=>{!L||L===1/0||(window.clearTimeout(U.current),A.current=new Date().getTime(),U.current=window.setTimeout(I,L))},[I]);c.useEffect(()=>{const L=g.viewport;if(L){const se=()=>{H(j.current),u==null||u()},q=()=>{const J=new Date().getTime()-A.current;j.current=j.current-J,window.clearTimeout(U.current),l==null||l()};return L.addEventListener(Ur,q),L.addEventListener(Br,se),()=>{L.removeEventListener(Ur,q),L.removeEventListener(Br,se)}}},[g.viewport,R,l,u,H]),c.useEffect(()=>{s&&!g.isClosePausedRef.current&&H(R)},[s,R,g.isClosePausedRef,H]),c.useEffect(()=>(z(),()=>O()),[z,O]);const de=c.useMemo(()=>m?Mi(m):null,[m]);return g.viewport?f.jsxs(f.Fragment,{children:[de&&f.jsx(kl,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:de}),f.jsx(Tl,{scope:n,onClose:I,children:va.createPortal(f.jsx(ba.ItemSlot,{scope:n,children:f.jsx(sl,{asChild:!0,onEscapeKeyDown:le(o,()=>{g.isFocusedToastEscapeKeyDownRef.current||I(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:f.jsx(be.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":g.swipeDirection,...v,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:le(e.onKeyDown,L=>{L.key==="Escape"&&(o==null||o(L.nativeEvent),L.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,I()))}),onPointerDown:le(e.onPointerDown,L=>{L.button===0&&(b.current={x:L.clientX,y:L.clientY})}),onPointerMove:le(e.onPointerMove,L=>{if(!b.current)return;const se=L.clientX-b.current.x,q=L.clientY-b.current.y,J=!!w.current,Zt=["left","right"].includes(g.swipeDirection),pn=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,pc=Zt?pn(0,se):0,mc=Zt?0:pn(0,q),gr=L.pointerType==="touch"?10:2,mn={x:pc,y:mc},qa={originalEvent:L,delta:mn};J?(w.current=mn,gn(bl,h,qa,{discrete:!1})):Qa(mn,g.swipeDirection,gr)?(w.current=mn,gn(xl,d,qa,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(se)>gr||Math.abs(q)>gr)&&(b.current=null)}),onPointerUp:le(e.onPointerUp,L=>{const se=w.current,q=L.target;if(q.hasPointerCapture(L.pointerId)&&q.releasePointerCapture(L.pointerId),w.current=null,b.current=null,se){const J=L.currentTarget,Zt={originalEvent:L,delta:se};Qa(se,g.swipeDirection,g.swipeThreshold)?gn(wl,_,Zt,{discrete:!0}):gn(Sl,p,Zt,{discrete:!0}),J.addEventListener("click",pn=>pn.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),kl=e=>{const{__scopeToast:t,children:n,...r}=e,a=nr(sn,t),[s,i]=c.useState(!1),[o,l]=c.useState(!1);return Dl(()=>i(!0)),c.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),o?null:f.jsx(bi,{asChild:!0,children:f.jsx(Ea,{...r,children:s&&f.jsxs(f.Fragment,{children:[a.label," ",n]})})})},Nl="ToastTitle",Ai=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return f.jsx(be.div,{...r,ref:t})});Ai.displayName=Nl;var Al="ToastDescription",ji=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return f.jsx(be.div,{...r,ref:t})});ji.displayName=Al;var Di="ToastAction",jl=c.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?f.jsx(Oi,{altText:n,asChild:!0,children:f.jsx(Sa,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Di}\`. Expected non-empty \`string\`.`),null)});jl.displayName=Di;var Ii="ToastClose",Sa=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=Cl(Ii,n);return f.jsx(Oi,{asChild:!0,children:f.jsx(be.button,{type:"button",...r,ref:t,onClick:le(e.onClick,a.onClose)})})});Sa.displayName=Ii;var Oi=c.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return f.jsx(be.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function Mi(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Il(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!a)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Mi(r))}}),t}function gn(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?gi(a,s):a.dispatchEvent(s)}var Qa=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),s=r>a;return t==="left"||t==="right"?s&&r>n:!s&&a>n};function Dl(e=()=>{}){const t=$e(e);wt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Il(e){return e.nodeType===e.ELEMENT_NODE}function Ol(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yr(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Ml=Ti,Pl=Ri,Ll=Ni,Zl=Ai,$l=ji,Ul=Sa;const wa=c.createContext({notify:e=>(console.warn("Notification triggered without a provider:",e),{update(){},close(){}})});wa.displayName="NotificationsContext";const Bl={success:"border-success-200 dark:border-success-900",warning:"border-warning-200 dark:border-warning-900",error:"border-error-200 dark:border-error-900",info:"border-info-200 dark:border-info-900"},Fl={success:"bg-success-50 dark:bg-success-975",warning:"bg-warning-100 dark:bg-warning-975",error:"bg-error-50 dark:bg-error-975",info:"bg-info-50 dark:bg-info-975"},Er={success:"text-success-900 dark:text-success-400",warning:"text-warning-800 dark:text-warning-400",error:"text-error-800 dark:text-error-50",info:"text-info-900 dark:text-info-400"};function sm({children:e,duration:t=5e3,swipeDirection:n="down",...r}){const[a,s]=c.useState([]),i=c.useRef(0),o=c.useMemo(()=>({notify:l=>{const u=i.current++,d={update(p){s(_=>_.map(v=>v.id===u?{...v,options:{...v.options,...p}}:v)),p.duration!=null&&(clearTimeout(h),h=setTimeout(d.close,p.duration))},close:()=>{clearTimeout(h),s(p=>p.filter(_=>_.id!==u))}};let h=setTimeout(d.close,l.duration??t);return s(p=>[...p,{id:u,handler:d,options:l}]),d}}),[]);return f.jsxs(Ml,{swipeDirection:n,duration:0,...r,children:[f.jsx(wa,{value:o,children:e}),a.map(({id:l,handler:u,options:{description:d,title:h,variant:p}})=>f.jsxs(Ll,{className:X("relative mb-4 rounded-2xl border py-3 pl-6 pr-8 shadow-lg","shadow-contrast-900/15 dark:shadow-contrast-0/60",Bl[p],Fl[p]),children:[f.jsx(Zl,{className:X("text-sm font-semibold leading-snug",Er[p]),children:h}),d&&f.jsx($l,{className:X(Er[p]),children:d}),f.jsx(Ul,{className:"absolute right-4 top-1/2 -translate-y-1/2",onClick:u.close,children:f.jsx(ya,{className:X("size-5",Er[p])})})]},l)),f.jsx(Pl,{className:"fixed bottom-0 left-6 right-6 mx-auto max-w-[400px] pt-8"})]})}function Vl(){return c.useContext(wa)}function Hl(e,t,n){if(!e)return[t];const r=e.findIndex(n);return r===-1?[...e,t]:[...e.slice(0,r),t,...e.slice(r+1)]}const Ta=c.createContext(null);Ta.displayName="SessionContext";var im=function(e){return e[e.First=0]="First",e[e.Only=1]="Only",e}({});function om({children:e,initialSessions:t,initialSelected:n}){const{i18n:r,_:a}=re(),s=vc(),{showBoundary:i}=jc(),{notify:o}=Vl(),[l,u]=c.useState(()=>{var O;return n===0?((O=t[0])==null?void 0:O.account.sub)??null:n===1?t.length===1?t[0].account.sub:null:t.some(I=>I.account.sub===n)?n:null}),[d,h]=c.useState(t),p=c.useMemo(()=>l?d.find(O=>O.account.sub===l)??null:null,[d,l]),_=c.useCallback(O=>{u(O&&d.some(I=>I.account.sub===O.account.sub)?O.account.sub:null)},[d,u]),v=c.useCallback(({account:O,ephemeralToken:I,consentRequired:H=!0,loginRequired:de=!1})=>{h(L=>Hl(L,{account:O,ephemeralToken:I,loginRequired:de,consentRequired:H},se=>se.account.sub===O.sub)),u(O.sub)},[u,h]),g=c.useCallback(O=>{h(I=>I.filter(H=>H.account.sub!==O)),u(I=>I===O?null:I)},[]),m=c.useMemo(()=>new xc({onFetchError(O){throw O instanceof bc&&i(O),O instanceof Sc&&(p&&g(p.account.sub),o({variant:"error",title:r._({id:"dA/8If"}),description:r._({id:"Z3PAZP"})})),O},headers:p!=null&&p.ephemeralToken?()=>({Authorization:`Bearer ${p.ephemeralToken}`}):void 0}),[p,i,u,o,a]),E=c.useCallback(async O=>{const I=await m.fetch("POST","/sign-in",{...O,locale:s});v(I)},[m,s,v]),x=c.useCallback(async O=>{await m.fetch("POST","/reset-password-request",{...O,locale:s})},[m,s]),b=c.useCallback(async O=>{await m.fetch("POST","/reset-password-confirm",O)},[m]),w=c.useCallback(async O=>{await m.fetch("POST","/verify-handle-availability",O)},[m]),R=c.useCallback(async O=>{const I=await m.fetch("POST","/sign-up",{...O,locale:s});v(I)},[m,s,v]),A=c.useCallback(async({sub:O})=>{await m.fetch("POST","/sign-out",{sub:O}),h(I=>I.filter(H=>H.account.sub!==O)),u(I=>I===O?null:I)},[m]),j=c.useCallback(async(O,I)=>m.fetch("POST","/consent",{sub:O,scope:I}),[m,d]),U=c.useCallback(async()=>m.fetch("POST","/reject",{}),[m]),z=c.useMemo(()=>({api:m,sessions:d,session:p,setSession:_,doSignIn:E,doSignOut:A,doInitiatePasswordReset:x,doConfirmResetPassword:b,doValidateNewHandle:w,doSignUp:R,doConsent:j,doReject:U}),[m,d,p,_,E,A,x,b,w,R,j,U]);return f.jsx(Ta,{value:z,children:e})}function Pi(){const e=c.useContext(Ta);if(e)return e;throw new Error("useSessionContext must be used within a SessionProvider")}function cm(){const{api:e}=Pi();return e}var xr=0;function lm(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??es()),document.body.insertAdjacentElement("beforeend",e[1]??es()),xr++,()=>{xr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xr--}},[])}function es(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var br="focusScope.autoFocusOnMount",Sr="focusScope.autoFocusOnUnmount",ts={bubbles:!1,cancelable:!0},Yl="FocusScope",Gl=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...i}=e,[o,l]=c.useState(null),u=$e(a),d=$e(s),h=c.useRef(null),p=Ge(t,g=>l(g)),_=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let g=function(b){if(_.paused||!o)return;const w=b.target;o.contains(w)?h.current=w:Fe(h.current,{select:!0})},m=function(b){if(_.paused||!o)return;const w=b.relatedTarget;w!==null&&(o.contains(w)||Fe(h.current,{select:!0}))},E=function(b){if(document.activeElement===document.body)for(const R of b)R.removedNodes.length>0&&Fe(o)};document.addEventListener("focusin",g),document.addEventListener("focusout",m);const x=new MutationObserver(E);return o&&x.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",m),x.disconnect()}}},[r,o,_.paused]),c.useEffect(()=>{if(o){rs.add(_);const g=document.activeElement;if(!o.contains(g)){const E=new CustomEvent(br,ts);o.addEventListener(br,u),o.dispatchEvent(E),E.defaultPrevented||(zl(Jl(Li(o)),{select:!0}),document.activeElement===g&&Fe(o))}return()=>{o.removeEventListener(br,u),setTimeout(()=>{const E=new CustomEvent(Sr,ts);o.addEventListener(Sr,d),o.dispatchEvent(E),E.defaultPrevented||Fe(g??document.body,{select:!0}),o.removeEventListener(Sr,d),rs.remove(_)},0)}}},[o,u,d,_]);const v=c.useCallback(g=>{if(!n&&!r||_.paused)return;const m=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,E=document.activeElement;if(m&&E){const x=g.currentTarget,[b,w]=Wl(x);b&&w?!g.shiftKey&&E===w?(g.preventDefault(),n&&Fe(b,{select:!0})):g.shiftKey&&E===b&&(g.preventDefault(),n&&Fe(w,{select:!0})):E===x&&g.preventDefault()}},[n,r,_.paused]);return f.jsx(be.div,{tabIndex:-1,...i,ref:p,onKeyDown:v})});Gl.displayName=Yl;function zl(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Fe(r,{select:t}),document.activeElement!==n)return}function Wl(e){const t=Li(e),n=ns(t,e),r=ns(t.reverse(),e);return[n,r]}function Li(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ns(e,t){for(const n of e)if(!ql(n,{upTo:t}))return n}function ql(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Kl(e){return e instanceof HTMLInputElement&&"select"in e}function Fe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Kl(e)&&t&&e.select()}}var rs=Xl();function Xl(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=as(e,t),e.unshift(t)},remove(t){var n;e=as(e,t),(n=e[0])==null||n.resume()}}}function as(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Jl(e){return e.filter(t=>t.tagName!=="A")}var Ql=ai[" useId ".trim().toString()]||(()=>{}),eu=0;function um(e){const[t,n]=c.useState(Ql());return wt(()=>{n(r=>r??String(eu++))},[e]),e||(t?`radix-${t}`:"")}var tu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ut=new WeakMap,vn=new WeakMap,yn={},wr=0,Zi=function(e){return e&&(e.host||Zi(e.parentNode))},nu=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Zi(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ru=function(e,t,n,r){var a=nu(t,Array.isArray(e)?e:[e]);yn[n]||(yn[n]=new WeakMap);var s=yn[n],i=[],o=new Set,l=new Set(a),u=function(h){!h||o.has(h)||(o.add(h),u(h.parentNode))};a.forEach(u);var d=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(p){if(o.has(p))d(p);else try{var _=p.getAttribute(r),v=_!==null&&_!=="false",g=(ut.get(p)||0)+1,m=(s.get(p)||0)+1;ut.set(p,g),s.set(p,m),i.push(p),g===1&&v&&vn.set(p,!0),m===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",p,E)}})};return d(t),o.clear(),wr++,function(){i.forEach(function(h){var p=ut.get(h)-1,_=s.get(h)-1;ut.set(h,p),s.set(h,_),p||(vn.has(h)||h.removeAttribute(r),vn.delete(h)),_||h.removeAttribute(n)}),wr--,wr||(ut=new WeakMap,ut=new WeakMap,vn=new WeakMap,yn={})}},dm=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=tu(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live]"))),ru(r,a,n,"aria-hidden")):function(){return null}},Te=function(){return Te=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Te.apply(this,arguments)};function $i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function au(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,s;r<a;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Zn="right-scroll-bar-position",$n="width-before-scroll-bar",su="with-scroll-bars-hidden",iu="--removed-body-scroll-bar-size";function Tr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ou(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var cu=typeof window<"u"?c.useLayoutEffect:c.useEffect,ss=new WeakMap;function lu(e,t){var n=ou(null,function(r){return e.forEach(function(a){return Tr(a,r)})});return cu(function(){var r=ss.get(n);if(r){var a=new Set(r),s=new Set(e),i=n.current;a.forEach(function(o){s.has(o)||Tr(o,null)}),s.forEach(function(o){a.has(o)||Tr(o,i)})}ss.set(n,e)},[e]),n}function uu(e){return e}function du(e,t){t===void 0&&(t=uu);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(o){return o!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(o){return s(o)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var o=n;n=[],o.forEach(s),i=n}var l=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return a}function fu(e){e===void 0&&(e={});var t=du(null);return t.options=Te({async:!0,ssr:!1},e),t}var Ui=function(e){var t=e.sideCar,n=$i(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,Te({},n))};Ui.isSideCarExport=!0;function hu(e,t){return e.useMedium(t),Ui}var Bi=fu(),Cr=function(){},rr=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Cr,onWheelCapture:Cr,onTouchMoveCapture:Cr}),a=r[0],s=r[1],i=e.forwardProps,o=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,p=e.sideCar,_=e.noIsolation,v=e.inert,g=e.allowPinchZoom,m=e.as,E=m===void 0?"div":m,x=e.gapMode,b=$i(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=p,R=lu([n,t]),A=Te(Te({},b),a);return c.createElement(c.Fragment,null,d&&c.createElement(w,{sideCar:Bi,removeScrollBar:u,shards:h,noIsolation:_,inert:v,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:x}),i?c.cloneElement(c.Children.only(o),Te(Te({},A),{ref:R})):c.createElement(E,Te({},A,{className:l,ref:R}),o))});rr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rr.classNames={fullWidth:$n,zeroRight:Zn};var pu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=pu();return t&&e.setAttribute("nonce",t),e}function _u(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function gu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=mu())&&(_u(t,n),gu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yu=function(){var e=vu();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Fi=function(){var e=yu(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},Eu={left:0,top:0,right:0,gap:0},Rr=function(e){return parseInt(e||"",10)||0},xu=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Rr(n),Rr(r),Rr(a)]},bu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Eu;var t=xu(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Su=Fi(),Et="data-scroll-locked",wu=function(e,t,n,r){var a=e.left,s=e.top,i=e.right,o=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(su,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(o,"px ").concat(r,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(Et,`] {
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(a,`px;
|
|
11
|
+
padding-top: `).concat(s,`px;
|
|
12
|
+
padding-right: `).concat(i,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(o,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(o,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(Zn,` {
|
|
20
|
+
right: `).concat(o,"px ").concat(r,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat($n,` {
|
|
24
|
+
margin-right: `).concat(o,"px ").concat(r,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(Zn," .").concat(Zn,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat($n," .").concat($n,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(Et,`] {
|
|
36
|
+
`).concat(iu,": ").concat(o,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},is=function(){var e=parseInt(document.body.getAttribute(Et)||"0",10);return isFinite(e)?e:0},Tu=function(){c.useEffect(function(){return document.body.setAttribute(Et,(is()+1).toString()),function(){var e=is()-1;e<=0?document.body.removeAttribute(Et):document.body.setAttribute(Et,e.toString())}},[])},Cu=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;Tu();var s=c.useMemo(function(){return bu(a)},[a]);return c.createElement(Su,{styles:wu(s,!t,a,n?"":"!important")})},Vr=!1;if(typeof window<"u")try{var En=Object.defineProperty({},"passive",{get:function(){return Vr=!0,!0}});window.addEventListener("test",En,En),window.removeEventListener("test",En,En)}catch{Vr=!1}var dt=Vr?{passive:!1}:!1,Ru=function(e){return e.tagName==="TEXTAREA"},Vi=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ru(e)&&n[t]==="visible")},ku=function(e){return Vi(e,"overflowY")},Nu=function(e){return Vi(e,"overflowX")},os=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=Hi(e,r);if(a){var s=Yi(e,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Au=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ju=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Hi=function(e,t){return e==="v"?ku(t):Nu(t)},Yi=function(e,t){return e==="v"?Au(t):ju(t)},Du=function(e,t){return e==="h"&&t==="rtl"?-1:1},Iu=function(e,t,n,r,a){var s=Du(e,window.getComputedStyle(t).direction),i=s*r,o=n.target,l=t.contains(o),u=!1,d=i>0,h=0,p=0;do{var _=Yi(e,o),v=_[0],g=_[1],m=_[2],E=g-m-s*v;(v||E)&&Hi(e,o)&&(h+=E,p+=v),o instanceof ShadowRoot?o=o.host:o=o.parentNode}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(d&&Math.abs(h)<1||!d&&Math.abs(p)<1)&&(u=!0),u},xn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},cs=function(e){return[e.deltaX,e.deltaY]},ls=function(e){return e&&"current"in e?e.current:e},Ou=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Mu=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},Pu=0,ft=[];function Lu(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),a=c.useState(Pu++)[0],s=c.useState(Fi)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var g=au([e.lockRef.current],(e.shards||[]).map(ls),!0).filter(Boolean);return g.forEach(function(m){return m.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),g.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var o=c.useCallback(function(g,m){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var E=xn(g),x=n.current,b="deltaX"in g?g.deltaX:x[0]-E[0],w="deltaY"in g?g.deltaY:x[1]-E[1],R,A=g.target,j=Math.abs(b)>Math.abs(w)?"h":"v";if("touches"in g&&j==="h"&&A.type==="range")return!1;var U=os(j,A);if(!U)return!0;if(U?R=j:(R=j==="v"?"h":"v",U=os(j,A)),!U)return!1;if(!r.current&&"changedTouches"in g&&(b||w)&&(r.current=R),!R)return!0;var z=r.current||R;return Iu(z,m,g,z==="h"?b:w)},[]),l=c.useCallback(function(g){var m=g;if(!(!ft.length||ft[ft.length-1]!==s)){var E="deltaY"in m?cs(m):xn(m),x=t.current.filter(function(R){return R.name===m.type&&(R.target===m.target||m.target===R.shadowParent)&&Ou(R.delta,E)})[0];if(x&&x.should){m.cancelable&&m.preventDefault();return}if(!x){var b=(i.current.shards||[]).map(ls).filter(Boolean).filter(function(R){return R.contains(m.target)}),w=b.length>0?o(m,b[0]):!i.current.noIsolation;w&&m.cancelable&&m.preventDefault()}}},[]),u=c.useCallback(function(g,m,E,x){var b={name:g,delta:m,target:E,should:x,shadowParent:Zu(E)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(w){return w!==b})},1)},[]),d=c.useCallback(function(g){n.current=xn(g),r.current=void 0},[]),h=c.useCallback(function(g){u(g.type,cs(g),g.target,o(g,e.lockRef.current))},[]),p=c.useCallback(function(g){u(g.type,xn(g),g.target,o(g,e.lockRef.current))},[]);c.useEffect(function(){return ft.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",l,dt),document.addEventListener("touchmove",l,dt),document.addEventListener("touchstart",d,dt),function(){ft=ft.filter(function(g){return g!==s}),document.removeEventListener("wheel",l,dt),document.removeEventListener("touchmove",l,dt),document.removeEventListener("touchstart",d,dt)}},[]);var _=e.removeScrollBar,v=e.inert;return c.createElement(c.Fragment,null,v?c.createElement(s,{styles:Mu(a)}):null,_?c.createElement(Cu,{gapMode:e.gapMode}):null)}function Zu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $u=hu(Bi,Lu);var Uu=c.forwardRef(function(e,t){return c.createElement(rr,Te({},e,{ref:t,sideCar:$u}))});Uu.classNames=rr.classNames;function Bu({onSignUp:e,onSignIn:t,onCancel:n}){return f.jsx(yc,{title:{id:"fHQh98"},children:f.jsxs("div",{className:"md:bg-contrast-0 flex w-full max-w-md flex-col items-center px-6 pb-8 pt-12 md:rounded-lg md:border md:border-slate-200 md:px-8 md:shadow-md md:dark:border-slate-700 md:dark:shadow-xl",children:[f.jsxs("div",{className:"mb-8 text-center",children:[f.jsx("h2",{className:"text-text-default mb-3 text-2xl font-light dark:text-white",children:f.jsx(N,{id:"6jfS51"})}),f.jsx("p",{className:"text-text-light",children:f.jsx(N,{id:"azHATD"})})]}),f.jsxs("div",{className:"flex w-full flex-col gap-3",children:[e&&f.jsx(ge,{className:"w-full",color:t?"primary":"darkGrey",onClick:e,children:f.jsx(N,{id:"mpt9T+"})}),t&&f.jsx(ge,{className:"w-full",color:e?"darkGrey":"primary",onClick:t,children:f.jsx(N,{id:"yKDCQ1"})}),n&&f.jsxs(f.Fragment,{children:[f.jsx("hr",{className:"my-2 border-slate-200 dark:border-slate-700"}),f.jsx(ge,{className:"w-full",color:"darkGrey",onClick:n,children:f.jsx(N,{id:"dEgA5A"})})]})]})]})})}function Le({title:e,subtitle:t,className:n,children:r,...a}){const{_:s}=re(),i=typeof e=="string"?e:e?s(e):void 0;return f.jsxs("div",{...a,className:X(n,"flex flex-col items-center","md:flex md:flex-row md:items-center md:justify-stretch","min-w-screen min-h-screen"),children:[f.jsxs("div",{className:X("px-6 pt-4","w-full","md:max-w-lg","flex flex-row items-center","md:flex-col md:items-end","md:self-stretch","md:max-w-fix md:w-1/2","md:px-4 md:py-2","md:text-right","md:dark:border-r md:dark:border-slate-700","md:bg-contrast-25"),children:[f.jsxs("div",{className:"grid grow content-center md:justify-items-end",children:[i&&f.jsxs("h1",{className:"text-primary text-xl font-semibold md:my-4 md:text-2xl lg:text-5xl",children:[f.jsx("title",{children:i}),i]},"title"),t&&f.jsx("p",{className:"text-text-light hidden max-w-xs md:block",children:t},"subtitle")]}),f.jsx(Ec,{className:"mr-auto text-sm"},"localeSelector")]}),f.jsx("main",{className:"w-full p-6 md:max-h-screen md:max-w-3xl md:overflow-y-auto md:px-12",children:r})]})}function Fu(e,{ref:t,onLoading:n,onError:r}={}){const[a,s]=c.useState(!1),[i,o]=c.useState(),l=c.useCallback(_=>{o(_),r==null||r(_)},[r]),u=c.useCallback(_=>{s(_),n==null||n(_)},[n]),d=c.useRef(null),h=c.useRef(null);c.useEffect(()=>(h.current=()=>{var _;(_=d.current)==null||_.abort(),d.current=null,l(void 0),u(!1)},()=>{h.current=null}),[l,u]),c.useImperativeHandle(t,()=>({reset:()=>{var _;return(_=h.current)==null?void 0:_.call(h)}}),[]),c.useEffect(()=>()=>{var _;(_=d.current)==null||_.abort(),d.current=null},[]);const p=c.useCallback(async()=>{var g;(g=d.current)==null||g.abort(),u(!0),l(void 0);const _=new AbortController,{signal:v}=_;d.current=_;try{await e(v)}catch(m){_===d.current?l(m instanceof Error?m:new Error(String(m))):Vu(v,m)||console.warn("Async action error after abort",m)}finally{_===d.current&&(d.current=null,u(!1)),_.abort()}},[e,u,l]);return{loading:a,error:i,run:p}}function Vu(e,t){return e.aborted&&(e.reason===t||e.reason===(t==null?void 0:t.cause)||t instanceof DOMException&&t.name==="AbortError")}function Ot({invalid:e,disabled:t,onSubmit:n,submitLabel:r=f.jsx(N,{id:"hQRttt"}),onCancel:a=void 0,cancelLabel:s=f.jsx(N,{id:"dEgA5A"}),errorRender:i=wc,ref:o,onLoading:l,onError:u,children:d,actions:h,append:p,..._}){const{run:v,loading:g,error:m}=Fu(n,{ref:o,onError:u,onLoading:l}),E=c.useCallback(x=>{x.preventDefault(),x.currentTarget.reportValidity()&&!t&&!e&&v()},[t,e,v]);return f.jsx(ii,{..._,onSubmit:E,disabled:t||g,append:[p,m!=null?i({error:m}):void 0],cancel:a&&f.jsx(ge,{onClick:a,children:s}),actions:f.jsxs(f.Fragment,{children:[f.jsx(ge,{color:"primary",type:"submit",loading:g,disabled:t,children:r}),h]}),children:d})}const Gi="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Hu=Gi.toLowerCase(),Yu="0123456789",Gu=`${Gi}${Hu}${Yu}`;function zi(e){const[t,n]=c.useState(()=>us(e));return c.useEffect(()=>{n(us(e))},[e==null?void 0:e.length,e==null?void 0:e.alphabet]),`${(e==null?void 0:e.prefix)??""}${t}${(e==null?void 0:e.suffix)??""}`}function us({length:e=16,alphabet:t=Gu}={}){return Array.from({length:e},()=>zu(t)).join("")}function zu(e){return e.charAt(Math.random()*e.length|0)}const ar=c.createContext({disabled:!1});ar.displayName="FieldsetContext";function Ze({label:e,children:t,disabled:n=!1,...r}){const a=zi({prefix:"form-field-"}),i=Rc().disabled||n,o=c.useMemo(()=>({disabled:i,labelId:e?a:void 0}),[i,e,a]);return f.jsxs("fieldset",{...r,"aria-labelledby":a,disabled:i,children:[e&&f.jsx("legend",{id:a,className:"text-text-light mb-1 text-sm font-medium",children:e},"title"),f.jsx("div",{className:"flex flex-col space-y-4",children:f.jsx(ar,{value:o,children:t})})]})}const Ie=8,Wu=/(\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/,bn=/[A-Z]/,Sn=/[a-z]/,wn=/[0-9]/,Tn=/[^a-zA-Z0-9]/;var nt=function(e){return e[e.weak=1]="weak",e[e.moderate=2]="moderate",e[e.strong=3]="strong",e[e.extra=4]="extra",e}({});function Wi(e){return e.length<Ie?1:e.length>=Ie+12?4:e.length>=Ie+8?je(e,[Tn])||je(e,[bn,Sn,wn],2)?4:3:e.length>=Ie&&je(e,[Wu])?3:e.length>=Ie+6?je(e,[Tn])||je(e,[bn,Sn,wn],2)?3:2:e.length>=Ie+4?je(e,[Tn])||je(e,[bn,Sn,wn],2)?2:1:e.length>=Ie&&(je(e,[Tn])||je(e,[bn,Sn,wn]))?2:1}function je(e,t,n=t.length){if(n<1||n>t.length)throw new TypeError("Invalid regexpsCountToMatch");for(const r of t)if(r.test(e)&&(n--,n===0))return!0;return!1}function qu({password:e,...t}){const{i18n:n,_:r}=re(),a=Wi(e);return f.jsx("span",{...t,"aria-label":n._({id:"osAB4a"}),children:a===nt.extra?f.jsx(N,{id:"/Ltc/k"}):a===nt.strong?f.jsx(N,{id:"LLx/nr"}):a===nt.moderate?f.jsx(N,{id:"dvYuhh"}):e?f.jsx(N,{id:"9ls/Vs"}):f.jsx(N,{id:"VU3Nrn"})})}function Ku({password:e,className:t,...n}){const{i18n:r,_:a}=re(),s=e?Wi(e):0,i="bg-gray-300 dark:bg-slate-500",o=s===nt.extra||s===nt.strong?"bg-success":s===nt.moderate?"bg-warning":"bg-error";return f.jsx("div",{...n,className:X("flex h-1 w-full space-x-2",t),role:"meter","aria-label":r._({id:"xfNKwI"}),"aria-valuemin":0,"aria-valuemax":nt.extra,"aria-valuenow":s,children:Array.from({length:4},(l,u)=>f.jsx("div",{className:`h-1 w-1/4 rounded-sm ${s>u?o:i}`},u))})}function Xu(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Qe(e){return t=>{for(const n of e)n&&Xu(n,t)}}function Ju({visible:e,toggleVisible:t,onClick:n,...r}){const{i18n:a,_:s}=re();return f.jsx(ge,{...r,shape:"padded",onClick:i=>{n==null||n(i),i.defaultPrevented||t()},"aria-label":e?a._({id:"vLyv1R"}):a._({id:"huXYDE"}),children:e?f.jsx(li,{"aria-hidden":!0,weight:"regular",className:"size-5"}):f.jsx(ui,{"aria-hidden":!0,weight:"regular",className:"size-5"})})}function sr({icon:e,append:t,bellow:n,actionable:r,transparent:a,onAction:s,className:i,children:o,onFocus:l,onBlur:u,onClick:d,onKeyDown:h,tabIndex:p,..._}){const[v,g]=c.useState(!1);return r??(r=s!=null||d!=null),p??(p=r?0:-1),f.jsxs("div",{..._,onFocus:m=>{l==null||l(m),m.defaultPrevented||g(!0)},onBlur:m=>{u==null||u(m),m.defaultPrevented||g(!1)},onKeyDown:m=>{h==null||h(m),s&&!m.defaultPrevented&&m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(s==null||s(m))},onClick:m=>{d==null||d(m),s&&!m.defaultPrevented&&(s==null||s(m))},tabIndex:p,role:r?"button":void 0,className:X("min-h-12","max-w-full","overflow-hidden","rounded-lg","transition duration-300 ease-in-out","outline-none",'has-[input[type="text"]:focus,input[type="password"]:focus]:ring-primary','has-[input[type="text"]:focus,input[type="password"]:focus]:ring-2','has-[input[type="text"]:focus,input[type="password"]:focus]:ring-offset-1','has-[input[type="text"]:focus,input[type="password"]:focus]:ring-offset-white','dark:has-[input[type="text"]:focus,input[type="password"]:focus]:ring-offset-black',p!==-1&&["cursor-pointer","focus:ring-primary","focus:ring-2","focus:ring-offset-1","focus:ring-offset-white","dark:focus:ring-offset-black"],a?"bg-transparent":"bg-gray-100 dark:bg-gray-800",p!==-1&&"hover:bg-gray-200 dark:hover:bg-gray-700",i),children:[f.jsxs("div",{className:X("px-1","min-h-12 w-full","flex items-center justify-stretch","rounded-lg",n?"rounded-bl-none rounded-br-none":void 0,"text-text-default"),children:[e&&f.jsx("div",{className:X("flex shrink-0 grow-0 items-center justify-center","mx-2 size-5",v?"text-primary":"text-text-light"),children:e}),o,f.jsx("div",{className:"ml-1 flex shrink-0 grow-0 items-center",children:t})]}),n&&f.jsx("div",{className:X("space-x-2 px-3 py-2","flex flex-row items-center gap-1","rounded-br-2 rounded-bl-2","bg-gray-200 dark:bg-slate-700","text-text-light","text-sm italic"),children:n})]})}function Mt({icon:e,append:t,bellow:n,className:r,onFocus:a,onBlur:s,ref:i,disabled:o,title:l,"aria-label":u=l,"aria-labelledby":d,placeholder:h=u,...p}){const _=c.useContext(ar),v=o??_.disabled,g=c.useRef(null),m=c.useRef(!1);return f.jsx(sr,{icon:e,append:t,bellow:n,className:X("cursor-text",r),tabIndex:-1,actionable:!1,onClick:E=>{var x;g.current!==E.target&&(E.preventDefault(),E.stopPropagation(),(x=g.current)==null||x.focus())},onMouseDown:E=>{m.current&&E.target!==g.current&&(E.preventDefault(),E.stopPropagation())},children:f.jsx("input",{...p,disabled:v,title:l,placeholder:h,"aria-label":u,"aria-labelledby":d??_.labelId,ref:Qe([i,g]),className:X("outline-hidden w-full text-ellipsis bg-transparent bg-clip-padding text-base text-inherit dark:placeholder-gray-400",v?"opacity-60":"inert:opacity-60"),onFocus:E=>{a==null||a(E),E.defaultPrevented||(m.current=!0)},onBlur:E=>{s==null||s(E),E.defaultPrevented||(m.current=!1)}})})}function qi({autoHide:e=!0,onBlur:t,onChange:n,append:r,autoComplete:a="current-password",icon:s=f.jsx(di,{className:"w-5",weight:"bold"}),value:i,defaultValue:o=i,ref:l,title:u,dir:d="auto",autoCapitalize:h="none",autoCorrect:p="off",spellCheck:_="false",...v}){const{i18n:g,_:m}=re(),E=c.useRef(null),[x,b]=c.useState(!1),[w,R]=c.useState(typeof o=="string"?o:""),A=c.useCallback(j=>{n==null||n(j),R(j.target.value)},[n]);return f.jsx(Mt,{...v,title:u??g._({id:"8ZsakT"}),ref:Qe([l,E]),dir:d,autoCapitalize:h,autoCorrect:p,spellCheck:_,icon:s,onBlur:e?j=>{t==null||t(j),j.defaultPrevented||b(!1)}:t,value:w,onChange:A,type:x?"text":"password",autoComplete:a,append:f.jsxs(f.Fragment,{children:[f.jsx(Ju,{className:"m-1",color:"darkGrey",visible:x,toggleVisible:()=>{var j;b(U=>!U),(j=E.current)==null||j.focus()}}),r]})})}function Ki({password:e="",onPassword:t,onChange:n,autoComplete:r="new-password",minLength:a=Ie,...s}){const{i18n:i,_:o}=re(),[l,u]=c.useState(e),d=c.useCallback(h=>{const{value:p}=h.target;n==null||n(h),!h.defaultPrevented&&(u(p),t==null||t(h.target.validity.valid?p:void 0))},[n,t]);return f.jsx(qi,{...s,placeholder:i._({id:"3tOlz6"}),"aria-label":i._({id:"0StR7t"}),title:i._({id:"5CqSPX",values:{MIN_PASSWORD_LENGTH:Ie}}),minLength:a,onChange:d,value:l,autoComplete:r,bellow:f.jsxs(f.Fragment,{children:[f.jsx(Ku,{password:l}),f.jsx(qu,{className:"grow-1 text-text-light min-w-max text-xs",password:l})]})})}const Qu="XXXXX-XXXXX";function Xi({example:e=Qu,onToken:t,icon:n=f.jsx(hi,{className:"w-5",weight:"bold"}),title:r=e,onChange:a,value:s,defaultValue:i=s,...o}){const[l,u]=c.useState(typeof i=="string"?i:"");return f.jsx(Mt,{...o,type:"text",autoCapitalize:"characters",autoCorrect:"off",autoComplete:"one-time-code",spellCheck:"false",minLength:11,maxLength:11,dir:"auto",icon:n,pattern:"^[A-Z2-7]{5}-[A-Z2-7]{5}$",placeholder:e,title:r,value:l,onChange:d=>{const{value:h,selectionEnd:p,selectionStart:_}=d.currentTarget,v=ds(h);d.currentTarget.value=v;const g=p??_;if(g!=null){const m=ds(h.slice(0,g));d.currentTarget.selectionStart=d.currentTarget.selectionEnd=m.length}u(v),a==null||a(d),d.isDefaultPrevented()||t==null||t(v.length===11?v:null)}})}function ds(e){const t=e.toUpperCase().replaceAll(/[^A-Z2-7]/g,"");return t.length<=5?t:`${t.slice(0,5)}-${t.slice(5,10)}`}function ed({onSubmit:e,invalid:t,...n}){const r=c.useRef(null),[a,s]=c.useState(null),[i,o]=c.useState(void 0);return f.jsxs(Ot,{...n,onSubmit:async l=>{if(a&&i)return e({token:a,password:i},l);throw new Error("Token and password are required")},invalid:t||!a||!i,children:[f.jsx(Ze,{label:f.jsx(N,{id:"vJgYMA"}),children:f.jsx(Xi,{name:"code",enterKeyHint:"next",required:!0,autoFocus:!0,onToken:l=>{var u;s(l),l&&((u=r.current)==null||u.focus())}})}),f.jsx(Ze,{label:f.jsx(N,{id:"/nT6AE"}),children:f.jsx(Ki,{ref:r,name:"password",enterKeyHint:"done",required:!0,password:i,onPassword:o})})]})}function Ji({onEmail:e,autoCapitalize:t="none",autoComplete:n="email",autoCorrect:r="off",dir:a="auto",icon:s=f.jsx(It,{"aria-hidden":!0,weight:"bold",className:"w-5"}),onBlur:i,onChange:o,pattern:l="^[^@]+@[^@]+\\.[^@]+$",spellCheck:u="false",value:d,defaultValue:h=d,title:p,..._}){const{i18n:v,_:g}=re(),[m,E]=c.useState(typeof h=="string"?h:""),x=c.useCallback(b=>{const w=b.target.value.toLowerCase();E(w),o==null||o(b),e==null||e(b.target.validity.valid?w:void 0)},[o,e]);return f.jsx(Mt,{..._,title:p??v._({id:"ATGYL1"}),type:"email",autoCapitalize:t,autoCorrect:r,dir:a,spellCheck:u,icon:s,pattern:l,autoComplete:n,value:m,onChange:x,onBlur:i})}function td({emailDefault:e,onSubmit:t,invalid:n,ref:r,...a}){const{i18n:s,_:i}=re(),[o,l]=c.useState(e),u=c.useRef(null),d=c.useCallback(h=>{if(o)return t({email:o},h)},[o,t]);return f.jsx(Ot,{...a,ref:Qe([r,u]),invalid:n||!o,onSubmit:d,children:f.jsx(Ze,{label:f.jsx(N,{id:"ATGYL1"}),children:f.jsx(Ji,{name:"email",placeholder:s._({id:"xRPn3U"}),title:s._({id:"ATGYL1"}),required:!0,autoFocus:!0,value:o,onEmail:h=>{var p;(p=u.current)==null||p.reset(),l(h)}})})})}function nd({emailDefault:e,onResetPasswordRequest:t,onResetPasswordConfirm:n,onBack:r}){const{i18n:a,_:s}=re(),[i,o]=c.useState(0);if(i===0)return f.jsxs(Le,{title:a._({id:"dn8X5t"}),subtitle:f.jsx(N,{id:"Esfg1M"}),children:[f.jsx("p",{className:"mb-4",children:f.jsx(N,{id:"cHrOqs"})}),f.jsx(td,{emailDefault:e,submitLabel:f.jsx(N,{id:"hXzOVo"}),onSubmit:async(l,u)=>{await t(l,u),u.aborted||o(1)},cancelLabel:f.jsx(N,{id:"iH8pgl"}),onCancel:r}),f.jsx("hr",{className:"my-5 border-gray-300 dark:border-gray-700"}),f.jsx("center",{children:f.jsx(ge,{transparent:!0,onClick:()=>o(1),children:f.jsx(N,{id:"FTT4a4"})})})]});if(i===1)return f.jsxs(Le,{title:{id:"KbS2K9"},subtitle:f.jsx(N,{id:"xg/UcZ"}),children:[f.jsx("p",{className:"mb-4",children:f.jsx(N,{id:"imRJNy"})}),f.jsx(ed,{submitLabel:f.jsx(N,{id:"hXzOVo"}),onSubmit:async(l,u)=>{await n(l,u),u.aborted||o(2)},cancelLabel:f.jsx(N,{id:"iH8pgl"}),onCancel:()=>o(0)})]});if(i===2)return f.jsx(Le,{title:{id:"fSy6T1"},subtitle:f.jsx(N,{id:"+qGdcW"}),children:f.jsxs("center",{children:[f.jsx("h2",{className:"pb-2 text-xl font-bold",children:f.jsx(N,{id:"DKeVgZ"})}),f.jsx("p",{className:"pb-4",children:f.jsx(N,{id:"67nRLM"})}),r&&f.jsx(ge,{color:"primary",onClick:()=>r(),children:f.jsx(N,{id:"UaXeX3"})})]})});throw new Error(`Invalid view: ${i}`)}const Qi=c.forwardRef(({className:e,invalid:t,disabled:n,...r},a)=>f.jsx("input",{...r,type:"checkbox",ref:a,disabled:n,className:X(["block size-4 rounded-md border-2","accent-primary","transition duration-300 ease-in-out","outline-none","focus:ring-primary focus:ring-2 focus:ring-offset-1 focus:ring-offset-white dark:focus:ring-offset-black",t&&"accent-error focus:border-error",n&&"bg-contrast-50 text-contrast-500 cursor-not-allowed",e])}));Qi.displayName="Checkbox";function rd({className:e,children:t,id:n,ref:r,disabled:a,title:s,"aria-label":i=s,"aria-labelledby":o,...l}){const u=zi("input-checkbox-"),d=c.useRef(null),h=c.useRef(null),p=c.useContext(ar),_=n??u,v=a??p.disabled;return f.jsx(sr,{className:X("cursor-pointer",e),icon:f.jsx(Qi,{...l,className:"size-4",disabled:v,title:s,"aria-label":i,"aria-labelledby":t?void 0:o??p.labelId,ref:Qe([r,h]),id:_}),tabIndex:-1,onClick:g=>{var m,E;g.target!==d.current&&g.target!==h.current&&((m=h.current)==null||m.click(),(E=h.current)==null||E.focus())},children:t&&f.jsx("label",{ref:d,htmlFor:_,className:"block w-full cursor-pointer select-none leading-[1.6]",children:t})})}const ad=18,eo=3,to=30,no=e=>eo+e.length<=to&&e.startsWith(".")&&!e.endsWith(".");function Cn({usernameDefault:e="",usernameReadonly:t=!1,rememberDefault:n=!1,disableRemember:r=!1,domains:a=[],onSubmit:s,onBack:i,backLabel:o,onForgotPassword:l,ref:u,invalid:d,children:h,...p}){const{i18n:_,_:v}=re(),g=a.filter(no),[m,E]=c.useState(e),[x,b]=c.useState(""),[w,R]=c.useState(n),[A,j]=c.useState(null),[U,z]=c.useState(null),[O,I]=c.useState(!1),H=c.useRef(null),de=c.useCallback(()=>{j(null),z(null)},[j,z]),L=c.useCallback(()=>{var q;de(),(q=H.current)==null||q.reset()},[de,H]),se=c.useCallback(async q=>{try{await s({username:m,password:x,remember:!r&&w,...U?{[U.type]:A}:{}},q)}catch(J){if(q.aborted)return;if(J instanceof Tc){z(J);return}throw J instanceof Cc&&de(),J}},[m,x,w,U,A,s]);return f.jsxs(Ot,{...p,ref:Qe([u,H]),onLoading:I,onCancel:i,cancelLabel:o??_._({id:"iH8pgl"}),append:h,invalid:d||!m||!x||U!=null&&!A,submitLabel:U?f.jsx(N,{id:"UwGV9B"}):f.jsx(N,{id:"yKDCQ1"}),onSubmit:se,children:[f.jsx(Ze,{disabled:O,label:f.jsx(N,{id:"sJGljQ"}),children:f.jsx(Mt,{icon:f.jsx(It,{"aria-hidden":!0,weight:"bold",className:"w-5"}),name:"username",type:"text",title:_._({id:"nZx9mr"}),autoCapitalize:"none",autoCorrect:"off",autoComplete:"username",spellCheck:"false",dir:"auto",enterKeyHint:"next",required:!0,readOnly:t,disabled:t,autoFocus:!t,pattern:"([^@]+@[^@]+|[^.@]+(\\.[^.@]+)+)|did:[a-z0-9]+:.+",value:m,onChange:q=>{L(),E(q.target.value)},onBlur:q=>{if(t)return;let J=q.target.value.trim().toLowerCase();J.startsWith("@")&&(J=J.slice(1)),J.length>0&&!J.startsWith("did:")&&!J.includes("@")&&!J.includes(".")&&g.length>0&&E(`${J}${g[0]}`)}})}),f.jsx(Ze,{disabled:O,label:f.jsx(N,{id:"8ZsakT"}),children:f.jsx(qi,{name:"password",onChange:q=>{L(),b(q.target.value)},append:l&&f.jsx(ge,{className:"text-sm",type:"button",color:"darkGrey",onClick:()=>{l(m!=null&&m.includes("@")?m:void 0)},"aria-label":_._({id:"slOprG"}),children:f.jsx(N,{id:"F4OP4y"})}),enterKeyHint:U?"next":"done",disabled:O,autoFocus:t,required:!0})}),f.jsx(si,{role:"note",title:f.jsx(N,{id:"r6y+jM"}),children:f.jsx(N,{id:"TePUFC"})}),!r&&f.jsx(rd,{name:"remember",title:_._({id:"1TxdLU"}),enterKeyHint:U?"next":"done",checked:w,onChange:q=>R(q.target.checked),children:f.jsx(N,{id:"1TxdLU"})}),U&&f.jsx(Ze,{disabled:O,label:f.jsx(N,{id:"4blS0m"}),children:f.jsxs("div",{children:[f.jsx(Xi,{title:_._({id:"ioZOzk"}),enterKeyHint:"done",required:!0,autoFocus:!0,value:A??"",onToken:j}),f.jsx("p",{className:"text-text-light text-sm",children:f.jsx(N,{id:"B+Yy3b",values:{0:U.hint}})})]})},"2fa")]})}function sd({account:e,...t}){const{i18n:n,_:r}=re();return f.jsx("span",{...t,"aria-label":n._({id:"kce6cL"}),children:e.preferred_username?f.jsxs(f.Fragment,{children:[f.jsx(It,{weight:"bold",className:"inline-block","aria-hidden":!0}),e.preferred_username]}):e.sub})}const fs={sm:"size-5",md:"size-6",lg:"size-8",xl:"size-12","2xl":"size-16","3xl":"size-24"};function id({className:e="",account:t,size:n="md"}){const[r,a]=c.useState(!1),{i18n:s,_:i}=re(),o=t==null?void 0:t.picture;return c.useEffect(()=>{a(!1)},[o]),o&&!r?f.jsx("img",{"aria-hidden":!0,src:o,alt:s._({id:"ehmMI/"}),className:X("rounded-full",fs[n],e),onError:()=>a(!0)}):f.jsx("div",{"aria-hidden":!0,className:X("bg-primary border-primary overflow-hidden rounded-full border-2 border-solid text-white",fs[n],e),children:f.jsx(pi,{className:"size-full"})})}function ro(e){return cd(e==null?void 0:e.preferred_username)}function od(e){return e==="handle.invalid"}function cd(e){if(e)return od(e)?"⚠Invalid Handle":e.startsWith("@")?e:`@${e}`}function ld({account:e,...t}){const{i18n:n,_:r}=re();return f.jsx("span",{...t,"aria-label":n._({id:"F9cvwz"}),children:e.name||ro(e)||e.sub})}function ud({account:e,...t}){return f.jsx(sr,{icon:f.jsx(id,{account:e}),...t,children:f.jsxs("div",{className:"min-w-0 flex-1",children:[e.name&&f.jsx(ld,{account:e,className:"block truncate font-medium"}),f.jsx(sd,{account:e,className:"block truncate text-sm text-neutral-500 dark:text-neutral-400"})]})},e.sub)}function dd({sessions:e,onSession:t,onOther:n=void 0,onBack:r,onSignUp:a,backLabel:s,children:i,...o}){const{i18n:l,_:u}=re();return f.jsxs(ii,{...o,append:i,actions:a&&f.jsx(ge,{onClick:a,color:"primary",transparent:!0,children:f.jsx(N,{id:"e+RpCP"})}),cancel:r&&f.jsx(ge,{onClick:r,children:s||f.jsx(N,{id:"iH8pgl"})}),children:[f.jsx("p",{className:"text-text-light text-sm font-medium",children:f.jsx(N,{id:"FT1MVS"})}),e.map(d=>f.jsx(ud,{account:d.account,append:f.jsx(Lr,{"aria-hidden":!0,className:"h-4"}),onAction:h=>{h.preventDefault(),h.stopPropagation(),t(d)},"aria-label":l._({id:"N9o7n5",values:{0:d.account.name??ro(d.account)??d.account.sub}})},d.account.sub)),n&&f.jsx(sr,{onAction:n,"aria-label":l._({id:"cR9UpQ"}),append:f.jsx(Lr,{"aria-hidden":!0,className:"h-4"}),icon:f.jsx(It,{"aria-hidden":!0,weight:"bold",className:"h-4 w-6"}),children:f.jsx("span",{className:"text-text-light flex-1 truncate",children:f.jsx(N,{id:"+TaG50"})})},"other")]})}function fd({disableRemember:e,forcedIdentifier:t,sessions:n,session:r,setSession:a,onSignIn:s,onSignUp:i,onForgotPassword:o,onBack:l,backLabel:u}){const d=c.useCallback(()=>a(null),[a]),{availableUserDomains:h=[]}=ga(),[p,_]=c.useState(n.length===0),v={id:"1L25jn"};return c.useEffect(()=>{r&&_(!1)},[r]),r?f.jsx(Le,{title:v,subtitle:f.jsx(N,{id:"HaGV2g"}),children:f.jsx(Cn,{domains:h,disableRemember:e,onSubmit:s,onForgotPassword:o,onBack:d,usernameDefault:r.account.preferred_username||r.account.sub,usernameReadonly:!0,rememberDefault:!0})}):t?f.jsx(Le,{title:v,subtitle:f.jsx(N,{id:"NgaR6B"}),children:f.jsx(Cn,{domains:h,disableRemember:e,onSubmit:s,onForgotPassword:o,onBack:l,backLabel:u,usernameDefault:t,usernameReadonly:!0})}):n.length===0?f.jsx(Le,{title:v,subtitle:f.jsx(N,{id:"T0KLp4"}),children:f.jsx(Cn,{domains:h,disableRemember:e,onSubmit:s,onForgotPassword:o,onBack:l,backLabel:u})}):p?f.jsx(Le,{title:v,subtitle:f.jsx(N,{id:"T0KLp4"}),children:f.jsx(Cn,{domains:h,disableRemember:e,onSubmit:s,onForgotPassword:o,onBack:()=>_(!1)})}):f.jsx(Le,{title:v,subtitle:f.jsx(N,{id:"o3dwub"}),children:f.jsx(dd,{sessions:n,onSession:a,onOther:()=>_(!0),onBack:l,backLabel:u,onSignUp:i})})}const Oe=e=>e!=null&&e!==!1,hd=e=>Oe(e)&&e.invalid===!0,pd=e=>!Oe(e)||e.invalid===!1;function md(e){const t=e.findIndex(Oe),n=e.findLastIndex(Oe),r=e.findIndex(hd),[a,s]=c.useState(t),i=c.useCallback(b=>b!==-1&&e[b]?(s(b),!0):!1,[e.map(Oe).join()]),o=e.findLastIndex((b,w)=>Oe(b)&&w<a),l=e.findIndex((b,w)=>Oe(b)&&w>a),u=c.useCallback(()=>i(t),[i,t]),d=c.useCallback(()=>i(n),[i,n]),h=c.useCallback(()=>i(o),[i,o]),p=c.useCallback(()=>i(l),[i,l]),_=c.useCallback(()=>i(r),[i,r]),v=a+1+e.reduce((b,w,R)=>R>=a||Oe(w)?b:b-1,0),g=e.filter(Oe).length,m=e.every(pd),E=a===-1||!e[a]?void 0:e[a],x=a===-1;return c.useEffect(()=>{x&&u()},[x]),{current:E,currentPosition:v,count:g,completed:m,atFirst:v===1,atLast:v===g,toFirst:u,toLast:d,toPrev:h,toNext:p,toRequired:_}}function _d({prevLabel:e,nextLabel:t,onBack:n,backLabel:r,onDone:a,doneLabel:s,steps:i,className:o,...l}){var A,j;const{atFirst:u,atLast:d,count:h,current:p,currentPosition:_,completed:v,toNext:g,toPrev:m,toRequired:E}=md(i),x=c.useCallback(()=>{g()||E()},[g,E]),b={current:!0,invalid:p?p.invalid:!1,prevLabel:u&&r||e||f.jsx(N,{id:"iH8pgl"}),prev:u?n:m,nextLabel:d&&s||t||f.jsx(N,{id:"hXzOVo"}),next:d&&v?a:x},w=(A=p==null?void 0:p.titleRender)==null?void 0:A.call(p,b),R=(j=p==null?void 0:p.contentRender)==null?void 0:j.call(p,b);return f.jsxs("div",{className:X(o,"flex flex-col"),...l,children:[f.jsx("p",{className:"text-contrast-500",children:f.jsx(N,{id:"BEx8rG",values:{currentPosition:_,count:h}})}),w&&f.jsx("h2",{className:"mb-4 text-xl font-medium",children:w}),R]})}function gd({inviteCodeRequired:e=!0,credentials:t,onCredentials:n,onNext:r,nextLabel:a,onPrev:s,prevLabel:i,children:o,ref:l,invalid:u,...d}){const{i18n:h,_:p}=re(),[_,v]=c.useState(t==null?void 0:t.email),[g,m]=c.useState(t==null?void 0:t.password),[E,x]=c.useState(t==null?void 0:t.inviteCode),b=c.useRef(null),w=()=>{var A;return(A=b.current)==null?void 0:A.reset()},R=c.useMemo(()=>_&&g&&(!e||E)?{email:_,password:g,inviteCode:e?E:void 0}:void 0,[_,g,E,e]);return c.useEffect(()=>{n==null||n(R)},[R,n]),f.jsxs(Ot,{...d,ref:Qe([l,b]),invalid:u||!R,onCancel:s,cancelLabel:i,onSubmit:r,submitLabel:a,append:o,children:[e&&f.jsx(Ze,{label:f.jsx(N,{id:"6KlkHI"}),children:f.jsx(Mt,{icon:f.jsx(fi,{className:"w-5"}),autoFocus:!0,name:"inviteCode",title:h._({id:"6KlkHI"}),placeholder:h._({id:"jxqcgY"}),required:!0,value:E||"",onChange:A=>{x(A.target.value||void 0),w()},enterKeyHint:"next"})}),f.jsx(Ze,{label:f.jsx(N,{id:"O3oNi5"}),children:f.jsx(Ji,{autoFocus:!e,name:"email",enterKeyHint:"next",required:!0,defaultValue:_,onEmail:A=>{v(A),w()}})}),f.jsx(Ze,{label:f.jsx(N,{id:"8ZsakT"}),children:f.jsx(Ki,{name:"password",enterKeyHint:"next",required:!0,password:g,onPassword:A=>{m(A),w()}})})]})}function kr({links:e,className:t,...n}){const r=e==null?void 0:e.find(s=>s.rel==="terms-of-service"),a=e==null?void 0:e.find(s=>s.rel==="privacy-policy");return f.jsx("p",{className:X("text-text-light text-sm",t),...n,children:f.jsx(N,{id:"mBUXx0",values:{0:r?f.jsx(Pr,{className:"text-primary underline",link:r,children:f.jsx(N,{id:"xowcRf"})}):f.jsx(N,{id:"xowcRf"}),1:a?f.jsx(Pr,{className:"text-primary underline",link:a,children:f.jsx(N,{id:"LcET2C"})}):f.jsx(N,{id:"LcET2C"})}})})}function vd(e){const t=eo,n=Math.min(ad,to-e.length),r=c.useCallback(a=>{const s=a.length>=t&&a.length<=n,i=/^[a-z0-9][a-z0-9-]+[a-z0-9]$/g.test(a);return{validLength:s,validCharset:i,valid:s&&i}},[n,t]);return{minLength:t,maxLength:n,validateSegment:r}}function yd({domains:e,onNext:t,nextLabel:n,onPrev:r,prevLabel:a,handle:s,onHandle:i,invalid:o,children:l,ref:u,...d}){const{i18n:h,_:p}=re(),_=e.filter(no),v=c.useRef(null),[g,m]=c.useState(()=>{const I=_.findIndex(H=>s==null?void 0:s.endsWith(H));return I===-1?0:I}),[E,x]=c.useState(()=>(s==null?void 0:s.split(".")[0])||"");c.useEffect(()=>{m(I=>Math.min(I,_.length-1))},[_.length]);const b=_[g]||_[0]||null,{minLength:w,maxLength:R,validateSegment:A}=vd(b),j=A(E),U=b&&j.valid?`${E}${b}`:void 0;c.useEffect(()=>{var I;(I=v.current)==null||I.reset(),i==null||i(U)},[i,U]);const z=c.useRef(null),O=`@${E}${b}`;return f.jsxs(Ot,{...d,ref:Qe([u,v]),onCancel:r,cancelLabel:a,onSubmit:t,submitLabel:n,invalid:o||!U,append:l,children:[f.jsxs("div",{children:[f.jsx(hs,{hasValue:!!E,valid:j.validLength,children:f.jsx(N,{id:"4Rgp24",values:{minLength:w,maxLength:R}})}),f.jsx(hs,{hasValue:!!E,valid:j.validCharset,children:f.jsx(N,{id:"yDlXDJ"})})]}),f.jsx(Mt,{ref:z,icon:f.jsx(It,{"aria-hidden":!0,weight:"bold",className:"size-5"}),name:"handle",type:"text",title:h._({id:"LX2sHe"}),pattern:"[a-z0-9][a-z0-9\\-]+[a-z0-9]",minLength:w,maxLength:R,autoCapitalize:"none",autoCorrect:"off",autoComplete:"off",dir:"auto",enterKeyHint:"done",autoFocus:!0,required:!0,value:E,onChange:I=>{const H=I.target.value.toLowerCase(),de=I.target.selectionStart,L=I.target.selectionEnd;I.target.value=H,I.target.setSelectionRange(de,L),x(H)},append:_.length>1&&f.jsx("select",{onClick:I=>I.stopPropagation(),onMouseDown:I=>I.stopPropagation(),value:g,"aria-label":h._({id:"HB+TbB"}),onChange:I=>{var H;m(Number(I.target.value)),(H=z.current)==null||H.focus()},className:X("block w-full","rounded-lg","p-2 pr-1","text-sm","cursor-pointer","transition duration-300 ease-in-out","outline-none","focus:ring-primary focus:ring-2 focus:ring-offset-1 focus:ring-offset-white dark:focus:ring-offset-black","accent-primary","text-text-light","hover:bg-gray-300 dark:hover:bg-gray-600","bg-gray-200 dark:bg-gray-700"),children:_.map((I,H)=>f.jsx("option",{value:H,children:I},I))}),bellow:f.jsx(N,{id:"r/b/p8",values:{0:E.length?f.jsx("strong",{className:"text-text-default",children:O}):f.jsx("span",{"aria-hidden":!0,className:"bg-text-light w-24 rounded-md p-2"})}})}),f.jsx(si,{role:"note",children:f.jsx(N,{id:"B9VwbO"})})]})}function hs({valid:e,hasValue:t,children:n,className:r,...a}){const{i18n:s,_:i}=re();return f.jsxs("div",{...a,className:X("flex flex-row items-center gap-2",r),children:[t?f.jsx(f.Fragment,{children:e?f.jsx(ci,{className:"text-success inline-block h-4 w-4","aria-label":s._({id:"nfagfM"})}):f.jsx(ya,{className:"text-error inline-block h-4 w-4","aria-label":s._({id:"JHB/Ky"})})}):f.jsx("div",{"aria-hidden":!0,className:"flex h-4 w-4 items-center justify-center",children:f.jsx("div",{className:"h-2 w-2 rounded-full bg-gray-300 dark:bg-slate-600"})}),f.jsx("div",{className:"text-sm",children:n})]})}function fe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hr(e,t){return Hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Hr(e,t)}function Ed(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Hr(e,t)}var ao=Object.defineProperty,xd=Object.defineProperties,bd=Object.getOwnPropertyDescriptors,Hn=Object.getOwnPropertySymbols,so=Object.prototype.hasOwnProperty,io=Object.prototype.propertyIsEnumerable,ps=(e,t,n)=>t in e?ao(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,y=(e,t)=>{for(var n in t||(t={}))so.call(t,n)&&ps(e,n,t[n]);if(Hn)for(var n of Hn(t))io.call(t,n)&&ps(e,n,t[n]);return e},V=(e,t)=>xd(e,bd(t)),Sd=(e,t)=>{var n={};for(var r in e)so.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Hn)for(var r of Hn(e))t.indexOf(r)<0&&io.call(e,r)&&(n[r]=e[r]);return n},oo=(e,t)=>{for(var n in t)ao(e,n,{get:t[n],enumerable:!0})},Ca=(e,t,n)=>new Promise((r,a)=>{var s=l=>{try{o(n.next(l))}catch(u){a(u)}},i=l=>{try{o(n.throw(l))}catch(u){a(u)}},o=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,i);o((n=n.apply(e,t)).next())});function wd(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function co(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function lo(e){return e||document.head}var Td="hCaptcha-script",Un="hCaptchaOnLoad",Yr="script-error",mt="@hCaptcha/loader",uo=Object.prototype.toString;function fo(e){switch(uo.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Ue(e,Error)}}function Pt(e,t){return uo.call(e)===`[object ${t}]`}function Ra(e){return Pt(e,"ErrorEvent")}function ms(e){return Pt(e,"DOMError")}function Cd(e){return Pt(e,"DOMException")}function ze(e){return Pt(e,"String")}function ho(e){return e===null||typeof e!="object"&&typeof e!="function"}function Tt(e){return Pt(e,"Object")}function ir(e){return typeof Event<"u"&&Ue(e,Event)}function Rd(e){return typeof Element<"u"&&Ue(e,Element)}function kd(e){return Pt(e,"RegExp")}function ka(e){return!!(e&&e.then&&typeof e.then=="function")}function Nd(e){return Tt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function po(e){return typeof e=="number"&&e!==e}function Ue(e,t){try{return e instanceof t}catch{return!1}}function mo(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function xt(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function _s(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let a=e[r];try{mo(a)?n.push("[VueViewModel]"):n.push(String(a))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Ad(e,t,n=!1){return ze(e)?kd(t)?t.test(e):ze(t)?n?e===t:e.includes(t):!1:!1}function on(e,t=[],n=!1){return t.some(r=>Ad(e,r,n))}function jd(e,t,n=250,r,a,s,i){if(!s.exception||!s.exception.values||!i||!Ue(i.originalException,Error))return;let o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;o&&(s.exception.values=Dd(Gr(e,t,a,i.originalException,r,s.exception.values,o,0),n))}function Gr(e,t,n,r,a,s,i,o){if(s.length>=n+1)return s;let l=[...s];if(Ue(r[a],Error)){gs(i,o);let u=e(t,r[a]),d=l.length;vs(u,a,d,o),l=Gr(e,t,n,r[a],a,[u,...l],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(Ue(u,Error)){gs(i,o);let h=e(t,u),p=l.length;vs(h,`errors[${d}]`,p,o),l=Gr(e,t,n,u,a,[h,...l],h,p)}}),l}function gs(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=V(y({},e.mechanism),{is_exception_group:!0,exception_id:t})}function vs(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=V(y({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}function Dd(e,t){return e.map(n=>(n.value&&(n.value=xt(n.value,t)),n))}function Rn(e){return e&&e.Math==Math?e:void 0}var ee=typeof globalThis=="object"&&Rn(globalThis)||typeof window=="object"&&Rn(window)||typeof self=="object"&&Rn(self)||typeof global=="object"&&Rn(global)||function(){return this}()||{};function cn(){return ee}function _o(e,t,n){let r=n||ee,a=r.__SENTRY__=r.__SENTRY__||{};return a[e]||(a[e]=t())}var Bn=cn(),Id=80;function Ct(e,t={}){try{let n=e,r=5,a=[],s=0,i=0,o=" > ",l=o.length,u,d=Array.isArray(t)?t:t.keyAttrs,h=!Array.isArray(t)&&t.maxStringLength||Id;for(;n&&s++<r&&(u=Od(n,d),!(u==="html"||s>1&&i+a.length*l+u.length>=h));)a.push(u),i+=u.length,n=n.parentNode;return a.reverse().join(o)}catch{return"<unknown>"}}function Od(e,t){let n=e,r=[],a,s,i,o,l;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let u=t&&t.length?t.filter(h=>n.getAttribute(h)).map(h=>[h,n.getAttribute(h)]):null;if(u&&u.length)u.forEach(h=>{r.push(`[${h[0]}="${h[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&ze(a))for(s=a.split(/\s+/),l=0;l<s.length;l++)r.push(`.${s[l]}`);let d=["aria-label","type","name","title","alt"];for(l=0;l<d.length;l++)i=d[l],o=n.getAttribute(i),o&&r.push(`[${i}="${o}"]`);return r.join("")}function Md(){try{return Bn.document.location.href}catch{return""}}function Pd(e){return Bn.document&&Bn.document.querySelector?Bn.document.querySelector(e):null}var Ld="Sentry Logger ",zr=["debug","info","warn","error","log","assert","trace"],Yn={};function go(e){if(!("console"in ee))return e();let t=ee.console,n={},r=Object.keys(Yn);r.forEach(a=>{let s=Yn[a];n[a]=t[a],t[a]=s});try{return e()}finally{r.forEach(a=>{t[a]=n[a]})}}function Zd(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?zr.forEach(n=>{t[n]=(...r)=>{e&&go(()=>{ee.console[n](`${Ld}[${n}]:`,...r)})}}):zr.forEach(n=>{t[n]=()=>{}}),t}var T=Zd(),$d=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ud(e){return e==="http"||e==="https"}function or(e,t=!1){let{host:n,path:r,pass:a,port:s,projectId:i,protocol:o,publicKey:l}=e;return`${o}://${l}${t&&a?`:${a}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${i}`}function Bd(e){let t=$d.exec(e);if(!t){console.error(`Invalid Sentry Dsn: ${e}`);return}let[n,r,a="",s,i="",o]=t.slice(1),l="",u=o,d=u.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),u=d.pop()),u){let h=u.match(/^\d+/);h&&(u=h[0])}return vo({host:s,pass:a,path:l,projectId:u,port:i,protocol:n,publicKey:r})}function vo(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Fd(e){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(a=>e[a]?!1:(T.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:n.match(/^\d+$/)?Ud(r)?t&&isNaN(parseInt(t,10))?(T.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(T.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(T.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Vd(e){let t=typeof e=="string"?Bd(e):vo(e);if(!(!t||!Fd(t)))return t}var Ce=class extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}};function ae(e,t,n){if(!(t in e))return;let r=e[t],a=n(r);typeof a=="function"&&yo(a,r),e[t]=a}function Na(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function yo(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Na(e,"__sentry_original__",t)}catch{}}function Aa(e){return e.__sentry_original__}function Hd(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Eo(e){if(fo(e))return y({message:e.message,name:e.name,stack:e.stack},Es(e));if(ir(e)){let t=y({type:e.type,target:ys(e.target),currentTarget:ys(e.currentTarget)},Es(e));return typeof CustomEvent<"u"&&Ue(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function ys(e){try{return Rd(e)?Ct(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Es(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function Yd(e,t=40){let n=Object.keys(Eo(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return xt(n[0],t);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>t))return r===n.length?a:xt(a,t)}return""}function Ye(e){return Wr(e,new Map)}function Wr(e,t){if(Tt(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let a of Object.keys(e))typeof e[a]<"u"&&(r[a]=Wr(e[a],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(a=>{r.push(Wr(a,t))}),r}return e}var xo=50,xs=/\(error: (.*)\)/,bs=/captureMessage|captureException/;function Gd(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[],s=n.split(`
|
|
42
|
+
`);for(let i=r;i<s.length;i++){let o=s[i];if(o.length>1024)continue;let l=xs.test(o)?o.replace(xs,"$1"):o;if(!l.match(/\S*Error: /)){for(let u of t){let d=u(l);if(d){a.push(d);break}}if(a.length>=xo)break}}return zd(a)}}function zd(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),bs.test(t[t.length-1].function||"")&&(t.pop(),bs.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,xo).map(n=>V(y({},n),{filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}var Nr="<anonymous>";function We(e){try{return!e||typeof e!="function"?Nr:e.name||Nr}catch{return Nr}}var qr=cn();function Wd(){if(!("fetch"in qr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Kr(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function qd(){if(!Wd())return!1;if(Kr(qr.fetch))return!0;let e=!1,t=qr.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Kr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}var kn=cn();function Kd(){let e=kn.chrome,t=e&&e.app&&e.app.runtime,n="history"in kn&&!!kn.history.pushState&&!!kn.history.replaceState;return!t&&n}var ne=cn(),gt="__sentry_xhr_v2__",Vt={},Ss={};function Xd(e){if(!Ss[e])switch(Ss[e]=!0,e){case"console":Jd();break;case"dom":of();break;case"xhr":tf();break;case"fetch":Qd();break;case"history":nf();break;case"error":cf();break;case"unhandledrejection":lf();break;default:(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn("unknown instrumentation type:",e);return}}function me(e,t){Vt[e]=Vt[e]||[],Vt[e].push(t),Xd(e)}function ve(e,t){if(!(!e||!Vt[e]))for(let n of Vt[e]||[])try{n(t)}catch(r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.error(`Error while triggering instrumentation handler.
|
|
43
|
+
Type: ${e}
|
|
44
|
+
Name: ${We(n)}
|
|
45
|
+
Error:`,r)}}function Jd(){"console"in ee&&zr.forEach(function(e){e in ee.console&&ae(ee.console,e,function(t){return Yn[e]=t,function(...n){ve("console",{args:n,level:e});let r=Yn[e];r&&r.apply(ee.console,n)}})})}function Qd(){qd()&&ae(ee,"fetch",function(e){return function(...t){let{method:n,url:r}=ef(t),a={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return ve("fetch",y({},a)),e.apply(ee,t).then(s=>(ve("fetch",V(y({},a),{endTimestamp:Date.now(),response:s})),s),s=>{throw ve("fetch",V(y({},a),{endTimestamp:Date.now(),error:s})),s})}})}function Xr(e,t){return!!e&&typeof e=="object"&&!!e[t]}function ws(e){return typeof e=="string"?e:e?Xr(e,"url")?e.url:e.toString?e.toString():"":""}function ef(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:ws(n),method:Xr(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:ws(t),method:Xr(t,"method")?String(t.method).toUpperCase():"GET"}}function tf(){if(!ne.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;ae(e,"open",function(t){return function(...n){let r=n[1],a=this[gt]={method:ze(n[0])?n[0].toUpperCase():n[0],url:n[1],request_headers:{}};ze(r)&&a.method==="POST"&&r.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let i=this[gt];if(i&&this.readyState===4){try{i.status_code=this.status}catch{}ve("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?ae(this,"onreadystatechange",function(i){return function(...o){return s(),i.apply(this,o)}}):this.addEventListener("readystatechange",s),ae(this,"setRequestHeader",function(i){return function(...o){let[l,u]=o,d=this[gt];return d&&(d.request_headers[l.toLowerCase()]=u),i.apply(this,o)}}),t.apply(this,n)}}),ae(e,"send",function(t){return function(...n){let r=this[gt];return r&&n[0]!==void 0&&(r.body=n[0]),ve("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),t.apply(this,n)}})}var Nn;function nf(){if(!Kd())return;let e=ne.onpopstate;ne.onpopstate=function(...n){let r=ne.location.href,a=Nn;if(Nn=r,ve("history",{from:a,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){let a=r.length>2?r[2]:void 0;if(a){let s=Nn,i=String(a);Nn=i,ve("history",{from:s,to:i})}return n.apply(this,r)}}ae(ne.history,"pushState",t),ae(ne.history,"replaceState",t)}var rf=1e3,An,jn;function af(e,t){if(!e||e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch{}return!1}function sf(e){if(e.type!=="keypress")return!1;try{let t=e.target;if(!t||!t.tagName)return!0;if(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)return!1}catch{}return!0}function Ts(e,t=!1){return n=>{if(!n||jn===n||sf(n))return;let r=n.type==="keypress"?"input":n.type;An===void 0?(e({event:n,name:r,global:t}),jn=n):af(jn,n)&&(e({event:n,name:r,global:t}),jn=n),clearTimeout(An),An=ne.setTimeout(()=>{An=void 0},rf)}}function of(){if(!ne.document)return;let e=ve.bind(null,"dom"),t=Ts(e,!0);ne.document.addEventListener("click",t,!1),ne.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=ne[n]&&ne[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(ae(r,"addEventListener",function(a){return function(s,i,o){if(s==="click"||s=="keypress")try{let l=this,u=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},d=u[s]=u[s]||{refCount:0};if(!d.handler){let h=Ts(e);d.handler=h,a.call(this,s,h,o)}d.refCount++}catch{}return a.call(this,s,i,o)}}),ae(r,"removeEventListener",function(a){return function(s,i,o){if(s==="click"||s=="keypress")try{let l=this,u=l.__sentry_instrumentation_handlers__||{},d=u[s];d&&(d.refCount--,d.refCount<=0&&(a.call(this,s,d.handler,o),d.handler=void 0,delete u[s]),Object.keys(u).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return a.call(this,s,i,o)}}))})}var Dn=null;function cf(){Dn=ne.onerror,ne.onerror=function(e,t,n,r,a){return ve("error",{column:r,error:a,line:n,msg:e,url:t}),Dn&&!Dn.__SENTRY_LOADER__?Dn.apply(this,arguments):!1},ne.onerror.__SENTRY_INSTRUMENTED__=!0}var In=null;function lf(){In=ne.onunhandledrejection,ne.onunhandledrejection=function(e){return ve("unhandledrejection",e),In&&!In.__SENTRY_LOADER__?In.apply(this,arguments):!0},ne.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function uf(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let s=0;s<t.length;s++)if(t[s]===a)return!0;return t.push(a),!1}function r(a){if(e)t.delete(a);else for(let s=0;s<t.length;s++)if(t[s]===a){t.splice(s,1);break}}return[n,r]}function ce(){let e=ee,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>t.getRandomValues(new Uint8Array(1))[0])}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function bo(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function He(e){let{message:t,event_id:n}=e;if(t)return t;let r=bo(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Jr(e,t,n){let r=e.exception=e.exception||{},a=r.values=r.values||[],s=a[0]=a[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function Yt(e,t){let n=bo(e);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism=y(y(y({},r),a),t),t&&"data"in t){let s=y(y({},a&&a.data),t.data);n.mechanism.data=s}}function Cs(e){if(e&&e.__sentry_captured__)return!0;try{Na(e,"__sentry_captured__",!0)}catch{}return!1}function df(e){return Array.isArray(e)?e:[e]}function ff(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function hf(){return"npm"}function pf(){return!ff()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function mf(e,t){return e.require(t)}function Ve(e,t=100,n=1/0){try{return Qr("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function So(e,t=3,n=100*1024){let r=Ve(e,t);return yf(r)>n?So(e,t-1,n):r}function Qr(e,t,n=1/0,r=1/0,a=uf()){let[s,i]=a;if(t==null||["number","boolean","string"].includes(typeof t)&&!po(t))return t;let o=_f(e,t);if(!o.startsWith("[object "))return o;if(t.__sentry_skip_normalization__)return t;let l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return o.replace("object ","");if(s(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let _=u.toJSON();return Qr("",_,l-1,r,a)}catch{}let d=Array.isArray(t)?[]:{},h=0,p=Eo(t);for(let _ in p){if(!Object.prototype.hasOwnProperty.call(p,_))continue;if(h>=r){d[_]="[MaxProperties ~]";break}let v=p[_];d[_]=Qr(_,v,l-1,r,a),h++}return i(t),d}function _f(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(mo(t))return"[VueViewModel]";if(Nd(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${We(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=gf(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function gf(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function vf(e){return~-encodeURI(e).split(/%..|./).length}function yf(e){return vf(JSON.stringify(e))}var Me;(function(e){e[e.PENDING=0]="PENDING";let t=1;e[e.RESOLVED=t]="RESOLVED";let n=2;e[e.REJECTED=n]="REJECTED"})(Me||(Me={}));function st(e){return new he(t=>{t(e)})}function ja(e){return new he((t,n)=>{n(e)})}var he=class{constructor(e){he.prototype.__init.call(this),he.prototype.__init2.call(this),he.prototype.__init3.call(this),he.prototype.__init4.call(this),this._state=Me.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new he((n,r)=>{this._handlers.push([!1,a=>{if(!e)n(a);else try{n(e(a))}catch(s){r(s)}},a=>{if(!t)r(a);else try{n(t(a))}catch(s){r(s)}}]),this._executeHandlers()})}catch(e){return this.then(t=>t,e)}finally(e){return new he((t,n)=>{let r,a;return this.then(s=>{a=!1,r=s,e&&e()},s=>{a=!0,r=s,e&&e()}).then(()=>{if(a){n(r);return}t(r)})})}__init(){this._resolve=e=>{this._setResult(Me.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Me.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===Me.PENDING){if(ka(t)){t.then(this._resolve,this._reject);return}this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Me.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(t=>{t[0]||(this._state===Me.RESOLVED&&t[1](this._value),this._state===Me.REJECTED&&t[2](this._value),t[0]=!0)})}}};function Ef(e){let t=[];function n(){return e===void 0||t.length<e}function r(i){return t.splice(t.indexOf(i),1)[0]}function a(i){if(!n())return ja(new Ce("Not adding Promise because buffer limit was reached."));let o=i();return t.indexOf(o)===-1&&t.push(o),o.then(()=>r(o)).then(null,()=>r(o).then(null,()=>{})),o}function s(i){return new he((o,l)=>{let u=t.length;if(!u)return o(!0);let d=setTimeout(()=>{i&&i>0&&o(!1)},i);t.forEach(h=>{st(h).then(()=>{--u||(clearTimeout(d),o(!0))},l)})})}return{$:t,add:a,drain:s}}function Ar(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}var xf=["fatal","error","warning","log","info","debug"];function bf(e){return e==="warn"?"warning":xf.includes(e)?e:"log"}var wo=cn(),ea={nowSeconds:()=>Date.now()/1e3};function Sf(){let{performance:e}=wo;if(!e||!e.now)return;let t=Date.now()-e.now();return{now:()=>e.now(),timeOrigin:t}}function wf(){try{return mf(module,"perf_hooks").performance}catch{return}}var jr=pf()?wf():Sf(),Rs=jr===void 0?ea:{nowSeconds:()=>(jr.timeOrigin+jr.now())/1e3},cr=ea.nowSeconds.bind(ea),it=Rs.nowSeconds.bind(Rs),ke=(()=>{let{performance:e}=wo;if(!e||!e.now)return;let t=3600*1e3,n=e.now(),r=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=a<t,i=e.timing&&e.timing.navigationStart,o=typeof i=="number"?Math.abs(i+n-r):t,l=o<t;return s||l?a<=o?e.timeOrigin:i:r})(),ta="baggage",To="sentry-",Tf=/^sentry-/,Cf=8192;function Rf(e){if(!ze(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((r,a)=>{let s=ks(a);return y(y({},r),s)},{});else{if(!e)return;t=ks(e)}let n=Object.entries(t).reduce((r,[a,s])=>{if(a.match(Tf)){let i=a.slice(To.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function na(e){if(!e)return;let t=Object.entries(e).reduce((n,[r,a])=>(a&&(n[`${To}${r}`]=a),n),{});return kf(t)}function ks(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(t[n]=r,t),{})}function kf(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],a)=>{let s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=a===0?s:`${t},${s}`;return i.length>Cf?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}var Nf=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Af(e){if(!e)return;let t=e.match(Nf);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function jf(e,t){let n=Af(e),r=Rf(t),{traceId:a,parentSpanId:s,parentSampled:i}=n||{},o={traceId:a||ce(),spanId:ce().substring(16),sampled:i};return s&&(o.parentSpanId=s),r&&(o.dsc=r),{traceparentData:n,dynamicSamplingContext:r,propagationContext:o}}function Da(e=ce(),t=ce().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function ln(e,t=[]){return[e,t]}function Df(e,t){let[n,r]=e;return[n,[...r,t]]}function Ns(e,t){let n=e[1];for(let r of n){let a=r[0].type;if(t(r,a))return!0}return!1}function ra(e,t){return(t||new TextEncoder).encode(e)}function If(e,t){let[n,r]=e,a=JSON.stringify(n);function s(i){typeof a=="string"?a=typeof i=="string"?a+i:[ra(a,t),i]:a.push(typeof i=="string"?ra(i,t):i)}for(let i of r){let[o,l]=i;if(s(`
|
|
46
|
+
${JSON.stringify(o)}
|
|
47
|
+
`),typeof l=="string"||l instanceof Uint8Array)s(l);else{let u;try{u=JSON.stringify(l)}catch{u=JSON.stringify(Ve(l))}s(u)}}return typeof a=="string"?a:Of(a)}function Of(e){let t=e.reduce((a,s)=>a+s.length,0),n=new Uint8Array(t),r=0;for(let a of e)n.set(a,r),r+=a.length;return n}function Mf(e,t){let n=typeof e.data=="string"?ra(e.data,t):e.data;return[Ye({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var Pf={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function As(e){return Pf[e]}function Co(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Lf(e,t,n,r){let a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return y(y(y({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:or(r)}),a&&{trace:Ye(y({},a))})}function Zf(e,t,n){let r=[{type:"client_report"},{timestamp:cr(),discarded_events:e}];return ln(t?{dsn:t}:{},[r])}function $f(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function Uf(e,t){return e[t]||e.all||0}function Bf(e,t,n=Date.now()){return Uf(e,t)>n}function Ff(e,{statusCode:t,headers:n},r=Date.now()){let a=y({},e),s=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(s)for(let o of s.trim().split(",")){let[l,u]=o.split(":",2),d=parseInt(l,10),h=(isNaN(d)?60:d)*1e3;if(!u)a.all=r+h;else for(let p of u.split(";"))a[p]=r+h}else i?a.all=r+$f(i,r):t===429&&(a.all=r+60*1e3);return a}var Ia="production";function Oa(){return _o("globalEventProcessors",()=>[])}function Vf(e){Oa().push(e)}function Gn(e,t,n,r=0){return new he((a,s)=>{let i=e[r];if(t===null||typeof i!="function")a(t);else{let o=i(y({},t),n);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&i.id&&o===null&&T.log(`Event processor "${i.id}" dropped event`),ka(o)?o.then(l=>Gn(e,l,n,r+1).then(a)).then(null,s):Gn(e,o,n,r+1).then(a).then(null,s)}})}function Hf(e){let t=it(),n={sid:ce(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Gf(n)};return e&&Rt(n,e),n}function Rt(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||it(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:ce()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Yf(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Rt(e,n)}function Gf(e){return Ye({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}var zf=100,bt=class{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=js()}static clone(e){let t=new bt;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags=y({},e._tags),t._extra=y({},e._extra),t._contexts=y({},e._contexts),t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata=y({},e._sdkProcessingMetadata),t._propagationContext=y({},e._propagationContext)),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&Rt(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=y(y({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,t){return this._tags=V(y({},this._tags),{[e]:t}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=y(y({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,t){return this._extra=V(y({},this._extra),{[e]:t}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){let t=e(this);return t instanceof bt?t:this}return e instanceof bt?(this._tags=y(y({},this._tags),e._tags),this._extra=y(y({},this._extra),e._extra),this._contexts=y(y({},this._contexts),e._contexts),e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):Tt(e)&&(e=e,this._tags=y(y({},this._tags),e.tags),this._extra=y(y({},this._extra),e.extra),this._contexts=y(y({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=js(),this}addBreadcrumb(e,t){let n=typeof t=="number"?t:zf;if(n<=0)return this;let r=y({timestamp:cr()},e),a=this._breadcrumbs;return a.push(r),this._breadcrumbs=a.length>n?a.slice(-n):a,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={},n){if(this._extra&&Object.keys(this._extra).length&&(e.extra=y(y({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=y(y({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=y(y({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=y(y({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=y({trace:this._span.getTraceContext()},e.contexts);let s=this._span.transaction;if(s){e.sdkProcessingMetadata=y({dynamicSamplingContext:s.getDynamicSamplingContext()},e.sdkProcessingMetadata);let i=s.name;i&&(e.tags=y({transaction:i},e.tags))}}this._applyFingerprint(e);let r=this._getBreadcrumbs(),a=[...e.breadcrumbs||[],...r];return e.breadcrumbs=a.length>0?a:void 0,e.sdkProcessingMetadata=V(y(y({},e.sdkProcessingMetadata),this._sdkProcessingMetadata),{propagationContext:this._propagationContext}),Gn([...n||[],...Oa(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=y(y({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?df(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function js(){return{traceId:ce(),spanId:ce().substring(16)}}var Ro=4,Wf=100,Ma=class{constructor(e,t=new bt,n=Ro){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){let t=this.getStackTop();t.client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){let e=bt.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(e){let t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){let n=this._lastEventId=t&&t.event_id?t.event_id:ce(),r=new Error("Sentry syntheticException");return this._withClient((a,s)=>{a.captureException(e,V(y({originalException:e,syntheticException:r},t),{event_id:n}),s)}),n}captureMessage(e,t,n){let r=this._lastEventId=n&&n.event_id?n.event_id:ce(),a=new Error(e);return this._withClient((s,i)=>{s.captureMessage(e,t,V(y({originalException:e,syntheticException:a},n),{event_id:r}),i)}),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:ce();return e.type||(this._lastEventId=n),this._withClient((r,a)=>{r.captureEvent(e,V(y({},t),{event_id:n}),a)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){let{scope:n,client:r}=this.getStackTop();if(!r)return;let{beforeBreadcrumb:a=null,maxBreadcrumbs:s=Wf}=r.getOptions&&r.getOptions()||{};if(s<=0)return;let i=cr(),o=y({timestamp:i},e),l=a?go(()=>a(o,t)):o;l!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",l,t),n.addBreadcrumb(l,s))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t)}configureScope(e){let{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){let t=Ds(this);try{e(this)}finally{Ds(t)}}getIntegration(e){let t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){let n=this._callExtensionMethod("startTransaction",e,t);if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&!n){let r=this.getClient();console.warn(r?`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
48
|
+
Sentry.addTracingExtensions();
|
|
49
|
+
Sentry.init({...});
|
|
50
|
+
`:"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop().scope,t=e.getSession();t&&Yf(t),this._sendSessionUpdate(),e.setSession()}startSession(e){let{scope:t,client:n}=this.getStackTop(),{release:r,environment:a=Ia}=n&&n.getOptions()||{},{userAgent:s}=ee.navigator||{},i=Hf(y(y({release:r,environment:a,user:t.getUser()},s&&{userAgent:s}),e)),o=t.getSession&&t.getSession();return o&&o.status==="ok"&&Rt(o,{status:"exited"}),this.endSession(),t.setSession(i),i}shouldSendDefaultPii(){let e=this.getClient(),t=e&&e.getOptions();return!!(t&&t.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){let{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){let n=un().__SENTRY__;if(n&&n.extensions&&typeof n.extensions[e]=="function")return n.extensions[e].apply(this,t);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function un(){return ee.__SENTRY__=ee.__SENTRY__||{extensions:{},hub:void 0},ee}function Ds(e){let t=un(),n=aa(t);return ko(t,e),n}function te(){let e=un();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return qf(e)}function qf(e=un()){return(!Kf(e)||aa(e).isOlderThan(Ro))&&ko(e,new Ma),aa(e)}function Kf(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function aa(e){return _o("hub",()=>new Ma,e)}function ko(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function Pa(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=te().getClient(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function dn(e){return te().getScope().getTransaction()}var Is=!1;function Xf(){Is||(Is=!0,me("error",sa),me("unhandledrejection",sa))}function sa(){let e=dn();if(e){let t="internal_error";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}sa.tag="sentry_tracingErrorCallback";var No=class{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}},Ao=class{constructor(e={}){this.traceId=e.traceId||ce(),this.spanId=e.spanId||ce().substring(16),this.startTimestamp=e.startTimestamp||it(),this.tags=e.tags||{},this.data=e.data||{},this.instrumenter=e.instrumenter||"sentry",this.origin=e.origin||"manual",e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.name&&(this.description=e.name),e.status&&(this.status=e.status),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}get name(){return this.description||""}set name(e){this.setName(e)}startChild(e){let t=new Ao(V(y({},e),{parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId}));if(t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t),t.transaction=this.transaction,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&t.transaction){let n=e&&e.op||"< unknown op >",r=t.transaction.name||"< unknown name >",a=t.transaction.spanId,s=`[Tracing] Starting '${n}' span on transaction '${r}' (${a}).`;t.transaction.metadata.spanMetadata[t.spanId]={logMessage:s},T.log(s)}return t}setTag(e,t){return this.tags=V(y({},this.tags),{[e]:t}),this}setData(e,t){return this.data=V(y({},this.data),{[e]:t}),this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e)),this.setData("http.response.status_code",e);let t=Jf(e);return t!=="unknown_error"&&this.setStatus(t),this}setName(e){this.description=e}isSuccess(){return this.status==="ok"}finish(e){if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){let{logMessage:t}=this.transaction.metadata.spanMetadata[this.spanId];t&&T.log(t.replace("Starting","Finishing"))}this.endTimestamp=typeof e=="number"?e:it()}toTraceparent(){return Da(this.traceId,this.spanId,this.sampled)}toContext(){return Ye({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return Ye({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return Ye({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId,origin:this.origin})}};function Jf(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function lr(e,t,n){let r=t.getOptions(),{publicKey:a}=t.getDsn()||{},{segment:s}=n&&n.getUser()||{},i=Ye({environment:r.environment||Ia,release:r.release,user_segment:s,public_key:a,trace_id:e});return t.emit&&t.emit("createDsc",i),i}var jo=class extends Ao{constructor(e,t){super(e),delete this.description,this._measurements={},this._contexts={},this._hub=t||te(),this._name=e.name||"",this.metadata=V(y({source:"custom"},e.metadata),{spanMetadata:{}}),this._trimEnd=e.trimEnd,this.transaction=this;let n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext=y({},n))}get name(){return this._name}set name(e){this.setName(e)}setName(e,t="custom"){this._name=e,this.metadata.source=t}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new No(e)),this.spanRecorder.add(this)}setContext(e,t){t===null?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this.metadata=y(y({},this.metadata),e)}finish(e){let t=this._finishTransaction(e);if(t)return this._hub.captureEvent(t)}toContext(){let e=super.toContext();return Ye(V(y({},e),{name:this.name,trimEnd:this._trimEnd}))}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;let e=this._hub||te(),t=e.getClient();if(!t)return{};let n=e.getScope(),r=lr(this.traceId,t,n),a=this.metadata.sampleRate;a!==void 0&&(r.sample_rate=`${a}`);let s=this.metadata.source;return s&&s!=="url"&&(r.transaction=this.name),this.sampled!==void 0&&(r.sampled=String(this.sampled)),r}setHub(e){this._hub=e}_finishTransaction(e){if(this.endTimestamp!==void 0)return;this.name||((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(e);let t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),this.sampled!==!0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","transaction");return}let n=this.spanRecorder?this.spanRecorder.spans.filter(s=>s!==this&&s.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((s,i)=>s.endTimestamp&&i.endTimestamp?s.endTimestamp>i.endTimestamp?s:i:s).endTimestamp);let r=this.metadata,a=y({contexts:V(y({},this._contexts),{trace:this.getTraceContext()}),spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:V(y({},r),{dynamicSamplingContext:this.getDynamicSamplingContext()})},r.source&&{transaction_info:{source:r.source}});return Object.keys(this._measurements).length>0&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),a.measurements=this._measurements),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),a}},Fn={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Qf="finishReason",ht=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],eh=class extends No{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){e.spanId!==this.transactionSpanId&&(e.finish=t=>{e.endTimestamp=typeof t=="number"?t:it(),this._popActivity(e.spanId)},e.endTimestamp===void 0&&this._pushActivity(e.spanId)),super.add(e)}},th=class extends jo{constructor(e,t,n=Fn.idleTimeout,r=Fn.finalTimeout,a=Fn.heartbeatInterval,s=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=a,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=ht[4],s&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),t.configureScope(i=>i.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=ht[3],this.finish())},this._finalTimeout)}finish(e=it()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(Qf,this._finishReason),this.spanRecorder){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Tracing] finishing IdleTransaction",new Date(e*1e3).toISOString(),this.op);for(let t of this._beforeFinishCallbacks)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter(t=>{if(t.spanId===this.spanId)return!0;t.endTimestamp||(t.endTimestamp=e,t.setStatus("cancelled"),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));let n=t.startTimestamp<e,r=(this._finalTimeout+this._idleTimeout)/1e3,a=t.endTimestamp-this.startTimestamp<r;if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let s=JSON.stringify(t,void 0,2);n?a||T.log("[Tracing] discarding Span since it finished after Transaction final timeout",s):T.log("[Tracing] discarding Span since it happened after Transaction was finished",s)}return n&&a}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Tracing] flushing IdleTransaction")}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Tracing] No active IdleTransaction");if(this._onScope){let t=this._idleHub.getScope();t.getTransaction()===this&&t.setSpan(void 0)}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){let t=r=>{this._finished||this._pushActivity(r)},n=r=>{this._finished||this._popActivity(r)};this.spanRecorder=new eh(t,n,this.spanId,e),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=t===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=ht[5],this.finish(e)))}setFinishReason(e){this._finishReason=e}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=ht[1],this.finish(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`[Tracing] popActivity ${e}`),delete this.activities[e],(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let t=it();this._idleTimeoutCanceledPermanently?(this._finishReason=ht[5],this.finish(t)):this._restartIdleTimeout(t+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=ht[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function nh(){let e=this.getScope().getSpan();return e?{"sentry-trace":e.toTraceparent()}:{}}function Do(e,t,n){if(!Pa(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setMetadata({sampleRate:Number(e.sampled)}),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setMetadata({sampleRate:Number(r)})):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setMetadata({sampleRate:Number(r)})):(r=1,e.setMetadata({sampleRate:r})),rh(r)?r?(e.sampled=Math.random()<r,e.sampled?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`[Tracing] starting ${e.op} transaction - ${e.name}`),e):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function rh(e){return po(e)||!(typeof e=="number"||typeof e=="boolean")?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e<0||e>1?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function ah(e,t){let n=this.getClient(),r=n&&n.getOptions()||{},a=r.instrumenter||"sentry",s=e.instrumenter||"sentry";a!==s&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${a}\` instrumenter.
|
|
51
|
+
The transaction will not be sampled. Please use the ${a} instrumentation to start transactions.`),e.sampled=!1);let i=new jo(e,this);return i=Do(i,r,y({parentSampled:e.parentSampled,transactionContext:e},t)),i.sampled&&i.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",i),i}function Os(e,t,n,r,a,s,i){let o=e.getClient(),l=o&&o.getOptions()||{},u=new th(t,e,n,r,i,a);return u=Do(u,l,y({parentSampled:t.parentSampled,transactionContext:t},s)),u.sampled&&u.initSpanRecorder(l._experiments&&l._experiments.maxSpans),o&&o.emit&&o.emit("startTransaction",u),u}function sh(){let e=un();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=ah),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=nh),Xf())}function ih(e,t){return te().captureException(e,{captureContext:t})}function oh(e){te().withScope(e)}var ch="7";function lh(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function uh(e){return`${lh(e)}${e.projectId}/envelope/`}function dh(e,t){return Hd(y({sentry_key:e.publicKey,sentry_version:ch},t&&{sentry_client:`${t.name}/${t.version}`}))}function fh(e,t={}){let n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${uh(e)}?${dh(e,r)}`}function hh(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function ph(e,t,n,r){let a=Co(n),s=y(y({sent_at:new Date().toISOString()},a&&{sdk:a}),!!r&&t&&{dsn:or(t)}),i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ln(s,[i])}function mh(e,t,n,r){let a=Co(n),s=e.type&&e.type!=="replay_event"?e.type:"event";hh(e,n&&n.sdk);let i=Lf(e,a,r,t);return delete e.sdkProcessingMetadata,ln(i,[[{type:s},e]])}var Ms=[];function _h(e,t){let n={};return t.forEach(r=>{r&&Io(e,r,n)}),n}function Io(e,t,n){if(n[t.name]=t,Ms.indexOf(t.name)===-1&&(t.setupOnce(Vf,te),Ms.push(t.name)),e.on&&typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(a,s)=>r(a,s,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){let r=t.processEvent.bind(t),a=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(a)}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`Integration installed: ${t.name}`)}function gh(e,t,n,r,a){let{normalizeDepth:s=3,normalizeMaxBreadth:i=1e3}=e,o=V(y({},t),{event_id:t.event_id||n.event_id||ce(),timestamp:t.timestamp||cr()}),l=n.integrations||e.integrations.map(p=>p.name);vh(o,e),xh(o,l),t.type===void 0&&yh(o,e.stackParser);let u=r;n.captureContext&&(u=bt.clone(u).update(n.captureContext));let d=st(o),h=a&&a.getEventProcessors?a.getEventProcessors():[];if(u){if(u.getAttachments){let p=[...n.attachments||[],...u.getAttachments()];p.length&&(n.attachments=p)}d=u.applyToEvent(o,n,h)}else d=Gn([...h,...Oa()],o,n);return d.then(p=>(p&&Eh(p),typeof s=="number"&&s>0?bh(p,s,i):p))}function vh(e,t){let{environment:n,release:r,dist:a,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:Ia),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&a!==void 0&&(e.dist=a),e.message&&(e.message=xt(e.message,s));let i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=xt(i.value,s));let o=e.request;o&&o.url&&(o.url=xt(o.url,s))}var Ps=new WeakMap;function yh(e,t){let n=ee._sentryDebugIds;if(!n)return;let r,a=Ps.get(t);a?r=a:(r=new Map,Ps.set(t,r));let s=Object.keys(n).reduce((i,o)=>{let l,u=r.get(o);u?l=u:(l=t(o),r.set(o,l));for(let d=l.length-1;d>=0;d--){let h=l[d];if(h.filename){i[h.filename]=n[o];break}}return i},{});try{e.exception.values.forEach(i=>{i.stacktrace.frames.forEach(o=>{o.filename&&(o.debug_id=s[o.filename])})})}catch{}}function Eh(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(a=>{a.debug_id&&(a.abs_path?t[a.abs_path]=a.debug_id:a.filename&&(t[a.filename]=a.debug_id),delete a.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function xh(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function bh(e,t,n){if(!e)return null;let r=y(y(y(y(y({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(a=>y(y({},a),a.data&&{data:Ve(a.data,t,n)}))}),e.user&&{user:Ve(e.user,t,n)}),e.contexts&&{contexts:Ve(e.contexts,t,n)}),e.extra&&{extra:Ve(e.extra,t,n)});return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ve(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(a=>(a.data&&(a.data=Ve(a.data,t,n)),a))),r}var Ls="Not capturing exception because it's already been captured.",Sh=class{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Vd(e.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn("No DSN provided, client will not send events."),this._dsn){let t=fh(this._dsn,e);this._transport=e.transport(V(y({recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}))}}captureException(e,t,n){if(Cs(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(Ls);return}let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(a=>this._captureEvent(a,t,n)).then(a=>{r=a})),r}captureMessage(e,t,n,r){let a=n&&n.event_id,s=ho(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(s.then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureEvent(e,t,n){if(t&&t.originalException&&Cs(t.originalException)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(Ls);return}let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then(a=>{r=a})),r}captureSession(e){typeof e.release!="string"?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Rt(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?this._isClientDoneProcessing(e).then(n=>t.flush(e).then(r=>n&&r)):st(!0)}close(e){return this.flush(e).then(t=>(this.getOptions().enabled=!1,t))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&(this._integrations=_h(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){Io(this,e,this._integrations)}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=mh(e,this._dsn,this._options._metadata,this._options.tunnel);for(let a of t.attachments||[])n=Df(n,Mf(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));let r=this._sendEnvelope(n);r&&r.then(a=>this.emit("afterSendEvent",e,a),null)}sendSession(e){let t=ph(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=`${e}:${t}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach(n=>n(...t))}_updateSessionFromEvent(e,t){let n=!1,r=!1,a=t.exception&&t.exception.values;if(a){r=!0;for(let i of a){let o=i.mechanism;if(o&&o.handled===!1){n=!0;break}}}let s=e.status==="ok";(s&&e.errors===0||s&&n)&&(Rt(e,V(y({},n&&{status:"crashed"}),{errors:e.errors||Number(r||n)})),this.captureSession(e))}_isClientDoneProcessing(e){return new he(t=>{let n=0,r=1,a=setInterval(()=>{this._numProcessing==0?(clearInterval(a),t(!0)):(n+=r,e&&n>=e&&(clearInterval(a),t(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n){let r=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit("preprocessEvent",e,t),gh(r,e,t,n,this).then(s=>{if(s===null)return s;let{propagationContext:i}=s.sdkProcessingMetadata||{};if(!(s.contexts&&s.contexts.trace)&&i){let{traceId:o,spanId:l,parentSpanId:u,dsc:d}=i;s.contexts=y({trace:{trace_id:o,span_id:l,parent_span_id:u}},s.contexts);let h=d||lr(o,this,n);s.sdkProcessingMetadata=y({dynamicSamplingContext:h},s.sdkProcessingMetadata)}return s})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(r=>r.event_id,r=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let a=r;a.logLevel==="log"?T.log(a.message):T.warn(a)}})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:a}=r,s=Mo(e),i=Oo(e),o=e.type||"error",l=`before send for type \`${o}\``;if(i&&typeof a=="number"&&Math.random()>a)return this.recordDroppedEvent("sample_rate","error",e),ja(new Ce(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));let u=o==="replay_event"?"replay":o;return this._prepareEvent(e,t,n).then(d=>{if(d===null)throw this.recordDroppedEvent("event_processor",u,e),new Ce("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return d;let h=Th(r,d,t);return wh(h,l)}).then(d=>{if(d===null)throw this.recordDroppedEvent("before_send",u,e),new Ce(`${l} returned \`null\`, will not send event.`,"log");let h=n&&n.getSession();!s&&h&&this._updateSessionFromEvent(h,d);let p=d.transaction_info;if(s&&p&&d.transaction!==e.transaction){let _="custom";d.transaction_info=V(y({},p),{source:_})}return this.sendEvent(d,t),d}).then(null,d=>{throw d instanceof Ce?d:(this.captureException(d,{data:{__sentry__:!0},originalException:d}),new Ce(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
52
|
+
Reason: ${d}`))})}_process(e){this._numProcessing++,e.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,t=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.error("Error while sending event:",t)});(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{let[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}};function wh(e,t){let n=`${t} must return \`null\` or a valid event.`;if(ka(e))return e.then(r=>{if(!Tt(r)&&r!==null)throw new Ce(n);return r},r=>{throw new Ce(`${t} rejected with ${r}`)});if(!Tt(e)&&e!==null)throw new Ce(n);return e}function Th(e,t,n){let{beforeSend:r,beforeSendTransaction:a}=e;return Oo(t)&&r?r(t,n):Mo(t)&&a?a(t,n):t}function Oo(e){return e.type===void 0}function Mo(e){return e.type==="transaction"}var Ch=30;function Po(e,t,n=Ef(e.bufferSize||Ch)){let r={},a=i=>n.drain(i);function s(i){let o=[];if(Ns(i,(h,p)=>{let _=As(p);if(Bf(r,_)){let v=Zs(h,p);e.recordDroppedEvent("ratelimit_backoff",_,v)}else o.push(h)}),o.length===0)return st();let l=ln(i[0],o),u=h=>{Ns(l,(p,_)=>{let v=Zs(p,_);e.recordDroppedEvent(h,As(_),v)})},d=()=>t({body:If(l,e.textEncoder)}).then(h=>(h.statusCode!==void 0&&(h.statusCode<200||h.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`Sentry responded with status code ${h.statusCode} to sent event.`),r=Ff(r,h),h),h=>{throw u("network_error"),h});return n.add(d).then(h=>h,h=>{if(h instanceof Ce)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.error("Skipped sending event because buffer is full."),u("queue_overflow"),st();throw h})}return s.__sentry__baseTransport__=!0,{send:s,flush:a}}function Zs(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}var $s="7.73.0",Lo={};oo(Lo,{FunctionToString:()=>La,InboundFilters:()=>Za});var Us,La=class{static __initStatic(){this.id="FunctionToString"}constructor(){this.name=La.id}setupOnce(){Us=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Aa(this)||this;return Us.apply(t,e)}}catch{}}};La.__initStatic();var Rh=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],kh=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/],Za=class{static __initStatic(){this.id="InboundFilters"}constructor(e={}){this.name=Za.id,this._options=e}setupOnce(e,t){}processEvent(e,t,n){let r=n.getOptions(),a=Nh(this._options,r);return Ah(e,a)?null:e}};Za.__initStatic();function Nh(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Rh],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:kh],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function Ah(e,t){return t.ignoreInternal&&Ph(e)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`Event dropped due to being internal Sentry Error.
|
|
53
|
+
Event: ${He(e)}`),!0):jh(e,t.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
54
|
+
Event: ${He(e)}`),!0):Dh(e,t.ignoreTransactions)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
55
|
+
Event: ${He(e)}`),!0):Ih(e,t.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
56
|
+
Event: ${He(e)}.
|
|
57
|
+
Url: ${zn(e)}`),!0):Oh(e,t.allowUrls)?!1:((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
58
|
+
Event: ${He(e)}.
|
|
59
|
+
Url: ${zn(e)}`),!0)}function jh(e,t){return e.type||!t||!t.length?!1:Mh(e).some(n=>on(n,t))}function Dh(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?on(n,t):!1}function Ih(e,t){if(!t||!t.length)return!1;let n=zn(e);return n?on(n,t):!1}function Oh(e,t){if(!t||!t.length)return!0;let n=zn(e);return n?on(n,t):!0}function Mh(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&t.length===0&&T.error(`Could not extract message for event ${He(e)}`),t}function Ph(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Lh(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function zn(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Lh(t):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.error(`Cannot extract url for event ${He(e)}`),null}}var G=ee,ia=0;function Zo(){return ia>0}function Zh(){ia++,setTimeout(()=>{ia--})}function kt(e,t={},n){if(typeof e!="function")return e;try{let a=e.__sentry_wrapped__;if(a)return a;if(Aa(e))return e}catch{return e}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let s=a.map(i=>kt(i,t));return e.apply(this,s)}catch(s){throw Zh(),oh(i=>{i.addEventProcessor(o=>(t.mechanism&&(Jr(o,void 0),Yt(o,t.mechanism)),o.extra=V(y({},o.extra),{arguments:a}),o)),ih(s)}),s}};try{for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}catch{}yo(r,e),Na(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function $o(e,t){let n=$a(e,t),r={type:t&&t.name,value:Fh(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function $h(e,t,n,r){let a=te().getClient(),s=a&&a.getOptions().normalizeDepth,i={exception:{values:[{type:ir(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Yh(t,{isUnhandledRejection:r})}]},extra:{__serialized__:So(t,s)}};if(n){let o=$a(e,n);o.length&&(i.exception.values[0].stacktrace={frames:o})}return i}function Dr(e,t){return{exception:{values:[$o(e,t)]}}}function $a(e,t){let n=t.stacktrace||t.stack||"",r=Bh(t);try{return e(n,r)}catch{}return[]}var Uh=/Minified React error #\d+;/i;function Bh(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(Uh.test(e.message))return 1}return 0}function Fh(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Vh(e,t,n,r){let a=n&&n.syntheticException||void 0,s=Ua(e,t,a,r);return Yt(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),st(s)}function Hh(e,t,n="info",r,a){let s=r&&r.syntheticException||void 0,i=oa(e,t,s,a);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),st(i)}function Ua(e,t,n,r,a){let s;if(Ra(t)&&t.error)return Dr(e,t.error);if(ms(t)||Cd(t)){let i=t;if("stack"in t)s=Dr(e,t);else{let o=i.name||(ms(i)?"DOMError":"DOMException"),l=i.message?`${o}: ${i.message}`:o;s=oa(e,l,n,r),Jr(s,l)}return"code"in i&&(s.tags=V(y({},s.tags),{"DOMException.code":`${i.code}`})),s}return fo(t)?Dr(e,t):Tt(t)||ir(t)?(s=$h(e,t,n,a),Yt(s,{synthetic:!0}),s):(s=oa(e,t,n,r),Jr(s,`${t}`),Yt(s,{synthetic:!0}),s)}function oa(e,t,n,r){let a={message:t};if(r&&n){let s=$a(e,n);s.length&&(a.exception={values:[{value:t,stacktrace:{frames:s}}]})}return a}function Yh(e,{isUnhandledRejection:t}){let n=Yd(e),r=t?"promise rejection":"exception";return Ra(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:ir(e)?`Event \`${Gh(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Gh(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function zh(e,{metadata:t,tunnel:n,dsn:r}){let a=y(y({event_id:e.event_id,sent_at:new Date().toISOString()},t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}}),!!n&&!!r&&{dsn:or(r)}),s=Wh(e);return ln(a,[s])}function Wh(e){return[{type:"user_report"},e]}var qh=class extends Sh{constructor(e){let t=G.SENTRY_SDK_SOURCE||hf();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${t}:@sentry/browser`,version:$s}],version:$s},super(e),e.sendClientReports&&G.document&&G.document.addEventListener("visibilitychange",()=>{G.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return Vh(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return Hh(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn("SDK not enabled, will not capture user feedback.");return}let t=zh(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("Sending outcomes:",e);let t=Zf(e,this._options.tunnel&&or(this._dsn));this._sendEnvelope(t)}},Ut;function Kh(){if(Ut)return Ut;if(Kr(G.fetch))return Ut=G.fetch.bind(G);let e=G.document,t=G.fetch;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return Ut=t.bind(G)}function Xh(){Ut=void 0}function Jh(e,t=Kh()){let n=0,r=0;function a(s){let i=s.body.length;n+=i,r++;let o=y({body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);try{return t(e.url,o).then(l=>(n-=i,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return Xh(),n-=i,r--,ja(l)}}return Po(e,a)}var Qh=4;function ep(e){function t(n){return new he((r,a)=>{let s=new XMLHttpRequest;s.onerror=a,s.onreadystatechange=()=>{s.readyState===Qh&&r({statusCode:s.status,headers:{"x-sentry-rate-limits":s.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":s.getResponseHeader("Retry-After")}})},s.open("POST",e.url);for(let i in e.headers)Object.prototype.hasOwnProperty.call(e.headers,i)&&s.setRequestHeader(i,e.headers[i]);s.send(n.body)})}return Po(e,t)}var ur="?",tp=30,np=40,rp=50;function Ba(e,t,n,r){let a={filename:e,function:t,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var ap=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,sp=/\((\S*)(?::(\d+))(?::(\d+))\)/,ip=e=>{let t=ap.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let a=sp.exec(t[2]);a&&(t[2]=a[1],t[3]=a[2],t[4]=a[3])}let[n,r]=Uo(t[1]||ur,t[2]);return Ba(r,n,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},op=[tp,ip],cp=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,lp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,up=e=>{let t=cp.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let a=lp.exec(t[3]);a&&(t[1]=t[1]||"eval",t[3]=a[1],t[4]=a[2],t[5]="")}let n=t[3],r=t[1]||ur;return[r,n]=Uo(r,n),Ba(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},dp=[rp,up],fp=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,hp=e=>{let t=fp.exec(e);return t?Ba(t[2],t[1]||ur,+t[3],t[4]?+t[4]:void 0):void 0},pp=[np,hp],mp=[op,dp,pp],_p=Gd(...mp),Uo=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:ur,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Lt=class{static __initStatic(){this.id="GlobalHandlers"}constructor(e){this.name=Lt.id,this._options=y({onerror:!0,onunhandledrejection:!0},e),this._installFunc={onerror:gp,onunhandledrejection:vp}}setupOnce(){Error.stackTraceLimit=50;let e=this._options;for(let t in e){let n=this._installFunc[t];n&&e[t]&&(xp(t),n(),this._installFunc[t]=void 0)}}};Lt.__initStatic();function gp(){me("error",e=>{let[t,n,r]=Vo();if(!t.getIntegration(Lt))return;let{msg:a,url:s,line:i,column:o,error:l}=e;if(Zo()||l&&l.__sentry_own_request__)return;let u=l===void 0&&ze(a)?Ep(a,s,i,o):Bo(Ua(n,l||a,void 0,r,!1),s,i,o);u.level="error",Fo(t,l,u,"onerror")})}function vp(){me("unhandledrejection",e=>{let[t,n,r]=Vo();if(!t.getIntegration(Lt))return;let a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch{}if(Zo()||a&&a.__sentry_own_request__)return!0;let s=ho(a)?yp(a):Ua(n,a,void 0,r,!0);s.level="error",Fo(t,a,s,"onunhandledrejection")})}function yp(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Ep(e,t,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,s=Ra(e)?e.message:e,i="Error",o=s.match(a);return o&&(i=o[1],s=o[2]),Bo({exception:{values:[{type:i,value:s}]}},t,n,r)}function Bo(e,t,n,r){let a=e.exception=e.exception||{},s=a.values=a.values||[],i=s[0]=s[0]||{},o=i.stacktrace=i.stacktrace||{},l=o.frames=o.frames||[],u=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,h=ze(t)&&t.length>0?t:Md();return l.length===0&&l.push({colno:u,filename:h,function:"?",in_app:!0,lineno:d}),e}function xp(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`Global Handler attached: ${e}`)}function Fo(e,t,n,r){Yt(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Vo(){let e=te(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}var bp=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Fa=class{static __initStatic(){this.id="TryCatch"}constructor(e){this.name=Fa.id,this._options=y({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e)}setupOnce(){this._options.setTimeout&&ae(G,"setTimeout",Bs),this._options.setInterval&&ae(G,"setInterval",Bs),this._options.requestAnimationFrame&&ae(G,"requestAnimationFrame",Sp),this._options.XMLHttpRequest&&"XMLHttpRequest"in G&&ae(XMLHttpRequest.prototype,"send",wp);let e=this._options.eventTarget;e&&(Array.isArray(e)?e:bp).forEach(Tp)}};Fa.__initStatic();function Bs(e){return function(...t){let n=t[0];return t[0]=kt(n,{mechanism:{data:{function:We(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Sp(e){return function(t){return e.apply(this,[kt(t,{mechanism:{data:{function:"requestAnimationFrame",handler:We(e)},handled:!1,type:"instrument"}})])}}function wp(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&ae(n,r,function(a){let s={mechanism:{data:{function:r,handler:We(a)},handled:!1,type:"instrument"}},i=Aa(a);return i&&(s.mechanism.data.handler=We(i)),kt(a,s)})}),e.apply(this,t)}}function Tp(e){let t=G,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ae(n,"addEventListener",function(r){return function(a,s,i){try{typeof s.handleEvent=="function"&&(s.handleEvent=kt(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:We(s),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[a,kt(s,{mechanism:{data:{function:"addEventListener",handler:We(s),target:e},handled:!1,type:"instrument"}}),i])}}),ae(n,"removeEventListener",function(r){return function(a,s,i){let o=s;try{let l=o&&o.__sentry_wrapped__;l&&r.call(this,a,l,i)}catch{}return r.call(this,a,o,i)}}))}var On=1024,dr=class{static __initStatic(){this.id="Breadcrumbs"}constructor(e){this.name=dr.id,this.options=y({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e)}setupOnce(){if(this.options.console&&me("console",kp),this.options.dom&&me("dom",Rp(this.options.dom)),this.options.xhr&&me("xhr",Np),this.options.fetch&&me("fetch",Ap),this.options.history&&me("history",jp),this.options.sentry){let e=te().getClient();e&&e.on&&e.on("beforeSendEvent",Cp)}}};dr.__initStatic();function Cp(e){te().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:He(e)},{event:e})}function Rp(e){function t(n){let r,a=typeof e=="object"?e.serializeAttribute:void 0,s=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;s&&s>On&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`\`dom.maxStringLength\` cannot exceed ${On}, but a value of ${s} was configured. Sentry will use ${On} instead.`),s=On),typeof a=="string"&&(a=[a]);try{let i=n.event;r=Dp(i)?Ct(i.target,{keyAttrs:a,maxStringLength:s}):Ct(i,{keyAttrs:a,maxStringLength:s})}catch{r="<unknown>"}r.length!==0&&te().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return t}function kp(e){let t={category:"console",data:{arguments:e.args,logger:"console"},level:bf(e.level),message:_s(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message=`Assertion failed: ${_s(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1);else return;te().addBreadcrumb(t,{input:e.args,level:e.level})}function Np(e){let{startTimestamp:t,endTimestamp:n}=e,r=e.xhr[gt];if(!t||!n||!r)return;let{method:a,url:s,status_code:i,body:o}=r,l={method:a,url:s,status_code:i},u={xhr:e.xhr,input:o,startTimestamp:t,endTimestamp:n};te().addBreadcrumb({category:"xhr",data:l,type:"http"},u)}function Ap(e){let{startTimestamp:t,endTimestamp:n}=e;if(n&&!(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"))if(e.error){let r=e.fetchData,a={data:e.error,input:e.args,startTimestamp:t,endTimestamp:n};te().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},a)}else{let r=V(y({},e.fetchData),{status_code:e.response&&e.response.status}),a={input:e.args,response:e.response,startTimestamp:t,endTimestamp:n};te().addBreadcrumb({category:"fetch",data:r,type:"http"},a)}}function jp(e){let t=e.from,n=e.to,r=Ar(G.location.href),a=Ar(t),s=Ar(n);a.path||(a=r),r.protocol===s.protocol&&r.host===s.host&&(n=s.relative),r.protocol===a.protocol&&r.host===a.host&&(t=a.relative),te().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}function Dp(e){return!!e&&!!e.target}var Ip="cause",Op=5,fr=class{static __initStatic(){this.id="LinkedErrors"}constructor(e={}){this.name=fr.id,this._key=e.key||Ip,this._limit=e.limit||Op}setupOnce(){}preprocessEvent(e,t,n){let r=n.getOptions();jd($o,r.stackParser,r.maxValueLength,this._key,this._limit,e,t)}};fr.__initStatic();var hr=class{static __initStatic(){this.id="HttpContext"}constructor(){this.name=hr.id}setupOnce(){}preprocessEvent(e){if(!G.navigator&&!G.location&&!G.document)return;let t=e.request&&e.request.url||G.location&&G.location.href,{referrer:n}=G.document||{},{userAgent:r}=G.navigator||{},a=y(y(y({},e.request&&e.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),s=V(y(y({},e.request),t&&{url:t}),{headers:a});e.request=s}};hr.__initStatic();var pr=class{static __initStatic(){this.id="Dedupe"}constructor(){this.name=pr.id}setupOnce(e,t){}processEvent(e){if(e.type)return e;try{if(Mp(e,this._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return this._previousEvent=e}};pr.__initStatic();function Mp(e,t){return t?!!(Pp(e,t)||Lp(e,t)):!1}function Pp(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Yo(e,t)||!Ho(e,t))}function Lp(e,t){let n=Fs(t),r=Fs(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Yo(e,t)||!Ho(e,t))}function Ho(e,t){let n=Vs(e),r=Vs(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a<r.length;a++){let s=r[a],i=n[a];if(s.filename!==i.filename||s.lineno!==i.lineno||s.colno!==i.colno||s.function!==i.function)return!1}return!0}function Yo(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Fs(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Vs(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}var Go={};oo(Go,{Breadcrumbs:()=>dr,Dedupe:()=>pr,GlobalHandlers:()=>Lt,HttpContext:()=>hr,LinkedErrors:()=>fr,TryCatch:()=>Fa});var Y=ee;function Zp(){Y&&Y.document?Y.document.addEventListener("visibilitychange",()=>{let e=dn();if(Y.document.hidden&&e){let t="cancelled";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${e.op}`),e.status||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.finish()}}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var Va=(e,t,n)=>{let r,a;return s=>{t.value>=0&&(s||n)&&(a=t.value-(r||0),(a||r===void 0)&&(r=t.value,t.delta=a,e(t)))}},$p=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`,Up=()=>{let e=Y.performance.timing,t=Y.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(let r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},zo=()=>Y.__WEB_VITALS_POLYFILL__?Y.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Up()):Y.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Wo=()=>{let e=zo();return e&&e.activationStart||0},Ha=(e,t)=>{let n=zo(),r="navigate";return n&&(Y.document.prerendering||Wo()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:$p(),navigationType:r}},fn=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(a=>{t(a.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},mr=(e,t)=>{let n=r=>{(r.type==="pagehide"||Y.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},Bp=e=>{let t=Ha("CLS",0),n,r=0,a=[],s=o=>{o.forEach(l=>{if(!l.hadRecentInput){let u=a[0],d=a[a.length-1];r&&a.length!==0&&l.startTime-d.startTime<1e3&&l.startTime-u.startTime<5e3?(r+=l.value,a.push(l)):(r=l.value,a=[l]),r>t.value&&(t.value=r,t.entries=a,n&&n())}})},i=fn("layout-shift",s);if(i){n=Va(e,t);let o=()=>{s(i.takeRecords()),n(!0)};return mr(o),o}},Vn=-1,Fp=()=>Y.document.visibilityState==="hidden"&&!Y.document.prerendering?0:1/0,Vp=()=>{mr(({timeStamp:e})=>{Vn=e},!0)},Ya=()=>(Vn<0&&(Vn=Fp(),Vp()),{get firstHiddenTime(){return Vn}}),Hp=e=>{let t=Ya(),n=Ha("FID"),r,a=o=>{o.startTime<t.firstHiddenTime&&(n.value=o.processingStart-o.startTime,n.entries.push(o),r(!0))},s=o=>{o.forEach(a)},i=fn("first-input",s);r=Va(e,n),i&&mr(()=>{s(i.takeRecords()),i.disconnect()},!0)},Hs={},Yp=e=>{let t=Ya(),n=Ha("LCP"),r,a=i=>{let o=i[i.length-1];if(o){let l=Math.max(o.startTime-Wo(),0);l<t.firstHiddenTime&&(n.value=l,n.entries=[o],r())}},s=fn("largest-contentful-paint",a);if(s){r=Va(e,n);let i=()=>{Hs[n.id]||(a(s.takeRecords()),s.disconnect(),Hs[n.id]=!0,r(!0))};return["keydown","click"].forEach(o=>{addEventListener(o,i,{once:!0,capture:!0})}),mr(i,!0),i}};function Ir(e){return typeof e=="number"&&isFinite(e)}function Nt(e,t){var n=t,{startTimestamp:r}=n,a=Sd(n,["startTimestamp"]);return r&&e.startTimestamp>r&&(e.startTimestamp=r),e.startChild(y({startTimestamp:r},a))}function Q(e){return e/1e3}function qo(){return Y&&Y.addEventListener&&Y.performance}var Ys=0,K={},we,Ht;function Gp(){let e=qo();if(e&&ke){e.mark&&Y.performance.mark("sentry-tracing-init"),Xp();let t=qp(),n=Kp();return()=>{t&&t(),n&&n()}}return()=>{}}function zp(){fn("longtask",e=>{for(let t of e){let n=dn();if(!n)return;let r=Q(ke+t.startTime),a=Q(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+a})}})}function Wp(){fn("event",e=>{for(let t of e){let n=dn();if(!n)return;if(t.name==="click"){let r=Q(ke+t.startTime),a=Q(t.duration);n.startChild({description:Ct(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+a})}}},{durationThreshold:0})}function qp(){return Bp(e=>{let t=e.entries.pop();t&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Measurements] Adding CLS"),K.cls={value:e.value,unit:""},Ht=t)})}function Kp(){return Yp(e=>{let t=e.entries.pop();t&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Measurements] Adding LCP"),K.lcp={value:e.value,unit:"millisecond"},we=t)})}function Xp(){Hp(e=>{let t=e.entries.pop();if(!t)return;let n=Q(ke),r=Q(t.startTime);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Measurements] Adding FID"),K.fid={value:e.value,unit:"millisecond"},K["mark.fid"]={value:n+r,unit:"second"}})}function Jp(e){let t=qo();if(!t||!Y.performance.getEntries||!ke)return;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Tracing] Adding & adjusting spans using Performance API");let n=Q(ke),r=t.getEntries(),a,s;if(r.slice(Ys).forEach(i=>{let o=Q(i.startTime),l=Q(i.duration);if(!(e.op==="navigation"&&n+o<e.startTimestamp))switch(i.entryType){case"navigation":{e0(e,i,n),a=n+Q(i.responseStart),s=n+Q(i.requestStart);break}case"mark":case"paint":case"measure":{Qp(e,i,o,l,n);let u=Ya(),d=i.startTime<u.firstHiddenTime;i.name==="first-paint"&&d&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Measurements] Adding FP"),K.fp={value:i.startTime,unit:"millisecond"}),i.name==="first-contentful-paint"&&d&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Measurements] Adding FCP"),K.fcp={value:i.startTime,unit:"millisecond"});break}case"resource":{let u=i.name.replace(Y.location.origin,"");n0(e,i,u,o,l,n);break}}}),Ys=Math.max(r.length-1,0),r0(e),e.op==="pageload"){typeof a=="number"&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Measurements] Adding TTFB"),K.ttfb={value:(a-e.startTimestamp)*1e3,unit:"millisecond"},typeof s=="number"&&s<=a&&(K["ttfb.requestTime"]={value:(a-s)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(o=>{if(!K[o]||n>=e.startTimestamp)return;let l=K[o].value,u=n+Q(l),d=Math.abs((u-e.startTimestamp)*1e3),h=d-l;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`[Measurements] Normalized ${o} from ${l} to ${d} (${h})`),K[o].value=d});let i=K["mark.fid"];i&&K.fid&&(Nt(e,{description:"first input delay",endTimestamp:i.value+Q(K.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:i.value}),delete K["mark.fid"]),"fcp"in K||delete K.cls,Object.keys(K).forEach(o=>{e.setMeasurement(o,K[o].value,K[o].unit)}),a0(e)}we=void 0,Ht=void 0,K={}}function Qp(e,t,n,r,a){let s=a+n,i=s+r;return Nt(e,{description:t.name,endTimestamp:i,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:s}),s}function e0(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Mn(e,t,r,n)}),Mn(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),Mn(e,t,"fetch",n,"cache","domainLookupStart"),Mn(e,t,"domainLookup",n,"DNS"),t0(e,t,n)}function Mn(e,t,n,r,a,s){let i=s?t[s]:t[`${n}End`],o=t[`${n}Start`];!o||!i||Nt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:a||n,startTimestamp:r+Q(o),endTimestamp:r+Q(i)})}function t0(e,t,n){Nt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+Q(t.requestStart),endTimestamp:n+Q(t.responseEnd)}),Nt(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+Q(t.responseStart),endTimestamp:n+Q(t.responseEnd)})}function n0(e,t,n,r,a,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let i={};"transferSize"in t&&(i["http.response_transfer_size"]=t.transferSize),"encodedBodySize"in t&&(i["http.response_content_length"]=t.encodedBodySize),"decodedBodySize"in t&&(i["http.decoded_response_content_length"]=t.decodedBodySize),"renderBlockingStatus"in t&&(i["resource.render_blocking_status"]=t.renderBlockingStatus);let o=s+r,l=o+a;Nt(e,{description:n,endTimestamp:l,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:o,data:i})}function r0(e){let t=Y.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Ir(n.rtt)&&(K["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Ir(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Ir(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function a0(e){we&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Measurements] Adding LCP Data"),we.element&&e.setTag("lcp.element",Ct(we.element)),we.id&&e.setTag("lcp.id",we.id),we.url&&e.setTag("lcp.url",we.url.trim().slice(0,200)),e.setTag("lcp.size",we.size)),Ht&&Ht.sources&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log("[Measurements] Adding CLS Data"),Ht.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,Ct(t.node))))}var ca=["localhost",/^\/(?!\/)/],la={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:ca,tracePropagationTargets:ca};function s0(e){let{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:a,shouldCreateSpanForRequest:s,enableHTTPTimings:i}=y({traceFetch:la.traceFetch,traceXHR:la.traceXHR},e),o=typeof s=="function"?s:d=>!0,l=d=>l0(d,r||a),u={};t&&me("fetch",d=>{let h=u0(d,o,l,u);i&&h&&Gs(h)}),n&&me("xhr",d=>{let h=f0(d,o,l,u);i&&h&&Gs(h)})}function i0(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Gs(e){let t=e.data.url,n=new PerformanceObserver(r=>{r.getEntries().forEach(a=>{i0(a)&&a.name.endsWith(t)&&(c0(a).forEach(s=>e.setData(...s)),n.disconnect())})});n.observe({entryTypes:["resource"]})}function o0(e){let t="unknown",n="unknown",r="";for(let a of e){if(a==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(a))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=a}return r===e&&(t=r),{name:t,version:n}}function Se(e=0){return((ke||performance.timeOrigin)+e)/1e3}function c0(e){let{name:t,version:n}=o0(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),ke?[...r,["http.request.redirect_start",Se(e.redirectStart)],["http.request.fetch_start",Se(e.fetchStart)],["http.request.domain_lookup_start",Se(e.domainLookupStart)],["http.request.domain_lookup_end",Se(e.domainLookupEnd)],["http.request.connect_start",Se(e.connectStart)],["http.request.secure_connection_start",Se(e.secureConnectionStart)],["http.request.connection_end",Se(e.connectEnd)],["http.request.request_start",Se(e.requestStart)],["http.request.response_start",Se(e.responseStart)],["http.request.response_end",Se(e.responseEnd)]]:r}function l0(e,t){return on(e,t||ca)}function u0(e,t,n,r){if(!Pa()||!e.fetchData)return;let a=t(e.fetchData.url);if(e.endTimestamp&&a){let p=e.fetchData.__span;if(!p)return;let _=r[p];if(_){if(e.response){_.setHttpStatus(e.response.status);let v=e.response&&e.response.headers&&e.response.headers.get("content-length"),g=parseInt(v);g>0&&_.setData("http.response_content_length",g)}else e.error&&_.setStatus("internal_error");_.finish(),delete r[p]}return}let s=te(),i=s.getScope(),o=s.getClient(),l=i.getSpan(),{method:u,url:d}=e.fetchData,h=a&&l?l.startChild({data:{url:d,type:"fetch","http.method":u},description:`${u} ${d}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(h&&(e.fetchData.__span=h.spanId,r[h.spanId]=h),n(e.fetchData.url)&&o){let p=e.args[0];e.args[1]=e.args[1]||{};let _=e.args[1];_.headers=d0(p,o,i,_,h)}return h}function d0(e,t,n,r,a){let s=a||n.getSpan(),i=s&&s.transaction,{traceId:o,sampled:l,dsc:u}=n.getPropagationContext(),d=s?s.toTraceparent():Da(o,void 0,l),h=i?i.getDynamicSamplingContext():u||lr(o,t,n),p=na(h),_=typeof Request<"u"&&Ue(e,Request)?e.headers:r.headers;if(_)if(typeof Headers<"u"&&Ue(_,Headers)){let v=new Headers(_);return v.append("sentry-trace",d),p&&v.append(ta,p),v}else if(Array.isArray(_)){let v=[..._,["sentry-trace",d]];return p&&v.push([ta,p]),v}else{let v="baggage"in _?_.baggage:void 0,g=[];return Array.isArray(v)?g.push(...v):v&&g.push(v),p&&g.push(p),V(y({},_),{"sentry-trace":d,baggage:g.length>0?g.join(","):void 0})}else return{"sentry-trace":d,baggage:p}}function f0(e,t,n,r){let a=e.xhr,s=a&&a[gt];if(!Pa()||a&&a.__sentry_own_request__||!a||!s)return;let i=t(s.url);if(e.endTimestamp&&i){let h=a.__sentry_xhr_span_id__;if(!h)return;let p=r[h];p&&(p.setHttpStatus(s.status_code),p.finish(),delete r[h]);return}let o=te(),l=o.getScope(),u=l.getSpan(),d=i&&u?u.startChild({data:V(y({},s.data),{type:"xhr","http.method":s.method,url:s.url}),description:`${s.method} ${s.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(d&&(a.__sentry_xhr_span_id__=d.spanId,r[a.__sentry_xhr_span_id__]=d),a.setRequestHeader&&n(s.url))if(d){let h=d&&d.transaction,p=h&&h.getDynamicSamplingContext(),_=na(p);zs(a,d.toTraceparent(),_)}else{let h=o.getClient(),{traceId:p,sampled:_,dsc:v}=l.getPropagationContext(),g=Da(p,void 0,_),m=v||(h?lr(p,h,l):void 0),E=na(m);zs(a,g,E)}return d}function zs(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(ta,n)}catch{}}function h0(e,t=!0,n=!0){if(!Y||!Y.location){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn("Could not initialize routing instrumentation due to invalid location");return}let r=Y.location.href,a;t&&(a=e({name:Y.location.pathname,startTimestamp:ke?ke/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&me("history",({to:s,from:i})=>{if(i===void 0&&r&&r.indexOf(s)!==-1){r=void 0;return}i!==s&&(r=void 0,a&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`[Tracing] Finishing current transaction with op: ${a.op}`),a.finish()),a=e({name:Y.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}var p0="BrowserTracing",m0=y(V(y({},Fn),{markBackgroundTransactions:!0,routingInstrumentation:h0,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{}}),la),_0=class{constructor(e){this.name=p0,this._hasSetTracePropagationTargets=!1,sh(),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options=y(y({},m0),e),this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=Gp(),this.options.enableLongTask&&zp(),this.options._experiments.enableInteractions&&Wp()}setupOnce(e,t){this._getCurrentHub=t;let n=t().getClient(),r=n&&n.getOptions(),{routingInstrumentation:a,startTransactionOnLocationChange:s,startTransactionOnPageLoad:i,markBackgroundTransactions:o,traceFetch:l,traceXHR:u,shouldCreateSpanForRequest:d,enableHTTPTimings:h,_experiments:p}=this.options,_=r&&r.tracePropagationTargets,v=_||this.options.tracePropagationTargets;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&_&&T.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),a(g=>{let m=this._createRouteTransaction(g);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(m,g,t),m},i,s),o&&Zp(),p.enableInteractions&&this._registerInteractionListener(),s0({traceFetch:l,traceXHR:u,tracePropagationTargets:v,shouldCreateSpanForRequest:d,enableHTTPTimings:h})}_createRouteTransaction(e){if(!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`);return}let t=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:r,finalTimeout:a,heartbeatInterval:s}=this.options,i=e.op==="pageload",o=i?Ws("sentry-trace"):"",l=i?Ws("baggage"):"",{traceparentData:u,dynamicSamplingContext:d,propagationContext:h}=jf(o,l),p=V(y(y({},e),u),{metadata:V(y({},e.metadata),{dynamicSamplingContext:u&&!d?{}:d}),trimEnd:!0}),_=typeof n=="function"?n(p):p,v=_===void 0?V(y({},p),{sampled:!1}):_;v.metadata=v.name!==p.name?V(y({},v.metadata),{source:"custom"}):v.metadata,this._latestRouteName=v.name,this._latestRouteSource=v.metadata&&v.metadata.source,v.sampled===!1&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`[Tracing] Will not send ${v.op} transaction because of beforeNavigate.`),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.log(`[Tracing] Starting ${v.op} transaction on scope`);let{location:g}=Y,m=Os(t,v,r,a,!0,{location:g},s),E=t.getScope();return i&&u?E.setPropagationContext(h):E.setPropagationContext({traceId:m.traceId,spanId:m.spanId,parentSpanId:m.parentSpanId,sampled:m.sampled}),m.registerBeforeFinishCallback(x=>{this._collectWebVitals(),Jp(x)}),m}_registerInteractionListener(){let e,t=()=>{let{idleTimeout:n,finalTimeout:r,heartbeatInterval:a}=this.options,s="ui.action.click",i=dn();if(i&&i.op&&["navigation","pageload"].includes(i.op)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`[Tracing] Did not create ${s} transaction because a pageload or navigation transaction is in progress.`);return}if(e&&(e.setFinishReason("interactionInterrupted"),e.finish(),e=void 0),!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`[Tracing] Did not create ${s} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&T.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`);return}let o=this._getCurrentHub(),{location:l}=Y,u={name:this._latestRouteName,op:s,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};e=Os(o,u,n,r,!0,{location:l},a)};["click"].forEach(n=>{addEventListener(n,t,{once:!1,capture:!0})})}};function Ws(e){let t=Pd(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}var Ko={};G.Sentry&&G.Sentry.Integrations&&(Ko=G.Sentry.Integrations);y(y(y({},Ko),Lo),Go);var g0="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",Pn=null;function Xo(e,t){if(e===!1)return Or(e);if(Pn)return Or(Pn,t);let n=new qh({dsn:g0,transport:window.fetch?Jh:ep,stackParser:_p,integrations:[new dr,new Lt,new fr,new pr,new hr,new _0]});return Pn=new Ma(n),Or(Pn,t)}function Or(e,t={key:"source",value:"@hCaptcha/loader"}){return{addBreadcrumb:n=>{e&&e.addBreadcrumb(n)},captureMessage:n=>{e&&e.withScope(function(r){r.setTag(t.key,t.value),e.captureMessage(n)})},captureException:n=>{e&&e.withScope(function(r){r.setTag(t.key,t.value),e.captureEvent({message:Yr,level:"error",extra:n})})}}}function v0({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:r,apihost:a="https://js.hcaptcha.com",cleanup:s=!0,secureApi:i=!1,scriptSource:o=""}={}){let l=lo(e),u=co(l);return new Promise((d,h)=>{let p=u.document.createElement("script");p.id=Td,o?p.src=`${o}?onload=${Un}`:i?p.src=`${a}/1/secure-api.js?onload=${Un}`:p.src=`${a}/1/api.js?onload=${Un}`,p.crossOrigin=r,p.async=n;let _=(v,g)=>{try{!i&&s&&l.removeChild(p),g(v)}catch(m){h(m)}};p.onload=v=>_(v,d),p.onerror=v=>_(v,h),p.src+=t!==""?`&${t}`:"",l.appendChild(p)})}var Ln=[];function y0(e={cleanup:!0},t){try{t.addBreadcrumb({category:mt,message:"hCaptcha loader params",data:e});let n=lo(e.scriptLocation),r=co(n),a=Ln.find(({scope:i})=>i===r.window);if(a)return t.addBreadcrumb({category:mt,message:"hCaptcha already loaded"}),a.promise;let s=new Promise((i,o)=>Ca(this,null,function*(){try{r.window[Un]=()=>{t.addBreadcrumb({category:mt,message:"hCaptcha script called onload function"}),i(r.window.hcaptcha)};let l=wd({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl});yield v0(y({query:l},e)),t.addBreadcrumb({category:mt,message:"hCaptcha loaded",data:a})}catch(l){t.addBreadcrumb({category:mt,message:"hCaptcha failed to load",data:l});let u=Ln.findIndex(d=>d.scope===r.window);u!==-1&&Ln.splice(u,1),t.captureException(l),o(new Error(Yr))}}));return Ln.push({promise:s,scope:r.window}),s}catch(n){return t.captureException(n),Promise.reject(new Error(Yr))}}function Jo(e,t=0){return Ca(this,null,function*(){let n=t<2?"Retry loading hCaptcha Api":"Exceeded maximum retries",r=Xo(e.sentry);try{return yield y0(e,r)}catch(a){return r.addBreadcrumb({SENTRY_SOURCE:mt,message:n,data:{error:a}}),t>=2?(r.captureException(a),Promise.reject(a)):(t+=1,Jo(e,t))}})}function E0(){return Ca(this,arguments,function*(e={}){return yield Jo(e)})}function qs(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function Ks(e){return e||document.head}var pt={key:"source",value:"@hCaptcha/react"},$t={mounted:"hCaptcha component mounted",expired:"hCaptcha expired",unmounted:"hCaptcha component unmounted",reset:"hCaptcha reset",removed:"hCaptcha removed"},x0=function(e){Ed(t,e);function t(r){var a;return a=e.call(this,r)||this,a._hcaptcha=void 0,a.renderCaptcha=a.renderCaptcha.bind(fe(a)),a.resetCaptcha=a.resetCaptcha.bind(fe(a)),a.removeCaptcha=a.removeCaptcha.bind(fe(a)),a.isReady=a.isReady.bind(fe(a)),a._onReady=null,a.loadCaptcha=a.loadCaptcha.bind(fe(a)),a.handleOnLoad=a.handleOnLoad.bind(fe(a)),a.handleSubmit=a.handleSubmit.bind(fe(a)),a.handleExpire=a.handleExpire.bind(fe(a)),a.handleError=a.handleError.bind(fe(a)),a.handleOpen=a.handleOpen.bind(fe(a)),a.handleClose=a.handleClose.bind(fe(a)),a.handleChallengeExpired=a.handleChallengeExpired.bind(fe(a)),a.ref=c.createRef(),a.apiScriptRequested=!1,a.sentryHub=null,a.captchaId="",a.state={isApiReady:!1,isRemoved:!1,elementId:r.id},a}var n=t.prototype;return n.componentDidMount=function(){var a=this,s=Ks(this.props.scriptLocation),i=qs(s);this._hcaptcha=i.window.hcaptcha||void 0;var o=typeof this._hcaptcha<"u";if(this.sentryHub=Xo(this.props.sentry,pt),this.sentryHub.addBreadcrumb({category:pt.value,message:$t.mounted}),o){this.setState({isApiReady:!0},function(){a.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var a=this._hcaptcha,s=this.captchaId;this.isReady()&&(a.reset(s),a.remove(s),this.sentryHub.addBreadcrumb({category:pt.value,message:$t.unmounted}))},n.shouldComponentUpdate=function(a,s){return!(this.state.isApiReady!==s.isApiReady||this.state.isRemoved!==s.isRemoved)},n.componentDidUpdate=function(a){var s=this,i=["sitekey","size","theme","tabindex","languageOverride","endpoint"],o=i.every(function(l){return a[l]===s.props[l]});o||this.removeCaptcha(function(){s.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var a=this.props,s=a.apihost,i=a.assethost,o=a.endpoint,l=a.host,u=a.imghost,d=a.languageOverride,h=a.reCaptchaCompat,p=a.reportapi,_=a.sentry,v=a.custom,g=a.loadAsync,m=a.scriptLocation,E=a.scriptSource,x=a.secureApi,b=a.cleanup,w=b===void 0?!0:b,R={render:"explicit",apihost:s,assethost:i,endpoint:o,hl:d,host:l,imghost:u,recaptchacompat:h===!1?"off":null,reportapi:p,sentry:_,custom:v,loadAsync:g,scriptLocation:m,scriptSource:E,secureApi:x,cleanup:w};E0(R).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(a){var s=this,i=this.props.onReady,o=this.state.isApiReady,l=this.captchaId;if(!(!o||l)){var u=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),d=this._hcaptcha,h=d.render(this.ref.current,u);this.captchaId=h,this.setState({isRemoved:!1},function(){a&&a(),i&&i(),s._onReady&&s._onReady(h)})}},n.resetCaptcha=function(){var a=this._hcaptcha,s=this.captchaId;this.isReady()&&(a.reset(s),this.sentryHub.addBreadcrumb({category:pt.value,message:$t.reset}))},n.removeCaptcha=function(a){var s=this._hcaptcha,i=this.captchaId;this.isReady()&&(this.setState({isRemoved:!0},function(){s.remove(i),a&&a()}),this.sentryHub.addBreadcrumb({category:pt.value,message:$t.removed}))},n.handleOnLoad=function(){var a=this;this.setState({isApiReady:!0},function(){try{var s=Ks(a.props.scriptLocation),i=qs(s);a._hcaptcha=i.window.hcaptcha,a.renderCaptcha(function(){var o=a.props.onLoad;o&&o()})}catch(o){a.sentryHub.captureException(o)}})},n.handleSubmit=function(a){var s=this.props.onVerify,i=this.state.isRemoved,o=this._hcaptcha,l=this.captchaId;if(!(typeof o>"u"||i)){var u=o.getResponse(l),d=o.getRespKey(l);s&&s(u,d)}},n.handleExpire=function(){var a=this.props.onExpire,s=this._hcaptcha,i=this.captchaId;this.isReady()&&(s.reset(i),a&&a(),this.sentryHub.addBreadcrumb({category:pt.value,message:$t.expired}))},n.handleError=function(a){var s=this.props.onError,i=this._hcaptcha,o=this.captchaId;this.isReady()&&i.reset(o),s&&s(a)},n.isReady=function(){var a=this.state,s=a.isApiReady,i=a.isRemoved;return s&&!i},n.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},n.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},n.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},n.execute=function(a){var s=this;a===void 0&&(a=null),a=typeof a=="object"?a:null;try{var i=this._hcaptcha,o=this.captchaId;if(!this.isReady()){var l,u=new Promise(function(d,h){s._onReady=function(p){try{var _=s._hcaptcha;a&&a.async?_.execute(p,a).then(d).catch(h):d(_.execute(p,a))}catch(v){h(v)}}});return(l=a)!=null&&l.async?u:null}return i.execute(o,a)}catch(d){return this.sentryHub.captureException(d),a&&a.async?Promise.reject(d):null}},n.close=function(){var a=this._hcaptcha,s=this.captchaId;if(this.isReady())return a.close(s)},n.setData=function(a){var s=this._hcaptcha,i=this.captchaId;this.isReady()&&(a&&typeof a!="object"&&(a=null),s.setData(i,a))},n.getResponse=function(){var a=this._hcaptcha;return a.getResponse(this.captchaId)},n.getRespKey=function(){var a=this._hcaptcha;return a.getRespKey(this.captchaId)},n.render=function(){var a=this.state.elementId;return c.createElement("div",{ref:this.ref,id:a})},t}(c.Component);const tt=typeof window>"u"?null:window.matchMedia("(prefers-color-scheme: dark)");function b0(){const[e,t]=c.useState(tt!=null&&tt.matches?"dark":"light");return c.useEffect(()=>{if(!tt)return;const n=()=>{t(tt.matches?"dark":"light")};return tt.addEventListener("change",n),()=>{tt.removeEventListener("change",n)}},[]),e}function S0({siteKey:e,token:t,onToken:n,prevLabel:r,onPrev:a,nextLabel:s,onNext:i,ref:o,invalid:l,children:u,...d}){const h=c.useRef(null),p=b0(),[_,v]=c.useState(t),g=c.useCallback(()=>{var x;(x=h.current)==null||x.execute()},[]),m=c.useCallback((x,b)=>{v(x),n(x,b)},[n]),E=c.useCallback(x=>{if(_)return i(x);if(h.current)h.current.execute();else throw new Error("Unable to load hCaptcha")},[_,i]);return f.jsx(Ot,{...d,cancelLabel:r,onCancel:a,submitLabel:s,onSubmit:E,append:u,invalid:l||!_,children:f.jsx(x0,{theme:p,sitekey:e,onLoad:g,onVerify:m,ref:Qe([o,h])})})}function w0({links:e,className:t,...n}){const r=e==null?void 0:e.find(a=>a.rel==="help");return r?f.jsx("p",{...n,className:X("text-text-default rounded-md bg-slate-100 p-3 text-sm dark:bg-slate-800",t),children:f.jsx(N,{id:"87VTIH",components:{0:f.jsx(Pr,{link:r,className:"text-primary underline"})}})}):null}function T0({onBack:e,backLabel:t,onValidateNewHandle:n,onDone:r}){const{availableUserDomains:a=[],hcaptchaSiteKey:s=void 0,inviteCodeRequired:i=!0,links:o}=ga(),[l,u]=c.useState(void 0),[d,h]=c.useState(void 0),[p,_]=c.useState(void 0),v=s==null?void 0:p||!1,g=c.useCallback(m=>{if(l&&d&&v!==!1)return r({...l,handle:d,hcaptchaToken:v},m)},[l,d,v,r]);return f.jsxs(Le,{title:{id:"e+RpCP"},subtitle:f.jsx(N,{id:"qjBGxf"}),children:[f.jsx(_d,{doneLabel:f.jsx(N,{id:"e+RpCP"}),onBack:e,backLabel:t,onDone:g,steps:[{invalid:!d,titleRender:()=>f.jsx(N,{id:"khEQ02"}),contentRender:({prev:m,prevLabel:E,next:x,nextLabel:b,invalid:w})=>f.jsx(yd,{className:"grow",invalid:w,domains:a,handle:d,onHandle:h,prevLabel:E,onPrev:m,nextLabel:b,onNext:async R=>{if(d&&await n({handle:d},R),!R.aborted)return x(R)},children:f.jsx(kr,{links:o})})},{invalid:!l,titleRender:()=>f.jsx(N,{id:"gdRnT7"}),contentRender:({prev:m,prevLabel:E,next:x,nextLabel:b,invalid:w})=>f.jsx(gd,{className:"grow",invalid:w,prevLabel:E,onPrev:m,nextLabel:b,onNext:x,inviteCodeRequired:i,credentials:l,onCredentials:u,children:f.jsx(kr,{links:o})})},s!=null&&{invalid:v===!1,titleRender:()=>f.jsx(N,{id:"aIar4b"}),contentRender:({prev:m,prevLabel:E,next:x,nextLabel:b,invalid:w})=>f.jsx(S0,{className:"grow",invalid:w,siteKey:s,token:p,onToken:_,prevLabel:E,onPrev:m,nextLabel:b,onNext:x,children:f.jsx(kr,{links:o})})}]}),f.jsx(w0,{className:"mt-4",links:o})]})}const Ga=c.createContext(null);Ga.displayName="AuthenticationContext";function fm({disableRemember:e=!1,promptMode:t,forcedIdentifier:n,onCancel:r,children:a}){const{availableUserDomains:s}=ga(),i=!!(s!=null&&s.length),[o,l]=c.useState(void 0),{sessions:u,session:d,setSession:h,doValidateNewHandle:p,doSignUp:_,doSignIn:v,doInitiatePasswordReset:g,doConfirmResetPassword:m}=Pi(),[E,x,b]=c.useMemo(()=>{if(n){const I=u.filter(({account:H})=>H.sub===n||H.preferred_username===n);return[!1,I[0]??null,I]}else return[!0,d,u]},[d,u,n]),w=!i||b.length>0||!E?2:0,[R,A]=c.useState(()=>t==="create"&&i?1:w),j=()=>A(w),U=()=>A(2),z=i?()=>A(1):void 0;c.useEffect(()=>{R===4?x&&x.loginRequired?A(2):x||A(w):R===0?w!==0&&A(w):R===1?i||A(w):R===2&&x&&!x.loginRequired&&A(4)},[R,i,w,x]);const O=c.useMemo(()=>!x||x.loginRequired?null:{session:x,sessions:b,canSwitchAccounts:E},[x,b,E]);return O?f.jsx(Ga,{value:O,children:a}):R===0?f.jsx(Bu,{onSignIn:U,onSignUp:z,onCancel:r}):R===1?f.jsx(T0,{onValidateNewHandle:p,onBack:j,onDone:_}):R===3?f.jsx(nd,{emailDefault:o,onResetPasswordRequest:g,onResetPasswordConfirm:m,onBack:U}):f.jsx(fd,{disableRemember:e,forcedIdentifier:n,sessions:b,session:x,setSession:h,onSignIn:v,onSignUp:z,onBack:w===2?r:j,backLabel:w===2?f.jsx(N,{id:"dEgA5A"}):void 0,onForgotPassword:I=>{A(3),l(I)}})}function C0(){const e=c.useContext(Ga);if(e)return e;throw new Error("useAuthenticationContext must be used within an AuthenticationProvider")}function hm(){return C0().session}var F;(function(e){e.assertEqual=a=>a;function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const s={};for(const i of a)s[i]=i;return s},e.getValidEnumValues=a=>{const s=e.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),i={};for(const o of s)i[o]=a[o];return e.objectValues(i)},e.objectValues=a=>e.objectKeys(a).map(function(s){return a[s]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const s=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&s.push(i);return s},e.find=(a,s)=>{for(const i of a)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function r(a,s=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(F||(F={}));var ua;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ua||(ua={}));const k=F.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Pe=e=>{switch(typeof e){case"undefined":return k.undefined;case"string":return k.string;case"number":return isNaN(e)?k.nan:k.number;case"boolean":return k.boolean;case"function":return k.function;case"bigint":return k.bigint;case"symbol":return k.symbol;case"object":return Array.isArray(e)?k.array:e===null?k.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?k.promise:typeof Map<"u"&&e instanceof Map?k.map:typeof Set<"u"&&e instanceof Set?k.set:typeof Date<"u"&&e instanceof Date?k.date:k.object;default:return k.unknown}},S=F.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),R0=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class ue extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(s){return s.message},r={_errors:[]},a=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let o=r,l=0;for(;l<i.path.length;){const u=i.path[l];l===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(n(i))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return a(this),r}static assert(t){if(!(t instanceof ue))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,F.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ue.create=e=>new ue(e);const At=(e,t)=>{let n;switch(e.code){case S.invalid_type:e.received===k.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case S.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,F.jsonStringifyReplacer)}`;break;case S.unrecognized_keys:n=`Unrecognized key(s) in object: ${F.joinValues(e.keys,", ")}`;break;case S.invalid_union:n="Invalid input";break;case S.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${F.joinValues(e.options)}`;break;case S.invalid_enum_value:n=`Invalid enum value. Expected ${F.joinValues(e.options)}, received '${e.received}'`;break;case S.invalid_arguments:n="Invalid function arguments";break;case S.invalid_return_type:n="Invalid function return type";break;case S.invalid_date:n="Invalid date";break;case S.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:F.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case S.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case S.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case S.custom:n="Invalid input";break;case S.invalid_intersection_types:n="Intersection results could not be merged";break;case S.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case S.not_finite:n="Number must be finite";break;default:n=t.defaultError,F.assertNever(e)}return{message:n}};let Qo=At;function k0(e){Qo=e}function Wn(){return Qo}const qn=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],i={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let o="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)o=u(i,{data:t,defaultError:o}).message;return{...a,path:s,message:o}},N0=[];function C(e,t){const n=Wn(),r=qn({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===At?void 0:At].filter(a=>!!a)});e.common.issues.push(r)}class ie{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return P;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const s=await a.key,i=await a.value;r.push({key:s,value:i})}return ie.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:s,value:i}=a;if(s.status==="aborted"||i.status==="aborted")return P;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const P=Object.freeze({status:"aborted"}),vt=e=>({status:"dirty",value:e}),oe=e=>({status:"valid",value:e}),da=e=>e.status==="aborted",fa=e=>e.status==="dirty",ot=e=>e.status==="valid",Gt=e=>typeof Promise<"u"&&e instanceof Promise;function Kn(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function ec(e,t,n,r,a){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var D;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(D||(D={}));var Bt,Ft;class Ne{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Xs=(e,t)=>{if(ot(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ue(e.common.issues);return this._error=n,this._error}}};function Z(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(i,o)=>{var l,u;const{message:d}=e;return i.code==="invalid_enum_value"?{message:d??o.defaultError}:typeof o.data>"u"?{message:(l=d??r)!==null&&l!==void 0?l:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:o.defaultError}},description:a}}class ${get description(){return this._def.description}_getType(t){return Pe(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Pe(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ie,ctx:{common:t.parent.common,data:t.data,parsedType:Pe(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Gt(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const a={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pe(t)},s=this._parseSync({data:t,path:a.path,parent:a});return Xs(a,s)}"~validate"(t){var n,r;const a={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pe(t)};if(!this["~standard"].async)try{const s=this._parseSync({data:t,path:[],parent:a});return ot(s)?{value:s.value}:{issues:a.common.issues}}catch(s){!((r=(n=s==null?void 0:s.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),a.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:a}).then(s=>ot(s)?{value:s.value}:{issues:a.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pe(t)},a=this._parse({data:t,path:r.path,parent:r}),s=await(Gt(a)?a:Promise.resolve(a));return Xs(r,s)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,s)=>{const i=t(a),o=()=>s.addIssue({code:S.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new Ee({schema:this,typeName:M.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Re.create(this,this._def)}nullable(){return Je.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ye.create(this)}promise(){return Dt.create(this,this._def)}or(t){return Kt.create([this,t],this._def)}and(t){return Xt.create(this,t,this._def)}transform(t){return new Ee({...Z(this._def),schema:this,typeName:M.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new nn({...Z(this._def),innerType:this,defaultValue:n,typeName:M.ZodDefault})}brand(){return new za({typeName:M.ZodBranded,type:this,...Z(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new rn({...Z(this._def),innerType:this,catchValue:n,typeName:M.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return hn.create(this,t)}readonly(){return an.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const A0=/^c[^\s-]{8,}$/i,j0=/^[0-9a-z]+$/,D0=/^[0-9A-HJKMNP-TV-Z]{26}$/i,I0=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,O0=/^[a-z0-9_-]{21}$/i,M0=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,P0=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,L0=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Z0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Mr;const $0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,U0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,B0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,F0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,V0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,H0=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,tc="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Y0=new RegExp(`^${tc}$`);function nc(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function G0(e){return new RegExp(`^${nc(e)}$`)}function rc(e){let t=`${tc}T${nc(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function z0(e,t){return!!((t==="v4"||!t)&&$0.test(e)||(t==="v6"||!t)&&B0.test(e))}function W0(e,t){if(!M0.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||!a.typ||!a.alg||t&&a.alg!==t)}catch{return!1}}function q0(e,t){return!!((t==="v4"||!t)&&U0.test(e)||(t==="v6"||!t)&&F0.test(e))}class _e extends ${_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==k.string){const s=this._getOrReturnCtx(t);return C(s,{code:S.invalid_type,expected:k.string,received:s.parsedType}),P}const r=new ie;let a;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(a=this._getOrReturnCtx(t,a),C(a,{code:S.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(a=this._getOrReturnCtx(t,a),C(a,{code:S.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,o=t.data.length<s.value;(i||o)&&(a=this._getOrReturnCtx(t,a),i?C(a,{code:S.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&C(a,{code:S.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")L0.test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"email",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Mr||(Mr=new RegExp(Z0,"u")),Mr.test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"emoji",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")I0.test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"uuid",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")O0.test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"nanoid",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")A0.test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"cuid",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")j0.test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"cuid2",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")D0.test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"ulid",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),C(a,{validation:"url",code:S.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"regex",code:S.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(t,a),C(a,{code:S.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(a=this._getOrReturnCtx(t,a),C(a,{code:S.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(a=this._getOrReturnCtx(t,a),C(a,{code:S.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?rc(s).test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{code:S.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?Y0.test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{code:S.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?G0(s).test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{code:S.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?P0.test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"duration",code:S.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?z0(t.data,s.version)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"ip",code:S.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?W0(t.data,s.alg)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"jwt",code:S.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?q0(t.data,s.version)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"cidr",code:S.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?V0.test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"base64",code:S.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?H0.test(t.data)||(a=this._getOrReturnCtx(t,a),C(a,{validation:"base64url",code:S.invalid_string,message:s.message}),r.dirty()):F.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:S.invalid_string,...D.errToObj(r)})}_addCheck(t){return new _e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...D.errToObj(t)})}url(t){return this._addCheck({kind:"url",...D.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...D.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...D.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...D.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...D.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...D.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...D.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...D.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...D.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...D.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...D.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...D.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...D.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...D.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...D.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...D.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...D.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...D.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...D.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...D.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...D.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...D.errToObj(n)})}nonempty(t){return this.min(1,D.errToObj(t))}trim(){return new _e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}_e.create=e=>{var t;return new _e({checks:[],typeName:M.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Z(e)})};function K0(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,s=parseInt(e.toFixed(a).replace(".","")),i=parseInt(t.toFixed(a).replace(".",""));return s%i/Math.pow(10,a)}class qe extends ${constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==k.number){const s=this._getOrReturnCtx(t);return C(s,{code:S.invalid_type,expected:k.number,received:s.parsedType}),P}let r;const a=new ie;for(const s of this._def.checks)s.kind==="int"?F.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{code:S.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),C(r,{code:S.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),C(r,{code:S.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?K0(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),C(r,{code:S.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{code:S.not_finite,message:s.message}),a.dirty()):F.assertNever(s);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,D.toString(n))}gt(t,n){return this.setLimit("min",t,!1,D.toString(n))}lte(t,n){return this.setLimit("max",t,!0,D.toString(n))}lt(t,n){return this.setLimit("max",t,!1,D.toString(n))}setLimit(t,n,r,a){return new qe({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:D.toString(a)}]})}_addCheck(t){return new qe({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:D.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:D.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:D.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:D.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:D.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:D.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:D.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:D.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:D.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&F.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}qe.create=e=>new qe({checks:[],typeName:M.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Z(e)});class Ke extends ${constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==k.bigint)return this._getInvalidInput(t);let r;const a=new ie;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),C(r,{code:S.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),C(r,{code:S.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),C(r,{code:S.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):F.assertNever(s);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return C(n,{code:S.invalid_type,expected:k.bigint,received:n.parsedType}),P}gte(t,n){return this.setLimit("min",t,!0,D.toString(n))}gt(t,n){return this.setLimit("min",t,!1,D.toString(n))}lte(t,n){return this.setLimit("max",t,!0,D.toString(n))}lt(t,n){return this.setLimit("max",t,!1,D.toString(n))}setLimit(t,n,r,a){return new Ke({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:D.toString(a)}]})}_addCheck(t){return new Ke({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:D.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:D.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:D.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:D.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:D.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ke.create=e=>{var t;return new Ke({checks:[],typeName:M.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Z(e)})};class zt extends ${_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==k.boolean){const r=this._getOrReturnCtx(t);return C(r,{code:S.invalid_type,expected:k.boolean,received:r.parsedType}),P}return oe(t.data)}}zt.create=e=>new zt({typeName:M.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Z(e)});class ct extends ${_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==k.date){const s=this._getOrReturnCtx(t);return C(s,{code:S.invalid_type,expected:k.date,received:s.parsedType}),P}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return C(s,{code:S.invalid_date}),P}const r=new ie;let a;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(a=this._getOrReturnCtx(t,a),C(a,{code:S.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(a=this._getOrReturnCtx(t,a),C(a,{code:S.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):F.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ct({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:D.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:D.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ct.create=e=>new ct({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:M.ZodDate,...Z(e)});class Xn extends ${_parse(t){if(this._getType(t)!==k.symbol){const r=this._getOrReturnCtx(t);return C(r,{code:S.invalid_type,expected:k.symbol,received:r.parsedType}),P}return oe(t.data)}}Xn.create=e=>new Xn({typeName:M.ZodSymbol,...Z(e)});class Wt extends ${_parse(t){if(this._getType(t)!==k.undefined){const r=this._getOrReturnCtx(t);return C(r,{code:S.invalid_type,expected:k.undefined,received:r.parsedType}),P}return oe(t.data)}}Wt.create=e=>new Wt({typeName:M.ZodUndefined,...Z(e)});class qt extends ${_parse(t){if(this._getType(t)!==k.null){const r=this._getOrReturnCtx(t);return C(r,{code:S.invalid_type,expected:k.null,received:r.parsedType}),P}return oe(t.data)}}qt.create=e=>new qt({typeName:M.ZodNull,...Z(e)});class jt extends ${constructor(){super(...arguments),this._any=!0}_parse(t){return oe(t.data)}}jt.create=e=>new jt({typeName:M.ZodAny,...Z(e)});class rt extends ${constructor(){super(...arguments),this._unknown=!0}_parse(t){return oe(t.data)}}rt.create=e=>new rt({typeName:M.ZodUnknown,...Z(e)});class Be extends ${_parse(t){const n=this._getOrReturnCtx(t);return C(n,{code:S.invalid_type,expected:k.never,received:n.parsedType}),P}}Be.create=e=>new Be({typeName:M.ZodNever,...Z(e)});class Jn extends ${_parse(t){if(this._getType(t)!==k.undefined){const r=this._getOrReturnCtx(t);return C(r,{code:S.invalid_type,expected:k.void,received:r.parsedType}),P}return oe(t.data)}}Jn.create=e=>new Jn({typeName:M.ZodVoid,...Z(e)});class ye extends ${_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==k.array)return C(n,{code:S.invalid_type,expected:k.array,received:n.parsedType}),P;if(a.exactLength!==null){const i=n.data.length>a.exactLength.value,o=n.data.length<a.exactLength.value;(i||o)&&(C(n,{code:i?S.too_big:S.too_small,minimum:o?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(C(n,{code:S.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(C(n,{code:S.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,o)=>a.type._parseAsync(new Ne(n,i,n.path,o)))).then(i=>ie.mergeArray(r,i));const s=[...n.data].map((i,o)=>a.type._parseSync(new Ne(n,i,n.path,o)));return ie.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new ye({...this._def,minLength:{value:t,message:D.toString(n)}})}max(t,n){return new ye({...this._def,maxLength:{value:t,message:D.toString(n)}})}length(t,n){return new ye({...this._def,exactLength:{value:t,message:D.toString(n)}})}nonempty(t){return this.min(1,t)}}ye.create=(e,t)=>new ye({type:e,minLength:null,maxLength:null,exactLength:null,typeName:M.ZodArray,...Z(t)});function _t(e){if(e instanceof W){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Re.create(_t(r))}return new W({...e._def,shape:()=>t})}else return e instanceof ye?new ye({...e._def,type:_t(e.element)}):e instanceof Re?Re.create(_t(e.unwrap())):e instanceof Je?Je.create(_t(e.unwrap())):e instanceof Ae?Ae.create(e.items.map(t=>_t(t))):e}class W extends ${constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=F.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==k.object){const u=this._getOrReturnCtx(t);return C(u,{code:S.invalid_type,expected:k.object,received:u.parsedType}),P}const{status:r,ctx:a}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof Be&&this._def.unknownKeys==="strip"))for(const u in a.data)i.includes(u)||o.push(u);const l=[];for(const u of i){const d=s[u],h=a.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new Ne(a,h,a.path,u)),alwaysSet:u in a.data})}if(this._def.catchall instanceof Be){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of o)l.push({key:{status:"valid",value:d},value:{status:"valid",value:a.data[d]}});else if(u==="strict")o.length>0&&(C(a,{code:S.unrecognized_keys,keys:o}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of o){const h=a.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new Ne(a,h,a.path,d)),alwaysSet:d in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of l){const h=await d.key,p=await d.value;u.push({key:h,value:p,alwaysSet:d.alwaysSet})}return u}).then(u=>ie.mergeObjectSync(r,u)):ie.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return D.errToObj,new W({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var a,s,i,o;const l=(i=(s=(a=this._def).errorMap)===null||s===void 0?void 0:s.call(a,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(o=D.errToObj(t).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new W({...this._def,unknownKeys:"strip"})}passthrough(){return new W({...this._def,unknownKeys:"passthrough"})}extend(t){return new W({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new W({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:M.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new W({...this._def,catchall:t})}pick(t){const n={};return F.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new W({...this._def,shape:()=>n})}omit(t){const n={};return F.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new W({...this._def,shape:()=>n})}deepPartial(){return _t(this)}partial(t){const n={};return F.objectKeys(this.shape).forEach(r=>{const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}),new W({...this._def,shape:()=>n})}required(t){const n={};return F.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Re;)s=s._def.innerType;n[r]=s}}),new W({...this._def,shape:()=>n})}keyof(){return ac(F.objectKeys(this.shape))}}W.create=(e,t)=>new W({shape:()=>e,unknownKeys:"strip",catchall:Be.create(),typeName:M.ZodObject,...Z(t)});W.strictCreate=(e,t)=>new W({shape:()=>e,unknownKeys:"strict",catchall:Be.create(),typeName:M.ZodObject,...Z(t)});W.lazycreate=(e,t)=>new W({shape:e,unknownKeys:"strip",catchall:Be.create(),typeName:M.ZodObject,...Z(t)});class Kt extends ${_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const i=s.map(o=>new ue(o.ctx.common.issues));return C(n,{code:S.invalid_union,unionErrors:i}),P}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(a);{let s;const i=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!s&&(s={result:d,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=i.map(l=>new ue(l));return C(n,{code:S.invalid_union,unionErrors:o}),P}}get options(){return this._def.options}}Kt.create=(e,t)=>new Kt({options:e,typeName:M.ZodUnion,...Z(t)});const De=e=>e instanceof Qt?De(e.schema):e instanceof Ee?De(e.innerType()):e instanceof en?[e.value]:e instanceof Xe?e.options:e instanceof tn?F.objectValues(e.enum):e instanceof nn?De(e._def.innerType):e instanceof Wt?[void 0]:e instanceof qt?[null]:e instanceof Re?[void 0,...De(e.unwrap())]:e instanceof Je?[null,...De(e.unwrap())]:e instanceof za||e instanceof an?De(e.unwrap()):e instanceof rn?De(e._def.innerType):[];class _r extends ${_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==k.object)return C(n,{code:S.invalid_type,expected:k.object,received:n.parsedType}),P;const r=this.discriminator,a=n.data[r],s=this.optionsMap.get(a);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(C(n,{code:S.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),P)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const a=new Map;for(const s of n){const i=De(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const o of i){if(a.has(o))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(o)}`);a.set(o,s)}}return new _r({typeName:M.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a,...Z(r)})}}function ha(e,t){const n=Pe(e),r=Pe(t);if(e===t)return{valid:!0,data:e};if(n===k.object&&r===k.object){const a=F.objectKeys(t),s=F.objectKeys(e).filter(o=>a.indexOf(o)!==-1),i={...e,...t};for(const o of s){const l=ha(e[o],t[o]);if(!l.valid)return{valid:!1};i[o]=l.data}return{valid:!0,data:i}}else if(n===k.array&&r===k.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let s=0;s<e.length;s++){const i=e[s],o=t[s],l=ha(i,o);if(!l.valid)return{valid:!1};a.push(l.data)}return{valid:!0,data:a}}else return n===k.date&&r===k.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Xt extends ${_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(s,i)=>{if(da(s)||da(i))return P;const o=ha(s.value,i.value);return o.valid?((fa(s)||fa(i))&&n.dirty(),{status:n.value,value:o.data}):(C(r,{code:S.invalid_intersection_types}),P)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>a(s,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Xt.create=(e,t,n)=>new Xt({left:e,right:t,typeName:M.ZodIntersection,...Z(n)});class Ae extends ${_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==k.array)return C(r,{code:S.invalid_type,expected:k.array,received:r.parsedType}),P;if(r.data.length<this._def.items.length)return C(r,{code:S.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),P;!this._def.rest&&r.data.length>this._def.items.length&&(C(r,{code:S.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new Ne(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>ie.mergeArray(n,i)):ie.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Ae({...this._def,rest:t})}}Ae.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ae({items:e,typeName:M.ZodTuple,rest:null,...Z(t)})};class Jt extends ${get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==k.object)return C(r,{code:S.invalid_type,expected:k.object,received:r.parsedType}),P;const a=[],s=this._def.keyType,i=this._def.valueType;for(const o in r.data)a.push({key:s._parse(new Ne(r,o,r.path,o)),value:i._parse(new Ne(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?ie.mergeObjectAsync(n,a):ie.mergeObjectSync(n,a)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof $?new Jt({keyType:t,valueType:n,typeName:M.ZodRecord,...Z(r)}):new Jt({keyType:_e.create(),valueType:t,typeName:M.ZodRecord,...Z(n)})}}class Qn extends ${get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==k.map)return C(r,{code:S.invalid_type,expected:k.map,received:r.parsedType}),P;const a=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([o,l],u)=>({key:a._parse(new Ne(r,o,r.path,[u,"key"])),value:s._parse(new Ne(r,l,r.path,[u,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return P;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),o.set(u.value,d.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of i){const u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return P;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),o.set(u.value,d.value)}return{status:n.value,value:o}}}}Qn.create=(e,t,n)=>new Qn({valueType:t,keyType:e,typeName:M.ZodMap,...Z(n)});class lt extends ${_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==k.set)return C(r,{code:S.invalid_type,expected:k.set,received:r.parsedType}),P;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(C(r,{code:S.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(C(r,{code:S.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const u=new Set;for(const d of l){if(d.status==="aborted")return P;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const o=[...r.data.values()].map((l,u)=>s._parse(new Ne(r,l,r.path,u)));return r.common.async?Promise.all(o).then(l=>i(l)):i(o)}min(t,n){return new lt({...this._def,minSize:{value:t,message:D.toString(n)}})}max(t,n){return new lt({...this._def,maxSize:{value:t,message:D.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}lt.create=(e,t)=>new lt({valueType:e,minSize:null,maxSize:null,typeName:M.ZodSet,...Z(t)});class St extends ${constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==k.function)return C(n,{code:S.invalid_type,expected:k.function,received:n.parsedType}),P;function r(o,l){return qn({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Wn(),At].filter(u=>!!u),issueData:{code:S.invalid_arguments,argumentsError:l}})}function a(o,l){return qn({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Wn(),At].filter(u=>!!u),issueData:{code:S.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Dt){const o=this;return oe(async function(...l){const u=new ue([]),d=await o._def.args.parseAsync(l,s).catch(_=>{throw u.addIssue(r(l,_)),u}),h=await Reflect.apply(i,this,d);return await o._def.returns._def.type.parseAsync(h,s).catch(_=>{throw u.addIssue(a(h,_)),u})})}else{const o=this;return oe(function(...l){const u=o._def.args.safeParse(l,s);if(!u.success)throw new ue([r(l,u.error)]);const d=Reflect.apply(i,this,u.data),h=o._def.returns.safeParse(d,s);if(!h.success)throw new ue([a(d,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new St({...this._def,args:Ae.create(t).rest(rt.create())})}returns(t){return new St({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new St({args:t||Ae.create([]).rest(rt.create()),returns:n||rt.create(),typeName:M.ZodFunction,...Z(r)})}}class Qt extends ${get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Qt.create=(e,t)=>new Qt({getter:e,typeName:M.ZodLazy,...Z(t)});class en extends ${_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return C(n,{received:n.data,code:S.invalid_literal,expected:this._def.value}),P}return{status:"valid",value:t.data}}get value(){return this._def.value}}en.create=(e,t)=>new en({value:e,typeName:M.ZodLiteral,...Z(t)});function ac(e,t){return new Xe({values:e,typeName:M.ZodEnum,...Z(t)})}class Xe extends ${constructor(){super(...arguments),Bt.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return C(n,{expected:F.joinValues(r),received:n.parsedType,code:S.invalid_type}),P}if(Kn(this,Bt)||ec(this,Bt,new Set(this._def.values)),!Kn(this,Bt).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return C(n,{received:n.data,code:S.invalid_enum_value,options:r}),P}return oe(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Xe.create(t,{...this._def,...n})}exclude(t,n=this._def){return Xe.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Bt=new WeakMap;Xe.create=ac;class tn extends ${constructor(){super(...arguments),Ft.set(this,void 0)}_parse(t){const n=F.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==k.string&&r.parsedType!==k.number){const a=F.objectValues(n);return C(r,{expected:F.joinValues(a),received:r.parsedType,code:S.invalid_type}),P}if(Kn(this,Ft)||ec(this,Ft,new Set(F.getValidEnumValues(this._def.values))),!Kn(this,Ft).has(t.data)){const a=F.objectValues(n);return C(r,{received:r.data,code:S.invalid_enum_value,options:a}),P}return oe(t.data)}get enum(){return this._def.values}}Ft=new WeakMap;tn.create=(e,t)=>new tn({values:e,typeName:M.ZodNativeEnum,...Z(t)});class Dt extends ${unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==k.promise&&n.common.async===!1)return C(n,{code:S.invalid_type,expected:k.promise,received:n.parsedType}),P;const r=n.parsedType===k.promise?n.data:Promise.resolve(n.data);return oe(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Dt.create=(e,t)=>new Dt({type:e,typeName:M.ZodPromise,...Z(t)});class Ee extends ${innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===M.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,s={addIssue:i=>{C(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const i=a.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async o=>{if(n.value==="aborted")return P;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?P:l.status==="dirty"||n.value==="dirty"?vt(l.value):l});{if(n.value==="aborted")return P;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?P:o.status==="dirty"||n.value==="dirty"?vt(o.value):o}}if(a.type==="refinement"){const i=o=>{const l=a.refinement(o,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?P:(o.status==="dirty"&&n.dirty(),i(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?P:(o.status==="dirty"&&n.dirty(),i(o.value).then(()=>({status:n.value,value:o.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ot(i))return i;const o=a.transform(i.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>ot(i)?Promise.resolve(a.transform(i.value,s)).then(o=>({status:n.value,value:o})):i);F.assertNever(a)}}Ee.create=(e,t,n)=>new Ee({schema:e,typeName:M.ZodEffects,effect:t,...Z(n)});Ee.createWithPreprocess=(e,t,n)=>new Ee({schema:t,effect:{type:"preprocess",transform:e},typeName:M.ZodEffects,...Z(n)});class Re extends ${_parse(t){return this._getType(t)===k.undefined?oe(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Re.create=(e,t)=>new Re({innerType:e,typeName:M.ZodOptional,...Z(t)});class Je extends ${_parse(t){return this._getType(t)===k.null?oe(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Je.create=(e,t)=>new Je({innerType:e,typeName:M.ZodNullable,...Z(t)});class nn extends ${_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===k.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}nn.create=(e,t)=>new nn({innerType:e,typeName:M.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Z(t)});class rn extends ${_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Gt(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new ue(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new ue(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}rn.create=(e,t)=>new rn({innerType:e,typeName:M.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Z(t)});class er extends ${_parse(t){if(this._getType(t)!==k.nan){const r=this._getOrReturnCtx(t);return C(r,{code:S.invalid_type,expected:k.nan,received:r.parsedType}),P}return{status:"valid",value:t.data}}}er.create=e=>new er({typeName:M.ZodNaN,...Z(e)});const X0=Symbol("zod_brand");class za extends ${_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class hn extends ${_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?P:s.status==="dirty"?(n.dirty(),vt(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?P:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new hn({in:t,out:n,typeName:M.ZodPipeline})}}class an extends ${_parse(t){const n=this._def.innerType._parse(t),r=a=>(ot(a)&&(a.value=Object.freeze(a.value)),a);return Gt(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}an.create=(e,t)=>new an({innerType:e,typeName:M.ZodReadonly,...Z(t)});function Js(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function sc(e,t={},n){return e?jt.create().superRefine((r,a)=>{var s,i;const o=e(r);if(o instanceof Promise)return o.then(l=>{var u,d;if(!l){const h=Js(t,r),p=(d=(u=h.fatal)!==null&&u!==void 0?u:n)!==null&&d!==void 0?d:!0;a.addIssue({code:"custom",...h,fatal:p})}});if(!o){const l=Js(t,r),u=(i=(s=l.fatal)!==null&&s!==void 0?s:n)!==null&&i!==void 0?i:!0;a.addIssue({code:"custom",...l,fatal:u})}}):jt.create()}const J0={object:W.lazycreate};var M;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(M||(M={}));const Q0=(e,t={message:`Input not instance of ${e.name}`})=>sc(n=>n instanceof e,t),ic=_e.create,oc=qe.create,e1=er.create,t1=Ke.create,cc=zt.create,n1=ct.create,r1=Xn.create,a1=Wt.create,s1=qt.create,i1=jt.create,o1=rt.create,c1=Be.create,l1=Jn.create,u1=ye.create,d1=W.create,f1=W.strictCreate,h1=Kt.create,p1=_r.create,m1=Xt.create,_1=Ae.create,g1=Jt.create,v1=Qn.create,y1=lt.create,E1=St.create,x1=Qt.create,b1=en.create,S1=Xe.create,w1=tn.create,T1=Dt.create,Qs=Ee.create,C1=Re.create,R1=Je.create,k1=Ee.createWithPreprocess,N1=hn.create,A1=()=>ic().optional(),j1=()=>oc().optional(),D1=()=>cc().optional(),I1={string:e=>_e.create({...e,coerce:!0}),number:e=>qe.create({...e,coerce:!0}),boolean:e=>zt.create({...e,coerce:!0}),bigint:e=>Ke.create({...e,coerce:!0}),date:e=>ct.create({...e,coerce:!0})},O1=P;var B=Object.freeze({__proto__:null,defaultErrorMap:At,setErrorMap:k0,getErrorMap:Wn,makeIssue:qn,EMPTY_PATH:N0,addIssueToContext:C,ParseStatus:ie,INVALID:P,DIRTY:vt,OK:oe,isAborted:da,isDirty:fa,isValid:ot,isAsync:Gt,get util(){return F},get objectUtil(){return ua},ZodParsedType:k,getParsedType:Pe,ZodType:$,datetimeRegex:rc,ZodString:_e,ZodNumber:qe,ZodBigInt:Ke,ZodBoolean:zt,ZodDate:ct,ZodSymbol:Xn,ZodUndefined:Wt,ZodNull:qt,ZodAny:jt,ZodUnknown:rt,ZodNever:Be,ZodVoid:Jn,ZodArray:ye,ZodObject:W,ZodUnion:Kt,ZodDiscriminatedUnion:_r,ZodIntersection:Xt,ZodTuple:Ae,ZodRecord:Jt,ZodMap:Qn,ZodSet:lt,ZodFunction:St,ZodLazy:Qt,ZodLiteral:en,ZodEnum:Xe,ZodNativeEnum:tn,ZodPromise:Dt,ZodEffects:Ee,ZodTransformer:Ee,ZodOptional:Re,ZodNullable:Je,ZodDefault:nn,ZodCatch:rn,ZodNaN:er,BRAND:X0,ZodBranded:za,ZodPipeline:hn,ZodReadonly:an,custom:sc,Schema:$,ZodSchema:$,late:J0,get ZodFirstPartyTypeKind(){return M},coerce:I1,any:i1,array:u1,bigint:t1,boolean:cc,date:n1,discriminatedUnion:p1,effect:Qs,enum:S1,function:E1,instanceof:Q0,intersection:m1,lazy:x1,literal:b1,map:v1,nan:e1,nativeEnum:w1,never:c1,null:s1,nullable:R1,number:oc,object:d1,oboolean:D1,onumber:j1,optional:C1,ostring:A1,pipeline:N1,preprocess:k1,promise:T1,record:g1,set:y1,strictObject:f1,string:ic,symbol:r1,transformer:Qs,tuple:_1,undefined:a1,union:h1,unknown:o1,void:l1,NEVER:O1,ZodIssueCode:S,quotelessJson:R0,ZodError:ue});class tr extends Error{constructor(t,n,r,a=400,s){super(n,{cause:s}),this.did=t,this.code=r,this.status=a}get statusCode(){return this.status}toString(){return`${this.constructor.name} ${this.code} (${this.did}): ${this.message}`}static from(t,n){if(t instanceof tr)return t;const r=t instanceof Error?t.message:typeof t=="string"?t:"An unknown error occurred",a=(typeof(t==null?void 0:t.statusCode)=="number"?t.statusCode:void 0)??(typeof(t==null?void 0:t.status)=="number"?t.status:void 0);return new tr(n,r,"did-unknown-error",a,t)}}class pe extends tr{constructor(t,n,r){super(t,n,"did-invalid",400,r)}}function pa(e,t=0,n=e.length){let r;for(let a=t;a<n;a++)if(r=e.charCodeAt(a),!(r>=65&&r<=90||r>=97&&r<=122||r>=48&&r<=57||r===45||r===46||r===95||r===126)){if(!(r===33||r===36||r===38||r===39||r===40||r===41||r===42||r===43||r===44||r===59||r===61)){if(!(r===58||r===64)){if(!(r===47||r===63))if(r===37){if(a+2>=n||!ei(e.charCodeAt(a+1))||!ei(e.charCodeAt(a+2)))return!1;a+=2}else return!1}}}return!0}function ei(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}var ri;const M1=((ri=URL.canParse)==null?void 0:ri.bind(URL))??((e,t)=>{try{return new URL(e,t),!0}catch{return!1}}),lc="did:plc:",P1=lc.length,ti=32;function L1(e){if(typeof e!="string"||e.length!==ti||!e.startsWith(lc))return!1;for(let t=P1;t<ti;t++)if(!Z1(e.charCodeAt(t)))return!1;return!0}const Z1=e=>e>=97&&e<=122||e>=50&&e<=55,ma="did:",ni=ma.length;function $1(e,t=0,n=e.length){if(!Number.isFinite(n)||!Number.isFinite(t)||n<t||n>e.length)throw new TypeError("Invalid start or end position");if(n===t)throw new pe(e,"Empty method name");let r;for(let a=t;a<n;a++)if(r=e.charCodeAt(a),(r<97||r>122)&&(r<48||r>57))throw new pe(e,`Invalid character at position ${a} in DID method name`)}function uc(e,t=0,n=e.length){if(!Number.isFinite(n)||!Number.isFinite(t)||n<t||n>e.length)throw new TypeError("Invalid start or end position");if(n===t)throw new pe(e,"DID method-specific id must not be empty");let r;for(let a=t;a<n;a++)if(r=e.charCodeAt(a),(r<97||r>122)&&(r<65||r>90)&&(r<48||r>57)&&r!==46&&r!==45&&r!==95){if(r===58){if(a===n-1)throw new pe(e,'DID cannot end with ":"');continue}if(r===37){if(r=e.charCodeAt(++a),(r<48||r>57)&&(r<65||r>70))throw new pe(e,`Invalid pct-encoded character at position ${a}`);if(r=e.charCodeAt(++a),(r<48||r>57)&&(r<65||r>70))throw new pe(e,`Invalid pct-encoded character at position ${a}`);if(a>=n)throw new pe(e,`Incomplete pct-encoded character at position ${a-2}`);continue}throw new pe(e,`Disallowed character in DID at position ${a}`)}}function U1(e){if(typeof e!="string")throw new pe(typeof e,"DID must be a string");const{length:t}=e;if(t>2048)throw new pe(e,"DID is too long (2048 chars max)");if(!e.startsWith(ma))throw new pe(e,`DID requires "${ma}" prefix`);const n=e.indexOf(":",ni);if(n===-1)throw new pe(e,"Missing colon after method name");$1(e,ni,n),uc(e,n+1,t)}const _a=B.string().superRefine((e,t)=>{try{return U1(e),!0}catch(n){return t.addIssue({code:B.ZodIssueCode.custom,message:n instanceof Error?n.message:"Unexpected error"}),!1}}),at="did:web:";function B1(e){if(typeof e!="string"||!e.startsWith(at)||e.charAt(at.length)===":")return!1;try{uc(e,at.length)}catch{return!1}return M1(F1(e))}function F1(e){const t=at.length,n=e.indexOf(":",t),a=(n===-1?e.slice(t):e.slice(t,n)).replaceAll("%3A",":"),s=n===-1?"":e.slice(n).replaceAll(":","/");return`${a.startsWith("localhost")&&(a.length===9||a.charCodeAt(9)===58)?"http":"https"}://${a}${s}`}const pm=B.string().refine(dc,'Atproto only allows "plc" and "web" DID methods');function dc(e){return L1(e)||V1(e)}function V1(e){return!(!B1(e)||H1(e)||G1(e))}function H1(e){return e.includes(":",at.length)}function Y1(e){return e==="did:web:localhost"||e.startsWith("did:web:localhost:")||e.startsWith("did:web:localhost%3A")}function G1(e){if(Y1(e))return!1;const t=e.indexOf(":",at.length);return t===-1?e.includes("%3A",at.length):e.lastIndexOf("%3A",t)!==-1}const mm=e=>{if(typeof e!="string")return!1;const t=e.indexOf("#");return t===-1||e.indexOf("#",t+1)!==-1?!1:pa(e,t+1)&&dc(e.slice(0,t))},yt=B.string().url("RFC3968 compliant URI"),fc=B.union([_a,B.array(_a)]),Wa=B.union([yt.refine(e=>{const t=e.indexOf("#");return t===-1?!1:pa(e,t+1)},{message:"Missing or invalid fragment in RFC3968 URI"}),B.string().refine(e=>e.charCodeAt(0)===35,{message:"Fragment must start with #"}).refine(e=>pa(e,1),{message:"Invalid char in URI fragment"})]),hc=B.object({id:Wa,type:B.string().min(1),controller:fc,publicKeyJwk:B.record(B.string(),B.unknown()).optional(),publicKeyMultibase:B.string().optional()}),z1=Wa,W1=B.union([B.string(),B.array(B.string())]),q1=B.union([yt,B.record(B.string(),yt),B.array(B.union([yt,B.record(B.string(),yt)])).nonempty()]),K1=B.object({id:z1,type:W1,serviceEndpoint:q1}),X1=B.union([Wa,hc]),J1=B.object({"@context":B.union([B.literal("https://www.w3.org/ns/did/v1"),B.array(B.string().url()).nonempty().refine(e=>e[0]==="https://www.w3.org/ns/did/v1",{message:"First @context must be https://www.w3.org/ns/did/v1"})]).optional(),id:_a,controller:fc.optional(),alsoKnownAs:B.array(yt).optional(),service:B.array(K1).optional(),authentication:B.array(X1).optional(),verificationMethod:B.array(hc).optional()});J1.superRefine(({id:e,service:t},n)=>{if(t){const r=new Set;for(let a=0;a<t.length;a++){const s=t[a],i=s.id.startsWith("#")?`${e}${s.id}`:s.id;r.has(i)?n.addIssue({code:B.ZodIssueCode.custom,message:`Duplicate service id (${s.id}) found in the document`,path:["service",a,"id"]}):r.add(i)}}});export{id as A,fm as B,nd as C,yi as D,nm as E,Gl as F,mm as G,rm as H,im as I,Qi as J,pi as K,ci as L,Le as M,sm as N,be as P,Uu as R,om as S,S as Z,Ge as a,$e as b,_i as c,fl as d,um as e,le as f,Si as g,bi as h,dm as i,Zr as j,lm as k,ld as l,sd as m,C0 as n,Pi as o,ya as p,hm as q,va as r,cm as s,pm as t,wt as u,Vl as v,ed as w,Vc as x,di as y,B as z};
|
|
60
|
+
//# sourceMappingURL=did-document-YkmTdTdF.js.map
|