@decocms/mesh 1.0.0-alpha.43 → 1.0.0-alpha.45
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/client/assets/{AlertCircle-D8keEzKG.js → AlertCircle-DVbk7l75.js} +1 -1
- package/dist/client/assets/{ArrowLeft-ALWG7VDf.js → ArrowLeft-B2q5Ncqe.js} +1 -1
- package/dist/client/assets/{CheckCircle-D36cNDna.js → CheckCircle-2faIvy7x.js} +1 -1
- package/dist/client/assets/{ChevronDown-Cm9t42v8.js → ChevronDown-BAEvQsP1.js} +1 -1
- package/dist/client/assets/{Clock-CmEgvKtS.js → Clock-BkOYcDQ1.js} +1 -1
- package/dist/client/assets/{Copy01-ByJnMw1O.js → Copy01-CwQ47sCB.js} +1 -1
- package/dist/client/assets/{CpuChip02-CON88pJ9.js → CpuChip02-Bxoen-sS.js} +1 -1
- package/dist/client/assets/{DotsVertical-Bl5bEEk5.js → DotsVertical-Rjkn1qAc.js} +1 -1
- package/dist/client/assets/{File06-aktnYzlw.js → File06-Cml7_jh5.js} +1 -1
- package/dist/client/assets/{Grid01-CMcq9qMK.js → Grid01-iXkiGD-C.js} +1 -1
- package/dist/client/assets/{Inbox01-CDP4Xvq8.js → Inbox01-48LwpeyS.js} +1 -1
- package/dist/client/assets/{InfoCircle-Dj48FaPG.js → InfoCircle-Db_224Lw.js} +1 -1
- package/dist/client/assets/{Key01-DUuXuIEi.js → Key01-BBl7lwdX.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DD1V7jlt.js → LinkExternal01-CGdbeXVa.js} +1 -1
- package/dist/client/assets/{Loading01-CHuzyTrw.js → Loading01-EBx-peK5.js} +1 -1
- package/dist/client/assets/{Plus-DsLFvXGg.js → Plus-fvCbDfFA.js} +1 -1
- package/dist/client/assets/{SearchMd-AkbTxzGe.js → SearchMd-CoQHJpld.js} +1 -1
- package/dist/client/assets/{Trash01-Dy-SjaGQ.js → Trash01-B-JvszLz.js} +1 -1
- package/dist/client/assets/{Upload01-D6dc6enb.js → Upload01-CFmdCG3U.js} +1 -1
- package/dist/client/assets/{X-C4DsqTZD.js → X-EXSAob0c.js} +1 -1
- package/dist/client/assets/{XClose-RibbcNd2.js → XClose-JKlhATZH.js} +1 -1
- package/dist/client/assets/{alert-dialog-Di6ShLn9.js → alert-dialog-BuGENs_x.js} +2 -2
- package/dist/client/assets/{auth-D5CL68LS.js → auth-EiU0mg3W.js} +1 -1
- package/dist/client/assets/{auth-catchall-D9jFZcp2.js → auth-catchall-J-s0UOos.js} +1 -1
- package/dist/client/assets/{avatar-DCq0OD4f.js → avatar-ChLJBc_Q.js} +1 -1
- package/dist/client/assets/{badge-Cxx1Sxkf.js → badge-xSWfUH8C.js} +1 -1
- package/dist/client/assets/{button-DyxbcOso.js → button-DkKLNB2C.js} +1 -1
- package/dist/client/assets/{card-E0A-GI_K.js → card-pUBjGsjy.js} +1 -1
- package/dist/client/assets/{checkbox-D_hM8b8h.js → checkbox-CkDtf7-s.js} +1 -1
- package/dist/client/assets/{collection-detail-BUkQA_DU.js → collection-detail-C5kf9NWv.js} +1 -1
- package/dist/client/assets/{collection-display-button-BweLYsfq.js → collection-display-button-DOaNnrf1.js} +1 -1
- package/dist/client/assets/{collection-header-Bameh_eh.js → collection-header-BjOsszVr.js} +1 -1
- package/dist/client/assets/{collection-page-BHSRRg3H.js → collection-page-BoULTFo5.js} +1 -1
- package/dist/client/assets/{collection-search-gavQJPP4.js → collection-search-BaQnC0wl.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BpS-68hf.js → collection-table-wrapper-CWSD0OK_.js} +1 -1
- package/dist/client/assets/{connection-card-BVk7kFmW.js → connection-card-ChEGdD3i.js} +1 -1
- package/dist/client/assets/{connection-detail-DddBMHPf.js → connection-detail-BzeSW6yw.js} +1 -1
- package/dist/client/assets/{connections-B1rZil2n.js → connections-BcVb3yyx.js} +1 -1
- package/dist/client/assets/{core-ByNFtKK6.js → core-DEFgD5b5.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-2urgxKJd.js → create-organization-dialog-CJAzmA5E.js} +1 -1
- package/dist/client/assets/{deco-chat-skeleton-DPM9016H.js → deco-chat-skeleton-DdumS19s.js} +3 -3
- package/dist/client/assets/{dialog-fscHVB6N.js → dialog-D5ajYIuQ.js} +1 -1
- package/dist/client/assets/{dropdown-menu-PdTp4dEf.js → dropdown-menu-BwfRJqX3.js} +1 -1
- package/dist/client/assets/{error-boundary-B2cVFy_k.js → error-boundary-Ctu3eNTK.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DYfXaCx-.js → extract-connection-data-fIUwUi9M.js} +1 -1
- package/dist/client/assets/{form-DzRrgnqZ.js → form-DGgpciyh.js} +1 -1
- package/dist/client/assets/{formatDistanceToNow-BUS4qZ3y.js → formatDistanceToNow-Do6wCvgQ.js} +1 -1
- package/dist/client/assets/{gateway-detail-CNtXr5hn.js → gateway-detail-dibsJ_Dr.js} +1 -1
- package/dist/client/assets/{gateways-B0oJ21bg.js → gateways-Ct2Ku_EE.js} +1 -1
- package/dist/client/assets/{home-CbM5g6hK.js → home-Go7erQGg.js} +1 -1
- package/dist/client/assets/index-Cg6DdXuN.js +1 -0
- package/dist/client/assets/{index-Dw2USDt7.js → index-CgAMfaaZ.js} +1 -1
- package/dist/client/assets/{index-BfBFtyJG.js → index-CgmRhymO.js} +1 -1
- package/dist/client/assets/{index-BoajXOR2.js → index-CzwYLjKx.js} +2 -2
- package/dist/client/assets/{input-ZwYzWYsd.js → input-BGhWl8yr.js} +1 -1
- package/dist/client/assets/{json-syntax-highlighter-CBCsDrbN.js → json-syntax-highlighter-eop-YGrL.js} +2 -2
- package/dist/client/assets/json-xSSJeQ8M.js +1 -0
- package/dist/client/assets/{layout-qWjUAxmx.js → layout-H0Bo8Mbp.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-CeR79qlP.js → lazy-highlighter-BivZS2NT.js} +1 -1
- package/dist/client/assets/{localstorage-keys-Cc5ak95E.js → localstorage-keys-T4QN4Ys2.js} +1 -1
- package/dist/client/assets/{login-Dzk1B1b-.js → login-s7Y9QERd.js} +1 -1
- package/dist/client/assets/{mcp-oauth-AZGWVH9g.js → mcp-oauth-BpODx-Yp.js} +1 -1
- package/dist/client/assets/{members-CCwAaAHQ.js → members-YsCX_fsX.js} +1 -1
- package/dist/client/assets/{monitoring-D3prTzA_.js → monitoring-DLmYpM2E.js} +1 -1
- package/dist/client/assets/{oauth-callback-C7HHguix.js → oauth-callback-J1YUg9b4.js} +1 -1
- package/dist/client/assets/{page-R6pHknz0.js → page-BnR6MH5w.js} +1 -1
- package/dist/client/assets/{popover-C2ZTLfkD.js → popover-C7aR-HSJ.js} +1 -1
- package/dist/client/assets/prism-light-qQIH26P8.js +1 -0
- package/dist/client/assets/{resource-tabs-C4ib9Qer.js → resource-tabs-DetRi2Tz.js} +1 -1
- package/dist/client/assets/{schema-DBCaYNfa.js → schema-DefbPj25.js} +1 -1
- package/dist/client/assets/{select-Drv0jNpx.js → select-C-8wPfQb.js} +1 -1
- package/dist/client/assets/{settings-48kN1cjt.js → settings-lBAYGURO.js} +1 -1
- package/dist/client/assets/{shell-layout-Cltos3LX.js → shell-layout-BURBkVcQ.js} +1 -1
- package/dist/client/assets/{spinner-pWVeZvIu.js → spinner-C91qSR1a.js} +1 -1
- package/dist/client/assets/{store-CUS-2is6.js → store-Dbm237Pg.js} +1 -1
- package/dist/client/assets/{store-app-detail-BJWFOzEW.js → store-app-detail-YHVcg9Z1.js} +1 -1
- package/dist/client/assets/{switch-BhPZG_BR.js → switch-BYhk4sLo.js} +1 -1
- package/dist/client/assets/{textarea-CBwsqq0a.js → textarea-BPpOx-7u.js} +1 -1
- package/dist/client/assets/{tools-list-BMljmspA.js → tools-list-De28L5_g.js} +1 -1
- package/dist/client/assets/{tooltip-CTZbNNnK.js → tooltip-CRtbHuaD.js} +1 -1
- package/dist/client/assets/{types-B0kyZijl.js → types-B0H390FJ.js} +1 -1
- package/dist/client/assets/{use-binding-DsbURj3b.js → use-binding-BZo_dE4c.js} +2 -2
- package/dist/client/assets/{use-connection-BaSQ_kK7.js → use-connection-D2GoBb_z.js} +1 -1
- package/dist/client/assets/{use-gateway-BFmqlcff.js → use-gateway-CJINNdSX.js} +1 -1
- package/dist/client/assets/{use-list-state-DOX95Ml_.js → use-list-state-BjDzxCt9.js} +1 -1
- package/dist/client/assets/{use-mcp-BI87vr5V.js → use-mcp-BBboucHu.js} +1 -1
- package/dist/client/assets/{use-members-D8yePFg4.js → use-members-DsKRDzl_.js} +1 -1
- package/dist/client/assets/{use-mobile-BKS-qB3Y.js → use-mobile-B89ZoGbj.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CfuafopH.js → use-organization-settings-C32KUUMU.js} +1 -1
- package/dist/client/assets/{use-tool-call-CoSkJnqm.js → use-tool-call-B6UiQKbH.js} +1 -1
- package/dist/client/assets/useQuery-CbqX0Fzv.js +1 -0
- package/dist/client/assets/utils-D1FAHWbf.js +1 -0
- package/dist/client/assets/{well-known-mcp-D7YKD5ci.js → well-known-mcp-DBI1FVpY.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/migrate.js +1 -1
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/index-CLk7USHu.js +0 -1
- package/dist/client/assets/json-shDxh9VI.js +0 -1
- package/dist/client/assets/prism-light-C5gubXs2.js +0 -1
- package/dist/client/assets/useQuery-SxQZJ5cp.js +0 -1
- package/dist/client/assets/utils-Dvu_Dkg0.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-s7Y9QERd.js","assets/button-DkKLNB2C.js","assets/utils-D1FAHWbf.js","assets/input-BGhWl8yr.js","assets/shell-layout-BURBkVcQ.js","assets/SearchMd-CoQHJpld.js","assets/use-connection-D2GoBb_z.js","assets/tooltip-CRtbHuaD.js","assets/localstorage-keys-T4QN4Ys2.js","assets/useQuery-CbqX0Fzv.js","assets/CpuChip02-Bxoen-sS.js","assets/Loading01-EBx-peK5.js","assets/Plus-fvCbDfFA.js","assets/X-EXSAob0c.js","assets/deco-chat-skeleton-DdumS19s.js","assets/Grid01-iXkiGD-C.js","assets/textarea-BPpOx-7u.js","assets/select-C-8wPfQb.js","assets/ChevronDown-BAEvQsP1.js","assets/use-mobile-B89ZoGbj.js","assets/use-gateway-CJINNdSX.js","assets/Copy01-CwQ47sCB.js","assets/AlertCircle-DVbk7l75.js","assets/connection-card-ChEGdD3i.js","assets/card-pUBjGsjy.js","assets/LinkExternal01-CGdbeXVa.js","assets/spinner-C91qSR1a.js","assets/File06-Cml7_jh5.js","assets/InfoCircle-Db_224Lw.js","assets/use-binding-BZo_dE4c.js","assets/auth-EiU0mg3W.js","assets/popover-C7aR-HSJ.js","assets/Clock-BkOYcDQ1.js","assets/Trash01-B-JvszLz.js","assets/error-boundary-Ctu3eNTK.js","assets/use-organization-settings-C32KUUMU.js","assets/create-organization-dialog-CJAzmA5E.js","assets/alert-dialog-BuGENs_x.js","assets/form-DGgpciyh.js","assets/avatar-ChLJBc_Q.js","assets/dropdown-menu-BwfRJqX3.js","assets/dialog-D5ajYIuQ.js","assets/home-Go7erQGg.js","assets/page-BnR6MH5w.js","assets/collection-header-BjOsszVr.js","assets/collection-display-button-DOaNnrf1.js","assets/collection-page-BoULTFo5.js","assets/use-tool-call-B6UiQKbH.js","assets/types-B0H390FJ.js","assets/index-CgmRhymO.js","assets/json-syntax-highlighter-eop-YGrL.js","assets/badge-xSWfUH8C.js","assets/page-BZV40eAE.css","assets/members-YsCX_fsX.js","assets/collection-search-BaQnC0wl.js","assets/collection-table-wrapper-CWSD0OK_.js","assets/switch-BYhk4sLo.js","assets/checkbox-CkDtf7-s.js","assets/ArrowLeft-B2q5Ncqe.js","assets/use-members-DsKRDzl_.js","assets/well-known-mcp-DBI1FVpY.js","assets/DotsVertical-Rjkn1qAc.js","assets/Key01-BBl7lwdX.js","assets/XClose-JKlhATZH.js","assets/connections-BcVb3yyx.js","assets/schema-DefbPj25.js","assets/use-list-state-BjDzxCt9.js","assets/generate-id-Dyweu44Y.js","assets/settings-lBAYGURO.js","assets/Upload01-CFmdCG3U.js","assets/monitoring-DLmYpM2E.js","assets/index-Cg6DdXuN.js","assets/store-Dbm237Pg.js","assets/slugify-CEUa2lfQ.js","assets/Inbox01-48LwpeyS.js","assets/registry-utils-ulDDT0d8.js","assets/app-name-gTETL9So.js","assets/store-app-detail-YHVcg9Z1.js","assets/CheckCircle-2faIvy7x.js","assets/tools-list-De28L5_g.js","assets/layout-H0Bo8Mbp.js","assets/tools-list-CSRUKxnt.css","assets/resource-tabs-DetRi2Tz.js","assets/use-mcp-BBboucHu.js","assets/extract-connection-data-fIUwUi9M.js","assets/connection-detail-BzeSW6yw.js","assets/index-CgAMfaaZ.js","assets/mcp-oauth-BpODx-Yp.js","assets/formatDistanceToNow-Do6wCvgQ.js","assets/collection-detail-C5kf9NWv.js","assets/gateways-Ct2Ku_EE.js","assets/gateway-detail-dibsJ_Dr.js","assets/oauth-callback-J1YUg9b4.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function hC(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const o in a)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(a,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>a[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();const pC="modulepreload",mC=function(e){return"/"+e},g_={},Ln=function(t,n,a){let o=Promise.resolve();if(n&&n.length>0){let u=function(h){return Promise.all(h.map(g=>Promise.resolve(g).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=d?.nonce||d?.getAttribute("nonce");o=u(n.map(h=>{if(h=mC(h),h in g_)return;g_[h]=!0;const g=h.endsWith(".css"),p=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const y=document.createElement("link");if(y.rel=g?"stylesheet":pC,g||(y.as="script"),y.crossOrigin="",y.href=h,f&&y.setAttribute("nonce",f),document.head.appendChild(y),g)return new Promise((_,S)=>{y.addEventListener("load",_),y.addEventListener("error",()=>S(Error(`Unable to preload CSS for ${h}`)))})}))}function l(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})};var NB=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Do(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rm={exports:{}},Vl={};var v_;function gC(){if(v_)return Vl;v_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:l}}return Vl.Fragment=t,Vl.jsx=n,Vl.jsxs=n,Vl}var y_;function vC(){return y_||(y_=1,rm.exports=gC()),rm.exports}var b=vC(),am={exports:{}},Fl={},im={exports:{}},om={};var b_;function yC(){return b_||(b_=1,(function(e){function t(P,V){var $=P.length;P.push(V);e:for(;0<$;){var re=$-1>>>1,ve=P[re];if(0<o(ve,V))P[re]=V,P[$]=ve,$=re;else break e}}function n(P){return P.length===0?null:P[0]}function a(P){if(P.length===0)return null;var V=P[0],$=P.pop();if($!==V){P[0]=$;e:for(var re=0,ve=P.length,k=ve>>>1;re<k;){var Q=2*(re+1)-1,ee=P[Q],oe=Q+1,pe=P[oe];if(0>o(ee,$))oe<ve&&0>o(pe,ee)?(P[re]=pe,P[oe]=$,re=oe):(P[re]=ee,P[Q]=$,re=Q);else if(oe<ve&&0>o(pe,$))P[re]=pe,P[oe]=$,re=oe;else break e}}return V}function o(P,V){var $=P.sortIndex-V.sortIndex;return $!==0?$:P.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],h=[],g=1,p=null,y=3,_=!1,S=!1,w=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function O(P){for(var V=n(h);V!==null;){if(V.callback===null)a(h);else if(V.startTime<=P)a(h),V.sortIndex=V.expirationTime,t(f,V);else break;V=n(h)}}function M(P){if(w=!1,O(P),!S)if(n(f)!==null)S=!0,L||(L=!0,W());else{var V=n(h);V!==null&&ie(M,V.startTime-P)}}var L=!1,N=-1,D=5,U=-1;function Z(){return T?!0:!(e.unstable_now()-U<D)}function G(){if(T=!1,L){var P=e.unstable_now();U=P;var V=!0;try{e:{S=!1,w&&(w=!1,A(N),N=-1),_=!0;var $=y;try{t:{for(O(P),p=n(f);p!==null&&!(p.expirationTime>P&&Z());){var re=p.callback;if(typeof re=="function"){p.callback=null,y=p.priorityLevel;var ve=re(p.expirationTime<=P);if(P=e.unstable_now(),typeof ve=="function"){p.callback=ve,O(P),V=!0;break t}p===n(f)&&a(f),O(P)}else a(f);p=n(f)}if(p!==null)V=!0;else{var k=n(h);k!==null&&ie(M,k.startTime-P),V=!1}}break e}finally{p=null,y=$,_=!1}V=void 0}}finally{V?W():L=!1}}}var W;if(typeof C=="function")W=function(){C(G)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,ne=j.port2;j.port1.onmessage=G,W=function(){ne.postMessage(null)}}else W=function(){R(G,0)};function ie(P,V){N=R(function(){P(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(P){switch(y){case 1:case 2:case 3:var V=3;break;default:V=y}var $=y;y=V;try{return P()}finally{y=$}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(P,V){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var $=y;y=P;try{return V()}finally{y=$}},e.unstable_scheduleCallback=function(P,V,$){var re=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?re+$:re):$=re,P){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=$+ve,P={id:g++,callback:V,priorityLevel:P,startTime:$,expirationTime:ve,sortIndex:-1},$>re?(P.sortIndex=$,t(h,P),n(f)===null&&P===n(h)&&(w?(A(N),N=-1):w=!0,ie(M,$-re))):(P.sortIndex=ve,t(f,P),S||_||(S=!0,L||(L=!0,W()))),P},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(P){var V=y;return function(){var $=y;y=V;try{return P.apply(this,arguments)}finally{y=$}}}})(om)),om}var __;function bC(){return __||(__=1,im.exports=yC()),im.exports}var sm={exports:{}},Ge={};var E_;function _C(){if(E_)return Ge;E_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function _(k){return k===null||typeof k!="object"?null:(k=y&&k[y]||k["@@iterator"],typeof k=="function"?k:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,T={};function R(k,Q,ee){this.props=k,this.context=Q,this.refs=T,this.updater=ee||S}R.prototype.isReactComponent={},R.prototype.setState=function(k,Q){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,Q,"setState")},R.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function A(){}A.prototype=R.prototype;function C(k,Q,ee){this.props=k,this.context=Q,this.refs=T,this.updater=ee||S}var O=C.prototype=new A;O.constructor=C,w(O,R.prototype),O.isPureReactComponent=!0;var M=Array.isArray;function L(){}var N={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function U(k,Q,ee){var oe=ee.ref;return{$$typeof:e,type:k,key:Q,ref:oe!==void 0?oe:null,props:ee}}function Z(k,Q){return U(k.type,Q,k.props)}function G(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function W(k){var Q={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ee){return Q[ee]})}var j=/\/+/g;function ne(k,Q){return typeof k=="object"&&k!==null&&k.key!=null?W(""+k.key):Q.toString(36)}function ie(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(L,L):(k.status="pending",k.then(function(Q){k.status==="pending"&&(k.status="fulfilled",k.value=Q)},function(Q){k.status==="pending"&&(k.status="rejected",k.reason=Q)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function P(k,Q,ee,oe,pe){var be=typeof k;(be==="undefined"||be==="boolean")&&(k=null);var ye=!1;if(k===null)ye=!0;else switch(be){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(k.$$typeof){case e:case t:ye=!0;break;case g:return ye=k._init,P(ye(k._payload),Q,ee,oe,pe)}}if(ye)return pe=pe(k),ye=oe===""?"."+ne(k,0):oe,M(pe)?(ee="",ye!=null&&(ee=ye.replace(j,"$&/")+"/"),P(pe,Q,ee,"",function(ke){return ke})):pe!=null&&(G(pe)&&(pe=Z(pe,ee+(pe.key==null||k&&k.key===pe.key?"":(""+pe.key).replace(j,"$&/")+"/")+ye)),Q.push(pe)),1;ye=0;var Se=oe===""?".":oe+":";if(M(k))for(var Pe=0;Pe<k.length;Pe++)oe=k[Pe],be=Se+ne(oe,Pe),ye+=P(oe,Q,ee,be,pe);else if(Pe=_(k),typeof Pe=="function")for(k=Pe.call(k),Pe=0;!(oe=k.next()).done;)oe=oe.value,be=Se+ne(oe,Pe++),ye+=P(oe,Q,ee,be,pe);else if(be==="object"){if(typeof k.then=="function")return P(ie(k),Q,ee,oe,pe);throw Q=String(k),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ye}function V(k,Q,ee){if(k==null)return k;var oe=[],pe=0;return P(k,oe,"","",function(be){return Q.call(ee,be,pe++)}),oe}function $(k){if(k._status===-1){var Q=k._result;Q=Q(),Q.then(function(ee){(k._status===0||k._status===-1)&&(k._status=1,k._result=ee)},function(ee){(k._status===0||k._status===-1)&&(k._status=2,k._result=ee)}),k._status===-1&&(k._status=0,k._result=Q)}if(k._status===1)return k._result.default;throw k._result}var re=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},ve={map:V,forEach:function(k,Q,ee){V(k,function(){Q.apply(this,arguments)},ee)},count:function(k){var Q=0;return V(k,function(){Q++}),Q},toArray:function(k){return V(k,function(Q){return Q})||[]},only:function(k){if(!G(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return Ge.Activity=p,Ge.Children=ve,Ge.Component=R,Ge.Fragment=n,Ge.Profiler=o,Ge.PureComponent=C,Ge.StrictMode=a,Ge.Suspense=f,Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Ge.__COMPILER_RUNTIME={__proto__:null,c:function(k){return N.H.useMemoCache(k)}},Ge.cache=function(k){return function(){return k.apply(null,arguments)}},Ge.cacheSignal=function(){return null},Ge.cloneElement=function(k,Q,ee){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var oe=w({},k.props),pe=k.key;if(Q!=null)for(be in Q.key!==void 0&&(pe=""+Q.key),Q)!D.call(Q,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&Q.ref===void 0||(oe[be]=Q[be]);var be=arguments.length-2;if(be===1)oe.children=ee;else if(1<be){for(var ye=Array(be),Se=0;Se<be;Se++)ye[Se]=arguments[Se+2];oe.children=ye}return U(k.type,pe,oe)},Ge.createContext=function(k){return k={$$typeof:u,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:l,_context:k},k},Ge.createElement=function(k,Q,ee){var oe,pe={},be=null;if(Q!=null)for(oe in Q.key!==void 0&&(be=""+Q.key),Q)D.call(Q,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(pe[oe]=Q[oe]);var ye=arguments.length-2;if(ye===1)pe.children=ee;else if(1<ye){for(var Se=Array(ye),Pe=0;Pe<ye;Pe++)Se[Pe]=arguments[Pe+2];pe.children=Se}if(k&&k.defaultProps)for(oe in ye=k.defaultProps,ye)pe[oe]===void 0&&(pe[oe]=ye[oe]);return U(k,be,pe)},Ge.createRef=function(){return{current:null}},Ge.forwardRef=function(k){return{$$typeof:d,render:k}},Ge.isValidElement=G,Ge.lazy=function(k){return{$$typeof:g,_payload:{_status:-1,_result:k},_init:$}},Ge.memo=function(k,Q){return{$$typeof:h,type:k,compare:Q===void 0?null:Q}},Ge.startTransition=function(k){var Q=N.T,ee={};N.T=ee;try{var oe=k(),pe=N.S;pe!==null&&pe(ee,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(L,re)}catch(be){re(be)}finally{Q!==null&&ee.types!==null&&(Q.types=ee.types),N.T=Q}},Ge.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Ge.use=function(k){return N.H.use(k)},Ge.useActionState=function(k,Q,ee){return N.H.useActionState(k,Q,ee)},Ge.useCallback=function(k,Q){return N.H.useCallback(k,Q)},Ge.useContext=function(k){return N.H.useContext(k)},Ge.useDebugValue=function(){},Ge.useDeferredValue=function(k,Q){return N.H.useDeferredValue(k,Q)},Ge.useEffect=function(k,Q){return N.H.useEffect(k,Q)},Ge.useEffectEvent=function(k){return N.H.useEffectEvent(k)},Ge.useId=function(){return N.H.useId()},Ge.useImperativeHandle=function(k,Q,ee){return N.H.useImperativeHandle(k,Q,ee)},Ge.useInsertionEffect=function(k,Q){return N.H.useInsertionEffect(k,Q)},Ge.useLayoutEffect=function(k,Q){return N.H.useLayoutEffect(k,Q)},Ge.useMemo=function(k,Q){return N.H.useMemo(k,Q)},Ge.useOptimistic=function(k,Q){return N.H.useOptimistic(k,Q)},Ge.useReducer=function(k,Q,ee){return N.H.useReducer(k,Q,ee)},Ge.useRef=function(k){return N.H.useRef(k)},Ge.useState=function(k){return N.H.useState(k)},Ge.useSyncExternalStore=function(k,Q,ee){return N.H.useSyncExternalStore(k,Q,ee)},Ge.useTransition=function(){return N.H.useTransition()},Ge.version="19.2.3",Ge}var S_;function $i(){return S_||(S_=1,sm.exports=_C()),sm.exports}var lm={exports:{}},Nn={};var w_;function EC(){if(w_)return Nn;w_=1;var e=$i();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(f,h,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:f,containerInfo:h,implementation:g}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Nn.createPortal=function(f,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,g)},Nn.flushSync=function(f){var h=u.T,g=a.p;try{if(u.T=null,a.p=2,f)return f()}finally{u.T=h,a.p=g,a.d.f()}},Nn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(f,h))},Nn.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},Nn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var g=h.as,p=d(g,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,_=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?a.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:_}):g==="script"&&a.d.X(f,{crossOrigin:p,integrity:y,fetchPriority:_,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Nn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=d(h.as,h.crossOrigin);a.d.M(f,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(f)},Nn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,p=d(g,h.crossOrigin);a.d.L(f,g,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Nn.preloadModule=function(f,h){if(typeof f=="string")if(h){var g=d(h.as,h.crossOrigin);a.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(f)},Nn.requestFormReset=function(f){a.d.r(f)},Nn.unstable_batchedUpdates=function(f,h){return f(h)},Nn.useFormState=function(f,h,g){return u.H.useFormState(f,h,g)},Nn.useFormStatus=function(){return u.H.useHostTransitionStatus()},Nn.version="19.2.3",Nn}var x_;function fw(){if(x_)return lm.exports;x_=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),lm.exports=EC(),lm.exports}var R_;function SC(){if(R_)return Fl;R_=1;var e=bC(),t=$i(),n=fw();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var i=r,s=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(s=i.return),r=i.return;while(r)}return i.tag===3?s:null}function u(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function d(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function f(r){if(l(r)!==r)throw Error(a(188))}function h(r){var i=r.alternate;if(!i){if(i=l(r),i===null)throw Error(a(188));return i!==r?null:r}for(var s=r,c=i;;){var m=s.return;if(m===null)break;var v=m.alternate;if(v===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===v.child){for(v=m.child;v;){if(v===s)return f(m),r;if(v===c)return f(m),i;v=v.sibling}throw Error(a(188))}if(s.return!==c.return)s=m,c=v;else{for(var x=!1,I=m.child;I;){if(I===s){x=!0,s=m,c=v;break}if(I===c){x=!0,c=m,s=v;break}I=I.sibling}if(!x){for(I=v.child;I;){if(I===s){x=!0,s=v,c=m;break}if(I===c){x=!0,c=v,s=m;break}I=I.sibling}if(!x)throw Error(a(189))}}if(s.alternate!==c)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?r:i}function g(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=g(r),i!==null)return i;r=r.sibling}return null}var p=Object.assign,y=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),C=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function W(r){return r===null||typeof r!="object"?null:(r=G&&r[G]||r["@@iterator"],typeof r=="function"?r:null)}var j=Symbol.for("react.client.reference");function ne(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===j?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case R:return"Profiler";case T:return"StrictMode";case M:return"Suspense";case L:return"SuspenseList";case U:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case C:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case O:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case N:return i=r.displayName||null,i!==null?i:ne(r.type)||"Memo";case D:i=r._payload,r=r._init;try{return ne(r(i))}catch{}}return null}var ie=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},re=[],ve=-1;function k(r){return{current:r}}function Q(r){0>ve||(r.current=re[ve],re[ve]=null,ve--)}function ee(r,i){ve++,re[ve]=r.current,r.current=i}var oe=k(null),pe=k(null),be=k(null),ye=k(null);function Se(r,i){switch(ee(be,i),ee(pe,r),ee(oe,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?Bb(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=Bb(i),r=zb(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Q(oe),ee(oe,r)}function Pe(){Q(oe),Q(pe),Q(be)}function ke(r){r.memoizedState!==null&&ee(ye,r);var i=oe.current,s=zb(i,r.type);i!==s&&(ee(pe,r),ee(oe,s))}function Ee(r){pe.current===r&&(Q(oe),Q(pe)),ye.current===r&&(Q(ye),jl._currentValue=$)}var ze,Pt;function ge(r){if(ze===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);ze=i&&i[1]||"",Pt=-1<s.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+ze+r+Pt}var me=!1;function Re(r,i){if(!r||me)return"";me=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ae){var te=ae}Reflect.construct(r,[],ue)}else{try{ue.call()}catch(ae){te=ae}r.call(ue.prototype)}}else{try{throw Error()}catch(ae){te=ae}(ue=r())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ae){if(ae&&te&&typeof ae.stack=="string")return[ae.stack,te.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=c.DetermineComponentFrameRoot(),x=v[0],I=v[1];if(x&&I){var z=x.split(`
|
|
@@ -115,4 +115,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
115
115
|
.dark .grecaptcha-badge {
|
|
116
116
|
border-color: var(--input) !important;
|
|
117
117
|
}
|
|
118
|
-
`}),b.jsx(C9,{ref:e,sitekey:t.siteKey,theme:n,hl:a,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:de(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${a}-${t.provider}`)]}):null}var $U=["/sign-up/email","/sign-in/email","/forget-password"];function Uc({ref:e,localization:t,action:n}){const{captcha:a}=E.useContext(Qe);if(!a||n&&!(a.endpoints||$U).includes(n))return null;const{theme:o}=Nv(),l=a.provider==="google-recaptcha-v2-checkbox"||a.provider==="google-recaptcha-v2-invisible",u=a.provider==="google-recaptcha-v3"||a.provider==="google-recaptcha-v2-invisible",d=a.provider==="cloudflare-turnstile",f=a.provider==="hcaptcha",h=a.provider==="captchafox";return b.jsxs(b.Fragment,{children:[l&&b.jsx(HU,{ref:e}),u&&b.jsx(FU,{localization:t}),d&&b.jsx(IO,{className:"mx-auto",ref:e,siteKey:a.siteKey,options:{theme:o,size:"flexible"}}),f&&b.jsx("div",{className:"mx-auto",children:b.jsx(r9,{ref:e,sitekey:a.siteKey,theme:o})}),h&&b.jsx("div",{className:"mx-auto",children:b.jsx(_O,{ref:e,sitekey:a.siteKey,theme:o})})]})}function w0({className:e,containerClassName:t,...n}){return b.jsx(PO,{"data-slot":"input-otp",containerClassName:de("flex items-center gap-2 has-disabled:opacity-50",t),className:de("disabled:cursor-not-allowed",e),...n})}function Is({className:e,...t}){return b.jsx("div",{"data-slot":"input-otp-group",className:de("flex items-center",e),...t})}function gn({index:e,className:t,...n}){const a=E.useContext(LO),{char:o,hasFakeCaret:l,isActive:u}=a?.slots[e]??{};return b.jsxs("div",{"data-slot":"input-otp-slot","data-active":u,className:de("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[o,l&&b.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:b.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function mg({...e}){return b.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:b.jsx(ON,{})})}function x0({otpSeparators:e=0}){return e===0?b.jsxs(Is,{children:[b.jsx(gn,{index:0}),b.jsx(gn,{index:1}),b.jsx(gn,{index:2}),b.jsx(gn,{index:3}),b.jsx(gn,{index:4}),b.jsx(gn,{index:5})]}):e===1?b.jsxs(b.Fragment,{children:[b.jsxs(Is,{children:[b.jsx(gn,{index:0}),b.jsx(gn,{index:1}),b.jsx(gn,{index:2})]}),b.jsx(mg,{}),b.jsxs(Is,{children:[b.jsx(gn,{index:3}),b.jsx(gn,{index:4}),b.jsx(gn,{index:5})]})]}):b.jsxs(b.Fragment,{children:[b.jsxs(Is,{children:[b.jsx(gn,{index:0}),b.jsx(gn,{index:1})]}),b.jsx(mg,{}),b.jsxs(Is,{children:[b.jsx(gn,{index:2}),b.jsx(gn,{index:3})]}),b.jsx(mg,{}),b.jsxs(Is,{children:[b.jsx(gn,{index:4}),b.jsx(gn,{index:5})]})]})}function lw(e){const[t,n]=E.useState();return t?b.jsx(qU,{...e,email:t}):b.jsx(GU,{...e,setEmail:n})}function GU({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o,setEmail:l}){const u=Xa(),{captchaRef:d,getCaptchaHeaders:f}=jc({localization:a}),{authClient:h,localization:g,toast:p,localizeErrors:y}=E.useContext(Qe);a={...g,...a};const _=En({email:Ke().email({message:`${a.EMAIL} ${a.IS_INVALID}`})}),S=_a({resolver:Ea(_),defaultValues:{email:""}});n=n||S.formState.isSubmitting,E.useEffect(()=>{o?.(S.formState.isSubmitting)},[S.formState.isSubmitting,o]);async function w({email:T}){const R={throw:!0,headers:await f("/email-otp/send-verification-otp")};try{await h.emailOtp.sendVerificationOtp({email:T,type:"sign-in",fetchOptions:R}),p({variant:"success",message:a.EMAIL_OTP_VERIFICATION_SENT}),l(T)}catch(A){p({variant:"error",message:Ut({error:A,localization:a,localizeErrors:y})})}}return b.jsx(wa,{...S,children:b.jsxs("form",{onSubmit:S.handleSubmit(w),noValidate:u,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:S.control,name:"email",render:({field:T})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...T})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Uc,{ref:d,localization:a,action:"/email-otp/send-verification-otp"}),b.jsx(Ot,{type:"submit",disabled:n,className:de("w-full",t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.EMAIL_OTP_SEND_ACTION})]})})}function qU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u,email:d}){const{authClient:f,localization:h,toast:g,localizeErrors:p}=E.useContext(Qe);a={...h,...a};const{onSuccess:y,isPending:_}=xa({redirectTo:l}),S=En({code:Ke().min(1,{message:`${a.EMAIL_OTP} ${a.IS_REQUIRED}`}).min(6,{message:`${a.EMAIL_OTP} ${a.IS_INVALID}`})}),w=_a({resolver:Ea(S),defaultValues:{code:""}});n=n||w.formState.isSubmitting||_,E.useEffect(()=>{u?.(w.formState.isSubmitting||_)},[w.formState.isSubmitting,_,u]);async function T({code:R}){try{await f.signIn.emailOtp({email:d,otp:R,fetchOptions:{throw:!0}}),await y()}catch(A){g({variant:"error",message:Ut({error:A,localization:a,localizeErrors:p})}),w.reset()}}return b.jsx(wa,{...w,children:b.jsxs("form",{onSubmit:w.handleSubmit(T),className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:w.control,name:"code",render:({field:R})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.EMAIL_OTP}),b.jsx(an,{children:b.jsx(w0,{...R,maxLength:6,onChange:A=>{R.onChange(A),A.length===6&&w.handleSubmit(T)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(x0,{otpSeparators:o})})}),b.jsx(fn,{className:t?.error})]})}),b.jsx("div",{className:"grid gap-4",children:b.jsxs(Ot,{type:"submit",disabled:n,className:de(t?.button,t?.primaryButton),children:[n&&b.jsx(_n,{className:"animate-spin"}),a.EMAIL_OTP_VERIFY_ACTION]})})]})})}function YU({onCancel:e,localization:t,className:n,classNames:a,otpSeparators:o,callbackURL:l,isSubmitting:u,redirectTo:d,setIsSubmitting:f}){const[h,g]=E.useState(!0),[p,y]=E.useState(30),{authClient:_,localization:S,toast:w,localizeErrors:T,navigate:R,basePath:A,viewPaths:C}=E.useContext(Qe);t={...S,...t};const O=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:M,isPending:L}=xa({redirectTo:d}),N=En({code:Ke().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),D=_a({resolver:Ea(N),defaultValues:{code:""}}),U=u||D.formState.isSubmitting||L;E.useEffect(()=>{f?.(D.formState.isSubmitting||L)},[D.formState.isSubmitting,L,f]),E.useEffect(()=>{if(p>0){const W=setTimeout(()=>y(p-1),1e3);return()=>clearTimeout(W)}else g(!1)},[p]);async function Z({code:W}){try{const j=await _.emailOtp.verifyEmail({email:O,otp:W,fetchOptions:{throw:!0}});"token"in j&&j.token?await M():(R(`${A}/${C.SIGN_IN}${window.location.search}`),w({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(j){w({variant:"error",message:Ut({error:j,localization:t,localizeErrors:T})}),D.reset()}}async function G(){if(!h){g(!0),y(30);try{await _.emailOtp.sendVerificationOtp({email:O,type:"email-verification",fetchOptions:{throw:!0}}),w({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(W){w({variant:"error",message:Ut({error:W,localization:t,localizeErrors:T})}),g(!1),y(0)}}}return O?b.jsx(wa,{...D,children:b.jsxs("form",{onSubmit:D.handleSubmit(Z),className:de("grid w-full gap-6",n,a?.base),children:[b.jsx(Gt,{control:D.control,name:"code",render:({field:W})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:a?.label,children:t.EMAIL_OTP}),b.jsx(an,{children:b.jsx(w0,{...W,maxLength:6,onChange:j=>{W.onChange(j),j.length===6&&D.handleSubmit(Z)()},containerClassName:a?.otpInputContainer,className:a?.otpInput,disabled:U,children:b.jsx(x0,{otpSeparators:o})})}),b.jsx(fn,{className:a?.error})]})}),b.jsxs("div",{className:"grid gap-4",children:[b.jsxs(Ot,{type:"submit",disabled:U,className:de(a?.button,a?.primaryButton),children:[U&&b.jsx(_n,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),b.jsx(Ot,{type:"button",variant:"outline",onClick:G,disabled:h||U,className:de("w-full",a?.button),children:h?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&b.jsx(Ot,{type:"button",variant:"ghost",onClick:e,disabled:U,className:"w-full",children:t.CANCEL})]})]})}):b.jsx("div",{className:de("grid w-full gap-6",n),children:b.jsxs("div",{className:"text-center",children:[b.jsx("h2",{className:"font-semibold text-destructive text-lg",children:"Invalid Request"}),b.jsx("p",{className:"text-muted-foreground text-sm",children:t.EMAIL_REQUIRED||"Email address is required"})]})})}function KU({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o}){const l=Xa(),{captchaRef:u,getCaptchaHeaders:d,resetCaptcha:f}=jc({localization:a}),{authClient:h,basePath:g,baseURL:p,localization:y,navigate:_,toast:S,viewPaths:w,localizeErrors:T}=E.useContext(Qe);a={...y,...a};const R=En({email:Ke().email({message:`${a.EMAIL} ${a.IS_INVALID}`}).min(1,{message:`${a.EMAIL} ${a.IS_REQUIRED}`})}),A=_a({resolver:Ea(R),defaultValues:{email:""}});n=n||A.formState.isSubmitting,E.useEffect(()=>{o?.(A.formState.isSubmitting)},[A.formState.isSubmitting,o]);async function C({email:O}){try{const M={throw:!0,headers:await d("/forget-password")};await h.requestPasswordReset({email:O,redirectTo:`${p}${g}/${w.RESET_PASSWORD}`,fetchOptions:M}),S({variant:"success",message:a.FORGOT_PASSWORD_EMAIL}),_(`${g}/${w.SIGN_IN}${window.location.search}`)}catch(M){S({variant:"error",message:Ut({error:M,localization:a,localizeErrors:T})}),f()}}return b.jsx(wa,{...A,children:b.jsxs("form",{onSubmit:A.handleSubmit(C),noValidate:l,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:A.control,name:"email",render:({field:O})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...O})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Uc,{ref:u,localization:a,action:"/forget-password"}),b.jsx(Ot,{type:"submit",disabled:n,className:de("w-full",t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.FORGOT_PASSWORD_ACTION})]})})}function cw({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u}){const d=Xa(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=jc({localization:o}),{authClient:p,basePath:y,baseURL:_,persistClient:S,localization:w,redirectTo:T,viewPaths:R,toast:A,localizeErrors:C}=E.useContext(Qe);o={...w,...o};const O=E.useCallback(()=>l||Lo("redirectTo")||T,[l,T]),M=E.useCallback(()=>`${_}${n||(S?`${y}/${R.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,S,y,R,_,O]),L=En({email:Ke().email({message:`${o.EMAIL} ${o.IS_INVALID}`})}),N=_a({resolver:Ea(L),defaultValues:{email:""}});a=a||N.formState.isSubmitting,E.useEffect(()=>{u?.(N.formState.isSubmitting)},[N.formState.isSubmitting,u]);async function D({email:U}){try{const Z={throw:!0,headers:await h("/sign-in/magic-link")};await p.signIn.magicLink({email:U,callbackURL:M(),fetchOptions:Z}),A({variant:"success",message:o.MAGIC_LINK_EMAIL}),N.reset()}catch(Z){A({variant:"error",message:Ut({error:Z,localization:o,localizeErrors:C})}),g()}}return b.jsx(wa,{...N,children:b.jsxs("form",{onSubmit:N.handleSubmit(D),noValidate:d,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:N.control,name:"email",render:({field:U})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...U})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Uc,{ref:f,localization:o,action:"/sign-in/magic-link"}),b.jsx(Ot,{type:"submit",disabled:a,className:de("w-full",t?.button,t?.primaryButton),children:a?b.jsx(_n,{className:"animate-spin"}):o.MAGIC_LINK_ACTION})]})})}function WU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l}){const{authClient:u,localization:d,toast:f,localizeErrors:h}=E.useContext(Qe);a={...d,...a};const{onSuccess:g,isPending:p}=xa({redirectTo:o}),y=En({code:Ke().min(1,{message:a.BACKUP_CODE_REQUIRED})}),_=_a({resolver:Ea(y),defaultValues:{code:""}});n=n||_.formState.isSubmitting||p,E.useEffect(()=>{l?.(_.formState.isSubmitting||p)},[_.formState.isSubmitting,p,l]);async function S({code:w}){try{await u.twoFactor.verifyBackupCode({code:w,fetchOptions:{throw:!0}}),await g()}catch(T){f({variant:"error",message:Ut({error:T,localization:a,localizeErrors:h})}),_.reset()}}return b.jsx(wa,{..._,children:b.jsxs("form",{onSubmit:_.handleSubmit(S),className:de("grid gap-6",e,t?.base),children:[b.jsx(Gt,{control:_.control,name:"code",render:({field:w})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.BACKUP_CODE}),b.jsx(an,{children:b.jsx(Zr,{placeholder:a.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...w})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Ot,{type:"submit",disabled:n,className:de(t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.RECOVER_ACCOUNT_ACTION})]})})}function ZU({className:e,classNames:t,localization:n,passwordValidation:a}){const o=E.useRef(!1),{authClient:l,basePath:u,credentials:d,localization:f,viewPaths:h,navigate:g,toast:p,localizeErrors:y}=E.useContext(Qe),_=d?.confirmPassword,S=d?.passwordValidation;n={...f,...n},a={...S,...a};const w=En({newPassword:vc(a,{PASSWORD_REQUIRED:n.NEW_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}),confirmPassword:_?vc(a,{PASSWORD_REQUIRED:n.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}):Ke().optional()}).refine(C=>!_||C.newPassword===C.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),T=_a({resolver:Ea(w),defaultValues:{newPassword:"",confirmPassword:""}}),R=T.formState.isSubmitting;E.useEffect(()=>{if(o.current)return;o.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="INVALID_TOKEN")&&(g(`${u}/${h.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[u,g,p,h,n]);async function A({newPassword:C}){try{const M=new URLSearchParams(window.location.search).get("token");await l.resetPassword({newPassword:C,token:M,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),g(`${u}/${h.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:Ut({error:O,localization:n,localizeErrors:y})}),T.reset()}}return b.jsx(wa,{...T,children:b.jsxs("form",{onSubmit:T.handleSubmit(A),className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:T.control,name:"newPassword",render:({field:C})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:n.NEW_PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(fn,{className:t?.error})]})}),_&&b.jsx(Gt,{control:T.control,name:"confirmPassword",render:({field:C})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:n.CONFIRM_PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Ot,{type:"submit",disabled:R,className:de("w-full",t?.button,t?.primaryButton),children:R?b.jsx(_n,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function QU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l,passwordValidation:u}){const d=Xa(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=jc({localization:a}),{authClient:p,basePath:y,credentials:_,localization:S,viewPaths:w,navigate:T,toast:R,Link:A,localizeErrors:C,emailVerification:O}=E.useContext(Qe),M=_?.rememberMe,L=_?.username,N=_?.passwordValidation;a={...S,...a},u={...N,...u};const{onSuccess:D,isPending:U}=xa({redirectTo:o}),Z=En({email:L?Ke().min(1,{message:`${a.USERNAME} ${a.IS_REQUIRED}`}):Ke().email({message:`${a.EMAIL} ${a.IS_INVALID}`}),password:vc(u,a),rememberMe:Cv().optional()}),G=_a({resolver:Ea(Z),defaultValues:{email:"",password:"",rememberMe:!M}});n=n||G.formState.isSubmitting||U,E.useEffect(()=>{l?.(G.formState.isSubmitting||U)},[G.formState.isSubmitting,U,l]);async function W({email:j,password:ne,rememberMe:ie}){var P;try{let V={};if(L&&!UM(j)){const $={throw:!0,headers:await h("/sign-in/username")};V=await p.signIn.username({username:j,password:ne,rememberMe:ie,fetchOptions:$})}else{const $={throw:!0,headers:await h("/sign-in/email")};V=await p.signIn.email({email:j,password:ne,rememberMe:ie,fetchOptions:$})}V.twoFactorRedirect?T(`${y}/${w.TWO_FACTOR}${window.location.search}`):await D()}catch(V){G.resetField("password"),g(),R({variant:"error",message:Ut({error:V,localization:a,localizeErrors:C})}),O?.otp&&((P=V?.error)==null?void 0:P.code)==="EMAIL_NOT_VERIFIED"&&T(`${y}/${w.EMAIL_VERIFICATION}?email=${encodeURIComponent(j)}`)}}return b.jsx(wa,{...G,children:b.jsxs("form",{onSubmit:G.handleSubmit(W),noValidate:d,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:G.control,name:"email",render:({field:j})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:L?a.USERNAME:a.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:L?"username":"email",className:t?.input,type:L?"text":"email",placeholder:L?a.SIGN_IN_USERNAME_PLACEHOLDER:a.EMAIL_PLACEHOLDER,disabled:n,...j})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:G.control,name:"password",render:({field:j})=>b.jsxs(qt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Yt,{className:t?.label,children:a.PASSWORD}),_?.forgotPassword&&b.jsx(A,{className:de("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${w.FORGOT_PASSWORD}${d?window.location.search:""}`,children:a.FORGOT_PASSWORD_LINK})]}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"current-password",className:t?.input,placeholder:a.PASSWORD_PLACEHOLDER,disabled:n,...j})}),b.jsx(fn,{className:t?.error})]})}),M&&b.jsx(Gt,{control:G.control,name:"rememberMe",render:({field:j})=>b.jsxs(qt,{className:"flex",children:[b.jsx(an,{children:b.jsx(S0,{checked:j.value,onCheckedChange:j.onChange,disabled:n})}),b.jsx(Yt,{children:a.REMEMBER_ME})]})}),b.jsx(Uc,{ref:f,localization:a,action:"/sign-in/email"}),b.jsx(Ot,{type:"submit",disabled:n,className:de("w-full",t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.SIGN_IN_ACTION})]})})}function XU({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u,passwordValidation:d}){const f=Xa(),{captchaRef:h,getCaptchaHeaders:g,resetCaptcha:p}=jc({localization:o}),{additionalFields:y,authClient:_,basePath:S,baseURL:w,credentials:T,localization:R,nameRequired:A,persistClient:C,redirectTo:O,signUp:M,viewPaths:L,navigate:N,toast:D,avatar:U,localizeErrors:Z,emailVerification:G}=E.useContext(Qe),W=T?.confirmPassword,j=T?.username,ne=T?.usernameRequired??!0,ie=T?.passwordValidation,P=M?.fields;o={...R,...o},d={...ie,...d};const V=E.useRef(null),[$,re]=E.useState(null),[ve,k]=E.useState(!1),Q=E.useCallback(()=>l||Lo("redirectTo")||O,[l,O]),ee=E.useCallback(()=>`${w}${n||(C?`${S}/${L.CALLBACK}?redirectTo=${encodeURIComponent(Q())}`:Q())}`,[n,C,S,L,w,Q]),{onSuccess:oe,isPending:pe}=xa({redirectTo:l}),be={email:Ke().email({message:`${o.EMAIL} ${o.IS_INVALID}`}),password:vc(d,o),name:P?.includes("name")&&A?Ke().min(1,{message:`${o.NAME} ${o.IS_REQUIRED}`}):Ke().optional(),image:Ke().optional(),username:j&&ne?Ke().min(1,{message:`${o.USERNAME} ${o.IS_REQUIRED}`}):Ke().optional(),confirmPassword:W?vc(d,{PASSWORD_REQUIRED:o.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:o.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:o.PASSWORD_TOO_LONG,INVALID_PASSWORD:o.INVALID_PASSWORD}):Ke().optional()},ye={};if(P)for(const me of P){if(me==="name"||me==="image")continue;const Re=y?.[me];if(!Re)continue;let Ue;Re.type==="number"?Ue=Re.required?jM(it=>it?Number(it):void 0,xx({message:`${Re.label} ${o.IS_INVALID}`})):Dm.number({message:`${Re.label} ${o.IS_INVALID}`}).optional():Re.type==="boolean"?Ue=Re.required?Dm.boolean({message:`${Re.label} ${o.IS_INVALID}`}).refine(it=>it===!0,{message:`${Re.label} ${o.IS_REQUIRED}`}):Dm.boolean({message:`${Re.label} ${o.IS_INVALID}`}).optional():Ue=Re.required?Ke().min(1,`${Re.label} ${o.IS_REQUIRED}`):Ke().optional(),ye[me]=Ue}const Se=En(be).extend(ye).refine(me=>W?me.password===me.confirmPassword:!0,{message:o.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),Pe={email:"",password:"",...W&&{confirmPassword:""},...P?.includes("name")?{name:""}:{},...j?{username:""}:{},...P?.includes("image")&&U?{image:""}:{}};if(P)for(const me of P){if(me==="name"||me==="image")continue;const Re=y?.[me];Re&&(Pe[me]=Re.type==="boolean"?!1:"")}const ke=_a({resolver:Ea(Se),defaultValues:Pe});a=a||ke.formState.isSubmitting||pe,E.useEffect(()=>{u?.(ke.formState.isSubmitting||pe)},[ke.formState.isSubmitting,pe,u]);const Ee=async me=>{if(U){k(!0);try{const Re=await lU(me,crypto.randomUUID(),U.size,U.extension);let Ue;U.upload?Ue=await U.upload(Re):Ue=await uU(Re),Ue?(re(Ue),ke.setValue("image",Ue)):(re(null),ke.setValue("image",""))}catch(Re){console.error(Re),D({variant:"error",message:Ut({error:Re,localization:o,localizeErrors:Z})})}k(!1)}},ze=()=>{re(null),ke.setValue("image","")},Pt=()=>{var me;return(me=V.current)==null?void 0:me.click()};async function ge({email:me,password:Re,name:Ue,username:it,confirmPassword:He,image:tt,...B}){try{for(const[he,fe]of Object.entries(B)){const xe=y?.[he];if(xe?.validate&&typeof fe=="string"&&!await xe.validate(fe)){ke.setError(he,{message:`${xe.label} ${o.IS_INVALID}`});return}}const q={throw:!0,headers:await g("/sign-up/email")},Y={};it!==void 0&&(!ne&&(it===null||it===""||typeof it=="string"&&it.trim()==="")||(Y.username=it)),tt!==void 0&&(Y.image=tt);const ce=await _.signUp.email({email:me,password:Re,name:Ue||"",...Y,...B,callbackURL:ee(),fetchOptions:q});"token"in ce&&ce.token?await oe():G?.otp?N(`${S}/${L.EMAIL_VERIFICATION}?email=${encodeURIComponent(me)}`):(N(`${S}/${L.SIGN_IN}${window.location.search}`),D({variant:"success",message:o.SIGN_UP_EMAIL}))}catch(q){D({variant:"error",message:Ut({error:q,localization:o,localizeErrors:Z})}),ke.resetField("password"),ke.resetField("confirmPassword"),p()}}return b.jsx(wa,{...ke,children:b.jsxs("form",{onSubmit:ke.handleSubmit(ge),noValidate:f,className:de("grid w-full gap-6",e,t?.base),children:[P?.includes("image")&&U&&b.jsxs(b.Fragment,{children:[b.jsx("input",{ref:V,accept:"image/*",disabled:ve,hidden:!0,type:"file",onChange:me=>{var Re;const Ue=(Re=me.target.files)==null?void 0:Re.item(0);Ue&&Ee(Ue),me.target.value=""}}),b.jsx(Gt,{control:ke.control,name:"image",render:()=>b.jsxs(qt,{children:[b.jsx(Yt,{children:o.AVATAR}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsxs(VO,{children:[b.jsx(FO,{asChild:!0,children:b.jsx(Ot,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:b.jsx(QO,{isPending:ve,className:"size-16",user:$?{name:ke.watch("name"),email:ke.watch("email"),image:$}:null,localization:o})})}),b.jsxs(HO,{align:"start",onCloseAutoFocus:me=>me.preventDefault(),children:[b.jsxs(Ef,{onClick:Pt,disabled:ve,children:[b.jsx(hN,{}),o.UPLOAD_AVATAR]}),$&&b.jsxs(Ef,{onClick:ze,disabled:ve,variant:"destructive",children:[b.jsx(MN,{}),o.DELETE_AVATAR]})]})]}),b.jsxs(Ot,{type:"button",variant:"outline",onClick:Pt,disabled:ve,children:[ve&&b.jsx(_n,{className:"animate-spin"}),o.UPLOAD]})]}),b.jsx(fn,{})]})})]}),P?.includes("name")&&b.jsx(Gt,{control:ke.control,name:"name",render:({field:me})=>b.jsxs(qt,{children:[b.jsxs(Yt,{className:t?.label,children:[o.NAME,!A&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:"name",className:t?.input,placeholder:o.NAME_PLACEHOLDER,disabled:a,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),j&&b.jsx(Gt,{control:ke.control,name:"username",render:({field:me})=>b.jsxs(qt,{children:[b.jsxs(Yt,{className:t?.label,children:[o.USERNAME,!ne&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:"username",className:t?.input,placeholder:o.USERNAME_PLACEHOLDER,disabled:a,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:ke.control,name:"email",render:({field:me})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:"email",className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:ke.control,name:"password",render:({field:me})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),W&&b.jsx(Gt,{control:ke.control,name:"confirmPassword",render:({field:me})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.CONFIRM_PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.CONFIRM_PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),P?.filter(me=>me!=="name"&&me!=="image").map(me=>{const Re=y?.[me];return Re?Re.type==="boolean"?b.jsx(Gt,{control:ke.control,name:me,render:({field:Ue})=>b.jsxs(qt,{className:"flex",children:[b.jsx(an,{children:b.jsx(S0,{checked:Ue.value,onCheckedChange:Ue.onChange,disabled:a})}),b.jsx(Yt,{className:t?.label,children:Re.label}),b.jsx(fn,{className:t?.error})]})},me):b.jsx(Gt,{control:ke.control,name:me,render:({field:Ue})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:Re.label}),b.jsx(an,{children:Re.type==="number"?b.jsx(Zr,{className:t?.input,type:"number",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:a,...Ue,value:Ue.value}):Re.multiline?b.jsx(mU,{className:t?.input,placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:a,...Ue,value:Ue.value}):b.jsx(Zr,{className:t?.input,type:"text",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:a,...Ue,value:Ue.value})}),b.jsx(fn,{className:t?.error})]})},me):(console.error(`Additional field ${me} not found`),null)}),b.jsx(Uc,{ref:h,localization:o,action:"/sign-up/email"}),b.jsx(Ot,{type:"submit",disabled:a,className:de("w-full",t?.button,t?.primaryButton),children:a?b.jsx(_n,{className:"animate-spin"}):o.SIGN_UP_ACTION})]})})}function JU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u}){var d;const f=Xa(),h=f?Lo("totpURI"):null,g=E.useRef(!1),{authClient:p,basePath:y,hooks:{useSession:_},localization:S,twoFactor:w,viewPaths:T,toast:R,Link:A,localizeErrors:C}=E.useContext(Qe);a={...S,...a};const{onSuccess:O,isPending:M}=xa({redirectTo:l}),{data:L}=_(),N=(d=L?.user)==null?void 0:d.twoFactorEnabled,[D,U]=E.useState(w?.length===1?w[0]:null),[Z,G]=E.useState(!1),[W,j]=E.useState(0),ne=En({code:Ke().min(1,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_REQUIRED}`}).min(6,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_INVALID}`}),trustDevice:Cv().optional()}),ie=_a({resolver:Ea(ne),defaultValues:{code:""}});n=n||ie.formState.isSubmitting||M,E.useEffect(()=>{u?.(ie.formState.isSubmitting||M)},[ie.formState.isSubmitting,M,u]),E.useEffect(()=>{D==="otp"&&W<=0&&!g.current&&(g.current=!0,P())},[D]),E.useEffect(()=>{if(W<=0)return;const $=setTimeout(()=>{j(re=>re-1)},1e3);return()=>clearTimeout($)},[W]);const P=async()=>{if(!(Z||W>0)){try{G(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),j(60)}catch($){R({variant:"error",message:Ut({error:$,localization:a,localizeErrors:C})}),$.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}g.current=!1,G(!1)}};async function V({code:$,trustDevice:re}){try{await(D==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:$,trustDevice:re,fetchOptions:{throw:!0}}),await O(),L&&!N&&R({variant:"success",message:a?.TWO_FACTOR_ENABLED})}catch(ve){R({variant:"error",message:Ut({error:ve,localization:a,localizeErrors:C})}),ie.reset()}}return b.jsx(wa,{...ie,children:b.jsxs("form",{onSubmit:ie.handleSubmit(V),className:de("grid w-full gap-6",e,t?.base),children:[w?.includes("totp")&&h&&D==="totp"&&b.jsxs("div",{className:"space-y-3",children:[b.jsx($O,{className:t?.label,children:a.TWO_FACTOR_TOTP_LABEL}),b.jsx(Q9,{className:de("border shadow-xs",t?.qrCode),value:h})]}),D!==null&&b.jsxs(b.Fragment,{children:[b.jsx(Gt,{control:ie.control,name:"code",render:({field:$})=>b.jsxs(qt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Yt,{className:t?.label,children:a.ONE_TIME_PASSWORD}),b.jsx(A,{className:de("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${T.RECOVER_ACCOUNT}${f?window.location.search:""}`,children:a.FORGOT_AUTHENTICATOR})]}),b.jsx(an,{children:b.jsx(w0,{...$,maxLength:6,onChange:re=>{$.onChange(re),re.length===6&&ie.handleSubmit(V)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(x0,{otpSeparators:o})})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:ie.control,name:"trustDevice",render:({field:$})=>b.jsxs(qt,{className:"flex",children:[b.jsx(an,{children:b.jsx(S0,{checked:$.value,onCheckedChange:$.onChange,disabled:n,className:t?.checkbox})}),b.jsx(Yt,{className:t?.label,children:a.TRUST_DEVICE})]})})]}),b.jsxs("div",{className:"grid gap-4",children:[D!==null&&b.jsxs(Ot,{type:"submit",disabled:n,className:de(t?.button,t?.primaryButton),children:[n&&b.jsx(_n,{className:"animate-spin"}),a.TWO_FACTOR_ACTION]}),D==="otp"&&w?.includes("otp")&&b.jsxs(Ot,{type:"button",variant:"outline",onClick:P,disabled:W>0||Z||n,className:de(t?.button,t?.outlineButton),children:[Z?b.jsx(_n,{className:"animate-spin"}):b.jsx(UE,{className:t?.icon}),a.RESEND_CODE,W>0&&` (${W})`]}),D!=="otp"&&w?.includes("otp")&&b.jsxs(Ot,{type:"button",variant:"secondary",className:de(t?.button,t?.secondaryButton),onClick:()=>U("otp"),disabled:n,children:[b.jsx(UE,{className:t?.icon}),a.SEND_VERIFICATION_CODE]}),D!=="totp"&&w?.includes("totp")&&b.jsxs(Ot,{type:"button",variant:"secondary",className:de(t?.button,t?.secondaryButton),onClick:()=>U("totp"),disabled:n,children:[b.jsx(AN,{className:t?.icon}),a.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function JO({redirectTo:e}){const t=E.useRef(!1),{authClient:n,basePath:a,viewPaths:o}=E.useContext(Qe),{onSuccess:l}=xa({redirectTo:e||`${a}/${o.SIGN_IN}`});return E.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(l))},[n,l]),b.jsx(_n,{className:"animate-spin"})}function eB({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,pathname:l,redirectTo:u,view:d,otpSeparators:f=0,setIsSubmitting:h}){const{basePath:g,credentials:p,localization:y,magicLink:_,emailOTP:S,signUp:w,twoFactor:T,viewPaths:R,replace:A}=E.useContext(Qe),C=!!w;if(o={...y,...o},E.useEffect(()=>{l&&!Lg(R,l)&&(console.error(`Invalid auth view: ${l}`),A(`${g}/${R.SIGN_IN}${window.location.search}`))},[l,R,g,A]),d=d||Lg(R,l)||"SIGN_IN",E.useEffect(()=>{let O=!1;d==="MAGIC_LINK"&&(!_||!p&&!S)&&(O=!0),d==="EMAIL_OTP"&&(!S||!p&&!_)&&(O=!0),d==="SIGN_UP"&&!C&&(O=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&(O=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&!T&&(O=!0),O&&A(`${g}/${R.SIGN_IN}${window.location.search}`)},[g,d,R,p,A,S,C,_,T]),d==="SIGN_OUT")return b.jsx(JO,{redirectTo:u});if(d==="CALLBACK")return b.jsx(XO,{redirectTo:u});if(d==="SIGN_IN")return p?b.jsx(QU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):_?b.jsx(cw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):S?b.jsx(lw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):null;if(d==="TWO_FACTOR")return b.jsx(JU,{className:e,classNames:t,localization:o,otpSeparators:f,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="RECOVER_ACCOUNT")return b.jsx(WU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="MAGIC_LINK")return b.jsx(cw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="EMAIL_OTP")return b.jsx(lw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="EMAIL_VERIFICATION")return b.jsx(YU,{className:e,classNames:t,callbackURL:n,localization:o,otpSeparators:f,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="FORGOT_PASSWORD")return b.jsx(KU,{className:e,classNames:t,localization:o,isSubmitting:a,setIsSubmitting:h});if(d==="RESET_PASSWORD")return b.jsx(ZU,{className:e,classNames:t,localization:o});if(d==="SIGN_UP")return C&&b.jsx(XU,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h})}function tB({className:e,classNames:t,localization:n}){const{localization:a,redirectTo:o,replace:l,toast:u}=E.useContext(Qe),d=E.useMemo(()=>({...a,...n}),[a,n]),{data:f}=nU(),[h,g]=E.useState(null);return E.useEffect(()=>{const p=Lo("invitationId");if(!p){u({variant:"error",message:d.INVITATION_NOT_FOUND}),l(o);return}g(p)},[d.INVITATION_NOT_FOUND,u,l,o]),!f||!h?b.jsx(eT,{className:e,classNames:t}):b.jsx(nB,{className:e,classNames:t,localization:d,invitationId:h})}function nB({className:e,classNames:t,localization:n,invitationId:a}){var o;const{authClient:l,hooks:{useInvitation:u},localization:d,organization:f,redirectTo:h,replace:g,toast:p,localizeErrors:y}=E.useContext(Qe),_=E.useMemo(()=>({...d,...n}),[d,n]),[S,w]=E.useState(!1),[T,R]=E.useState(!1),A=S||T,{data:C,isPending:O}=u({query:{id:a}}),M=E.useCallback(()=>Lo("redirectTo")||h,[h]);E.useEffect(()=>{if(!(O||!a)){if(!C){p({variant:"error",message:_.INVITATION_NOT_FOUND}),g(h);return}(C.status!=="pending"||new Date(C.expiresAt)<new Date)&&(p({variant:"error",message:new Date(C.expiresAt)<new Date?_.INVITATION_EXPIRED:_.INVITATION_NOT_FOUND}),g(h))}},[C,O,a,_,p,g,h]);const L=async()=>{R(!0);try{await l.organization.acceptInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_ACCEPTED||"Invitation accepted"}),g(M())}catch(G){p({variant:"error",message:Ut({error:G,localization:_,localizeErrors:y})}),R(!1)}},N=async()=>{w(!0);try{await l.organization.rejectInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_REJECTED}),g(h)}catch(G){p({variant:"error",message:Ut({error:G,localization:_,localizeErrors:y})}),w(!1)}},Z=((o=[...[{role:"owner",label:_.OWNER},{role:"admin",label:_.ADMIN},{role:"member",label:_.MEMBER}],...f?.customRoles||[]].find(G=>G.role===C?.role))==null?void 0:o.label)||C?.role;return C?b.jsxs(No,{className:de("w-full max-w-sm",e,t?.base),children:[b.jsxs($f,{className:de("justify-items-center text-center",t?.header),children:[b.jsx(_0,{className:de("text-lg md:text-xl",t?.title),children:_.ACCEPT_INVITATION}),b.jsx(Gf,{className:de("text-xs md:text-sm",t?.description),children:_.ACCEPT_INVITATION_DESCRIPTION})]}),b.jsxs(qf,{className:de("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(No,{className:de("flex-row items-center p-4"),children:[b.jsx(ZO,{organization:{id:C.organizationId,name:C.organizationName,slug:C.organizationSlug,logo:C.organizationLogo,createdAt:new Date},localization:_}),b.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:Z})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsxs(Ot,{variant:"outline",className:de(t?.button,t?.outlineButton),onClick:N,disabled:A,children:[S?b.jsx(_n,{className:"animate-spin"}):b.jsx(Mx,{}),_.REJECT]}),b.jsxs(Ot,{className:de(t?.button,t?.primaryButton),onClick:L,disabled:A,children:[T?b.jsx(_n,{className:"animate-spin"}):b.jsx(Dv,{}),_.ACCEPT]})]})]})]}):b.jsx(eT,{className:e,classNames:t})}var eT=({className:e,classNames:t,localization:n})=>b.jsxs(No,{className:de("w-full max-w-sm",e,t?.base),children:[b.jsxs($f,{className:de("justify-items-center",t?.header),children:[b.jsx(vr,{className:de("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),b.jsx(vr,{className:de("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),b.jsxs(qf,{className:de("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(No,{className:de("flex-row items-center p-4"),children:[b.jsx(ZO,{isPending:!0,localization:n}),b.jsx(vr,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsx(vr,{className:"h-9 w-full"}),b.jsx(vr,{className:"h-9 w-full"})]})]})]});function uw({className:e,orientation:t="horizontal",decorative:n=!0,...a}){return b.jsx(tU,{"data-slot":"separator",decorative:n,orientation:t,className:de("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...a})}function rB({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g}=E.useContext(Qe);return b.jsxs(Ot,{className:de("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="EMAIL_OTP"?f.SIGN_IN:f.EMAIL_OTP}${window.location.search}`),children:[a==="EMAIL_OTP"?b.jsx(Cx,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Ix,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function aB({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g,credentials:p}=E.useContext(Qe);return b.jsxs(Ot,{className:de("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="MAGIC_LINK"||!p?f.SIGN_IN:f.MAGIC_LINK}${window.location.search}`),children:[a==="MAGIC_LINK"?b.jsx(Cx,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Ix,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function iB({localization:e,redirectTo:t}){const{authClient:n,localization:a,toast:o,localizeErrors:l}=E.useContext(Qe),u=E.useRef(!1);e=E.useMemo(()=>({...a,...e}),[a,e]);const{onSuccess:d}=xa({redirectTo:t});return E.useEffect(()=>{if(!u.current){u.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:d}})}catch(f){o({variant:"error",message:Ut({error:f,localization:e,localizeErrors:l})})}}},[n,e,l,d,o]),null}function oB({classNames:e,isSubmitting:t,localization:n,redirectTo:a,setIsSubmitting:o}){var l,u;const{authClient:d,localization:f,toast:h,localizeErrors:g}=E.useContext(Qe);n={...f,...n};const{onSuccess:p}=xa({redirectTo:a}),y=async()=>{o?.(!0);try{const _=await d.signIn.passkey({fetchOptions:{throw:!0}});_?.error?(h({variant:"error",message:Ut({error:_.error,localization:n,localizeErrors:g})}),o?.(!1)):p()}catch(_){h({variant:"error",message:Ut({error:_,localization:n,localizeErrors:g})}),o?.(!1)}};return b.jsxs(Ot,{className:de("w-full",(l=e?.form)==null?void 0:l.button,(u=e?.form)==null?void 0:u.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:y,children:[b.jsx(EN,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function dw({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,other:l,provider:u,redirectTo:d,socialLayout:f,setIsSubmitting:h}){var g,p,y,_;const{authClient:S,basePath:w,baseURL:T,persistClient:R,redirectTo:A,viewPaths:C,social:O,genericOAuth:M,toast:L,localizeErrors:N}=E.useContext(Qe),D=E.useCallback(()=>d||Lo("redirectTo")||A,[d,A]),U=E.useCallback(()=>`${T}${n||(R?`${w}/${C.CALLBACK}?redirectTo=${encodeURIComponent(D())}`:D())}`,[n,R,w,C,T,D]),Z=async()=>{h(!0);try{if(l){const G={providerId:u.provider,callbackURL:U(),fetchOptions:{throw:!0}};M?.signIn?(await M.signIn(G),setTimeout(()=>{h(!1)},1e4)):await S.signIn.oauth2(G)}else{const G={provider:u.provider,callbackURL:U(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(G),setTimeout(()=>{h(!1)},1e4)):await S.signIn.social(G)}}catch(G){L({variant:"error",message:Ut({error:G,localization:o,localizeErrors:N})}),h(!1)}};return b.jsxs(Ot,{className:de(f==="vertical"?"w-full":"grow",e,(g=t?.form)==null?void 0:g.button,(p=t?.form)==null?void 0:p.outlineButton,(y=t?.form)==null?void 0:y.providerButton),disabled:a,variant:"outline",onClick:Z,children:[u.icon&&b.jsx(u.icon,{className:(_=t?.form)==null?void 0:_.icon}),f==="grid"&&u.name,f==="vertical"&&`${o.SIGN_IN_WITH} ${u.name}`]})}function Pz({className:e,classNames:t,callbackURL:n,cardHeader:a,cardFooter:o,localization:l,path:u,pathname:d,redirectTo:f,socialLayout:h="auto",view:g,otpSeparators:p=0}){var y,_,S,w,T,R;const A=Xa(),{basePath:C,credentials:O,localization:M,magicLink:L,emailOTP:N,oneTap:D,passkey:U,signUp:Z,social:G,genericOAuth:W,viewPaths:j,Link:ne}=E.useContext(Qe);l={...M,...l};let ie=h;ie==="auto"&&(ie=O&&G?.providers&&G.providers.length>2?"horizontal":"vertical");const P=u??d?.split("/").pop(),V=g||Lg(j,P)||"SIGN_IN",[$,re]=E.useState(!1);if(E.useEffect(()=>{const k=()=>re(!1);return window.addEventListener("pagehide",k),()=>{re(!1),window.removeEventListener("pagehide",k)}},[]),V==="CALLBACK")return b.jsx(XO,{redirectTo:f});if(V==="SIGN_OUT")return b.jsx(JO,{redirectTo:f});if(V==="ACCEPT_INVITATION")return b.jsx(tB,{className:e,classNames:t});const ve=!O&&!L&&!N?l.DISABLED_CREDENTIALS_DESCRIPTION:l[`${V}_DESCRIPTION`];return b.jsxs(No,{className:de("w-full max-w-sm",e,t?.base),children:[b.jsx($f,{className:t?.header,children:a||b.jsxs(b.Fragment,{children:[b.jsx(_0,{className:de("text-lg md:text-xl",t?.title),children:l[V]}),ve&&b.jsx(Gf,{className:de("text-xs md:text-sm",t?.description),children:ve})]})}),b.jsxs(qf,{className:de("grid gap-6",t?.content),children:[D&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(V)&&b.jsx(iB,{localization:l,redirectTo:f}),(O||L||N)&&b.jsxs("div",{className:"grid gap-4",children:[b.jsx(eB,{classNames:t?.form,callbackURL:n,isSubmitting:$,localization:l,otpSeparators:p,view:V,redirectTo:f,setIsSubmitting:re}),L&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(V)||N&&V==="EMAIL_OTP")&&b.jsx(aB,{classNames:t,localization:l,view:V,isSubmitting:$}),N&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(V)||L&&["SIGN_IN","MAGIC_LINK"].includes(V))&&b.jsx(rB,{classNames:t,localization:l,view:V,isSubmitting:$})]}),V!=="RESET_PASSWORD"&&V!=="EMAIL_VERIFICATION"&&(((y=G?.providers)==null?void 0:y.length)||((_=W?.providers)==null?void 0:_.length)||V==="SIGN_IN"&&U)&&b.jsxs(b.Fragment,{children:[(O||L||N)&&b.jsxs("div",{className:de("flex items-center gap-2",t?.continueWith),children:[b.jsx(uw,{className:de("!w-auto grow",t?.separator)}),b.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:l.OR_CONTINUE_WITH}),b.jsx(uw,{className:de("!w-auto grow",t?.separator)})]}),b.jsxs("div",{className:"grid gap-4",children:[(((S=G?.providers)==null?void 0:S.length)||((w=W?.providers)==null?void 0:w.length))&&b.jsxs("div",{className:de("flex w-full items-center justify-between gap-4",ie==="horizontal"&&"flex-wrap",ie==="vertical"&&"flex-col",ie==="grid"&&"grid grid-cols-2"),children:[(T=G?.providers)==null?void 0:T.map(k=>{const Q=BU.find(ee=>ee.provider===k);return Q?b.jsx(dw,{classNames:t,callbackURL:n,isSubmitting:$,localization:l,provider:Q,redirectTo:f,setIsSubmitting:re,socialLayout:ie},k):null}),(R=W?.providers)==null?void 0:R.map(k=>b.jsx(dw,{classNames:t,callbackURL:n,isSubmitting:$,localization:l,provider:k,redirectTo:f,setIsSubmitting:re,socialLayout:ie,other:!0},k.provider))]}),U&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(V)&&b.jsx(oB,{classNames:t,isSubmitting:$,localization:l,redirectTo:f,setIsSubmitting:re})]})]})]}),o&&b.jsx(lv,{className:t?.footer,children:o}),O&&Z&&b.jsxs(lv,{className:de("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[V==="SIGN_IN"||V==="MAGIC_LINK"||V==="EMAIL_OTP"?l.DONT_HAVE_AN_ACCOUNT:V==="SIGN_UP"?l.ALREADY_HAVE_AN_ACCOUNT:b.jsx(lN,{className:"size-3"}),V==="SIGN_IN"||V==="MAGIC_LINK"||V==="EMAIL_OTP"||V==="SIGN_UP"?b.jsx(ne,{className:de("text-foreground underline",t?.footerLink),href:`${C}/${j[V==="SIGN_IN"||V==="MAGIC_LINK"||V==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${A?window.location.search:""}`,children:b.jsx(Ot,{variant:"link",size:"sm",className:de("px-0 text-foreground underline",t?.footerLink),children:V==="SIGN_IN"||V==="MAGIC_LINK"||V==="EMAIL_OTP"?l.SIGN_UP:l.SIGN_IN})}):b.jsx(Ot,{variant:"link",size:"sm",className:de("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:l.GO_BACK})]})]})}function kz({children:e}){const{hooks:{useSession:t}}=E.useContext(Qe),{isPending:n}=t();return n?e:null}function jz({children:e}){const{hooks:{useSession:t}}=E.useContext(Qe),{data:n}=t();return n?e:null}function Uz({children:e}){const{hooks:{useSession:t}}=E.useContext(Qe),{data:n,isPending:a}=t();return!n&&!a?e:null}function sB(e){const t=Sf.c(8),{children:n}=e,a=Oc();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={basePath:"/",pathMode:"slug"},t[0]=o):o=t[0];let l,u;t[1]!==a?(l=f=>a({to:f}),u=f=>a({to:f,replace:!0}),t[1]=a,t[2]=l,t[3]=u):(l=t[2],u=t[3]);let d;return t[4]!==n||t[5]!==l||t[6]!==u?(d=b.jsx(tN,{authClient:SI,organization:o,navigate:l,replace:u,Link:lB,children:n}),t[4]=n,t[5]=l,t[6]=u,t[7]=d):d=t[7],d}function lB(e){const{href:t,className:n,children:a,...o}=e;return b.jsx(xv,{to:t,className:n,...o,children:a})}const cB=new ZC;function uB(e){const t=Sf.c(3),{children:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=b.jsx(M6,{}),t[0]=a):a=t[0];let o;return t[1]!==n?(o=b.jsxs(XC,{client:cB,children:[a,b.jsx(p4,{children:b.jsx(sB,{children:n})})]}),t[1]=n,t[2]=o):o=t[2],o}const dB=function(){return null};function fB(){const e=Sf.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=b.jsx("div",{className:"flex items-center justify-center min-h-screen",children:b.jsx("div",{className:"text-gray-500",children:"Loading..."})}),e[0]=t):t=e[0],t}const Bc=j3({component:()=>b.jsxs(uB,{children:[b.jsx(E.Suspense,{fallback:b.jsx(fB,{}),children:b.jsx(Gw,{})}),b.jsx(dB,{})]})}),hB=Cn({getParentRoute:()=>Bc,path:"/login",component:Pn(()=>Ln(()=>import("./login-Dzk1B1b-.js"),__vite__mapDeps([0,1,2,3]))),validateSearch:Gi(()=>En({next:Ke().optional(),client_id:Ke().optional(),redirect_uri:Ke().optional(),response_type:Ke().optional(),state:Ke().optional(),scope:Ke().optional(),code_challenge:Ke().optional(),code_challenge_method:Ke().optional()}))}),pB=Cn({getParentRoute:()=>Bc,path:"/auth/$pathname",component:Pn(()=>Ln(()=>import("./auth-catchall-D9jFZcp2.js"),[]))}),Br=Cn({getParentRoute:()=>Bc,id:"shell",component:Pn(()=>Ln(()=>import("./shell-layout-Cltos3LX.js"),__vite__mapDeps([4,5,2,6,7,1,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,3,39,40,41])))}),mB=Cn({getParentRoute:()=>Br,path:"/",component:Pn(()=>Ln(()=>import("./home-CbM5g6hK.js"),__vite__mapDeps([42,24,2,39,22,12,1,3,36,37,38,26])))}),gB=Cn({getParentRoute:()=>Br,path:"/$org",component:Pn(()=>Ln(()=>import("./page-R6pHknz0.js"),__vite__mapDeps([43,6,2,7,1,44,45,40,15,46,34,47,12,10,20,48,49,21,50,51,52])))}),vB=Cn({getParentRoute:()=>Br,path:"/$org/members",component:Pn(()=>Ln(()=>import("./members-CCwAaAHQ.js"),__vite__mapDeps([53,44,45,1,2,40,15,7,46,54,5,3,55,56,6,57,58,59,60,9,39,51,37,41,13,11,12,33,34,38,17,18,16,24,61,62,63])))}),yB=Cn({getParentRoute:()=>Br,path:"/$org/mcps",component:Pn(()=>Ln(()=>import("./connections-B1rZil2n.js"),__vite__mapDeps([64,65,44,45,1,2,40,15,7,46,54,5,3,55,23,24,6,34,66,19,37,51,41,13,38,61,11,33,17,18,16,67]))),validateSearch:Gi(()=>En({action:Iv(["create"]).optional()}))}),bB=Cn({getParentRoute:()=>Br,path:"/$org/settings",component:Pn(()=>Ln(()=>import("./settings-48kN1cjt.js"),__vite__mapDeps([68,44,45,1,2,40,15,7,46,38,3,69,13])))}),_B=Cn({getParentRoute:()=>Br,path:"/$org/monitoring",component:Pn(()=>Ln(()=>import("./monitoring-D3prTzA_.js"),__vite__mapDeps([70,6,2,7,1,44,45,40,15,46,54,5,3,34,48,49,21,50,51,18,20,59,47,57,71,31,17,32]))),validateSearch:Gi(()=>En({from:Ke().default("now-24h"),to:Ke().default("now"),connectionId:CE(Ke()).optional().default([]),gatewayId:CE(Ke()).optional().default([]),tool:Ke().default(""),status:Iv(["all","success","errors"]).default("all"),search:Ke().default(""),page:xx().optional(),streaming:Cv().default(!0)}))}),tT=Cn({getParentRoute:()=>Br,path:"/$org/store",component:Pn(()=>Ln(()=>import("./store-CUS-2is6.js"),__vite__mapDeps([72,60,44,45,1,2,40,15,7,6,73,74,11,5,54,3,24,75,76,17,18,12,23,29,30,8,9])))}),EB=Cn({getParentRoute:()=>tT,path:"/$appName",component:Pn(()=>Ln(()=>import("./store-app-detail-BJWFOzEW.js"),__vite__mapDeps([77,22,11,1,2,58,6,7,78,18,12,40,15,25,5,79,9,27,75,45,54,3,55,24,80,81,82,51,29,30,47,83,84,67,73,76,28]))),validateSearch:Gi(()=>En({registryId:Ke().optional(),serverName:Ke().optional(),itemId:Ke().optional()}))}),SB=Cn({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId",component:Pn(()=>Ln(()=>import("./connection-detail-DddBMHPf.js"),__vite__mapDeps([85,5,2,34,1,6,7,29,30,86,87,35,47,27,62,11,80,58,38,3,17,18,20,15,10,12,88,84,75,67,49,71,65,82,51,45,40,54,24,21,61,66,19,33,55,74,37,79,9,81]))),validateSearch:Gi(()=>En({tab:Ke().optional()}))}),wB=Cn({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:Pn(()=>Ln(()=>import("./collection-detail-BUkQA_DU.js"),__vite__mapDeps([89,6,2,7,1,14,15,16,10,5,17,18,19,20,21,22,23,24,25,26,27,28,29,30,34,8,9,38,3,11,12,69,80,58,32,50,63,86,87,35,47,62,88,84,75,67,49,71,65,83]))),validateSearch:Gi(()=>En({replayId:Ke().optional()}))}),xB=Cn({getParentRoute:()=>Br,path:"/$org/gateways",component:Pn(()=>Ln(()=>import("./gateways-B0oJ21bg.js"),__vite__mapDeps([90,44,45,1,2,40,15,7,46,54,5,3,55,23,24,6,34,20,66,19,37,51,10,61,11,33]))),validateSearch:Gi(()=>En({action:Iv(["create"]).optional()}))}),RB=Cn({getParentRoute:()=>Br,path:"/$org/gateways/$gatewayId",component:Pn(()=>Ln(()=>import("./gateway-detail-CNtXr5hn.js"),__vite__mapDeps([91,5,2,34,1,6,7,56,57,58,54,3,12,13,20,88,21,10,28,11,38,17,18,82,51,73,80]))),validateSearch:Gi(()=>En({tab:Ke().optional()}))}),OB=Cn({getParentRoute:()=>Bc,path:"/oauth/callback",component:Pn(()=>Ln(()=>import("./oauth-callback-C7HHguix.js"),__vite__mapDeps([92,24,2,22,78,11,87,30])))}),TB=tT.addChildren([EB]),AB=Br.addChildren([mB,gB,vB,yB,xB,RB,_B,TB,bB,SB,wB]),CB=Bc.addChildren([AB,hB,pB,OB]),IB=q3({routeTree:CB}),MB=document.getElementById("root");xC.createRoot(MB).render(b.jsx(E.StrictMode,{children:b.jsx(W3,{router:IB})}));export{lk as $,Pz as A,Bt as B,QL as C,Tz as D,We as E,F,_U as G,Po as H,t2 as I,NP as J,f4 as K,CR as L,MP as M,jB as N,ZL as O,WL as P,kB as Q,YL as R,fB as S,XL as T,Lz as U,sx as V,CE as W,KB as X,Cv as Y,QC as Z,sk as _,SI as a,bD as a$,ok as a0,KL as a1,hn as a2,Ja as a3,Xr as a4,Qr as a5,$R as a6,JR as a7,Ui as a8,yP as a9,oz as aA,cz as aB,nz as aC,hD as aD,vz as aE,Mf as aF,If as aG,uD as aH,az as aI,fD as aJ,nS as aK,rz as aL,qx as aM,Sz as aN,wz as aO,gz as aP,bz as aQ,lz as aR,ez as aS,XB as aT,iz as aU,sz as aV,Dz as aW,Ln as aX,Zx as aY,_z as aZ,Ez as a_,Gv as aa,dR as ab,qv as ac,bc as ad,nR as ae,$v as af,Hv as ag,bP as ah,_P as ai,NB as aj,Do as ak,zw as al,Tf as am,$i as an,Ka as ao,HC as ap,j_ as aq,LB as ar,DB as as,u4 as at,o4 as au,tr as av,Gx as aw,tz as ax,JB as ay,yz as az,wv as b,l4 as b$,pD as b0,yD as b1,gD as b2,fz as b3,hz as b4,uz as b5,dz as b6,pz as b7,mz as b8,Yx as b9,BB as bA,zB as bB,UB as bC,Rz as bD,Oz as bE,xz as bF,$7 as bG,G7 as bH,q7 as bI,Y7 as bJ,K7 as bK,Iz as bL,Mz as bM,Nz as bN,Cz as bO,Rc as bP,An as bQ,vg as bR,pw as bS,JC as bT,n4 as bU,s4 as bV,r4 as bW,a4 as bX,Xn as bY,c4 as bZ,U_ as b_,Ws as ba,Fe as bb,In as bc,xv as bd,uM as be,MN as bf,Q2 as bg,J2 as bh,Q7 as bi,wk as bj,FR as bk,AR as bl,Mx as bm,Dv as bn,Iv as bo,HB as bp,Pc as bq,Ac as br,WB as bs,VB as bt,FB as bu,GB as bv,xx as bw,$B as bx,YB as by,Gi as bz,Sf as c,i4 as c0,jN as c1,zN as c2,Cf as c3,Bv as c4,fc as c5,YC as c6,PC as c7,ZB as c8,qB as c9,_e as ca,QB as cb,Sv as d,er as e,Oc as f,Az as g,lD as h,$x as i,b as j,tU as k,Qe as l,kz as m,jz as n,Uz as o,cv as p,d4 as q,E as r,Gw as s,NE as t,PB as u,En as v,Ke as w,Ea as x,_a as y,Cc as z};
|
|
118
|
+
`}),b.jsx(C9,{ref:e,sitekey:t.siteKey,theme:n,hl:a,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:de(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${a}-${t.provider}`)]}):null}var $U=["/sign-up/email","/sign-in/email","/forget-password"];function Uc({ref:e,localization:t,action:n}){const{captcha:a}=E.useContext(Qe);if(!a||n&&!(a.endpoints||$U).includes(n))return null;const{theme:o}=Nv(),l=a.provider==="google-recaptcha-v2-checkbox"||a.provider==="google-recaptcha-v2-invisible",u=a.provider==="google-recaptcha-v3"||a.provider==="google-recaptcha-v2-invisible",d=a.provider==="cloudflare-turnstile",f=a.provider==="hcaptcha",h=a.provider==="captchafox";return b.jsxs(b.Fragment,{children:[l&&b.jsx(HU,{ref:e}),u&&b.jsx(FU,{localization:t}),d&&b.jsx(IO,{className:"mx-auto",ref:e,siteKey:a.siteKey,options:{theme:o,size:"flexible"}}),f&&b.jsx("div",{className:"mx-auto",children:b.jsx(r9,{ref:e,sitekey:a.siteKey,theme:o})}),h&&b.jsx("div",{className:"mx-auto",children:b.jsx(_O,{ref:e,sitekey:a.siteKey,theme:o})})]})}function w0({className:e,containerClassName:t,...n}){return b.jsx(PO,{"data-slot":"input-otp",containerClassName:de("flex items-center gap-2 has-disabled:opacity-50",t),className:de("disabled:cursor-not-allowed",e),...n})}function Is({className:e,...t}){return b.jsx("div",{"data-slot":"input-otp-group",className:de("flex items-center",e),...t})}function gn({index:e,className:t,...n}){const a=E.useContext(LO),{char:o,hasFakeCaret:l,isActive:u}=a?.slots[e]??{};return b.jsxs("div",{"data-slot":"input-otp-slot","data-active":u,className:de("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[o,l&&b.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:b.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function mg({...e}){return b.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:b.jsx(ON,{})})}function x0({otpSeparators:e=0}){return e===0?b.jsxs(Is,{children:[b.jsx(gn,{index:0}),b.jsx(gn,{index:1}),b.jsx(gn,{index:2}),b.jsx(gn,{index:3}),b.jsx(gn,{index:4}),b.jsx(gn,{index:5})]}):e===1?b.jsxs(b.Fragment,{children:[b.jsxs(Is,{children:[b.jsx(gn,{index:0}),b.jsx(gn,{index:1}),b.jsx(gn,{index:2})]}),b.jsx(mg,{}),b.jsxs(Is,{children:[b.jsx(gn,{index:3}),b.jsx(gn,{index:4}),b.jsx(gn,{index:5})]})]}):b.jsxs(b.Fragment,{children:[b.jsxs(Is,{children:[b.jsx(gn,{index:0}),b.jsx(gn,{index:1})]}),b.jsx(mg,{}),b.jsxs(Is,{children:[b.jsx(gn,{index:2}),b.jsx(gn,{index:3})]}),b.jsx(mg,{}),b.jsxs(Is,{children:[b.jsx(gn,{index:4}),b.jsx(gn,{index:5})]})]})}function lw(e){const[t,n]=E.useState();return t?b.jsx(qU,{...e,email:t}):b.jsx(GU,{...e,setEmail:n})}function GU({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o,setEmail:l}){const u=Xa(),{captchaRef:d,getCaptchaHeaders:f}=jc({localization:a}),{authClient:h,localization:g,toast:p,localizeErrors:y}=E.useContext(Qe);a={...g,...a};const _=En({email:Ke().email({message:`${a.EMAIL} ${a.IS_INVALID}`})}),S=_a({resolver:Ea(_),defaultValues:{email:""}});n=n||S.formState.isSubmitting,E.useEffect(()=>{o?.(S.formState.isSubmitting)},[S.formState.isSubmitting,o]);async function w({email:T}){const R={throw:!0,headers:await f("/email-otp/send-verification-otp")};try{await h.emailOtp.sendVerificationOtp({email:T,type:"sign-in",fetchOptions:R}),p({variant:"success",message:a.EMAIL_OTP_VERIFICATION_SENT}),l(T)}catch(A){p({variant:"error",message:Ut({error:A,localization:a,localizeErrors:y})})}}return b.jsx(wa,{...S,children:b.jsxs("form",{onSubmit:S.handleSubmit(w),noValidate:u,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:S.control,name:"email",render:({field:T})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...T})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Uc,{ref:d,localization:a,action:"/email-otp/send-verification-otp"}),b.jsx(Ot,{type:"submit",disabled:n,className:de("w-full",t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.EMAIL_OTP_SEND_ACTION})]})})}function qU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u,email:d}){const{authClient:f,localization:h,toast:g,localizeErrors:p}=E.useContext(Qe);a={...h,...a};const{onSuccess:y,isPending:_}=xa({redirectTo:l}),S=En({code:Ke().min(1,{message:`${a.EMAIL_OTP} ${a.IS_REQUIRED}`}).min(6,{message:`${a.EMAIL_OTP} ${a.IS_INVALID}`})}),w=_a({resolver:Ea(S),defaultValues:{code:""}});n=n||w.formState.isSubmitting||_,E.useEffect(()=>{u?.(w.formState.isSubmitting||_)},[w.formState.isSubmitting,_,u]);async function T({code:R}){try{await f.signIn.emailOtp({email:d,otp:R,fetchOptions:{throw:!0}}),await y()}catch(A){g({variant:"error",message:Ut({error:A,localization:a,localizeErrors:p})}),w.reset()}}return b.jsx(wa,{...w,children:b.jsxs("form",{onSubmit:w.handleSubmit(T),className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:w.control,name:"code",render:({field:R})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.EMAIL_OTP}),b.jsx(an,{children:b.jsx(w0,{...R,maxLength:6,onChange:A=>{R.onChange(A),A.length===6&&w.handleSubmit(T)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(x0,{otpSeparators:o})})}),b.jsx(fn,{className:t?.error})]})}),b.jsx("div",{className:"grid gap-4",children:b.jsxs(Ot,{type:"submit",disabled:n,className:de(t?.button,t?.primaryButton),children:[n&&b.jsx(_n,{className:"animate-spin"}),a.EMAIL_OTP_VERIFY_ACTION]})})]})})}function YU({onCancel:e,localization:t,className:n,classNames:a,otpSeparators:o,callbackURL:l,isSubmitting:u,redirectTo:d,setIsSubmitting:f}){const[h,g]=E.useState(!0),[p,y]=E.useState(30),{authClient:_,localization:S,toast:w,localizeErrors:T,navigate:R,basePath:A,viewPaths:C}=E.useContext(Qe);t={...S,...t};const O=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:M,isPending:L}=xa({redirectTo:d}),N=En({code:Ke().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),D=_a({resolver:Ea(N),defaultValues:{code:""}}),U=u||D.formState.isSubmitting||L;E.useEffect(()=>{f?.(D.formState.isSubmitting||L)},[D.formState.isSubmitting,L,f]),E.useEffect(()=>{if(p>0){const W=setTimeout(()=>y(p-1),1e3);return()=>clearTimeout(W)}else g(!1)},[p]);async function Z({code:W}){try{const j=await _.emailOtp.verifyEmail({email:O,otp:W,fetchOptions:{throw:!0}});"token"in j&&j.token?await M():(R(`${A}/${C.SIGN_IN}${window.location.search}`),w({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(j){w({variant:"error",message:Ut({error:j,localization:t,localizeErrors:T})}),D.reset()}}async function G(){if(!h){g(!0),y(30);try{await _.emailOtp.sendVerificationOtp({email:O,type:"email-verification",fetchOptions:{throw:!0}}),w({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(W){w({variant:"error",message:Ut({error:W,localization:t,localizeErrors:T})}),g(!1),y(0)}}}return O?b.jsx(wa,{...D,children:b.jsxs("form",{onSubmit:D.handleSubmit(Z),className:de("grid w-full gap-6",n,a?.base),children:[b.jsx(Gt,{control:D.control,name:"code",render:({field:W})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:a?.label,children:t.EMAIL_OTP}),b.jsx(an,{children:b.jsx(w0,{...W,maxLength:6,onChange:j=>{W.onChange(j),j.length===6&&D.handleSubmit(Z)()},containerClassName:a?.otpInputContainer,className:a?.otpInput,disabled:U,children:b.jsx(x0,{otpSeparators:o})})}),b.jsx(fn,{className:a?.error})]})}),b.jsxs("div",{className:"grid gap-4",children:[b.jsxs(Ot,{type:"submit",disabled:U,className:de(a?.button,a?.primaryButton),children:[U&&b.jsx(_n,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),b.jsx(Ot,{type:"button",variant:"outline",onClick:G,disabled:h||U,className:de("w-full",a?.button),children:h?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&b.jsx(Ot,{type:"button",variant:"ghost",onClick:e,disabled:U,className:"w-full",children:t.CANCEL})]})]})}):b.jsx("div",{className:de("grid w-full gap-6",n),children:b.jsxs("div",{className:"text-center",children:[b.jsx("h2",{className:"font-semibold text-destructive text-lg",children:"Invalid Request"}),b.jsx("p",{className:"text-muted-foreground text-sm",children:t.EMAIL_REQUIRED||"Email address is required"})]})})}function KU({className:e,classNames:t,isSubmitting:n,localization:a,setIsSubmitting:o}){const l=Xa(),{captchaRef:u,getCaptchaHeaders:d,resetCaptcha:f}=jc({localization:a}),{authClient:h,basePath:g,baseURL:p,localization:y,navigate:_,toast:S,viewPaths:w,localizeErrors:T}=E.useContext(Qe);a={...y,...a};const R=En({email:Ke().email({message:`${a.EMAIL} ${a.IS_INVALID}`}).min(1,{message:`${a.EMAIL} ${a.IS_REQUIRED}`})}),A=_a({resolver:Ea(R),defaultValues:{email:""}});n=n||A.formState.isSubmitting,E.useEffect(()=>{o?.(A.formState.isSubmitting)},[A.formState.isSubmitting,o]);async function C({email:O}){try{const M={throw:!0,headers:await d("/forget-password")};await h.requestPasswordReset({email:O,redirectTo:`${p}${g}/${w.RESET_PASSWORD}`,fetchOptions:M}),S({variant:"success",message:a.FORGOT_PASSWORD_EMAIL}),_(`${g}/${w.SIGN_IN}${window.location.search}`)}catch(M){S({variant:"error",message:Ut({error:M,localization:a,localizeErrors:T})}),f()}}return b.jsx(wa,{...A,children:b.jsxs("form",{onSubmit:A.handleSubmit(C),noValidate:l,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:A.control,name:"email",render:({field:O})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:n,...O})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Uc,{ref:u,localization:a,action:"/forget-password"}),b.jsx(Ot,{type:"submit",disabled:n,className:de("w-full",t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.FORGOT_PASSWORD_ACTION})]})})}function cw({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u}){const d=Xa(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=jc({localization:o}),{authClient:p,basePath:y,baseURL:_,persistClient:S,localization:w,redirectTo:T,viewPaths:R,toast:A,localizeErrors:C}=E.useContext(Qe);o={...w,...o};const O=E.useCallback(()=>l||Lo("redirectTo")||T,[l,T]),M=E.useCallback(()=>`${_}${n||(S?`${y}/${R.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,S,y,R,_,O]),L=En({email:Ke().email({message:`${o.EMAIL} ${o.IS_INVALID}`})}),N=_a({resolver:Ea(L),defaultValues:{email:""}});a=a||N.formState.isSubmitting,E.useEffect(()=>{u?.(N.formState.isSubmitting)},[N.formState.isSubmitting,u]);async function D({email:U}){try{const Z={throw:!0,headers:await h("/sign-in/magic-link")};await p.signIn.magicLink({email:U,callbackURL:M(),fetchOptions:Z}),A({variant:"success",message:o.MAGIC_LINK_EMAIL}),N.reset()}catch(Z){A({variant:"error",message:Ut({error:Z,localization:o,localizeErrors:C})}),g()}}return b.jsx(wa,{...N,children:b.jsxs("form",{onSubmit:N.handleSubmit(D),noValidate:d,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:N.control,name:"email",render:({field:U})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...U})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Uc,{ref:f,localization:o,action:"/sign-in/magic-link"}),b.jsx(Ot,{type:"submit",disabled:a,className:de("w-full",t?.button,t?.primaryButton),children:a?b.jsx(_n,{className:"animate-spin"}):o.MAGIC_LINK_ACTION})]})})}function WU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l}){const{authClient:u,localization:d,toast:f,localizeErrors:h}=E.useContext(Qe);a={...d,...a};const{onSuccess:g,isPending:p}=xa({redirectTo:o}),y=En({code:Ke().min(1,{message:a.BACKUP_CODE_REQUIRED})}),_=_a({resolver:Ea(y),defaultValues:{code:""}});n=n||_.formState.isSubmitting||p,E.useEffect(()=>{l?.(_.formState.isSubmitting||p)},[_.formState.isSubmitting,p,l]);async function S({code:w}){try{await u.twoFactor.verifyBackupCode({code:w,fetchOptions:{throw:!0}}),await g()}catch(T){f({variant:"error",message:Ut({error:T,localization:a,localizeErrors:h})}),_.reset()}}return b.jsx(wa,{..._,children:b.jsxs("form",{onSubmit:_.handleSubmit(S),className:de("grid gap-6",e,t?.base),children:[b.jsx(Gt,{control:_.control,name:"code",render:({field:w})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:a.BACKUP_CODE}),b.jsx(an,{children:b.jsx(Zr,{placeholder:a.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...w})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Ot,{type:"submit",disabled:n,className:de(t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.RECOVER_ACCOUNT_ACTION})]})})}function ZU({className:e,classNames:t,localization:n,passwordValidation:a}){const o=E.useRef(!1),{authClient:l,basePath:u,credentials:d,localization:f,viewPaths:h,navigate:g,toast:p,localizeErrors:y}=E.useContext(Qe),_=d?.confirmPassword,S=d?.passwordValidation;n={...f,...n},a={...S,...a};const w=En({newPassword:vc(a,{PASSWORD_REQUIRED:n.NEW_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}),confirmPassword:_?vc(a,{PASSWORD_REQUIRED:n.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}):Ke().optional()}).refine(C=>!_||C.newPassword===C.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),T=_a({resolver:Ea(w),defaultValues:{newPassword:"",confirmPassword:""}}),R=T.formState.isSubmitting;E.useEffect(()=>{if(o.current)return;o.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="INVALID_TOKEN")&&(g(`${u}/${h.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[u,g,p,h,n]);async function A({newPassword:C}){try{const M=new URLSearchParams(window.location.search).get("token");await l.resetPassword({newPassword:C,token:M,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),g(`${u}/${h.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:Ut({error:O,localization:n,localizeErrors:y})}),T.reset()}}return b.jsx(wa,{...T,children:b.jsxs("form",{onSubmit:T.handleSubmit(A),className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:T.control,name:"newPassword",render:({field:C})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:n.NEW_PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(fn,{className:t?.error})]})}),_&&b.jsx(Gt,{control:T.control,name:"confirmPassword",render:({field:C})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:n.CONFIRM_PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:R,...C})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Ot,{type:"submit",disabled:R,className:de("w-full",t?.button,t?.primaryButton),children:R?b.jsx(_n,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function QU({className:e,classNames:t,isSubmitting:n,localization:a,redirectTo:o,setIsSubmitting:l,passwordValidation:u}){const d=Xa(),{captchaRef:f,getCaptchaHeaders:h,resetCaptcha:g}=jc({localization:a}),{authClient:p,basePath:y,credentials:_,localization:S,viewPaths:w,navigate:T,toast:R,Link:A,localizeErrors:C,emailVerification:O}=E.useContext(Qe),M=_?.rememberMe,L=_?.username,N=_?.passwordValidation;a={...S,...a},u={...N,...u};const{onSuccess:D,isPending:U}=xa({redirectTo:o}),Z=En({email:L?Ke().min(1,{message:`${a.USERNAME} ${a.IS_REQUIRED}`}):Ke().email({message:`${a.EMAIL} ${a.IS_INVALID}`}),password:vc(u,a),rememberMe:Cv().optional()}),G=_a({resolver:Ea(Z),defaultValues:{email:"",password:"",rememberMe:!M}});n=n||G.formState.isSubmitting||U,E.useEffect(()=>{l?.(G.formState.isSubmitting||U)},[G.formState.isSubmitting,U,l]);async function W({email:j,password:ne,rememberMe:ie}){var P;try{let V={};if(L&&!UM(j)){const $={throw:!0,headers:await h("/sign-in/username")};V=await p.signIn.username({username:j,password:ne,rememberMe:ie,fetchOptions:$})}else{const $={throw:!0,headers:await h("/sign-in/email")};V=await p.signIn.email({email:j,password:ne,rememberMe:ie,fetchOptions:$})}V.twoFactorRedirect?T(`${y}/${w.TWO_FACTOR}${window.location.search}`):await D()}catch(V){G.resetField("password"),g(),R({variant:"error",message:Ut({error:V,localization:a,localizeErrors:C})}),O?.otp&&((P=V?.error)==null?void 0:P.code)==="EMAIL_NOT_VERIFIED"&&T(`${y}/${w.EMAIL_VERIFICATION}?email=${encodeURIComponent(j)}`)}}return b.jsx(wa,{...G,children:b.jsxs("form",{onSubmit:G.handleSubmit(W),noValidate:d,className:de("grid w-full gap-6",e,t?.base),children:[b.jsx(Gt,{control:G.control,name:"email",render:({field:j})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:L?a.USERNAME:a.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:L?"username":"email",className:t?.input,type:L?"text":"email",placeholder:L?a.SIGN_IN_USERNAME_PLACEHOLDER:a.EMAIL_PLACEHOLDER,disabled:n,...j})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:G.control,name:"password",render:({field:j})=>b.jsxs(qt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Yt,{className:t?.label,children:a.PASSWORD}),_?.forgotPassword&&b.jsx(A,{className:de("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${w.FORGOT_PASSWORD}${d?window.location.search:""}`,children:a.FORGOT_PASSWORD_LINK})]}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"current-password",className:t?.input,placeholder:a.PASSWORD_PLACEHOLDER,disabled:n,...j})}),b.jsx(fn,{className:t?.error})]})}),M&&b.jsx(Gt,{control:G.control,name:"rememberMe",render:({field:j})=>b.jsxs(qt,{className:"flex",children:[b.jsx(an,{children:b.jsx(S0,{checked:j.value,onCheckedChange:j.onChange,disabled:n})}),b.jsx(Yt,{children:a.REMEMBER_ME})]})}),b.jsx(Uc,{ref:f,localization:a,action:"/sign-in/email"}),b.jsx(Ot,{type:"submit",disabled:n,className:de("w-full",t?.button,t?.primaryButton),children:n?b.jsx(_n,{className:"animate-spin"}):a.SIGN_IN_ACTION})]})})}function XU({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,redirectTo:l,setIsSubmitting:u,passwordValidation:d}){const f=Xa(),{captchaRef:h,getCaptchaHeaders:g,resetCaptcha:p}=jc({localization:o}),{additionalFields:y,authClient:_,basePath:S,baseURL:w,credentials:T,localization:R,nameRequired:A,persistClient:C,redirectTo:O,signUp:M,viewPaths:L,navigate:N,toast:D,avatar:U,localizeErrors:Z,emailVerification:G}=E.useContext(Qe),W=T?.confirmPassword,j=T?.username,ne=T?.usernameRequired??!0,ie=T?.passwordValidation,P=M?.fields;o={...R,...o},d={...ie,...d};const V=E.useRef(null),[$,re]=E.useState(null),[ve,k]=E.useState(!1),Q=E.useCallback(()=>l||Lo("redirectTo")||O,[l,O]),ee=E.useCallback(()=>`${w}${n||(C?`${S}/${L.CALLBACK}?redirectTo=${encodeURIComponent(Q())}`:Q())}`,[n,C,S,L,w,Q]),{onSuccess:oe,isPending:pe}=xa({redirectTo:l}),be={email:Ke().email({message:`${o.EMAIL} ${o.IS_INVALID}`}),password:vc(d,o),name:P?.includes("name")&&A?Ke().min(1,{message:`${o.NAME} ${o.IS_REQUIRED}`}):Ke().optional(),image:Ke().optional(),username:j&&ne?Ke().min(1,{message:`${o.USERNAME} ${o.IS_REQUIRED}`}):Ke().optional(),confirmPassword:W?vc(d,{PASSWORD_REQUIRED:o.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:o.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:o.PASSWORD_TOO_LONG,INVALID_PASSWORD:o.INVALID_PASSWORD}):Ke().optional()},ye={};if(P)for(const me of P){if(me==="name"||me==="image")continue;const Re=y?.[me];if(!Re)continue;let Ue;Re.type==="number"?Ue=Re.required?jM(it=>it?Number(it):void 0,xx({message:`${Re.label} ${o.IS_INVALID}`})):Dm.number({message:`${Re.label} ${o.IS_INVALID}`}).optional():Re.type==="boolean"?Ue=Re.required?Dm.boolean({message:`${Re.label} ${o.IS_INVALID}`}).refine(it=>it===!0,{message:`${Re.label} ${o.IS_REQUIRED}`}):Dm.boolean({message:`${Re.label} ${o.IS_INVALID}`}).optional():Ue=Re.required?Ke().min(1,`${Re.label} ${o.IS_REQUIRED}`):Ke().optional(),ye[me]=Ue}const Se=En(be).extend(ye).refine(me=>W?me.password===me.confirmPassword:!0,{message:o.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),Pe={email:"",password:"",...W&&{confirmPassword:""},...P?.includes("name")?{name:""}:{},...j?{username:""}:{},...P?.includes("image")&&U?{image:""}:{}};if(P)for(const me of P){if(me==="name"||me==="image")continue;const Re=y?.[me];Re&&(Pe[me]=Re.type==="boolean"?!1:"")}const ke=_a({resolver:Ea(Se),defaultValues:Pe});a=a||ke.formState.isSubmitting||pe,E.useEffect(()=>{u?.(ke.formState.isSubmitting||pe)},[ke.formState.isSubmitting,pe,u]);const Ee=async me=>{if(U){k(!0);try{const Re=await lU(me,crypto.randomUUID(),U.size,U.extension);let Ue;U.upload?Ue=await U.upload(Re):Ue=await uU(Re),Ue?(re(Ue),ke.setValue("image",Ue)):(re(null),ke.setValue("image",""))}catch(Re){console.error(Re),D({variant:"error",message:Ut({error:Re,localization:o,localizeErrors:Z})})}k(!1)}},ze=()=>{re(null),ke.setValue("image","")},Pt=()=>{var me;return(me=V.current)==null?void 0:me.click()};async function ge({email:me,password:Re,name:Ue,username:it,confirmPassword:He,image:tt,...B}){try{for(const[he,fe]of Object.entries(B)){const xe=y?.[he];if(xe?.validate&&typeof fe=="string"&&!await xe.validate(fe)){ke.setError(he,{message:`${xe.label} ${o.IS_INVALID}`});return}}const q={throw:!0,headers:await g("/sign-up/email")},Y={};it!==void 0&&(!ne&&(it===null||it===""||typeof it=="string"&&it.trim()==="")||(Y.username=it)),tt!==void 0&&(Y.image=tt);const ce=await _.signUp.email({email:me,password:Re,name:Ue||"",...Y,...B,callbackURL:ee(),fetchOptions:q});"token"in ce&&ce.token?await oe():G?.otp?N(`${S}/${L.EMAIL_VERIFICATION}?email=${encodeURIComponent(me)}`):(N(`${S}/${L.SIGN_IN}${window.location.search}`),D({variant:"success",message:o.SIGN_UP_EMAIL}))}catch(q){D({variant:"error",message:Ut({error:q,localization:o,localizeErrors:Z})}),ke.resetField("password"),ke.resetField("confirmPassword"),p()}}return b.jsx(wa,{...ke,children:b.jsxs("form",{onSubmit:ke.handleSubmit(ge),noValidate:f,className:de("grid w-full gap-6",e,t?.base),children:[P?.includes("image")&&U&&b.jsxs(b.Fragment,{children:[b.jsx("input",{ref:V,accept:"image/*",disabled:ve,hidden:!0,type:"file",onChange:me=>{var Re;const Ue=(Re=me.target.files)==null?void 0:Re.item(0);Ue&&Ee(Ue),me.target.value=""}}),b.jsx(Gt,{control:ke.control,name:"image",render:()=>b.jsxs(qt,{children:[b.jsx(Yt,{children:o.AVATAR}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsxs(VO,{children:[b.jsx(FO,{asChild:!0,children:b.jsx(Ot,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:b.jsx(QO,{isPending:ve,className:"size-16",user:$?{name:ke.watch("name"),email:ke.watch("email"),image:$}:null,localization:o})})}),b.jsxs(HO,{align:"start",onCloseAutoFocus:me=>me.preventDefault(),children:[b.jsxs(Ef,{onClick:Pt,disabled:ve,children:[b.jsx(hN,{}),o.UPLOAD_AVATAR]}),$&&b.jsxs(Ef,{onClick:ze,disabled:ve,variant:"destructive",children:[b.jsx(MN,{}),o.DELETE_AVATAR]})]})]}),b.jsxs(Ot,{type:"button",variant:"outline",onClick:Pt,disabled:ve,children:[ve&&b.jsx(_n,{className:"animate-spin"}),o.UPLOAD]})]}),b.jsx(fn,{})]})})]}),P?.includes("name")&&b.jsx(Gt,{control:ke.control,name:"name",render:({field:me})=>b.jsxs(qt,{children:[b.jsxs(Yt,{className:t?.label,children:[o.NAME,!A&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:"name",className:t?.input,placeholder:o.NAME_PLACEHOLDER,disabled:a,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),j&&b.jsx(Gt,{control:ke.control,name:"username",render:({field:me})=>b.jsxs(qt,{children:[b.jsxs(Yt,{className:t?.label,children:[o.USERNAME,!ne&&b.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:"username",className:t?.input,placeholder:o.USERNAME_PLACEHOLDER,disabled:a,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:ke.control,name:"email",render:({field:me})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.EMAIL}),b.jsx(an,{children:b.jsx(Zr,{autoComplete:"email",className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:a,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:ke.control,name:"password",render:({field:me})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),W&&b.jsx(Gt,{control:ke.control,name:"confirmPassword",render:({field:me})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:o.CONFIRM_PASSWORD}),b.jsx(an,{children:b.jsx(xc,{autoComplete:"new-password",className:t?.input,placeholder:o.CONFIRM_PASSWORD_PLACEHOLDER,disabled:a,enableToggle:!0,...me,value:me.value})}),b.jsx(fn,{className:t?.error})]})}),P?.filter(me=>me!=="name"&&me!=="image").map(me=>{const Re=y?.[me];return Re?Re.type==="boolean"?b.jsx(Gt,{control:ke.control,name:me,render:({field:Ue})=>b.jsxs(qt,{className:"flex",children:[b.jsx(an,{children:b.jsx(S0,{checked:Ue.value,onCheckedChange:Ue.onChange,disabled:a})}),b.jsx(Yt,{className:t?.label,children:Re.label}),b.jsx(fn,{className:t?.error})]})},me):b.jsx(Gt,{control:ke.control,name:me,render:({field:Ue})=>b.jsxs(qt,{children:[b.jsx(Yt,{className:t?.label,children:Re.label}),b.jsx(an,{children:Re.type==="number"?b.jsx(Zr,{className:t?.input,type:"number",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:a,...Ue,value:Ue.value}):Re.multiline?b.jsx(mU,{className:t?.input,placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:a,...Ue,value:Ue.value}):b.jsx(Zr,{className:t?.input,type:"text",placeholder:Re.placeholder||(typeof Re.label=="string"?Re.label:""),disabled:a,...Ue,value:Ue.value})}),b.jsx(fn,{className:t?.error})]})},me):(console.error(`Additional field ${me} not found`),null)}),b.jsx(Uc,{ref:h,localization:o,action:"/sign-up/email"}),b.jsx(Ot,{type:"submit",disabled:a,className:de("w-full",t?.button,t?.primaryButton),children:a?b.jsx(_n,{className:"animate-spin"}):o.SIGN_UP_ACTION})]})})}function JU({className:e,classNames:t,isSubmitting:n,localization:a,otpSeparators:o=0,redirectTo:l,setIsSubmitting:u}){var d;const f=Xa(),h=f?Lo("totpURI"):null,g=E.useRef(!1),{authClient:p,basePath:y,hooks:{useSession:_},localization:S,twoFactor:w,viewPaths:T,toast:R,Link:A,localizeErrors:C}=E.useContext(Qe);a={...S,...a};const{onSuccess:O,isPending:M}=xa({redirectTo:l}),{data:L}=_(),N=(d=L?.user)==null?void 0:d.twoFactorEnabled,[D,U]=E.useState(w?.length===1?w[0]:null),[Z,G]=E.useState(!1),[W,j]=E.useState(0),ne=En({code:Ke().min(1,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_REQUIRED}`}).min(6,{message:`${a.ONE_TIME_PASSWORD} ${a.IS_INVALID}`}),trustDevice:Cv().optional()}),ie=_a({resolver:Ea(ne),defaultValues:{code:""}});n=n||ie.formState.isSubmitting||M,E.useEffect(()=>{u?.(ie.formState.isSubmitting||M)},[ie.formState.isSubmitting,M,u]),E.useEffect(()=>{D==="otp"&&W<=0&&!g.current&&(g.current=!0,P())},[D]),E.useEffect(()=>{if(W<=0)return;const $=setTimeout(()=>{j(re=>re-1)},1e3);return()=>clearTimeout($)},[W]);const P=async()=>{if(!(Z||W>0)){try{G(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),j(60)}catch($){R({variant:"error",message:Ut({error:$,localization:a,localizeErrors:C})}),$.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}g.current=!1,G(!1)}};async function V({code:$,trustDevice:re}){try{await(D==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:$,trustDevice:re,fetchOptions:{throw:!0}}),await O(),L&&!N&&R({variant:"success",message:a?.TWO_FACTOR_ENABLED})}catch(ve){R({variant:"error",message:Ut({error:ve,localization:a,localizeErrors:C})}),ie.reset()}}return b.jsx(wa,{...ie,children:b.jsxs("form",{onSubmit:ie.handleSubmit(V),className:de("grid w-full gap-6",e,t?.base),children:[w?.includes("totp")&&h&&D==="totp"&&b.jsxs("div",{className:"space-y-3",children:[b.jsx($O,{className:t?.label,children:a.TWO_FACTOR_TOTP_LABEL}),b.jsx(Q9,{className:de("border shadow-xs",t?.qrCode),value:h})]}),D!==null&&b.jsxs(b.Fragment,{children:[b.jsx(Gt,{control:ie.control,name:"code",render:({field:$})=>b.jsxs(qt,{children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Yt,{className:t?.label,children:a.ONE_TIME_PASSWORD}),b.jsx(A,{className:de("text-sm hover:underline",t?.forgotPasswordLink),href:`${y}/${T.RECOVER_ACCOUNT}${f?window.location.search:""}`,children:a.FORGOT_AUTHENTICATOR})]}),b.jsx(an,{children:b.jsx(w0,{...$,maxLength:6,onChange:re=>{$.onChange(re),re.length===6&&ie.handleSubmit(V)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:b.jsx(x0,{otpSeparators:o})})}),b.jsx(fn,{className:t?.error})]})}),b.jsx(Gt,{control:ie.control,name:"trustDevice",render:({field:$})=>b.jsxs(qt,{className:"flex",children:[b.jsx(an,{children:b.jsx(S0,{checked:$.value,onCheckedChange:$.onChange,disabled:n,className:t?.checkbox})}),b.jsx(Yt,{className:t?.label,children:a.TRUST_DEVICE})]})})]}),b.jsxs("div",{className:"grid gap-4",children:[D!==null&&b.jsxs(Ot,{type:"submit",disabled:n,className:de(t?.button,t?.primaryButton),children:[n&&b.jsx(_n,{className:"animate-spin"}),a.TWO_FACTOR_ACTION]}),D==="otp"&&w?.includes("otp")&&b.jsxs(Ot,{type:"button",variant:"outline",onClick:P,disabled:W>0||Z||n,className:de(t?.button,t?.outlineButton),children:[Z?b.jsx(_n,{className:"animate-spin"}):b.jsx(UE,{className:t?.icon}),a.RESEND_CODE,W>0&&` (${W})`]}),D!=="otp"&&w?.includes("otp")&&b.jsxs(Ot,{type:"button",variant:"secondary",className:de(t?.button,t?.secondaryButton),onClick:()=>U("otp"),disabled:n,children:[b.jsx(UE,{className:t?.icon}),a.SEND_VERIFICATION_CODE]}),D!=="totp"&&w?.includes("totp")&&b.jsxs(Ot,{type:"button",variant:"secondary",className:de(t?.button,t?.secondaryButton),onClick:()=>U("totp"),disabled:n,children:[b.jsx(AN,{className:t?.icon}),a.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function JO({redirectTo:e}){const t=E.useRef(!1),{authClient:n,basePath:a,viewPaths:o}=E.useContext(Qe),{onSuccess:l}=xa({redirectTo:e||`${a}/${o.SIGN_IN}`});return E.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(l))},[n,l]),b.jsx(_n,{className:"animate-spin"})}function eB({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,pathname:l,redirectTo:u,view:d,otpSeparators:f=0,setIsSubmitting:h}){const{basePath:g,credentials:p,localization:y,magicLink:_,emailOTP:S,signUp:w,twoFactor:T,viewPaths:R,replace:A}=E.useContext(Qe),C=!!w;if(o={...y,...o},E.useEffect(()=>{l&&!Lg(R,l)&&(console.error(`Invalid auth view: ${l}`),A(`${g}/${R.SIGN_IN}${window.location.search}`))},[l,R,g,A]),d=d||Lg(R,l)||"SIGN_IN",E.useEffect(()=>{let O=!1;d==="MAGIC_LINK"&&(!_||!p&&!S)&&(O=!0),d==="EMAIL_OTP"&&(!S||!p&&!_)&&(O=!0),d==="SIGN_UP"&&!C&&(O=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&(O=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(d)&&!T&&(O=!0),O&&A(`${g}/${R.SIGN_IN}${window.location.search}`)},[g,d,R,p,A,S,C,_,T]),d==="SIGN_OUT")return b.jsx(JO,{redirectTo:u});if(d==="CALLBACK")return b.jsx(XO,{redirectTo:u});if(d==="SIGN_IN")return p?b.jsx(QU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):_?b.jsx(cw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):S?b.jsx(lw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h}):null;if(d==="TWO_FACTOR")return b.jsx(JU,{className:e,classNames:t,localization:o,otpSeparators:f,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="RECOVER_ACCOUNT")return b.jsx(WU,{className:e,classNames:t,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="MAGIC_LINK")return b.jsx(cw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="EMAIL_OTP")return b.jsx(lw,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="EMAIL_VERIFICATION")return b.jsx(YU,{className:e,classNames:t,callbackURL:n,localization:o,otpSeparators:f,redirectTo:u,isSubmitting:a,setIsSubmitting:h});if(d==="FORGOT_PASSWORD")return b.jsx(KU,{className:e,classNames:t,localization:o,isSubmitting:a,setIsSubmitting:h});if(d==="RESET_PASSWORD")return b.jsx(ZU,{className:e,classNames:t,localization:o});if(d==="SIGN_UP")return C&&b.jsx(XU,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:u,isSubmitting:a,setIsSubmitting:h})}function tB({className:e,classNames:t,localization:n}){const{localization:a,redirectTo:o,replace:l,toast:u}=E.useContext(Qe),d=E.useMemo(()=>({...a,...n}),[a,n]),{data:f}=nU(),[h,g]=E.useState(null);return E.useEffect(()=>{const p=Lo("invitationId");if(!p){u({variant:"error",message:d.INVITATION_NOT_FOUND}),l(o);return}g(p)},[d.INVITATION_NOT_FOUND,u,l,o]),!f||!h?b.jsx(eT,{className:e,classNames:t}):b.jsx(nB,{className:e,classNames:t,localization:d,invitationId:h})}function nB({className:e,classNames:t,localization:n,invitationId:a}){var o;const{authClient:l,hooks:{useInvitation:u},localization:d,organization:f,redirectTo:h,replace:g,toast:p,localizeErrors:y}=E.useContext(Qe),_=E.useMemo(()=>({...d,...n}),[d,n]),[S,w]=E.useState(!1),[T,R]=E.useState(!1),A=S||T,{data:C,isPending:O}=u({query:{id:a}}),M=E.useCallback(()=>Lo("redirectTo")||h,[h]);E.useEffect(()=>{if(!(O||!a)){if(!C){p({variant:"error",message:_.INVITATION_NOT_FOUND}),g(h);return}(C.status!=="pending"||new Date(C.expiresAt)<new Date)&&(p({variant:"error",message:new Date(C.expiresAt)<new Date?_.INVITATION_EXPIRED:_.INVITATION_NOT_FOUND}),g(h))}},[C,O,a,_,p,g,h]);const L=async()=>{R(!0);try{await l.organization.acceptInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_ACCEPTED||"Invitation accepted"}),g(M())}catch(G){p({variant:"error",message:Ut({error:G,localization:_,localizeErrors:y})}),R(!1)}},N=async()=>{w(!0);try{await l.organization.rejectInvitation({invitationId:a,fetchOptions:{throw:!0}}),p({variant:"success",message:_.INVITATION_REJECTED}),g(h)}catch(G){p({variant:"error",message:Ut({error:G,localization:_,localizeErrors:y})}),w(!1)}},Z=((o=[...[{role:"owner",label:_.OWNER},{role:"admin",label:_.ADMIN},{role:"member",label:_.MEMBER}],...f?.customRoles||[]].find(G=>G.role===C?.role))==null?void 0:o.label)||C?.role;return C?b.jsxs(No,{className:de("w-full max-w-sm",e,t?.base),children:[b.jsxs($f,{className:de("justify-items-center text-center",t?.header),children:[b.jsx(_0,{className:de("text-lg md:text-xl",t?.title),children:_.ACCEPT_INVITATION}),b.jsx(Gf,{className:de("text-xs md:text-sm",t?.description),children:_.ACCEPT_INVITATION_DESCRIPTION})]}),b.jsxs(qf,{className:de("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(No,{className:de("flex-row items-center p-4"),children:[b.jsx(ZO,{organization:{id:C.organizationId,name:C.organizationName,slug:C.organizationSlug,logo:C.organizationLogo,createdAt:new Date},localization:_}),b.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:Z})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsxs(Ot,{variant:"outline",className:de(t?.button,t?.outlineButton),onClick:N,disabled:A,children:[S?b.jsx(_n,{className:"animate-spin"}):b.jsx(Mx,{}),_.REJECT]}),b.jsxs(Ot,{className:de(t?.button,t?.primaryButton),onClick:L,disabled:A,children:[T?b.jsx(_n,{className:"animate-spin"}):b.jsx(Dv,{}),_.ACCEPT]})]})]})]}):b.jsx(eT,{className:e,classNames:t})}var eT=({className:e,classNames:t,localization:n})=>b.jsxs(No,{className:de("w-full max-w-sm",e,t?.base),children:[b.jsxs($f,{className:de("justify-items-center",t?.header),children:[b.jsx(vr,{className:de("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),b.jsx(vr,{className:de("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),b.jsxs(qf,{className:de("flex flex-col gap-6 truncate",t?.content),children:[b.jsxs(No,{className:de("flex-row items-center p-4"),children:[b.jsx(ZO,{isPending:!0,localization:n}),b.jsx(vr,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b.jsx(vr,{className:"h-9 w-full"}),b.jsx(vr,{className:"h-9 w-full"})]})]})]});function uw({className:e,orientation:t="horizontal",decorative:n=!0,...a}){return b.jsx(tU,{"data-slot":"separator",decorative:n,orientation:t,className:de("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...a})}function rB({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g}=E.useContext(Qe);return b.jsxs(Ot,{className:de("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="EMAIL_OTP"?f.SIGN_IN:f.EMAIL_OTP}${window.location.search}`),children:[a==="EMAIL_OTP"?b.jsx(Cx,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Ix,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function aB({classNames:e,isSubmitting:t,localization:n,view:a}){var o,l,u,d;const{viewPaths:f,navigate:h,basePath:g,credentials:p}=E.useContext(Qe);return b.jsxs(Ot,{className:de("w-full",(o=e?.form)==null?void 0:o.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>h(`${g}/${a==="MAGIC_LINK"||!p?f.SIGN_IN:f.MAGIC_LINK}${window.location.search}`),children:[a==="MAGIC_LINK"?b.jsx(Cx,{className:(u=e?.form)==null?void 0:u.icon}):b.jsx(Ix,{className:(d=e?.form)==null?void 0:d.icon}),n.SIGN_IN_WITH," ",a==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function iB({localization:e,redirectTo:t}){const{authClient:n,localization:a,toast:o,localizeErrors:l}=E.useContext(Qe),u=E.useRef(!1);e=E.useMemo(()=>({...a,...e}),[a,e]);const{onSuccess:d}=xa({redirectTo:t});return E.useEffect(()=>{if(!u.current){u.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:d}})}catch(f){o({variant:"error",message:Ut({error:f,localization:e,localizeErrors:l})})}}},[n,e,l,d,o]),null}function oB({classNames:e,isSubmitting:t,localization:n,redirectTo:a,setIsSubmitting:o}){var l,u;const{authClient:d,localization:f,toast:h,localizeErrors:g}=E.useContext(Qe);n={...f,...n};const{onSuccess:p}=xa({redirectTo:a}),y=async()=>{o?.(!0);try{const _=await d.signIn.passkey({fetchOptions:{throw:!0}});_?.error?(h({variant:"error",message:Ut({error:_.error,localization:n,localizeErrors:g})}),o?.(!1)):p()}catch(_){h({variant:"error",message:Ut({error:_,localization:n,localizeErrors:g})}),o?.(!1)}};return b.jsxs(Ot,{className:de("w-full",(l=e?.form)==null?void 0:l.button,(u=e?.form)==null?void 0:u.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:y,children:[b.jsx(EN,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function dw({className:e,classNames:t,callbackURL:n,isSubmitting:a,localization:o,other:l,provider:u,redirectTo:d,socialLayout:f,setIsSubmitting:h}){var g,p,y,_;const{authClient:S,basePath:w,baseURL:T,persistClient:R,redirectTo:A,viewPaths:C,social:O,genericOAuth:M,toast:L,localizeErrors:N}=E.useContext(Qe),D=E.useCallback(()=>d||Lo("redirectTo")||A,[d,A]),U=E.useCallback(()=>`${T}${n||(R?`${w}/${C.CALLBACK}?redirectTo=${encodeURIComponent(D())}`:D())}`,[n,R,w,C,T,D]),Z=async()=>{h(!0);try{if(l){const G={providerId:u.provider,callbackURL:U(),fetchOptions:{throw:!0}};M?.signIn?(await M.signIn(G),setTimeout(()=>{h(!1)},1e4)):await S.signIn.oauth2(G)}else{const G={provider:u.provider,callbackURL:U(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(G),setTimeout(()=>{h(!1)},1e4)):await S.signIn.social(G)}}catch(G){L({variant:"error",message:Ut({error:G,localization:o,localizeErrors:N})}),h(!1)}};return b.jsxs(Ot,{className:de(f==="vertical"?"w-full":"grow",e,(g=t?.form)==null?void 0:g.button,(p=t?.form)==null?void 0:p.outlineButton,(y=t?.form)==null?void 0:y.providerButton),disabled:a,variant:"outline",onClick:Z,children:[u.icon&&b.jsx(u.icon,{className:(_=t?.form)==null?void 0:_.icon}),f==="grid"&&u.name,f==="vertical"&&`${o.SIGN_IN_WITH} ${u.name}`]})}function Pz({className:e,classNames:t,callbackURL:n,cardHeader:a,cardFooter:o,localization:l,path:u,pathname:d,redirectTo:f,socialLayout:h="auto",view:g,otpSeparators:p=0}){var y,_,S,w,T,R;const A=Xa(),{basePath:C,credentials:O,localization:M,magicLink:L,emailOTP:N,oneTap:D,passkey:U,signUp:Z,social:G,genericOAuth:W,viewPaths:j,Link:ne}=E.useContext(Qe);l={...M,...l};let ie=h;ie==="auto"&&(ie=O&&G?.providers&&G.providers.length>2?"horizontal":"vertical");const P=u??d?.split("/").pop(),V=g||Lg(j,P)||"SIGN_IN",[$,re]=E.useState(!1);if(E.useEffect(()=>{const k=()=>re(!1);return window.addEventListener("pagehide",k),()=>{re(!1),window.removeEventListener("pagehide",k)}},[]),V==="CALLBACK")return b.jsx(XO,{redirectTo:f});if(V==="SIGN_OUT")return b.jsx(JO,{redirectTo:f});if(V==="ACCEPT_INVITATION")return b.jsx(tB,{className:e,classNames:t});const ve=!O&&!L&&!N?l.DISABLED_CREDENTIALS_DESCRIPTION:l[`${V}_DESCRIPTION`];return b.jsxs(No,{className:de("w-full max-w-sm",e,t?.base),children:[b.jsx($f,{className:t?.header,children:a||b.jsxs(b.Fragment,{children:[b.jsx(_0,{className:de("text-lg md:text-xl",t?.title),children:l[V]}),ve&&b.jsx(Gf,{className:de("text-xs md:text-sm",t?.description),children:ve})]})}),b.jsxs(qf,{className:de("grid gap-6",t?.content),children:[D&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(V)&&b.jsx(iB,{localization:l,redirectTo:f}),(O||L||N)&&b.jsxs("div",{className:"grid gap-4",children:[b.jsx(eB,{classNames:t?.form,callbackURL:n,isSubmitting:$,localization:l,otpSeparators:p,view:V,redirectTo:f,setIsSubmitting:re}),L&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(V)||N&&V==="EMAIL_OTP")&&b.jsx(aB,{classNames:t,localization:l,view:V,isSubmitting:$}),N&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(V)||L&&["SIGN_IN","MAGIC_LINK"].includes(V))&&b.jsx(rB,{classNames:t,localization:l,view:V,isSubmitting:$})]}),V!=="RESET_PASSWORD"&&V!=="EMAIL_VERIFICATION"&&(((y=G?.providers)==null?void 0:y.length)||((_=W?.providers)==null?void 0:_.length)||V==="SIGN_IN"&&U)&&b.jsxs(b.Fragment,{children:[(O||L||N)&&b.jsxs("div",{className:de("flex items-center gap-2",t?.continueWith),children:[b.jsx(uw,{className:de("!w-auto grow",t?.separator)}),b.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:l.OR_CONTINUE_WITH}),b.jsx(uw,{className:de("!w-auto grow",t?.separator)})]}),b.jsxs("div",{className:"grid gap-4",children:[(((S=G?.providers)==null?void 0:S.length)||((w=W?.providers)==null?void 0:w.length))&&b.jsxs("div",{className:de("flex w-full items-center justify-between gap-4",ie==="horizontal"&&"flex-wrap",ie==="vertical"&&"flex-col",ie==="grid"&&"grid grid-cols-2"),children:[(T=G?.providers)==null?void 0:T.map(k=>{const Q=BU.find(ee=>ee.provider===k);return Q?b.jsx(dw,{classNames:t,callbackURL:n,isSubmitting:$,localization:l,provider:Q,redirectTo:f,setIsSubmitting:re,socialLayout:ie},k):null}),(R=W?.providers)==null?void 0:R.map(k=>b.jsx(dw,{classNames:t,callbackURL:n,isSubmitting:$,localization:l,provider:k,redirectTo:f,setIsSubmitting:re,socialLayout:ie,other:!0},k.provider))]}),U&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(V)&&b.jsx(oB,{classNames:t,isSubmitting:$,localization:l,redirectTo:f,setIsSubmitting:re})]})]})]}),o&&b.jsx(lv,{className:t?.footer,children:o}),O&&Z&&b.jsxs(lv,{className:de("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[V==="SIGN_IN"||V==="MAGIC_LINK"||V==="EMAIL_OTP"?l.DONT_HAVE_AN_ACCOUNT:V==="SIGN_UP"?l.ALREADY_HAVE_AN_ACCOUNT:b.jsx(lN,{className:"size-3"}),V==="SIGN_IN"||V==="MAGIC_LINK"||V==="EMAIL_OTP"||V==="SIGN_UP"?b.jsx(ne,{className:de("text-foreground underline",t?.footerLink),href:`${C}/${j[V==="SIGN_IN"||V==="MAGIC_LINK"||V==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${A?window.location.search:""}`,children:b.jsx(Ot,{variant:"link",size:"sm",className:de("px-0 text-foreground underline",t?.footerLink),children:V==="SIGN_IN"||V==="MAGIC_LINK"||V==="EMAIL_OTP"?l.SIGN_UP:l.SIGN_IN})}):b.jsx(Ot,{variant:"link",size:"sm",className:de("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:l.GO_BACK})]})]})}function kz({children:e}){const{hooks:{useSession:t}}=E.useContext(Qe),{isPending:n}=t();return n?e:null}function jz({children:e}){const{hooks:{useSession:t}}=E.useContext(Qe),{data:n}=t();return n?e:null}function Uz({children:e}){const{hooks:{useSession:t}}=E.useContext(Qe),{data:n,isPending:a}=t();return!n&&!a?e:null}function sB(e){const t=Sf.c(8),{children:n}=e,a=Oc();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={basePath:"/",pathMode:"slug"},t[0]=o):o=t[0];let l,u;t[1]!==a?(l=f=>a({to:f}),u=f=>a({to:f,replace:!0}),t[1]=a,t[2]=l,t[3]=u):(l=t[2],u=t[3]);let d;return t[4]!==n||t[5]!==l||t[6]!==u?(d=b.jsx(tN,{authClient:SI,organization:o,navigate:l,replace:u,Link:lB,children:n}),t[4]=n,t[5]=l,t[6]=u,t[7]=d):d=t[7],d}function lB(e){const{href:t,className:n,children:a,...o}=e;return b.jsx(xv,{to:t,className:n,...o,children:a})}const cB=new ZC;function uB(e){const t=Sf.c(3),{children:n}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=b.jsx(M6,{}),t[0]=a):a=t[0];let o;return t[1]!==n?(o=b.jsxs(XC,{client:cB,children:[a,b.jsx(p4,{children:b.jsx(sB,{children:n})})]}),t[1]=n,t[2]=o):o=t[2],o}const dB=function(){return null};function fB(){const e=Sf.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=b.jsx("div",{className:"flex items-center justify-center min-h-screen",children:b.jsx("div",{className:"text-gray-500",children:"Loading..."})}),e[0]=t):t=e[0],t}const Bc=j3({component:()=>b.jsxs(uB,{children:[b.jsx(E.Suspense,{fallback:b.jsx(fB,{}),children:b.jsx(Gw,{})}),b.jsx(dB,{})]})}),hB=Cn({getParentRoute:()=>Bc,path:"/login",component:Pn(()=>Ln(()=>import("./login-s7Y9QERd.js"),__vite__mapDeps([0,1,2,3]))),validateSearch:Gi(()=>En({next:Ke().optional(),client_id:Ke().optional(),redirect_uri:Ke().optional(),response_type:Ke().optional(),state:Ke().optional(),scope:Ke().optional(),code_challenge:Ke().optional(),code_challenge_method:Ke().optional()}))}),pB=Cn({getParentRoute:()=>Bc,path:"/auth/$pathname",component:Pn(()=>Ln(()=>import("./auth-catchall-J-s0UOos.js"),[]))}),Br=Cn({getParentRoute:()=>Bc,id:"shell",component:Pn(()=>Ln(()=>import("./shell-layout-BURBkVcQ.js"),__vite__mapDeps([4,5,2,6,7,1,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,3,39,40,41])))}),mB=Cn({getParentRoute:()=>Br,path:"/",component:Pn(()=>Ln(()=>import("./home-Go7erQGg.js"),__vite__mapDeps([42,24,2,39,22,12,1,3,36,37,38,26])))}),gB=Cn({getParentRoute:()=>Br,path:"/$org",component:Pn(()=>Ln(()=>import("./page-BnR6MH5w.js"),__vite__mapDeps([43,6,2,7,1,44,45,40,15,46,34,47,12,10,20,48,49,21,50,51,52])))}),vB=Cn({getParentRoute:()=>Br,path:"/$org/members",component:Pn(()=>Ln(()=>import("./members-YsCX_fsX.js"),__vite__mapDeps([53,44,45,1,2,40,15,7,46,54,5,3,55,56,6,57,58,59,60,9,39,51,37,41,13,11,12,33,34,38,17,18,16,24,61,62,63])))}),yB=Cn({getParentRoute:()=>Br,path:"/$org/mcps",component:Pn(()=>Ln(()=>import("./connections-BcVb3yyx.js"),__vite__mapDeps([64,65,44,45,1,2,40,15,7,46,54,5,3,55,23,24,6,34,66,19,37,51,41,13,38,61,11,33,17,18,16,67]))),validateSearch:Gi(()=>En({action:Iv(["create"]).optional()}))}),bB=Cn({getParentRoute:()=>Br,path:"/$org/settings",component:Pn(()=>Ln(()=>import("./settings-lBAYGURO.js"),__vite__mapDeps([68,44,45,1,2,40,15,7,46,38,3,69,13])))}),_B=Cn({getParentRoute:()=>Br,path:"/$org/monitoring",component:Pn(()=>Ln(()=>import("./monitoring-DLmYpM2E.js"),__vite__mapDeps([70,6,2,7,1,44,45,40,15,46,54,5,3,34,48,49,21,50,51,18,20,59,47,57,71,31,17,32]))),validateSearch:Gi(()=>En({from:Ke().default("now-24h"),to:Ke().default("now"),connectionId:CE(Ke()).optional().default([]),gatewayId:CE(Ke()).optional().default([]),tool:Ke().default(""),status:Iv(["all","success","errors"]).default("all"),search:Ke().default(""),page:xx().optional(),streaming:Cv().default(!0)}))}),tT=Cn({getParentRoute:()=>Br,path:"/$org/store",component:Pn(()=>Ln(()=>import("./store-Dbm237Pg.js"),__vite__mapDeps([72,60,44,45,1,2,40,15,7,6,73,74,11,5,54,3,24,75,76,17,18,12,23,29,30,8,9])))}),EB=Cn({getParentRoute:()=>tT,path:"/$appName",component:Pn(()=>Ln(()=>import("./store-app-detail-YHVcg9Z1.js"),__vite__mapDeps([77,22,11,1,2,58,6,7,78,18,12,40,15,25,5,79,9,27,75,45,54,3,55,24,80,81,82,51,29,30,47,83,84,67,73,76,28]))),validateSearch:Gi(()=>En({registryId:Ke().optional(),serverName:Ke().optional(),itemId:Ke().optional()}))}),SB=Cn({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId",component:Pn(()=>Ln(()=>import("./connection-detail-BzeSW6yw.js"),__vite__mapDeps([85,5,2,34,1,6,7,29,30,86,87,35,47,27,62,11,80,58,38,3,17,18,20,15,10,12,88,84,75,67,49,71,65,82,51,45,40,54,24,21,61,66,19,33,55,74,37,79,9,81]))),validateSearch:Gi(()=>En({tab:Ke().optional()}))}),wB=Cn({getParentRoute:()=>Br,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:Pn(()=>Ln(()=>import("./collection-detail-C5kf9NWv.js"),__vite__mapDeps([89,6,2,7,1,14,15,16,10,5,17,18,19,20,21,22,23,24,25,26,27,28,29,30,34,8,9,38,3,11,12,69,80,58,32,50,63,86,87,35,47,62,88,84,75,67,49,71,65,83]))),validateSearch:Gi(()=>En({replayId:Ke().optional()}))}),xB=Cn({getParentRoute:()=>Br,path:"/$org/gateways",component:Pn(()=>Ln(()=>import("./gateways-Ct2Ku_EE.js"),__vite__mapDeps([90,44,45,1,2,40,15,7,46,54,5,3,55,23,24,6,34,20,66,19,37,51,10,61,11,33]))),validateSearch:Gi(()=>En({action:Iv(["create"]).optional()}))}),RB=Cn({getParentRoute:()=>Br,path:"/$org/gateways/$gatewayId",component:Pn(()=>Ln(()=>import("./gateway-detail-dibsJ_Dr.js"),__vite__mapDeps([91,5,2,34,1,6,7,56,57,58,54,3,12,13,20,88,21,10,28,11,38,17,18,82,51,73,80]))),validateSearch:Gi(()=>En({tab:Ke().optional()}))}),OB=Cn({getParentRoute:()=>Bc,path:"/oauth/callback",component:Pn(()=>Ln(()=>import("./oauth-callback-J1YUg9b4.js"),__vite__mapDeps([92,24,2,22,78,11,87,30])))}),TB=tT.addChildren([EB]),AB=Br.addChildren([mB,gB,vB,yB,xB,RB,_B,TB,bB,SB,wB]),CB=Bc.addChildren([AB,hB,pB,OB]),IB=q3({routeTree:CB}),MB=document.getElementById("root");xC.createRoot(MB).render(b.jsx(E.StrictMode,{children:b.jsx(W3,{router:IB})}));export{lk as $,Pz as A,Bt as B,QL as C,Tz as D,We as E,F,_U as G,Po as H,t2 as I,NP as J,f4 as K,CR as L,MP as M,jB as N,ZL as O,WL as P,kB as Q,YL as R,fB as S,XL as T,Lz as U,sx as V,CE as W,KB as X,Cv as Y,QC as Z,sk as _,SI as a,bD as a$,ok as a0,KL as a1,hn as a2,Ja as a3,Xr as a4,Qr as a5,$R as a6,JR as a7,Ui as a8,yP as a9,oz as aA,cz as aB,nz as aC,hD as aD,vz as aE,Mf as aF,If as aG,uD as aH,az as aI,fD as aJ,nS as aK,rz as aL,qx as aM,Sz as aN,wz as aO,gz as aP,bz as aQ,lz as aR,ez as aS,XB as aT,iz as aU,sz as aV,Dz as aW,Ln as aX,Zx as aY,_z as aZ,Ez as a_,Gv as aa,dR as ab,qv as ac,bc as ad,nR as ae,$v as af,Hv as ag,bP as ah,_P as ai,NB as aj,Do as ak,zw as al,Tf as am,$i as an,Ka as ao,HC as ap,j_ as aq,LB as ar,DB as as,u4 as at,o4 as au,tr as av,Gx as aw,tz as ax,JB as ay,yz as az,wv as b,i4 as b$,pD as b0,yD as b1,gD as b2,fz as b3,hz as b4,uz as b5,dz as b6,pz as b7,mz as b8,Yx as b9,zB as bA,UB as bB,Rz as bC,Oz as bD,xz as bE,$7 as bF,G7 as bG,q7 as bH,Y7 as bI,K7 as bJ,Iz as bK,Mz as bL,Nz as bM,Cz as bN,Rc as bO,An as bP,vg as bQ,pw as bR,JC as bS,n4 as bT,s4 as bU,r4 as bV,a4 as bW,Xn as bX,c4 as bY,U_ as bZ,l4 as b_,Ws as ba,Fe as bb,In as bc,xv as bd,uM as be,MN as bf,Q2 as bg,J2 as bh,Q7 as bi,wk as bj,FR as bk,AR as bl,Mx as bm,Dv as bn,Iv as bo,HB as bp,Ac as bq,WB as br,VB as bs,FB as bt,GB as bu,xx as bv,$B as bw,YB as bx,Gi as by,BB as bz,Sf as c,jN as c0,zN as c1,Cf as c2,Bv as c3,fc as c4,YC as c5,PC as c6,ZB as c7,qB as c8,_e as c9,QB as ca,Sv as d,er as e,Oc as f,Az as g,lD as h,$x as i,b as j,tU as k,Qe as l,kz as m,jz as n,Uz as o,cv as p,d4 as q,E as r,Gw as s,NE as t,PB as u,En as v,Ke as w,Ea as x,_a as y,Cc as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,j as a}from"./index-
|
|
1
|
+
import{c as s,j as a}from"./index-CzwYLjKx.js";import{c as d}from"./utils-D1FAHWbf.js";function p(l){const e=s.c(10);let i,r,t;e[0]!==l?({className:i,type:t,...r}=l,e[0]=l,e[1]=i,e[2]=r,e[3]=t):(i=e[1],r=e[2],t=e[3]);let n;e[4]!==i?(n=d("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-lg border bg-transparent px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] bg-background","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==n||e[8]!==t?(o=a.jsx("input",{type:t,"data-slot":"input",className:n,...r}),e[6]=r,e[7]=n,e[8]=t,e[9]=o):o=e[9],o}export{p as I};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/prism-light-
|
|
2
|
-
import{r as g,aX as u,c as k,j as d}from"./index-BoajXOR2.js";const b=({size:l=24,color:o="currentColor",...r})=>g.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:o,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},g.createElement("path",{d:"M5 4.99c0-.972 0-1.457.202-1.725a1 1 0 0 1 .738-.395c.335-.02.74.25 1.548.788l10.515 7.01c.668.446 1.002.668 1.118.949a1 1 0 0 1 0 .766c-.116.28-.45.503-1.118.948l-10.515 7.01c-.809.54-1.213.809-1.548.789a1 1 0 0 1-.738-.395C5 20.467 5 19.98 5 19.01V4.99Z"}));b.displayName="Play";const m={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}},f=g.lazy(()=>u(()=>import("./prism-light-C5gubXs2.js"),__vite__mapDeps([0,1,2,3])).then(async l=>{const o=await u(()=>import("./json-shDxh9VI.js"),__vite__mapDeps([4,2,3,5]));return l.default.registerLanguage("json",o.default),{default:l.default}})),w={className:"font-mono",style:{wordBreak:"break-word",overflowWrap:"break-word",whiteSpace:"pre-wrap"}};function v(l){const o=k.c(5),{jsonString:r,padding:s}=l,t=s===void 0?"1rem":s;let e;o[0]!==t?(e={padding:t},o[0]=t,o[1]=e):e=o[1];let n;return o[2]!==r||o[3]!==e?(n=d.jsx("pre",{className:"font-mono text-xs whitespace-pre-wrap break-words m-0 h-full text-foreground/80 bg-transparent",style:e,children:r}),o[2]=r,o[3]=e,o[4]=n):n=o[4],n}function y(l){const o=k.c(12),{jsonString:r,padding:s,background:t}=l,e=s===void 0?"1rem":s,n=t===void 0?"transparent":t;let c;o[0]!==n||o[1]!==e?(c={margin:0,padding:e,fontSize:"0.75rem",height:"100%",background:n},o[0]=n,o[1]=e,o[2]=c):c=o[2];const p=c;let a;o[3]!==r||o[4]!==e?(a=d.jsx(v,{jsonString:r,padding:e}),o[3]=r,o[4]=e,o[5]=a):a=o[5];let i;o[6]!==p||o[7]!==r?(i=d.jsx(f,{language:"json",style:m,customStyle:p,codeTagProps:w,wrapLongLines:!0,children:r}),o[6]=p,o[7]=r,o[8]=i):i=o[8];let h;return o[9]!==a||o[10]!==i?(h=d.jsx(g.Suspense,{fallback:a,children:i}),o[9]=a,o[10]=i,o[11]=h):h=o[11],h}export{y as J,b as i};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/prism-light-qQIH26P8.js","assets/core-DEFgD5b5.js","assets/index-CzwYLjKx.js","assets/index-MyldRbGR.css","assets/json-xSSJeQ8M.js","assets/json-BESjz4hO.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as g,aX as u,c as k,j as d}from"./index-CzwYLjKx.js";const b=({size:l=24,color:o="currentColor",...r})=>g.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:o,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},g.createElement("path",{d:"M5 4.99c0-.972 0-1.457.202-1.725a1 1 0 0 1 .738-.395c.335-.02.74.25 1.548.788l10.515 7.01c.668.446 1.002.668 1.118.949a1 1 0 0 1 0 .766c-.116.28-.45.503-1.118.948l-10.515 7.01c-.809.54-1.213.809-1.548.789a1 1 0 0 1-.738-.395C5 20.467 5 19.98 5 19.01V4.99Z"}));b.displayName="Play";const m={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}},f=g.lazy(()=>u(()=>import("./prism-light-qQIH26P8.js"),__vite__mapDeps([0,1,2,3])).then(async l=>{const o=await u(()=>import("./json-xSSJeQ8M.js"),__vite__mapDeps([4,2,3,5]));return l.default.registerLanguage("json",o.default),{default:l.default}})),w={className:"font-mono",style:{wordBreak:"break-word",overflowWrap:"break-word",whiteSpace:"pre-wrap"}};function v(l){const o=k.c(5),{jsonString:r,padding:s}=l,t=s===void 0?"1rem":s;let e;o[0]!==t?(e={padding:t},o[0]=t,o[1]=e):e=o[1];let n;return o[2]!==r||o[3]!==e?(n=d.jsx("pre",{className:"font-mono text-xs whitespace-pre-wrap break-words m-0 h-full text-foreground/80 bg-transparent",style:e,children:r}),o[2]=r,o[3]=e,o[4]=n):n=o[4],n}function y(l){const o=k.c(12),{jsonString:r,padding:s,background:t}=l,e=s===void 0?"1rem":s,n=t===void 0?"transparent":t;let c;o[0]!==n||o[1]!==e?(c={margin:0,padding:e,fontSize:"0.75rem",height:"100%",background:n},o[0]=n,o[1]=e,o[2]=c):c=o[2];const p=c;let a;o[3]!==r||o[4]!==e?(a=d.jsx(v,{jsonString:r,padding:e}),o[3]=r,o[4]=e,o[5]=a):a=o[5];let i;o[6]!==p||o[7]!==r?(i=d.jsx(f,{language:"json",style:m,customStyle:p,codeTagProps:w,wrapLongLines:!0,children:r}),o[6]=p,o[7]=r,o[8]=i):i=o[8];let h;return o[9]!==a||o[10]!==i?(h=d.jsx(g.Suspense,{fallback:a,children:i}),o[9]=a,o[10]=i,o[11]=h):h=o[11],h}export{y as J,b as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ak as o}from"./index-CzwYLjKx.js";import{r}from"./json-BESjz4hO.js";var s=r();const e=o(s);export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,am as x,r as u,j as c}from"./index-
|
|
1
|
+
import{c as f,am as x,r as u,j as c}from"./index-CzwYLjKx.js";import{B as b}from"./button-DkKLNB2C.js";import{i as j}from"./ArrowLeft-B2q5Ncqe.js";const d="view-details-tabs-portal",p="view-details-actions-portal";function h(n){const e=f.c(3),[l,s]=u.useState(null);let t,r;return e[0]!==n?(t=()=>{s(document.getElementById(n))},r=[n],e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]),u.useEffect(t,r),l}function _(n){const e=f.c(3),{children:l}=n,s=h(d);if(!s)return null;let t;return e[0]!==l||e[1]!==s?(t=x.createPortal(l,s),e[0]=l,e[1]=s,e[2]=t):t=e[2],t}function w(n){const e=f.c(3),{children:l}=n,s=h(p);if(!s)return null;let t;return e[0]!==l||e[1]!==s?(t=x.createPortal(l,s),e[0]=l,e[1]=s,e[2]=t):t=e[2],t}function E(n){const e=f.c(11),{children:l,onBack:s}=n;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(j,{}),e[0]=t):t=e[0];let r;e[1]!==s?(r=c.jsx("div",{className:"flex h-full px-2 border-r items-center",children:c.jsx(b,{variant:"ghost",size:"icon",className:"items-center size-8 text-muted-foreground",onClick:s,children:t})}),e[1]=s,e[2]=r):r=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsxs("div",{className:"flex justify-between px-4 items-center gap-4 flex-1",children:[c.jsx("div",{id:d,className:"flex items-center gap-2"}),c.jsx("div",{id:p,className:"flex items-center gap-2 ml-auto"})]}),e[3]=a):a=e[3];let o;e[4]!==r?(o=c.jsxs("div",{className:"flex items-center h-12 border-b border-border shrink-0",children:[r,a]}),e[4]=r,e[5]=o):o=e[5];let i;e[6]!==l?(i=c.jsx("div",{className:"flex-1 overflow-auto",children:l}),e[6]=l,e[7]=i):i=e[7];let m;return e[8]!==o||e[9]!==i?(m=c.jsxs("div",{className:"flex flex-col h-full bg-background",children:[o,i]}),e[8]=o,e[9]=i,e[10]=m):m=e[10],m}export{w as V,_ as a,E as b};
|