@undefineds.co/xpod 0.3.71-rc.9 → 0.3.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/api/ai-gateway/connect/index.d.ts +2 -0
  2. package/dist/api/ai-gateway/connect/index.js +87 -24
  3. package/dist/api/ai-gateway/connect/index.js.map +1 -1
  4. package/dist/api/ai-gateway/pod/HostedPodDataAccess.js +2 -2
  5. package/dist/api/ai-gateway/pod/HostedPodDataAccess.js.map +1 -1
  6. package/dist/api/container/common.js +1 -1
  7. package/dist/api/container/common.js.map +1 -1
  8. package/dist/api/container/routes.js +1 -1
  9. package/dist/api/container/routes.js.map +1 -1
  10. package/dist/api/handlers/AiGatewayManagementHandler.js +28 -12
  11. package/dist/api/handlers/AiGatewayManagementHandler.js.map +1 -1
  12. package/dist/api/handlers/PodSettingsHandler.d.ts +12 -19
  13. package/dist/api/handlers/PodSettingsHandler.js +12 -51
  14. package/dist/api/handlers/PodSettingsHandler.js.map +1 -1
  15. package/dist/http/InternalPodDataHttpHandler.d.ts +3 -1
  16. package/dist/http/InternalPodDataHttpHandler.js +48 -7
  17. package/dist/http/InternalPodDataHttpHandler.js.map +1 -1
  18. package/dist/http/InternalPodDataHttpHandler.jsonld +10 -2
  19. package/dist/runtime/GatewayAdminProxyAuth.d.ts +1 -1
  20. package/dist/runtime/GatewayAdminProxyAuth.js +1 -1
  21. package/dist/runtime/GatewayAdminProxyAuth.js.map +1 -1
  22. package/dist/runtime/Proxy.d.ts +1 -0
  23. package/dist/runtime/Proxy.js +22 -0
  24. package/dist/runtime/Proxy.js.map +1 -1
  25. package/package.json +1 -1
  26. package/static/dashboard/assets/{NetworkPage-CXjiUMR1.js → NetworkPage-CsERgA2D.js} +1 -1
  27. package/static/dashboard/assets/{PaneListHeader-BSipfl0W.js → PaneListHeader-WJWFvTKY.js} +1 -1
  28. package/static/dashboard/assets/{PodPage-Bd3Xhmp-.js → PodPage-Bo_NbnK1.js} +1 -1
  29. package/static/dashboard/assets/{ServicesPage-CI3jWZGe.js → ServicesPage-CrNDXQlg.js} +1 -1
  30. package/static/dashboard/assets/{card-z5BV5hTo.js → card-Cjax171A.js} +1 -1
  31. package/static/dashboard/assets/{dashboard-CSrqAv2L.js → dashboard-CaE1mRUL.js} +4 -4
  32. package/static/dashboard/assets/{database-Ct5ZPe6L.js → database-B0sGiSz2.js} +1 -1
  33. package/static/dashboard/assets/{external-link-B7wD1hkm.js → external-link-C_ANDdCY.js} +1 -1
  34. package/static/dashboard/assets/{index-tOBaUnM1.js → index-CDoxbvUP.js} +1 -1
  35. package/static/dashboard/assets/{refresh-cw-CFDZPaE8.js → refresh-cw-DHzHxCme.js} +1 -1
  36. package/static/dashboard/assets/{services-status-context-DN1Icg4A.js → services-status-context-ukghtkFD.js} +1 -1
  37. package/static/dashboard/dashboard.html +1 -1
  38. package/static/settings/assets/ModelsPage-ClTKzRGm.js +1 -0
  39. package/static/settings/assets/{PaneListHeader-DMD8OJef.js → PaneListHeader-DTVY4Ig2.js} +1 -1
  40. package/static/settings/assets/{PodPage-DT4EMYhL.js → PodPage-L_JAOD-r.js} +1 -1
  41. package/static/settings/assets/{ServicesPage-CJ0ub6IH.js → ServicesPage-BwLxrSWw.js} +1 -1
  42. package/static/settings/assets/{SettingsPage-BkR7ZK18.js → SettingsPage-DUGHDPQx.js} +1 -1
  43. package/static/settings/assets/{card-Cjsia0_V.js → card-BZF0jSa_.js} +1 -1
  44. package/static/settings/assets/{services-status-context-CkuKmH5h.js → services-status-context-BnbZHZnu.js} +1 -1
  45. package/static/settings/assets/{settings-Cyyv6-SD.js → settings-BN7FyntE.js} +4 -4
  46. package/static/settings/assets/{workspace-layout-B47luv6r.js → workspace-layout-jzYHoh3_.js} +1 -1
  47. package/static/settings/settings.html +1 -1
  48. package/static/settings/assets/ModelsPage-03NPWzoX.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-tOBaUnM1.js","assets/services-status-context-DN1Icg4A.js","assets/refresh-cw-CFDZPaE8.js","assets/database-Ct5ZPe6L.js","assets/external-link-B7wD1hkm.js","assets/PodPage-Bd3Xhmp-.js","assets/PaneListHeader-BSipfl0W.js","assets/card-z5BV5hTo.js","assets/NetworkPage-CXjiUMR1.js","assets/ServicesPage-CI3jWZGe.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CDoxbvUP.js","assets/services-status-context-ukghtkFD.js","assets/refresh-cw-DHzHxCme.js","assets/database-B0sGiSz2.js","assets/external-link-C_ANDdCY.js","assets/PodPage-Bo_NbnK1.js","assets/PaneListHeader-WJWFvTKY.js","assets/card-Cjax171A.js","assets/NetworkPage-CsERgA2D.js","assets/ServicesPage-CrNDXQlg.js"])))=>i.map(i=>d[i]);
2
2
  function _mergeNamespaces(i,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in i)){const a=Object.getOwnPropertyDescriptor(n,s);a&&Object.defineProperty(i,s,a.get?a:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function t(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(s){if(s.ep)return;s.ep=!0;const a=t(s);fetch(s.href,a)}})();function getDefaultExportFromCjs(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var jsxRuntime={exports:{}},reactJsxRuntime_production={};var hasRequiredReactJsxRuntime_production;function requireReactJsxRuntime_production(){if(hasRequiredReactJsxRuntime_production)return reactJsxRuntime_production;hasRequiredReactJsxRuntime_production=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,s,a){var u=null;if(a!==void 0&&(u=""+a),s.key!==void 0&&(u=""+s.key),"key"in s){a={};for(var c in s)c!=="key"&&(a[c]=s[c])}else a=s;return s=a.ref,{$$typeof:i,type:n,key:u,ref:s!==void 0?s:null,props:a}}return reactJsxRuntime_production.Fragment=e,reactJsxRuntime_production.jsx=t,reactJsxRuntime_production.jsxs=t,reactJsxRuntime_production}var hasRequiredJsxRuntime;function requireJsxRuntime(){return hasRequiredJsxRuntime||(hasRequiredJsxRuntime=1,jsxRuntime.exports=requireReactJsxRuntime_production()),jsxRuntime.exports}var jsxRuntimeExports=requireJsxRuntime(),react={exports:{}},react_production={};var hasRequiredReact_production;function requireReact_production(){if(hasRequiredReact_production)return react_production;hasRequiredReact_production=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.iterator;function S(G){return G===null||typeof G!="object"?null:(G=y&&G[y]||G["@@iterator"],typeof G=="function"?G:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,T={};function A(G,ce,oe){this.props=G,this.context=ce,this.refs=T,this.updater=oe||w}A.prototype.isReactComponent={},A.prototype.setState=function(G,ce){if(typeof G!="object"&&typeof G!="function"&&G!=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,G,ce,"setState")},A.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function F(){}F.prototype=A.prototype;function x(G,ce,oe){this.props=G,this.context=ce,this.refs=T,this.updater=oe||w}var D=x.prototype=new F;D.constructor=x,R(D,A.prototype),D.isPureReactComponent=!0;var O=Array.isArray;function K(){}var z={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function Ee(G,ce,oe){var Fe=oe.ref;return{$$typeof:i,type:G,key:ce,ref:Fe!==void 0?Fe:null,props:oe}}function q(G,ce){return Ee(G.type,ce,G.props)}function Y(G){return typeof G=="object"&&G!==null&&G.$$typeof===i}function Te(G){var ce={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(oe){return ce[oe]})}var re=/\/+/g;function $e(G,ce){return typeof G=="object"&&G!==null&&G.key!=null?Te(""+G.key):ce.toString(36)}function ze(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(K,K):(G.status="pending",G.then(function(ce){G.status==="pending"&&(G.status="fulfilled",G.value=ce)},function(ce){G.status==="pending"&&(G.status="rejected",G.reason=ce)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function ye(G,ce,oe,Fe,Ue){var Je=typeof G;(Je==="undefined"||Je==="boolean")&&(G=null);var He=!1;if(G===null)He=!0;else switch(Je){case"bigint":case"string":case"number":He=!0;break;case"object":switch(G.$$typeof){case i:case e:He=!0;break;case p:return He=G._init,ye(He(G._payload),ce,oe,Fe,Ue)}}if(He)return Ue=Ue(G),He=Fe===""?"."+$e(G,0):Fe,O(Ue)?(oe="",He!=null&&(oe=He.replace(re,"$&/")+"/"),ye(Ue,ce,oe,"",function(Oe){return Oe})):Ue!=null&&(Y(Ue)&&(Ue=q(Ue,oe+(Ue.key==null||G&&G.key===Ue.key?"":(""+Ue.key).replace(re,"$&/")+"/")+He)),ce.push(Ue)),1;He=0;var he=Fe===""?".":Fe+":";if(O(G))for(var fe=0;fe<G.length;fe++)Fe=G[fe],Je=he+$e(Fe,fe),He+=ye(Fe,ce,oe,Je,Ue);else if(fe=S(G),typeof fe=="function")for(G=fe.call(G),fe=0;!(Fe=G.next()).done;)Fe=Fe.value,Je=he+$e(Fe,fe++),He+=ye(Fe,ce,oe,Je,Ue);else if(Je==="object"){if(typeof G.then=="function")return ye(ze(G),ce,oe,Fe,Ue);throw ce=String(G),Error("Objects are not valid as a React child (found: "+(ce==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":ce)+"). If you meant to render a collection of children, use an array instead.")}return He}function Ve(G,ce,oe){if(G==null)return G;var Fe=[],Ue=0;return ye(G,Fe,"","",function(Je){return ce.call(oe,Je,Ue++)}),Fe}function pe(G){if(G._status===-1){var ce=G._result;ce=ce(),ce.then(function(oe){(G._status===0||G._status===-1)&&(G._status=1,G._result=oe)},function(oe){(G._status===0||G._status===-1)&&(G._status=2,G._result=oe)}),G._status===-1&&(G._status=0,G._result=ce)}if(G._status===1)return G._result.default;throw G._result}var De=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ce=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(ce))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",G);return}console.error(G)},$={map:Ve,forEach:function(G,ce,oe){Ve(G,function(){ce.apply(this,arguments)},oe)},count:function(G){var ce=0;return Ve(G,function(){ce++}),ce},toArray:function(G){return Ve(G,function(ce){return ce})||[]},only:function(G){if(!Y(G))throw Error("React.Children.only expected to receive a single React element child.");return G}};return react_production.Activity=g,react_production.Children=$,react_production.Component=A,react_production.Fragment=t,react_production.Profiler=s,react_production.PureComponent=x,react_production.StrictMode=n,react_production.Suspense=h,react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,react_production.__COMPILER_RUNTIME={__proto__:null,c:function(G){return z.H.useMemoCache(G)}},react_production.cache=function(G){return function(){return G.apply(null,arguments)}},react_production.cacheSignal=function(){return null},react_production.cloneElement=function(G,ce,oe){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var Fe=R({},G.props),Ue=G.key;if(ce!=null)for(Je in ce.key!==void 0&&(Ue=""+ce.key),ce)!X.call(ce,Je)||Je==="key"||Je==="__self"||Je==="__source"||Je==="ref"&&ce.ref===void 0||(Fe[Je]=ce[Je]);var Je=arguments.length-2;if(Je===1)Fe.children=oe;else if(1<Je){for(var He=Array(Je),he=0;he<Je;he++)He[he]=arguments[he+2];Fe.children=He}return Ee(G.type,Ue,Fe)},react_production.createContext=function(G){return G={$$typeof:u,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:a,_context:G},G},react_production.createElement=function(G,ce,oe){var Fe,Ue={},Je=null;if(ce!=null)for(Fe in ce.key!==void 0&&(Je=""+ce.key),ce)X.call(ce,Fe)&&Fe!=="key"&&Fe!=="__self"&&Fe!=="__source"&&(Ue[Fe]=ce[Fe]);var He=arguments.length-2;if(He===1)Ue.children=oe;else if(1<He){for(var he=Array(He),fe=0;fe<He;fe++)he[fe]=arguments[fe+2];Ue.children=he}if(G&&G.defaultProps)for(Fe in He=G.defaultProps,He)Ue[Fe]===void 0&&(Ue[Fe]=He[Fe]);return Ee(G,Je,Ue)},react_production.createRef=function(){return{current:null}},react_production.forwardRef=function(G){return{$$typeof:c,render:G}},react_production.isValidElement=Y,react_production.lazy=function(G){return{$$typeof:p,_payload:{_status:-1,_result:G},_init:pe}},react_production.memo=function(G,ce){return{$$typeof:f,type:G,compare:ce===void 0?null:ce}},react_production.startTransition=function(G){var ce=z.T,oe={};z.T=oe;try{var Fe=G(),Ue=z.S;Ue!==null&&Ue(oe,Fe),typeof Fe=="object"&&Fe!==null&&typeof Fe.then=="function"&&Fe.then(K,De)}catch(Je){De(Je)}finally{ce!==null&&oe.types!==null&&(ce.types=oe.types),z.T=ce}},react_production.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},react_production.use=function(G){return z.H.use(G)},react_production.useActionState=function(G,ce,oe){return z.H.useActionState(G,ce,oe)},react_production.useCallback=function(G,ce){return z.H.useCallback(G,ce)},react_production.useContext=function(G){return z.H.useContext(G)},react_production.useDebugValue=function(){},react_production.useDeferredValue=function(G,ce){return z.H.useDeferredValue(G,ce)},react_production.useEffect=function(G,ce){return z.H.useEffect(G,ce)},react_production.useEffectEvent=function(G){return z.H.useEffectEvent(G)},react_production.useId=function(){return z.H.useId()},react_production.useImperativeHandle=function(G,ce,oe){return z.H.useImperativeHandle(G,ce,oe)},react_production.useInsertionEffect=function(G,ce){return z.H.useInsertionEffect(G,ce)},react_production.useLayoutEffect=function(G,ce){return z.H.useLayoutEffect(G,ce)},react_production.useMemo=function(G,ce){return z.H.useMemo(G,ce)},react_production.useOptimistic=function(G,ce){return z.H.useOptimistic(G,ce)},react_production.useReducer=function(G,ce,oe){return z.H.useReducer(G,ce,oe)},react_production.useRef=function(G){return z.H.useRef(G)},react_production.useState=function(G){return z.H.useState(G)},react_production.useSyncExternalStore=function(G,ce,oe){return z.H.useSyncExternalStore(G,ce,oe)},react_production.useTransition=function(){return z.H.useTransition()},react_production.version="19.2.8",react_production}var hasRequiredReact;function requireReact(){return hasRequiredReact||(hasRequiredReact=1,react.exports=requireReact_production()),react.exports}var reactExports=requireReact();const React3=getDefaultExportFromCjs(reactExports),React=_mergeNamespaces({__proto__:null,default:React3},[reactExports]);var client={exports:{}},reactDomClient_production={},scheduler={exports:{}},scheduler_production={};var hasRequiredScheduler_production;function requireScheduler_production(){return hasRequiredScheduler_production||(hasRequiredScheduler_production=1,(function(i){function e(ye,Ve){var pe=ye.length;ye.push(Ve);e:for(;0<pe;){var De=pe-1>>>1,$=ye[De];if(0<s($,Ve))ye[De]=Ve,ye[pe]=$,pe=De;else break e}}function t(ye){return ye.length===0?null:ye[0]}function n(ye){if(ye.length===0)return null;var Ve=ye[0],pe=ye.pop();if(pe!==Ve){ye[0]=pe;e:for(var De=0,$=ye.length,G=$>>>1;De<G;){var ce=2*(De+1)-1,oe=ye[ce],Fe=ce+1,Ue=ye[Fe];if(0>s(oe,pe))Fe<$&&0>s(Ue,oe)?(ye[De]=Ue,ye[Fe]=pe,De=Fe):(ye[De]=oe,ye[ce]=pe,De=ce);else if(Fe<$&&0>s(Ue,pe))ye[De]=Ue,ye[Fe]=pe,De=Fe;else break e}}return Ve}function s(ye,Ve){var pe=ye.sortIndex-Ve.sortIndex;return pe!==0?pe:ye.id-Ve.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;i.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();i.unstable_now=function(){return u.now()-c}}var h=[],f=[],p=1,g=null,y=3,S=!1,w=!1,R=!1,T=!1,A=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function D(ye){for(var Ve=t(f);Ve!==null;){if(Ve.callback===null)n(f);else if(Ve.startTime<=ye)n(f),Ve.sortIndex=Ve.expirationTime,e(h,Ve);else break;Ve=t(f)}}function O(ye){if(R=!1,D(ye),!w)if(t(h)!==null)w=!0,K||(K=!0,Te());else{var Ve=t(f);Ve!==null&&ze(O,Ve.startTime-ye)}}var K=!1,z=-1,X=5,Ee=-1;function q(){return T?!0:!(i.unstable_now()-Ee<X)}function Y(){if(T=!1,K){var ye=i.unstable_now();Ee=ye;var Ve=!0;try{e:{w=!1,R&&(R=!1,F(z),z=-1),S=!0;var pe=y;try{t:{for(D(ye),g=t(h);g!==null&&!(g.expirationTime>ye&&q());){var De=g.callback;if(typeof De=="function"){g.callback=null,y=g.priorityLevel;var $=De(g.expirationTime<=ye);if(ye=i.unstable_now(),typeof $=="function"){g.callback=$,D(ye),Ve=!0;break t}g===t(h)&&n(h),D(ye)}else n(h);g=t(h)}if(g!==null)Ve=!0;else{var G=t(f);G!==null&&ze(O,G.startTime-ye),Ve=!1}}break e}finally{g=null,y=pe,S=!1}Ve=void 0}}finally{Ve?Te():K=!1}}}var Te;if(typeof x=="function")Te=function(){x(Y)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,$e=re.port2;re.port1.onmessage=Y,Te=function(){$e.postMessage(null)}}else Te=function(){A(Y,0)};function ze(ye,Ve){z=A(function(){ye(i.unstable_now())},Ve)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(ye){ye.callback=null},i.unstable_forceFrameRate=function(ye){0>ye||125<ye?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<ye?Math.floor(1e3/ye):5},i.unstable_getCurrentPriorityLevel=function(){return y},i.unstable_next=function(ye){switch(y){case 1:case 2:case 3:var Ve=3;break;default:Ve=y}var pe=y;y=Ve;try{return ye()}finally{y=pe}},i.unstable_requestPaint=function(){T=!0},i.unstable_runWithPriority=function(ye,Ve){switch(ye){case 1:case 2:case 3:case 4:case 5:break;default:ye=3}var pe=y;y=ye;try{return Ve()}finally{y=pe}},i.unstable_scheduleCallback=function(ye,Ve,pe){var De=i.unstable_now();switch(typeof pe=="object"&&pe!==null?(pe=pe.delay,pe=typeof pe=="number"&&0<pe?De+pe:De):pe=De,ye){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=pe+$,ye={id:p++,callback:Ve,priorityLevel:ye,startTime:pe,expirationTime:$,sortIndex:-1},pe>De?(ye.sortIndex=pe,e(f,ye),t(h)===null&&ye===t(f)&&(R?(F(z),z=-1):R=!0,ze(O,pe-De))):(ye.sortIndex=$,e(h,ye),w||S||(w=!0,K||(K=!0,Te()))),ye},i.unstable_shouldYield=q,i.unstable_wrapCallback=function(ye){var Ve=y;return function(){var pe=y;y=Ve;try{return ye.apply(this,arguments)}finally{y=pe}}}})(scheduler_production)),scheduler_production}var hasRequiredScheduler;function requireScheduler(){return hasRequiredScheduler||(hasRequiredScheduler=1,scheduler.exports=requireScheduler_production()),scheduler.exports}var reactDom={exports:{}},reactDom_production={};var hasRequiredReactDom_production;function requireReactDom_production(){if(hasRequiredReactDom_production)return reactDom_production;hasRequiredReactDom_production=1;var i=requireReact();function e(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var n={d:{f:t,r:function(){throw Error(e(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},s=Symbol.for("react.portal");function a(h,f,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:h,containerInfo:f,implementation:p}}var u=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return reactDom_production.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,reactDom_production.createPortal=function(h,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return a(h,f,null,p)},reactDom_production.flushSync=function(h){var f=u.T,p=n.p;try{if(u.T=null,n.p=2,h)return h()}finally{u.T=f,n.p=p,n.d.f()}},reactDom_production.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,n.d.C(h,f))},reactDom_production.prefetchDNS=function(h){typeof h=="string"&&n.d.D(h)},reactDom_production.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var p=f.as,g=c(p,f.crossOrigin),y=typeof f.integrity=="string"?f.integrity:void 0,S=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?n.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:S}):p==="script"&&n.d.X(h,{crossOrigin:g,integrity:y,fetchPriority:S,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},reactDom_production.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=c(f.as,f.crossOrigin);n.d.M(h,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&n.d.M(h)},reactDom_production.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,g=c(p,f.crossOrigin);n.d.L(h,p,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},reactDom_production.preloadModule=function(h,f){if(typeof h=="string")if(f){var p=c(f.as,f.crossOrigin);n.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else n.d.m(h)},reactDom_production.requestFormReset=function(h){n.d.r(h)},reactDom_production.unstable_batchedUpdates=function(h,f){return h(f)},reactDom_production.useFormState=function(h,f,p){return u.H.useFormState(h,f,p)},reactDom_production.useFormStatus=function(){return u.H.useHostTransitionStatus()},reactDom_production.version="19.2.8",reactDom_production}var hasRequiredReactDom;function requireReactDom(){if(hasRequiredReactDom)return reactDom.exports;hasRequiredReactDom=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),reactDom.exports=requireReactDom_production(),reactDom.exports}var hasRequiredReactDomClient_production;function requireReactDomClient_production(){if(hasRequiredReactDomClient_production)return reactDomClient_production;hasRequiredReactDomClient_production=1;var i=requireScheduler(),e=requireReact(),t=requireReactDom();function n(o){var l="https://react.dev/errors/"+o;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function a(o){var l=o,d=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(d=l.return),o=l.return;while(o)}return l.tag===3?d:null}function u(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function c(o){if(o.tag===31){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function h(o){if(a(o)!==o)throw Error(n(188))}function f(o){var l=o.alternate;if(!l){if(l=a(o),l===null)throw Error(n(188));return l!==o?null:o}for(var d=o,m=l;;){var E=d.return;if(E===null)break;var C=E.alternate;if(C===null){if(m=E.return,m!==null){d=m;continue}break}if(E.child===C.child){for(C=E.child;C;){if(C===d)return h(E),o;if(C===m)return h(E),l;C=C.sibling}throw Error(n(188))}if(d.return!==m.return)d=E,m=C;else{for(var W=!1,le=E.child;le;){if(le===d){W=!0,d=E,m=C;break}if(le===m){W=!0,m=E,d=C;break}le=le.sibling}if(!W){for(le=C.child;le;){if(le===d){W=!0,d=C,m=E;break}if(le===m){W=!0,m=C,d=E;break}le=le.sibling}if(!W)throw Error(n(189))}}if(d.alternate!==m)throw Error(n(190))}if(d.tag!==3)throw Error(n(188));return d.stateNode.current===d?o:l}function p(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o;for(o=o.child;o!==null;){if(l=p(o),l!==null)return l;o=o.sibling}return null}var g=Object.assign,y=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),x=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),Ee=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function Te(o){return o===null||typeof o!="object"?null:(o=Y&&o[Y]||o["@@iterator"],typeof o=="function"?o:null)}var re=Symbol.for("react.client.reference");function $e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===re?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case R:return"Fragment";case A:return"Profiler";case T:return"StrictMode";case O:return"Suspense";case K:return"SuspenseList";case Ee:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case w:return"Portal";case x:return o.displayName||"Context";case F:return(o._context.displayName||"Context")+".Consumer";case D:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case z:return l=o.displayName||null,l!==null?l:$e(o.type)||"Memo";case X:l=o._payload,o=o._init;try{return $e(o(l))}catch{}}return null}var ze=Array.isArray,ye=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ve=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},De=[],$=-1;function G(o){return{current:o}}function ce(o){0>$||(o.current=De[$],De[$]=null,$--)}function oe(o,l){$++,De[$]=o.current,o.current=l}var Fe=G(null),Ue=G(null),Je=G(null),He=G(null);function he(o,l){switch(oe(Je,l),oe(Ue,o),oe(Fe,null),l.nodeType){case 9:case 11:o=(o=l.documentElement)&&(o=o.namespaceURI)?Of(o):0;break;default:if(o=l.tagName,l=l.namespaceURI)l=Of(l),o=$f(l,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}ce(Fe),oe(Fe,o)}function fe(){ce(Fe),ce(Ue),ce(Je)}function Oe(o){o.memoizedState!==null&&oe(He,o);var l=Fe.current,d=$f(l,o.type);l!==d&&(oe(Ue,o),oe(Fe,d))}function ie(o){Ue.current===o&&(ce(Fe),ce(Ue)),He.current===o&&(ce(He),ia._currentValue=pe)}var j,N;function L(o){if(j===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);j=l&&l[1]||"",N=-1<d.stack.indexOf(`
3
3
  at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
4
4
  `+j+o+N}var V=!1;function ee(o,l){if(!o||V)return"";V=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(l){var dt=function(){throw Error()};if(Object.defineProperty(dt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(dt,[])}catch(it){var tt=it}Reflect.construct(o,[],dt)}else{try{dt.call()}catch(it){tt=it}o.call(dt.prototype)}}else{try{throw Error()}catch(it){tt=it}(dt=o())&&typeof dt.catch=="function"&&dt.catch(function(){})}}catch(it){if(it&&tt&&typeof it.stack=="string")return[it.stack,tt.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=m.DetermineComponentFrameRoot(),W=C[0],le=C[1];if(W&&le){var ke=W.split(`
@@ -7,9 +7,9 @@ function _mergeNamespaces(i,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeo
7
7
  `+ke[m].replace(" at new "," at ");return o.displayName&&lt.includes("<anonymous>")&&(lt=lt.replace("<anonymous>",o.displayName)),lt}while(1<=m&&0<=E);break}}}finally{V=!1,Error.prepareStackTrace=d}return(d=o?o.displayName||o.name:"")?L(d):""}function ae(o,l){switch(o.tag){case 26:case 27:case 5:return L(o.type);case 16:return L("Lazy");case 13:return o.child!==l&&l!==null?L("Suspense Fallback"):L("Suspense");case 19:return L("SuspenseList");case 0:case 15:return ee(o.type,!1);case 11:return ee(o.type.render,!1);case 1:return ee(o.type,!0);case 31:return L("Activity");default:return""}}function ve(o){try{var l="",d=null;do l+=ae(o,d),d=o,o=o.return;while(o);return l}catch(m){return`
8
8
  Error generating stack: `+m.message+`
9
9
  `+m.stack}}var J=Object.prototype.hasOwnProperty,me=i.unstable_scheduleCallback,xe=i.unstable_cancelCallback,de=i.unstable_shouldYield,st=i.unstable_requestPaint,ft=i.unstable_now,Ge=i.unstable_getCurrentPriorityLevel,pt=i.unstable_ImmediatePriority,Z=i.unstable_UserBlockingPriority,P=i.unstable_NormalPriority,B=i.unstable_LowPriority,U=i.unstable_IdlePriority,Ie=i.log,Me=i.unstable_setDisableYieldValue,Pe=null,gt=null;function _t(o){if(typeof Ie=="function"&&Me(o),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Pe,o)}catch{}}var Tt=Math.clz32?Math.clz32:sn,kt=Math.log,Ft=Math.LN2;function sn(o){return o>>>=0,o===0?32:31-(kt(o)/Ft|0)|0}var Yt=256,Dt=262144,vr=4194304;function Bt(o){var l=o&42;if(l!==0)return l;switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function dr(o,l,d){var m=o.pendingLanes;if(m===0)return 0;var E=0,C=o.suspendedLanes,W=o.pingedLanes;o=o.warmLanes;var le=m&134217727;return le!==0?(m=le&~C,m!==0?E=Bt(m):(W&=le,W!==0?E=Bt(W):d||(d=le&~o,d!==0&&(E=Bt(d))))):(le=m&~C,le!==0?E=Bt(le):W!==0?E=Bt(W):d||(d=m&~o,d!==0&&(E=Bt(d)))),E===0?0:l!==0&&l!==E&&(l&C)===0&&(C=E&-E,d=l&-l,C>=d||C===32&&(d&4194048)!==0)?l:E}function nr(o,l){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&l)===0}function Vr(o,l){switch(o){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function M(){var o=vr;return vr<<=1,(vr&62914560)===0&&(vr=4194304),o}function H(o){for(var l=[],d=0;31>d;d++)l.push(o);return l}function Be(o,l){o.pendingLanes|=l,l!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function qe(o,l,d,m,E,C){var W=o.pendingLanes;o.pendingLanes=d,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=d,o.entangledLanes&=d,o.errorRecoveryDisabledLanes&=d,o.shellSuspendCounter=0;var le=o.entanglements,ke=o.expirationTimes,Ye=o.hiddenUpdates;for(d=W&~d;0<d;){var lt=31-Tt(d),dt=1<<lt;le[lt]=0,ke[lt]=-1;var tt=Ye[lt];if(tt!==null)for(Ye[lt]=null,lt=0;lt<tt.length;lt++){var it=tt[lt];it!==null&&(it.lane&=-536870913)}d&=~dt}m!==0&&at(o,m,0),C!==0&&E===0&&o.tag!==0&&(o.suspendedLanes|=C&~(W&~l))}function at(o,l,d){o.pendingLanes|=l,o.suspendedLanes&=~l;var m=31-Tt(l);o.entangledLanes|=l,o.entanglements[m]=o.entanglements[m]|1073741824|d&261930}function Ut(o,l){var d=o.entangledLanes|=l;for(o=o.entanglements;d;){var m=31-Tt(d),E=1<<m;E&l|o[m]&l&&(o[m]|=l),d&=~E}}function Ht(o,l){var d=l&-l;return d=(d&42)!==0?1:on(d),(d&(o.suspendedLanes|l))!==0?0:d}function on(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Sr(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function sr(){var o=Ve.p;return o!==0?o:(o=window.event,o===void 0?32:ah(o.type))}function bn(o,l){var d=Ve.p;try{return Ve.p=o,l()}finally{Ve.p=d}}var Hr=Math.random().toString(36).slice(2),qt="__reactFiber$"+Hr,fr="__reactProps$"+Hr,Dr="__reactContainer$"+Hr,Mr="__reactEvents$"+Hr,Lt="__reactListeners$"+Hr,Rt="__reactHandles$"+Hr,hr="__reactResources$"+Hr,oi="__reactMarker$"+Hr;function br(o){delete o[qt],delete o[fr],delete o[Mr],delete o[Lt],delete o[Rt]}function or(o){var l=o[qt];if(l)return l;for(var d=o.parentNode;d;){if(l=d[Dr]||d[qt]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(o=Hf(o);o!==null;){if(d=o[qt])return d;o=Hf(o)}return l}o=d,d=o.parentNode}return null}function ai(o){if(o=o[qt]||o[Dr]){var l=o.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return o}return null}function Pr(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o.stateNode;throw Error(n(33))}function vn(o){var l=o[hr];return l||(l=o[hr]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Er(o){o[oi]=!0}var _i=new Set,wi={};function Sn(o,l){hn(o,l),hn(o+"Capture",l)}function hn(o,l){for(wi[o]=l,o=0;o<l.length;o++)_i.add(l[o])}var En=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ws={},_={};function b(o){return J.call(_,o)?!0:J.call(ws,o)?!1:En.test(o)?_[o]=!0:(ws[o]=!0,!1)}function v(o,l,d){if(b(l))if(d===null)o.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":o.removeAttribute(l);return;case"boolean":var m=l.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){o.removeAttribute(l);return}}o.setAttribute(l,""+d)}}function I(o,l,d){if(d===null)o.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttribute(l,""+d)}}function k(o,l,d,m){if(m===null)o.removeAttribute(d);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(d);return}o.setAttributeNS(l,d,""+m)}}function Q(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function te(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function we(o,l,d){var m=Object.getOwnPropertyDescriptor(o.constructor.prototype,l);if(!o.hasOwnProperty(l)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var E=m.get,C=m.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return E.call(this)},set:function(W){d=""+W,C.call(this,W)}}),Object.defineProperty(o,l,{enumerable:m.enumerable}),{getValue:function(){return d},setValue:function(W){d=""+W},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function ge(o){if(!o._valueTracker){var l=te(o)?"checked":"value";o._valueTracker=we(o,l,""+o[l])}}function be(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var d=l.getValue(),m="";return o&&(m=te(o)?o.checked?"true":"false":o.value),o=m,o!==d?(l.setValue(o),!0):!1}function _e(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var Re=/[\n"\\]/g;function Ce(o){return o.replace(Re,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Le(o,l,d,m,E,C,W,le){o.name="",W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"?o.type=W:o.removeAttribute("type"),l!=null?W==="number"?(l===0&&o.value===""||o.value!=l)&&(o.value=""+Q(l)):o.value!==""+Q(l)&&(o.value=""+Q(l)):W!=="submit"&&W!=="reset"||o.removeAttribute("value"),l!=null?Xe(o,W,Q(l)):d!=null?Xe(o,W,Q(d)):m!=null&&o.removeAttribute("value"),E==null&&C!=null&&(o.defaultChecked=!!C),E!=null&&(o.checked=E&&typeof E!="function"&&typeof E!="symbol"),le!=null&&typeof le!="function"&&typeof le!="symbol"&&typeof le!="boolean"?o.name=""+Q(le):o.removeAttribute("name")}function We(o,l,d,m,E,C,W,le){if(C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(o.type=C),l!=null||d!=null){if(!(C!=="submit"&&C!=="reset"||l!=null)){ge(o);return}d=d!=null?""+Q(d):"",l=l!=null?""+Q(l):d,le||l===o.value||(o.value=l),o.defaultValue=l}m=m??E,m=typeof m!="function"&&typeof m!="symbol"&&!!m,o.checked=le?o.checked:!!m,o.defaultChecked=!!m,W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"&&(o.name=W),ge(o)}function Xe(o,l,d){l==="number"&&_e(o.ownerDocument)===o||o.defaultValue===""+d||(o.defaultValue=""+d)}function et(o,l,d,m){if(o=o.options,l){l={};for(var E=0;E<d.length;E++)l["$"+d[E]]=!0;for(d=0;d<o.length;d++)E=l.hasOwnProperty("$"+o[d].value),o[d].selected!==E&&(o[d].selected=E),E&&m&&(o[d].defaultSelected=!0)}else{for(d=""+Q(d),l=null,E=0;E<o.length;E++){if(o[E].value===d){o[E].selected=!0,m&&(o[E].defaultSelected=!0);return}l!==null||o[E].disabled||(l=o[E])}l!==null&&(l.selected=!0)}}function ne(o,l,d){if(l!=null&&(l=""+Q(l),l!==o.value&&(o.value=l),d==null)){o.defaultValue!==l&&(o.defaultValue=l);return}o.defaultValue=d!=null?""+Q(d):""}function Se(o,l,d,m){if(l==null){if(m!=null){if(d!=null)throw Error(n(92));if(ze(m)){if(1<m.length)throw Error(n(93));m=m[0]}d=m}d==null&&(d=""),l=d}d=Q(l),o.defaultValue=d,m=o.textContent,m===d&&m!==""&&m!==null&&(o.value=m),ge(o)}function Ae(o,l){if(l){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=l;return}}o.textContent=l}var Ne=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Qe(o,l,d){var m=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?m?o.setProperty(l,""):l==="float"?o.cssFloat="":o[l]="":m?o.setProperty(l,d):typeof d!="number"||d===0||Ne.has(l)?l==="float"?o.cssFloat=d:o[l]=(""+d).trim():o[l]=d+"px"}function nt(o,l,d){if(l!=null&&typeof l!="object")throw Error(n(62));if(o=o.style,d!=null){for(var m in d)!d.hasOwnProperty(m)||l!=null&&l.hasOwnProperty(m)||(m.indexOf("--")===0?o.setProperty(m,""):m==="float"?o.cssFloat="":o[m]="");for(var E in l)m=l[E],l.hasOwnProperty(E)&&d[E]!==m&&Qe(o,E,m)}else for(var C in l)l.hasOwnProperty(C)&&Qe(o,C,l[C])}function bt(o){if(o.indexOf("-")===-1)return!1;switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ht=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ct=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function yt(o){return Ct.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function wt(){}var Jt=null;function Qt(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Mt=null,Ir=null;function Lr(o){var l=ai(o);if(l&&(o=l.stateNode)){var d=o[fr]||null;e:switch(o=l.stateNode,l.type){case"input":if(Le(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Ce(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var m=d[l];if(m!==o&&m.form===o.form){var E=m[fr]||null;if(!E)throw Error(n(90));Le(m,E.value,E.defaultValue,E.defaultValue,E.checked,E.defaultChecked,E.type,E.name)}}for(l=0;l<d.length;l++)m=d[l],m.form===o.form&&be(m)}break e;case"textarea":ne(o,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&et(o,!!d.multiple,l,!1)}}}var Ur=!1;function ar(o,l,d){if(Ur)return o(l,d);Ur=!0;try{var m=o(l);return m}finally{if(Ur=!1,(Mt!==null||Ir!==null)&&(Xa(),Mt&&(l=Mt,o=Ir,Ir=Mt=null,Lr(l),o)))for(l=0;l<o.length;l++)Lr(o[l])}}function Xt(o,l){var d=o.stateNode;if(d===null)return null;var m=d[fr]||null;if(m===null)return null;d=m[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(o=o.type,m=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!m;break e;default:o=!1}if(o)return null;if(d&&typeof d!="function")throw Error(n(231,l,typeof d));return d}var ir=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Or=!1;if(ir)try{var _n={};Object.defineProperty(_n,"passive",{get:function(){Or=!0}}),window.addEventListener("test",_n,_n),window.removeEventListener("test",_n,_n)}catch{Or=!1}var tn=null,pn=null,Tn=null;function gn(){if(Tn)return Tn;var o,l=pn,d=l.length,m,E="value"in tn?tn.value:tn.textContent,C=E.length;for(o=0;o<d&&l[o]===E[o];o++);var W=d-o;for(m=1;m<=W&&l[d-m]===E[C-m];m++);return Tn=E.slice(o,1<m?1-m:void 0)}function Fn(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function wr(){return!0}function $r(){return!1}function Cr(o){function l(d,m,E,C,W){this._reactName=d,this._targetInst=E,this.type=m,this.nativeEvent=C,this.target=W,this.currentTarget=null;for(var le in o)o.hasOwnProperty(le)&&(d=o[le],this[le]=d?d(C):C[le]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?wr:$r,this.isPropagationStopped=$r,this}return g(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=wr)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=wr)},persist:function(){},isPersistent:wr}),l}var kr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mn=Cr(kr),mn=g({},kr,{view:0,detail:0}),Mi=Cr(mn),qn,Xr,rn,Yr=g({},mn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tr,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==rn&&(rn&&o.type==="mousemove"?(qn=o.screenX-rn.screenX,Xr=o.screenY-rn.screenY):Xr=qn=0,rn=o),qn)},movementY:function(o){return"movementY"in o?o.movementY:Xr}}),lr=Cr(Yr),Dn=g({},Yr,{dataTransfer:0}),hi=Cr(Dn),Nr=g({},mn,{relatedTarget:0}),zn=Cr(Nr),Vn=g({},kr,{animationName:0,elapsedTime:0,pseudoElement:0}),Hn=Cr(Vn),$s=g({},kr,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),wo=Cr($s),Wn=g({},kr,{data:0}),vo=Cr(Wn),la={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},an={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},vi={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qi(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=vi[o])?!!l[o]:!1}function Tr(){return qi}var Kn=g({},mn,{key:function(o){if(o.key){var l=la[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=Fn(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?an[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tr,charCode:function(o){return o.type==="keypress"?Fn(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Fn(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),vs=Cr(Kn),So=g({},Yr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wr=Cr(So),zi=g({},mn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tr}),Vi=Cr(zi),Eo=g({},kr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Si=Cr(Eo),Hi=g({},Yr,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),To=Cr(Hi),Gn=g({},kr,{newState:0,oldState:0}),wl=Cr(Gn),Ro=[9,13,27,32],Pn=ir&&"CompositionEvent"in window,li=null;ir&&"documentMode"in document&&(li=document.documentMode);var ua=ir&&"TextEvent"in window&&!li,ca=ir&&(!Pn||li&&8<li&&11>=li),da=" ",fa=!1;function js(o,l){switch(o){case"keyup":return Ro.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xo(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Wi=!1;function vl(o,l){switch(o){case"compositionend":return xo(l);case"keypress":return l.which!==32?null:(fa=!0,da);case"textInput":return o=l.data,o===da&&fa?null:o;default:return null}}function Ao(o,l){if(Wi)return o==="compositionend"||!Pn&&js(o,l)?(o=gn(),Tn=pn=tn=null,Wi=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return ca&&l.locale!=="ko"?null:l.data;default:return null}}var Ki={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Bs(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!Ki[o.type]:l==="textarea"}function ha(o,l,d,m){Mt?Ir?Ir.push(m):Ir=[m]:Mt=m,l=sl(l,"onChange"),0<l.length&&(d=new Mn("onChange","change",null,d,m),o.push({event:d,listeners:l}))}var Ei=null,Ti=null;function pa(o){Ff(o,0)}function Ms(o){var l=Pr(o);if(be(l))return o}function Gi(o,l){if(o==="change")return l}var Io=!1;if(ir){var Ss;if(ir){var qs="oninput"in document;if(!qs){var zs=document.createElement("div");zs.setAttribute("oninput","return;"),qs=typeof zs.oninput=="function"}Ss=qs}else Ss=!1;Io=Ss&&(!document.documentMode||9<document.documentMode)}function ga(){Ei&&(Ei.detachEvent("onpropertychange",Ot),Ti=Ei=null)}function Ot(o){if(o.propertyName==="value"&&Ms(Ti)){var l=[];ha(l,Ti,o,Qt(o)),ar(pa,l)}}function ot(o,l,d){o==="focusin"?(ga(),Ei=l,Ti=d,Ei.attachEvent("onpropertychange",Ot)):o==="focusout"&&ga()}function rt(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Ms(Ti)}function ut(o,l){if(o==="click")return Ms(l)}function mt(o,l){if(o==="input"||o==="change")return Ms(l)}function xt(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var vt=typeof Object.is=="function"?Object.is:xt;function se(o,l){if(vt(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var d=Object.keys(o),m=Object.keys(l);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var E=d[m];if(!J.call(l,E)||!vt(o[E],l[E]))return!1}return!0}function yn(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function ue(o,l){var d=yn(o);o=0;for(var m;d;){if(d.nodeType===3){if(m=o+d.textContent.length,o<=l&&m>=l)return{node:d,offset:l-o};o=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=yn(d)}}function ui(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?ui(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function Es(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var l=_e(o.document);l instanceof o.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)o=l.contentWindow;else break;l=_e(o.document)}return l}function Ji(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}var Vs=ir&&"documentMode"in document&&11>=document.documentMode,pr=null,Rn=null,kn=null,pi=!1;function Hs(o,l,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;pi||pr==null||pr!==_e(m)||(m=pr,"selectionStart"in m&&Ji(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),kn&&se(kn,m)||(kn=m,m=sl(Rn,"onSelect"),0<m.length&&(l=new Mn("onSelect","select",null,l,d),o.push({event:l,listeners:m}),l.target=pr)))}function Jn(o,l){var d={};return d[o.toLowerCase()]=l.toLowerCase(),d["Webkit"+o]="webkit"+l,d["Moz"+o]="moz"+l,d}var Nt={animationend:Jn("Animation","AnimationEnd"),animationiteration:Jn("Animation","AnimationIteration"),animationstart:Jn("Animation","AnimationStart"),transitionrun:Jn("Transition","TransitionRun"),transitionstart:Jn("Transition","TransitionStart"),transitioncancel:Jn("Transition","TransitionCancel"),transitionend:Jn("Transition","TransitionEnd")},Zt={},Pt={};ir&&(Pt=document.createElement("div").style,"AnimationEvent"in window||(delete Nt.animationend.animation,delete Nt.animationiteration.animation,delete Nt.animationstart.animation),"TransitionEvent"in window||delete Nt.transitionend.transition);function Rr(o){if(Zt[o])return Zt[o];if(!Nt[o])return o;var l=Nt[o],d;for(d in l)if(l.hasOwnProperty(d)&&d in Pt)return Zt[o]=l[d];return o}var Kr=Rr("animationend"),Ts=Rr("animationiteration"),Qn=Rr("animationstart"),ma=Rr("transitionrun"),Ws=Rr("transitionstart"),Co=Rr("transitioncancel"),Ri=Rr("transitionend"),uc=new Map,Sl="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Sl.push("scrollEnd");function ci(o,l){uc.set(o,l),Sn(l,[o])}var ya=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},Zn=[],Ks=0,El=0;function ba(){for(var o=Ks,l=El=Ks=0;l<o;){var d=Zn[l];Zn[l++]=null;var m=Zn[l];Zn[l++]=null;var E=Zn[l];Zn[l++]=null;var C=Zn[l];if(Zn[l++]=null,m!==null&&E!==null){var W=m.pending;W===null?E.next=E:(E.next=W.next,W.next=E),m.pending=E}C!==0&&cc(d,E,C)}}function wa(o,l,d,m){Zn[Ks++]=o,Zn[Ks++]=l,Zn[Ks++]=d,Zn[Ks++]=m,El|=m,o.lanes|=m,o=o.alternate,o!==null&&(o.lanes|=m)}function Tl(o,l,d,m){return wa(o,l,d,m),va(o)}function Rs(o,l){return wa(o,null,null,l),va(o)}function cc(o,l,d){o.lanes|=d;var m=o.alternate;m!==null&&(m.lanes|=d);for(var E=!1,C=o.return;C!==null;)C.childLanes|=d,m=C.alternate,m!==null&&(m.childLanes|=d),C.tag===22&&(o=C.stateNode,o===null||o._visibility&1||(E=!0)),o=C,C=C.return;return o.tag===3?(C=o.stateNode,E&&l!==null&&(E=31-Tt(d),o=C.hiddenUpdates,m=o[E],m===null?o[E]=[l]:m.push(l),l.lane=d|536870912),C):null}function va(o){if(50<Zo)throw Zo=0,Pu=null,Error(n(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}var Gs={};function bh(o,l,d,m){this.tag=o,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ln(o,l,d,m){return new bh(o,l,d,m)}function Rl(o){return o=o.prototype,!(!o||!o.isReactComponent)}function xi(o,l){var d=o.alternate;return d===null?(d=Ln(o.tag,l,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=l,d.type=o.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=o.flags&65011712,d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,l=o.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d.refCleanup=o.refCleanup,d}function dc(o,l){o.flags&=65011714;var d=o.alternate;return d===null?(o.childLanes=0,o.lanes=l,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=d.childLanes,o.lanes=d.lanes,o.child=d.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=d.memoizedProps,o.memoizedState=d.memoizedState,o.updateQueue=d.updateQueue,o.type=d.type,l=d.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function Sa(o,l,d,m,E,C){var W=0;if(m=o,typeof o=="function")Rl(o)&&(W=1);else if(typeof o=="string")W=Ep(o,d,Fe.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case Ee:return o=Ln(31,d,l,E),o.elementType=Ee,o.lanes=C,o;case R:return xs(d.children,E,C,l);case T:W=8,E|=24;break;case A:return o=Ln(12,d,l,E|2),o.elementType=A,o.lanes=C,o;case O:return o=Ln(13,d,l,E),o.elementType=O,o.lanes=C,o;case K:return o=Ln(19,d,l,E),o.elementType=K,o.lanes=C,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case x:W=10;break e;case F:W=9;break e;case D:W=11;break e;case z:W=14;break e;case X:W=16,m=null;break e}W=29,d=Error(n(130,o===null?"null":typeof o,"")),m=null}return l=Ln(W,d,l,E),l.elementType=o,l.type=m,l.lanes=C,l}function xs(o,l,d,m){return o=Ln(7,o,m,l),o.lanes=d,o}function xl(o,l,d){return o=Ln(6,o,null,l),o.lanes=d,o}function fc(o){var l=Ln(18,null,null,0);return l.stateNode=o,l}function Al(o,l,d){return l=Ln(4,o.children!==null?o.children:[],o.key,l),l.lanes=d,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}var hc=new WeakMap;function Xn(o,l){if(typeof o=="object"&&o!==null){var d=hc.get(o);return d!==void 0?d:(l={value:o,source:l,stack:ve(l)},hc.set(o,l),l)}return{value:o,source:l,stack:ve(l)}}var Js=[],Qs=0,Ea=null,No=0,Yn=[],ei=0,Qi=null,gi=1,mi="";function Ai(o,l){Js[Qs++]=No,Js[Qs++]=Ea,Ea=o,No=l}function pc(o,l,d){Yn[ei++]=gi,Yn[ei++]=mi,Yn[ei++]=Qi,Qi=o;var m=gi;o=mi;var E=32-Tt(m)-1;m&=~(1<<E),d+=1;var C=32-Tt(l)+E;if(30<C){var W=E-E%5;C=(m&(1<<W)-1).toString(32),m>>=W,E-=W,gi=1<<32-Tt(l)+E|d<<E|m,mi=C+o}else gi=1<<C|d<<E|m,mi=o}function Il(o){o.return!==null&&(Ai(o,1),pc(o,1,0))}function Cl(o){for(;o===Ea;)Ea=Js[--Qs],Js[Qs]=null,No=Js[--Qs],Js[Qs]=null;for(;o===Qi;)Qi=Yn[--ei],Yn[ei]=null,mi=Yn[--ei],Yn[ei]=null,gi=Yn[--ei],Yn[ei]=null}function gc(o,l){Yn[ei++]=gi,Yn[ei++]=mi,Yn[ei++]=Qi,gi=l.id,mi=l.overflow,Qi=o}var ln=null,xr=null,Gt=!1,Zi=null,ti=!1,Nl=Error(n(519));function Xi(o){var l=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fo(Xn(l,o)),Nl}function mc(o){var l=o.stateNode,d=o.type,m=o.memoizedProps;switch(l[qt]=o,l[fr]=m,d){case"dialog":Vt("cancel",l),Vt("close",l);break;case"iframe":case"object":case"embed":Vt("load",l);break;case"video":case"audio":for(d=0;d<Yo.length;d++)Vt(Yo[d],l);break;case"source":Vt("error",l);break;case"img":case"image":case"link":Vt("error",l),Vt("load",l);break;case"details":Vt("toggle",l);break;case"input":Vt("invalid",l),We(l,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Vt("invalid",l);break;case"textarea":Vt("invalid",l),Se(l,m.value,m.defaultValue,m.children)}d=m.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||m.suppressHydrationWarning===!0||Lf(l.textContent,d)?(m.popover!=null&&(Vt("beforetoggle",l),Vt("toggle",l)),m.onScroll!=null&&Vt("scroll",l),m.onScrollEnd!=null&&Vt("scrollend",l),m.onClick!=null&&(l.onclick=wt),l=!0):l=!1,l||Xi(o,!0)}function yc(o){for(ln=o.return;ln;)switch(ln.tag){case 5:case 31:case 13:ti=!1;return;case 27:case 3:ti=!0;return;default:ln=ln.return}}function Zs(o){if(o!==ln)return!1;if(!Gt)return yc(o),Gt=!0,!1;var l=o.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=o.type,d=!(d!=="form"&&d!=="button")||Gu(o.type,o.memoizedProps)),d=!d),d&&xr&&Xi(o),yc(o),l===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(n(317));xr=Vf(o)}else if(l===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(n(317));xr=Vf(o)}else l===27?(l=xr,ps(o.type)?(o=Yu,Yu=null,xr=o):xr=l):xr=ln?ni(o.stateNode.nextSibling):null;return!0}function As(){xr=ln=null,Gt=!1}function Fl(){var o=Zi;return o!==null&&(Cn===null?Cn=o:Cn.push.apply(Cn,o),Zi=null),o}function Fo(o){Zi===null?Zi=[o]:Zi.push(o)}var Dl=G(null),Is=null,Ii=null;function Yi(o,l,d){oe(Dl,l._currentValue),l._currentValue=d}function Ci(o){o._currentValue=Dl.current,ce(Dl)}function Pl(o,l,d){for(;o!==null;){var m=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,m!==null&&(m.childLanes|=l)):m!==null&&(m.childLanes&l)!==l&&(m.childLanes|=l),o===d)break;o=o.return}}function kl(o,l,d,m){var E=o.child;for(E!==null&&(E.return=o);E!==null;){var C=E.dependencies;if(C!==null){var W=E.child;C=C.firstContext;e:for(;C!==null;){var le=C;C=E;for(var ke=0;ke<l.length;ke++)if(le.context===l[ke]){C.lanes|=d,le=C.alternate,le!==null&&(le.lanes|=d),Pl(C.return,d,o),m||(W=null);break e}C=le.next}}else if(E.tag===18){if(W=E.return,W===null)throw Error(n(341));W.lanes|=d,C=W.alternate,C!==null&&(C.lanes|=d),Pl(W,d,o),W=null}else W=E.child;if(W!==null)W.return=E;else for(W=E;W!==null;){if(W===o){W=null;break}if(E=W.sibling,E!==null){E.return=W.return,W=E;break}W=W.return}E=W}}function Xs(o,l,d,m){o=null;for(var E=l,C=!1;E!==null;){if(!C){if((E.flags&524288)!==0)C=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var W=E.alternate;if(W===null)throw Error(n(387));if(W=W.memoizedProps,W!==null){var le=E.type;vt(E.pendingProps.value,W.value)||(o!==null?o.push(le):o=[le])}}else if(E===He.current){if(W=E.alternate,W===null)throw Error(n(387));W.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(o!==null?o.push(ia):o=[ia])}E=E.return}o!==null&&kl(l,o,d,m),l.flags|=262144}function Ta(o){for(o=o.firstContext;o!==null;){if(!vt(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function Cs(o){Is=o,Ii=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function un(o){return bc(Is,o)}function Ra(o,l){return Is===null&&Cs(o),bc(o,l)}function bc(o,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},Ii===null){if(o===null)throw Error(n(308));Ii=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else Ii=Ii.next=l;return d}var _h=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(d,m){o.push(m)}};this.abort=function(){l.aborted=!0,o.forEach(function(d){return d()})}},wh=i.unstable_scheduleCallback,vh=i.unstable_NormalPriority,Gr={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ll(){return{controller:new _h,data:new Map,refCount:0}}function Do(o){o.refCount--,o.refCount===0&&wh(vh,function(){o.controller.abort()})}var Po=null,Ul=0,Ys=0,eo=null;function Sh(o,l){if(Po===null){var d=Po=[];Ul=0,Ys=ju(),eo={status:"pending",value:void 0,then:function(m){d.push(m)}}}return Ul++,l.then(_c,_c),l}function _c(){if(--Ul===0&&Po!==null){eo!==null&&(eo.status="fulfilled");var o=Po;Po=null,Ys=0,eo=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function Eh(o,l){var d=[],m={status:"pending",value:null,reason:null,then:function(E){d.push(E)}};return o.then(function(){m.status="fulfilled",m.value=l;for(var E=0;E<d.length;E++)(0,d[E])(l)},function(E){for(m.status="rejected",m.reason=E,E=0;E<d.length;E++)(0,d[E])(void 0)}),m}var wc=ye.S;ye.S=function(o,l){sf=ft(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&Sh(o,l),wc!==null&&wc(o,l)};var Ns=G(null);function Ol(){var o=Ns.current;return o!==null?o:_r.pooledCache}function xa(o,l){l===null?oe(Ns,Ns.current):oe(Ns,l.pool)}function vc(){var o=Ol();return o===null?null:{parent:Gr._currentValue,pool:o}}var to=Error(n(460)),$l=Error(n(474)),Aa=Error(n(542)),Ia={then:function(){}};function Sc(o){return o=o.status,o==="fulfilled"||o==="rejected"}function Ec(o,l,d){switch(d=o[d],d===void 0?o.push(l):d!==l&&(l.then(wt,wt),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,Rc(o),o;default:if(typeof l.status=="string")l.then(wt,wt);else{if(o=_r,o!==null&&100<o.shellSuspendCounter)throw Error(n(482));o=l,o.status="pending",o.then(function(m){if(l.status==="pending"){var E=l;E.status="fulfilled",E.value=m}},function(m){if(l.status==="pending"){var E=l;E.status="rejected",E.reason=m}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,Rc(o),o}throw Ds=l,to}}function Fs(o){try{var l=o._init;return l(o._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Ds=d,to):d}}var Ds=null;function Tc(){if(Ds===null)throw Error(n(459));var o=Ds;return Ds=null,o}function Rc(o){if(o===to||o===Aa)throw Error(n(483))}var ro=null,ko=0;function Ca(o){var l=ko;return ko+=1,ro===null&&(ro=[]),Ec(ro,o,l)}function Lo(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function Na(o,l){throw l.$$typeof===y?Error(n(525)):(o=Object.prototype.toString.call(l),Error(n(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o)))}function xc(o){function l(Ke,je){if(o){var Ze=Ke.deletions;Ze===null?(Ke.deletions=[je],Ke.flags|=16):Ze.push(je)}}function d(Ke,je){if(!o)return null;for(;je!==null;)l(Ke,je),je=je.sibling;return null}function m(Ke){for(var je=new Map;Ke!==null;)Ke.key!==null?je.set(Ke.key,Ke):je.set(Ke.index,Ke),Ke=Ke.sibling;return je}function E(Ke,je){return Ke=xi(Ke,je),Ke.index=0,Ke.sibling=null,Ke}function C(Ke,je,Ze){return Ke.index=Ze,o?(Ze=Ke.alternate,Ze!==null?(Ze=Ze.index,Ze<je?(Ke.flags|=67108866,je):Ze):(Ke.flags|=67108866,je)):(Ke.flags|=1048576,je)}function W(Ke){return o&&Ke.alternate===null&&(Ke.flags|=67108866),Ke}function le(Ke,je,Ze,ct){return je===null||je.tag!==6?(je=xl(Ze,Ke.mode,ct),je.return=Ke,je):(je=E(je,Ze),je.return=Ke,je)}function ke(Ke,je,Ze,ct){var At=Ze.type;return At===R?lt(Ke,je,Ze.props.children,ct,Ze.key):je!==null&&(je.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===X&&Fs(At)===je.type)?(je=E(je,Ze.props),Lo(je,Ze),je.return=Ke,je):(je=Sa(Ze.type,Ze.key,Ze.props,null,Ke.mode,ct),Lo(je,Ze),je.return=Ke,je)}function Ye(Ke,je,Ze,ct){return je===null||je.tag!==4||je.stateNode.containerInfo!==Ze.containerInfo||je.stateNode.implementation!==Ze.implementation?(je=Al(Ze,Ke.mode,ct),je.return=Ke,je):(je=E(je,Ze.children||[]),je.return=Ke,je)}function lt(Ke,je,Ze,ct,At){return je===null||je.tag!==7?(je=xs(Ze,Ke.mode,ct,At),je.return=Ke,je):(je=E(je,Ze),je.return=Ke,je)}function dt(Ke,je,Ze){if(typeof je=="string"&&je!==""||typeof je=="number"||typeof je=="bigint")return je=xl(""+je,Ke.mode,Ze),je.return=Ke,je;if(typeof je=="object"&&je!==null){switch(je.$$typeof){case S:return Ze=Sa(je.type,je.key,je.props,null,Ke.mode,Ze),Lo(Ze,je),Ze.return=Ke,Ze;case w:return je=Al(je,Ke.mode,Ze),je.return=Ke,je;case X:return je=Fs(je),dt(Ke,je,Ze)}if(ze(je)||Te(je))return je=xs(je,Ke.mode,Ze,null),je.return=Ke,je;if(typeof je.then=="function")return dt(Ke,Ca(je),Ze);if(je.$$typeof===x)return dt(Ke,Ra(Ke,je),Ze);Na(Ke,je)}return null}function tt(Ke,je,Ze,ct){var At=je!==null?je.key:null;if(typeof Ze=="string"&&Ze!==""||typeof Ze=="number"||typeof Ze=="bigint")return At!==null?null:le(Ke,je,""+Ze,ct);if(typeof Ze=="object"&&Ze!==null){switch(Ze.$$typeof){case S:return Ze.key===At?ke(Ke,je,Ze,ct):null;case w:return Ze.key===At?Ye(Ke,je,Ze,ct):null;case X:return Ze=Fs(Ze),tt(Ke,je,Ze,ct)}if(ze(Ze)||Te(Ze))return At!==null?null:lt(Ke,je,Ze,ct,null);if(typeof Ze.then=="function")return tt(Ke,je,Ca(Ze),ct);if(Ze.$$typeof===x)return tt(Ke,je,Ra(Ke,Ze),ct);Na(Ke,Ze)}return null}function it(Ke,je,Ze,ct,At){if(typeof ct=="string"&&ct!==""||typeof ct=="number"||typeof ct=="bigint")return Ke=Ke.get(Ze)||null,le(je,Ke,""+ct,At);if(typeof ct=="object"&&ct!==null){switch(ct.$$typeof){case S:return Ke=Ke.get(ct.key===null?Ze:ct.key)||null,ke(je,Ke,ct,At);case w:return Ke=Ke.get(ct.key===null?Ze:ct.key)||null,Ye(je,Ke,ct,At);case X:return ct=Fs(ct),it(Ke,je,Ze,ct,At)}if(ze(ct)||Te(ct))return Ke=Ke.get(Ze)||null,lt(je,Ke,ct,At,null);if(typeof ct.then=="function")return it(Ke,je,Ze,Ca(ct),At);if(ct.$$typeof===x)return it(Ke,je,Ze,Ra(je,ct),At);Na(je,ct)}return null}function St(Ke,je,Ze,ct){for(var At=null,er=null,Et=je,jt=je=0,Kt=null;Et!==null&&jt<Ze.length;jt++){Et.index>jt?(Kt=Et,Et=null):Kt=Et.sibling;var tr=tt(Ke,Et,Ze[jt],ct);if(tr===null){Et===null&&(Et=Kt);break}o&&Et&&tr.alternate===null&&l(Ke,Et),je=C(tr,je,jt),er===null?At=tr:er.sibling=tr,er=tr,Et=Kt}if(jt===Ze.length)return d(Ke,Et),Gt&&Ai(Ke,jt),At;if(Et===null){for(;jt<Ze.length;jt++)Et=dt(Ke,Ze[jt],ct),Et!==null&&(je=C(Et,je,jt),er===null?At=Et:er.sibling=Et,er=Et);return Gt&&Ai(Ke,jt),At}for(Et=m(Et);jt<Ze.length;jt++)Kt=it(Et,Ke,jt,Ze[jt],ct),Kt!==null&&(o&&Kt.alternate!==null&&Et.delete(Kt.key===null?jt:Kt.key),je=C(Kt,je,jt),er===null?At=Kt:er.sibling=Kt,er=Kt);return o&&Et.forEach(function(_s){return l(Ke,_s)}),Gt&&Ai(Ke,jt),At}function It(Ke,je,Ze,ct){if(Ze==null)throw Error(n(151));for(var At=null,er=null,Et=je,jt=je=0,Kt=null,tr=Ze.next();Et!==null&&!tr.done;jt++,tr=Ze.next()){Et.index>jt?(Kt=Et,Et=null):Kt=Et.sibling;var _s=tt(Ke,Et,tr.value,ct);if(_s===null){Et===null&&(Et=Kt);break}o&&Et&&_s.alternate===null&&l(Ke,Et),je=C(_s,je,jt),er===null?At=_s:er.sibling=_s,er=_s,Et=Kt}if(tr.done)return d(Ke,Et),Gt&&Ai(Ke,jt),At;if(Et===null){for(;!tr.done;jt++,tr=Ze.next())tr=dt(Ke,tr.value,ct),tr!==null&&(je=C(tr,je,jt),er===null?At=tr:er.sibling=tr,er=tr);return Gt&&Ai(Ke,jt),At}for(Et=m(Et);!tr.done;jt++,tr=Ze.next())tr=it(Et,Ke,jt,tr.value,ct),tr!==null&&(o&&tr.alternate!==null&&Et.delete(tr.key===null?jt:tr.key),je=C(tr,je,jt),er===null?At=tr:er.sibling=tr,er=tr);return o&&Et.forEach(function(kp){return l(Ke,kp)}),Gt&&Ai(Ke,jt),At}function yr(Ke,je,Ze,ct){if(typeof Ze=="object"&&Ze!==null&&Ze.type===R&&Ze.key===null&&(Ze=Ze.props.children),typeof Ze=="object"&&Ze!==null){switch(Ze.$$typeof){case S:e:{for(var At=Ze.key;je!==null;){if(je.key===At){if(At=Ze.type,At===R){if(je.tag===7){d(Ke,je.sibling),ct=E(je,Ze.props.children),ct.return=Ke,Ke=ct;break e}}else if(je.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===X&&Fs(At)===je.type){d(Ke,je.sibling),ct=E(je,Ze.props),Lo(ct,Ze),ct.return=Ke,Ke=ct;break e}d(Ke,je);break}else l(Ke,je);je=je.sibling}Ze.type===R?(ct=xs(Ze.props.children,Ke.mode,ct,Ze.key),ct.return=Ke,Ke=ct):(ct=Sa(Ze.type,Ze.key,Ze.props,null,Ke.mode,ct),Lo(ct,Ze),ct.return=Ke,Ke=ct)}return W(Ke);case w:e:{for(At=Ze.key;je!==null;){if(je.key===At)if(je.tag===4&&je.stateNode.containerInfo===Ze.containerInfo&&je.stateNode.implementation===Ze.implementation){d(Ke,je.sibling),ct=E(je,Ze.children||[]),ct.return=Ke,Ke=ct;break e}else{d(Ke,je);break}else l(Ke,je);je=je.sibling}ct=Al(Ze,Ke.mode,ct),ct.return=Ke,Ke=ct}return W(Ke);case X:return Ze=Fs(Ze),yr(Ke,je,Ze,ct)}if(ze(Ze))return St(Ke,je,Ze,ct);if(Te(Ze)){if(At=Te(Ze),typeof At!="function")throw Error(n(150));return Ze=At.call(Ze),It(Ke,je,Ze,ct)}if(typeof Ze.then=="function")return yr(Ke,je,Ca(Ze),ct);if(Ze.$$typeof===x)return yr(Ke,je,Ra(Ke,Ze),ct);Na(Ke,Ze)}return typeof Ze=="string"&&Ze!==""||typeof Ze=="number"||typeof Ze=="bigint"?(Ze=""+Ze,je!==null&&je.tag===6?(d(Ke,je.sibling),ct=E(je,Ze),ct.return=Ke,Ke=ct):(d(Ke,je),ct=xl(Ze,Ke.mode,ct),ct.return=Ke,Ke=ct),W(Ke)):d(Ke,je)}return function(Ke,je,Ze,ct){try{ko=0;var At=yr(Ke,je,Ze,ct);return ro=null,At}catch(Et){if(Et===to||Et===Aa)throw Et;var er=Ln(29,Et,null,Ke.mode);return er.lanes=ct,er.return=Ke,er}}}var Ps=xc(!0),Ac=xc(!1),es=!1;function jl(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bl(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function ts(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function rs(o,l,d){var m=o.updateQueue;if(m===null)return null;if(m=m.shared,(rr&2)!==0){var E=m.pending;return E===null?l.next=l:(l.next=E.next,E.next=l),m.pending=l,l=va(o),cc(o,null,d),l}return wa(o,m,l,d),va(o)}function Uo(o,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var m=l.lanes;m&=o.pendingLanes,d|=m,l.lanes=d,Ut(o,d)}}function Ml(o,l){var d=o.updateQueue,m=o.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var E=null,C=null;if(d=d.firstBaseUpdate,d!==null){do{var W={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};C===null?E=C=W:C=C.next=W,d=d.next}while(d!==null);C===null?E=C=l:C=C.next=l}else E=C=l;d={baseState:m.baseState,firstBaseUpdate:E,lastBaseUpdate:C,shared:m.shared,callbacks:m.callbacks},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=l:o.next=l,d.lastBaseUpdate=l}var ql=!1;function Oo(){if(ql){var o=eo;if(o!==null)throw o}}function $o(o,l,d,m){ql=!1;var E=o.updateQueue;es=!1;var C=E.firstBaseUpdate,W=E.lastBaseUpdate,le=E.shared.pending;if(le!==null){E.shared.pending=null;var ke=le,Ye=ke.next;ke.next=null,W===null?C=Ye:W.next=Ye,W=ke;var lt=o.alternate;lt!==null&&(lt=lt.updateQueue,le=lt.lastBaseUpdate,le!==W&&(le===null?lt.firstBaseUpdate=Ye:le.next=Ye,lt.lastBaseUpdate=ke))}if(C!==null){var dt=E.baseState;W=0,lt=Ye=ke=null,le=C;do{var tt=le.lane&-536870913,it=tt!==le.lane;if(it?(Wt&tt)===tt:(m&tt)===tt){tt!==0&&tt===Ys&&(ql=!0),lt!==null&&(lt=lt.next={lane:0,tag:le.tag,payload:le.payload,callback:null,next:null});e:{var St=o,It=le;tt=l;var yr=d;switch(It.tag){case 1:if(St=It.payload,typeof St=="function"){dt=St.call(yr,dt,tt);break e}dt=St;break e;case 3:St.flags=St.flags&-65537|128;case 0:if(St=It.payload,tt=typeof St=="function"?St.call(yr,dt,tt):St,tt==null)break e;dt=g({},dt,tt);break e;case 2:es=!0}}tt=le.callback,tt!==null&&(o.flags|=64,it&&(o.flags|=8192),it=E.callbacks,it===null?E.callbacks=[tt]:it.push(tt))}else it={lane:tt,tag:le.tag,payload:le.payload,callback:le.callback,next:null},lt===null?(Ye=lt=it,ke=dt):lt=lt.next=it,W|=tt;if(le=le.next,le===null){if(le=E.shared.pending,le===null)break;it=le,le=it.next,it.next=null,E.lastBaseUpdate=it,E.shared.pending=null}}while(!0);lt===null&&(ke=dt),E.baseState=ke,E.firstBaseUpdate=Ye,E.lastBaseUpdate=lt,C===null&&(E.shared.lanes=0),us|=W,o.lanes=W,o.memoizedState=dt}}function Ic(o,l){if(typeof o!="function")throw Error(n(191,o));o.call(l)}function Cc(o,l){var d=o.callbacks;if(d!==null)for(o.callbacks=null,o=0;o<d.length;o++)Ic(d[o],l)}var no=G(null),Fa=G(0);function Nc(o,l){o=$i,oe(Fa,o),oe(no,l),$i=o|l.baseLanes}function zl(){oe(Fa,$i),oe(no,no.current)}function Vl(){$i=Fa.current,ce(no),ce(Fa)}var Un=G(null),ri=null;function ss(o){var l=o.alternate;oe(qr,qr.current&1),oe(Un,o),ri===null&&(l===null||no.current!==null||l.memoizedState!==null)&&(ri=o)}function Hl(o){oe(qr,qr.current),oe(Un,o),ri===null&&(ri=o)}function Fc(o){o.tag===22?(oe(qr,qr.current),oe(Un,o),ri===null&&(ri=o)):os()}function os(){oe(qr,qr.current),oe(Un,Un.current)}function On(o){ce(Un),ri===o&&(ri=null),ce(qr)}var qr=G(0);function Da(o){for(var l=o;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||Zu(d)||Xu(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Ni=0,$t=null,gr=null,Jr=null,Pa=!1,io=!1,ks=!1,ka=0,jo=0,so=null,Th=0;function jr(){throw Error(n(321))}function Wl(o,l){if(l===null)return!1;for(var d=0;d<l.length&&d<o.length;d++)if(!vt(o[d],l[d]))return!1;return!0}function Kl(o,l,d,m,E,C){return Ni=C,$t=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,ye.H=o===null||o.memoizedState===null?gd:lu,ks=!1,C=d(m,E),ks=!1,io&&(C=Pc(l,d,m,E)),Dc(o),C}function Dc(o){ye.H=qo;var l=gr!==null&&gr.next!==null;if(Ni=0,Jr=gr=$t=null,Pa=!1,jo=0,so=null,l)throw Error(n(300));o===null||Qr||(o=o.dependencies,o!==null&&Ta(o)&&(Qr=!0))}function Pc(o,l,d,m){$t=o;var E=0;do{if(io&&(so=null),jo=0,io=!1,25<=E)throw Error(n(301));if(E+=1,Jr=gr=null,o.updateQueue!=null){var C=o.updateQueue;C.lastEffect=null,C.events=null,C.stores=null,C.memoCache!=null&&(C.memoCache.index=0)}ye.H=md,C=l(d,m)}while(io);return C}function Rh(){var o=ye.H,l=o.useState()[0];return l=typeof l.then=="function"?Bo(l):l,o=o.useState()[0],(gr!==null?gr.memoizedState:null)!==o&&($t.flags|=1024),l}function Gl(){var o=ka!==0;return ka=0,o}function Jl(o,l,d){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~d}function Ql(o){if(Pa){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}Pa=!1}Ni=0,Jr=gr=$t=null,io=!1,jo=ka=0,so=null}function wn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jr===null?$t.memoizedState=Jr=o:Jr=Jr.next=o,Jr}function zr(){if(gr===null){var o=$t.alternate;o=o!==null?o.memoizedState:null}else o=gr.next;var l=Jr===null?$t.memoizedState:Jr.next;if(l!==null)Jr=l,gr=o;else{if(o===null)throw $t.alternate===null?Error(n(467)):Error(n(310));gr=o,o={memoizedState:gr.memoizedState,baseState:gr.baseState,baseQueue:gr.baseQueue,queue:gr.queue,next:null},Jr===null?$t.memoizedState=Jr=o:Jr=Jr.next=o}return Jr}function La(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bo(o){var l=jo;return jo+=1,so===null&&(so=[]),o=Ec(so,o,l),l=$t,(Jr===null?l.memoizedState:Jr.next)===null&&(l=l.alternate,ye.H=l===null||l.memoizedState===null?gd:lu),o}function Ua(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Bo(o);if(o.$$typeof===x)return un(o)}throw Error(n(438,String(o)))}function Zl(o){var l=null,d=$t.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var m=$t.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(l={data:m.data.map(function(E){return E.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=La(),$t.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(o),m=0;m<o;m++)d[m]=q;return l.index++,d}function Fi(o,l){return typeof l=="function"?l(o):l}function Oa(o){var l=zr();return Xl(l,gr,o)}function Xl(o,l,d){var m=o.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=d;var E=o.baseQueue,C=m.pending;if(C!==null){if(E!==null){var W=E.next;E.next=C.next,C.next=W}l.baseQueue=E=C,m.pending=null}if(C=o.baseState,E===null)o.memoizedState=C;else{l=E.next;var le=W=null,ke=null,Ye=l,lt=!1;do{var dt=Ye.lane&-536870913;if(dt!==Ye.lane?(Wt&dt)===dt:(Ni&dt)===dt){var tt=Ye.revertLane;if(tt===0)ke!==null&&(ke=ke.next={lane:0,revertLane:0,gesture:null,action:Ye.action,hasEagerState:Ye.hasEagerState,eagerState:Ye.eagerState,next:null}),dt===Ys&&(lt=!0);else if((Ni&tt)===tt){Ye=Ye.next,tt===Ys&&(lt=!0);continue}else dt={lane:0,revertLane:Ye.revertLane,gesture:null,action:Ye.action,hasEagerState:Ye.hasEagerState,eagerState:Ye.eagerState,next:null},ke===null?(le=ke=dt,W=C):ke=ke.next=dt,$t.lanes|=tt,us|=tt;dt=Ye.action,ks&&d(C,dt),C=Ye.hasEagerState?Ye.eagerState:d(C,dt)}else tt={lane:dt,revertLane:Ye.revertLane,gesture:Ye.gesture,action:Ye.action,hasEagerState:Ye.hasEagerState,eagerState:Ye.eagerState,next:null},ke===null?(le=ke=tt,W=C):ke=ke.next=tt,$t.lanes|=dt,us|=dt;Ye=Ye.next}while(Ye!==null&&Ye!==l);if(ke===null?W=C:ke.next=le,!vt(C,o.memoizedState)&&(Qr=!0,lt&&(d=eo,d!==null)))throw d;o.memoizedState=C,o.baseState=W,o.baseQueue=ke,m.lastRenderedState=C}return E===null&&(m.lanes=0),[o.memoizedState,m.dispatch]}function Yl(o){var l=zr(),d=l.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=o;var m=d.dispatch,E=d.pending,C=l.memoizedState;if(E!==null){d.pending=null;var W=E=E.next;do C=o(C,W.action),W=W.next;while(W!==E);vt(C,l.memoizedState)||(Qr=!0),l.memoizedState=C,l.baseQueue===null&&(l.baseState=C),d.lastRenderedState=C}return[C,m]}function kc(o,l,d){var m=$t,E=zr(),C=Gt;if(C){if(d===void 0)throw Error(n(407));d=d()}else d=l();var W=!vt((gr||E).memoizedState,d);if(W&&(E.memoizedState=d,Qr=!0),E=E.queue,ru(Oc.bind(null,m,E,o),[o]),E.getSnapshot!==l||W||Jr!==null&&Jr.memoizedState.tag&1){if(m.flags|=2048,oo(9,{destroy:void 0},Uc.bind(null,m,E,d,l),null),_r===null)throw Error(n(349));C||(Ni&127)!==0||Lc(m,l,d)}return d}function Lc(o,l,d){o.flags|=16384,o={getSnapshot:l,value:d},l=$t.updateQueue,l===null?(l=La(),$t.updateQueue=l,l.stores=[o]):(d=l.stores,d===null?l.stores=[o]:d.push(o))}function Uc(o,l,d,m){l.value=d,l.getSnapshot=m,$c(l)&&jc(o)}function Oc(o,l,d){return d(function(){$c(l)&&jc(o)})}function $c(o){var l=o.getSnapshot;o=o.value;try{var d=l();return!vt(o,d)}catch{return!0}}function jc(o){var l=Rs(o,2);l!==null&&Nn(l,o,2)}function eu(o){var l=wn();if(typeof o=="function"){var d=o;if(o=d(),ks){_t(!0);try{d()}finally{_t(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fi,lastRenderedState:o},l}function Bc(o,l,d,m){return o.baseState=d,Xl(o,gr,typeof m=="function"?m:Fi)}function xh(o,l,d,m,E){if(Ba(o))throw Error(n(485));if(o=l.action,o!==null){var C={payload:E,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(W){C.listeners.push(W)}};ye.T!==null?d(!0):C.isTransition=!1,m(C),d=l.pending,d===null?(C.next=l.pending=C,Mc(l,C)):(C.next=d.next,l.pending=d.next=C)}}function Mc(o,l){var d=l.action,m=l.payload,E=o.state;if(l.isTransition){var C=ye.T,W={};ye.T=W;try{var le=d(E,m),ke=ye.S;ke!==null&&ke(W,le),qc(o,l,le)}catch(Ye){tu(o,l,Ye)}finally{C!==null&&W.types!==null&&(C.types=W.types),ye.T=C}}else try{C=d(E,m),qc(o,l,C)}catch(Ye){tu(o,l,Ye)}}function qc(o,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(m){zc(o,l,m)},function(m){return tu(o,l,m)}):zc(o,l,d)}function zc(o,l,d){l.status="fulfilled",l.value=d,Vc(l),o.state=d,l=o.pending,l!==null&&(d=l.next,d===l?o.pending=null:(d=d.next,l.next=d,Mc(o,d)))}function tu(o,l,d){var m=o.pending;if(o.pending=null,m!==null){m=m.next;do l.status="rejected",l.reason=d,Vc(l),l=l.next;while(l!==m)}o.action=null}function Vc(o){o=o.listeners;for(var l=0;l<o.length;l++)(0,o[l])()}function Hc(o,l){return l}function Wc(o,l){if(Gt){var d=_r.formState;if(d!==null){e:{var m=$t;if(Gt){if(xr){t:{for(var E=xr,C=ti;E.nodeType!==8;){if(!C){E=null;break t}if(E=ni(E.nextSibling),E===null){E=null;break t}}C=E.data,E=C==="F!"||C==="F"?E:null}if(E){xr=ni(E.nextSibling),m=E.data==="F!";break e}}Xi(m)}m=!1}m&&(l=d[0])}}return d=wn(),d.memoizedState=d.baseState=l,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hc,lastRenderedState:l},d.queue=m,d=fd.bind(null,$t,m),m.dispatch=d,m=eu(!1),C=au.bind(null,$t,!1,m.queue),m=wn(),E={state:l,dispatch:null,action:o,pending:null},m.queue=E,d=xh.bind(null,$t,E,C,d),E.dispatch=d,m.memoizedState=o,[l,d,!1]}function Kc(o){var l=zr();return Gc(l,gr,o)}function Gc(o,l,d){if(l=Xl(o,l,Hc)[0],o=Oa(Fi)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var m=Bo(l)}catch(W){throw W===to?Aa:W}else m=l;l=zr();var E=l.queue,C=E.dispatch;return d!==l.memoizedState&&($t.flags|=2048,oo(9,{destroy:void 0},Ah.bind(null,E,d),null)),[m,C,o]}function Ah(o,l){o.action=l}function Jc(o){var l=zr(),d=gr;if(d!==null)return Gc(l,d,o);zr(),l=l.memoizedState,d=zr();var m=d.queue.dispatch;return d.memoizedState=o,[l,m,!1]}function oo(o,l,d,m){return o={tag:o,create:d,deps:m,inst:l,next:null},l=$t.updateQueue,l===null&&(l=La(),$t.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=o.next=o:(m=d.next,d.next=o,o.next=m,l.lastEffect=o),o}function Qc(){return zr().memoizedState}function $a(o,l,d,m){var E=wn();$t.flags|=o,E.memoizedState=oo(1|l,{destroy:void 0},d,m===void 0?null:m)}function ja(o,l,d,m){var E=zr();m=m===void 0?null:m;var C=E.memoizedState.inst;gr!==null&&m!==null&&Wl(m,gr.memoizedState.deps)?E.memoizedState=oo(l,C,d,m):($t.flags|=o,E.memoizedState=oo(1|l,C,d,m))}function Zc(o,l){$a(8390656,8,o,l)}function ru(o,l){ja(2048,8,o,l)}function Ih(o){$t.flags|=4;var l=$t.updateQueue;if(l===null)l=La(),$t.updateQueue=l,l.events=[o];else{var d=l.events;d===null?l.events=[o]:d.push(o)}}function Xc(o){var l=zr().memoizedState;return Ih({ref:l,nextImpl:o}),function(){if((rr&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}function Yc(o,l){return ja(4,2,o,l)}function ed(o,l){return ja(4,4,o,l)}function td(o,l){if(typeof l=="function"){o=o();var d=l(o);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function rd(o,l,d){d=d!=null?d.concat([o]):null,ja(4,4,td.bind(null,l,o),d)}function nu(){}function nd(o,l){var d=zr();l=l===void 0?null:l;var m=d.memoizedState;return l!==null&&Wl(l,m[1])?m[0]:(d.memoizedState=[o,l],o)}function sd(o,l){var d=zr();l=l===void 0?null:l;var m=d.memoizedState;if(l!==null&&Wl(l,m[1]))return m[0];if(m=o(),ks){_t(!0);try{o()}finally{_t(!1)}}return d.memoizedState=[m,l],m}function iu(o,l,d){return d===void 0||(Ni&1073741824)!==0&&(Wt&261930)===0?o.memoizedState=l:(o.memoizedState=d,o=af(),$t.lanes|=o,us|=o,d)}function od(o,l,d,m){return vt(d,l)?d:no.current!==null?(o=iu(o,d,m),vt(o,l)||(Qr=!0),o):(Ni&42)===0||(Ni&1073741824)!==0&&(Wt&261930)===0?(Qr=!0,o.memoizedState=d):(o=af(),$t.lanes|=o,us|=o,l)}function ad(o,l,d,m,E){var C=Ve.p;Ve.p=C!==0&&8>C?C:8;var W=ye.T,le={};ye.T=le,au(o,!1,l,d);try{var ke=E(),Ye=ye.S;if(Ye!==null&&Ye(le,ke),ke!==null&&typeof ke=="object"&&typeof ke.then=="function"){var lt=Eh(ke,m);Mo(o,l,lt,Bn(o))}else Mo(o,l,m,Bn(o))}catch(dt){Mo(o,l,{then:function(){},status:"rejected",reason:dt},Bn())}finally{Ve.p=C,W!==null&&le.types!==null&&(W.types=le.types),ye.T=W}}function Ch(){}function su(o,l,d,m){if(o.tag!==5)throw Error(n(476));var E=ld(o).queue;ad(o,E,l,pe,d===null?Ch:function(){return ud(o),d(m)})}function ld(o){var l=o.memoizedState;if(l!==null)return l;l={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fi,lastRenderedState:pe},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fi,lastRenderedState:d},next:null},o.memoizedState=l,o=o.alternate,o!==null&&(o.memoizedState=l),l}function ud(o){var l=ld(o);l.next===null&&(l=o.alternate.memoizedState),Mo(o,l.next.queue,{},Bn())}function ou(){return un(ia)}function cd(){return zr().memoizedState}function dd(){return zr().memoizedState}function Nh(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var d=Bn();o=ts(d);var m=rs(l,o,d);m!==null&&(Nn(m,l,d),Uo(m,l,d)),l={cache:Ll()},o.payload=l;return}l=l.return}}function Fh(o,l,d){var m=Bn();d={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Ba(o)?hd(l,d):(d=Tl(o,l,d,m),d!==null&&(Nn(d,o,m),pd(d,l,m)))}function fd(o,l,d){var m=Bn();Mo(o,l,d,m)}function Mo(o,l,d,m){var E={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Ba(o))hd(l,E);else{var C=o.alternate;if(o.lanes===0&&(C===null||C.lanes===0)&&(C=l.lastRenderedReducer,C!==null))try{var W=l.lastRenderedState,le=C(W,d);if(E.hasEagerState=!0,E.eagerState=le,vt(le,W))return wa(o,l,E,0),_r===null&&ba(),!1}catch{}if(d=Tl(o,l,E,m),d!==null)return Nn(d,o,m),pd(d,l,m),!0}return!1}function au(o,l,d,m){if(m={lane:2,revertLane:ju(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Ba(o)){if(l)throw Error(n(479))}else l=Tl(o,d,m,2),l!==null&&Nn(l,o,2)}function Ba(o){var l=o.alternate;return o===$t||l!==null&&l===$t}function hd(o,l){io=Pa=!0;var d=o.pending;d===null?l.next=l:(l.next=d.next,d.next=l),o.pending=l}function pd(o,l,d){if((d&4194048)!==0){var m=l.lanes;m&=o.pendingLanes,d|=m,l.lanes=d,Ut(o,d)}}var qo={readContext:un,use:Ua,useCallback:jr,useContext:jr,useEffect:jr,useImperativeHandle:jr,useLayoutEffect:jr,useInsertionEffect:jr,useMemo:jr,useReducer:jr,useRef:jr,useState:jr,useDebugValue:jr,useDeferredValue:jr,useTransition:jr,useSyncExternalStore:jr,useId:jr,useHostTransitionStatus:jr,useFormState:jr,useActionState:jr,useOptimistic:jr,useMemoCache:jr,useCacheRefresh:jr};qo.useEffectEvent=jr;var gd={readContext:un,use:Ua,useCallback:function(o,l){return wn().memoizedState=[o,l===void 0?null:l],o},useContext:un,useEffect:Zc,useImperativeHandle:function(o,l,d){d=d!=null?d.concat([o]):null,$a(4194308,4,td.bind(null,l,o),d)},useLayoutEffect:function(o,l){return $a(4194308,4,o,l)},useInsertionEffect:function(o,l){$a(4,2,o,l)},useMemo:function(o,l){var d=wn();l=l===void 0?null:l;var m=o();if(ks){_t(!0);try{o()}finally{_t(!1)}}return d.memoizedState=[m,l],m},useReducer:function(o,l,d){var m=wn();if(d!==void 0){var E=d(l);if(ks){_t(!0);try{d(l)}finally{_t(!1)}}}else E=l;return m.memoizedState=m.baseState=E,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:E},m.queue=o,o=o.dispatch=Fh.bind(null,$t,o),[m.memoizedState,o]},useRef:function(o){var l=wn();return o={current:o},l.memoizedState=o},useState:function(o){o=eu(o);var l=o.queue,d=fd.bind(null,$t,l);return l.dispatch=d,[o.memoizedState,d]},useDebugValue:nu,useDeferredValue:function(o,l){var d=wn();return iu(d,o,l)},useTransition:function(){var o=eu(!1);return o=ad.bind(null,$t,o.queue,!0,!1),wn().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,d){var m=$t,E=wn();if(Gt){if(d===void 0)throw Error(n(407));d=d()}else{if(d=l(),_r===null)throw Error(n(349));(Wt&127)!==0||Lc(m,l,d)}E.memoizedState=d;var C={value:d,getSnapshot:l};return E.queue=C,Zc(Oc.bind(null,m,C,o),[o]),m.flags|=2048,oo(9,{destroy:void 0},Uc.bind(null,m,C,d,l),null),d},useId:function(){var o=wn(),l=_r.identifierPrefix;if(Gt){var d=mi,m=gi;d=(m&~(1<<32-Tt(m)-1)).toString(32)+d,l="_"+l+"R_"+d,d=ka++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=Th++,l="_"+l+"r_"+d.toString(32)+"_";return o.memoizedState=l},useHostTransitionStatus:ou,useFormState:Wc,useActionState:Wc,useOptimistic:function(o){var l=wn();l.memoizedState=l.baseState=o;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=au.bind(null,$t,!0,d),d.dispatch=l,[o,l]},useMemoCache:Zl,useCacheRefresh:function(){return wn().memoizedState=Nh.bind(null,$t)},useEffectEvent:function(o){var l=wn(),d={impl:o};return l.memoizedState=d,function(){if((rr&2)!==0)throw Error(n(440));return d.impl.apply(void 0,arguments)}}},lu={readContext:un,use:Ua,useCallback:nd,useContext:un,useEffect:ru,useImperativeHandle:rd,useInsertionEffect:Yc,useLayoutEffect:ed,useMemo:sd,useReducer:Oa,useRef:Qc,useState:function(){return Oa(Fi)},useDebugValue:nu,useDeferredValue:function(o,l){var d=zr();return od(d,gr.memoizedState,o,l)},useTransition:function(){var o=Oa(Fi)[0],l=zr().memoizedState;return[typeof o=="boolean"?o:Bo(o),l]},useSyncExternalStore:kc,useId:cd,useHostTransitionStatus:ou,useFormState:Kc,useActionState:Kc,useOptimistic:function(o,l){var d=zr();return Bc(d,gr,o,l)},useMemoCache:Zl,useCacheRefresh:dd};lu.useEffectEvent=Xc;var md={readContext:un,use:Ua,useCallback:nd,useContext:un,useEffect:ru,useImperativeHandle:rd,useInsertionEffect:Yc,useLayoutEffect:ed,useMemo:sd,useReducer:Yl,useRef:Qc,useState:function(){return Yl(Fi)},useDebugValue:nu,useDeferredValue:function(o,l){var d=zr();return gr===null?iu(d,o,l):od(d,gr.memoizedState,o,l)},useTransition:function(){var o=Yl(Fi)[0],l=zr().memoizedState;return[typeof o=="boolean"?o:Bo(o),l]},useSyncExternalStore:kc,useId:cd,useHostTransitionStatus:ou,useFormState:Jc,useActionState:Jc,useOptimistic:function(o,l){var d=zr();return gr!==null?Bc(d,gr,o,l):(d.baseState=o,[o,d.queue.dispatch])},useMemoCache:Zl,useCacheRefresh:dd};md.useEffectEvent=Xc;function uu(o,l,d,m){l=o.memoizedState,d=d(m,l),d=d==null?l:g({},l,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var cu={enqueueSetState:function(o,l,d){o=o._reactInternals;var m=Bn(),E=ts(m);E.payload=l,d!=null&&(E.callback=d),l=rs(o,E,m),l!==null&&(Nn(l,o,m),Uo(l,o,m))},enqueueReplaceState:function(o,l,d){o=o._reactInternals;var m=Bn(),E=ts(m);E.tag=1,E.payload=l,d!=null&&(E.callback=d),l=rs(o,E,m),l!==null&&(Nn(l,o,m),Uo(l,o,m))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var d=Bn(),m=ts(d);m.tag=2,l!=null&&(m.callback=l),l=rs(o,m,d),l!==null&&(Nn(l,o,d),Uo(l,o,d))}};function yd(o,l,d,m,E,C,W){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(m,C,W):l.prototype&&l.prototype.isPureReactComponent?!se(d,m)||!se(E,C):!0}function bd(o,l,d,m){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,m),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,m),l.state!==o&&cu.enqueueReplaceState(l,l.state,null)}function Ls(o,l){var d=l;if("ref"in l){d={};for(var m in l)m!=="ref"&&(d[m]=l[m])}if(o=o.defaultProps){d===l&&(d=g({},d));for(var E in o)d[E]===void 0&&(d[E]=o[E])}return d}function _d(o){ya(o)}function wd(o){console.error(o)}function vd(o){ya(o)}function Ma(o,l){try{var d=o.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(m){setTimeout(function(){throw m})}}function Sd(o,l,d){try{var m=o.onCaughtError;m(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function du(o,l,d){return d=ts(d),d.tag=3,d.payload={element:null},d.callback=function(){Ma(o,l)},d}function Ed(o){return o=ts(o),o.tag=3,o}function Td(o,l,d,m){var E=d.type.getDerivedStateFromError;if(typeof E=="function"){var C=m.value;o.payload=function(){return E(C)},o.callback=function(){Sd(l,d,m)}}var W=d.stateNode;W!==null&&typeof W.componentDidCatch=="function"&&(o.callback=function(){Sd(l,d,m),typeof E!="function"&&(cs===null?cs=new Set([this]):cs.add(this));var le=m.stack;this.componentDidCatch(m.value,{componentStack:le!==null?le:""})})}function Dh(o,l,d,m,E){if(d.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(l=d.alternate,l!==null&&Xs(l,d,E,!0),d=Un.current,d!==null){switch(d.tag){case 31:case 13:return ri===null?Ya():d.alternate===null&&Br===0&&(Br=3),d.flags&=-257,d.flags|=65536,d.lanes=E,m===Ia?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([m]):l.add(m),Uu(o,m,E)),!1;case 22:return d.flags|=65536,m===Ia?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([m])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([m]):d.add(m)),Uu(o,m,E)),!1}throw Error(n(435,d.tag))}return Uu(o,m,E),Ya(),!1}if(Gt)return l=Un.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=E,m!==Nl&&(o=Error(n(422),{cause:m}),Fo(Xn(o,d)))):(m!==Nl&&(l=Error(n(423),{cause:m}),Fo(Xn(l,d))),o=o.current.alternate,o.flags|=65536,E&=-E,o.lanes|=E,m=Xn(m,d),E=du(o.stateNode,m,E),Ml(o,E),Br!==4&&(Br=2)),!1;var C=Error(n(520),{cause:m});if(C=Xn(C,d),Qo===null?Qo=[C]:Qo.push(C),Br!==4&&(Br=2),l===null)return!0;m=Xn(m,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,o=E&-E,d.lanes|=o,o=du(d.stateNode,m,o),Ml(d,o),!1;case 1:if(l=d.type,C=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(cs===null||!cs.has(C))))return d.flags|=65536,E&=-E,d.lanes|=E,E=Ed(E),Td(E,o,d,m),Ml(d,E),!1}d=d.return}while(d!==null);return!1}var fu=Error(n(461)),Qr=!1;function dn(o,l,d,m){l.child=o===null?Ac(l,null,d,m):Ps(l,o.child,d,m)}function Rd(o,l,d,m,E){d=d.render;var C=l.ref;if("ref"in m){var W={};for(var le in m)le!=="ref"&&(W[le]=m[le])}else W=m;return Cs(l),m=Kl(o,l,d,W,C,E),le=Gl(),o!==null&&!Qr?(Jl(o,l,E),Di(o,l,E)):(Gt&&le&&Il(l),l.flags|=1,dn(o,l,m,E),l.child)}function xd(o,l,d,m,E){if(o===null){var C=d.type;return typeof C=="function"&&!Rl(C)&&C.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=C,Ad(o,l,C,m,E)):(o=Sa(d.type,null,m,l,l.mode,E),o.ref=l.ref,o.return=l,l.child=o)}if(C=o.child,!wu(o,E)){var W=C.memoizedProps;if(d=d.compare,d=d!==null?d:se,d(W,m)&&o.ref===l.ref)return Di(o,l,E)}return l.flags|=1,o=xi(C,m),o.ref=l.ref,o.return=l,l.child=o}function Ad(o,l,d,m,E){if(o!==null){var C=o.memoizedProps;if(se(C,m)&&o.ref===l.ref)if(Qr=!1,l.pendingProps=m=C,wu(o,E))(o.flags&131072)!==0&&(Qr=!0);else return l.lanes=o.lanes,Di(o,l,E)}return hu(o,l,d,m,E)}function Id(o,l,d,m){var E=m.children,C=o!==null?o.memoizedState:null;if(o===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((l.flags&128)!==0){if(C=C!==null?C.baseLanes|d:d,o!==null){for(m=l.child=o.child,E=0;m!==null;)E=E|m.lanes|m.childLanes,m=m.sibling;m=E&~C}else m=0,l.child=null;return Cd(o,l,C,d,m)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&xa(l,C!==null?C.cachePool:null),C!==null?Nc(l,C):zl(),Fc(l);else return m=l.lanes=536870912,Cd(o,l,C!==null?C.baseLanes|d:d,d,m)}else C!==null?(xa(l,C.cachePool),Nc(l,C),os(),l.memoizedState=null):(o!==null&&xa(l,null),zl(),os());return dn(o,l,E,d),l.child}function zo(o,l){return o!==null&&o.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Cd(o,l,d,m,E){var C=Ol();return C=C===null?null:{parent:Gr._currentValue,pool:C},l.memoizedState={baseLanes:d,cachePool:C},o!==null&&xa(l,null),zl(),Fc(l),o!==null&&Xs(o,l,m,!0),l.childLanes=E,null}function qa(o,l){return l=Va({mode:l.mode,children:l.children},o.mode),l.ref=o.ref,o.child=l,l.return=o,l}function Nd(o,l,d){return Ps(l,o.child,null,d),o=qa(l,l.pendingProps),o.flags|=2,On(l),l.memoizedState=null,o}function Ph(o,l,d){var m=l.pendingProps,E=(l.flags&128)!==0;if(l.flags&=-129,o===null){if(Gt){if(m.mode==="hidden")return o=qa(l,m),l.lanes=536870912,zo(null,o);if(Hl(l),(o=xr)?(o=zf(o,ti),o=o!==null&&o.data==="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:Qi!==null?{id:gi,overflow:mi}:null,retryLane:536870912,hydrationErrors:null},d=fc(o),d.return=l,l.child=d,ln=l,xr=null)):o=null,o===null)throw Xi(l);return l.lanes=536870912,null}return qa(l,m)}var C=o.memoizedState;if(C!==null){var W=C.dehydrated;if(Hl(l),E)if(l.flags&256)l.flags&=-257,l=Nd(o,l,d);else if(l.memoizedState!==null)l.child=o.child,l.flags|=128,l=null;else throw Error(n(558));else if(Qr||Xs(o,l,d,!1),E=(d&o.childLanes)!==0,Qr||E){if(m=_r,m!==null&&(W=Ht(m,d),W!==0&&W!==C.retryLane))throw C.retryLane=W,Rs(o,W),Nn(m,o,W),fu;Ya(),l=Nd(o,l,d)}else o=C.treeContext,xr=ni(W.nextSibling),ln=l,Gt=!0,Zi=null,ti=!1,o!==null&&gc(l,o),l=qa(l,m),l.flags|=4096;return l}return o=xi(o.child,{mode:m.mode,children:m.children}),o.ref=l.ref,l.child=o,o.return=l,o}function za(o,l){var d=l.ref;if(d===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(n(284));(o===null||o.ref!==d)&&(l.flags|=4194816)}}function hu(o,l,d,m,E){return Cs(l),d=Kl(o,l,d,m,void 0,E),m=Gl(),o!==null&&!Qr?(Jl(o,l,E),Di(o,l,E)):(Gt&&m&&Il(l),l.flags|=1,dn(o,l,d,E),l.child)}function Fd(o,l,d,m,E,C){return Cs(l),l.updateQueue=null,d=Pc(l,m,d,E),Dc(o),m=Gl(),o!==null&&!Qr?(Jl(o,l,C),Di(o,l,C)):(Gt&&m&&Il(l),l.flags|=1,dn(o,l,d,C),l.child)}function Dd(o,l,d,m,E){if(Cs(l),l.stateNode===null){var C=Gs,W=d.contextType;typeof W=="object"&&W!==null&&(C=un(W)),C=new d(m,C),l.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,C.updater=cu,l.stateNode=C,C._reactInternals=l,C=l.stateNode,C.props=m,C.state=l.memoizedState,C.refs={},jl(l),W=d.contextType,C.context=typeof W=="object"&&W!==null?un(W):Gs,C.state=l.memoizedState,W=d.getDerivedStateFromProps,typeof W=="function"&&(uu(l,d,W,m),C.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(W=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),W!==C.state&&cu.enqueueReplaceState(C,C.state,null),$o(l,m,C,E),Oo(),C.state=l.memoizedState),typeof C.componentDidMount=="function"&&(l.flags|=4194308),m=!0}else if(o===null){C=l.stateNode;var le=l.memoizedProps,ke=Ls(d,le);C.props=ke;var Ye=C.context,lt=d.contextType;W=Gs,typeof lt=="object"&&lt!==null&&(W=un(lt));var dt=d.getDerivedStateFromProps;lt=typeof dt=="function"||typeof C.getSnapshotBeforeUpdate=="function",le=l.pendingProps!==le,lt||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(le||Ye!==W)&&bd(l,C,m,W),es=!1;var tt=l.memoizedState;C.state=tt,$o(l,m,C,E),Oo(),Ye=l.memoizedState,le||tt!==Ye||es?(typeof dt=="function"&&(uu(l,d,dt,m),Ye=l.memoizedState),(ke=es||yd(l,d,ke,m,tt,Ye,W))?(lt||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(l.flags|=4194308)):(typeof C.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=m,l.memoizedState=Ye),C.props=m,C.state=Ye,C.context=W,m=ke):(typeof C.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{C=l.stateNode,Bl(o,l),W=l.memoizedProps,lt=Ls(d,W),C.props=lt,dt=l.pendingProps,tt=C.context,Ye=d.contextType,ke=Gs,typeof Ye=="object"&&Ye!==null&&(ke=un(Ye)),le=d.getDerivedStateFromProps,(Ye=typeof le=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(W!==dt||tt!==ke)&&bd(l,C,m,ke),es=!1,tt=l.memoizedState,C.state=tt,$o(l,m,C,E),Oo();var it=l.memoizedState;W!==dt||tt!==it||es||o!==null&&o.dependencies!==null&&Ta(o.dependencies)?(typeof le=="function"&&(uu(l,d,le,m),it=l.memoizedState),(lt=es||yd(l,d,lt,m,tt,it,ke)||o!==null&&o.dependencies!==null&&Ta(o.dependencies))?(Ye||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(m,it,ke),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(m,it,ke)),typeof C.componentDidUpdate=="function"&&(l.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof C.componentDidUpdate!="function"||W===o.memoizedProps&&tt===o.memoizedState||(l.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||W===o.memoizedProps&&tt===o.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=it),C.props=m,C.state=it,C.context=ke,m=lt):(typeof C.componentDidUpdate!="function"||W===o.memoizedProps&&tt===o.memoizedState||(l.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||W===o.memoizedProps&&tt===o.memoizedState||(l.flags|=1024),m=!1)}return C=m,za(o,l),m=(l.flags&128)!==0,C||m?(C=l.stateNode,d=m&&typeof d.getDerivedStateFromError!="function"?null:C.render(),l.flags|=1,o!==null&&m?(l.child=Ps(l,o.child,null,E),l.child=Ps(l,null,d,E)):dn(o,l,d,E),l.memoizedState=C.state,o=l.child):o=Di(o,l,E),o}function Pd(o,l,d,m){return As(),l.flags|=256,dn(o,l,d,m),l.child}var pu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gu(o){return{baseLanes:o,cachePool:vc()}}function mu(o,l,d){return o=o!==null?o.childLanes&~d:0,l&&(o|=jn),o}function kd(o,l,d){var m=l.pendingProps,E=!1,C=(l.flags&128)!==0,W;if((W=C)||(W=o!==null&&o.memoizedState===null?!1:(qr.current&2)!==0),W&&(E=!0,l.flags&=-129),W=(l.flags&32)!==0,l.flags&=-33,o===null){if(Gt){if(E?ss(l):os(),(o=xr)?(o=zf(o,ti),o=o!==null&&o.data!=="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:Qi!==null?{id:gi,overflow:mi}:null,retryLane:536870912,hydrationErrors:null},d=fc(o),d.return=l,l.child=d,ln=l,xr=null)):o=null,o===null)throw Xi(l);return Xu(o)?l.lanes=32:l.lanes=536870912,null}var le=m.children;return m=m.fallback,E?(os(),E=l.mode,le=Va({mode:"hidden",children:le},E),m=xs(m,E,d,null),le.return=l,m.return=l,le.sibling=m,l.child=le,m=l.child,m.memoizedState=gu(d),m.childLanes=mu(o,W,d),l.memoizedState=pu,zo(null,m)):(ss(l),yu(l,le))}var ke=o.memoizedState;if(ke!==null&&(le=ke.dehydrated,le!==null)){if(C)l.flags&256?(ss(l),l.flags&=-257,l=bu(o,l,d)):l.memoizedState!==null?(os(),l.child=o.child,l.flags|=128,l=null):(os(),le=m.fallback,E=l.mode,m=Va({mode:"visible",children:m.children},E),le=xs(le,E,d,null),le.flags|=2,m.return=l,le.return=l,m.sibling=le,l.child=m,Ps(l,o.child,null,d),m=l.child,m.memoizedState=gu(d),m.childLanes=mu(o,W,d),l.memoizedState=pu,l=zo(null,m));else if(ss(l),Xu(le)){if(W=le.nextSibling&&le.nextSibling.dataset,W)var Ye=W.dgst;W=Ye,m=Error(n(419)),m.stack="",m.digest=W,Fo({value:m,source:null,stack:null}),l=bu(o,l,d)}else if(Qr||Xs(o,l,d,!1),W=(d&o.childLanes)!==0,Qr||W){if(W=_r,W!==null&&(m=Ht(W,d),m!==0&&m!==ke.retryLane))throw ke.retryLane=m,Rs(o,m),Nn(W,o,m),fu;Zu(le)||Ya(),l=bu(o,l,d)}else Zu(le)?(l.flags|=192,l.child=o.child,l=null):(o=ke.treeContext,xr=ni(le.nextSibling),ln=l,Gt=!0,Zi=null,ti=!1,o!==null&&gc(l,o),l=yu(l,m.children),l.flags|=4096);return l}return E?(os(),le=m.fallback,E=l.mode,ke=o.child,Ye=ke.sibling,m=xi(ke,{mode:"hidden",children:m.children}),m.subtreeFlags=ke.subtreeFlags&65011712,Ye!==null?le=xi(Ye,le):(le=xs(le,E,d,null),le.flags|=2),le.return=l,m.return=l,m.sibling=le,l.child=m,zo(null,m),m=l.child,le=o.child.memoizedState,le===null?le=gu(d):(E=le.cachePool,E!==null?(ke=Gr._currentValue,E=E.parent!==ke?{parent:ke,pool:ke}:E):E=vc(),le={baseLanes:le.baseLanes|d,cachePool:E}),m.memoizedState=le,m.childLanes=mu(o,W,d),l.memoizedState=pu,zo(o.child,m)):(ss(l),d=o.child,o=d.sibling,d=xi(d,{mode:"visible",children:m.children}),d.return=l,d.sibling=null,o!==null&&(W=l.deletions,W===null?(l.deletions=[o],l.flags|=16):W.push(o)),l.child=d,l.memoizedState=null,d)}function yu(o,l){return l=Va({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function Va(o,l){return o=Ln(22,o,null,l),o.lanes=0,o}function bu(o,l,d){return Ps(l,o.child,null,d),o=yu(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function Ld(o,l,d){o.lanes|=l;var m=o.alternate;m!==null&&(m.lanes|=l),Pl(o.return,l,d)}function _u(o,l,d,m,E,C){var W=o.memoizedState;W===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:E,treeForkCount:C}:(W.isBackwards=l,W.rendering=null,W.renderingStartTime=0,W.last=m,W.tail=d,W.tailMode=E,W.treeForkCount=C)}function Ud(o,l,d){var m=l.pendingProps,E=m.revealOrder,C=m.tail;m=m.children;var W=qr.current,le=(W&2)!==0;if(le?(W=W&1|2,l.flags|=128):W&=1,oe(qr,W),dn(o,l,m,d),m=Gt?No:0,!le&&o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&Ld(o,d,l);else if(o.tag===19)Ld(o,d,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(E){case"forwards":for(d=l.child,E=null;d!==null;)o=d.alternate,o!==null&&Da(o)===null&&(E=d),d=d.sibling;d=E,d===null?(E=l.child,l.child=null):(E=d.sibling,d.sibling=null),_u(l,!1,E,d,C,m);break;case"backwards":case"unstable_legacy-backwards":for(d=null,E=l.child,l.child=null;E!==null;){if(o=E.alternate,o!==null&&Da(o)===null){l.child=E;break}o=E.sibling,E.sibling=d,d=E,E=o}_u(l,!0,d,null,C,m);break;case"together":_u(l,!1,null,null,void 0,m);break;default:l.memoizedState=null}return l.child}function Di(o,l,d){if(o!==null&&(l.dependencies=o.dependencies),us|=l.lanes,(d&l.childLanes)===0)if(o!==null){if(Xs(o,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(o!==null&&l.child!==o.child)throw Error(n(153));if(l.child!==null){for(o=l.child,d=xi(o,o.pendingProps),l.child=d,d.return=l;o.sibling!==null;)o=o.sibling,d=d.sibling=xi(o,o.pendingProps),d.return=l;d.sibling=null}return l.child}function wu(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&Ta(o)))}function kh(o,l,d){switch(l.tag){case 3:he(l,l.stateNode.containerInfo),Yi(l,Gr,o.memoizedState.cache),As();break;case 27:case 5:Oe(l);break;case 4:he(l,l.stateNode.containerInfo);break;case 10:Yi(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,Hl(l),null;break;case 13:var m=l.memoizedState;if(m!==null)return m.dehydrated!==null?(ss(l),l.flags|=128,null):(d&l.child.childLanes)!==0?kd(o,l,d):(ss(l),o=Di(o,l,d),o!==null?o.sibling:null);ss(l);break;case 19:var E=(o.flags&128)!==0;if(m=(d&l.childLanes)!==0,m||(Xs(o,l,d,!1),m=(d&l.childLanes)!==0),E){if(m)return Ud(o,l,d);l.flags|=128}if(E=l.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),oe(qr,qr.current),m)break;return null;case 22:return l.lanes=0,Id(o,l,d,l.pendingProps);case 24:Yi(l,Gr,o.memoizedState.cache)}return Di(o,l,d)}function Od(o,l,d){if(o!==null)if(o.memoizedProps!==l.pendingProps)Qr=!0;else{if(!wu(o,d)&&(l.flags&128)===0)return Qr=!1,kh(o,l,d);Qr=(o.flags&131072)!==0}else Qr=!1,Gt&&(l.flags&1048576)!==0&&pc(l,No,l.index);switch(l.lanes=0,l.tag){case 16:e:{var m=l.pendingProps;if(o=Fs(l.elementType),l.type=o,typeof o=="function")Rl(o)?(m=Ls(o,m),l.tag=1,l=Dd(null,l,o,m,d)):(l.tag=0,l=hu(null,l,o,m,d));else{if(o!=null){var E=o.$$typeof;if(E===D){l.tag=11,l=Rd(null,l,o,m,d);break e}else if(E===z){l.tag=14,l=xd(null,l,o,m,d);break e}}throw l=$e(o)||o,Error(n(306,l,""))}}return l;case 0:return hu(o,l,l.type,l.pendingProps,d);case 1:return m=l.type,E=Ls(m,l.pendingProps),Dd(o,l,m,E,d);case 3:e:{if(he(l,l.stateNode.containerInfo),o===null)throw Error(n(387));m=l.pendingProps;var C=l.memoizedState;E=C.element,Bl(o,l),$o(l,m,null,d);var W=l.memoizedState;if(m=W.cache,Yi(l,Gr,m),m!==C.cache&&kl(l,[Gr],d,!0),Oo(),m=W.element,C.isDehydrated)if(C={element:m,isDehydrated:!1,cache:W.cache},l.updateQueue.baseState=C,l.memoizedState=C,l.flags&256){l=Pd(o,l,m,d);break e}else if(m!==E){E=Xn(Error(n(424)),l),Fo(E),l=Pd(o,l,m,d);break e}else for(o=l.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,xr=ni(o.firstChild),ln=l,Gt=!0,Zi=null,ti=!0,d=Ac(l,null,m,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(As(),m===E){l=Di(o,l,d);break e}dn(o,l,m,d)}l=l.child}return l;case 26:return za(o,l),o===null?(d=Jf(l.type,null,l.pendingProps,null))?l.memoizedState=d:Gt||(d=l.type,o=l.pendingProps,m=ol(Je.current).createElement(d),m[qt]=l,m[fr]=o,fn(m,d,o),Er(m),l.stateNode=m):l.memoizedState=Jf(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:return Oe(l),o===null&&Gt&&(m=l.stateNode=Wf(l.type,l.pendingProps,Je.current),ln=l,ti=!0,E=xr,ps(l.type)?(Yu=E,xr=ni(m.firstChild)):xr=E),dn(o,l,l.pendingProps.children,d),za(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&Gt&&((E=m=xr)&&(m=cp(m,l.type,l.pendingProps,ti),m!==null?(l.stateNode=m,ln=l,xr=ni(m.firstChild),ti=!1,E=!0):E=!1),E||Xi(l)),Oe(l),E=l.type,C=l.pendingProps,W=o!==null?o.memoizedProps:null,m=C.children,Gu(E,C)?m=null:W!==null&&Gu(E,W)&&(l.flags|=32),l.memoizedState!==null&&(E=Kl(o,l,Rh,null,null,d),ia._currentValue=E),za(o,l),dn(o,l,m,d),l.child;case 6:return o===null&&Gt&&((o=d=xr)&&(d=dp(d,l.pendingProps,ti),d!==null?(l.stateNode=d,ln=l,xr=null,o=!0):o=!1),o||Xi(l)),null;case 13:return kd(o,l,d);case 4:return he(l,l.stateNode.containerInfo),m=l.pendingProps,o===null?l.child=Ps(l,null,m,d):dn(o,l,m,d),l.child;case 11:return Rd(o,l,l.type,l.pendingProps,d);case 7:return dn(o,l,l.pendingProps,d),l.child;case 8:return dn(o,l,l.pendingProps.children,d),l.child;case 12:return dn(o,l,l.pendingProps.children,d),l.child;case 10:return m=l.pendingProps,Yi(l,l.type,m.value),dn(o,l,m.children,d),l.child;case 9:return E=l.type._context,m=l.pendingProps.children,Cs(l),E=un(E),m=m(E),l.flags|=1,dn(o,l,m,d),l.child;case 14:return xd(o,l,l.type,l.pendingProps,d);case 15:return Ad(o,l,l.type,l.pendingProps,d);case 19:return Ud(o,l,d);case 31:return Ph(o,l,d);case 22:return Id(o,l,d,l.pendingProps);case 24:return Cs(l),m=un(Gr),o===null?(E=Ol(),E===null&&(E=_r,C=Ll(),E.pooledCache=C,C.refCount++,C!==null&&(E.pooledCacheLanes|=d),E=C),l.memoizedState={parent:m,cache:E},jl(l),Yi(l,Gr,E)):((o.lanes&d)!==0&&(Bl(o,l),$o(l,null,null,d),Oo()),E=o.memoizedState,C=l.memoizedState,E.parent!==m?(E={parent:m,cache:m},l.memoizedState=E,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=E),Yi(l,Gr,m)):(m=C.cache,Yi(l,Gr,m),m!==E.cache&&kl(l,[Gr],d,!0))),dn(o,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(n(156,l.tag))}function Pi(o){o.flags|=4}function vu(o,l,d,m,E){if((l=(o.mode&32)!==0)&&(l=!1),l){if(o.flags|=16777216,(E&335544128)===E)if(o.stateNode.complete)o.flags|=8192;else if(df())o.flags|=8192;else throw Ds=Ia,$l}else o.flags&=-16777217}function $d(o,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!eh(l))if(df())o.flags|=8192;else throw Ds=Ia,$l}function Ha(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?M():536870912,o.lanes|=l,co|=l)}function Vo(o,l){if(!Gt)switch(o.tailMode){case"hidden":l=o.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:m.sibling=null}}function Ar(o){var l=o.alternate!==null&&o.alternate.child===o.child,d=0,m=0;if(l)for(var E=o.child;E!==null;)d|=E.lanes|E.childLanes,m|=E.subtreeFlags&65011712,m|=E.flags&65011712,E.return=o,E=E.sibling;else for(E=o.child;E!==null;)d|=E.lanes|E.childLanes,m|=E.subtreeFlags,m|=E.flags,E.return=o,E=E.sibling;return o.subtreeFlags|=m,o.childLanes=d,l}function Lh(o,l,d){var m=l.pendingProps;switch(Cl(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ar(l),null;case 1:return Ar(l),null;case 3:return d=l.stateNode,m=null,o!==null&&(m=o.memoizedState.cache),l.memoizedState.cache!==m&&(l.flags|=2048),Ci(Gr),fe(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(o===null||o.child===null)&&(Zs(l)?Pi(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Fl())),Ar(l),null;case 26:var E=l.type,C=l.memoizedState;return o===null?(Pi(l),C!==null?(Ar(l),$d(l,C)):(Ar(l),vu(l,E,null,m,d))):C?C!==o.memoizedState?(Pi(l),Ar(l),$d(l,C)):(Ar(l),l.flags&=-16777217):(o=o.memoizedProps,o!==m&&Pi(l),Ar(l),vu(l,E,o,m,d)),null;case 27:if(ie(l),d=Je.current,E=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==m&&Pi(l);else{if(!m){if(l.stateNode===null)throw Error(n(166));return Ar(l),null}o=Fe.current,Zs(l)?mc(l):(o=Wf(E,m,d),l.stateNode=o,Pi(l))}return Ar(l),null;case 5:if(ie(l),E=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==m&&Pi(l);else{if(!m){if(l.stateNode===null)throw Error(n(166));return Ar(l),null}if(C=Fe.current,Zs(l))mc(l);else{var W=ol(Je.current);switch(C){case 1:C=W.createElementNS("http://www.w3.org/2000/svg",E);break;case 2:C=W.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;default:switch(E){case"svg":C=W.createElementNS("http://www.w3.org/2000/svg",E);break;case"math":C=W.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;case"script":C=W.createElement("div"),C.innerHTML="<script><\/script>",C=C.removeChild(C.firstChild);break;case"select":C=typeof m.is=="string"?W.createElement("select",{is:m.is}):W.createElement("select"),m.multiple?C.multiple=!0:m.size&&(C.size=m.size);break;default:C=typeof m.is=="string"?W.createElement(E,{is:m.is}):W.createElement(E)}}C[qt]=l,C[fr]=m;e:for(W=l.child;W!==null;){if(W.tag===5||W.tag===6)C.appendChild(W.stateNode);else if(W.tag!==4&&W.tag!==27&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===l)break e;for(;W.sibling===null;){if(W.return===null||W.return===l)break e;W=W.return}W.sibling.return=W.return,W=W.sibling}l.stateNode=C;e:switch(fn(C,E,m),E){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Pi(l)}}return Ar(l),vu(l,l.type,o===null?null:o.memoizedProps,l.pendingProps,d),null;case 6:if(o&&l.stateNode!=null)o.memoizedProps!==m&&Pi(l);else{if(typeof m!="string"&&l.stateNode===null)throw Error(n(166));if(o=Je.current,Zs(l)){if(o=l.stateNode,d=l.memoizedProps,m=null,E=ln,E!==null)switch(E.tag){case 27:case 5:m=E.memoizedProps}o[qt]=l,o=!!(o.nodeValue===d||m!==null&&m.suppressHydrationWarning===!0||Lf(o.nodeValue,d)),o||Xi(l,!0)}else o=ol(o).createTextNode(m),o[qt]=l,l.stateNode=o}return Ar(l),null;case 31:if(d=l.memoizedState,o===null||o.memoizedState!==null){if(m=Zs(l),d!==null){if(o===null){if(!m)throw Error(n(318));if(o=l.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(n(557));o[qt]=l}else As(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ar(l),o=!1}else d=Fl(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=d),o=!0;if(!o)return l.flags&256?(On(l),l):(On(l),null);if((l.flags&128)!==0)throw Error(n(558))}return Ar(l),null;case 13:if(m=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(E=Zs(l),m!==null&&m.dehydrated!==null){if(o===null){if(!E)throw Error(n(318));if(E=l.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(n(317));E[qt]=l}else As(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ar(l),E=!1}else E=Fl(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=E),E=!0;if(!E)return l.flags&256?(On(l),l):(On(l),null)}return On(l),(l.flags&128)!==0?(l.lanes=d,l):(d=m!==null,o=o!==null&&o.memoizedState!==null,d&&(m=l.child,E=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(E=m.alternate.memoizedState.cachePool.pool),C=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(C=m.memoizedState.cachePool.pool),C!==E&&(m.flags|=2048)),d!==o&&d&&(l.child.flags|=8192),Ha(l,l.updateQueue),Ar(l),null);case 4:return fe(),o===null&&zu(l.stateNode.containerInfo),Ar(l),null;case 10:return Ci(l.type),Ar(l),null;case 19:if(ce(qr),m=l.memoizedState,m===null)return Ar(l),null;if(E=(l.flags&128)!==0,C=m.rendering,C===null)if(E)Vo(m,!1);else{if(Br!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(C=Da(o),C!==null){for(l.flags|=128,Vo(m,!1),o=C.updateQueue,l.updateQueue=o,Ha(l,o),l.subtreeFlags=0,o=d,d=l.child;d!==null;)dc(d,o),d=d.sibling;return oe(qr,qr.current&1|2),Gt&&Ai(l,m.treeForkCount),l.child}o=o.sibling}m.tail!==null&&ft()>Qa&&(l.flags|=128,E=!0,Vo(m,!1),l.lanes=4194304)}else{if(!E)if(o=Da(C),o!==null){if(l.flags|=128,E=!0,o=o.updateQueue,l.updateQueue=o,Ha(l,o),Vo(m,!0),m.tail===null&&m.tailMode==="hidden"&&!C.alternate&&!Gt)return Ar(l),null}else 2*ft()-m.renderingStartTime>Qa&&d!==536870912&&(l.flags|=128,E=!0,Vo(m,!1),l.lanes=4194304);m.isBackwards?(C.sibling=l.child,l.child=C):(o=m.last,o!==null?o.sibling=C:l.child=C,m.last=C)}return m.tail!==null?(o=m.tail,m.rendering=o,m.tail=o.sibling,m.renderingStartTime=ft(),o.sibling=null,d=qr.current,oe(qr,E?d&1|2:d&1),Gt&&Ai(l,m.treeForkCount),o):(Ar(l),null);case 22:case 23:return On(l),Vl(),m=l.memoizedState!==null,o!==null?o.memoizedState!==null!==m&&(l.flags|=8192):m&&(l.flags|=8192),m?(d&536870912)!==0&&(l.flags&128)===0&&(Ar(l),l.subtreeFlags&6&&(l.flags|=8192)):Ar(l),d=l.updateQueue,d!==null&&Ha(l,d.retryQueue),d=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==d&&(l.flags|=2048),o!==null&&ce(Ns),null;case 24:return d=null,o!==null&&(d=o.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),Ci(Gr),Ar(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function Uh(o,l){switch(Cl(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Ci(Gr),fe(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 26:case 27:case 5:return ie(l),null;case 31:if(l.memoizedState!==null){if(On(l),l.alternate===null)throw Error(n(340));As()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 13:if(On(l),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(n(340));As()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return ce(qr),null;case 4:return fe(),null;case 10:return Ci(l.type),null;case 22:case 23:return On(l),Vl(),o!==null&&ce(Ns),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return Ci(Gr),null;case 25:return null;default:return null}}function jd(o,l){switch(Cl(l),l.tag){case 3:Ci(Gr),fe();break;case 26:case 27:case 5:ie(l);break;case 4:fe();break;case 31:l.memoizedState!==null&&On(l);break;case 13:On(l);break;case 19:ce(qr);break;case 10:Ci(l.type);break;case 22:case 23:On(l),Vl(),o!==null&&ce(Ns);break;case 24:Ci(Gr)}}function Ho(o,l){try{var d=l.updateQueue,m=d!==null?d.lastEffect:null;if(m!==null){var E=m.next;d=E;do{if((d.tag&o)===o){m=void 0;var C=d.create,W=d.inst;m=C(),W.destroy=m}d=d.next}while(d!==E)}}catch(le){cr(l,l.return,le)}}function as(o,l,d){try{var m=l.updateQueue,E=m!==null?m.lastEffect:null;if(E!==null){var C=E.next;m=C;do{if((m.tag&o)===o){var W=m.inst,le=W.destroy;if(le!==void 0){W.destroy=void 0,E=l;var ke=d,Ye=le;try{Ye()}catch(lt){cr(E,ke,lt)}}}m=m.next}while(m!==C)}}catch(lt){cr(l,l.return,lt)}}function Bd(o){var l=o.updateQueue;if(l!==null){var d=o.stateNode;try{Cc(l,d)}catch(m){cr(o,o.return,m)}}}function Md(o,l,d){d.props=Ls(o.type,o.memoizedProps),d.state=o.memoizedState;try{d.componentWillUnmount()}catch(m){cr(o,l,m)}}function Wo(o,l){try{var d=o.ref;if(d!==null){switch(o.tag){case 26:case 27:case 5:var m=o.stateNode;break;case 30:m=o.stateNode;break;default:m=o.stateNode}typeof d=="function"?o.refCleanup=d(m):d.current=m}}catch(E){cr(o,l,E)}}function yi(o,l){var d=o.ref,m=o.refCleanup;if(d!==null)if(typeof m=="function")try{m()}catch(E){cr(o,l,E)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(E){cr(o,l,E)}else d.current=null}function qd(o){var l=o.type,d=o.memoizedProps,m=o.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&m.focus();break e;case"img":d.src?m.src=d.src:d.srcSet&&(m.srcset=d.srcSet)}}catch(E){cr(o,o.return,E)}}function Su(o,l,d){try{var m=o.stateNode;ip(m,o.type,d,l),m[fr]=l}catch(E){cr(o,o.return,E)}}function zd(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&ps(o.type)||o.tag===4}function Eu(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||zd(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&ps(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Tu(o,l,d){var m=o.tag;if(m===5||m===6)o=o.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(o,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(o),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=wt));else if(m!==4&&(m===27&&ps(o.type)&&(d=o.stateNode,l=null),o=o.child,o!==null))for(Tu(o,l,d),o=o.sibling;o!==null;)Tu(o,l,d),o=o.sibling}function Wa(o,l,d){var m=o.tag;if(m===5||m===6)o=o.stateNode,l?d.insertBefore(o,l):d.appendChild(o);else if(m!==4&&(m===27&&ps(o.type)&&(d=o.stateNode),o=o.child,o!==null))for(Wa(o,l,d),o=o.sibling;o!==null;)Wa(o,l,d),o=o.sibling}function Vd(o){var l=o.stateNode,d=o.memoizedProps;try{for(var m=o.type,E=l.attributes;E.length;)l.removeAttributeNode(E[0]);fn(l,m,d),l[qt]=o,l[fr]=d}catch(C){cr(o,o.return,C)}}var ki=!1,Zr=!1,Ru=!1,Hd=typeof WeakSet=="function"?WeakSet:Set,nn=null;function Oh(o,l){if(o=o.containerInfo,Wu=hl,o=Es(o),Ji(o)){if("selectionStart"in o)var d={start:o.selectionStart,end:o.selectionEnd};else e:{d=(d=o.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var E=m.anchorOffset,C=m.focusNode;m=m.focusOffset;try{d.nodeType,C.nodeType}catch{d=null;break e}var W=0,le=-1,ke=-1,Ye=0,lt=0,dt=o,tt=null;t:for(;;){for(var it;dt!==d||E!==0&&dt.nodeType!==3||(le=W+E),dt!==C||m!==0&&dt.nodeType!==3||(ke=W+m),dt.nodeType===3&&(W+=dt.nodeValue.length),(it=dt.firstChild)!==null;)tt=dt,dt=it;for(;;){if(dt===o)break t;if(tt===d&&++Ye===E&&(le=W),tt===C&&++lt===m&&(ke=W),(it=dt.nextSibling)!==null)break;dt=tt,tt=dt.parentNode}dt=it}d=le===-1||ke===-1?null:{start:le,end:ke}}else d=null}d=d||{start:0,end:0}}else d=null;for(Ku={focusedElem:o,selectionRange:d},hl=!1,nn=l;nn!==null;)if(l=nn,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,nn=o;else for(;nn!==null;){switch(l=nn,C=l.alternate,o=l.flags,l.tag){case 0:if((o&4)!==0&&(o=l.updateQueue,o=o!==null?o.events:null,o!==null))for(d=0;d<o.length;d++)E=o[d],E.ref.impl=E.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&C!==null){o=void 0,d=l,E=C.memoizedProps,C=C.memoizedState,m=d.stateNode;try{var St=Ls(d.type,E);o=m.getSnapshotBeforeUpdate(St,C),m.__reactInternalSnapshotBeforeUpdate=o}catch(It){cr(d,d.return,It)}}break;case 3:if((o&1024)!==0){if(o=l.stateNode.containerInfo,d=o.nodeType,d===9)Qu(o);else if(d===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":Qu(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(n(163))}if(o=l.sibling,o!==null){o.return=l.return,nn=o;break}nn=l.return}}function Wd(o,l,d){var m=d.flags;switch(d.tag){case 0:case 11:case 15:Ui(o,d),m&4&&Ho(5,d);break;case 1:if(Ui(o,d),m&4)if(o=d.stateNode,l===null)try{o.componentDidMount()}catch(W){cr(d,d.return,W)}else{var E=Ls(d.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(E,l,o.__reactInternalSnapshotBeforeUpdate)}catch(W){cr(d,d.return,W)}}m&64&&Bd(d),m&512&&Wo(d,d.return);break;case 3:if(Ui(o,d),m&64&&(o=d.updateQueue,o!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{Cc(o,l)}catch(W){cr(d,d.return,W)}}break;case 27:l===null&&m&4&&Vd(d);case 26:case 5:Ui(o,d),l===null&&m&4&&qd(d),m&512&&Wo(d,d.return);break;case 12:Ui(o,d);break;case 31:Ui(o,d),m&4&&Jd(o,d);break;case 13:Ui(o,d),m&4&&Qd(o,d),m&64&&(o=d.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(d=Wh.bind(null,d),fp(o,d))));break;case 22:if(m=d.memoizedState!==null||ki,!m){l=l!==null&&l.memoizedState!==null||Zr,E=ki;var C=Zr;ki=m,(Zr=l)&&!C?Oi(o,d,(d.subtreeFlags&8772)!==0):Ui(o,d),ki=E,Zr=C}break;case 30:break;default:Ui(o,d)}}function Kd(o){var l=o.alternate;l!==null&&(o.alternate=null,Kd(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&br(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var Fr=null,xn=!1;function Li(o,l,d){for(d=d.child;d!==null;)Gd(o,l,d),d=d.sibling}function Gd(o,l,d){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Pe,d)}catch{}switch(d.tag){case 26:Zr||yi(d,l),Li(o,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Zr||yi(d,l);var m=Fr,E=xn;ps(d.type)&&(Fr=d.stateNode,xn=!1),Li(o,l,d),ta(d.stateNode),Fr=m,xn=E;break;case 5:Zr||yi(d,l);case 6:if(m=Fr,E=xn,Fr=null,Li(o,l,d),Fr=m,xn=E,Fr!==null)if(xn)try{(Fr.nodeType===9?Fr.body:Fr.nodeName==="HTML"?Fr.ownerDocument.body:Fr).removeChild(d.stateNode)}catch(C){cr(d,l,C)}else try{Fr.removeChild(d.stateNode)}catch(C){cr(d,l,C)}break;case 18:Fr!==null&&(xn?(o=Fr,Mf(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,d.stateNode),_o(o)):Mf(Fr,d.stateNode));break;case 4:m=Fr,E=xn,Fr=d.stateNode.containerInfo,xn=!0,Li(o,l,d),Fr=m,xn=E;break;case 0:case 11:case 14:case 15:as(2,d,l),Zr||as(4,d,l),Li(o,l,d);break;case 1:Zr||(yi(d,l),m=d.stateNode,typeof m.componentWillUnmount=="function"&&Md(d,l,m)),Li(o,l,d);break;case 21:Li(o,l,d);break;case 22:Zr=(m=Zr)||d.memoizedState!==null,Li(o,l,d),Zr=m;break;default:Li(o,l,d)}}function Jd(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{_o(o)}catch(d){cr(l,l.return,d)}}}function Qd(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{_o(o)}catch(d){cr(l,l.return,d)}}function $h(o){switch(o.tag){case 31:case 13:case 19:var l=o.stateNode;return l===null&&(l=o.stateNode=new Hd),l;case 22:return o=o.stateNode,l=o._retryCache,l===null&&(l=o._retryCache=new Hd),l;default:throw Error(n(435,o.tag))}}function Ka(o,l){var d=$h(o);l.forEach(function(m){if(!d.has(m)){d.add(m);var E=Kh.bind(null,o,m);m.then(E,E)}})}function An(o,l){var d=l.deletions;if(d!==null)for(var m=0;m<d.length;m++){var E=d[m],C=o,W=l,le=W;e:for(;le!==null;){switch(le.tag){case 27:if(ps(le.type)){Fr=le.stateNode,xn=!1;break e}break;case 5:Fr=le.stateNode,xn=!1;break e;case 3:case 4:Fr=le.stateNode.containerInfo,xn=!0;break e}le=le.return}if(Fr===null)throw Error(n(160));Gd(C,W,E),Fr=null,xn=!1,C=E.alternate,C!==null&&(C.return=null),E.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)Zd(l,o),l=l.sibling}var di=null;function Zd(o,l){var d=o.alternate,m=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:An(l,o),In(o),m&4&&(as(3,o,o.return),Ho(3,o),as(5,o,o.return));break;case 1:An(l,o),In(o),m&512&&(Zr||d===null||yi(d,d.return)),m&64&&ki&&(o=o.updateQueue,o!==null&&(m=o.callbacks,m!==null&&(d=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=d===null?m:d.concat(m))));break;case 26:var E=di;if(An(l,o),In(o),m&512&&(Zr||d===null||yi(d,d.return)),m&4){var C=d!==null?d.memoizedState:null;if(m=o.memoizedState,d===null)if(m===null)if(o.stateNode===null){e:{m=o.type,d=o.memoizedProps,E=E.ownerDocument||E;t:switch(m){case"title":C=E.getElementsByTagName("title")[0],(!C||C[oi]||C[qt]||C.namespaceURI==="http://www.w3.org/2000/svg"||C.hasAttribute("itemprop"))&&(C=E.createElement(m),E.head.insertBefore(C,E.querySelector("head > title"))),fn(C,m,d),C[qt]=o,Er(C),m=C;break e;case"link":var W=Xf("link","href",E).get(m+(d.href||""));if(W){for(var le=0;le<W.length;le++)if(C=W[le],C.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&C.getAttribute("rel")===(d.rel==null?null:d.rel)&&C.getAttribute("title")===(d.title==null?null:d.title)&&C.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){W.splice(le,1);break t}}C=E.createElement(m),fn(C,m,d),E.head.appendChild(C);break;case"meta":if(W=Xf("meta","content",E).get(m+(d.content||""))){for(le=0;le<W.length;le++)if(C=W[le],C.getAttribute("content")===(d.content==null?null:""+d.content)&&C.getAttribute("name")===(d.name==null?null:d.name)&&C.getAttribute("property")===(d.property==null?null:d.property)&&C.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&C.getAttribute("charset")===(d.charSet==null?null:d.charSet)){W.splice(le,1);break t}}C=E.createElement(m),fn(C,m,d),E.head.appendChild(C);break;default:throw Error(n(468,m))}C[qt]=o,Er(C),m=C}o.stateNode=m}else Yf(E,o.type,o.stateNode);else o.stateNode=Zf(E,m,o.memoizedProps);else C!==m?(C===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):C.count--,m===null?Yf(E,o.type,o.stateNode):Zf(E,m,o.memoizedProps)):m===null&&o.stateNode!==null&&Su(o,o.memoizedProps,d.memoizedProps)}break;case 27:An(l,o),In(o),m&512&&(Zr||d===null||yi(d,d.return)),d!==null&&m&4&&Su(o,o.memoizedProps,d.memoizedProps);break;case 5:if(An(l,o),In(o),m&512&&(Zr||d===null||yi(d,d.return)),o.flags&32){E=o.stateNode;try{Ae(E,"")}catch(St){cr(o,o.return,St)}}m&4&&o.stateNode!=null&&(E=o.memoizedProps,Su(o,E,d!==null?d.memoizedProps:E)),m&1024&&(Ru=!0);break;case 6:if(An(l,o),In(o),m&4){if(o.stateNode===null)throw Error(n(162));m=o.memoizedProps,d=o.stateNode;try{d.nodeValue=m}catch(St){cr(o,o.return,St)}}break;case 3:if(ul=null,E=di,di=al(l.containerInfo),An(l,o),di=E,In(o),m&4&&d!==null&&d.memoizedState.isDehydrated)try{_o(l.containerInfo)}catch(St){cr(o,o.return,St)}Ru&&(Ru=!1,Xd(o));break;case 4:m=di,di=al(o.stateNode.containerInfo),An(l,o),In(o),di=m;break;case 12:An(l,o),In(o);break;case 31:An(l,o),In(o),m&4&&(m=o.updateQueue,m!==null&&(o.updateQueue=null,Ka(o,m)));break;case 13:An(l,o),In(o),o.child.flags&8192&&o.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Ja=ft()),m&4&&(m=o.updateQueue,m!==null&&(o.updateQueue=null,Ka(o,m)));break;case 22:E=o.memoizedState!==null;var ke=d!==null&&d.memoizedState!==null,Ye=ki,lt=Zr;if(ki=Ye||E,Zr=lt||ke,An(l,o),Zr=lt,ki=Ye,In(o),m&8192)e:for(l=o.stateNode,l._visibility=E?l._visibility&-2:l._visibility|1,E&&(d===null||ke||ki||Zr||Us(o)),d=null,l=o;;){if(l.tag===5||l.tag===26){if(d===null){ke=d=l;try{if(C=ke.stateNode,E)W=C.style,typeof W.setProperty=="function"?W.setProperty("display","none","important"):W.display="none";else{le=ke.stateNode;var dt=ke.memoizedProps.style,tt=dt!=null&&dt.hasOwnProperty("display")?dt.display:null;le.style.display=tt==null||typeof tt=="boolean"?"":(""+tt).trim()}}catch(St){cr(ke,ke.return,St)}}}else if(l.tag===6){if(d===null){ke=l;try{ke.stateNode.nodeValue=E?"":ke.memoizedProps}catch(St){cr(ke,ke.return,St)}}}else if(l.tag===18){if(d===null){ke=l;try{var it=ke.stateNode;E?qf(it,!0):qf(ke.stateNode,!1)}catch(St){cr(ke,ke.return,St)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}m&4&&(m=o.updateQueue,m!==null&&(d=m.retryQueue,d!==null&&(m.retryQueue=null,Ka(o,d))));break;case 19:An(l,o),In(o),m&4&&(m=o.updateQueue,m!==null&&(o.updateQueue=null,Ka(o,m)));break;case 30:break;case 21:break;default:An(l,o),In(o)}}function In(o){var l=o.flags;if(l&2){try{for(var d,m=o.return;m!==null;){if(zd(m)){d=m;break}m=m.return}if(d==null)throw Error(n(160));switch(d.tag){case 27:var E=d.stateNode,C=Eu(o);Wa(o,C,E);break;case 5:var W=d.stateNode;d.flags&32&&(Ae(W,""),d.flags&=-33);var le=Eu(o);Wa(o,le,W);break;case 3:case 4:var ke=d.stateNode.containerInfo,Ye=Eu(o);Tu(o,Ye,ke);break;default:throw Error(n(161))}}catch(lt){cr(o,o.return,lt)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function Xd(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var l=o;Xd(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),o=o.sibling}}function Ui(o,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)Wd(o,l.alternate,l),l=l.sibling}function Us(o){for(o=o.child;o!==null;){var l=o;switch(l.tag){case 0:case 11:case 14:case 15:as(4,l,l.return),Us(l);break;case 1:yi(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&Md(l,l.return,d),Us(l);break;case 27:ta(l.stateNode);case 26:case 5:yi(l,l.return),Us(l);break;case 22:l.memoizedState===null&&Us(l);break;case 30:Us(l);break;default:Us(l)}o=o.sibling}}function Oi(o,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var m=l.alternate,E=o,C=l,W=C.flags;switch(C.tag){case 0:case 11:case 15:Oi(E,C,d),Ho(4,C);break;case 1:if(Oi(E,C,d),m=C,E=m.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(Ye){cr(m,m.return,Ye)}if(m=C,E=m.updateQueue,E!==null){var le=m.stateNode;try{var ke=E.shared.hiddenCallbacks;if(ke!==null)for(E.shared.hiddenCallbacks=null,E=0;E<ke.length;E++)Ic(ke[E],le)}catch(Ye){cr(m,m.return,Ye)}}d&&W&64&&Bd(C),Wo(C,C.return);break;case 27:Vd(C);case 26:case 5:Oi(E,C,d),d&&m===null&&W&4&&qd(C),Wo(C,C.return);break;case 12:Oi(E,C,d);break;case 31:Oi(E,C,d),d&&W&4&&Jd(E,C);break;case 13:Oi(E,C,d),d&&W&4&&Qd(E,C);break;case 22:C.memoizedState===null&&Oi(E,C,d),Wo(C,C.return);break;case 30:break;default:Oi(E,C,d)}l=l.sibling}}function xu(o,l){var d=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==d&&(o!=null&&o.refCount++,d!=null&&Do(d))}function Au(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&Do(o))}function fi(o,l,d,m){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Yd(o,l,d,m),l=l.sibling}function Yd(o,l,d,m){var E=l.flags;switch(l.tag){case 0:case 11:case 15:fi(o,l,d,m),E&2048&&Ho(9,l);break;case 1:fi(o,l,d,m);break;case 3:fi(o,l,d,m),E&2048&&(o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&Do(o)));break;case 12:if(E&2048){fi(o,l,d,m),o=l.stateNode;try{var C=l.memoizedProps,W=C.id,le=C.onPostCommit;typeof le=="function"&&le(W,l.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(ke){cr(l,l.return,ke)}}else fi(o,l,d,m);break;case 31:fi(o,l,d,m);break;case 13:fi(o,l,d,m);break;case 23:break;case 22:C=l.stateNode,W=l.alternate,l.memoizedState!==null?C._visibility&2?fi(o,l,d,m):Ko(o,l):C._visibility&2?fi(o,l,d,m):(C._visibility|=2,ao(o,l,d,m,(l.subtreeFlags&10256)!==0||!1)),E&2048&&xu(W,l);break;case 24:fi(o,l,d,m),E&2048&&Au(l.alternate,l);break;default:fi(o,l,d,m)}}function ao(o,l,d,m,E){for(E=E&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var C=o,W=l,le=d,ke=m,Ye=W.flags;switch(W.tag){case 0:case 11:case 15:ao(C,W,le,ke,E),Ho(8,W);break;case 23:break;case 22:var lt=W.stateNode;W.memoizedState!==null?lt._visibility&2?ao(C,W,le,ke,E):Ko(C,W):(lt._visibility|=2,ao(C,W,le,ke,E)),E&&Ye&2048&&xu(W.alternate,W);break;case 24:ao(C,W,le,ke,E),E&&Ye&2048&&Au(W.alternate,W);break;default:ao(C,W,le,ke,E)}l=l.sibling}}function Ko(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=o,m=l,E=m.flags;switch(m.tag){case 22:Ko(d,m),E&2048&&xu(m.alternate,m);break;case 24:Ko(d,m),E&2048&&Au(m.alternate,m);break;default:Ko(d,m)}l=l.sibling}}var Go=8192;function lo(o,l,d){if(o.subtreeFlags&Go)for(o=o.child;o!==null;)ef(o,l,d),o=o.sibling}function ef(o,l,d){switch(o.tag){case 26:lo(o,l,d),o.flags&Go&&o.memoizedState!==null&&Tp(d,di,o.memoizedState,o.memoizedProps);break;case 5:lo(o,l,d);break;case 3:case 4:var m=di;di=al(o.stateNode.containerInfo),lo(o,l,d),di=m;break;case 22:o.memoizedState===null&&(m=o.alternate,m!==null&&m.memoizedState!==null?(m=Go,Go=16777216,lo(o,l,d),Go=m):lo(o,l,d));break;default:lo(o,l,d)}}function tf(o){var l=o.alternate;if(l!==null&&(o=l.child,o!==null)){l.child=null;do l=o.sibling,o.sibling=null,o=l;while(o!==null)}}function Jo(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];nn=m,nf(m,o)}tf(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)rf(o),o=o.sibling}function rf(o){switch(o.tag){case 0:case 11:case 15:Jo(o),o.flags&2048&&as(9,o,o.return);break;case 3:Jo(o);break;case 12:Jo(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,Ga(o)):Jo(o);break;default:Jo(o)}}function Ga(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];nn=m,nf(m,o)}tf(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:as(8,l,l.return),Ga(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Ga(l));break;default:Ga(l)}o=o.sibling}}function nf(o,l){for(;nn!==null;){var d=nn;switch(d.tag){case 0:case 11:case 15:as(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var m=d.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Do(d.memoizedState.cache)}if(m=d.child,m!==null)m.return=d,nn=m;else e:for(d=o;nn!==null;){m=nn;var E=m.sibling,C=m.return;if(Kd(m),m===d){nn=null;break e}if(E!==null){E.return=C,nn=E;break e}nn=C}}}var jh={getCacheForType:function(o){var l=un(Gr),d=l.data.get(o);return d===void 0&&(d=o(),l.data.set(o,d)),d},cacheSignal:function(){return un(Gr).controller.signal}},Bh=typeof WeakMap=="function"?WeakMap:Map,rr=0,_r=null,zt=null,Wt=0,ur=0,$n=null,ls=!1,uo=!1,Iu=!1,$i=0,Br=0,us=0,Os=0,Cu=0,jn=0,co=0,Qo=null,Cn=null,Nu=!1,Ja=0,sf=0,Qa=1/0,Za=null,cs=null,en=0,ds=null,fo=null,ji=0,Fu=0,Du=null,of=null,Zo=0,Pu=null;function Bn(){return(rr&2)!==0&&Wt!==0?Wt&-Wt:ye.T!==null?ju():sr()}function af(){if(jn===0)if((Wt&536870912)===0||Gt){var o=Dt;Dt<<=1,(Dt&3932160)===0&&(Dt=262144),jn=o}else jn=536870912;return o=Un.current,o!==null&&(o.flags|=32),jn}function Nn(o,l,d){(o===_r&&(ur===2||ur===9)||o.cancelPendingCommit!==null)&&(ho(o,0),fs(o,Wt,jn,!1)),Be(o,d),((rr&2)===0||o!==_r)&&(o===_r&&((rr&2)===0&&(Os|=d),Br===4&&fs(o,Wt,jn,!1)),bi(o))}function lf(o,l,d){if((rr&6)!==0)throw Error(n(327));var m=!d&&(l&127)===0&&(l&o.expiredLanes)===0||nr(o,l),E=m?zh(o,l):Lu(o,l,!0),C=m;do{if(E===0){uo&&!m&&fs(o,l,0,!1);break}else{if(d=o.current.alternate,C&&!Mh(d)){E=Lu(o,l,!1),C=!1;continue}if(E===2){if(C=l,o.errorRecoveryDisabledLanes&C)var W=0;else W=o.pendingLanes&-536870913,W=W!==0?W:W&536870912?536870912:0;if(W!==0){l=W;e:{var le=o;E=Qo;var ke=le.current.memoizedState.isDehydrated;if(ke&&(ho(le,W).flags|=256),W=Lu(le,W,!1),W!==2){if(Iu&&!ke){le.errorRecoveryDisabledLanes|=C,Os|=C,E=4;break e}C=Cn,Cn=E,C!==null&&(Cn===null?Cn=C:Cn.push.apply(Cn,C))}E=W}if(C=!1,E!==2)continue}}if(E===1){ho(o,0),fs(o,l,0,!0);break}e:{switch(m=o,C=E,C){case 0:case 1:throw Error(n(345));case 4:if((l&4194048)!==l)break;case 6:fs(m,l,jn,!ls);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(n(329))}if((l&62914560)===l&&(E=Ja+300-ft(),10<E)){if(fs(m,l,jn,!ls),dr(m,0,!0)!==0)break e;ji=l,m.timeoutHandle=jf(uf.bind(null,m,d,Cn,Za,Nu,l,jn,Os,co,ls,C,"Throttled",-0,0),E);break e}uf(m,d,Cn,Za,Nu,l,jn,Os,co,ls,C,null,-0,0)}}break}while(!0);bi(o)}function uf(o,l,d,m,E,C,W,le,ke,Ye,lt,dt,tt,it){if(o.timeoutHandle=-1,dt=l.subtreeFlags,dt&8192||(dt&16785408)===16785408){dt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:wt},ef(l,C,dt);var St=(C&62914560)===C?Ja-ft():(C&4194048)===C?sf-ft():0;if(St=Rp(dt,St),St!==null){ji=C,o.cancelPendingCommit=St(yf.bind(null,o,l,C,d,m,E,W,le,ke,lt,dt,null,tt,it)),fs(o,C,W,!Ye);return}}yf(o,l,C,d,m,E,W,le,ke)}function Mh(o){for(var l=o;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var m=0;m<d.length;m++){var E=d[m],C=E.getSnapshot;E=E.value;try{if(!vt(C(),E))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function fs(o,l,d,m){l&=~Cu,l&=~Os,o.suspendedLanes|=l,o.pingedLanes&=~l,m&&(o.warmLanes|=l),m=o.expirationTimes;for(var E=l;0<E;){var C=31-Tt(E),W=1<<C;m[C]=-1,E&=~W}d!==0&&at(o,d,l)}function Xa(){return(rr&6)===0?(Xo(0),!1):!0}function ku(){if(zt!==null){if(ur===0)var o=zt.return;else o=zt,Ii=Is=null,Ql(o),ro=null,ko=0,o=zt;for(;o!==null;)jd(o.alternate,o),o=o.return;zt=null}}function ho(o,l){var d=o.timeoutHandle;d!==-1&&(o.timeoutHandle=-1,ap(d)),d=o.cancelPendingCommit,d!==null&&(o.cancelPendingCommit=null,d()),ji=0,ku(),_r=o,zt=d=xi(o.current,null),Wt=l,ur=0,$n=null,ls=!1,uo=nr(o,l),Iu=!1,co=jn=Cu=Os=us=Br=0,Cn=Qo=null,Nu=!1,(l&8)!==0&&(l|=l&32);var m=o.entangledLanes;if(m!==0)for(o=o.entanglements,m&=l;0<m;){var E=31-Tt(m),C=1<<E;l|=o[E],m&=~C}return $i=l,ba(),d}function cf(o,l){$t=null,ye.H=qo,l===to||l===Aa?(l=Tc(),ur=3):l===$l?(l=Tc(),ur=4):ur=l===fu?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,$n=l,zt===null&&(Br=1,Ma(o,Xn(l,o.current)))}function df(){var o=Un.current;return o===null?!0:(Wt&4194048)===Wt?ri===null:(Wt&62914560)===Wt||(Wt&536870912)!==0?o===ri:!1}function ff(){var o=ye.H;return ye.H=qo,o===null?qo:o}function hf(){var o=ye.A;return ye.A=jh,o}function Ya(){Br=4,ls||(Wt&4194048)!==Wt&&Un.current!==null||(uo=!0),(us&134217727)===0&&(Os&134217727)===0||_r===null||fs(_r,Wt,jn,!1)}function Lu(o,l,d){var m=rr;rr|=2;var E=ff(),C=hf();(_r!==o||Wt!==l)&&(Za=null,ho(o,l)),l=!1;var W=Br;e:do try{if(ur!==0&&zt!==null){var le=zt,ke=$n;switch(ur){case 8:ku(),W=6;break e;case 3:case 2:case 9:case 6:Un.current===null&&(l=!0);var Ye=ur;if(ur=0,$n=null,po(o,le,ke,Ye),d&&uo){W=0;break e}break;default:Ye=ur,ur=0,$n=null,po(o,le,ke,Ye)}}qh(),W=Br;break}catch(lt){cf(o,lt)}while(!0);return l&&o.shellSuspendCounter++,Ii=Is=null,rr=m,ye.H=E,ye.A=C,zt===null&&(_r=null,Wt=0,ba()),W}function qh(){for(;zt!==null;)pf(zt)}function zh(o,l){var d=rr;rr|=2;var m=ff(),E=hf();_r!==o||Wt!==l?(Za=null,Qa=ft()+500,ho(o,l)):uo=nr(o,l);e:do try{if(ur!==0&&zt!==null){l=zt;var C=$n;t:switch(ur){case 1:ur=0,$n=null,po(o,l,C,1);break;case 2:case 9:if(Sc(C)){ur=0,$n=null,gf(l);break}l=function(){ur!==2&&ur!==9||_r!==o||(ur=7),bi(o)},C.then(l,l);break e;case 3:ur=7;break e;case 4:ur=5;break e;case 7:Sc(C)?(ur=0,$n=null,gf(l)):(ur=0,$n=null,po(o,l,C,7));break;case 5:var W=null;switch(zt.tag){case 26:W=zt.memoizedState;case 5:case 27:var le=zt;if(W?eh(W):le.stateNode.complete){ur=0,$n=null;var ke=le.sibling;if(ke!==null)zt=ke;else{var Ye=le.return;Ye!==null?(zt=Ye,el(Ye)):zt=null}break t}}ur=0,$n=null,po(o,l,C,5);break;case 6:ur=0,$n=null,po(o,l,C,6);break;case 8:ku(),Br=6;break e;default:throw Error(n(462))}}Vh();break}catch(lt){cf(o,lt)}while(!0);return Ii=Is=null,ye.H=m,ye.A=E,rr=d,zt!==null?0:(_r=null,Wt=0,ba(),Br)}function Vh(){for(;zt!==null&&!de();)pf(zt)}function pf(o){var l=Od(o.alternate,o,$i);o.memoizedProps=o.pendingProps,l===null?el(o):zt=l}function gf(o){var l=o,d=l.alternate;switch(l.tag){case 15:case 0:l=Fd(d,l,l.pendingProps,l.type,void 0,Wt);break;case 11:l=Fd(d,l,l.pendingProps,l.type.render,l.ref,Wt);break;case 5:Ql(l);default:jd(d,l),l=zt=dc(l,$i),l=Od(d,l,$i)}o.memoizedProps=o.pendingProps,l===null?el(o):zt=l}function po(o,l,d,m){Ii=Is=null,Ql(l),ro=null,ko=0;var E=l.return;try{if(Dh(o,E,l,d,Wt)){Br=1,Ma(o,Xn(d,o.current)),zt=null;return}}catch(C){if(E!==null)throw zt=E,C;Br=1,Ma(o,Xn(d,o.current)),zt=null;return}l.flags&32768?(Gt||m===1?o=!0:uo||(Wt&536870912)!==0?o=!1:(ls=o=!0,(m===2||m===9||m===3||m===6)&&(m=Un.current,m!==null&&m.tag===13&&(m.flags|=16384))),mf(l,o)):el(l)}function el(o){var l=o;do{if((l.flags&32768)!==0){mf(l,ls);return}o=l.return;var d=Lh(l.alternate,l,$i);if(d!==null){zt=d;return}if(l=l.sibling,l!==null){zt=l;return}zt=l=o}while(l!==null);Br===0&&(Br=5)}function mf(o,l){do{var d=Uh(o.alternate,o);if(d!==null){d.flags&=32767,zt=d;return}if(d=o.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(o=o.sibling,o!==null)){zt=o;return}zt=o=d}while(o!==null);Br=6,zt=null}function yf(o,l,d,m,E,C,W,le,ke){o.cancelPendingCommit=null;do tl();while(en!==0);if((rr&6)!==0)throw Error(n(327));if(l!==null){if(l===o.current)throw Error(n(177));if(C=l.lanes|l.childLanes,C|=El,qe(o,d,C,W,le,ke),o===_r&&(zt=_r=null,Wt=0),fo=l,ds=o,ji=d,Fu=C,Du=E,of=m,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,Gh(P,function(){return Sf(),null})):(o.callbackNode=null,o.callbackPriority=0),m=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||m){m=ye.T,ye.T=null,E=Ve.p,Ve.p=2,W=rr,rr|=4;try{Oh(o,l,d)}finally{rr=W,Ve.p=E,ye.T=m}}en=1,bf(),_f(),wf()}}function bf(){if(en===1){en=0;var o=ds,l=fo,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=ye.T,ye.T=null;var m=Ve.p;Ve.p=2;var E=rr;rr|=4;try{Zd(l,o);var C=Ku,W=Es(o.containerInfo),le=C.focusedElem,ke=C.selectionRange;if(W!==le&&le&&le.ownerDocument&&ui(le.ownerDocument.documentElement,le)){if(ke!==null&&Ji(le)){var Ye=ke.start,lt=ke.end;if(lt===void 0&&(lt=Ye),"selectionStart"in le)le.selectionStart=Ye,le.selectionEnd=Math.min(lt,le.value.length);else{var dt=le.ownerDocument||document,tt=dt&&dt.defaultView||window;if(tt.getSelection){var it=tt.getSelection(),St=le.textContent.length,It=Math.min(ke.start,St),yr=ke.end===void 0?It:Math.min(ke.end,St);!it.extend&&It>yr&&(W=yr,yr=It,It=W);var Ke=ue(le,It),je=ue(le,yr);if(Ke&&je&&(it.rangeCount!==1||it.anchorNode!==Ke.node||it.anchorOffset!==Ke.offset||it.focusNode!==je.node||it.focusOffset!==je.offset)){var Ze=dt.createRange();Ze.setStart(Ke.node,Ke.offset),it.removeAllRanges(),It>yr?(it.addRange(Ze),it.extend(je.node,je.offset)):(Ze.setEnd(je.node,je.offset),it.addRange(Ze))}}}}for(dt=[],it=le;it=it.parentNode;)it.nodeType===1&&dt.push({element:it,left:it.scrollLeft,top:it.scrollTop});for(typeof le.focus=="function"&&le.focus(),le=0;le<dt.length;le++){var ct=dt[le];ct.element.scrollLeft=ct.left,ct.element.scrollTop=ct.top}}hl=!!Wu,Ku=Wu=null}finally{rr=E,Ve.p=m,ye.T=d}}o.current=l,en=2}}function _f(){if(en===2){en=0;var o=ds,l=fo,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=ye.T,ye.T=null;var m=Ve.p;Ve.p=2;var E=rr;rr|=4;try{Wd(o,l.alternate,l)}finally{rr=E,Ve.p=m,ye.T=d}}en=3}}function wf(){if(en===4||en===3){en=0,st();var o=ds,l=fo,d=ji,m=of;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?en=5:(en=0,fo=ds=null,vf(o,o.pendingLanes));var E=o.pendingLanes;if(E===0&&(cs=null),Sr(d),l=l.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Pe,l,void 0,(l.current.flags&128)===128)}catch{}if(m!==null){l=ye.T,E=Ve.p,Ve.p=2,ye.T=null;try{for(var C=o.onRecoverableError,W=0;W<m.length;W++){var le=m[W];C(le.value,{componentStack:le.stack})}}finally{ye.T=l,Ve.p=E}}(ji&3)!==0&&tl(),bi(o),E=o.pendingLanes,(d&261930)!==0&&(E&42)!==0?o===Pu?Zo++:(Zo=0,Pu=o):Zo=0,Xo(0)}}function vf(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,Do(l)))}function tl(){return bf(),_f(),wf(),Sf()}function Sf(){if(en!==5)return!1;var o=ds,l=Fu;Fu=0;var d=Sr(ji),m=ye.T,E=Ve.p;try{Ve.p=32>d?32:d,ye.T=null,d=Du,Du=null;var C=ds,W=ji;if(en=0,fo=ds=null,ji=0,(rr&6)!==0)throw Error(n(331));var le=rr;if(rr|=4,rf(C.current),Yd(C,C.current,W,d),rr=le,Xo(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Pe,C)}catch{}return!0}finally{Ve.p=E,ye.T=m,vf(o,l)}}function Ef(o,l,d){l=Xn(d,l),l=du(o.stateNode,l,2),o=rs(o,l,2),o!==null&&(Be(o,2),bi(o))}function cr(o,l,d){if(o.tag===3)Ef(o,o,d);else for(;l!==null;){if(l.tag===3){Ef(l,o,d);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(cs===null||!cs.has(m))){o=Xn(d,o),d=Ed(2),m=rs(l,d,2),m!==null&&(Td(d,m,l,o),Be(m,2),bi(m));break}}l=l.return}}function Uu(o,l,d){var m=o.pingCache;if(m===null){m=o.pingCache=new Bh;var E=new Set;m.set(l,E)}else E=m.get(l),E===void 0&&(E=new Set,m.set(l,E));E.has(d)||(Iu=!0,E.add(d),o=Hh.bind(null,o,l,d),l.then(o,o))}function Hh(o,l,d){var m=o.pingCache;m!==null&&m.delete(l),o.pingedLanes|=o.suspendedLanes&d,o.warmLanes&=~d,_r===o&&(Wt&d)===d&&(Br===4||Br===3&&(Wt&62914560)===Wt&&300>ft()-Ja?(rr&2)===0&&ho(o,0):Cu|=d,co===Wt&&(co=0)),bi(o)}function Tf(o,l){l===0&&(l=M()),o=Rs(o,l),o!==null&&(Be(o,l),bi(o))}function Wh(o){var l=o.memoizedState,d=0;l!==null&&(d=l.retryLane),Tf(o,d)}function Kh(o,l){var d=0;switch(o.tag){case 31:case 13:var m=o.stateNode,E=o.memoizedState;E!==null&&(d=E.retryLane);break;case 19:m=o.stateNode;break;case 22:m=o.stateNode._retryCache;break;default:throw Error(n(314))}m!==null&&m.delete(l),Tf(o,d)}function Gh(o,l){return me(o,l)}var rl=null,go=null,Ou=!1,nl=!1,$u=!1,hs=0;function bi(o){o!==go&&o.next===null&&(go===null?rl=go=o:go=go.next=o),nl=!0,Ou||(Ou=!0,Qh())}function Xo(o,l){if(!$u&&nl){$u=!0;do for(var d=!1,m=rl;m!==null;){if(o!==0){var E=m.pendingLanes;if(E===0)var C=0;else{var W=m.suspendedLanes,le=m.pingedLanes;C=(1<<31-Tt(42|o)+1)-1,C&=E&~(W&~le),C=C&201326741?C&201326741|1:C?C|2:0}C!==0&&(d=!0,If(m,C))}else C=Wt,C=dr(m,m===_r?C:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(C&3)===0||nr(m,C)||(d=!0,If(m,C));m=m.next}while(d);$u=!1}}function Jh(){Rf()}function Rf(){nl=Ou=!1;var o=0;hs!==0&&op()&&(o=hs);for(var l=ft(),d=null,m=rl;m!==null;){var E=m.next,C=xf(m,l);C===0?(m.next=null,d===null?rl=E:d.next=E,E===null&&(go=d)):(d=m,(o!==0||(C&3)!==0)&&(nl=!0)),m=E}en!==0&&en!==5||Xo(o),hs!==0&&(hs=0)}function xf(o,l){for(var d=o.suspendedLanes,m=o.pingedLanes,E=o.expirationTimes,C=o.pendingLanes&-62914561;0<C;){var W=31-Tt(C),le=1<<W,ke=E[W];ke===-1?((le&d)===0||(le&m)!==0)&&(E[W]=Vr(le,l)):ke<=l&&(o.expiredLanes|=le),C&=~le}if(l=_r,d=Wt,d=dr(o,o===l?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),m=o.callbackNode,d===0||o===l&&(ur===2||ur===9)||o.cancelPendingCommit!==null)return m!==null&&m!==null&&xe(m),o.callbackNode=null,o.callbackPriority=0;if((d&3)===0||nr(o,d)){if(l=d&-d,l===o.callbackPriority)return l;switch(m!==null&&xe(m),Sr(d)){case 2:case 8:d=Z;break;case 32:d=P;break;case 268435456:d=U;break;default:d=P}return m=Af.bind(null,o),d=me(d,m),o.callbackPriority=l,o.callbackNode=d,l}return m!==null&&m!==null&&xe(m),o.callbackPriority=2,o.callbackNode=null,2}function Af(o,l){if(en!==0&&en!==5)return o.callbackNode=null,o.callbackPriority=0,null;var d=o.callbackNode;if(tl()&&o.callbackNode!==d)return null;var m=Wt;return m=dr(o,o===_r?m:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),m===0?null:(lf(o,m,l),xf(o,ft()),o.callbackNode!=null&&o.callbackNode===d?Af.bind(null,o):null)}function If(o,l){if(tl())return null;lf(o,l,!0)}function Qh(){lp(function(){(rr&6)!==0?me(pt,Jh):Rf()})}function ju(){if(hs===0){var o=Ys;o===0&&(o=Yt,Yt<<=1,(Yt&261888)===0&&(Yt=256)),hs=o}return hs}function Cf(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:yt(""+o)}function Nf(o,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,o.id&&d.setAttribute("form",o.id),l.parentNode.insertBefore(d,l),o=new FormData(o),d.parentNode.removeChild(d),o}function Zh(o,l,d,m,E){if(l==="submit"&&d&&d.stateNode===E){var C=Cf((E[fr]||null).action),W=m.submitter;W&&(l=(l=W[fr]||null)?Cf(l.formAction):W.getAttribute("formAction"),l!==null&&(C=l,W=null));var le=new Mn("action","action",null,m,E);o.push({event:le,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(hs!==0){var ke=W?Nf(E,W):new FormData(E);su(d,{pending:!0,data:ke,method:E.method,action:C},null,ke)}}else typeof C=="function"&&(le.preventDefault(),ke=W?Nf(E,W):new FormData(E),su(d,{pending:!0,data:ke,method:E.method,action:C},C,ke))},currentTarget:E}]})}}for(var Bu=0;Bu<Sl.length;Bu++){var Mu=Sl[Bu],Xh=Mu.toLowerCase(),Yh=Mu[0].toUpperCase()+Mu.slice(1);ci(Xh,"on"+Yh)}ci(Kr,"onAnimationEnd"),ci(Ts,"onAnimationIteration"),ci(Qn,"onAnimationStart"),ci("dblclick","onDoubleClick"),ci("focusin","onFocus"),ci("focusout","onBlur"),ci(ma,"onTransitionRun"),ci(Ws,"onTransitionStart"),ci(Co,"onTransitionCancel"),ci(Ri,"onTransitionEnd"),hn("onMouseEnter",["mouseout","mouseover"]),hn("onMouseLeave",["mouseout","mouseover"]),hn("onPointerEnter",["pointerout","pointerover"]),hn("onPointerLeave",["pointerout","pointerover"]),Sn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ep=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yo));function Ff(o,l){l=(l&4)!==0;for(var d=0;d<o.length;d++){var m=o[d],E=m.event;m=m.listeners;e:{var C=void 0;if(l)for(var W=m.length-1;0<=W;W--){var le=m[W],ke=le.instance,Ye=le.currentTarget;if(le=le.listener,ke!==C&&E.isPropagationStopped())break e;C=le,E.currentTarget=Ye;try{C(E)}catch(lt){ya(lt)}E.currentTarget=null,C=ke}else for(W=0;W<m.length;W++){if(le=m[W],ke=le.instance,Ye=le.currentTarget,le=le.listener,ke!==C&&E.isPropagationStopped())break e;C=le,E.currentTarget=Ye;try{C(E)}catch(lt){ya(lt)}E.currentTarget=null,C=ke}}}}function Vt(o,l){var d=l[Mr];d===void 0&&(d=l[Mr]=new Set);var m=o+"__bubble";d.has(m)||(Df(l,o,2,!1),d.add(m))}function qu(o,l,d){var m=0;l&&(m|=4),Df(d,o,m,l)}var il="_reactListening"+Math.random().toString(36).slice(2);function zu(o){if(!o[il]){o[il]=!0,_i.forEach(function(d){d!=="selectionchange"&&(ep.has(d)||qu(d,!1,o),qu(d,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[il]||(l[il]=!0,qu("selectionchange",!1,l))}}function Df(o,l,d,m){switch(ah(l)){case 2:var E=Ip;break;case 8:E=Cp;break;default:E=ic}d=E.bind(null,l,d,o),E=void 0,!Or||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(E=!0),m?E!==void 0?o.addEventListener(l,d,{capture:!0,passive:E}):o.addEventListener(l,d,!0):E!==void 0?o.addEventListener(l,d,{passive:E}):o.addEventListener(l,d,!1)}function Vu(o,l,d,m,E){var C=m;if((l&1)===0&&(l&2)===0&&m!==null)e:for(;;){if(m===null)return;var W=m.tag;if(W===3||W===4){var le=m.stateNode.containerInfo;if(le===E)break;if(W===4)for(W=m.return;W!==null;){var ke=W.tag;if((ke===3||ke===4)&&W.stateNode.containerInfo===E)return;W=W.return}for(;le!==null;){if(W=or(le),W===null)return;if(ke=W.tag,ke===5||ke===6||ke===26||ke===27){m=C=W;continue e}le=le.parentNode}}m=m.return}ar(function(){var Ye=C,lt=Qt(d),dt=[];e:{var tt=uc.get(o);if(tt!==void 0){var it=Mn,St=o;switch(o){case"keypress":if(Fn(d)===0)break e;case"keydown":case"keyup":it=vs;break;case"focusin":St="focus",it=zn;break;case"focusout":St="blur",it=zn;break;case"beforeblur":case"afterblur":it=zn;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":it=lr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":it=hi;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":it=Vi;break;case Kr:case Ts:case Qn:it=Hn;break;case Ri:it=Si;break;case"scroll":case"scrollend":it=Mi;break;case"wheel":it=To;break;case"copy":case"cut":case"paste":it=wo;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":it=Wr;break;case"toggle":case"beforetoggle":it=wl}var It=(l&4)!==0,yr=!It&&(o==="scroll"||o==="scrollend"),Ke=It?tt!==null?tt+"Capture":null:tt;It=[];for(var je=Ye,Ze;je!==null;){var ct=je;if(Ze=ct.stateNode,ct=ct.tag,ct!==5&&ct!==26&&ct!==27||Ze===null||Ke===null||(ct=Xt(je,Ke),ct!=null&&It.push(ea(je,ct,Ze))),yr)break;je=je.return}0<It.length&&(tt=new it(tt,St,null,d,lt),dt.push({event:tt,listeners:It}))}}if((l&7)===0){e:{if(tt=o==="mouseover"||o==="pointerover",it=o==="mouseout"||o==="pointerout",tt&&d!==Jt&&(St=d.relatedTarget||d.fromElement)&&(or(St)||St[Dr]))break e;if((it||tt)&&(tt=lt.window===lt?lt:(tt=lt.ownerDocument)?tt.defaultView||tt.parentWindow:window,it?(St=d.relatedTarget||d.toElement,it=Ye,St=St?or(St):null,St!==null&&(yr=a(St),It=St.tag,St!==yr||It!==5&&It!==27&&It!==6)&&(St=null)):(it=null,St=Ye),it!==St)){if(It=lr,ct="onMouseLeave",Ke="onMouseEnter",je="mouse",(o==="pointerout"||o==="pointerover")&&(It=Wr,ct="onPointerLeave",Ke="onPointerEnter",je="pointer"),yr=it==null?tt:Pr(it),Ze=St==null?tt:Pr(St),tt=new It(ct,je+"leave",it,d,lt),tt.target=yr,tt.relatedTarget=Ze,ct=null,or(lt)===Ye&&(It=new It(Ke,je+"enter",St,d,lt),It.target=Ze,It.relatedTarget=yr,ct=It),yr=ct,it&&St)t:{for(It=tp,Ke=it,je=St,Ze=0,ct=Ke;ct;ct=It(ct))Ze++;ct=0;for(var At=je;At;At=It(At))ct++;for(;0<Ze-ct;)Ke=It(Ke),Ze--;for(;0<ct-Ze;)je=It(je),ct--;for(;Ze--;){if(Ke===je||je!==null&&Ke===je.alternate){It=Ke;break t}Ke=It(Ke),je=It(je)}It=null}else It=null;it!==null&&Pf(dt,tt,it,It,!1),St!==null&&yr!==null&&Pf(dt,yr,St,It,!0)}}e:{if(tt=Ye?Pr(Ye):window,it=tt.nodeName&&tt.nodeName.toLowerCase(),it==="select"||it==="input"&&tt.type==="file")var er=Gi;else if(Bs(tt))if(Io)er=mt;else{er=rt;var Et=ot}else it=tt.nodeName,!it||it.toLowerCase()!=="input"||tt.type!=="checkbox"&&tt.type!=="radio"?Ye&&bt(Ye.elementType)&&(er=Gi):er=ut;if(er&&(er=er(o,Ye))){ha(dt,er,d,lt);break e}Et&&Et(o,tt,Ye),o==="focusout"&&Ye&&tt.type==="number"&&Ye.memoizedProps.value!=null&&Xe(tt,"number",tt.value)}switch(Et=Ye?Pr(Ye):window,o){case"focusin":(Bs(Et)||Et.contentEditable==="true")&&(pr=Et,Rn=Ye,kn=null);break;case"focusout":kn=Rn=pr=null;break;case"mousedown":pi=!0;break;case"contextmenu":case"mouseup":case"dragend":pi=!1,Hs(dt,d,lt);break;case"selectionchange":if(Vs)break;case"keydown":case"keyup":Hs(dt,d,lt)}var jt;if(Pn)e:{switch(o){case"compositionstart":var Kt="onCompositionStart";break e;case"compositionend":Kt="onCompositionEnd";break e;case"compositionupdate":Kt="onCompositionUpdate";break e}Kt=void 0}else Wi?js(o,d)&&(Kt="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(Kt="onCompositionStart");Kt&&(ca&&d.locale!=="ko"&&(Wi||Kt!=="onCompositionStart"?Kt==="onCompositionEnd"&&Wi&&(jt=gn()):(tn=lt,pn="value"in tn?tn.value:tn.textContent,Wi=!0)),Et=sl(Ye,Kt),0<Et.length&&(Kt=new vo(Kt,o,null,d,lt),dt.push({event:Kt,listeners:Et}),jt?Kt.data=jt:(jt=xo(d),jt!==null&&(Kt.data=jt)))),(jt=ua?vl(o,d):Ao(o,d))&&(Kt=sl(Ye,"onBeforeInput"),0<Kt.length&&(Et=new vo("onBeforeInput","beforeinput",null,d,lt),dt.push({event:Et,listeners:Kt}),Et.data=jt)),Zh(dt,o,Ye,d,lt)}Ff(dt,l)})}function ea(o,l,d){return{instance:o,listener:l,currentTarget:d}}function sl(o,l){for(var d=l+"Capture",m=[];o!==null;){var E=o,C=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||C===null||(E=Xt(o,d),E!=null&&m.unshift(ea(o,E,C)),E=Xt(o,l),E!=null&&m.push(ea(o,E,C))),o.tag===3)return m;o=o.return}return[]}function tp(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function Pf(o,l,d,m,E){for(var C=l._reactName,W=[];d!==null&&d!==m;){var le=d,ke=le.alternate,Ye=le.stateNode;if(le=le.tag,ke!==null&&ke===m)break;le!==5&&le!==26&&le!==27||Ye===null||(ke=Ye,E?(Ye=Xt(d,C),Ye!=null&&W.unshift(ea(d,Ye,ke))):E||(Ye=Xt(d,C),Ye!=null&&W.push(ea(d,Ye,ke)))),d=d.return}W.length!==0&&o.push({event:l,listeners:W})}var rp=/\r\n?/g,np=/\u0000|\uFFFD/g;function kf(o){return(typeof o=="string"?o:""+o).replace(rp,`
10
- `).replace(np,"")}function Lf(o,l){return l=kf(l),kf(o)===l}function mr(o,l,d,m,E,C){switch(d){case"children":typeof m=="string"?l==="body"||l==="textarea"&&m===""||Ae(o,m):(typeof m=="number"||typeof m=="bigint")&&l!=="body"&&Ae(o,""+m);break;case"className":I(o,"class",m);break;case"tabIndex":I(o,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":I(o,d,m);break;case"style":nt(o,m,C);break;case"data":if(l!=="object"){I(o,"data",m);break}case"src":case"href":if(m===""&&(l!=="a"||d!=="href")){o.removeAttribute(d);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){o.removeAttribute(d);break}m=yt(""+m),o.setAttribute(d,m);break;case"action":case"formAction":if(typeof m=="function"){o.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof C=="function"&&(d==="formAction"?(l!=="input"&&mr(o,l,"name",E.name,E,null),mr(o,l,"formEncType",E.formEncType,E,null),mr(o,l,"formMethod",E.formMethod,E,null),mr(o,l,"formTarget",E.formTarget,E,null)):(mr(o,l,"encType",E.encType,E,null),mr(o,l,"method",E.method,E,null),mr(o,l,"target",E.target,E,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){o.removeAttribute(d);break}m=yt(""+m),o.setAttribute(d,m);break;case"onClick":m!=null&&(o.onclick=wt);break;case"onScroll":m!=null&&Vt("scroll",o);break;case"onScrollEnd":m!=null&&Vt("scrollend",o);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(d=m.__html,d!=null){if(E.children!=null)throw Error(n(60));o.innerHTML=d}}break;case"multiple":o.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":o.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){o.removeAttribute("xlink:href");break}d=yt(""+m),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?o.setAttribute(d,""+m):o.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?o.setAttribute(d,""):o.removeAttribute(d);break;case"capture":case"download":m===!0?o.setAttribute(d,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?o.setAttribute(d,m):o.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?o.setAttribute(d,m):o.removeAttribute(d);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?o.removeAttribute(d):o.setAttribute(d,m);break;case"popover":Vt("beforetoggle",o),Vt("toggle",o),v(o,"popover",m);break;case"xlinkActuate":k(o,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":k(o,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":k(o,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":k(o,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":k(o,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":k(o,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":k(o,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":k(o,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":k(o,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":v(o,"is",m);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=ht.get(d)||d,v(o,d,m))}}function Hu(o,l,d,m,E,C){switch(d){case"style":nt(o,m,C);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(d=m.__html,d!=null){if(E.children!=null)throw Error(n(60));o.innerHTML=d}}break;case"children":typeof m=="string"?Ae(o,m):(typeof m=="number"||typeof m=="bigint")&&Ae(o,""+m);break;case"onScroll":m!=null&&Vt("scroll",o);break;case"onScrollEnd":m!=null&&Vt("scrollend",o);break;case"onClick":m!=null&&(o.onclick=wt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wi.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(E=d.endsWith("Capture"),l=d.slice(2,E?d.length-7:void 0),C=o[fr]||null,C=C!=null?C[d]:null,typeof C=="function"&&o.removeEventListener(l,C,E),typeof m=="function")){typeof C!="function"&&C!==null&&(d in o?o[d]=null:o.hasAttribute(d)&&o.removeAttribute(d)),o.addEventListener(l,m,E);break e}d in o?o[d]=m:m===!0?o.setAttribute(d,""):v(o,d,m)}}}function fn(o,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Vt("error",o),Vt("load",o);var m=!1,E=!1,C;for(C in d)if(d.hasOwnProperty(C)){var W=d[C];if(W!=null)switch(C){case"src":m=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:mr(o,l,C,W,d,null)}}E&&mr(o,l,"srcSet",d.srcSet,d,null),m&&mr(o,l,"src",d.src,d,null);return;case"input":Vt("invalid",o);var le=C=W=E=null,ke=null,Ye=null;for(m in d)if(d.hasOwnProperty(m)){var lt=d[m];if(lt!=null)switch(m){case"name":E=lt;break;case"type":W=lt;break;case"checked":ke=lt;break;case"defaultChecked":Ye=lt;break;case"value":C=lt;break;case"defaultValue":le=lt;break;case"children":case"dangerouslySetInnerHTML":if(lt!=null)throw Error(n(137,l));break;default:mr(o,l,m,lt,d,null)}}We(o,C,le,ke,Ye,W,E,!1);return;case"select":Vt("invalid",o),m=W=C=null;for(E in d)if(d.hasOwnProperty(E)&&(le=d[E],le!=null))switch(E){case"value":C=le;break;case"defaultValue":W=le;break;case"multiple":m=le;default:mr(o,l,E,le,d,null)}l=C,d=W,o.multiple=!!m,l!=null?et(o,!!m,l,!1):d!=null&&et(o,!!m,d,!0);return;case"textarea":Vt("invalid",o),C=E=m=null;for(W in d)if(d.hasOwnProperty(W)&&(le=d[W],le!=null))switch(W){case"value":m=le;break;case"defaultValue":E=le;break;case"children":C=le;break;case"dangerouslySetInnerHTML":if(le!=null)throw Error(n(91));break;default:mr(o,l,W,le,d,null)}Se(o,m,E,C);return;case"option":for(ke in d)d.hasOwnProperty(ke)&&(m=d[ke],m!=null)&&(ke==="selected"?o.selected=m&&typeof m!="function"&&typeof m!="symbol":mr(o,l,ke,m,d,null));return;case"dialog":Vt("beforetoggle",o),Vt("toggle",o),Vt("cancel",o),Vt("close",o);break;case"iframe":case"object":Vt("load",o);break;case"video":case"audio":for(m=0;m<Yo.length;m++)Vt(Yo[m],o);break;case"image":Vt("error",o),Vt("load",o);break;case"details":Vt("toggle",o);break;case"embed":case"source":case"link":Vt("error",o),Vt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ye in d)if(d.hasOwnProperty(Ye)&&(m=d[Ye],m!=null))switch(Ye){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:mr(o,l,Ye,m,d,null)}return;default:if(bt(l)){for(lt in d)d.hasOwnProperty(lt)&&(m=d[lt],m!==void 0&&Hu(o,l,lt,m,d,void 0));return}}for(le in d)d.hasOwnProperty(le)&&(m=d[le],m!=null&&mr(o,l,le,m,d,null))}function ip(o,l,d,m){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var E=null,C=null,W=null,le=null,ke=null,Ye=null,lt=null;for(it in d){var dt=d[it];if(d.hasOwnProperty(it)&&dt!=null)switch(it){case"checked":break;case"value":break;case"defaultValue":ke=dt;default:m.hasOwnProperty(it)||mr(o,l,it,null,m,dt)}}for(var tt in m){var it=m[tt];if(dt=d[tt],m.hasOwnProperty(tt)&&(it!=null||dt!=null))switch(tt){case"type":C=it;break;case"name":E=it;break;case"checked":Ye=it;break;case"defaultChecked":lt=it;break;case"value":W=it;break;case"defaultValue":le=it;break;case"children":case"dangerouslySetInnerHTML":if(it!=null)throw Error(n(137,l));break;default:it!==dt&&mr(o,l,tt,it,m,dt)}}Le(o,W,le,ke,Ye,lt,C,E);return;case"select":it=W=le=tt=null;for(C in d)if(ke=d[C],d.hasOwnProperty(C)&&ke!=null)switch(C){case"value":break;case"multiple":it=ke;default:m.hasOwnProperty(C)||mr(o,l,C,null,m,ke)}for(E in m)if(C=m[E],ke=d[E],m.hasOwnProperty(E)&&(C!=null||ke!=null))switch(E){case"value":tt=C;break;case"defaultValue":le=C;break;case"multiple":W=C;default:C!==ke&&mr(o,l,E,C,m,ke)}l=le,d=W,m=it,tt!=null?et(o,!!d,tt,!1):!!m!=!!d&&(l!=null?et(o,!!d,l,!0):et(o,!!d,d?[]:"",!1));return;case"textarea":it=tt=null;for(le in d)if(E=d[le],d.hasOwnProperty(le)&&E!=null&&!m.hasOwnProperty(le))switch(le){case"value":break;case"children":break;default:mr(o,l,le,null,m,E)}for(W in m)if(E=m[W],C=d[W],m.hasOwnProperty(W)&&(E!=null||C!=null))switch(W){case"value":tt=E;break;case"defaultValue":it=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(n(91));break;default:E!==C&&mr(o,l,W,E,m,C)}ne(o,tt,it);return;case"option":for(var St in d)tt=d[St],d.hasOwnProperty(St)&&tt!=null&&!m.hasOwnProperty(St)&&(St==="selected"?o.selected=!1:mr(o,l,St,null,m,tt));for(ke in m)tt=m[ke],it=d[ke],m.hasOwnProperty(ke)&&tt!==it&&(tt!=null||it!=null)&&(ke==="selected"?o.selected=tt&&typeof tt!="function"&&typeof tt!="symbol":mr(o,l,ke,tt,m,it));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var It in d)tt=d[It],d.hasOwnProperty(It)&&tt!=null&&!m.hasOwnProperty(It)&&mr(o,l,It,null,m,tt);for(Ye in m)if(tt=m[Ye],it=d[Ye],m.hasOwnProperty(Ye)&&tt!==it&&(tt!=null||it!=null))switch(Ye){case"children":case"dangerouslySetInnerHTML":if(tt!=null)throw Error(n(137,l));break;default:mr(o,l,Ye,tt,m,it)}return;default:if(bt(l)){for(var yr in d)tt=d[yr],d.hasOwnProperty(yr)&&tt!==void 0&&!m.hasOwnProperty(yr)&&Hu(o,l,yr,void 0,m,tt);for(lt in m)tt=m[lt],it=d[lt],!m.hasOwnProperty(lt)||tt===it||tt===void 0&&it===void 0||Hu(o,l,lt,tt,m,it);return}}for(var Ke in d)tt=d[Ke],d.hasOwnProperty(Ke)&&tt!=null&&!m.hasOwnProperty(Ke)&&mr(o,l,Ke,null,m,tt);for(dt in m)tt=m[dt],it=d[dt],!m.hasOwnProperty(dt)||tt===it||tt==null&&it==null||mr(o,l,dt,tt,m,it)}function Uf(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sp(){if(typeof performance.getEntriesByType=="function"){for(var o=0,l=0,d=performance.getEntriesByType("resource"),m=0;m<d.length;m++){var E=d[m],C=E.transferSize,W=E.initiatorType,le=E.duration;if(C&&le&&Uf(W)){for(W=0,le=E.responseEnd,m+=1;m<d.length;m++){var ke=d[m],Ye=ke.startTime;if(Ye>le)break;var lt=ke.transferSize,dt=ke.initiatorType;lt&&Uf(dt)&&(ke=ke.responseEnd,W+=lt*(ke<le?1:(le-Ye)/(ke-Ye)))}if(--m,l+=8*(C+W)/(E.duration/1e3),o++,10<o)break}}if(0<o)return l/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var Wu=null,Ku=null;function ol(o){return o.nodeType===9?o:o.ownerDocument}function Of(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function $f(o,l){if(o===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&l==="foreignObject"?0:o}function Gu(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Ju=null;function op(){var o=window.event;return o&&o.type==="popstate"?o===Ju?!1:(Ju=o,!0):(Ju=null,!1)}var jf=typeof setTimeout=="function"?setTimeout:void 0,ap=typeof clearTimeout=="function"?clearTimeout:void 0,Bf=typeof Promise=="function"?Promise:void 0,lp=typeof queueMicrotask=="function"?queueMicrotask:typeof Bf<"u"?function(o){return Bf.resolve(null).then(o).catch(up)}:jf;function up(o){setTimeout(function(){throw o})}function ps(o){return o==="head"}function Mf(o,l){var d=l,m=0;do{var E=d.nextSibling;if(o.removeChild(d),E&&E.nodeType===8)if(d=E.data,d==="/$"||d==="/&"){if(m===0){o.removeChild(E),_o(l);return}m--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")m++;else if(d==="html")ta(o.ownerDocument.documentElement);else if(d==="head"){d=o.ownerDocument.head,ta(d);for(var C=d.firstChild;C;){var W=C.nextSibling,le=C.nodeName;C[oi]||le==="SCRIPT"||le==="STYLE"||le==="LINK"&&C.rel.toLowerCase()==="stylesheet"||d.removeChild(C),C=W}}else d==="body"&&ta(o.ownerDocument.body);d=E}while(d);_o(l)}function qf(o,l){var d=o;o=0;do{var m=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),m&&m.nodeType===8)if(d=m.data,d==="/$"){if(o===0)break;o--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||o++;d=m}while(d)}function Qu(o){var l=o.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":Qu(d),br(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}o.removeChild(d)}}function cp(o,l,d,m){for(;o.nodeType===1;){var E=d;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!m&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(m){if(!o[oi])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(C=o.getAttribute("rel"),C==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(C!==E.rel||o.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||o.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||o.getAttribute("title")!==(E.title==null?null:E.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(C=o.getAttribute("src"),(C!==(E.src==null?null:E.src)||o.getAttribute("type")!==(E.type==null?null:E.type)||o.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&C&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var C=E.name==null?null:""+E.name;if(E.type==="hidden"&&o.getAttribute("name")===C)return o}else return o;if(o=ni(o.nextSibling),o===null)break}return null}function dp(o,l,d){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!d||(o=ni(o.nextSibling),o===null))return null;return o}function zf(o,l){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=ni(o.nextSibling),o===null))return null;return o}function Zu(o){return o.data==="$?"||o.data==="$~"}function Xu(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function fp(o,l){var d=o.ownerDocument;if(o.data==="$~")o._reactRetry=l;else if(o.data!=="$?"||d.readyState!=="loading")l();else{var m=function(){l(),d.removeEventListener("DOMContentLoaded",m)};d.addEventListener("DOMContentLoaded",m),o._reactRetry=m}}function ni(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return o}var Yu=null;function Vf(o){o=o.nextSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="/$"||d==="/&"){if(l===0)return ni(o.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}o=o.nextSibling}return null}function Hf(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return o;l--}else d!=="/$"&&d!=="/&"||l++}o=o.previousSibling}return null}function Wf(o,l,d){switch(l=ol(d),o){case"html":if(o=l.documentElement,!o)throw Error(n(452));return o;case"head":if(o=l.head,!o)throw Error(n(453));return o;case"body":if(o=l.body,!o)throw Error(n(454));return o;default:throw Error(n(451))}}function ta(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);br(o)}var ii=new Map,Kf=new Set;function al(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Bi=Ve.d;Ve.d={f:hp,r:pp,D:gp,C:mp,L:yp,m:bp,X:wp,S:_p,M:vp};function hp(){var o=Bi.f(),l=Xa();return o||l}function pp(o){var l=ai(o);l!==null&&l.tag===5&&l.type==="form"?ud(l):Bi.r(o)}var mo=typeof document>"u"?null:document;function Gf(o,l,d){var m=mo;if(m&&typeof l=="string"&&l){var E=Ce(l);E='link[rel="'+o+'"][href="'+E+'"]',typeof d=="string"&&(E+='[crossorigin="'+d+'"]'),Kf.has(E)||(Kf.add(E),o={rel:o,crossOrigin:d,href:l},m.querySelector(E)===null&&(l=m.createElement("link"),fn(l,"link",o),Er(l),m.head.appendChild(l)))}}function gp(o){Bi.D(o),Gf("dns-prefetch",o,null)}function mp(o,l){Bi.C(o,l),Gf("preconnect",o,l)}function yp(o,l,d){Bi.L(o,l,d);var m=mo;if(m&&o&&l){var E='link[rel="preload"][as="'+Ce(l)+'"]';l==="image"&&d&&d.imageSrcSet?(E+='[imagesrcset="'+Ce(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(E+='[imagesizes="'+Ce(d.imageSizes)+'"]')):E+='[href="'+Ce(o)+'"]';var C=E;switch(l){case"style":C=yo(o);break;case"script":C=bo(o)}ii.has(C)||(o=g({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:o,as:l},d),ii.set(C,o),m.querySelector(E)!==null||l==="style"&&m.querySelector(ra(C))||l==="script"&&m.querySelector(na(C))||(l=m.createElement("link"),fn(l,"link",o),Er(l),m.head.appendChild(l)))}}function bp(o,l){Bi.m(o,l);var d=mo;if(d&&o){var m=l&&typeof l.as=="string"?l.as:"script",E='link[rel="modulepreload"][as="'+Ce(m)+'"][href="'+Ce(o)+'"]',C=E;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":C=bo(o)}if(!ii.has(C)&&(o=g({rel:"modulepreload",href:o},l),ii.set(C,o),d.querySelector(E)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(na(C)))return}m=d.createElement("link"),fn(m,"link",o),Er(m),d.head.appendChild(m)}}}function _p(o,l,d){Bi.S(o,l,d);var m=mo;if(m&&o){var E=vn(m).hoistableStyles,C=yo(o);l=l||"default";var W=E.get(C);if(!W){var le={loading:0,preload:null};if(W=m.querySelector(ra(C)))le.loading=5;else{o=g({rel:"stylesheet",href:o,"data-precedence":l},d),(d=ii.get(C))&&ec(o,d);var ke=W=m.createElement("link");Er(ke),fn(ke,"link",o),ke._p=new Promise(function(Ye,lt){ke.onload=Ye,ke.onerror=lt}),ke.addEventListener("load",function(){le.loading|=1}),ke.addEventListener("error",function(){le.loading|=2}),le.loading|=4,ll(W,l,m)}W={type:"stylesheet",instance:W,count:1,state:le},E.set(C,W)}}}function wp(o,l){Bi.X(o,l);var d=mo;if(d&&o){var m=vn(d).hoistableScripts,E=bo(o),C=m.get(E);C||(C=d.querySelector(na(E)),C||(o=g({src:o,async:!0},l),(l=ii.get(E))&&tc(o,l),C=d.createElement("script"),Er(C),fn(C,"link",o),d.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},m.set(E,C))}}function vp(o,l){Bi.M(o,l);var d=mo;if(d&&o){var m=vn(d).hoistableScripts,E=bo(o),C=m.get(E);C||(C=d.querySelector(na(E)),C||(o=g({src:o,async:!0,type:"module"},l),(l=ii.get(E))&&tc(o,l),C=d.createElement("script"),Er(C),fn(C,"link",o),d.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},m.set(E,C))}}function Jf(o,l,d,m){var E=(E=Je.current)?al(E):null;if(!E)throw Error(n(446));switch(o){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=yo(d.href),d=vn(E).hoistableStyles,m=d.get(l),m||(m={type:"style",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){o=yo(d.href);var C=vn(E).hoistableStyles,W=C.get(o);if(W||(E=E.ownerDocument||E,W={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},C.set(o,W),(C=E.querySelector(ra(o)))&&!C._p&&(W.instance=C,W.state.loading=5),ii.has(o)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},ii.set(o,d),C||Sp(E,o,d,W.state))),l&&m===null)throw Error(n(528,""));return W}if(l&&m!==null)throw Error(n(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=bo(d),d=vn(E).hoistableScripts,m=d.get(l),m||(m={type:"script",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,o))}}function yo(o){return'href="'+Ce(o)+'"'}function ra(o){return'link[rel="stylesheet"]['+o+"]"}function Qf(o){return g({},o,{"data-precedence":o.precedence,precedence:null})}function Sp(o,l,d,m){o.querySelector('link[rel="preload"][as="style"]['+l+"]")?m.loading=1:(l=o.createElement("link"),m.preload=l,l.addEventListener("load",function(){return m.loading|=1}),l.addEventListener("error",function(){return m.loading|=2}),fn(l,"link",d),Er(l),o.head.appendChild(l))}function bo(o){return'[src="'+Ce(o)+'"]'}function na(o){return"script[async]"+o}function Zf(o,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var m=o.querySelector('style[data-href~="'+Ce(d.href)+'"]');if(m)return l.instance=m,Er(m),m;var E=g({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return m=(o.ownerDocument||o).createElement("style"),Er(m),fn(m,"style",E),ll(m,d.precedence,o),l.instance=m;case"stylesheet":E=yo(d.href);var C=o.querySelector(ra(E));if(C)return l.state.loading|=4,l.instance=C,Er(C),C;m=Qf(d),(E=ii.get(E))&&ec(m,E),C=(o.ownerDocument||o).createElement("link"),Er(C);var W=C;return W._p=new Promise(function(le,ke){W.onload=le,W.onerror=ke}),fn(C,"link",m),l.state.loading|=4,ll(C,d.precedence,o),l.instance=C;case"script":return C=bo(d.src),(E=o.querySelector(na(C)))?(l.instance=E,Er(E),E):(m=d,(E=ii.get(C))&&(m=g({},d),tc(m,E)),o=o.ownerDocument||o,E=o.createElement("script"),Er(E),fn(E,"link",m),o.head.appendChild(E),l.instance=E);case"void":return null;default:throw Error(n(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(m=l.instance,l.state.loading|=4,ll(m,d.precedence,o));return l.instance}function ll(o,l,d){for(var m=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=m.length?m[m.length-1]:null,C=E,W=0;W<m.length;W++){var le=m[W];if(le.dataset.precedence===l)C=le;else if(C!==E)break}C?C.parentNode.insertBefore(o,C.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(o,l.firstChild))}function ec(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function tc(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var ul=null;function Xf(o,l,d){if(ul===null){var m=new Map,E=ul=new Map;E.set(d,m)}else E=ul,m=E.get(d),m||(m=new Map,E.set(d,m));if(m.has(o))return m;for(m.set(o,null),d=d.getElementsByTagName(o),E=0;E<d.length;E++){var C=d[E];if(!(C[oi]||C[qt]||o==="link"&&C.getAttribute("rel")==="stylesheet")&&C.namespaceURI!=="http://www.w3.org/2000/svg"){var W=C.getAttribute(l)||"";W=o+W;var le=m.get(W);le?le.push(C):m.set(W,[C])}}return m}function Yf(o,l,d){o=o.ownerDocument||o,o.head.insertBefore(d,l==="title"?o.querySelector("head > title"):null)}function Ep(o,l,d){if(d===1||l.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(o=l.disabled,typeof l.precedence=="string"&&o==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function eh(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function Tp(o,l,d,m){if(d.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var E=yo(m.href),C=l.querySelector(ra(E));if(C){l=C._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(o.count++,o=cl.bind(o),l.then(o,o)),d.state.loading|=4,d.instance=C,Er(C);return}C=l.ownerDocument||l,m=Qf(m),(E=ii.get(E))&&ec(m,E),C=C.createElement("link"),Er(C);var W=C;W._p=new Promise(function(le,ke){W.onload=le,W.onerror=ke}),fn(C,"link",m),d.instance=C}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(o.count++,d=cl.bind(o),l.addEventListener("load",d),l.addEventListener("error",d))}}var rc=0;function Rp(o,l){return o.stylesheets&&o.count===0&&fl(o,o.stylesheets),0<o.count||0<o.imgCount?function(d){var m=setTimeout(function(){if(o.stylesheets&&fl(o,o.stylesheets),o.unsuspend){var C=o.unsuspend;o.unsuspend=null,C()}},6e4+l);0<o.imgBytes&&rc===0&&(rc=62500*sp());var E=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&fl(o,o.stylesheets),o.unsuspend)){var C=o.unsuspend;o.unsuspend=null,C()}},(o.imgBytes>rc?50:800)+l);return o.unsuspend=d,function(){o.unsuspend=null,clearTimeout(m),clearTimeout(E)}}:null}function cl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fl(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var dl=null;function fl(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,dl=new Map,l.forEach(xp,o),dl=null,cl.call(o))}function xp(o,l){if(!(l.state.loading&4)){var d=dl.get(o);if(d)var m=d.get(null);else{d=new Map,dl.set(o,d);for(var E=o.querySelectorAll("link[data-precedence],style[data-precedence]"),C=0;C<E.length;C++){var W=E[C];(W.nodeName==="LINK"||W.getAttribute("media")!=="not all")&&(d.set(W.dataset.precedence,W),m=W)}m&&d.set(null,m)}E=l.instance,W=E.getAttribute("data-precedence"),C=d.get(W)||m,C===m&&d.set(null,E),d.set(W,E),this.count++,m=cl.bind(this),E.addEventListener("load",m),E.addEventListener("error",m),C?C.parentNode.insertBefore(E,C.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(E,o.firstChild)),l.state.loading|=4}}var ia={$$typeof:x,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function Ap(o,l,d,m,E,C,W,le,ke){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=H(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=H(0),this.hiddenUpdates=H(null),this.identifierPrefix=m,this.onUncaughtError=E,this.onCaughtError=C,this.onRecoverableError=W,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ke,this.incompleteTransitions=new Map}function th(o,l,d,m,E,C,W,le,ke,Ye,lt,dt){return o=new Ap(o,l,d,W,ke,Ye,lt,dt,le),l=1,C===!0&&(l|=24),C=Ln(3,null,null,l),o.current=C,C.stateNode=o,l=Ll(),l.refCount++,o.pooledCache=l,l.refCount++,C.memoizedState={element:m,isDehydrated:d,cache:l},jl(C),o}function rh(o){return o?(o=Gs,o):Gs}function nh(o,l,d,m,E,C){E=rh(E),m.context===null?m.context=E:m.pendingContext=E,m=ts(l),m.payload={element:d},C=C===void 0?null:C,C!==null&&(m.callback=C),d=rs(o,m,l),d!==null&&(Nn(d,o,l),Uo(d,o,l))}function ih(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<l?d:l}}function nc(o,l){ih(o,l),(o=o.alternate)&&ih(o,l)}function sh(o){if(o.tag===13||o.tag===31){var l=Rs(o,67108864);l!==null&&Nn(l,o,67108864),nc(o,67108864)}}function oh(o){if(o.tag===13||o.tag===31){var l=Bn();l=on(l);var d=Rs(o,l);d!==null&&Nn(d,o,l),nc(o,l)}}var hl=!0;function Ip(o,l,d,m){var E=ye.T;ye.T=null;var C=Ve.p;try{Ve.p=2,ic(o,l,d,m)}finally{Ve.p=C,ye.T=E}}function Cp(o,l,d,m){var E=ye.T;ye.T=null;var C=Ve.p;try{Ve.p=8,ic(o,l,d,m)}finally{Ve.p=C,ye.T=E}}function ic(o,l,d,m){if(hl){var E=sc(m);if(E===null)Vu(o,l,m,pl,d),lh(o,m);else if(Fp(E,o,l,d,m))m.stopPropagation();else if(lh(o,m),l&4&&-1<Np.indexOf(o)){for(;E!==null;){var C=ai(E);if(C!==null)switch(C.tag){case 3:if(C=C.stateNode,C.current.memoizedState.isDehydrated){var W=Bt(C.pendingLanes);if(W!==0){var le=C;for(le.pendingLanes|=2,le.entangledLanes|=2;W;){var ke=1<<31-Tt(W);le.entanglements[1]|=ke,W&=~ke}bi(C),(rr&6)===0&&(Qa=ft()+500,Xo(0))}}break;case 31:case 13:le=Rs(C,2),le!==null&&Nn(le,C,2),Xa(),nc(C,2)}if(C=sc(m),C===null&&Vu(o,l,m,pl,d),C===E)break;E=C}E!==null&&m.stopPropagation()}else Vu(o,l,m,null,d)}}function sc(o){return o=Qt(o),oc(o)}var pl=null;function oc(o){if(pl=null,o=or(o),o!==null){var l=a(o);if(l===null)o=null;else{var d=l.tag;if(d===13){if(o=u(l),o!==null)return o;o=null}else if(d===31){if(o=c(l),o!==null)return o;o=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return pl=o,null}function ah(o){switch(o){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ge()){case pt:return 2;case Z:return 8;case P:case B:return 32;case U:return 268435456;default:return 32}default:return 32}}var ac=!1,gs=null,ms=null,ys=null,sa=new Map,oa=new Map,bs=[],Np="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function lh(o,l){switch(o){case"focusin":case"focusout":gs=null;break;case"dragenter":case"dragleave":ms=null;break;case"mouseover":case"mouseout":ys=null;break;case"pointerover":case"pointerout":sa.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":oa.delete(l.pointerId)}}function aa(o,l,d,m,E,C){return o===null||o.nativeEvent!==C?(o={blockedOn:l,domEventName:d,eventSystemFlags:m,nativeEvent:C,targetContainers:[E]},l!==null&&(l=ai(l),l!==null&&sh(l)),o):(o.eventSystemFlags|=m,l=o.targetContainers,E!==null&&l.indexOf(E)===-1&&l.push(E),o)}function Fp(o,l,d,m,E){switch(l){case"focusin":return gs=aa(gs,o,l,d,m,E),!0;case"dragenter":return ms=aa(ms,o,l,d,m,E),!0;case"mouseover":return ys=aa(ys,o,l,d,m,E),!0;case"pointerover":var C=E.pointerId;return sa.set(C,aa(sa.get(C)||null,o,l,d,m,E)),!0;case"gotpointercapture":return C=E.pointerId,oa.set(C,aa(oa.get(C)||null,o,l,d,m,E)),!0}return!1}function uh(o){var l=or(o.target);if(l!==null){var d=a(l);if(d!==null){if(l=d.tag,l===13){if(l=u(d),l!==null){o.blockedOn=l,bn(o.priority,function(){oh(d)});return}}else if(l===31){if(l=c(d),l!==null){o.blockedOn=l,bn(o.priority,function(){oh(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function gl(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var d=sc(o.nativeEvent);if(d===null){d=o.nativeEvent;var m=new d.constructor(d.type,d);Jt=m,d.target.dispatchEvent(m),Jt=null}else return l=ai(d),l!==null&&sh(l),o.blockedOn=d,!1;l.shift()}return!0}function ch(o,l,d){gl(o)&&d.delete(l)}function Dp(){ac=!1,gs!==null&&gl(gs)&&(gs=null),ms!==null&&gl(ms)&&(ms=null),ys!==null&&gl(ys)&&(ys=null),sa.forEach(ch),oa.forEach(ch)}function ml(o,l){o.blockedOn===l&&(o.blockedOn=null,ac||(ac=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Dp)))}var yl=null;function dh(o){yl!==o&&(yl=o,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){yl===o&&(yl=null);for(var l=0;l<o.length;l+=3){var d=o[l],m=o[l+1],E=o[l+2];if(typeof m!="function"){if(oc(m||d)===null)continue;break}var C=ai(d);C!==null&&(o.splice(l,3),l-=3,su(C,{pending:!0,data:E,method:d.method,action:m},m,E))}}))}function _o(o){function l(ke){return ml(ke,o)}gs!==null&&ml(gs,o),ms!==null&&ml(ms,o),ys!==null&&ml(ys,o),sa.forEach(l),oa.forEach(l);for(var d=0;d<bs.length;d++){var m=bs[d];m.blockedOn===o&&(m.blockedOn=null)}for(;0<bs.length&&(d=bs[0],d.blockedOn===null);)uh(d),d.blockedOn===null&&bs.shift();if(d=(o.ownerDocument||o).$$reactFormReplay,d!=null)for(m=0;m<d.length;m+=3){var E=d[m],C=d[m+1],W=E[fr]||null;if(typeof C=="function")W||dh(d);else if(W){var le=null;if(C&&C.hasAttribute("formAction")){if(E=C,W=C[fr]||null)le=W.formAction;else if(oc(E)!==null)continue}else le=W.action;typeof le=="function"?d[m+1]=le:(d.splice(m,3),m-=3),dh(d)}}}function fh(){function o(C){C.canIntercept&&C.info==="react-transition"&&C.intercept({handler:function(){return new Promise(function(W){return E=W})},focusReset:"manual",scroll:"manual"})}function l(){E!==null&&(E(),E=null),m||setTimeout(d,20)}function d(){if(!m&&!navigation.transition){var C=navigation.currentEntry;C&&C.url!=null&&navigation.navigate(C.url,{state:C.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,E=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){m=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),E!==null&&(E(),E=null)}}}function lc(o){this._internalRoot=o}bl.prototype.render=lc.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(n(409));var d=l.current,m=Bn();nh(d,m,o,l,null,null)},bl.prototype.unmount=lc.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;nh(o.current,2,null,o,null,null),Xa(),l[Dr]=null}};function bl(o){this._internalRoot=o}bl.prototype.unstable_scheduleHydration=function(o){if(o){var l=sr();o={blockedOn:null,target:o,priority:l};for(var d=0;d<bs.length&&l!==0&&l<bs[d].priority;d++);bs.splice(d,0,o),d===0&&uh(o)}};var hh=e.version;if(hh!=="19.2.8")throw Error(n(527,hh,"19.2.8"));Ve.findDOMNode=function(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(n(188)):(o=Object.keys(o).join(","),Error(n(268,o)));return o=f(l),o=o!==null?p(o):null,o=o===null?null:o.stateNode,o};var Pp={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:ye,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_l.isDisabled&&_l.supportsFiber)try{Pe=_l.inject(Pp),gt=_l}catch{}}return reactDomClient_production.createRoot=function(o,l){if(!s(o))throw Error(n(299));var d=!1,m="",E=_d,C=wd,W=vd;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(E=l.onUncaughtError),l.onCaughtError!==void 0&&(C=l.onCaughtError),l.onRecoverableError!==void 0&&(W=l.onRecoverableError)),l=th(o,1,!1,null,null,d,m,null,E,C,W,fh),o[Dr]=l.current,zu(o),new lc(l)},reactDomClient_production.hydrateRoot=function(o,l,d){if(!s(o))throw Error(n(299));var m=!1,E="",C=_d,W=wd,le=vd,ke=null;return d!=null&&(d.unstable_strictMode===!0&&(m=!0),d.identifierPrefix!==void 0&&(E=d.identifierPrefix),d.onUncaughtError!==void 0&&(C=d.onUncaughtError),d.onCaughtError!==void 0&&(W=d.onCaughtError),d.onRecoverableError!==void 0&&(le=d.onRecoverableError),d.formState!==void 0&&(ke=d.formState)),l=th(o,1,!0,l,d??null,m,E,ke,C,W,le,fh),l.context=rh(null),d=l.current,m=Bn(),m=on(m),E=ts(m),E.callback=null,rs(d,E,m),d=m,l.current.lanes=d,Be(l,d),bi(l),o[Dr]=l.current,zu(o),new bl(l)},reactDomClient_production.version="19.2.8",reactDomClient_production}var hasRequiredClient;function requireClient(){if(hasRequiredClient)return client.exports;hasRequiredClient=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),client.exports=requireReactDomClient_production(),client.exports}var clientExports=requireClient();var ABSOLUTE_URL_REGEX=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,PROTOCOL_RELATIVE_URL_REGEX=/^[\\/]{2}/;function normalizeProtocolRelativeUrl(i,e){return e+i.replace(/\\/g,"/")}var PopStateEventType="popstate";function isLocation(i){return typeof i=="object"&&i!=null&&"pathname"in i&&"search"in i&&"hash"in i&&"state"in i&&"key"in i}function createBrowserHistory(i={}){function e(n,s){let a=s.state?.masked,{pathname:u,search:c,hash:h}=a||n.location;return createLocation("",{pathname:u,search:c,hash:h},s.state&&s.state.usr||null,s.state&&s.state.key||"default",a?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function t(n,s){return typeof s=="string"?s:createPath(s)}return getUrlBasedHistory(e,t,null,i)}function invariant(i,e){if(i===!1||i===null||typeof i>"u")throw new Error(e)}function warning(i,e){if(!i){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function createKey(){return Math.random().toString(36).substring(2,10)}function getHistoryState(i,e){return{usr:i.state,key:i.key,idx:e,masked:i.mask?{pathname:i.pathname,search:i.search,hash:i.hash}:void 0}}function createLocation(i,e,t=null,n,s){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof e=="string"?parsePath(e):e,state:t,key:e&&e.key||n||createKey(),mask:s}}function createPath({pathname:i="/",search:e="",hash:t=""}){return e&&e!=="?"&&(i+=e.charAt(0)==="?"?e:"?"+e),t&&t!=="#"&&(i+=t.charAt(0)==="#"?t:"#"+t),i}function parsePath(i){let e={};if(i){let t=i.indexOf("#");t>=0&&(e.hash=i.substring(t),i=i.substring(0,t));let n=i.indexOf("?");n>=0&&(e.search=i.substring(n),i=i.substring(0,n)),i&&(e.pathname=i)}return e}function getUrlBasedHistory(i,e,t,n={}){let{window:s=document.defaultView,v5Compat:a=!1}=n,u=s.history,c="POP",h=null,f=p();f==null&&(f=0,u.replaceState({...u.state,idx:f},""));function p(){return(u.state||{idx:null}).idx}function g(){c="POP";let T=p(),A=T==null?null:T-f;f=T,h&&h({action:c,location:R.location,delta:A})}function y(T,A){c="PUSH";let F=isLocation(T)?T:createLocation(R.location,T,A);f=p()+1;let x=getHistoryState(F,f),D=R.createHref(F.mask||F);try{u.pushState(x,"",D)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;s.location.assign(D)}a&&h&&h({action:c,location:R.location,delta:1})}function S(T,A){c="REPLACE";let F=isLocation(T)?T:createLocation(R.location,T,A);f=p();let x=getHistoryState(F,f),D=R.createHref(F.mask||F);u.replaceState(x,"",D),a&&h&&h({action:c,location:R.location,delta:0})}function w(T){return createBrowserURLImpl(s,T)}let R={get action(){return c},get location(){return i(s,u)},listen(T){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(PopStateEventType,g),h=T,()=>{s.removeEventListener(PopStateEventType,g),h=null}},createHref(T){return e(s,T)},createURL:w,encodeLocation(T){let A=w(T);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:y,replace:S,go(T){return u.go(T)}};return R}function createBrowserURLImpl(i,e,t=!1){let n="http://localhost";i&&(n=i.location.origin!=="null"?i.location.origin:i.location.href),invariant(n,"No window.location.(origin|href) available to create URL");let s=typeof e=="string"?e:createPath(e);return s=s.replace(/ $/,"%20"),!t&&PROTOCOL_RELATIVE_URL_REGEX.test(s)&&(s=n+s),new URL(s,n)}function matchRoutes(i,e,t="/"){return matchRoutesImpl(i,e,t,!1)}function matchRoutesImpl(i,e,t,n,s){let a=typeof e=="string"?parsePath(e):e,u=stripBasename(a.pathname||"/",t);if(u==null)return null;let c=flattenAndRankRoutes(i),h=null,f=decodePath(u);for(let p=0;h==null&&p<c.length;++p)h=matchRouteBranch(c[p],f,n);return h}function flattenAndRankRoutes(i){let e=flattenRoutes(i);return rankRouteBranches(e),e}function flattenRoutes(i,e=[],t=[],n="",s=!1){let a=(u,c,h=s,f)=>{let p={relativePath:f===void 0?u.path||"":f,caseSensitive:u.caseSensitive===!0,childrenIndex:c,route:u};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&h)return;invariant(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let g=joinPaths([n,p.relativePath]),y=t.concat(p);u.children&&u.children.length>0&&(invariant(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),flattenRoutes(u.children,e,y,g,h)),!(u.path==null&&!u.index)&&e.push({path:g,score:computeScore(g,u.index),routesMeta:y.map((S,w)=>{let[R,T]=compilePath(S.relativePath,S.caseSensitive,w===y.length-1);return{...S,matcher:R,compiledParams:T}})})};return i.forEach((u,c)=>{if(u.path===""||!u.path?.includes("?"))a(u,c);else for(let h of explodeOptionalSegments(u.path))a(u,c,!0,h)}),e}function explodeOptionalSegments(i){let e=i.split("/");if(e.length===0)return[];let[t,...n]=e,s=t.endsWith("?"),a=t.replace(/\?$/,"");if(n.length===0)return s?[a,""]:[a];let u=explodeOptionalSegments(n.join("/")),c=[];return c.push(...u.map(h=>h===""?a:[a,h].join("/"))),s&&c.push(...u),c.map(h=>i.startsWith("/")&&h===""?"/":h)}function rankRouteBranches(i){i.sort((e,t)=>e.score!==t.score?t.score-e.score:compareIndexes(e.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}var paramRe=/^:[\w-]+$/,dynamicSegmentValue=3,indexRouteValue=2,emptySegmentValue=1,staticSegmentValue=10,splatPenalty=-2,isSplat=i=>i==="*";function computeScore(i,e){let t=i.split("/"),n=t.length;return t.some(isSplat)&&(n+=splatPenalty),e&&(n+=indexRouteValue),t.filter(s=>!isSplat(s)).reduce((s,a)=>s+(paramRe.test(a)?dynamicSegmentValue:a===""?emptySegmentValue:staticSegmentValue),n)}function compareIndexes(i,e){return i.length===e.length&&i.slice(0,-1).every((n,s)=>n===e[s])?i[i.length-1]-e[e.length-1]:0}function matchRouteBranch(i,e,t=!1){let{routesMeta:n}=i,s={},a="/",u=[];for(let c=0;c<n.length;++c){let h=n[c],f=c===n.length-1,p=a==="/"?e:e.slice(a.length)||"/",g={path:h.relativePath,caseSensitive:h.caseSensitive,end:f},y=h.matcher&&h.compiledParams?matchPathImpl(g,p,h.matcher,h.compiledParams):matchPath(g,p),S=h.route;if(!y&&f&&t&&!n[n.length-1].route.index&&(y=matchPath({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},p)),!y)return null;Object.assign(s,y.params),u.push({params:s,pathname:joinPaths([a,y.pathname]),pathnameBase:normalizePathname(joinPaths([a,y.pathnameBase])),route:S}),y.pathnameBase!=="/"&&(a=joinPaths([a,y.pathnameBase]))}return u}function matchPath(i,e){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[t,n]=compilePath(i.path,i.caseSensitive,i.end);return matchPathImpl(i,e,t,n)}function matchPathImpl(i,e,t,n){let s=e.match(t);if(!s)return null;let a=s[0],u=a.replace(/(.)\/+$/,"$1"),c=s.slice(1);return{params:n.reduce((f,{paramName:p,isOptional:g},y)=>{if(p==="*"){let w=c[y]||"";u=a.slice(0,a.length-w.length).replace(/(.)\/+$/,"$1")}const S=c[y];return g&&!S?f[p]=void 0:f[p]=(S||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:u,pattern:i}}function compilePath(i,e=!1,t=!0){warning(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let n=[],s="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,c,h,f,p)=>{if(n.push({paramName:c,isOptional:h!=null}),h){let g=p.charAt(f+u.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(n.push({paramName:"*"}),s+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?s+="\\/*$":i!==""&&i!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function decodePath(i){try{return i.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return warning(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),i}}function stripBasename(i,e){if(e==="/")return i;if(!i.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,n=i.charAt(t);return n&&n!=="/"?null:i.slice(t)||"/"}function resolvePath(i,e="/"){let{pathname:t,search:n="",hash:s=""}=typeof i=="string"?parsePath(i):i,a;return t?(t=removeDoubleSlashes(t),t.startsWith("/")?a=resolvePathname(t.substring(1),"/"):a=resolvePathname(t,e)):a=e,{pathname:a,search:normalizeSearch(n),hash:normalizeHash(s)}}function resolvePathname(i,e){let t=removeTrailingSlash(e).split("/");return i.split("/").forEach(s=>{s===".."?t.length>1&&t.pop():s!=="."&&t.push(s)}),t.length>1?t.join("/"):"/"}function getInvalidPathError(i,e,t,n){return`Cannot include a '${i}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function getPathContributingMatches(i){return i.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function getResolveToMatches(i){let e=getPathContributingMatches(i);return e.map((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)}function resolveTo(i,e,t,n=!1){let s;typeof i=="string"?s=parsePath(i):(s={...i},invariant(!s.pathname||!s.pathname.includes("?"),getInvalidPathError("?","pathname","search",s)),invariant(!s.pathname||!s.pathname.includes("#"),getInvalidPathError("#","pathname","hash",s)),invariant(!s.search||!s.search.includes("#"),getInvalidPathError("#","search","hash",s)));let a=i===""||s.pathname==="",u=a?"/":s.pathname,c;if(u==null)c=t;else{let g=e.length-1;if(!n&&u.startsWith("..")){let y=u.split("/");for(;y[0]==="..";)y.shift(),g-=1;s.pathname=y.join("/")}c=g>=0?e[g]:"/"}let h=resolvePath(s,c),f=u&&u!=="/"&&u.endsWith("/"),p=(a||u===".")&&t.endsWith("/");return!h.pathname.endsWith("/")&&(f||p)&&(h.pathname+="/"),h}var removeDoubleSlashes=i=>i.replace(/[\\/]{2,}/g,"/"),joinPaths=i=>removeDoubleSlashes(i.join("/")),removeTrailingSlash=i=>i.replace(/\/+$/,""),normalizePathname=i=>removeTrailingSlash(i).replace(/^\/*/,"/"),normalizeSearch=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,normalizeHash=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,ErrorResponseImpl=class{constructor(i,e,t,n=!1){this.status=i,this.statusText=e||"",this.internal=n,t instanceof Error?(this.data=t.toString(),this.error=t):this.data=t}};function isRouteErrorResponse(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function getRoutePattern(i){let e=i.map(t=>t.route.path).filter(Boolean);return joinPaths(e)||"/"}var isBrowser=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function parseToInfo(i,e){let t=i;if(typeof t!="string"||!ABSOLUTE_URL_REGEX.test(t))return{absoluteURL:void 0,isExternal:!1,to:t};let n=t,s=!1;if(isBrowser)try{let a=new URL(window.location.href),u=PROTOCOL_RELATIVE_URL_REGEX.test(t)?new URL(normalizeProtocolRelativeUrl(t,a.protocol)):new URL(t),c=stripBasename(u.pathname,e);u.origin===a.origin&&c!=null?t=c+u.search+u.hash:s=!0}catch{warning(!1,`<Link to="${t}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:s,to:t}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var validMutationMethodsArr=["POST","PUT","PATCH","DELETE"];new Set(validMutationMethodsArr);var validRequestMethodsArr=["GET",...validMutationMethodsArr];new Set(validRequestMethodsArr);var invalidProtocols=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function hasInvalidProtocol(i){try{return invalidProtocols.includes(new URL(i).protocol)}catch{return!1}}var DataRouterContext=reactExports.createContext(null);DataRouterContext.displayName="DataRouter";var DataRouterStateContext=reactExports.createContext(null);DataRouterStateContext.displayName="DataRouterState";var RSCRouterContext=reactExports.createContext(!1);function useIsRSCRouterContext(){return reactExports.useContext(RSCRouterContext)}var ViewTransitionContext=reactExports.createContext({isTransitioning:!1});ViewTransitionContext.displayName="ViewTransition";var FetchersContext=reactExports.createContext(new Map);FetchersContext.displayName="Fetchers";var AwaitContext=reactExports.createContext(null);AwaitContext.displayName="Await";var NavigationContext=reactExports.createContext(null);NavigationContext.displayName="Navigation";var LocationContext=reactExports.createContext(null);LocationContext.displayName="Location";var RouteContext=reactExports.createContext({outlet:null,matches:[],isDataRoute:!1});RouteContext.displayName="Route";var RouteErrorContext=reactExports.createContext(null);RouteErrorContext.displayName="RouteError";var ERROR_DIGEST_BASE="REACT_ROUTER_ERROR",ERROR_DIGEST_REDIRECT="REDIRECT",ERROR_DIGEST_ROUTE_ERROR_RESPONSE="ROUTE_ERROR_RESPONSE";function decodeRedirectErrorDigest(i){if(i.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_REDIRECT}:{`))try{let e=JSON.parse(i.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function decodeRouteErrorResponseDigest(i){if(i.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_ROUTE_ERROR_RESPONSE}:{`))try{let e=JSON.parse(i.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new ErrorResponseImpl(e.status,e.statusText,e.data)}catch{}}function useHref(i,{relative:e}={}){invariant(useInRouterContext(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:n}=reactExports.useContext(NavigationContext),{hash:s,pathname:a,search:u}=useResolvedPath(i,{relative:e}),c=a;return t!=="/"&&(c=a==="/"?t:joinPaths([t,a])),n.createHref({pathname:c,search:u,hash:s})}function useInRouterContext(){return reactExports.useContext(LocationContext)!=null}function useLocation(){return invariant(useInRouterContext(),"useLocation() may be used only in the context of a <Router> component."),reactExports.useContext(LocationContext).location}var navigateEffectWarning="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function useIsomorphicLayoutEffect(i){reactExports.useContext(NavigationContext).static||reactExports.useLayoutEffect(i)}function useNavigate(){let{isDataRoute:i}=reactExports.useContext(RouteContext);return i?useNavigateStable():useNavigateUnstable()}function useNavigateUnstable(){invariant(useInRouterContext(),"useNavigate() may be used only in the context of a <Router> component.");let i=reactExports.useContext(DataRouterContext),{basename:e,navigator:t}=reactExports.useContext(NavigationContext),{matches:n}=reactExports.useContext(RouteContext),{pathname:s}=useLocation(),a=JSON.stringify(getResolveToMatches(n)),u=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{u.current=!0}),reactExports.useCallback((h,f={})=>{if(warning(u.current,navigateEffectWarning),!u.current)return;if(typeof h=="number"){t.go(h);return}let p=resolveTo(h,JSON.parse(a),s,f.relative==="path");i==null&&e!=="/"&&(p.pathname=p.pathname==="/"?e:joinPaths([e,p.pathname])),(f.replace?t.replace:t.push)(p,f.state,f)},[e,t,a,s,i])}var OutletContext=reactExports.createContext(null);function useOutlet(i){let e=reactExports.useContext(RouteContext).outlet;return reactExports.useMemo(()=>e&&reactExports.createElement(OutletContext.Provider,{value:i},e),[e,i])}function useResolvedPath(i,{relative:e}={}){let{matches:t}=reactExports.useContext(RouteContext),{pathname:n}=useLocation(),s=JSON.stringify(getResolveToMatches(t));return reactExports.useMemo(()=>resolveTo(i,JSON.parse(s),n,e==="path"),[i,s,n,e])}function useRoutes(i,e){return useRoutesImpl(i)}function useRoutesImpl(i,e,t){invariant(useInRouterContext(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=reactExports.useContext(NavigationContext),{matches:s}=reactExports.useContext(RouteContext),a=s[s.length-1],u=a?a.params:{},c=a?a.pathname:"/",h=a?a.pathnameBase:"/",f=a&&a.route;{let T=f&&f.path||"";warningOnce(c,!f||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${T}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
+ `).replace(np,"")}function Lf(o,l){return l=kf(l),kf(o)===l}function mr(o,l,d,m,E,C){switch(d){case"children":typeof m=="string"?l==="body"||l==="textarea"&&m===""||Ae(o,m):(typeof m=="number"||typeof m=="bigint")&&l!=="body"&&Ae(o,""+m);break;case"className":I(o,"class",m);break;case"tabIndex":I(o,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":I(o,d,m);break;case"style":nt(o,m,C);break;case"data":if(l!=="object"){I(o,"data",m);break}case"src":case"href":if(m===""&&(l!=="a"||d!=="href")){o.removeAttribute(d);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){o.removeAttribute(d);break}m=yt(""+m),o.setAttribute(d,m);break;case"action":case"formAction":if(typeof m=="function"){o.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof C=="function"&&(d==="formAction"?(l!=="input"&&mr(o,l,"name",E.name,E,null),mr(o,l,"formEncType",E.formEncType,E,null),mr(o,l,"formMethod",E.formMethod,E,null),mr(o,l,"formTarget",E.formTarget,E,null)):(mr(o,l,"encType",E.encType,E,null),mr(o,l,"method",E.method,E,null),mr(o,l,"target",E.target,E,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){o.removeAttribute(d);break}m=yt(""+m),o.setAttribute(d,m);break;case"onClick":m!=null&&(o.onclick=wt);break;case"onScroll":m!=null&&Vt("scroll",o);break;case"onScrollEnd":m!=null&&Vt("scrollend",o);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(d=m.__html,d!=null){if(E.children!=null)throw Error(n(60));o.innerHTML=d}}break;case"multiple":o.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":o.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){o.removeAttribute("xlink:href");break}d=yt(""+m),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?o.setAttribute(d,""+m):o.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?o.setAttribute(d,""):o.removeAttribute(d);break;case"capture":case"download":m===!0?o.setAttribute(d,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?o.setAttribute(d,m):o.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?o.setAttribute(d,m):o.removeAttribute(d);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?o.removeAttribute(d):o.setAttribute(d,m);break;case"popover":Vt("beforetoggle",o),Vt("toggle",o),v(o,"popover",m);break;case"xlinkActuate":k(o,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":k(o,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":k(o,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":k(o,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":k(o,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":k(o,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":k(o,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":k(o,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":k(o,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":v(o,"is",m);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=ht.get(d)||d,v(o,d,m))}}function Hu(o,l,d,m,E,C){switch(d){case"style":nt(o,m,C);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(d=m.__html,d!=null){if(E.children!=null)throw Error(n(60));o.innerHTML=d}}break;case"children":typeof m=="string"?Ae(o,m):(typeof m=="number"||typeof m=="bigint")&&Ae(o,""+m);break;case"onScroll":m!=null&&Vt("scroll",o);break;case"onScrollEnd":m!=null&&Vt("scrollend",o);break;case"onClick":m!=null&&(o.onclick=wt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wi.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(E=d.endsWith("Capture"),l=d.slice(2,E?d.length-7:void 0),C=o[fr]||null,C=C!=null?C[d]:null,typeof C=="function"&&o.removeEventListener(l,C,E),typeof m=="function")){typeof C!="function"&&C!==null&&(d in o?o[d]=null:o.hasAttribute(d)&&o.removeAttribute(d)),o.addEventListener(l,m,E);break e}d in o?o[d]=m:m===!0?o.setAttribute(d,""):v(o,d,m)}}}function fn(o,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Vt("error",o),Vt("load",o);var m=!1,E=!1,C;for(C in d)if(d.hasOwnProperty(C)){var W=d[C];if(W!=null)switch(C){case"src":m=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:mr(o,l,C,W,d,null)}}E&&mr(o,l,"srcSet",d.srcSet,d,null),m&&mr(o,l,"src",d.src,d,null);return;case"input":Vt("invalid",o);var le=C=W=E=null,ke=null,Ye=null;for(m in d)if(d.hasOwnProperty(m)){var lt=d[m];if(lt!=null)switch(m){case"name":E=lt;break;case"type":W=lt;break;case"checked":ke=lt;break;case"defaultChecked":Ye=lt;break;case"value":C=lt;break;case"defaultValue":le=lt;break;case"children":case"dangerouslySetInnerHTML":if(lt!=null)throw Error(n(137,l));break;default:mr(o,l,m,lt,d,null)}}We(o,C,le,ke,Ye,W,E,!1);return;case"select":Vt("invalid",o),m=W=C=null;for(E in d)if(d.hasOwnProperty(E)&&(le=d[E],le!=null))switch(E){case"value":C=le;break;case"defaultValue":W=le;break;case"multiple":m=le;default:mr(o,l,E,le,d,null)}l=C,d=W,o.multiple=!!m,l!=null?et(o,!!m,l,!1):d!=null&&et(o,!!m,d,!0);return;case"textarea":Vt("invalid",o),C=E=m=null;for(W in d)if(d.hasOwnProperty(W)&&(le=d[W],le!=null))switch(W){case"value":m=le;break;case"defaultValue":E=le;break;case"children":C=le;break;case"dangerouslySetInnerHTML":if(le!=null)throw Error(n(91));break;default:mr(o,l,W,le,d,null)}Se(o,m,E,C);return;case"option":for(ke in d)d.hasOwnProperty(ke)&&(m=d[ke],m!=null)&&(ke==="selected"?o.selected=m&&typeof m!="function"&&typeof m!="symbol":mr(o,l,ke,m,d,null));return;case"dialog":Vt("beforetoggle",o),Vt("toggle",o),Vt("cancel",o),Vt("close",o);break;case"iframe":case"object":Vt("load",o);break;case"video":case"audio":for(m=0;m<Yo.length;m++)Vt(Yo[m],o);break;case"image":Vt("error",o),Vt("load",o);break;case"details":Vt("toggle",o);break;case"embed":case"source":case"link":Vt("error",o),Vt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ye in d)if(d.hasOwnProperty(Ye)&&(m=d[Ye],m!=null))switch(Ye){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:mr(o,l,Ye,m,d,null)}return;default:if(bt(l)){for(lt in d)d.hasOwnProperty(lt)&&(m=d[lt],m!==void 0&&Hu(o,l,lt,m,d,void 0));return}}for(le in d)d.hasOwnProperty(le)&&(m=d[le],m!=null&&mr(o,l,le,m,d,null))}function ip(o,l,d,m){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var E=null,C=null,W=null,le=null,ke=null,Ye=null,lt=null;for(it in d){var dt=d[it];if(d.hasOwnProperty(it)&&dt!=null)switch(it){case"checked":break;case"value":break;case"defaultValue":ke=dt;default:m.hasOwnProperty(it)||mr(o,l,it,null,m,dt)}}for(var tt in m){var it=m[tt];if(dt=d[tt],m.hasOwnProperty(tt)&&(it!=null||dt!=null))switch(tt){case"type":C=it;break;case"name":E=it;break;case"checked":Ye=it;break;case"defaultChecked":lt=it;break;case"value":W=it;break;case"defaultValue":le=it;break;case"children":case"dangerouslySetInnerHTML":if(it!=null)throw Error(n(137,l));break;default:it!==dt&&mr(o,l,tt,it,m,dt)}}Le(o,W,le,ke,Ye,lt,C,E);return;case"select":it=W=le=tt=null;for(C in d)if(ke=d[C],d.hasOwnProperty(C)&&ke!=null)switch(C){case"value":break;case"multiple":it=ke;default:m.hasOwnProperty(C)||mr(o,l,C,null,m,ke)}for(E in m)if(C=m[E],ke=d[E],m.hasOwnProperty(E)&&(C!=null||ke!=null))switch(E){case"value":tt=C;break;case"defaultValue":le=C;break;case"multiple":W=C;default:C!==ke&&mr(o,l,E,C,m,ke)}l=le,d=W,m=it,tt!=null?et(o,!!d,tt,!1):!!m!=!!d&&(l!=null?et(o,!!d,l,!0):et(o,!!d,d?[]:"",!1));return;case"textarea":it=tt=null;for(le in d)if(E=d[le],d.hasOwnProperty(le)&&E!=null&&!m.hasOwnProperty(le))switch(le){case"value":break;case"children":break;default:mr(o,l,le,null,m,E)}for(W in m)if(E=m[W],C=d[W],m.hasOwnProperty(W)&&(E!=null||C!=null))switch(W){case"value":tt=E;break;case"defaultValue":it=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(n(91));break;default:E!==C&&mr(o,l,W,E,m,C)}ne(o,tt,it);return;case"option":for(var St in d)tt=d[St],d.hasOwnProperty(St)&&tt!=null&&!m.hasOwnProperty(St)&&(St==="selected"?o.selected=!1:mr(o,l,St,null,m,tt));for(ke in m)tt=m[ke],it=d[ke],m.hasOwnProperty(ke)&&tt!==it&&(tt!=null||it!=null)&&(ke==="selected"?o.selected=tt&&typeof tt!="function"&&typeof tt!="symbol":mr(o,l,ke,tt,m,it));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var It in d)tt=d[It],d.hasOwnProperty(It)&&tt!=null&&!m.hasOwnProperty(It)&&mr(o,l,It,null,m,tt);for(Ye in m)if(tt=m[Ye],it=d[Ye],m.hasOwnProperty(Ye)&&tt!==it&&(tt!=null||it!=null))switch(Ye){case"children":case"dangerouslySetInnerHTML":if(tt!=null)throw Error(n(137,l));break;default:mr(o,l,Ye,tt,m,it)}return;default:if(bt(l)){for(var yr in d)tt=d[yr],d.hasOwnProperty(yr)&&tt!==void 0&&!m.hasOwnProperty(yr)&&Hu(o,l,yr,void 0,m,tt);for(lt in m)tt=m[lt],it=d[lt],!m.hasOwnProperty(lt)||tt===it||tt===void 0&&it===void 0||Hu(o,l,lt,tt,m,it);return}}for(var Ke in d)tt=d[Ke],d.hasOwnProperty(Ke)&&tt!=null&&!m.hasOwnProperty(Ke)&&mr(o,l,Ke,null,m,tt);for(dt in m)tt=m[dt],it=d[dt],!m.hasOwnProperty(dt)||tt===it||tt==null&&it==null||mr(o,l,dt,tt,m,it)}function Uf(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sp(){if(typeof performance.getEntriesByType=="function"){for(var o=0,l=0,d=performance.getEntriesByType("resource"),m=0;m<d.length;m++){var E=d[m],C=E.transferSize,W=E.initiatorType,le=E.duration;if(C&&le&&Uf(W)){for(W=0,le=E.responseEnd,m+=1;m<d.length;m++){var ke=d[m],Ye=ke.startTime;if(Ye>le)break;var lt=ke.transferSize,dt=ke.initiatorType;lt&&Uf(dt)&&(ke=ke.responseEnd,W+=lt*(ke<le?1:(le-Ye)/(ke-Ye)))}if(--m,l+=8*(C+W)/(E.duration/1e3),o++,10<o)break}}if(0<o)return l/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var Wu=null,Ku=null;function ol(o){return o.nodeType===9?o:o.ownerDocument}function Of(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function $f(o,l){if(o===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&l==="foreignObject"?0:o}function Gu(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Ju=null;function op(){var o=window.event;return o&&o.type==="popstate"?o===Ju?!1:(Ju=o,!0):(Ju=null,!1)}var jf=typeof setTimeout=="function"?setTimeout:void 0,ap=typeof clearTimeout=="function"?clearTimeout:void 0,Bf=typeof Promise=="function"?Promise:void 0,lp=typeof queueMicrotask=="function"?queueMicrotask:typeof Bf<"u"?function(o){return Bf.resolve(null).then(o).catch(up)}:jf;function up(o){setTimeout(function(){throw o})}function ps(o){return o==="head"}function Mf(o,l){var d=l,m=0;do{var E=d.nextSibling;if(o.removeChild(d),E&&E.nodeType===8)if(d=E.data,d==="/$"||d==="/&"){if(m===0){o.removeChild(E),_o(l);return}m--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")m++;else if(d==="html")ta(o.ownerDocument.documentElement);else if(d==="head"){d=o.ownerDocument.head,ta(d);for(var C=d.firstChild;C;){var W=C.nextSibling,le=C.nodeName;C[oi]||le==="SCRIPT"||le==="STYLE"||le==="LINK"&&C.rel.toLowerCase()==="stylesheet"||d.removeChild(C),C=W}}else d==="body"&&ta(o.ownerDocument.body);d=E}while(d);_o(l)}function qf(o,l){var d=o;o=0;do{var m=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),m&&m.nodeType===8)if(d=m.data,d==="/$"){if(o===0)break;o--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||o++;d=m}while(d)}function Qu(o){var l=o.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":Qu(d),br(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}o.removeChild(d)}}function cp(o,l,d,m){for(;o.nodeType===1;){var E=d;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!m&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(m){if(!o[oi])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(C=o.getAttribute("rel"),C==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(C!==E.rel||o.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||o.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||o.getAttribute("title")!==(E.title==null?null:E.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(C=o.getAttribute("src"),(C!==(E.src==null?null:E.src)||o.getAttribute("type")!==(E.type==null?null:E.type)||o.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&C&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var C=E.name==null?null:""+E.name;if(E.type==="hidden"&&o.getAttribute("name")===C)return o}else return o;if(o=ni(o.nextSibling),o===null)break}return null}function dp(o,l,d){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!d||(o=ni(o.nextSibling),o===null))return null;return o}function zf(o,l){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=ni(o.nextSibling),o===null))return null;return o}function Zu(o){return o.data==="$?"||o.data==="$~"}function Xu(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function fp(o,l){var d=o.ownerDocument;if(o.data==="$~")o._reactRetry=l;else if(o.data!=="$?"||d.readyState!=="loading")l();else{var m=function(){l(),d.removeEventListener("DOMContentLoaded",m)};d.addEventListener("DOMContentLoaded",m),o._reactRetry=m}}function ni(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return o}var Yu=null;function Vf(o){o=o.nextSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="/$"||d==="/&"){if(l===0)return ni(o.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}o=o.nextSibling}return null}function Hf(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return o;l--}else d!=="/$"&&d!=="/&"||l++}o=o.previousSibling}return null}function Wf(o,l,d){switch(l=ol(d),o){case"html":if(o=l.documentElement,!o)throw Error(n(452));return o;case"head":if(o=l.head,!o)throw Error(n(453));return o;case"body":if(o=l.body,!o)throw Error(n(454));return o;default:throw Error(n(451))}}function ta(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);br(o)}var ii=new Map,Kf=new Set;function al(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Bi=Ve.d;Ve.d={f:hp,r:pp,D:gp,C:mp,L:yp,m:bp,X:wp,S:_p,M:vp};function hp(){var o=Bi.f(),l=Xa();return o||l}function pp(o){var l=ai(o);l!==null&&l.tag===5&&l.type==="form"?ud(l):Bi.r(o)}var mo=typeof document>"u"?null:document;function Gf(o,l,d){var m=mo;if(m&&typeof l=="string"&&l){var E=Ce(l);E='link[rel="'+o+'"][href="'+E+'"]',typeof d=="string"&&(E+='[crossorigin="'+d+'"]'),Kf.has(E)||(Kf.add(E),o={rel:o,crossOrigin:d,href:l},m.querySelector(E)===null&&(l=m.createElement("link"),fn(l,"link",o),Er(l),m.head.appendChild(l)))}}function gp(o){Bi.D(o),Gf("dns-prefetch",o,null)}function mp(o,l){Bi.C(o,l),Gf("preconnect",o,l)}function yp(o,l,d){Bi.L(o,l,d);var m=mo;if(m&&o&&l){var E='link[rel="preload"][as="'+Ce(l)+'"]';l==="image"&&d&&d.imageSrcSet?(E+='[imagesrcset="'+Ce(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(E+='[imagesizes="'+Ce(d.imageSizes)+'"]')):E+='[href="'+Ce(o)+'"]';var C=E;switch(l){case"style":C=yo(o);break;case"script":C=bo(o)}ii.has(C)||(o=g({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:o,as:l},d),ii.set(C,o),m.querySelector(E)!==null||l==="style"&&m.querySelector(ra(C))||l==="script"&&m.querySelector(na(C))||(l=m.createElement("link"),fn(l,"link",o),Er(l),m.head.appendChild(l)))}}function bp(o,l){Bi.m(o,l);var d=mo;if(d&&o){var m=l&&typeof l.as=="string"?l.as:"script",E='link[rel="modulepreload"][as="'+Ce(m)+'"][href="'+Ce(o)+'"]',C=E;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":C=bo(o)}if(!ii.has(C)&&(o=g({rel:"modulepreload",href:o},l),ii.set(C,o),d.querySelector(E)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(na(C)))return}m=d.createElement("link"),fn(m,"link",o),Er(m),d.head.appendChild(m)}}}function _p(o,l,d){Bi.S(o,l,d);var m=mo;if(m&&o){var E=vn(m).hoistableStyles,C=yo(o);l=l||"default";var W=E.get(C);if(!W){var le={loading:0,preload:null};if(W=m.querySelector(ra(C)))le.loading=5;else{o=g({rel:"stylesheet",href:o,"data-precedence":l},d),(d=ii.get(C))&&ec(o,d);var ke=W=m.createElement("link");Er(ke),fn(ke,"link",o),ke._p=new Promise(function(Ye,lt){ke.onload=Ye,ke.onerror=lt}),ke.addEventListener("load",function(){le.loading|=1}),ke.addEventListener("error",function(){le.loading|=2}),le.loading|=4,ll(W,l,m)}W={type:"stylesheet",instance:W,count:1,state:le},E.set(C,W)}}}function wp(o,l){Bi.X(o,l);var d=mo;if(d&&o){var m=vn(d).hoistableScripts,E=bo(o),C=m.get(E);C||(C=d.querySelector(na(E)),C||(o=g({src:o,async:!0},l),(l=ii.get(E))&&tc(o,l),C=d.createElement("script"),Er(C),fn(C,"link",o),d.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},m.set(E,C))}}function vp(o,l){Bi.M(o,l);var d=mo;if(d&&o){var m=vn(d).hoistableScripts,E=bo(o),C=m.get(E);C||(C=d.querySelector(na(E)),C||(o=g({src:o,async:!0,type:"module"},l),(l=ii.get(E))&&tc(o,l),C=d.createElement("script"),Er(C),fn(C,"link",o),d.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},m.set(E,C))}}function Jf(o,l,d,m){var E=(E=Je.current)?al(E):null;if(!E)throw Error(n(446));switch(o){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=yo(d.href),d=vn(E).hoistableStyles,m=d.get(l),m||(m={type:"style",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){o=yo(d.href);var C=vn(E).hoistableStyles,W=C.get(o);if(W||(E=E.ownerDocument||E,W={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},C.set(o,W),(C=E.querySelector(ra(o)))&&!C._p&&(W.instance=C,W.state.loading=5),ii.has(o)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},ii.set(o,d),C||Sp(E,o,d,W.state))),l&&m===null)throw Error(n(528,""));return W}if(l&&m!==null)throw Error(n(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=bo(d),d=vn(E).hoistableScripts,m=d.get(l),m||(m={type:"script",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,o))}}function yo(o){return'href="'+Ce(o)+'"'}function ra(o){return'link[rel="stylesheet"]['+o+"]"}function Qf(o){return g({},o,{"data-precedence":o.precedence,precedence:null})}function Sp(o,l,d,m){o.querySelector('link[rel="preload"][as="style"]['+l+"]")?m.loading=1:(l=o.createElement("link"),m.preload=l,l.addEventListener("load",function(){return m.loading|=1}),l.addEventListener("error",function(){return m.loading|=2}),fn(l,"link",d),Er(l),o.head.appendChild(l))}function bo(o){return'[src="'+Ce(o)+'"]'}function na(o){return"script[async]"+o}function Zf(o,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var m=o.querySelector('style[data-href~="'+Ce(d.href)+'"]');if(m)return l.instance=m,Er(m),m;var E=g({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return m=(o.ownerDocument||o).createElement("style"),Er(m),fn(m,"style",E),ll(m,d.precedence,o),l.instance=m;case"stylesheet":E=yo(d.href);var C=o.querySelector(ra(E));if(C)return l.state.loading|=4,l.instance=C,Er(C),C;m=Qf(d),(E=ii.get(E))&&ec(m,E),C=(o.ownerDocument||o).createElement("link"),Er(C);var W=C;return W._p=new Promise(function(le,ke){W.onload=le,W.onerror=ke}),fn(C,"link",m),l.state.loading|=4,ll(C,d.precedence,o),l.instance=C;case"script":return C=bo(d.src),(E=o.querySelector(na(C)))?(l.instance=E,Er(E),E):(m=d,(E=ii.get(C))&&(m=g({},d),tc(m,E)),o=o.ownerDocument||o,E=o.createElement("script"),Er(E),fn(E,"link",m),o.head.appendChild(E),l.instance=E);case"void":return null;default:throw Error(n(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(m=l.instance,l.state.loading|=4,ll(m,d.precedence,o));return l.instance}function ll(o,l,d){for(var m=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=m.length?m[m.length-1]:null,C=E,W=0;W<m.length;W++){var le=m[W];if(le.dataset.precedence===l)C=le;else if(C!==E)break}C?C.parentNode.insertBefore(o,C.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(o,l.firstChild))}function ec(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function tc(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var ul=null;function Xf(o,l,d){if(ul===null){var m=new Map,E=ul=new Map;E.set(d,m)}else E=ul,m=E.get(d),m||(m=new Map,E.set(d,m));if(m.has(o))return m;for(m.set(o,null),d=d.getElementsByTagName(o),E=0;E<d.length;E++){var C=d[E];if(!(C[oi]||C[qt]||o==="link"&&C.getAttribute("rel")==="stylesheet")&&C.namespaceURI!=="http://www.w3.org/2000/svg"){var W=C.getAttribute(l)||"";W=o+W;var le=m.get(W);le?le.push(C):m.set(W,[C])}}return m}function Yf(o,l,d){o=o.ownerDocument||o,o.head.insertBefore(d,l==="title"?o.querySelector("head > title"):null)}function Ep(o,l,d){if(d===1||l.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(o=l.disabled,typeof l.precedence=="string"&&o==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function eh(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function Tp(o,l,d,m){if(d.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var E=yo(m.href),C=l.querySelector(ra(E));if(C){l=C._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(o.count++,o=cl.bind(o),l.then(o,o)),d.state.loading|=4,d.instance=C,Er(C);return}C=l.ownerDocument||l,m=Qf(m),(E=ii.get(E))&&ec(m,E),C=C.createElement("link"),Er(C);var W=C;W._p=new Promise(function(le,ke){W.onload=le,W.onerror=ke}),fn(C,"link",m),d.instance=C}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(o.count++,d=cl.bind(o),l.addEventListener("load",d),l.addEventListener("error",d))}}var rc=0;function Rp(o,l){return o.stylesheets&&o.count===0&&fl(o,o.stylesheets),0<o.count||0<o.imgCount?function(d){var m=setTimeout(function(){if(o.stylesheets&&fl(o,o.stylesheets),o.unsuspend){var C=o.unsuspend;o.unsuspend=null,C()}},6e4+l);0<o.imgBytes&&rc===0&&(rc=62500*sp());var E=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&fl(o,o.stylesheets),o.unsuspend)){var C=o.unsuspend;o.unsuspend=null,C()}},(o.imgBytes>rc?50:800)+l);return o.unsuspend=d,function(){o.unsuspend=null,clearTimeout(m),clearTimeout(E)}}:null}function cl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fl(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var dl=null;function fl(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,dl=new Map,l.forEach(xp,o),dl=null,cl.call(o))}function xp(o,l){if(!(l.state.loading&4)){var d=dl.get(o);if(d)var m=d.get(null);else{d=new Map,dl.set(o,d);for(var E=o.querySelectorAll("link[data-precedence],style[data-precedence]"),C=0;C<E.length;C++){var W=E[C];(W.nodeName==="LINK"||W.getAttribute("media")!=="not all")&&(d.set(W.dataset.precedence,W),m=W)}m&&d.set(null,m)}E=l.instance,W=E.getAttribute("data-precedence"),C=d.get(W)||m,C===m&&d.set(null,E),d.set(W,E),this.count++,m=cl.bind(this),E.addEventListener("load",m),E.addEventListener("error",m),C?C.parentNode.insertBefore(E,C.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(E,o.firstChild)),l.state.loading|=4}}var ia={$$typeof:x,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function Ap(o,l,d,m,E,C,W,le,ke){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=H(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=H(0),this.hiddenUpdates=H(null),this.identifierPrefix=m,this.onUncaughtError=E,this.onCaughtError=C,this.onRecoverableError=W,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ke,this.incompleteTransitions=new Map}function th(o,l,d,m,E,C,W,le,ke,Ye,lt,dt){return o=new Ap(o,l,d,W,ke,Ye,lt,dt,le),l=1,C===!0&&(l|=24),C=Ln(3,null,null,l),o.current=C,C.stateNode=o,l=Ll(),l.refCount++,o.pooledCache=l,l.refCount++,C.memoizedState={element:m,isDehydrated:d,cache:l},jl(C),o}function rh(o){return o?(o=Gs,o):Gs}function nh(o,l,d,m,E,C){E=rh(E),m.context===null?m.context=E:m.pendingContext=E,m=ts(l),m.payload={element:d},C=C===void 0?null:C,C!==null&&(m.callback=C),d=rs(o,m,l),d!==null&&(Nn(d,o,l),Uo(d,o,l))}function ih(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<l?d:l}}function nc(o,l){ih(o,l),(o=o.alternate)&&ih(o,l)}function sh(o){if(o.tag===13||o.tag===31){var l=Rs(o,67108864);l!==null&&Nn(l,o,67108864),nc(o,67108864)}}function oh(o){if(o.tag===13||o.tag===31){var l=Bn();l=on(l);var d=Rs(o,l);d!==null&&Nn(d,o,l),nc(o,l)}}var hl=!0;function Ip(o,l,d,m){var E=ye.T;ye.T=null;var C=Ve.p;try{Ve.p=2,ic(o,l,d,m)}finally{Ve.p=C,ye.T=E}}function Cp(o,l,d,m){var E=ye.T;ye.T=null;var C=Ve.p;try{Ve.p=8,ic(o,l,d,m)}finally{Ve.p=C,ye.T=E}}function ic(o,l,d,m){if(hl){var E=sc(m);if(E===null)Vu(o,l,m,pl,d),lh(o,m);else if(Fp(E,o,l,d,m))m.stopPropagation();else if(lh(o,m),l&4&&-1<Np.indexOf(o)){for(;E!==null;){var C=ai(E);if(C!==null)switch(C.tag){case 3:if(C=C.stateNode,C.current.memoizedState.isDehydrated){var W=Bt(C.pendingLanes);if(W!==0){var le=C;for(le.pendingLanes|=2,le.entangledLanes|=2;W;){var ke=1<<31-Tt(W);le.entanglements[1]|=ke,W&=~ke}bi(C),(rr&6)===0&&(Qa=ft()+500,Xo(0))}}break;case 31:case 13:le=Rs(C,2),le!==null&&Nn(le,C,2),Xa(),nc(C,2)}if(C=sc(m),C===null&&Vu(o,l,m,pl,d),C===E)break;E=C}E!==null&&m.stopPropagation()}else Vu(o,l,m,null,d)}}function sc(o){return o=Qt(o),oc(o)}var pl=null;function oc(o){if(pl=null,o=or(o),o!==null){var l=a(o);if(l===null)o=null;else{var d=l.tag;if(d===13){if(o=u(l),o!==null)return o;o=null}else if(d===31){if(o=c(l),o!==null)return o;o=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return pl=o,null}function ah(o){switch(o){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ge()){case pt:return 2;case Z:return 8;case P:case B:return 32;case U:return 268435456;default:return 32}default:return 32}}var ac=!1,gs=null,ms=null,ys=null,sa=new Map,oa=new Map,bs=[],Np="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function lh(o,l){switch(o){case"focusin":case"focusout":gs=null;break;case"dragenter":case"dragleave":ms=null;break;case"mouseover":case"mouseout":ys=null;break;case"pointerover":case"pointerout":sa.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":oa.delete(l.pointerId)}}function aa(o,l,d,m,E,C){return o===null||o.nativeEvent!==C?(o={blockedOn:l,domEventName:d,eventSystemFlags:m,nativeEvent:C,targetContainers:[E]},l!==null&&(l=ai(l),l!==null&&sh(l)),o):(o.eventSystemFlags|=m,l=o.targetContainers,E!==null&&l.indexOf(E)===-1&&l.push(E),o)}function Fp(o,l,d,m,E){switch(l){case"focusin":return gs=aa(gs,o,l,d,m,E),!0;case"dragenter":return ms=aa(ms,o,l,d,m,E),!0;case"mouseover":return ys=aa(ys,o,l,d,m,E),!0;case"pointerover":var C=E.pointerId;return sa.set(C,aa(sa.get(C)||null,o,l,d,m,E)),!0;case"gotpointercapture":return C=E.pointerId,oa.set(C,aa(oa.get(C)||null,o,l,d,m,E)),!0}return!1}function uh(o){var l=or(o.target);if(l!==null){var d=a(l);if(d!==null){if(l=d.tag,l===13){if(l=u(d),l!==null){o.blockedOn=l,bn(o.priority,function(){oh(d)});return}}else if(l===31){if(l=c(d),l!==null){o.blockedOn=l,bn(o.priority,function(){oh(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function gl(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var d=sc(o.nativeEvent);if(d===null){d=o.nativeEvent;var m=new d.constructor(d.type,d);Jt=m,d.target.dispatchEvent(m),Jt=null}else return l=ai(d),l!==null&&sh(l),o.blockedOn=d,!1;l.shift()}return!0}function ch(o,l,d){gl(o)&&d.delete(l)}function Dp(){ac=!1,gs!==null&&gl(gs)&&(gs=null),ms!==null&&gl(ms)&&(ms=null),ys!==null&&gl(ys)&&(ys=null),sa.forEach(ch),oa.forEach(ch)}function ml(o,l){o.blockedOn===l&&(o.blockedOn=null,ac||(ac=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Dp)))}var yl=null;function dh(o){yl!==o&&(yl=o,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){yl===o&&(yl=null);for(var l=0;l<o.length;l+=3){var d=o[l],m=o[l+1],E=o[l+2];if(typeof m!="function"){if(oc(m||d)===null)continue;break}var C=ai(d);C!==null&&(o.splice(l,3),l-=3,su(C,{pending:!0,data:E,method:d.method,action:m},m,E))}}))}function _o(o){function l(ke){return ml(ke,o)}gs!==null&&ml(gs,o),ms!==null&&ml(ms,o),ys!==null&&ml(ys,o),sa.forEach(l),oa.forEach(l);for(var d=0;d<bs.length;d++){var m=bs[d];m.blockedOn===o&&(m.blockedOn=null)}for(;0<bs.length&&(d=bs[0],d.blockedOn===null);)uh(d),d.blockedOn===null&&bs.shift();if(d=(o.ownerDocument||o).$$reactFormReplay,d!=null)for(m=0;m<d.length;m+=3){var E=d[m],C=d[m+1],W=E[fr]||null;if(typeof C=="function")W||dh(d);else if(W){var le=null;if(C&&C.hasAttribute("formAction")){if(E=C,W=C[fr]||null)le=W.formAction;else if(oc(E)!==null)continue}else le=W.action;typeof le=="function"?d[m+1]=le:(d.splice(m,3),m-=3),dh(d)}}}function fh(){function o(C){C.canIntercept&&C.info==="react-transition"&&C.intercept({handler:function(){return new Promise(function(W){return E=W})},focusReset:"manual",scroll:"manual"})}function l(){E!==null&&(E(),E=null),m||setTimeout(d,20)}function d(){if(!m&&!navigation.transition){var C=navigation.currentEntry;C&&C.url!=null&&navigation.navigate(C.url,{state:C.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,E=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){m=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),E!==null&&(E(),E=null)}}}function lc(o){this._internalRoot=o}bl.prototype.render=lc.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(n(409));var d=l.current,m=Bn();nh(d,m,o,l,null,null)},bl.prototype.unmount=lc.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;nh(o.current,2,null,o,null,null),Xa(),l[Dr]=null}};function bl(o){this._internalRoot=o}bl.prototype.unstable_scheduleHydration=function(o){if(o){var l=sr();o={blockedOn:null,target:o,priority:l};for(var d=0;d<bs.length&&l!==0&&l<bs[d].priority;d++);bs.splice(d,0,o),d===0&&uh(o)}};var hh=e.version;if(hh!=="19.2.8")throw Error(n(527,hh,"19.2.8"));Ve.findDOMNode=function(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(n(188)):(o=Object.keys(o).join(","),Error(n(268,o)));return o=f(l),o=o!==null?p(o):null,o=o===null?null:o.stateNode,o};var Pp={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:ye,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_l.isDisabled&&_l.supportsFiber)try{Pe=_l.inject(Pp),gt=_l}catch{}}return reactDomClient_production.createRoot=function(o,l){if(!s(o))throw Error(n(299));var d=!1,m="",E=_d,C=wd,W=vd;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(E=l.onUncaughtError),l.onCaughtError!==void 0&&(C=l.onCaughtError),l.onRecoverableError!==void 0&&(W=l.onRecoverableError)),l=th(o,1,!1,null,null,d,m,null,E,C,W,fh),o[Dr]=l.current,zu(o),new lc(l)},reactDomClient_production.hydrateRoot=function(o,l,d){if(!s(o))throw Error(n(299));var m=!1,E="",C=_d,W=wd,le=vd,ke=null;return d!=null&&(d.unstable_strictMode===!0&&(m=!0),d.identifierPrefix!==void 0&&(E=d.identifierPrefix),d.onUncaughtError!==void 0&&(C=d.onUncaughtError),d.onCaughtError!==void 0&&(W=d.onCaughtError),d.onRecoverableError!==void 0&&(le=d.onRecoverableError),d.formState!==void 0&&(ke=d.formState)),l=th(o,1,!0,l,d??null,m,E,ke,C,W,le,fh),l.context=rh(null),d=l.current,m=Bn(),m=on(m),E=ts(m),E.callback=null,rs(d,E,m),d=m,l.current.lanes=d,Be(l,d),bi(l),o[Dr]=l.current,zu(o),new bl(l)},reactDomClient_production.version="19.2.8",reactDomClient_production}var hasRequiredClient;function requireClient(){if(hasRequiredClient)return client.exports;hasRequiredClient=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),client.exports=requireReactDomClient_production(),client.exports}var clientExports=requireClient();var ABSOLUTE_URL_REGEX=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,PROTOCOL_RELATIVE_URL_REGEX=/^[\\/]{2}/;function normalizeProtocolRelativeUrl(i,e){return e+i.replace(/\\/g,"/")}var PopStateEventType="popstate";function isLocation(i){return typeof i=="object"&&i!=null&&"pathname"in i&&"search"in i&&"hash"in i&&"state"in i&&"key"in i}function createBrowserHistory(i={}){function e(n,s){let a=s.state?.masked,{pathname:u,search:c,hash:h}=a||n.location;return createLocation("",{pathname:u,search:c,hash:h},s.state&&s.state.usr||null,s.state&&s.state.key||"default",a?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function t(n,s){return typeof s=="string"?s:createPath(s)}return getUrlBasedHistory(e,t,null,i)}function invariant(i,e){if(i===!1||i===null||typeof i>"u")throw new Error(e)}function warning(i,e){if(!i){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function createKey(){return Math.random().toString(36).substring(2,10)}function getHistoryState(i,e){return{usr:i.state,key:i.key,idx:e,masked:i.mask?{pathname:i.pathname,search:i.search,hash:i.hash}:void 0}}function createLocation(i,e,t=null,n,s){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof e=="string"?parsePath(e):e,state:t,key:e&&e.key||n||createKey(),mask:s}}function createPath({pathname:i="/",search:e="",hash:t=""}){return e&&e!=="?"&&(i+=e.charAt(0)==="?"?e:"?"+e),t&&t!=="#"&&(i+=t.charAt(0)==="#"?t:"#"+t),i}function parsePath(i){let e={};if(i){let t=i.indexOf("#");t>=0&&(e.hash=i.substring(t),i=i.substring(0,t));let n=i.indexOf("?");n>=0&&(e.search=i.substring(n),i=i.substring(0,n)),i&&(e.pathname=i)}return e}function getUrlBasedHistory(i,e,t,n={}){let{window:s=document.defaultView,v5Compat:a=!1}=n,u=s.history,c="POP",h=null,f=p();f==null&&(f=0,u.replaceState({...u.state,idx:f},""));function p(){return(u.state||{idx:null}).idx}function g(){c="POP";let T=p(),A=T==null?null:T-f;f=T,h&&h({action:c,location:R.location,delta:A})}function y(T,A){c="PUSH";let F=isLocation(T)?T:createLocation(R.location,T,A);f=p()+1;let x=getHistoryState(F,f),D=R.createHref(F.mask||F);try{u.pushState(x,"",D)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;s.location.assign(D)}a&&h&&h({action:c,location:R.location,delta:1})}function S(T,A){c="REPLACE";let F=isLocation(T)?T:createLocation(R.location,T,A);f=p();let x=getHistoryState(F,f),D=R.createHref(F.mask||F);u.replaceState(x,"",D),a&&h&&h({action:c,location:R.location,delta:0})}function w(T){return createBrowserURLImpl(s,T)}let R={get action(){return c},get location(){return i(s,u)},listen(T){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(PopStateEventType,g),h=T,()=>{s.removeEventListener(PopStateEventType,g),h=null}},createHref(T){return e(s,T)},createURL:w,encodeLocation(T){let A=w(T);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:y,replace:S,go(T){return u.go(T)}};return R}function createBrowserURLImpl(i,e,t=!1){let n="http://localhost";i&&(n=i.location.origin!=="null"?i.location.origin:i.location.href),invariant(n,"No window.location.(origin|href) available to create URL");let s=typeof e=="string"?e:createPath(e);return s=s.replace(/ $/,"%20"),!t&&PROTOCOL_RELATIVE_URL_REGEX.test(s)&&(s=n+s),new URL(s,n)}function matchRoutes(i,e,t="/"){return matchRoutesImpl(i,e,t,!1)}function matchRoutesImpl(i,e,t,n,s){let a=typeof e=="string"?parsePath(e):e,u=stripBasename(a.pathname||"/",t);if(u==null)return null;let c=flattenAndRankRoutes(i),h=null,f=decodePath(u);for(let p=0;h==null&&p<c.length;++p)h=matchRouteBranch(c[p],f,n);return h}function flattenAndRankRoutes(i){let e=flattenRoutes(i);return rankRouteBranches(e),e}function flattenRoutes(i,e=[],t=[],n="",s=!1){let a=(u,c,h=s,f)=>{let p={relativePath:f===void 0?u.path||"":f,caseSensitive:u.caseSensitive===!0,childrenIndex:c,route:u};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&h)return;invariant(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let g=joinPaths([n,p.relativePath]),y=t.concat(p);u.children&&u.children.length>0&&(invariant(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),flattenRoutes(u.children,e,y,g,h)),!(u.path==null&&!u.index)&&e.push({path:g,score:computeScore(g,u.index),routesMeta:y.map((S,w)=>{let[R,T]=compilePath(S.relativePath,S.caseSensitive,w===y.length-1);return{...S,matcher:R,compiledParams:T}})})};return i.forEach((u,c)=>{if(u.path===""||!u.path?.includes("?"))a(u,c);else for(let h of explodeOptionalSegments(u.path))a(u,c,!0,h)}),e}function explodeOptionalSegments(i){let e=i.split("/");if(e.length===0)return[];let[t,...n]=e,s=t.endsWith("?"),a=t.replace(/\?$/,"");if(n.length===0)return s?[a,""]:[a];let u=explodeOptionalSegments(n.join("/")),c=[];return c.push(...u.map(h=>h===""?a:[a,h].join("/"))),s&&c.push(...u),c.map(h=>i.startsWith("/")&&h===""?"/":h)}function rankRouteBranches(i){i.sort((e,t)=>e.score!==t.score?t.score-e.score:compareIndexes(e.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}var paramRe=/^:[\w-]+$/,dynamicSegmentValue=3,indexRouteValue=2,emptySegmentValue=1,staticSegmentValue=10,splatPenalty=-2,isSplat=i=>i==="*";function computeScore(i,e){let t=i.split("/"),n=t.length;return t.some(isSplat)&&(n+=splatPenalty),e&&(n+=indexRouteValue),t.filter(s=>!isSplat(s)).reduce((s,a)=>s+(paramRe.test(a)?dynamicSegmentValue:a===""?emptySegmentValue:staticSegmentValue),n)}function compareIndexes(i,e){return i.length===e.length&&i.slice(0,-1).every((n,s)=>n===e[s])?i[i.length-1]-e[e.length-1]:0}function matchRouteBranch(i,e,t=!1){let{routesMeta:n}=i,s={},a="/",u=[];for(let c=0;c<n.length;++c){let h=n[c],f=c===n.length-1,p=a==="/"?e:e.slice(a.length)||"/",g={path:h.relativePath,caseSensitive:h.caseSensitive,end:f},y=h.matcher&&h.compiledParams?matchPathImpl(g,p,h.matcher,h.compiledParams):matchPath(g,p),S=h.route;if(!y&&f&&t&&!n[n.length-1].route.index&&(y=matchPath({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},p)),!y)return null;Object.assign(s,y.params),u.push({params:s,pathname:joinPaths([a,y.pathname]),pathnameBase:normalizePathname(joinPaths([a,y.pathnameBase])),route:S}),y.pathnameBase!=="/"&&(a=joinPaths([a,y.pathnameBase]))}return u}function matchPath(i,e){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[t,n]=compilePath(i.path,i.caseSensitive,i.end);return matchPathImpl(i,e,t,n)}function matchPathImpl(i,e,t,n){let s=e.match(t);if(!s)return null;let a=s[0],u=a.replace(/(.)\/+$/,"$1"),c=s.slice(1);return{params:n.reduce((f,{paramName:p,isOptional:g},y)=>{if(p==="*"){let w=c[y]||"";u=a.slice(0,a.length-w.length).replace(/(.)\/+$/,"$1")}const S=c[y];return g&&!S?f[p]=void 0:f[p]=(S||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:u,pattern:i}}function compilePath(i,e=!1,t=!0){warning(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let n=[],s="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,c,h,f,p)=>{if(n.push({paramName:c,isOptional:h!=null}),h){let g=p.charAt(f+u.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(n.push({paramName:"*"}),s+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?s+="\\/*$":i!==""&&i!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function decodePath(i){try{return i.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return warning(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),i}}function stripBasename(i,e){if(e==="/")return i;if(!i.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,n=i.charAt(t);return n&&n!=="/"?null:i.slice(t)||"/"}function resolvePath(i,e="/"){let{pathname:t,search:n="",hash:s=""}=typeof i=="string"?parsePath(i):i,a;return t?(t=removeDoubleSlashes(t),t.startsWith("/")?a=resolvePathname(t.substring(1),"/"):a=resolvePathname(t,e)):a=e,{pathname:a,search:normalizeSearch(n),hash:normalizeHash(s)}}function resolvePathname(i,e){let t=removeTrailingSlash(e).split("/");return i.split("/").forEach(s=>{s===".."?t.length>1&&t.pop():s!=="."&&t.push(s)}),t.length>1?t.join("/"):"/"}function getInvalidPathError(i,e,t,n){return`Cannot include a '${i}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function getPathContributingMatches(i){return i.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function getResolveToMatches(i){let e=getPathContributingMatches(i);return e.map((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)}function resolveTo(i,e,t,n=!1){let s;typeof i=="string"?s=parsePath(i):(s={...i},invariant(!s.pathname||!s.pathname.includes("?"),getInvalidPathError("?","pathname","search",s)),invariant(!s.pathname||!s.pathname.includes("#"),getInvalidPathError("#","pathname","hash",s)),invariant(!s.search||!s.search.includes("#"),getInvalidPathError("#","search","hash",s)));let a=i===""||s.pathname==="",u=a?"/":s.pathname,c;if(u==null)c=t;else{let g=e.length-1;if(!n&&u.startsWith("..")){let y=u.split("/");for(;y[0]==="..";)y.shift(),g-=1;s.pathname=y.join("/")}c=g>=0?e[g]:"/"}let h=resolvePath(s,c),f=u&&u!=="/"&&u.endsWith("/"),p=(a||u===".")&&t.endsWith("/");return!h.pathname.endsWith("/")&&(f||p)&&(h.pathname+="/"),h}var removeDoubleSlashes=i=>i.replace(/[\\/]{2,}/g,"/"),joinPaths=i=>removeDoubleSlashes(i.join("/")),removeTrailingSlash=i=>i.replace(/\/+$/,""),normalizePathname=i=>removeTrailingSlash(i).replace(/^\/*/,"/"),normalizeSearch=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,normalizeHash=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,ErrorResponseImpl=class{constructor(i,e,t,n=!1){this.status=i,this.statusText=e||"",this.internal=n,t instanceof Error?(this.data=t.toString(),this.error=t):this.data=t}};function isRouteErrorResponse(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function getRoutePattern(i){let e=i.map(t=>t.route.path).filter(Boolean);return joinPaths(e)||"/"}var isBrowser$1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function parseToInfo(i,e){let t=i;if(typeof t!="string"||!ABSOLUTE_URL_REGEX.test(t))return{absoluteURL:void 0,isExternal:!1,to:t};let n=t,s=!1;if(isBrowser$1)try{let a=new URL(window.location.href),u=PROTOCOL_RELATIVE_URL_REGEX.test(t)?new URL(normalizeProtocolRelativeUrl(t,a.protocol)):new URL(t),c=stripBasename(u.pathname,e);u.origin===a.origin&&c!=null?t=c+u.search+u.hash:s=!0}catch{warning(!1,`<Link to="${t}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:s,to:t}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var validMutationMethodsArr=["POST","PUT","PATCH","DELETE"];new Set(validMutationMethodsArr);var validRequestMethodsArr=["GET",...validMutationMethodsArr];new Set(validRequestMethodsArr);var invalidProtocols=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function hasInvalidProtocol(i){try{return invalidProtocols.includes(new URL(i).protocol)}catch{return!1}}var DataRouterContext=reactExports.createContext(null);DataRouterContext.displayName="DataRouter";var DataRouterStateContext=reactExports.createContext(null);DataRouterStateContext.displayName="DataRouterState";var RSCRouterContext=reactExports.createContext(!1);function useIsRSCRouterContext(){return reactExports.useContext(RSCRouterContext)}var ViewTransitionContext=reactExports.createContext({isTransitioning:!1});ViewTransitionContext.displayName="ViewTransition";var FetchersContext=reactExports.createContext(new Map);FetchersContext.displayName="Fetchers";var AwaitContext=reactExports.createContext(null);AwaitContext.displayName="Await";var NavigationContext=reactExports.createContext(null);NavigationContext.displayName="Navigation";var LocationContext=reactExports.createContext(null);LocationContext.displayName="Location";var RouteContext=reactExports.createContext({outlet:null,matches:[],isDataRoute:!1});RouteContext.displayName="Route";var RouteErrorContext=reactExports.createContext(null);RouteErrorContext.displayName="RouteError";var ERROR_DIGEST_BASE="REACT_ROUTER_ERROR",ERROR_DIGEST_REDIRECT="REDIRECT",ERROR_DIGEST_ROUTE_ERROR_RESPONSE="ROUTE_ERROR_RESPONSE";function decodeRedirectErrorDigest(i){if(i.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_REDIRECT}:{`))try{let e=JSON.parse(i.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function decodeRouteErrorResponseDigest(i){if(i.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_ROUTE_ERROR_RESPONSE}:{`))try{let e=JSON.parse(i.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new ErrorResponseImpl(e.status,e.statusText,e.data)}catch{}}function useHref(i,{relative:e}={}){invariant(useInRouterContext(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:n}=reactExports.useContext(NavigationContext),{hash:s,pathname:a,search:u}=useResolvedPath(i,{relative:e}),c=a;return t!=="/"&&(c=a==="/"?t:joinPaths([t,a])),n.createHref({pathname:c,search:u,hash:s})}function useInRouterContext(){return reactExports.useContext(LocationContext)!=null}function useLocation(){return invariant(useInRouterContext(),"useLocation() may be used only in the context of a <Router> component."),reactExports.useContext(LocationContext).location}var navigateEffectWarning="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function useIsomorphicLayoutEffect(i){reactExports.useContext(NavigationContext).static||reactExports.useLayoutEffect(i)}function useNavigate(){let{isDataRoute:i}=reactExports.useContext(RouteContext);return i?useNavigateStable():useNavigateUnstable()}function useNavigateUnstable(){invariant(useInRouterContext(),"useNavigate() may be used only in the context of a <Router> component.");let i=reactExports.useContext(DataRouterContext),{basename:e,navigator:t}=reactExports.useContext(NavigationContext),{matches:n}=reactExports.useContext(RouteContext),{pathname:s}=useLocation(),a=JSON.stringify(getResolveToMatches(n)),u=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{u.current=!0}),reactExports.useCallback((h,f={})=>{if(warning(u.current,navigateEffectWarning),!u.current)return;if(typeof h=="number"){t.go(h);return}let p=resolveTo(h,JSON.parse(a),s,f.relative==="path");i==null&&e!=="/"&&(p.pathname=p.pathname==="/"?e:joinPaths([e,p.pathname])),(f.replace?t.replace:t.push)(p,f.state,f)},[e,t,a,s,i])}var OutletContext=reactExports.createContext(null);function useOutlet(i){let e=reactExports.useContext(RouteContext).outlet;return reactExports.useMemo(()=>e&&reactExports.createElement(OutletContext.Provider,{value:i},e),[e,i])}function useResolvedPath(i,{relative:e}={}){let{matches:t}=reactExports.useContext(RouteContext),{pathname:n}=useLocation(),s=JSON.stringify(getResolveToMatches(t));return reactExports.useMemo(()=>resolveTo(i,JSON.parse(s),n,e==="path"),[i,s,n,e])}function useRoutes(i,e){return useRoutesImpl(i)}function useRoutesImpl(i,e,t){invariant(useInRouterContext(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=reactExports.useContext(NavigationContext),{matches:s}=reactExports.useContext(RouteContext),a=s[s.length-1],u=a?a.params:{},c=a?a.pathname:"/",h=a?a.pathnameBase:"/",f=a&&a.route;{let T=f&&f.path||"";warningOnce(c,!f||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${T}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
11
11
 
12
- Please change the parent <Route path="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let p=useLocation(),g;g=p;let y=g.pathname||"/",S=y;if(h!=="/"){let T=h.replace(/^\//,"").split("/");S="/"+y.replace(/^\//,"").split("/").slice(T.length).join("/")}let w=t&&t.state.matches.length?t.state.matches.map(T=>Object.assign(T,{route:t.manifest[T.route.id]||T.route})):matchRoutes(i,{pathname:S});return warning(f||w!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),warning(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),_renderMatches(w&&w.map(T=>Object.assign({},T,{params:Object.assign({},u,T.params),pathname:joinPaths([h,n.encodeLocation?n.encodeLocation(T.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?h:joinPaths([h,n.encodeLocation?n.encodeLocation(T.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),s,t)}function DefaultErrorComponent(){let i=useRouteError(),e=isRouteErrorResponse(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),t=i instanceof Error?i.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},u=null;return console.error("Error handled by React Router default ErrorBoundary:",i),u=reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("p",null,"💿 Hey developer 👋"),reactExports.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",reactExports.createElement("code",{style:a},"ErrorBoundary")," or"," ",reactExports.createElement("code",{style:a},"errorElement")," prop on your route.")),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("h2",null,"Unexpected Application Error!"),reactExports.createElement("h3",{style:{fontStyle:"italic"}},e),t?reactExports.createElement("pre",{style:s},t):null,u)}var defaultErrorElement=reactExports.createElement(DefaultErrorComponent,null),RenderErrorBoundary=class extends reactExports.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,e){return e.location!==i.location||e.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:e.error,location:e.location,revalidation:i.revalidation||e.revalidation}}componentDidCatch(i,e){this.props.onError?this.props.onError(i,e):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const t=decodeRouteErrorResponseDigest(i.digest);t&&(i=t)}let e=i!==void 0?reactExports.createElement(RouteContext.Provider,{value:this.props.routeContext},reactExports.createElement(RouteErrorContext.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?reactExports.createElement(RSCErrorHandler,{error:i},e):e}};RenderErrorBoundary.contextType=RSCRouterContext;var errorRedirectHandledMap=new WeakMap;function RSCErrorHandler({children:i,error:e}){let{basename:t}=reactExports.useContext(NavigationContext);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let n=decodeRedirectErrorDigest(e.digest);if(n){let s=errorRedirectHandledMap.get(e);if(s)throw s;let a=parseToInfo(n.location,t),u=a.absoluteURL||a.to;if(hasInvalidProtocol(u))throw new Error("Invalid redirect location");if(isBrowser&&!errorRedirectHandledMap.get(e))if(a.isExternal||n.reloadDocument)window.location.href=u;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:n.replace}));throw errorRedirectHandledMap.set(e,c),c}return reactExports.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u}`})}}return i}function RenderedRoute({routeContext:i,match:e,children:t}){let n=reactExports.useContext(DataRouterContext);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),reactExports.createElement(RouteContext.Provider,{value:i},t)}function _renderMatches(i,e=[],t){let n=t?.state;if(i==null){if(!n)return null;if(n.errors)i=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)i=n.matches;else return null}let s=i,a=n?.errors;if(a!=null){let p=s.findIndex(g=>g.route.id&&a?.[g.route.id]!==void 0);invariant(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),s=s.slice(0,Math.min(s.length,p+1))}let u=!1,c=-1;if(t&&n){u=n.renderFallback;for(let p=0;p<s.length;p++){let g=s[p];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(c=p),g.route.id){let{loaderData:y,errors:S}=n,w=g.route.loader&&!y.hasOwnProperty(g.route.id)&&(!S||S[g.route.id]===void 0);if(g.route.lazy||w){t.isStatic&&(u=!0),c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}}let h=t?.onError,f=n&&h?(p,g)=>{h(p,{location:n.location,params:n.matches?.[0]?.params??{},pattern:getRoutePattern(n.matches),errorInfo:g})}:void 0;return s.reduceRight((p,g,y)=>{let S,w=!1,R=null,T=null;n&&(S=a&&g.route.id?a[g.route.id]:void 0,R=g.route.errorElement||defaultErrorElement,u&&(c<0&&y===0?(warningOnce("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,T=null):c===y&&(w=!0,T=g.route.hydrateFallbackElement||null)));let A=e.concat(s.slice(0,y+1)),F=()=>{let x;return S?x=R:w?x=T:g.route.Component?x=reactExports.createElement(g.route.Component,null):g.route.element?x=g.route.element:x=p,reactExports.createElement(RenderedRoute,{match:g,routeContext:{outlet:p,matches:A,isDataRoute:n!=null},children:x})};return n&&(g.route.ErrorBoundary||g.route.errorElement||y===0)?reactExports.createElement(RenderErrorBoundary,{location:n.location,revalidation:n.revalidation,component:R,error:S,children:F(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:f}):F()},null)}function getDataRouterConsoleError(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext(i){let e=reactExports.useContext(DataRouterContext);return invariant(e,getDataRouterConsoleError(i)),e}function useDataRouterState(i){let e=reactExports.useContext(DataRouterStateContext);return invariant(e,getDataRouterConsoleError(i)),e}function useRouteContext(i){let e=reactExports.useContext(RouteContext);return invariant(e,getDataRouterConsoleError(i)),e}function useCurrentRouteId(i){let e=useRouteContext(i),t=e.matches[e.matches.length-1];return invariant(t.route.id,`${i} can only be used on routes that contain a unique "id"`),t.route.id}function useRouteId(){return useCurrentRouteId("useRouteId")}function useRouteError(){let i=reactExports.useContext(RouteErrorContext),e=useDataRouterState("useRouteError"),t=useCurrentRouteId("useRouteError");return i!==void 0?i:e.errors?.[t]}function useNavigateStable(){let{router:i}=useDataRouterContext("useNavigate"),e=useCurrentRouteId("useNavigate"),t=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{t.current=!0}),reactExports.useCallback(async(s,a={})=>{warning(t.current,navigateEffectWarning),t.current&&(typeof s=="number"?await i.navigate(s):await i.navigate(s,{fromRouteId:e,...a}))},[i,e])}var alreadyWarned={};function warningOnce(i,e,t){!e&&!alreadyWarned[i]&&(alreadyWarned[i]=!0,warning(!1,t))}reactExports.memo(DataRoutes2);function DataRoutes2({routes:i,manifest:e,future:t,state:n,isStatic:s,onError:a}){return useRoutesImpl(i,void 0,{manifest:e,state:n,isStatic:s,onError:a})}function Navigate({to:i,replace:e,state:t,relative:n}){invariant(useInRouterContext(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=reactExports.useContext(NavigationContext);warning(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=reactExports.useContext(RouteContext),{pathname:u}=useLocation(),c=useNavigate(),h=resolveTo(i,getResolveToMatches(a),u,n==="path"),f=JSON.stringify(h);return reactExports.useEffect(()=>{c(JSON.parse(f),{replace:e,state:t,relative:n})},[c,f,n,e,t]),null}function Outlet(i){return useOutlet(i.context)}function Router({basename:i="/",children:e=null,location:t,navigationType:n="POP",navigator:s,static:a=!1,useTransitions:u}){invariant(!useInRouterContext(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=i.replace(/^\/*/,"/"),h=reactExports.useMemo(()=>({basename:c,navigator:s,static:a,useTransitions:u,future:{}}),[c,s,a,u]);typeof t=="string"&&(t=parsePath(t));let{pathname:f="/",search:p="",hash:g="",state:y=null,key:S="default",mask:w}=t,R=reactExports.useMemo(()=>{let T=stripBasename(f,c);return T==null?null:{location:{pathname:T,search:p,hash:g,state:y,key:S,mask:w},navigationType:n}},[c,f,p,g,y,S,n,w]);return warning(R!=null,`<Router basename="${c}"> is not able to match the URL "${f}${p}${g}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:reactExports.createElement(NavigationContext.Provider,{value:h},reactExports.createElement(LocationContext.Provider,{children:e,value:R}))}var defaultMethod="get",defaultEncType="application/x-www-form-urlencoded";function isHtmlElement(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function isButtonElement(i){return isHtmlElement(i)&&i.tagName.toLowerCase()==="button"}function isFormElement(i){return isHtmlElement(i)&&i.tagName.toLowerCase()==="form"}function isInputElement(i){return isHtmlElement(i)&&i.tagName.toLowerCase()==="input"}function isModifiedEvent(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function shouldProcessLinkClick(i,e){return i.button===0&&(!e||e==="_self")&&!isModifiedEvent(i)}var _formDataSupportsSubmitter=null;function isFormDataSubmitterSupported(){if(_formDataSupportsSubmitter===null)try{new FormData(document.createElement("form"),0),_formDataSupportsSubmitter=!1}catch{_formDataSupportsSubmitter=!0}return _formDataSupportsSubmitter}var supportedFormEncTypes=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function getFormEncType(i){return i!=null&&!supportedFormEncTypes.has(i)?(warning(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`),null):i}function getFormSubmissionInfo(i,e){let t,n,s,a,u;if(isFormElement(i)){let c=i.getAttribute("action");n=c?stripBasename(c,e):null,t=i.getAttribute("method")||defaultMethod,s=getFormEncType(i.getAttribute("enctype"))||defaultEncType,a=new FormData(i)}else if(isButtonElement(i)||isInputElement(i)&&(i.type==="submit"||i.type==="image")){let c=i.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=i.getAttribute("formaction")||c.getAttribute("action");if(n=h?stripBasename(h,e):null,t=i.getAttribute("formmethod")||c.getAttribute("method")||defaultMethod,s=getFormEncType(i.getAttribute("formenctype"))||getFormEncType(c.getAttribute("enctype"))||defaultEncType,a=new FormData(c,i),!isFormDataSubmitterSupported()){let{name:f,type:p,value:g}=i;if(p==="image"){let y=f?`${f}.`:"";a.append(`${y}x`,"0"),a.append(`${y}y`,"0")}else f&&a.append(f,g)}}else{if(isHtmlElement(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=defaultMethod,n=null,s=defaultEncType,u=i}return a&&s==="text/plain"&&(u=a,a=void 0),{action:n,method:t.toLowerCase(),encType:s,formData:a,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function invariant2(i,e){if(i===!1||i===null||typeof i>"u")throw new Error(e)}function singleFetchUrl(i,e,t,n){let s=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return t?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${n}`:s.pathname=`${s.pathname}.${n}`:s.pathname==="/"?s.pathname=`_root.${n}`:e&&stripBasename(s.pathname,e)==="/"?s.pathname=`${removeTrailingSlash(e)}/_root.${n}`:s.pathname=`${removeTrailingSlash(s.pathname)}.${n}`,s}async function loadRouteModule(i,e){if(i.id in e)return e[i.id];try{let t=await import(i.module);return e[i.id]=t,t}catch(t){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function isHtmlLinkDescriptor(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function getKeyedPrefetchLinks(i,e,t){let n=await Promise.all(i.map(async s=>{let a=e.routes[s.route.id];if(a){let u=await loadRouteModule(a,t);return u.links?u.links():[]}return[]}));return dedupeLinkDescriptors(n.flat(1).filter(isHtmlLinkDescriptor).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function getNewMatchesForLinks(i,e,t,n,s,a){let u=(h,f)=>t[f]?h.route.id!==t[f].route.id:!0,c=(h,f)=>t[f].pathname!==h.pathname||t[f].route.path?.endsWith("*")&&t[f].params["*"]!==h.params["*"];return a==="assets"?e.filter((h,f)=>u(h,f)||c(h,f)):a==="data"?e.filter((h,f)=>{let p=n.routes[h.route.id];if(!p||!p.hasLoader)return!1;if(u(h,f)||c(h,f))return!0;if(h.route.shouldRevalidate){let g=h.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(i,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function getModuleLinkHrefs(i,e,{includeHydrateFallback:t}={}){return dedupeHrefs(i.map(n=>{let s=e.routes[n.route.id];if(!s)return[];let a=[s.module];return s.clientActionModule&&(a=a.concat(s.clientActionModule)),s.clientLoaderModule&&(a=a.concat(s.clientLoaderModule)),t&&s.hydrateFallbackModule&&(a=a.concat(s.hydrateFallbackModule)),s.imports&&(a=a.concat(s.imports)),a}).flat(1))}function dedupeHrefs(i){return[...new Set(i)]}function sortKeys(i){let e={},t=Object.keys(i).sort();for(let n of t)e[n]=i[n];return e}function dedupeLinkDescriptors(i,e){let t=new Set;return new Set(e),i.reduce((n,s)=>{let a=JSON.stringify(sortKeys(s));return t.has(a)||(t.add(a),n.push({key:a,link:s})),n},[])}function useDataRouterContext2(){let i=reactExports.useContext(DataRouterContext);return invariant2(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function useDataRouterStateContext(){let i=reactExports.useContext(DataRouterStateContext);return invariant2(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var FrameworkContext=reactExports.createContext(void 0);FrameworkContext.displayName="FrameworkContext";function useFrameworkContext(){let i=reactExports.useContext(FrameworkContext);return invariant2(i,"You must render this element inside a <HydratedRouter> element"),i}function usePrefetchBehavior(i,e){let t=reactExports.useContext(FrameworkContext),[n,s]=reactExports.useState(!1),[a,u]=reactExports.useState(!1),{onFocus:c,onBlur:h,onMouseEnter:f,onMouseLeave:p,onTouchStart:g}=e,y=reactExports.useRef(null);reactExports.useEffect(()=>{if(i==="render"&&u(!0),i==="viewport"){let R=A=>{A.forEach(F=>{u(F.isIntersecting)})},T=new IntersectionObserver(R,{threshold:.5});return y.current&&T.observe(y.current),()=>{T.disconnect()}}},[i]),reactExports.useEffect(()=>{if(n){let R=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(R)}}},[n]);let S=()=>{s(!0)},w=()=>{s(!1),u(!1)};return t?i!=="intent"?[a,y,{}]:[a,y,{onFocus:composeEventHandlers(c,S),onBlur:composeEventHandlers(h,w),onMouseEnter:composeEventHandlers(f,S),onMouseLeave:composeEventHandlers(p,w),onTouchStart:composeEventHandlers(g,S)}]:[!1,y,{}]}function composeEventHandlers(i,e){return t=>{i&&i(t),t.defaultPrevented||e(t)}}function PrefetchPageLinks({page:i,...e}){let t=useIsRSCRouterContext(),{nonce:n}=useFrameworkContext(),{router:s}=useDataRouterContext2(),a=reactExports.useMemo(()=>matchRoutes(s.routes,i,s.basename),[s.routes,i,s.basename]);return a?(e.nonce==null&&n&&(e={...e,nonce:n}),t?reactExports.createElement(RSCPrefetchPageLinksImpl,{page:i,matches:a,...e}):reactExports.createElement(PrefetchPageLinksImpl,{page:i,matches:a,...e})):null}function useKeyedPrefetchLinks(i){let{manifest:e,routeModules:t}=useFrameworkContext(),[n,s]=reactExports.useState([]);return reactExports.useEffect(()=>{let a=!1;return getKeyedPrefetchLinks(i,e,t).then(u=>{a||s(u)}),()=>{a=!0}},[i,e,t]),n}function RSCPrefetchPageLinksImpl({page:i,matches:e,...t}){let n=useLocation(),{future:s}=useFrameworkContext(),{basename:a}=useDataRouterContext2(),u=reactExports.useMemo(()=>{if(i===n.pathname+n.search+n.hash)return[];let c=singleFetchUrl(i,a,s.v8_trailingSlashAwareDataRequests,"rsc"),h=!1,f=[];for(let p of e)typeof p.route.shouldRevalidate=="function"?h=!0:f.push(p.route.id);return h&&f.length>0&&c.searchParams.set("_routes",f.join(",")),[c.pathname+c.search]},[a,s.v8_trailingSlashAwareDataRequests,i,n,e]);return reactExports.createElement(reactExports.Fragment,null,u.map(c=>reactExports.createElement("link",{key:c,rel:"prefetch",as:"fetch",href:c,...t})))}function PrefetchPageLinksImpl({page:i,matches:e,...t}){let n=useLocation(),{future:s,manifest:a,routeModules:u}=useFrameworkContext(),{basename:c}=useDataRouterContext2(),{loaderData:h,matches:f}=useDataRouterStateContext(),p=reactExports.useMemo(()=>getNewMatchesForLinks(i,e,f,a,n,"data"),[i,e,f,a,n]),g=reactExports.useMemo(()=>getNewMatchesForLinks(i,e,f,a,n,"assets"),[i,e,f,a,n]),y=reactExports.useMemo(()=>{if(i===n.pathname+n.search+n.hash)return[];let R=new Set,T=!1;if(e.forEach(F=>{let x=a.routes[F.route.id];!x||!x.hasLoader||(!p.some(D=>D.route.id===F.route.id)&&F.route.id in h&&u[F.route.id]?.shouldRevalidate||x.hasClientLoader?T=!0:R.add(F.route.id))}),R.size===0)return[];let A=singleFetchUrl(i,c,s.v8_trailingSlashAwareDataRequests,"data");return T&&R.size>0&&A.searchParams.set("_routes",e.filter(F=>R.has(F.route.id)).map(F=>F.route.id).join(",")),[A.pathname+A.search]},[c,s.v8_trailingSlashAwareDataRequests,h,n,a,p,e,i,u]),S=reactExports.useMemo(()=>getModuleLinkHrefs(g,a),[g,a]),w=useKeyedPrefetchLinks(g);return reactExports.createElement(reactExports.Fragment,null,y.map(R=>reactExports.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...t})),S.map(R=>reactExports.createElement("link",{key:R,rel:"modulepreload",href:R,...t})),w.map(({key:R,link:T})=>reactExports.createElement("link",{key:R,nonce:t.nonce,...T,crossOrigin:T.crossOrigin??t.crossOrigin})))}function mergeRefs(...i){return e=>{i.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var isBrowser2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{isBrowser2&&(window.__reactRouterVersion="7.18.2")}catch{}function BrowserRouter({basename:i,children:e,useTransitions:t,window:n}){let s=reactExports.useRef();s.current==null&&(s.current=createBrowserHistory({window:n,v5Compat:!0}));let a=s.current,[u,c]=reactExports.useState({action:a.action,location:a.location}),h=reactExports.useCallback(f=>{t===!1?c(f):reactExports.startTransition(()=>c(f))},[t]);return reactExports.useLayoutEffect(()=>a.listen(h),[a,h]),reactExports.createElement(Router,{basename:i,children:e,location:u.location,navigationType:u.action,navigator:a,useTransitions:t})}var Link=reactExports.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:s,reloadDocument:a,replace:u,mask:c,state:h,target:f,to:p,preventScrollReset:g,viewTransition:y,defaultShouldRevalidate:S,...w},R){let{basename:T,navigator:A,useTransitions:F}=reactExports.useContext(NavigationContext),x=typeof p=="string"&&ABSOLUTE_URL_REGEX.test(p),D=parseToInfo(p,T);p=D.to;let O=useHref(p,{relative:s}),K=useLocation(),z=null;if(c){let ze=resolveTo(c,[],K.mask?K.mask.pathname:"/",!0);T!=="/"&&(ze.pathname=ze.pathname==="/"?T:joinPaths([T,ze.pathname])),z=A.createHref(ze)}let[X,Ee,q]=usePrefetchBehavior(n,w),Y=useLinkClickHandler(p,{replace:u,mask:c,state:h,target:f,preventScrollReset:g,relative:s,viewTransition:y,defaultShouldRevalidate:S,useTransitions:F});function Te(ze){e&&e(ze),ze.defaultPrevented||Y(ze)}let re=!(D.isExternal||a),$e=reactExports.createElement("a",{...w,...q,href:(re?z:void 0)||D.absoluteURL||O,onClick:re?Te:e,ref:mergeRefs(R,Ee),target:f,"data-discover":!x&&t==="render"?"true":void 0});return X&&!x?reactExports.createElement(reactExports.Fragment,null,$e,reactExports.createElement(PrefetchPageLinks,{page:O})):$e});Link.displayName="Link";var NavLink=reactExports.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:s=!1,style:a,to:u,viewTransition:c,children:h,...f},p){let g=useResolvedPath(u,{relative:f.relative}),y=useLocation(),S=reactExports.useContext(DataRouterStateContext),{navigator:w,basename:R}=reactExports.useContext(NavigationContext),T=S!=null&&useViewTransitionState(g)&&c===!0,A=w.encodeLocation?w.encodeLocation(g).pathname:g.pathname,F=y.pathname,x=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;t||(F=F.toLowerCase(),x=x?x.toLowerCase():null,A=A.toLowerCase()),x&&R&&(x=stripBasename(x,R)||x);const D=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let O=F===A||!s&&F.startsWith(A)&&F.charAt(D)==="/",K=x!=null&&(x===A||!s&&x.startsWith(A)&&x.charAt(A.length)==="/"),z={isActive:O,isPending:K,isTransitioning:T},X=O?e:void 0,Ee;typeof n=="function"?Ee=n(z):Ee=[n,O?"active":null,K?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let q=typeof a=="function"?a(z):a;return reactExports.createElement(Link,{...f,"aria-current":X,className:Ee,ref:p,style:q,to:u,viewTransition:c},typeof h=="function"?h(z):h)});NavLink.displayName="NavLink";var Form=reactExports.forwardRef(({discover:i="render",fetcherKey:e,navigate:t,reloadDocument:n,replace:s,state:a,method:u=defaultMethod,action:c,onSubmit:h,relative:f,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:y,...S},w)=>{let{useTransitions:R}=reactExports.useContext(NavigationContext),T=useSubmit(),A=useFormAction(c,{relative:f}),F=u.toLowerCase()==="get"?"get":"post",x=typeof c=="string"&&ABSOLUTE_URL_REGEX.test(c),D=O=>{if(h&&h(O),O.defaultPrevented)return;O.preventDefault();let K=O.nativeEvent.submitter,z=K?.getAttribute("formmethod")||u,X=()=>T(K||O.currentTarget,{fetcherKey:e,method:z,navigate:t,replace:s,state:a,relative:f,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:y});R&&t!==!1?reactExports.startTransition(()=>X()):X()};return reactExports.createElement("form",{ref:w,method:F,action:A,onSubmit:n?h:D,...S,"data-discover":!x&&i==="render"?"true":void 0})});Form.displayName="Form";function getDataRouterConsoleError2(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext3(i){let e=reactExports.useContext(DataRouterContext);return invariant(e,getDataRouterConsoleError2(i)),e}function useLinkClickHandler(i,{target:e,replace:t,mask:n,state:s,preventScrollReset:a,relative:u,viewTransition:c,defaultShouldRevalidate:h,useTransitions:f}={}){let p=useNavigate(),g=useLocation(),y=useResolvedPath(i,{relative:u});return reactExports.useCallback(S=>{if(shouldProcessLinkClick(S,e)){S.preventDefault();let w=t!==void 0?t:createPath(g)===createPath(y),R=()=>p(i,{replace:w,mask:n,state:s,preventScrollReset:a,relative:u,viewTransition:c,defaultShouldRevalidate:h});f?reactExports.startTransition(()=>R()):R()}},[g,p,y,t,n,s,e,i,a,u,c,h,f])}var fetcherId=0,getUniqueFetcherId=()=>`__${String(++fetcherId)}__`;function useSubmit(){let{router:i}=useDataRouterContext3("useSubmit"),{basename:e}=reactExports.useContext(NavigationContext),t=useRouteId(),n=i.fetch,s=i.navigate;return reactExports.useCallback(async(a,u={})=>{let{action:c,method:h,encType:f,formData:p,body:g}=getFormSubmissionInfo(a,e);if(u.navigate===!1){let y=u.fetcherKey||getUniqueFetcherId();await n(y,t,u.action||c,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:p,body:g,formMethod:u.method||h,formEncType:u.encType||f,flushSync:u.flushSync})}else await s(u.action||c,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:p,body:g,formMethod:u.method||h,formEncType:u.encType||f,replace:u.replace,state:u.state,fromRouteId:t,flushSync:u.flushSync,viewTransition:u.viewTransition})},[n,s,e,t])}function useFormAction(i,{relative:e}={}){let{basename:t}=reactExports.useContext(NavigationContext),n=reactExports.useContext(RouteContext);invariant(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),a={...useResolvedPath(i||".",{relative:e})},u=useLocation();if(i==null){a.search=u.search;let c=new URLSearchParams(a.search),h=c.getAll("index");if(h.some(p=>p==="")){c.delete("index"),h.filter(g=>g).forEach(g=>c.append("index",g));let p=c.toString();a.search=p?`?${p}`:""}}return(!i||i===".")&&s.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(a.pathname=a.pathname==="/"?t:joinPaths([t,a.pathname])),createPath(a)}function useViewTransitionState(i,{relative:e}={}){let t=reactExports.useContext(ViewTransitionContext);invariant(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=useDataRouterContext3("useViewTransitionState"),s=useResolvedPath(i,{relative:e});if(!t.isTransitioning)return!1;let a=stripBasename(t.currentLocation.pathname,n)||t.currentLocation.pathname,u=stripBasename(t.nextLocation.pathname,n)||t.nextLocation.pathname;return matchPath(s.pathname,u)!=null||matchPath(s.pathname,a)!=null}const scriptRel="modulepreload",assetsURL=function(i){return"/dashboard/"+i},seen={},__vitePreload=function(e,t,n){let s=Promise.resolve();if(t&&t.length>0){let h=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),c=u?.nonce||u?.getAttribute("nonce");s=h(t.map(f=>{if(f=assetsURL(f),f in seen)return;seen[f]=!0;const p=f.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":scriptRel,p||(y.as="script"),y.crossOrigin="",y.href=f,c&&y.setAttribute("nonce",c),document.head.appendChild(y),p)return new Promise((S,w)=>{y.addEventListener("load",S),y.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${f}`)))})}))}function a(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return s.then(u=>{for(const c of u||[])c.status==="rejected"&&a(c.reason);return e().catch(a)})};const mergeClasses=(...i)=>i.filter((e,t,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===t).join(" ").trim();const toKebabCase=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const toCamelCase=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());const toPascalCase=i=>{const e=toCamelCase(i);return e.charAt(0).toUpperCase()+e.slice(1)};var defaultAttributes={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const hasA11yProp=i=>{for(const e in i)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};const Icon=reactExports.forwardRef(({color:i="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:n,className:s="",children:a,iconNode:u,...c},h)=>reactExports.createElement("svg",{ref:h,...defaultAttributes,width:e,height:e,stroke:i,strokeWidth:n?Number(t)*24/Number(e):t,className:mergeClasses("lucide",s),...!a&&!hasA11yProp(c)&&{"aria-hidden":"true"},...c},[...u.map(([f,p])=>reactExports.createElement(f,p)),...Array.isArray(a)?a:[a]]));const createLucideIcon=(i,e)=>{const t=reactExports.forwardRef(({className:n,...s},a)=>reactExports.createElement(Icon,{ref:a,iconNode:e,className:mergeClasses(`lucide-${toKebabCase(toPascalCase(i))}`,`lucide-${i}`,n),...s}));return t.displayName=toPascalCase(i),t};const __iconNode$5=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Activity=createLucideIcon("activity",__iconNode$5);const __iconNode$4=[["path",{d:"M12 16v5",key:"zza2cw"}],["path",{d:"M16 14v7",key:"1g90b9"}],["path",{d:"M20 10v11",key:"1iqoj0"}],["path",{d:"m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15",key:"1fw8x9"}],["path",{d:"M4 18v3",key:"1yp0dc"}],["path",{d:"M8 14v7",key:"n3cwzv"}]],ChartNoAxesCombined=createLucideIcon("chart-no-axes-combined",__iconNode$4);const __iconNode$3=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Gauge=createLucideIcon("gauge",__iconNode$3);const __iconNode$2=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],Network=createLucideIcon("network",__iconNode$2);const __iconNode$1=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],ScrollText=createLucideIcon("scroll-text",__iconNode$1);const __iconNode=[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]],Waypoints=createLucideIcon("waypoints",__iconNode),dashboardNavigationItems=[{id:"overview",label:"Overview",path:"/overview",icon:Gauge},{id:"runtime",label:"Runtime",path:"/runtime",icon:Activity},{id:"logs",label:"Logs",path:"/logs",icon:ScrollText},{id:"rdf",label:"RDF",path:"/rdf",icon:Waypoints},{id:"network",label:"Network",path:"/network",icon:Network},{id:"usage",label:"Usage",path:"/usage",icon:ChartNoAxesCombined}];function r(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i)){var s=i.length;for(e=0;e<s;e++)i[e]&&(t=r(i[e]))&&(n&&(n+=" "),n+=t)}else for(t in i)i[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var i,e,t=0,n="",s=arguments.length;t<s;t++)(i=arguments[t])&&(e=r(i))&&(n&&(n+=" "),n+=e);return n}const falsyToString=i=>typeof i=="boolean"?`${i}`:i===0?"0":i,cx=clsx,cva=(i,e)=>t=>{var n;if(e?.variants==null)return cx(i,t?.class,t?.className);const{variants:s,defaultVariants:a}=e,u=Object.keys(s).map(f=>{const p=t?.[f],g=a?.[f];if(p===null)return null;const y=falsyToString(p)||falsyToString(g);return s[f][y]}),c=t&&Object.entries(t).reduce((f,p)=>{let[g,y]=p;return y===void 0||(f[g]=y),f},{}),h=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((f,p)=>{let{class:g,className:y,...S}=p;return Object.entries(S).every(w=>{let[R,T]=w;return Array.isArray(T)?T.includes({...a,...c}[R]):{...a,...c}[R]===T})?[...f,g,y]:f},[]);return cx(i,u,h,t?.class,t?.className)},concatArrays=(i,e)=>{const t=new Array(i.length+e.length);for(let n=0;n<i.length;n++)t[n]=i[n];for(let n=0;n<e.length;n++)t[i.length+n]=e[n];return t},createClassValidatorObject=(i,e)=>({classGroupId:i,validator:e}),createClassPartObject=(i=new Map,e=null,t)=>({nextPart:i,validators:e,classGroupId:t}),CLASS_PART_SEPARATOR="-",EMPTY_CONFLICTS=[],ARBITRARY_PROPERTY_PREFIX="arbitrary..",createClassGroupUtils=i=>{const e=createClassMap(i),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=i;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return getGroupIdForArbitraryProperty(u);const c=u.split(CLASS_PART_SEPARATOR),h=c[0]===""&&c.length>1?1:0;return getGroupRecursive(c,h,e)},getConflictingClassGroupIds:(u,c)=>{if(c){const h=n[u],f=t[u];return h?f?concatArrays(f,h):h:f||EMPTY_CONFLICTS}return t[u]||EMPTY_CONFLICTS}}},getGroupRecursive=(i,e,t)=>{if(i.length-e===0)return t.classGroupId;const s=i[e],a=t.nextPart.get(s);if(a){const f=getGroupRecursive(i,e+1,a);if(f)return f}const u=t.validators;if(u===null)return;const c=e===0?i.join(CLASS_PART_SEPARATOR):i.slice(e).join(CLASS_PART_SEPARATOR),h=u.length;for(let f=0;f<h;f++){const p=u[f];if(p.validator(c))return p.classGroupId}},getGroupIdForArbitraryProperty=i=>i.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=i.slice(1,-1),t=e.indexOf(":"),n=e.slice(0,t);return n?ARBITRARY_PROPERTY_PREFIX+n:void 0})(),createClassMap=i=>{const{theme:e,classGroups:t}=i;return processClassGroups(t,e)},processClassGroups=(i,e)=>{const t=createClassPartObject();for(const n in i){const s=i[n];processClassesRecursively(s,t,n,e)}return t},processClassesRecursively=(i,e,t,n)=>{const s=i.length;for(let a=0;a<s;a++){const u=i[a];processClassDefinition(u,e,t,n)}},processClassDefinition=(i,e,t,n)=>{if(typeof i=="string"){processStringDefinition(i,e,t);return}if(typeof i=="function"){processFunctionDefinition(i,e,t,n);return}processObjectDefinition(i,e,t,n)},processStringDefinition=(i,e,t)=>{const n=i===""?e:getPart(e,i);n.classGroupId=t},processFunctionDefinition=(i,e,t,n)=>{if(isThemeGetter(i)){processClassesRecursively(i(n),e,t,n);return}e.validators===null&&(e.validators=[]),e.validators.push(createClassValidatorObject(t,i))},processObjectDefinition=(i,e,t,n)=>{const s=Object.entries(i),a=s.length;for(let u=0;u<a;u++){const[c,h]=s[u];processClassesRecursively(h,getPart(e,c),t,n)}},getPart=(i,e)=>{let t=i;const n=e.split(CLASS_PART_SEPARATOR),s=n.length;for(let a=0;a<s;a++){const u=n[a];let c=t.nextPart.get(u);c||(c=createClassPartObject(),t.nextPart.set(u,c)),t=c}return t},isThemeGetter=i=>"isThemeGetter"in i&&i.isThemeGetter===!0,createLruCache=i=>{if(i<1)return{get:()=>{},set:()=>{}};let e=0,t=Object.create(null),n=Object.create(null);const s=(a,u)=>{t[a]=u,e++,e>i&&(e=0,n=t,t=Object.create(null))};return{get(a){let u=t[a];if(u!==void 0)return u;if((u=n[a])!==void 0)return s(a,u),u},set(a,u){a in t?t[a]=u:s(a,u)}}},IMPORTANT_MODIFIER="!",MODIFIER_SEPARATOR=":",EMPTY_MODIFIERS=[],createResultObject=(i,e,t,n,s)=>({modifiers:i,hasImportantModifier:e,baseClassName:t,maybePostfixModifierPosition:n,isExternal:s}),createParseClassName=i=>{const{prefix:e,experimentalParseClassName:t}=i;let n=s=>{const a=[];let u=0,c=0,h=0,f;const p=s.length;for(let R=0;R<p;R++){const T=s[R];if(u===0&&c===0){if(T===MODIFIER_SEPARATOR){a.push(s.slice(h,R)),h=R+1;continue}if(T==="/"){f=R;continue}}T==="["?u++:T==="]"?u--:T==="("?c++:T===")"&&c--}const g=a.length===0?s:s.slice(h);let y=g,S=!1;g.endsWith(IMPORTANT_MODIFIER)?(y=g.slice(0,-1),S=!0):g.startsWith(IMPORTANT_MODIFIER)&&(y=g.slice(1),S=!0);const w=f&&f>h?f-h:void 0;return createResultObject(a,S,y,w)};if(e){const s=e+MODIFIER_SEPARATOR,a=n;n=u=>u.startsWith(s)?a(u.slice(s.length)):createResultObject(EMPTY_MODIFIERS,!1,u,void 0,!0)}if(t){const s=n;n=a=>t({className:a,parseClassName:s})}return n},createSortModifiers=i=>{const e=new Map;return i.orderSensitiveModifiers.forEach((t,n)=>{e.set(t,1e6+n)}),t=>{const n=[];let s=[];for(let a=0;a<t.length;a++){const u=t[a],c=u[0]==="[",h=e.has(u);c||h?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(u)):s.push(u)}return s.length>0&&(s.sort(),n.push(...s)),n}},createConfigUtils=i=>({cache:createLruCache(i.cacheSize),parseClassName:createParseClassName(i),sortModifiers:createSortModifiers(i),postfixLookupClassGroupIds:createPostfixLookupClassGroupIds(i),...createClassGroupUtils(i)}),createPostfixLookupClassGroupIds=i=>{const e=Object.create(null),t=i.postfixLookupClassGroups;if(t)for(let n=0;n<t.length;n++)e[t[n]]=!0;return e},SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(i,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:a,postfixLookupClassGroupIds:u}=e,c=[],h=i.trim().split(SPLIT_CLASSES_REGEX);let f="";for(let p=h.length-1;p>=0;p-=1){const g=h[p],{isExternal:y,modifiers:S,hasImportantModifier:w,baseClassName:R,maybePostfixModifierPosition:T}=t(g);if(y){f=g+(f.length>0?" "+f:f);continue}let A=!!T,F;if(A){const z=R.substring(0,T);F=n(z);const X=F&&u[F]?n(R):void 0;X&&X!==F&&(F=X,A=!1)}else F=n(R);if(!F){if(!A){f=g+(f.length>0?" "+f:f);continue}if(F=n(R),!F){f=g+(f.length>0?" "+f:f);continue}A=!1}const x=S.length===0?"":S.length===1?S[0]:a(S).join(":"),D=w?x+IMPORTANT_MODIFIER:x,O=D+F;if(c.indexOf(O)>-1)continue;c.push(O);const K=s(F,A);for(let z=0;z<K.length;++z){const X=K[z];c.push(D+X)}f=g+(f.length>0?" "+f:f)}return f},twJoin=(...i)=>{let e=0,t,n,s="";for(;e<i.length;)(t=i[e++])&&(n=toValue(t))&&(s&&(s+=" "),s+=n);return s},toValue=i=>{if(typeof i=="string")return i;let e,t="";for(let n=0;n<i.length;n++)i[n]&&(e=toValue(i[n]))&&(t&&(t+=" "),t+=e);return t},createTailwindMerge=(i,...e)=>{let t,n,s,a;const u=h=>{const f=e.reduce((p,g)=>g(p),i());return t=createConfigUtils(f),n=t.cache.get,s=t.cache.set,a=c,c(h)},c=h=>{const f=n(h);if(f)return f;const p=mergeClassList(h,t);return s(h,p),p};return a=u,(...h)=>a(twJoin(...h))},fallbackThemeArr=[],fromTheme=i=>{const e=t=>t[i]||fallbackThemeArr;return e.isThemeGetter=!0,e},arbitraryValueRegex=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,arbitraryVariableRegex=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fractionRegex=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isFraction=i=>fractionRegex.test(i),isNumber=i=>!!i&&!Number.isNaN(Number(i)),isInteger=i=>!!i&&Number.isInteger(Number(i)),isPercent=i=>i.endsWith("%")&&isNumber(i.slice(0,-1)),isTshirtSize=i=>tshirtUnitRegex.test(i),isAny=()=>!0,isLengthOnly=i=>lengthUnitRegex.test(i)&&!colorFunctionRegex.test(i),isNever=()=>!1,isShadow=i=>shadowRegex.test(i),isImage=i=>imageRegex.test(i),isAnyNonArbitrary=i=>!isArbitraryValue(i)&&!isArbitraryVariable(i),isNamedContainerQuery=i=>i.startsWith("@container")&&(i[10]==="/"&&i[11]!==void 0||i[11]==="s"&&i[16]!==void 0&&i.startsWith("-size/",10)||i[11]==="n"&&i[18]!==void 0&&i.startsWith("-normal/",10)),isArbitrarySize=i=>getIsArbitraryValue(i,isLabelSize,isNever),isArbitraryValue=i=>arbitraryValueRegex.test(i),isArbitraryLength=i=>getIsArbitraryValue(i,isLabelLength,isLengthOnly),isArbitraryNumber=i=>getIsArbitraryValue(i,isLabelNumber,isNumber),isArbitraryWeight=i=>getIsArbitraryValue(i,isLabelWeight,isAny),isArbitraryFamilyName=i=>getIsArbitraryValue(i,isLabelFamilyName,isNever),isArbitraryPosition=i=>getIsArbitraryValue(i,isLabelPosition,isNever),isArbitraryImage=i=>getIsArbitraryValue(i,isLabelImage,isImage),isArbitraryShadow=i=>getIsArbitraryValue(i,isLabelShadow,isShadow),isArbitraryVariable=i=>arbitraryVariableRegex.test(i),isArbitraryVariableLength=i=>getIsArbitraryVariable(i,isLabelLength),isArbitraryVariableFamilyName=i=>getIsArbitraryVariable(i,isLabelFamilyName),isArbitraryVariablePosition=i=>getIsArbitraryVariable(i,isLabelPosition),isArbitraryVariableSize=i=>getIsArbitraryVariable(i,isLabelSize),isArbitraryVariableImage=i=>getIsArbitraryVariable(i,isLabelImage),isArbitraryVariableShadow=i=>getIsArbitraryVariable(i,isLabelShadow,!0),isArbitraryVariableWeight=i=>getIsArbitraryVariable(i,isLabelWeight,!0),getIsArbitraryValue=(i,e,t)=>{const n=arbitraryValueRegex.exec(i);return n?n[1]?e(n[1]):t(n[2]):!1},getIsArbitraryVariable=(i,e,t=!1)=>{const n=arbitraryVariableRegex.exec(i);return n?n[1]?e(n[1]):t:!1},isLabelPosition=i=>i==="position"||i==="percentage",isLabelImage=i=>i==="image"||i==="url",isLabelSize=i=>i==="length"||i==="size"||i==="bg-size",isLabelLength=i=>i==="length",isLabelNumber=i=>i==="number",isLabelFamilyName=i=>i==="family-name",isLabelWeight=i=>i==="number"||i==="weight",isLabelShadow=i=>i==="shadow",getDefaultConfig=()=>{const i=fromTheme("color"),e=fromTheme("font"),t=fromTheme("text"),n=fromTheme("font-weight"),s=fromTheme("tracking"),a=fromTheme("leading"),u=fromTheme("breakpoint"),c=fromTheme("container"),h=fromTheme("spacing"),f=fromTheme("radius"),p=fromTheme("shadow"),g=fromTheme("inset-shadow"),y=fromTheme("text-shadow"),S=fromTheme("drop-shadow"),w=fromTheme("blur"),R=fromTheme("perspective"),T=fromTheme("aspect"),A=fromTheme("ease"),F=fromTheme("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...D(),isArbitraryVariable,isArbitraryValue],K=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],X=()=>[isArbitraryVariable,isArbitraryValue,h],Ee=()=>[isFraction,"full","auto",...X()],q=()=>[isInteger,"none","subgrid",isArbitraryVariable,isArbitraryValue],Y=()=>["auto",{span:["full",isInteger,isArbitraryVariable,isArbitraryValue]},isInteger,isArbitraryVariable,isArbitraryValue],Te=()=>[isInteger,"auto",isArbitraryVariable,isArbitraryValue],re=()=>["auto","min","max","fr",isArbitraryVariable,isArbitraryValue],$e=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ze=()=>["start","end","center","stretch","center-safe","end-safe"],ye=()=>["auto",...X()],Ve=()=>[isFraction,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...X()],pe=()=>[isFraction,"screen","full","dvw","lvw","svw","min","max","fit",...X()],De=()=>[isFraction,"screen","full","lh","dvh","lvh","svh","min","max","fit",...X()],$=()=>[i,isArbitraryVariable,isArbitraryValue],G=()=>[...D(),isArbitraryVariablePosition,isArbitraryPosition,{position:[isArbitraryVariable,isArbitraryValue]}],ce=()=>["no-repeat",{repeat:["","x","y","space","round"]}],oe=()=>["auto","cover","contain",isArbitraryVariableSize,isArbitrarySize,{size:[isArbitraryVariable,isArbitraryValue]}],Fe=()=>[isPercent,isArbitraryVariableLength,isArbitraryLength],Ue=()=>["","none","full",f,isArbitraryVariable,isArbitraryValue],Je=()=>["",isNumber,isArbitraryVariableLength,isArbitraryLength],He=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[isNumber,isPercent,isArbitraryVariablePosition,isArbitraryPosition],Oe=()=>["","none",w,isArbitraryVariable,isArbitraryValue],ie=()=>["none",isNumber,isArbitraryVariable,isArbitraryValue],j=()=>["none",isNumber,isArbitraryVariable,isArbitraryValue],N=()=>[isNumber,isArbitraryVariable,isArbitraryValue],L=()=>[isFraction,"full",...X()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[isTshirtSize],breakpoint:[isTshirtSize],color:[isAny],container:[isTshirtSize],"drop-shadow":[isTshirtSize],ease:["in","out","in-out"],font:[isAnyNonArbitrary],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[isTshirtSize],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[isTshirtSize],shadow:[isTshirtSize],spacing:["px",isNumber],text:[isTshirtSize],"text-shadow":[isTshirtSize],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",isFraction,isArbitraryValue,isArbitraryVariable,T]}],container:["container"],"container-type":[{"@container":["","normal","size",isArbitraryVariable,isArbitraryValue]}],"container-named":[isNamedContainerQuery],columns:[{columns:[isNumber,isArbitraryValue,isArbitraryVariable,c]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Ee()}],"inset-x":[{"inset-x":Ee()}],"inset-y":[{"inset-y":Ee()}],start:[{"inset-s":Ee(),start:Ee()}],end:[{"inset-e":Ee(),end:Ee()}],"inset-bs":[{"inset-bs":Ee()}],"inset-be":[{"inset-be":Ee()}],top:[{top:Ee()}],right:[{right:Ee()}],bottom:[{bottom:Ee()}],left:[{left:Ee()}],visibility:["visible","invisible","collapse"],z:[{z:[isInteger,"auto",isArbitraryVariable,isArbitraryValue]}],basis:[{basis:[isFraction,"full","auto",c,...X()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[isNumber,isFraction,"auto","initial","none",isArbitraryValue]}],grow:[{grow:["",isNumber,isArbitraryVariable,isArbitraryValue]}],shrink:[{shrink:["",isNumber,isArbitraryVariable,isArbitraryValue]}],order:[{order:[isInteger,"first","last","none",isArbitraryVariable,isArbitraryValue]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:X()}],"gap-x":[{"gap-x":X()}],"gap-y":[{"gap-y":X()}],"justify-content":[{justify:[...$e(),"normal"]}],"justify-items":[{"justify-items":[...ze(),"normal"]}],"justify-self":[{"justify-self":["auto",...ze()]}],"align-content":[{content:["normal",...$e()]}],"align-items":[{items:[...ze(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ze(),{baseline:["","last"]}]}],"place-content":[{"place-content":$e()}],"place-items":[{"place-items":[...ze(),"baseline"]}],"place-self":[{"place-self":["auto",...ze()]}],p:[{p:X()}],px:[{px:X()}],py:[{py:X()}],ps:[{ps:X()}],pe:[{pe:X()}],pbs:[{pbs:X()}],pbe:[{pbe:X()}],pt:[{pt:X()}],pr:[{pr:X()}],pb:[{pb:X()}],pl:[{pl:X()}],m:[{m:ye()}],mx:[{mx:ye()}],my:[{my:ye()}],ms:[{ms:ye()}],me:[{me:ye()}],mbs:[{mbs:ye()}],mbe:[{mbe:ye()}],mt:[{mt:ye()}],mr:[{mr:ye()}],mb:[{mb:ye()}],ml:[{ml:ye()}],"space-x":[{"space-x":X()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":X()}],"space-y-reverse":["space-y-reverse"],size:[{size:Ve()}],"inline-size":[{inline:["auto",...pe()]}],"min-inline-size":[{"min-inline":["auto",...pe()]}],"max-inline-size":[{"max-inline":["none",...pe()]}],"block-size":[{block:["auto",...De()]}],"min-block-size":[{"min-block":["auto",...De()]}],"max-block-size":[{"max-block":["none",...De()]}],w:[{w:[c,"screen",...Ve()]}],"min-w":[{"min-w":[c,"screen","none",...Ve()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[u]},...Ve()]}],h:[{h:["screen","lh",...Ve()]}],"min-h":[{"min-h":["screen","lh","none",...Ve()]}],"max-h":[{"max-h":["screen","lh",...Ve()]}],"font-size":[{text:["base",t,isArbitraryVariableLength,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,isArbitraryVariableWeight,isArbitraryWeight]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",isPercent,isArbitraryValue]}],"font-family":[{font:[isArbitraryVariableFamilyName,isArbitraryFamilyName,e]}],"font-features":[{"font-features":[isArbitraryValue]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,isArbitraryVariable,isArbitraryValue]}],"line-clamp":[{"line-clamp":[isNumber,"none",isArbitraryVariable,isArbitraryNumber]}],leading:[{leading:[a,...X()]}],"list-image":[{"list-image":["none",isArbitraryVariable,isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",isArbitraryVariable,isArbitraryValue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...He(),"wavy"]}],"text-decoration-thickness":[{decoration:[isNumber,"from-font","auto",isArbitraryVariable,isArbitraryLength]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[isNumber,"auto",isArbitraryVariable,isArbitraryValue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:X()}],"tab-size":[{tab:[isInteger,isArbitraryVariable,isArbitraryValue]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryVariable,isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryVariable,isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:oe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},isInteger,isArbitraryVariable,isArbitraryValue],radial:["",isArbitraryVariable,isArbitraryValue],conic:[isInteger,isArbitraryVariable,isArbitraryValue]},isArbitraryVariableImage,isArbitraryImage]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:Fe()}],"gradient-via-pos":[{via:Fe()}],"gradient-to-pos":[{to:Fe()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:Ue()}],"rounded-s":[{"rounded-s":Ue()}],"rounded-e":[{"rounded-e":Ue()}],"rounded-t":[{"rounded-t":Ue()}],"rounded-r":[{"rounded-r":Ue()}],"rounded-b":[{"rounded-b":Ue()}],"rounded-l":[{"rounded-l":Ue()}],"rounded-ss":[{"rounded-ss":Ue()}],"rounded-se":[{"rounded-se":Ue()}],"rounded-ee":[{"rounded-ee":Ue()}],"rounded-es":[{"rounded-es":Ue()}],"rounded-tl":[{"rounded-tl":Ue()}],"rounded-tr":[{"rounded-tr":Ue()}],"rounded-br":[{"rounded-br":Ue()}],"rounded-bl":[{"rounded-bl":Ue()}],"border-w":[{border:Je()}],"border-w-x":[{"border-x":Je()}],"border-w-y":[{"border-y":Je()}],"border-w-s":[{"border-s":Je()}],"border-w-e":[{"border-e":Je()}],"border-w-bs":[{"border-bs":Je()}],"border-w-be":[{"border-be":Je()}],"border-w-t":[{"border-t":Je()}],"border-w-r":[{"border-r":Je()}],"border-w-b":[{"border-b":Je()}],"border-w-l":[{"border-l":Je()}],"divide-x":[{"divide-x":Je()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Je()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...He(),"hidden","none"]}],"divide-style":[{divide:[...He(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...He(),"none","hidden"]}],"outline-offset":[{"outline-offset":[isNumber,isArbitraryVariable,isArbitraryValue]}],"outline-w":[{outline:["",isNumber,isArbitraryVariableLength,isArbitraryLength]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",p,isArbitraryVariableShadow,isArbitraryShadow]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",g,isArbitraryVariableShadow,isArbitraryShadow]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:Je()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[isNumber,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":Je()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",y,isArbitraryVariableShadow,isArbitraryShadow]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[isNumber,isArbitraryVariable,isArbitraryValue]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[isNumber]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[isArbitraryVariable,isArbitraryValue]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[isNumber]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:oe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",isArbitraryVariable,isArbitraryValue]}],filter:[{filter:["","none",isArbitraryVariable,isArbitraryValue]}],blur:[{blur:Oe()}],brightness:[{brightness:[isNumber,isArbitraryVariable,isArbitraryValue]}],contrast:[{contrast:[isNumber,isArbitraryVariable,isArbitraryValue]}],"drop-shadow":[{"drop-shadow":["","none",S,isArbitraryVariableShadow,isArbitraryShadow]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",isNumber,isArbitraryVariable,isArbitraryValue]}],"hue-rotate":[{"hue-rotate":[isNumber,isArbitraryVariable,isArbitraryValue]}],invert:[{invert:["",isNumber,isArbitraryVariable,isArbitraryValue]}],saturate:[{saturate:[isNumber,isArbitraryVariable,isArbitraryValue]}],sepia:[{sepia:["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-filter":[{"backdrop-filter":["","none",isArbitraryVariable,isArbitraryValue]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-contrast":[{"backdrop-contrast":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-invert":[{"backdrop-invert":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-opacity":[{"backdrop-opacity":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-saturate":[{"backdrop-saturate":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-sepia":[{"backdrop-sepia":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":X()}],"border-spacing-x":[{"border-spacing-x":X()}],"border-spacing-y":[{"border-spacing-y":X()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",isArbitraryVariable,isArbitraryValue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[isNumber,"initial",isArbitraryVariable,isArbitraryValue]}],ease:[{ease:["linear","initial",A,isArbitraryVariable,isArbitraryValue]}],delay:[{delay:[isNumber,isArbitraryVariable,isArbitraryValue]}],animate:[{animate:["none",F,isArbitraryVariable,isArbitraryValue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,isArbitraryVariable,isArbitraryValue]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:j()}],"scale-x":[{"scale-x":j()}],"scale-y":[{"scale-y":j()}],"scale-z":[{"scale-z":j()}],"scale-3d":["scale-3d"],skew:[{skew:N()}],"skew-x":[{"skew-x":N()}],"skew-y":[{"skew-y":N()}],transform:[{transform:[isArbitraryVariable,isArbitraryValue,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:L()}],"translate-x":[{"translate-x":L()}],"translate-y":[{"translate-y":L()}],"translate-z":[{"translate-z":L()}],"translate-none":["translate-none"],zoom:[{zoom:[isInteger,isArbitraryVariable,isArbitraryValue]}],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryVariable,isArbitraryValue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":$()}],"scrollbar-track-color":[{"scrollbar-track":$()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":X()}],"scroll-mx":[{"scroll-mx":X()}],"scroll-my":[{"scroll-my":X()}],"scroll-ms":[{"scroll-ms":X()}],"scroll-me":[{"scroll-me":X()}],"scroll-mbs":[{"scroll-mbs":X()}],"scroll-mbe":[{"scroll-mbe":X()}],"scroll-mt":[{"scroll-mt":X()}],"scroll-mr":[{"scroll-mr":X()}],"scroll-mb":[{"scroll-mb":X()}],"scroll-ml":[{"scroll-ml":X()}],"scroll-p":[{"scroll-p":X()}],"scroll-px":[{"scroll-px":X()}],"scroll-py":[{"scroll-py":X()}],"scroll-ps":[{"scroll-ps":X()}],"scroll-pe":[{"scroll-pe":X()}],"scroll-pbs":[{"scroll-pbs":X()}],"scroll-pbe":[{"scroll-pbe":X()}],"scroll-pt":[{"scroll-pt":X()}],"scroll-pr":[{"scroll-pr":X()}],"scroll-pb":[{"scroll-pb":X()}],"scroll-pl":[{"scroll-pl":X()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryVariable,isArbitraryValue]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[isNumber,isArbitraryVariableLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},twMerge=createTailwindMerge(getDefaultConfig);function cn(...i){return twMerge(clsx(i))}var __defProp$1=Object.defineProperty,__name$1=(i,e)=>__defProp$1(i,"name",{value:e,configurable:!0});function setRef(i,e){if(typeof i=="function")return i(e);i!=null&&(i.current=e)}__name$1(setRef,"setRef");function composeRefs(...i){return e=>{let t=!1;const n=i.map(s=>{const a=setRef(s,e);return!t&&typeof a=="function"&&(t=!0),a});if(t)return()=>{for(let s=0;s<n.length;s++){const a=n[s];typeof a=="function"?a():setRef(i[s],null)}}}}__name$1(composeRefs,"composeRefs");function useComposedRefs(...i){return reactExports.useCallback(composeRefs(...i),i)}__name$1(useComposedRefs,"useComposedRefs");var __defProp=Object.defineProperty,__name=(i,e)=>__defProp(i,"name",{value:e,configurable:!0});function createSlot(i){const e=reactExports.forwardRef((t,n)=>{let{children:s,...a}=t,u=null,c=!1;const h=[];isLazyComponent(s)&&typeof use=="function"&&(s=use(s._payload)),reactExports.Children.forEach(s,y=>{if(isSlottable(y)){c=!0;const S=y;let w="child"in S.props?S.props.child:S.props.children;isLazyComponent(w)&&typeof use=="function"&&(w=use(w._payload)),u=getSlottableElementFromSlottable(S,w),h.push(u?.props?.children)}else h.push(y)}),u?u=reactExports.cloneElement(u,void 0,h):!c&&reactExports.Children.count(s)===1&&reactExports.isValidElement(s)&&(u=s);const f=u?getElementRef(u):void 0,p=useComposedRefs(n,f);if(!u){if(s||s===0)throw new Error(c?createSlottableError(i):createSlotError(i));return s}const g=mergeProps(a,u.props??{});return u.type!==reactExports.Fragment&&(g.ref=n?p:f),reactExports.cloneElement(u,g)});return e.displayName=`${i}.Slot`,e}__name(createSlot,"createSlot");var Slot=createSlot("Slot"),SLOTTABLE_IDENTIFIER=Symbol.for("radix.slottable");function createSlottable(i){const e=__name(t=>"child"in t?t.children(t.child):t.children,"Slottable");return e.displayName=`${i}.Slottable`,e.__radixId=SLOTTABLE_IDENTIFIER,e}__name(createSlottable,"createSlottable");var getSlottableElementFromSlottable=__name((i,e)=>{if("child"in i.props){const t=i.props.child;return reactExports.isValidElement(t)?reactExports.cloneElement(t,void 0,i.props.children(t.props.children)):null}return reactExports.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function mergeProps(i,e){const t={...e};for(const n in e){const s=i[n],a=e[n];/^on[A-Z]/.test(n)?s&&a?t[n]=(...c)=>{const h=a(...c);return s(...c),h}:s&&(t[n]=s):n==="style"?t[n]={...s,...a}:n==="className"&&(t[n]=[s,a].filter(Boolean).join(" "))}return{...i,...t}}__name(mergeProps,"mergeProps");function getElementRef(i){let e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?i.ref:(e=Object.getOwnPropertyDescriptor(i,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?i.props.ref:i.props.ref||i.ref)}__name(getElementRef,"getElementRef");function isSlottable(i){return reactExports.isValidElement(i)&&typeof i.type=="function"&&"__radixId"in i.type&&i.type.__radixId===SLOTTABLE_IDENTIFIER}__name(isSlottable,"isSlottable");var REACT_LAZY_TYPE=Symbol.for("react.lazy");function isLazyComponent(i){return i!=null&&typeof i=="object"&&"$$typeof"in i&&i.$$typeof===REACT_LAZY_TYPE&&"_payload"in i&&isPromiseLike(i._payload)}__name(isLazyComponent,"isLazyComponent");function isPromiseLike(i){return typeof i=="object"&&i!==null&&"then"in i}__name(isPromiseLike,"isPromiseLike");var createSlotError=__name(i=>`${i} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),createSlottableError=__name(i=>`${i} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),use=React[" use ".trim().toString()];const buttonVariants=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",subtle:"bg-muted text-muted-foreground hover:bg-muted/80"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Button=reactExports.forwardRef(({className:i,variant:e,size:t,asChild:n=!1,...s},a)=>{const u=n?Slot:"button";return jsxRuntimeExports.jsx(u,{className:cn(buttonVariants({variant:e,size:t,className:i})),ref:a,...s})});Button.displayName="Button";const Input=reactExports.forwardRef(({className:i,type:e="text",...t},n)=>jsxRuntimeExports.jsx("input",{ref:n,type:e,className:cn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",i),...t}));Input.displayName="Input";const appLayoutGridStyle={gridTemplateColumns:"60px minmax(0, 1fr)"};function AppLayout({navigation:i,children:e,className:t}){return jsxRuntimeExports.jsxs("section",{className:cn("grid h-screen min-h-0 bg-background",t),style:appLayoutGridStyle,"data-app-layout":"workspace",children:[jsxRuntimeExports.jsx("aside",{className:"min-h-0 overflow-hidden border-r border-border/50 bg-layout-sidebar",children:i}),jsxRuntimeExports.jsx("div",{className:"min-h-0 min-w-0 overflow-hidden bg-layout-content",children:e})]})}const defaultLoginTitle="Connect Solid Pod",safeLoginErrorMessage="登录失败,请重试。";function normalizeLoginError(){return safeLoginErrorMessage}function AuthSurface({children:i,labelledBy:e}){return jsxRuntimeExports.jsx("section",{className:"flex min-h-screen items-center justify-center bg-background px-6 py-10 text-foreground","aria-labelledby":e,"data-auth-boundary":"surface",children:jsxRuntimeExports.jsx("div",{className:"w-full max-w-md rounded-lg border border-border bg-layout-content px-8 py-7 shadow-sm",children:i})})}function LoginView({title:i,description:e,defaultIssuer:t="",logo:n,error:s,onLogin:a}){const u=reactExports.useId(),c=reactExports.useId(),h=reactExports.useId(),[f,p]=reactExports.useState(t),[g,y]=reactExports.useState(!1),[S,w]=reactExports.useState(),R=f.trim(),T=S??s,A=reactExports.useMemo(()=>T?h:void 0,[h,T]);async function F(x){if(x.preventDefault(),!(!R||g)){y(!0),w(void 0);try{await a(R)}catch{w(normalizeLoginError())}finally{y(!1)}}}return jsxRuntimeExports.jsx(AuthSurface,{labelledBy:u,children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-6",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3 text-center",children:[n?jsxRuntimeExports.jsx("div",{className:"flex justify-center","aria-hidden":"true",children:n}):null,jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2",children:[jsxRuntimeExports.jsx("h1",{id:u,className:"text-2xl font-semibold leading-8 tracking-normal",children:i}),e?jsxRuntimeExports.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:e}):null]})]}),jsxRuntimeExports.jsxs("form",{className:"flex flex-col gap-4",onSubmit:x=>{F(x)},children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2 text-left",children:[jsxRuntimeExports.jsx("label",{className:"text-sm font-medium leading-5 text-foreground",htmlFor:c,children:"Solid issuer"}),jsxRuntimeExports.jsx(Input,{id:c,value:f,disabled:g,"aria-describedby":A,placeholder:"https://solidcommunity.net",onChange:x=>p(x.currentTarget.value)})]}),T?jsxRuntimeExports.jsx("p",{id:h,className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm leading-5 text-destructive",role:"alert",children:T}):null,jsxRuntimeExports.jsx(Button,{type:"submit",className:"w-full",disabled:!R||g,children:g?"登录中...":"登录"})]})]})})}function AuthBoundary({state:i,login:e,children:t,loginView:n}){return i.status==="authenticated"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:t}):i.status==="loading"?jsxRuntimeExports.jsx(AuthSurface,{children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-3 text-center text-sm leading-6 text-muted-foreground",role:"status","aria-label":"认证状态",children:[jsxRuntimeExports.jsx("span",{className:"h-8 w-8 rounded-full border-2 border-border border-t-primary","aria-hidden":"true"}),jsxRuntimeExports.jsx("span",{children:"正在检查登录状态"})]})}):jsxRuntimeExports.jsx(LoginView,{title:n?.title??defaultLoginTitle,description:n?.description,defaultIssuer:n?.defaultIssuer,logo:n?.logo,error:i.status==="error"?i.message:void 0,onLogin:e})}function ProductNavLinks({items:i,label:e}){return jsxRuntimeExports.jsx("nav",{"aria-label":e,className:"flex flex-1 flex-col items-center gap-4 py-4",children:i.map(t=>{const n=t.icon;return jsxRuntimeExports.jsxs(NavLink,{to:t.path,"aria-label":t.label,title:t.label,className:({isActive:s})=>clsx("flex h-9 w-9 items-center justify-center rounded-md transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s?"text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[jsxRuntimeExports.jsx(n,{className:"h-6 w-6","aria-hidden":"true"}),jsxRuntimeExports.jsx("span",{className:"sr-only",children:t.label})]},t.id)})})}function XpodProductLayout({product:i,items:e,switchHref:t}){const n=i==="dashboard"?"Open Settings":"Open Dashboard";return jsxRuntimeExports.jsx(AppLayout,{className:`xpod-${i}-shell`,navigation:jsxRuntimeExports.jsxs("div",{className:"flex min-h-full flex-col items-center",children:[jsxRuntimeExports.jsx("div",{className:"flex shrink-0 flex-col items-center pt-12",children:jsxRuntimeExports.jsx("a",{"aria-label":n,className:"flex h-9 w-9 items-center justify-center rounded-md bg-primary text-sm font-semibold text-primary-foreground shadow-sm",href:t,title:n,children:"X"})}),jsxRuntimeExports.jsx(ProductNavLinks,{items:e,label:`Primary ${i} sections`})]}),children:jsxRuntimeExports.jsx("div",{className:"min-h-full bg-background",children:jsxRuntimeExports.jsx(Outlet,{})})})}function XpodDashboardLayout(){return jsxRuntimeExports.jsx(XpodProductLayout,{product:"dashboard",items:dashboardNavigationItems,switchHref:"/settings/models"})}const crypto$1=crypto,isCryptoKey=i=>i instanceof CryptoKey,encoder=new TextEncoder,decoder=new TextDecoder;function concat(...i){const e=i.reduce((s,{length:a})=>s+a,0),t=new Uint8Array(e);let n=0;for(const s of i)t.set(s,n),n+=s.length;return t}const encodeBase64=i=>{let e=i;typeof e=="string"&&(e=encoder.encode(e));const t=32768,n=[];for(let s=0;s<e.length;s+=t)n.push(String.fromCharCode.apply(null,e.subarray(s,s+t)));return btoa(n.join(""))},encode$1=i=>encodeBase64(i).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),decodeBase64=i=>{const e=atob(i),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t},decode$1=i=>{let e=i;e instanceof Uint8Array&&(e=decoder.decode(e)),e=e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return decodeBase64(e)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class JOSEError extends Error{constructor(e,t){super(e,t),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}JOSEError.code="ERR_JOSE_GENERIC";class JWTClaimValidationFailed extends JOSEError{constructor(e,t,n="unspecified",s="unspecified"){super(e,{cause:{claim:n,reason:s,payload:t}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=n,this.reason=s,this.payload=t}}JWTClaimValidationFailed.code="ERR_JWT_CLAIM_VALIDATION_FAILED";class JWTExpired extends JOSEError{constructor(e,t,n="unspecified",s="unspecified"){super(e,{cause:{claim:n,reason:s,payload:t}}),this.code="ERR_JWT_EXPIRED",this.claim=n,this.reason=s,this.payload=t}}JWTExpired.code="ERR_JWT_EXPIRED";class JOSEAlgNotAllowed extends JOSEError{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}}JOSEAlgNotAllowed.code="ERR_JOSE_ALG_NOT_ALLOWED";class JOSENotSupported extends JOSEError{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}}JOSENotSupported.code="ERR_JOSE_NOT_SUPPORTED";class JWEDecryptionFailed extends JOSEError{constructor(e="decryption operation failed",t){super(e,t),this.code="ERR_JWE_DECRYPTION_FAILED"}}JWEDecryptionFailed.code="ERR_JWE_DECRYPTION_FAILED";class JWEInvalid extends JOSEError{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}}JWEInvalid.code="ERR_JWE_INVALID";class JWSInvalid extends JOSEError{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}}JWSInvalid.code="ERR_JWS_INVALID";class JWTInvalid extends JOSEError{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}}JWTInvalid.code="ERR_JWT_INVALID";class JWKInvalid extends JOSEError{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}}JWKInvalid.code="ERR_JWK_INVALID";class JWKSInvalid extends JOSEError{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}}JWKSInvalid.code="ERR_JWKS_INVALID";class JWKSNoMatchingKey extends JOSEError{constructor(e="no applicable key found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_NO_MATCHING_KEY"}}JWKSNoMatchingKey.code="ERR_JWKS_NO_MATCHING_KEY";class JWKSMultipleMatchingKeys extends JOSEError{constructor(e="multiple matching keys found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}JWKSMultipleMatchingKeys.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";class JWKSTimeout extends JOSEError{constructor(e="request timed out",t){super(e,t),this.code="ERR_JWKS_TIMEOUT"}}JWKSTimeout.code="ERR_JWKS_TIMEOUT";class JWSSignatureVerificationFailed extends JOSEError{constructor(e="signature verification failed",t){super(e,t),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}JWSSignatureVerificationFailed.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";function unusable(i,e="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${e} must be ${i}`)}function isAlgorithm(i,e){return i.name===e}function getHashLength(i){return parseInt(i.name.slice(4),10)}function getNamedCurve(i){switch(i){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function checkUsage(i,e){if(e.length&&!e.some(t=>i.usages.includes(t))){let t="CryptoKey does not support this operation, its usages must include ";if(e.length>2){const n=e.pop();t+=`one of ${e.join(", ")}, or ${n}.`}else e.length===2?t+=`one of ${e[0]} or ${e[1]}.`:t+=`${e[0]}.`;throw new TypeError(t)}}function checkSigCryptoKey(i,e,...t){switch(e){case"HS256":case"HS384":case"HS512":{if(!isAlgorithm(i.algorithm,"HMAC"))throw unusable("HMAC");const n=parseInt(e.slice(2),10);if(getHashLength(i.algorithm.hash)!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!isAlgorithm(i.algorithm,"RSASSA-PKCS1-v1_5"))throw unusable("RSASSA-PKCS1-v1_5");const n=parseInt(e.slice(2),10);if(getHashLength(i.algorithm.hash)!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!isAlgorithm(i.algorithm,"RSA-PSS"))throw unusable("RSA-PSS");const n=parseInt(e.slice(2),10);if(getHashLength(i.algorithm.hash)!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":{if(i.algorithm.name!=="Ed25519"&&i.algorithm.name!=="Ed448")throw unusable("Ed25519 or Ed448");break}case"Ed25519":{if(!isAlgorithm(i.algorithm,"Ed25519"))throw unusable("Ed25519");break}case"ES256":case"ES384":case"ES512":{if(!isAlgorithm(i.algorithm,"ECDSA"))throw unusable("ECDSA");const n=getNamedCurve(e);if(i.algorithm.namedCurve!==n)throw unusable(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}checkUsage(i,t)}function message(i,e,...t){if(t=t.filter(Boolean),t.length>2){const n=t.pop();i+=`one of type ${t.join(", ")}, or ${n}.`}else t.length===2?i+=`one of type ${t[0]} or ${t[1]}.`:i+=`of type ${t[0]}.`;return e==null?i+=` Received ${e}`:typeof e=="function"&&e.name?i+=` Received function ${e.name}`:typeof e=="object"&&e!=null&&e.constructor?.name&&(i+=` Received an instance of ${e.constructor.name}`),i}const invalidKeyInput=(i,...e)=>message("Key must be ",i,...e);function withAlg(i,e,...t){return message(`Key for the ${i} algorithm must be `,e,...t)}const isKeyLike=i=>isCryptoKey(i)?!0:i?.[Symbol.toStringTag]==="KeyObject",types=["CryptoKey"],isDisjoint=(...i)=>{const e=i.filter(Boolean);if(e.length===0||e.length===1)return!0;let t;for(const n of e){const s=Object.keys(n);if(!t||t.size===0){t=new Set(s);continue}for(const a of s){if(t.has(a))return!1;t.add(a)}}return!0};function isObjectLike(i){return typeof i=="object"&&i!==null}function isObject$1(i){if(!isObjectLike(i)||Object.prototype.toString.call(i)!=="[object Object]")return!1;if(Object.getPrototypeOf(i)===null)return!0;let e=i;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(i)===e}const checkKeyLength=(i,e)=>{if(i.startsWith("RS")||i.startsWith("PS")){const{modulusLength:t}=e.algorithm;if(typeof t!="number"||t<2048)throw new TypeError(`${i} requires key modulusLength to be 2048 bits or larger`)}};function isJWK(i){return isObject$1(i)&&typeof i.kty=="string"}function isPrivateJWK(i){return i.kty!=="oct"&&typeof i.d=="string"}function isPublicJWK(i){return i.kty!=="oct"&&typeof i.d>"u"}function isSecretJWK(i){return isJWK(i)&&i.kty==="oct"&&typeof i.k=="string"}function subtleMapping(i){let e,t;switch(i.kty){case"RSA":{switch(i.alg){case"PS256":case"PS384":case"PS512":e={name:"RSA-PSS",hash:`SHA-${i.alg.slice(-3)}`},t=i.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":e={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${i.alg.slice(-3)}`},t=i.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":e={name:"RSA-OAEP",hash:`SHA-${parseInt(i.alg.slice(-3),10)||1}`},t=i.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"EC":{switch(i.alg){case"ES256":e={name:"ECDSA",namedCurve:"P-256"},t=i.d?["sign"]:["verify"];break;case"ES384":e={name:"ECDSA",namedCurve:"P-384"},t=i.d?["sign"]:["verify"];break;case"ES512":e={name:"ECDSA",namedCurve:"P-521"},t=i.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":e={name:"ECDH",namedCurve:i.crv},t=i.d?["deriveBits"]:[];break;default:throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"OKP":{switch(i.alg){case"Ed25519":e={name:"Ed25519"},t=i.d?["sign"]:["verify"];break;case"EdDSA":e={name:i.crv},t=i.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":e={name:i.crv},t=i.d?["deriveBits"]:[];break;default:throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}default:throw new JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:e,keyUsages:t}}const parse$1=async i=>{if(!i.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:e,keyUsages:t}=subtleMapping(i),n=[e,i.ext??!1,i.key_ops??t],s={...i};return delete s.alg,delete s.use,crypto$1.subtle.importKey("jwk",s,...n)},exportKeyValue=i=>decode$1(i);let privCache,pubCache;const isKeyObject=i=>i?.[Symbol.toStringTag]==="KeyObject",importAndCache=async(i,e,t,n,s=!1)=>{let a=i.get(e);if(a?.[n])return a[n];const u=await parse$1({...t,alg:n});return s&&Object.freeze(e),a?a[n]=u:i.set(e,{[n]:u}),u},normalizePublicKey=(i,e)=>{if(isKeyObject(i)){let t=i.export({format:"jwk"});return delete t.d,delete t.dp,delete t.dq,delete t.p,delete t.q,delete t.qi,t.k?exportKeyValue(t.k):(pubCache||(pubCache=new WeakMap),importAndCache(pubCache,i,t,e))}return isJWK(i)?i.k?decode$1(i.k):(pubCache||(pubCache=new WeakMap),importAndCache(pubCache,i,i,e,!0)):i},normalizePrivateKey=(i,e)=>{if(isKeyObject(i)){let t=i.export({format:"jwk"});return t.k?exportKeyValue(t.k):(privCache||(privCache=new WeakMap),importAndCache(privCache,i,t,e))}return isJWK(i)?i.k?decode$1(i.k):(privCache||(privCache=new WeakMap),importAndCache(privCache,i,i,e,!0)):i},normalize$1={normalizePublicKey,normalizePrivateKey};async function importJWK(i,e){if(!isObject$1(i))throw new TypeError("JWK must be an object");switch(e||(e=i.alg),i.kty){case"oct":if(typeof i.k!="string"||!i.k)throw new TypeError('missing "k" (Key Value) Parameter value');return decode$1(i.k);case"RSA":if("oth"in i&&i.oth!==void 0)throw new JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return parse$1({...i,alg:e});default:throw new JOSENotSupported('Unsupported "kty" (Key Type) Parameter value')}}const tag=i=>i?.[Symbol.toStringTag],jwkMatchesOp=(i,e,t)=>{if(e.use!==void 0&&e.use!=="sig")throw new TypeError("Invalid key for this operation, when present its use must be sig");if(e.key_ops!==void 0&&e.key_ops.includes?.(t)!==!0)throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${t}`);if(e.alg!==void 0&&e.alg!==i)throw new TypeError(`Invalid key for this operation, when present its alg must be ${i}`);return!0},symmetricTypeCheck=(i,e,t,n)=>{if(!(e instanceof Uint8Array)){if(n&&isJWK(e)){if(isSecretJWK(e)&&jwkMatchesOp(i,e,t))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!isKeyLike(e))throw new TypeError(withAlg(i,e,...types,"Uint8Array",n?"JSON Web Key":null));if(e.type!=="secret")throw new TypeError(`${tag(e)} instances for symmetric algorithms must be of type "secret"`)}},asymmetricTypeCheck=(i,e,t,n)=>{if(n&&isJWK(e))switch(t){case"sign":if(isPrivateJWK(e)&&jwkMatchesOp(i,e,t))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(isPublicJWK(e)&&jwkMatchesOp(i,e,t))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!isKeyLike(e))throw new TypeError(withAlg(i,e,...types,n?"JSON Web Key":null));if(e.type==="secret")throw new TypeError(`${tag(e)} instances for asymmetric algorithms must not be of type "secret"`);if(t==="sign"&&e.type==="public")throw new TypeError(`${tag(e)} instances for asymmetric algorithm signing must be of type "private"`);if(t==="decrypt"&&e.type==="public")throw new TypeError(`${tag(e)} instances for asymmetric algorithm decryption must be of type "private"`);if(e.algorithm&&t==="verify"&&e.type==="private")throw new TypeError(`${tag(e)} instances for asymmetric algorithm verifying must be of type "public"`);if(e.algorithm&&t==="encrypt"&&e.type==="private")throw new TypeError(`${tag(e)} instances for asymmetric algorithm encryption must be of type "public"`)};function checkKeyType(i,e,t,n){e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?symmetricTypeCheck(e,t,n,i):asymmetricTypeCheck(e,t,n,i)}checkKeyType.bind(void 0,!1);const checkKeyTypeWithJwk=checkKeyType.bind(void 0,!0);function validateCrit(i,e,t,n,s){if(s.crit!==void 0&&n?.crit===void 0)throw new i('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||n.crit===void 0)return new Set;if(!Array.isArray(n.crit)||n.crit.length===0||n.crit.some(u=>typeof u!="string"||u.length===0))throw new i('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let a;t!==void 0?a=new Map([...Object.entries(t),...e.entries()]):a=e;for(const u of n.crit){if(!a.has(u))throw new JOSENotSupported(`Extension Header Parameter "${u}" is not recognized`);if(s[u]===void 0)throw new i(`Extension Header Parameter "${u}" is missing`);if(a.get(u)&&n[u]===void 0)throw new i(`Extension Header Parameter "${u}" MUST be integrity protected`)}return new Set(n.crit)}const validateAlgorithms=(i,e)=>{if(e!==void 0&&(!Array.isArray(e)||e.some(t=>typeof t!="string")))throw new TypeError(`"${i}" option must be an array of strings`);if(e)return new Set(e)},keyToJWK=async i=>{if(i instanceof Uint8Array)return{kty:"oct",k:encode$1(i)};if(!isCryptoKey(i))throw new TypeError(invalidKeyInput(i,...types,"Uint8Array"));if(!i.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:e,key_ops:t,alg:n,use:s,...a}=await crypto$1.subtle.exportKey("jwk",i);return a};async function exportJWK(i){return keyToJWK(i)}function subtleDsa(i,e){const t=`SHA-${i.slice(-3)}`;switch(i){case"HS256":case"HS384":case"HS512":return{hash:t,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:t,name:"RSA-PSS",saltLength:i.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:t,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:t,name:"ECDSA",namedCurve:e.namedCurve};case"Ed25519":return{name:"Ed25519"};case"EdDSA":return{name:e.name};default:throw new JOSENotSupported(`alg ${i} is not supported either by JOSE or your javascript runtime`)}}async function getCryptoKey(i,e,t){if(t==="sign"&&(e=await normalize$1.normalizePrivateKey(e,i)),t==="verify"&&(e=await normalize$1.normalizePublicKey(e,i)),isCryptoKey(e))return checkSigCryptoKey(e,i,t),e;if(e instanceof Uint8Array){if(!i.startsWith("HS"))throw new TypeError(invalidKeyInput(e,...types));return crypto$1.subtle.importKey("raw",e,{hash:`SHA-${i.slice(-3)}`,name:"HMAC"},!1,[t])}throw new TypeError(invalidKeyInput(e,...types,"Uint8Array","JSON Web Key"))}const verify=async(i,e,t,n)=>{const s=await getCryptoKey(i,e,"verify");checkKeyLength(i,s);const a=subtleDsa(i,s.algorithm);try{return await crypto$1.subtle.verify(a,s,t,n)}catch{return!1}};async function flattenedVerify(i,e,t){if(!isObject$1(i))throw new JWSInvalid("Flattened JWS must be an object");if(i.protected===void 0&&i.header===void 0)throw new JWSInvalid('Flattened JWS must have either of the "protected" or "header" members');if(i.protected!==void 0&&typeof i.protected!="string")throw new JWSInvalid("JWS Protected Header incorrect type");if(i.payload===void 0)throw new JWSInvalid("JWS Payload missing");if(typeof i.signature!="string")throw new JWSInvalid("JWS Signature missing or incorrect type");if(i.header!==void 0&&!isObject$1(i.header))throw new JWSInvalid("JWS Unprotected Header incorrect type");let n={};if(i.protected)try{const R=decode$1(i.protected);n=JSON.parse(decoder.decode(R))}catch{throw new JWSInvalid("JWS Protected Header is invalid")}if(!isDisjoint(n,i.header))throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const s={...n,...i.header},a=validateCrit(JWSInvalid,new Map([["b64",!0]]),t?.crit,n,s);let u=!0;if(a.has("b64")&&(u=n.b64,typeof u!="boolean"))throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:c}=s;if(typeof c!="string"||!c)throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');const h=t&&validateAlgorithms("algorithms",t.algorithms);if(h&&!h.has(c))throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed');if(u){if(typeof i.payload!="string")throw new JWSInvalid("JWS Payload must be a string")}else if(typeof i.payload!="string"&&!(i.payload instanceof Uint8Array))throw new JWSInvalid("JWS Payload must be a string or an Uint8Array instance");let f=!1;typeof e=="function"?(e=await e(n,i),f=!0,checkKeyTypeWithJwk(c,e,"verify"),isJWK(e)&&(e=await importJWK(e,c))):checkKeyTypeWithJwk(c,e,"verify");const p=concat(encoder.encode(i.protected??""),encoder.encode("."),typeof i.payload=="string"?encoder.encode(i.payload):i.payload);let g;try{g=decode$1(i.signature)}catch{throw new JWSInvalid("Failed to base64url decode the signature")}if(!await verify(c,e,g,p))throw new JWSSignatureVerificationFailed;let S;if(u)try{S=decode$1(i.payload)}catch{throw new JWSInvalid("Failed to base64url decode the payload")}else typeof i.payload=="string"?S=encoder.encode(i.payload):S=i.payload;const w={payload:S};return i.protected!==void 0&&(w.protectedHeader=n),i.header!==void 0&&(w.unprotectedHeader=i.header),f?{...w,key:e}:w}async function compactVerify(i,e,t){if(i instanceof Uint8Array&&(i=decoder.decode(i)),typeof i!="string")throw new JWSInvalid("Compact JWS must be a string or Uint8Array");const{0:n,1:s,2:a,length:u}=i.split(".");if(u!==3)throw new JWSInvalid("Invalid Compact JWS");const c=await flattenedVerify({payload:s,protected:n,signature:a},e,t),h={payload:c.payload,protectedHeader:c.protectedHeader};return typeof e=="function"?{...h,key:c.key}:h}const epoch=i=>Math.floor(i.getTime()/1e3),minute=60,hour=minute*60,day=hour*24,week=day*7,year=day*365.25,REGEX=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,secs=i=>{const e=REGEX.exec(i);if(!e||e[4]&&e[1])throw new TypeError("Invalid time period format");const t=parseFloat(e[2]),n=e[3].toLowerCase();let s;switch(n){case"sec":case"secs":case"second":case"seconds":case"s":s=Math.round(t);break;case"minute":case"minutes":case"min":case"mins":case"m":s=Math.round(t*minute);break;case"hour":case"hours":case"hr":case"hrs":case"h":s=Math.round(t*hour);break;case"day":case"days":case"d":s=Math.round(t*day);break;case"week":case"weeks":case"w":s=Math.round(t*week);break;default:s=Math.round(t*year);break}return e[1]==="-"||e[4]==="ago"?-s:s},normalizeTyp=i=>i.toLowerCase().replace(/^application\//,""),checkAudiencePresence=(i,e)=>typeof i=="string"?e.includes(i):Array.isArray(i)?e.some(Set.prototype.has.bind(new Set(i))):!1,jwtPayload=(i,e,t={})=>{let n;try{n=JSON.parse(decoder.decode(e))}catch{}if(!isObject$1(n))throw new JWTInvalid("JWT Claims Set must be a top-level JSON object");const{typ:s}=t;if(s&&(typeof i.typ!="string"||normalizeTyp(i.typ)!==normalizeTyp(s)))throw new JWTClaimValidationFailed('unexpected "typ" JWT header value',n,"typ","check_failed");const{requiredClaims:a=[],issuer:u,subject:c,audience:h,maxTokenAge:f}=t,p=[...a];f!==void 0&&p.push("iat"),h!==void 0&&p.push("aud"),c!==void 0&&p.push("sub"),u!==void 0&&p.push("iss");for(const w of new Set(p.reverse()))if(!(w in n))throw new JWTClaimValidationFailed(`missing required "${w}" claim`,n,w,"missing");if(u&&!(Array.isArray(u)?u:[u]).includes(n.iss))throw new JWTClaimValidationFailed('unexpected "iss" claim value',n,"iss","check_failed");if(c&&n.sub!==c)throw new JWTClaimValidationFailed('unexpected "sub" claim value',n,"sub","check_failed");if(h&&!checkAudiencePresence(n.aud,typeof h=="string"?[h]:h))throw new JWTClaimValidationFailed('unexpected "aud" claim value',n,"aud","check_failed");let g;switch(typeof t.clockTolerance){case"string":g=secs(t.clockTolerance);break;case"number":g=t.clockTolerance;break;case"undefined":g=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:y}=t,S=epoch(y||new Date);if((n.iat!==void 0||f)&&typeof n.iat!="number")throw new JWTClaimValidationFailed('"iat" claim must be a number',n,"iat","invalid");if(n.nbf!==void 0){if(typeof n.nbf!="number")throw new JWTClaimValidationFailed('"nbf" claim must be a number',n,"nbf","invalid");if(n.nbf>S+g)throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed',n,"nbf","check_failed")}if(n.exp!==void 0){if(typeof n.exp!="number")throw new JWTClaimValidationFailed('"exp" claim must be a number',n,"exp","invalid");if(n.exp<=S-g)throw new JWTExpired('"exp" claim timestamp check failed',n,"exp","check_failed")}if(f){const w=S-n.iat,R=typeof f=="number"?f:secs(f);if(w-g>R)throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)',n,"iat","check_failed");if(w<0-g)throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)',n,"iat","check_failed")}return n};async function jwtVerify(i,e,t){const n=await compactVerify(i,e,t);if(n.protectedHeader.crit?.includes("b64")&&n.protectedHeader.b64===!1)throw new JWTInvalid("JWTs MUST NOT use unencoded payload");const a={payload:jwtPayload(n.protectedHeader,n.payload,t),protectedHeader:n.protectedHeader};return typeof e=="function"?{...a,key:n.key}:a}const sign=async(i,e,t)=>{const n=await getCryptoKey(i,e,"sign");checkKeyLength(i,n);const s=await crypto$1.subtle.sign(subtleDsa(i,n.algorithm),n,t);return new Uint8Array(s)};class FlattenedSign{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader)throw new JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!isDisjoint(this._protectedHeader,this._unprotectedHeader))throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n={...this._protectedHeader,...this._unprotectedHeader},s=validateCrit(JWSInvalid,new Map([["b64",!0]]),t?.crit,this._protectedHeader,n);let a=!0;if(s.has("b64")&&(a=this._protectedHeader.b64,typeof a!="boolean"))throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:u}=n;if(typeof u!="string"||!u)throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');checkKeyTypeWithJwk(u,e,"sign");let c=this._payload;a&&(c=encoder.encode(encode$1(c)));let h;this._protectedHeader?h=encoder.encode(encode$1(JSON.stringify(this._protectedHeader))):h=encoder.encode("");const f=concat(h,encoder.encode("."),c),p=await sign(u,e,f),g={signature:encode$1(p),payload:""};return a&&(g.payload=decoder.decode(c)),this._unprotectedHeader&&(g.header=this._unprotectedHeader),this._protectedHeader&&(g.protected=decoder.decode(h)),g}}class CompactSign{constructor(e){this._flattened=new FlattenedSign(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){const n=await this._flattened.sign(e,t);if(n.payload===void 0)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${n.protected}.${n.payload}.${n.signature}`}}function validateInput(i,e){if(!Number.isFinite(e))throw new TypeError(`Invalid ${i} input`);return e}class ProduceJWT{constructor(e={}){if(!isObject$1(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return typeof e=="number"?this._payload={...this._payload,nbf:validateInput("setNotBefore",e)}:e instanceof Date?this._payload={...this._payload,nbf:validateInput("setNotBefore",epoch(e))}:this._payload={...this._payload,nbf:epoch(new Date)+secs(e)},this}setExpirationTime(e){return typeof e=="number"?this._payload={...this._payload,exp:validateInput("setExpirationTime",e)}:e instanceof Date?this._payload={...this._payload,exp:validateInput("setExpirationTime",epoch(e))}:this._payload={...this._payload,exp:epoch(new Date)+secs(e)},this}setIssuedAt(e){return typeof e>"u"?this._payload={...this._payload,iat:epoch(new Date)}:e instanceof Date?this._payload={...this._payload,iat:validateInput("setIssuedAt",epoch(e))}:typeof e=="string"?this._payload={...this._payload,iat:validateInput("setIssuedAt",epoch(new Date)+secs(e))}:this._payload={...this._payload,iat:validateInput("setIssuedAt",e)},this}}class SignJWT extends ProduceJWT{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){const n=new CompactSign(encoder.encode(JSON.stringify(this._payload)));if(n.setProtectedHeader(this._protectedHeader),Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes("b64")&&this._protectedHeader.b64===!1)throw new JWTInvalid("JWTs MUST NOT use unencoded payload");return n.sign(e,t)}}function getKtyFromAlg(i){switch(typeof i=="string"&&i.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set')}}function isJWKSLike(i){return i&&typeof i=="object"&&Array.isArray(i.keys)&&i.keys.every(isJWKLike)}function isJWKLike(i){return isObject$1(i)}function clone$1(i){return typeof structuredClone=="function"?structuredClone(i):JSON.parse(JSON.stringify(i))}class LocalJWKSet{constructor(e){if(this._cached=new WeakMap,!isJWKSLike(e))throw new JWKSInvalid("JSON Web Key Set malformed");this._jwks=clone$1(e)}async getKey(e,t){const{alg:n,kid:s}={...e,...t?.header},a=getKtyFromAlg(n),u=this._jwks.keys.filter(f=>{let p=a===f.kty;if(p&&typeof s=="string"&&(p=s===f.kid),p&&typeof f.alg=="string"&&(p=n===f.alg),p&&typeof f.use=="string"&&(p=f.use==="sig"),p&&Array.isArray(f.key_ops)&&(p=f.key_ops.includes("verify")),p)switch(n){case"ES256":p=f.crv==="P-256";break;case"ES256K":p=f.crv==="secp256k1";break;case"ES384":p=f.crv==="P-384";break;case"ES512":p=f.crv==="P-521";break;case"Ed25519":p=f.crv==="Ed25519";break;case"EdDSA":p=f.crv==="Ed25519"||f.crv==="Ed448";break}return p}),{0:c,length:h}=u;if(h===0)throw new JWKSNoMatchingKey;if(h!==1){const f=new JWKSMultipleMatchingKeys,{_cached:p}=this;throw f[Symbol.asyncIterator]=async function*(){for(const g of u)try{yield await importWithAlgCache(p,g,n)}catch{}},f}return importWithAlgCache(this._cached,c,n)}}async function importWithAlgCache(i,e,t){const n=i.get(e)||i.set(e,{}).get(e);if(n[t]===void 0){const s=await importJWK({...e,ext:!0},t);if(s instanceof Uint8Array||s.type!=="public")throw new JWKSInvalid("JSON Web Key Set members must be public keys");n[t]=s}return n[t]}function createLocalJWKSet(i){const e=new LocalJWKSet(i),t=async(n,s)=>e.getKey(n,s);return Object.defineProperties(t,{jwks:{value:()=>clone$1(e._jwks),enumerable:!0,configurable:!1,writable:!1}}),t}const fetchJwks=async(i,e,t)=>{let n,s,a=!1;typeof AbortController=="function"&&(n=new AbortController,s=setTimeout(()=>{a=!0,n.abort()},e));const u=await fetch(i.href,{signal:n?n.signal:void 0,redirect:"manual",headers:t.headers}).catch(c=>{throw a?new JWKSTimeout:c});if(s!==void 0&&clearTimeout(s),u.status!==200)throw new JOSEError("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await u.json()}catch{throw new JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON")}};function isCloudflareWorkers(){return typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel"}let USER_AGENT;(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(USER_AGENT="jose/v5.10.0");const jwksCache=Symbol();function isFreshJwksCache(i,e){return!(typeof i!="object"||i===null||!("uat"in i)||typeof i.uat!="number"||Date.now()-i.uat>=e||!("jwks"in i)||!isObject$1(i.jwks)||!Array.isArray(i.jwks.keys)||!Array.prototype.every.call(i.jwks.keys,isObject$1))}class RemoteJWKSet{constructor(e,t){if(!(e instanceof URL))throw new TypeError("url must be an instance of URL");this._url=new URL(e.href),this._options={agent:t?.agent,headers:t?.headers},this._timeoutDuration=typeof t?.timeoutDuration=="number"?t?.timeoutDuration:5e3,this._cooldownDuration=typeof t?.cooldownDuration=="number"?t?.cooldownDuration:3e4,this._cacheMaxAge=typeof t?.cacheMaxAge=="number"?t?.cacheMaxAge:6e5,t?.[jwksCache]!==void 0&&(this._cache=t?.[jwksCache],isFreshJwksCache(t?.[jwksCache],this._cacheMaxAge)&&(this._jwksTimestamp=this._cache.uat,this._local=createLocalJWKSet(this._cache.jwks)))}coolingDown(){return typeof this._jwksTimestamp=="number"?Date.now()<this._jwksTimestamp+this._cooldownDuration:!1}fresh(){return typeof this._jwksTimestamp=="number"?Date.now()<this._jwksTimestamp+this._cacheMaxAge:!1}async getKey(e,t){(!this._local||!this.fresh())&&await this.reload();try{return await this._local(e,t)}catch(n){if(n instanceof JWKSNoMatchingKey&&this.coolingDown()===!1)return await this.reload(),this._local(e,t);throw n}}async reload(){this._pendingFetch&&isCloudflareWorkers()&&(this._pendingFetch=void 0);const e=new Headers(this._options.headers);USER_AGENT&&!e.has("User-Agent")&&(e.set("User-Agent",USER_AGENT),this._options.headers=Object.fromEntries(e.entries())),this._pendingFetch||(this._pendingFetch=fetchJwks(this._url,this._timeoutDuration,this._options).then(t=>{this._local=createLocalJWKSet(t),this._cache&&(this._cache.uat=Date.now(),this._cache.jwks=t),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(t=>{throw this._pendingFetch=void 0,t})),await this._pendingFetch}}function createRemoteJWKSet(i,e){const t=new RemoteJWKSet(i,e),n=async(s,a)=>t.getKey(s,a);return Object.defineProperties(n,{coolingDown:{get:()=>t.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>t.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>t.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>!!t._pendingFetch,enumerable:!0,configurable:!1},jwks:{value:()=>t._local?.jwks(),enumerable:!0,configurable:!1,writable:!1}}),n}function getModulusLengthOption(i){const e=i?.modulusLength??2048;if(typeof e!="number"||e<2048)throw new JOSENotSupported("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return e}async function generateKeyPair$1(i,e){let t,n;switch(i){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${i.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:getModulusLengthOption(e)},n=["sign","verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${i.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:getModulusLengthOption(e)},n=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(i.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:getModulusLengthOption(e)},n=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":t={name:"ECDSA",namedCurve:"P-256"},n=["sign","verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},n=["sign","verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},n=["sign","verify"];break;case"Ed25519":t={name:"Ed25519"},n=["sign","verify"];break;case"EdDSA":{n=["sign","verify"];const s="Ed25519";switch(s){case"Ed25519":case"Ed448":t={name:s};break;default:throw new JOSENotSupported("Invalid or unsupported crv option provided")}break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{n=["deriveKey","deriveBits"];const s="P-256";switch(s){case"P-256":case"P-384":case"P-521":{t={name:"ECDH",namedCurve:s};break}case"X25519":case"X448":t={name:s};break;default:throw new JOSENotSupported("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return crypto$1.subtle.generateKey(t,!1,n)}async function generateKeyPair(i,e){return generateKeyPair$1(i,e)}const byteToHex=[];for(let i=0;i<256;++i)byteToHex.push((i+256).toString(16).slice(1));function unsafeStringify(i,e=0){return(byteToHex[i[e+0]]+byteToHex[i[e+1]]+byteToHex[i[e+2]]+byteToHex[i[e+3]]+"-"+byteToHex[i[e+4]]+byteToHex[i[e+5]]+"-"+byteToHex[i[e+6]]+byteToHex[i[e+7]]+"-"+byteToHex[i[e+8]]+byteToHex[i[e+9]]+"-"+byteToHex[i[e+10]]+byteToHex[i[e+11]]+byteToHex[i[e+12]]+byteToHex[i[e+13]]+byteToHex[i[e+14]]+byteToHex[i[e+15]]).toLowerCase()}let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");getRandomValues=crypto.getRandomValues.bind(crypto)}return getRandomValues(rnds8)}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(i,e,t){if(native.randomUUID&&!i)return native.randomUUID();i=i||{};const n=i.random??i.rng?.()??rng();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,unsafeStringify(n)}const SOLID_CLIENT_AUTHN_KEY_PREFIX="solidClientAuthn:",PREFERRED_SIGNING_ALG=["ES256","RS256"],EVENTS={ERROR:"error",LOGIN:"login",LOGOUT:"logout",NEW_REFRESH_TOKEN:"newRefreshToken",NEW_TOKENS:"newTokens",AUTHORIZATION_REQUEST:"authorizationRequest",SESSION_EXPIRED:"sessionExpired",SESSION_EXTENDED:"sessionExtended",SESSION_RESTORED:"sessionRestore",TIMEOUT_SET:"timeoutSet"},REFRESH_BEFORE_EXPIRATION_SECONDS=5,SCOPE_OPENID="openid",SCOPE_OFFLINE="offline_access",SCOPE_WEBID="webid",DEFAULT_SCOPES=[SCOPE_OPENID,SCOPE_OFFLINE,SCOPE_WEBID];class AggregateHandler{handleables;constructor(e){this.handleables=e,this.handleables=e}async getProperHandler(e){const t=await Promise.all(this.handleables.map(n=>n.canHandle(...e)));for(let n=0;n<t.length;n+=1)if(t[n])return this.handleables[n];return null}async canHandle(...e){return await this.getProperHandler(e)!==null}async handle(...e){const t=await this.getProperHandler(e);if(t)return t.handle(...e);throw new Error(`[${this.constructor.name}] cannot find a suitable handler for: ${e.map(n=>{try{return JSON.stringify(n)}catch{return n.toString()}}).join(", ")}`)}}async function getWebidFromTokenPayload(i,e,t,n){let s,a;try{const{payload:u}=await jwtVerify(i,createRemoteJWKSet(new URL(e)),{issuer:t,audience:n});s=u}catch(u){throw new Error(`Token verification failed: ${u.stack}`)}if(typeof s.azp=="string"&&(a=s.azp),typeof s.webid=="string")return{webId:s.webid,clientId:a};if(typeof s.sub!="string")throw new Error(`The token ${JSON.stringify(s)} is invalid: it has no 'webid' claim and no 'sub' claim.`);try{return new URL(s.sub),{webId:s.sub,clientId:a}}catch(u){throw new Error(`The token has no 'webid' claim, and its 'sub' claim of [${s.sub}] is invalid as a URL - error [${u}].`)}}function normalizeScopes(i){return Array.isArray(i)?Array.from(new Set([...DEFAULT_SCOPES,...i.filter(e=>typeof e=="string"&&!e.includes(" "))])):DEFAULT_SCOPES}function isValidRedirectUrl(i){try{const e=new URL(i),t=!e.searchParams.has("code")&&!e.searchParams.has("state"),n=e.hash==="";return t&&n}catch{return!1}}function removeOpenIdParams(i){const e=new URL(i);return e.searchParams.delete("state"),e.searchParams.delete("code"),e.searchParams.delete("error"),e.searchParams.delete("error_description"),e.searchParams.delete("iss"),e}function booleanWithFallback(i,e){return typeof i=="boolean"?!!i:!!e}class AuthorizationCodeWithPkceOidcHandlerBase{storageUtility;redirector;constructor(e,t){this.storageUtility=e,this.redirector=t,this.storageUtility=e,this.redirector=t}parametersGuard=e=>e.issuerConfiguration.grantTypesSupported!==void 0&&e.issuerConfiguration.grantTypesSupported.indexOf("authorization_code")>-1&&e.redirectUrl!==void 0;async canHandle(e){return this.parametersGuard(e)}async setupRedirectHandler({oidcLoginOptions:e,state:t,codeVerifier:n,targetUrl:s}){if(!this.parametersGuard(e))throw new Error("The authorization code grant requires a redirectUrl.");await Promise.all([this.storageUtility.setForUser(t,{sessionId:e.sessionId}),this.storageUtility.setForUser(e.sessionId,{codeVerifier:n,issuer:e.issuer.toString(),redirectUrl:e.redirectUrl,dpop:(!!e.dpop).toString(),keepAlive:booleanWithFallback(e.keepAlive,!0).toString()})]),this.redirector.redirect(s,{handleRedirect:e.handleRedirect})}}class GeneralLogoutHandler{sessionInfoManager;constructor(e){this.sessionInfoManager=e,this.sessionInfoManager=e}async canHandle(){return!0}async handle(e){await this.sessionInfoManager.clear(e)}}class IRpLogoutHandler{redirector;constructor(e){this.redirector=e,this.redirector=e}async canHandle(e,t){return t?.logoutType==="idp"}async handle(e,t){if(t?.logoutType!=="idp")throw new Error("Attempting to call idp logout handler to perform app logout");if(t.toLogoutUrl===void 0)throw new Error("Cannot perform IDP logout. Did you log in using the OIDC authentication flow?");this.redirector.redirect(t.toLogoutUrl(t),{handleRedirect:t.handleRedirect})}}class IWaterfallLogoutHandler{handlers;constructor(e,t){this.handlers=[new GeneralLogoutHandler(e),new IRpLogoutHandler(t)]}async canHandle(){return!0}async handle(e,t){for(const n of this.handlers)await n.canHandle(e,t)&&await n.handle(e,t)}}function getUnauthenticatedSession(){return{isLoggedIn:!1,sessionId:v4(),fetch:(...i)=>fetch(...i)}}async function clear$1(i,e){await Promise.all([e.deleteAllUserData(i,{secure:!1}),e.deleteAllUserData(i,{secure:!0})])}class SessionInfoManagerBase{storageUtility;constructor(e){this.storageUtility=e,this.storageUtility=e}update(e,t){throw new Error("Not Implemented")}set(e,t){throw new Error("Not Implemented")}get(e){throw new Error("Not implemented")}async getAll(){throw new Error("Not implemented")}async clear(e){return clear$1(e,this.storageUtility)}async register(e){throw new Error("Not implemented")}async getRegisteredSessionIdAll(){throw new Error("Not implemented")}async clearAll(){throw new Error("Not implemented")}async setOidcContext(e,t){throw new Error("Not implemented")}}function getEndSessionUrl({endSessionEndpoint:i,idTokenHint:e,postLogoutRedirectUri:t,state:n}){const s=new URL(i);return e!==void 0&&s.searchParams.append("id_token_hint",e),t!==void 0&&(s.searchParams.append("post_logout_redirect_uri",t),n!==void 0&&s.searchParams.append("state",n)),s.toString()}function maybeBuildRpInitiatedLogout({endSessionEndpoint:i,idTokenHint:e}){if(i!==void 0)return function({state:n,postLogoutUrl:s}){return getEndSessionUrl({endSessionEndpoint:i,idTokenHint:e,state:n,postLogoutRedirectUri:s})}}function isSupportedTokenType(i){return typeof i=="string"&&["DPoP","Bearer"].includes(i)}function isValidUrl$1(i){try{return new URL(i),!0}catch{return!1}}function determineSigningAlg(i,e){return e.find(t=>i.includes(t))??null}function isStaticClient(i){return i.clientId!==void 0&&!isValidUrl$1(i.clientId)}function isSolidOidcClient(i,e){return e.scopesSupported.includes("webid")&&i.clientId!==void 0&&isValidUrl$1(i.clientId)}function isKnownClientType(i){return typeof i=="string"&&["dynamic","static","solid-oidc"].includes(i)}async function handleRegistration(i,e,t,n){let s;if(isSolidOidcClient(i,e))s={clientId:i.clientId,clientName:i.clientName,clientType:"solid-oidc"};else if(isStaticClient(i))s={clientId:i.clientId,clientSecret:i.clientSecret,clientName:i.clientName,clientType:"static"};else return n.getClient({sessionId:i.sessionId,clientName:i.clientName,redirectUrl:i.redirectUrl},e);const a={clientId:s.clientId,clientType:s.clientType};return s.clientType==="static"&&(a.clientSecret=s.clientSecret),s.clientName&&(a.clientName=s.clientName),await t.setForUser(i.sessionId,a),s}const boundFetch=(i,e)=>fetch(i,e);let ClientAuthentication$1=class{loginHandler;redirectHandler;logoutHandler;sessionInfoManager;issuerConfigFetcher;boundLogout;constructor(e,t,n,s,a){this.loginHandler=e,this.redirectHandler=t,this.logoutHandler=n,this.sessionInfoManager=s,this.issuerConfigFetcher=a,this.loginHandler=e,this.redirectHandler=t,this.logoutHandler=n,this.sessionInfoManager=s,this.issuerConfigFetcher=a}fetch=boundFetch;logout=async(e,t)=>{await this.logoutHandler.handle(e,t?.logoutType==="idp"?{...t,toLogoutUrl:this.boundLogout}:t),this.fetch=boundFetch,delete this.boundLogout};getSessionInfo=async e=>this.sessionInfoManager.get(e);getAllSessionInfo=async()=>this.sessionInfoManager.getAll()};async function loadOidcContextFromStorage(i,e,t){try{const[n,s,a,u,c]=await Promise.all([e.getForUser(i,"issuer",{errorIfNull:!0}),e.getForUser(i,"codeVerifier"),e.getForUser(i,"redirectUrl"),e.getForUser(i,"dpop",{errorIfNull:!0}),e.getForUser(i,"keepAlive")]);await e.deleteForUser(i,"codeVerifier");const h=await t.fetchConfig(n);return{codeVerifier:s,redirectUrl:a,issuerConfig:h,dpop:u==="true",keepAlive:typeof c=="string"?c==="true":!0}}catch(n){throw new Error(`Failed to retrieve OIDC context from storage associated with session [${i}]: ${n}`)}}async function saveSessionInfoToStorage(i,e,t,n,s,a,u,c){t!==void 0&&await i.setForUser(e,{webId:t},{secure:u}),n!==void 0&&await i.setForUser(e,{clientId:n},{secure:u}),await i.setForUser(e,{isLoggedIn:s},{secure:u})}class StorageUtility{secureStorage;insecureStorage;constructor(e,t){this.secureStorage=e,this.insecureStorage=t,this.secureStorage=e,this.insecureStorage=t}getKey(e){return`solidClientAuthenticationUser:${e}`}async getUserData(e,t){const n=await(t?this.secureStorage:this.insecureStorage).get(this.getKey(e));if(n===void 0)return{};try{return JSON.parse(n)}catch{throw new Error(`Data for user [${e}] in [${t?"secure":"unsecure"}] storage is corrupted - expected valid JSON, but got: ${n}`)}}async setUserData(e,t,n){await(n?this.secureStorage:this.insecureStorage).set(this.getKey(e),JSON.stringify(t))}async get(e,t){const n=await(t?.secure?this.secureStorage:this.insecureStorage).get(e);if(n===void 0&&t?.errorIfNull)throw new Error(`[${e}] is not stored`);return n}async set(e,t,n){return(n?.secure?this.secureStorage:this.insecureStorage).set(e,t)}async delete(e,t){return(t?.secure?this.secureStorage:this.insecureStorage).delete(e)}async getForUser(e,t,n){const s=await this.getUserData(e,n?.secure);let a;if((!s||!s[t])&&(a=void 0),a=s[t],a===void 0&&n?.errorIfNull)throw new Error(`Field [${t}] for user [${e}] is not stored`);return a||void 0}async setForUser(e,t,n){let s;try{s=await this.getUserData(e,n?.secure)}catch{s={}}await this.setUserData(e,{...s,...t},n?.secure)}async deleteForUser(e,t,n){const s=await this.getUserData(e,n?.secure);delete s[t],await this.setUserData(e,s,n?.secure)}async deleteAllUserData(e,t){await(t?.secure?this.secureStorage:this.insecureStorage).delete(this.getKey(e))}}class InMemoryStorage{map={};async get(e){return this.map[e]||void 0}async set(e,t){this.map[e]=t}async delete(e){delete this.map[e]}}class ConfigurationError extends Error{constructor(e){super(e)}}class InvalidResponseError extends Error{missingFields;constructor(e){super(`Invalid response from OIDC provider: missing fields ${e}`),this.missingFields=e}}class OidcProviderError extends Error{error;errorDescription;constructor(e,t,n){super(e),this.error=t,this.errorDescription=n}}function normalizeHTU(i){const e=new URL(i);return new URL(e.pathname,e.origin).toString()}async function createDpopHeader(i,e,t){return new SignJWT({htu:normalizeHTU(i),htm:e.toUpperCase(),jti:v4()}).setProtectedHeader({alg:PREFERRED_SIGNING_ALG[0],jwk:t.publicKey,typ:"dpop+jwt"}).setIssuedAt().sign(t.privateKey,{})}async function generateDpopKeyPair(){const{privateKey:i,publicKey:e}=await generateKeyPair(PREFERRED_SIGNING_ALG[0]),t={privateKey:i,publicKey:await exportJWK(e)};return[t.publicKey.alg]=PREFERRED_SIGNING_ALG,t}const DEFAULT_EXPIRATION_TIME_SECONDS=600;function isExpectedAuthError(i){return[401,403].includes(i)}async function buildDpopFetchOptions(i,e,t,n){const s=new Headers(n?.headers);return s.set("Authorization",`DPoP ${e}`),s.set("DPoP",await createDpopHeader(i,n?.method??"get",t)),{...n,headers:s}}async function buildAuthenticatedHeaders(i,e,t,n){if(t!==void 0)return buildDpopFetchOptions(i,e,t,n);const s=new Headers(n?.headers);return s.set("Authorization",`Bearer ${e}`),{...n,headers:s}}async function makeAuthenticatedRequest(i,e,t,n,s=fetch){return s(e,await buildAuthenticatedHeaders(e.toString(),i,n,t))}async function refreshAccessToken(i,e,t){const n=await i.tokenRefresher.refresh(i.sessionId,i.refreshToken,e);return t?.emit(EVENTS.SESSION_EXTENDED,n.expiresIn??DEFAULT_EXPIRATION_TIME_SECONDS),{accessToken:n.accessToken,refreshToken:n.refreshToken,expiresIn:n.expiresIn}}const computeRefreshDelay=i=>i!==void 0?i-REFRESH_BEFORE_EXPIRATION_SECONDS>0?i-REFRESH_BEFORE_EXPIRATION_SECONDS:i:DEFAULT_EXPIRATION_TIME_SECONDS;function buildAuthenticatedFetch(i,e){let t=i,n;const s=e?.refreshOptions;if(s!==void 0){const a=async()=>{try{const{accessToken:u,refreshToken:c,expiresIn:h}=await refreshAccessToken(s,e.dpopKey,e.eventEmitter);t=u,c!==void 0&&(s.refreshToken=c),clearTimeout(n),n=setTimeout(a,computeRefreshDelay(h)*1e3),e.eventEmitter?.emit(EVENTS.TIMEOUT_SET,n)}catch(u){u instanceof OidcProviderError&&(e?.eventEmitter?.emit(EVENTS.ERROR,u.error,u.errorDescription),e?.eventEmitter?.emit(EVENTS.SESSION_EXPIRED)),u instanceof InvalidResponseError&&u.missingFields.includes("access_token")&&e?.eventEmitter?.emit(EVENTS.SESSION_EXPIRED)}};n=setTimeout(a,computeRefreshDelay(e.expiresIn)*1e3),e.eventEmitter?.emit(EVENTS.TIMEOUT_SET,n)}else if(e!==void 0&&e.eventEmitter!==void 0){const a=setTimeout(()=>{e.eventEmitter.emit(EVENTS.SESSION_EXPIRED)},computeRefreshDelay(e.expiresIn)*1e3);e.eventEmitter.emit(EVENTS.TIMEOUT_SET,a)}return async(a,u)=>{let c=await makeAuthenticatedRequest(t,a,u,e?.dpopKey,e?.fetch);const h=!c.ok&&!isExpectedAuthError(c.status);return c.ok||h||c.url!==a&&e?.dpopKey!==void 0&&(c=await makeAuthenticatedRequest(t,c.url,u,e.dpopKey,e.fetch)),c}}var events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var i=typeof Reflect=="object"?Reflect:null,e=i&&typeof i.apply=="function"?i.apply:function(O,K,z){return Function.prototype.apply.call(O,K,z)},t;i&&typeof i.ownKeys=="function"?t=i.ownKeys:Object.getOwnPropertySymbols?t=function(O){return Object.getOwnPropertyNames(O).concat(Object.getOwnPropertySymbols(O))}:t=function(O){return Object.getOwnPropertyNames(O)};function n(D){console&&console.warn&&console.warn(D)}var s=Number.isNaN||function(O){return O!==O};function a(){a.init.call(this)}events.exports=a,events.exports.once=A,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(D){if(typeof D!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof D)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(D){if(typeof D!="number"||D<0||s(D))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+D+".");u=D}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(O){if(typeof O!="number"||O<0||s(O))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+O+".");return this._maxListeners=O,this};function h(D){return D._maxListeners===void 0?a.defaultMaxListeners:D._maxListeners}a.prototype.getMaxListeners=function(){return h(this)},a.prototype.emit=function(O){for(var K=[],z=1;z<arguments.length;z++)K.push(arguments[z]);var X=O==="error",Ee=this._events;if(Ee!==void 0)X=X&&Ee.error===void 0;else if(!X)return!1;if(X){var q;if(K.length>0&&(q=K[0]),q instanceof Error)throw q;var Y=new Error("Unhandled error."+(q?" ("+q.message+")":""));throw Y.context=q,Y}var Te=Ee[O];if(Te===void 0)return!1;if(typeof Te=="function")e(Te,this,K);else for(var re=Te.length,$e=w(Te,re),z=0;z<re;++z)e($e[z],this,K);return!0};function f(D,O,K,z){var X,Ee,q;if(c(K),Ee=D._events,Ee===void 0?(Ee=D._events=Object.create(null),D._eventsCount=0):(Ee.newListener!==void 0&&(D.emit("newListener",O,K.listener?K.listener:K),Ee=D._events),q=Ee[O]),q===void 0)q=Ee[O]=K,++D._eventsCount;else if(typeof q=="function"?q=Ee[O]=z?[K,q]:[q,K]:z?q.unshift(K):q.push(K),X=h(D),X>0&&q.length>X&&!q.warned){q.warned=!0;var Y=new Error("Possible EventEmitter memory leak detected. "+q.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");Y.name="MaxListenersExceededWarning",Y.emitter=D,Y.type=O,Y.count=q.length,n(Y)}return D}a.prototype.addListener=function(O,K){return f(this,O,K,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(O,K){return f(this,O,K,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(D,O,K){var z={fired:!1,wrapFn:void 0,target:D,type:O,listener:K},X=p.bind(z);return X.listener=K,z.wrapFn=X,X}a.prototype.once=function(O,K){return c(K),this.on(O,g(this,O,K)),this},a.prototype.prependOnceListener=function(O,K){return c(K),this.prependListener(O,g(this,O,K)),this},a.prototype.removeListener=function(O,K){var z,X,Ee,q,Y;if(c(K),X=this._events,X===void 0)return this;if(z=X[O],z===void 0)return this;if(z===K||z.listener===K)--this._eventsCount===0?this._events=Object.create(null):(delete X[O],X.removeListener&&this.emit("removeListener",O,z.listener||K));else if(typeof z!="function"){for(Ee=-1,q=z.length-1;q>=0;q--)if(z[q]===K||z[q].listener===K){Y=z[q].listener,Ee=q;break}if(Ee<0)return this;Ee===0?z.shift():R(z,Ee),z.length===1&&(X[O]=z[0]),X.removeListener!==void 0&&this.emit("removeListener",O,Y||K)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(O){var K,z,X;if(z=this._events,z===void 0)return this;if(z.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):z[O]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete z[O]),this;if(arguments.length===0){var Ee=Object.keys(z),q;for(X=0;X<Ee.length;++X)q=Ee[X],q!=="removeListener"&&this.removeAllListeners(q);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(K=z[O],typeof K=="function")this.removeListener(O,K);else if(K!==void 0)for(X=K.length-1;X>=0;X--)this.removeListener(O,K[X]);return this};function y(D,O,K){var z=D._events;if(z===void 0)return[];var X=z[O];return X===void 0?[]:typeof X=="function"?K?[X.listener||X]:[X]:K?T(X):w(X,X.length)}a.prototype.listeners=function(O){return y(this,O,!0)},a.prototype.rawListeners=function(O){return y(this,O,!1)},a.listenerCount=function(D,O){return typeof D.listenerCount=="function"?D.listenerCount(O):S.call(D,O)},a.prototype.listenerCount=S;function S(D){var O=this._events;if(O!==void 0){var K=O[D];if(typeof K=="function")return 1;if(K!==void 0)return K.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function w(D,O){for(var K=new Array(O),z=0;z<O;++z)K[z]=D[z];return K}function R(D,O){for(;O+1<D.length;O++)D[O]=D[O+1];D.pop()}function T(D){for(var O=new Array(D.length),K=0;K<O.length;++K)O[K]=D[K].listener||D[K];return O}function A(D,O){return new Promise(function(K,z){function X(q){D.removeListener(O,Ee),z(q)}function Ee(){typeof D.removeListener=="function"&&D.removeListener("error",X),K([].slice.call(arguments))}x(D,O,Ee,{once:!0}),O!=="error"&&F(D,X,{once:!0})})}function F(D,O,K){typeof D.on=="function"&&x(D,"error",O,K)}function x(D,O,K,z){if(typeof D.on=="function")z.once?D.once(O,K):D.on(O,K);else if(typeof D.addEventListener=="function")D.addEventListener(O,function X(Ee){z.once&&D.removeEventListener(O,X),K(Ee)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof D)}return events.exports}var eventsExports=requireEvents();const EventEmitter=getDefaultExportFromCjs(eventsExports);var oidcClient_min$1={exports:{}},oidcClient_min=oidcClient_min$1.exports,hasRequiredOidcClient_min;function requireOidcClient_min(){return hasRequiredOidcClient_min||(hasRequiredOidcClient_min=1,(function(i,e){(function(n,s){i.exports=s()})(oidcClient_min,(function(){return(function(t){var n={};function s(a){if(n[a])return n[a].exports;var u=n[a]={i:a,l:!1,exports:{}};return t[a].call(u.exports,u,u.exports,s),u.l=!0,u.exports}return s.m=t,s.c=n,s.d=function(a,u,c){s.o(a,u)||Object.defineProperty(a,u,{enumerable:!0,get:c})},s.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},s.t=function(a,u){if(1&u&&(a=s(a)),8&u||4&u&&typeof a=="object"&&a&&a.__esModule)return a;var c=Object.create(null);if(s.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:a}),2&u&&typeof a!="string")for(var h in a)s.d(c,h,(function(f){return a[f]}).bind(null,h));return c},s.n=function(a){var u=a&&a.__esModule?function(){return a.default}:function(){return a};return s.d(u,"a",u),u},s.o=function(a,u){return Object.prototype.hasOwnProperty.call(a,u)},s.p="",s(s.s=22)})([function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0});var a=(function(){function f(p,g){for(var y=0;y<g.length;y++){var S=g[y];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(p,S.key,S)}}return function(p,g,y){return g&&f(p.prototype,g),y&&f(p,y),p}})(),u={debug:function(){},info:function(){},warn:function(){},error:function(){}},c=void 0,h=void 0;(n.Log=(function(){function f(){(function(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")})(this,f)}return f.reset=function(){h=3,c=u},f.debug=function(){if(h>=4){for(var g=arguments.length,y=Array(g),S=0;S<g;S++)y[S]=arguments[S];c.debug.apply(c,Array.from(y))}},f.info=function(){if(h>=3){for(var g=arguments.length,y=Array(g),S=0;S<g;S++)y[S]=arguments[S];c.info.apply(c,Array.from(y))}},f.warn=function(){if(h>=2){for(var g=arguments.length,y=Array(g),S=0;S<g;S++)y[S]=arguments[S];c.warn.apply(c,Array.from(y))}},f.error=function(){if(h>=1){for(var g=arguments.length,y=Array(g),S=0;S<g;S++)y[S]=arguments[S];c.error.apply(c,Array.from(y))}},a(f,null,[{key:"NONE",get:function(){return 0}},{key:"ERROR",get:function(){return 1}},{key:"WARN",get:function(){return 2}},{key:"INFO",get:function(){return 3}},{key:"DEBUG",get:function(){return 4}},{key:"level",get:function(){return h},set:function(g){if(!(0<=g&&g<=4))throw new Error("Invalid log level");h=g}},{key:"logger",get:function(){return c},set:function(g){if(!g.debug&&g.info&&(g.debug=g.info),!(g.debug&&g.info&&g.warn&&g.error))throw new Error("Invalid logger");c=g}}]),f})()).reset()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0});var a=(function(){function f(p,g){for(var y=0;y<g.length;y++){var S=g[y];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(p,S.key,S)}}return function(p,g,y){return g&&f(p.prototype,g),y&&f(p,y),p}})(),u={setInterval:(function(f){function p(g,y){return f.apply(this,arguments)}return p.toString=function(){return f.toString()},p})((function(f,p){return setInterval(f,p)})),clearInterval:(function(f){function p(g){return f.apply(this,arguments)}return p.toString=function(){return f.toString()},p})((function(f){return clearInterval(f)}))},c=!1,h=null;n.Global=(function(){function f(){(function(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")})(this,f)}return f._testing=function(){c=!0},f.setXMLHttpRequest=function(g){h=g},a(f,null,[{key:"location",get:function(){if(!c)return location}},{key:"localStorage",get:function(){if(!c&&typeof window<"u")return localStorage}},{key:"sessionStorage",get:function(){if(!c&&typeof window<"u")return sessionStorage}},{key:"XMLHttpRequest",get:function(){if(!c&&typeof window<"u")return h||XMLHttpRequest}},{key:"timer",get:function(){if(!c)return u}}]),f})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.MetadataService=void 0;var a=(function(){function p(g,y){for(var S=0;S<y.length;S++){var w=y[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,y,S){return y&&p(g.prototype,y),S&&p(g,S),g}})(),u=s(0),c=s(7);function h(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}var f=".well-known/openid-configuration";n.MetadataService=(function(){function p(g){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c.JsonService;if(h(this,p),!g)throw u.Log.error("MetadataService: No settings passed to MetadataService"),new Error("settings");this._settings=g,this._jsonService=new y(["application/jwk-set+json"])}return p.prototype.resetSigningKeys=function(){this._settings=this._settings||{},this._settings.signingKeys=void 0},p.prototype.getMetadata=function(){var y=this;return this._settings.metadata?(u.Log.debug("MetadataService.getMetadata: Returning metadata from settings"),Promise.resolve(this._settings.metadata)):this.metadataUrl?(u.Log.debug("MetadataService.getMetadata: getting metadata from",this.metadataUrl),this._jsonService.getJson(this.metadataUrl).then((function(S){u.Log.debug("MetadataService.getMetadata: json received");var w=y._settings.metadataSeed||{};return y._settings.metadata=Object.assign({},w,S),y._settings.metadata}))):(u.Log.error("MetadataService.getMetadata: No authority or metadataUrl configured on settings"),Promise.reject(new Error("No authority or metadataUrl configured on settings")))},p.prototype.getIssuer=function(){return this._getMetadataProperty("issuer")},p.prototype.getAuthorizationEndpoint=function(){return this._getMetadataProperty("authorization_endpoint")},p.prototype.getUserInfoEndpoint=function(){return this._getMetadataProperty("userinfo_endpoint")},p.prototype.getTokenEndpoint=function(){var y=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this._getMetadataProperty("token_endpoint",y)},p.prototype.getCheckSessionIframe=function(){return this._getMetadataProperty("check_session_iframe",!0)},p.prototype.getEndSessionEndpoint=function(){return this._getMetadataProperty("end_session_endpoint",!0)},p.prototype.getRevocationEndpoint=function(){return this._getMetadataProperty("revocation_endpoint",!0)},p.prototype.getKeysEndpoint=function(){return this._getMetadataProperty("jwks_uri",!0)},p.prototype._getMetadataProperty=function(y){var S=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return u.Log.debug("MetadataService.getMetadataProperty for: "+y),this.getMetadata().then((function(w){if(u.Log.debug("MetadataService.getMetadataProperty: metadata recieved"),w[y]===void 0){if(S===!0)return void u.Log.warn("MetadataService.getMetadataProperty: Metadata does not contain optional property "+y);throw u.Log.error("MetadataService.getMetadataProperty: Metadata does not contain property "+y),new Error("Metadata does not contain property "+y)}return w[y]}))},p.prototype.getSigningKeys=function(){var y=this;return this._settings.signingKeys?(u.Log.debug("MetadataService.getSigningKeys: Returning signingKeys from settings"),Promise.resolve(this._settings.signingKeys)):this._getMetadataProperty("jwks_uri").then((function(S){return u.Log.debug("MetadataService.getSigningKeys: jwks_uri received",S),y._jsonService.getJson(S).then((function(w){if(u.Log.debug("MetadataService.getSigningKeys: key set received",w),!w.keys)throw u.Log.error("MetadataService.getSigningKeys: Missing keys on keyset"),new Error("Missing keys on keyset");return y._settings.signingKeys=w.keys,y._settings.signingKeys}))}))},a(p,[{key:"metadataUrl",get:function(){return this._metadataUrl||(this._settings.metadataUrl?this._metadataUrl=this._settings.metadataUrl:(this._metadataUrl=this._settings.authority,this._metadataUrl&&this._metadataUrl.indexOf(f)<0&&(this._metadataUrl[this._metadataUrl.length-1]!=="/"&&(this._metadataUrl+="/"),this._metadataUrl+=f))),this._metadataUrl}}]),p})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.UrlUtility=void 0;var a=s(0),u=s(1);n.UrlUtility=(function(){function c(){(function(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")})(this,c)}return c.addQueryParam=function(f,p,g){return f.indexOf("?")<0&&(f+="?"),f[f.length-1]!=="?"&&(f+="&"),f+=encodeURIComponent(p),f+="=",f+=encodeURIComponent(g)},c.parseUrlFragment=function(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#",g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.Global;typeof f!="string"&&(f=g.location.href);var y=f.lastIndexOf(p);y>=0&&(f=f.substr(y+1)),p==="?"&&(y=f.indexOf("#"))>=0&&(f=f.substr(0,y));for(var S,w={},R=/([^&=]+)=([^&]*)/g,T=0;S=R.exec(f);)if(w[decodeURIComponent(S[1])]=decodeURIComponent(S[2].replace(/\+/g," ")),T++>50)return a.Log.error("UrlUtility.parseUrlFragment: response exceeded expected number of parameters",f),{error:"Response exceeded expected number of parameters"};for(var A in w)return w;return{}},c})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.JoseUtil=void 0;var a=s(26),u=(function(h){return h&&h.__esModule?h:{default:h}})(s(33));n.JoseUtil=(0,u.default)({jws:a.jws,KeyUtil:a.KeyUtil,X509:a.X509,crypto:a.crypto,hextob64u:a.hextob64u,b64tohex:a.b64tohex,AllowedSigningAlgs:a.AllowedSigningAlgs})},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.OidcClientSettings=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},u=(function(){function A(F,x){for(var D=0;D<x.length;D++){var O=x[D];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(F,O.key,O)}}return function(F,x,D){return x&&A(F.prototype,x),D&&A(F,D),F}})(),c=s(0),h=s(23),f=s(6),p=s(24),g=s(2);function y(A,F){if(!(A instanceof F))throw new TypeError("Cannot call a class as a function")}var S=".well-known/openid-configuration",w="id_token",R="openid",T="client_secret_post";n.OidcClientSettings=(function(){function A(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},x=F.authority,D=F.metadataUrl,O=F.metadata,K=F.signingKeys,z=F.metadataSeed,X=F.client_id,Ee=F.client_secret,q=F.response_type,Y=q===void 0?w:q,Te=F.scope,re=Te===void 0?R:Te,$e=F.redirect_uri,ze=F.post_logout_redirect_uri,ye=F.client_authentication,Ve=ye===void 0?T:ye,pe=F.prompt,De=F.display,$=F.max_age,G=F.ui_locales,ce=F.acr_values,oe=F.resource,Fe=F.response_mode,Ue=F.filterProtocolClaims,Je=Ue===void 0||Ue,He=F.loadUserInfo,he=He===void 0||He,fe=F.staleStateAge,Oe=fe===void 0?900:fe,ie=F.clockSkew,j=ie===void 0?300:ie,N=F.clockService,L=N===void 0?new h.ClockService:N,V=F.userInfoJwtIssuer,ee=V===void 0?"OP":V,ae=F.mergeClaims,ve=ae!==void 0&&ae,J=F.stateStore,me=J===void 0?new f.WebStorageStateStore:J,xe=F.ResponseValidatorCtor,de=xe===void 0?p.ResponseValidator:xe,st=F.MetadataServiceCtor,ft=st===void 0?g.MetadataService:st,Ge=F.extraQueryParams,pt=Ge===void 0?{}:Ge,Z=F.extraTokenParams,P=Z===void 0?{}:Z;y(this,A),this._authority=x,this._metadataUrl=D,this._metadata=O,this._metadataSeed=z,this._signingKeys=K,this._client_id=X,this._client_secret=Ee,this._response_type=Y,this._scope=re,this._redirect_uri=$e,this._post_logout_redirect_uri=ze,this._client_authentication=Ve,this._prompt=pe,this._display=De,this._max_age=$,this._ui_locales=G,this._acr_values=ce,this._resource=oe,this._response_mode=Fe,this._filterProtocolClaims=!!Je,this._loadUserInfo=!!he,this._staleStateAge=Oe,this._clockSkew=j,this._clockService=L,this._userInfoJwtIssuer=ee,this._mergeClaims=!!ve,this._stateStore=me,this._validator=new de(this),this._metadataService=new ft(this),this._extraQueryParams=(pt===void 0?"undefined":a(pt))==="object"?pt:{},this._extraTokenParams=(P===void 0?"undefined":a(P))==="object"?P:{}}return A.prototype.getEpochTime=function(){return this._clockService.getEpochTime()},u(A,[{key:"client_id",get:function(){return this._client_id},set:function(x){if(this._client_id)throw c.Log.error("OidcClientSettings.set_client_id: client_id has already been assigned."),new Error("client_id has already been assigned.");this._client_id=x}},{key:"client_secret",get:function(){return this._client_secret}},{key:"response_type",get:function(){return this._response_type}},{key:"scope",get:function(){return this._scope}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"post_logout_redirect_uri",get:function(){return this._post_logout_redirect_uri}},{key:"client_authentication",get:function(){return this._client_authentication}},{key:"prompt",get:function(){return this._prompt}},{key:"display",get:function(){return this._display}},{key:"max_age",get:function(){return this._max_age}},{key:"ui_locales",get:function(){return this._ui_locales}},{key:"acr_values",get:function(){return this._acr_values}},{key:"resource",get:function(){return this._resource}},{key:"response_mode",get:function(){return this._response_mode}},{key:"authority",get:function(){return this._authority},set:function(x){if(this._authority)throw c.Log.error("OidcClientSettings.set_authority: authority has already been assigned."),new Error("authority has already been assigned.");this._authority=x}},{key:"metadataUrl",get:function(){return this._metadataUrl||(this._metadataUrl=this.authority,this._metadataUrl&&this._metadataUrl.indexOf(S)<0&&(this._metadataUrl[this._metadataUrl.length-1]!=="/"&&(this._metadataUrl+="/"),this._metadataUrl+=S)),this._metadataUrl}},{key:"metadata",get:function(){return this._metadata},set:function(x){this._metadata=x}},{key:"metadataSeed",get:function(){return this._metadataSeed},set:function(x){this._metadataSeed=x}},{key:"signingKeys",get:function(){return this._signingKeys},set:function(x){this._signingKeys=x}},{key:"filterProtocolClaims",get:function(){return this._filterProtocolClaims}},{key:"loadUserInfo",get:function(){return this._loadUserInfo}},{key:"staleStateAge",get:function(){return this._staleStateAge}},{key:"clockSkew",get:function(){return this._clockSkew}},{key:"userInfoJwtIssuer",get:function(){return this._userInfoJwtIssuer}},{key:"mergeClaims",get:function(){return this._mergeClaims}},{key:"stateStore",get:function(){return this._stateStore}},{key:"validator",get:function(){return this._validator}},{key:"metadataService",get:function(){return this._metadataService}},{key:"extraQueryParams",get:function(){return this._extraQueryParams},set:function(x){(x===void 0?"undefined":a(x))==="object"?this._extraQueryParams=x:this._extraQueryParams={}}},{key:"extraTokenParams",get:function(){return this._extraTokenParams},set:function(x){(x===void 0?"undefined":a(x))==="object"?this._extraTokenParams=x:this._extraTokenParams={}}}]),A})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.WebStorageStateStore=void 0;var a=s(0),u=s(1);function c(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}n.WebStorageStateStore=(function(){function h(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=f.prefix,g=p===void 0?"oidc.":p,y=f.store,S=y===void 0?u.Global.localStorage:y;c(this,h),this._store=S,this._prefix=g}return h.prototype.set=function(p,g){return a.Log.debug("WebStorageStateStore.set",p),p=this._prefix+p,this._store.setItem(p,g),Promise.resolve()},h.prototype.get=function(p){a.Log.debug("WebStorageStateStore.get",p),p=this._prefix+p;var g=this._store.getItem(p);return Promise.resolve(g)},h.prototype.remove=function(p){a.Log.debug("WebStorageStateStore.remove",p),p=this._prefix+p;var g=this._store.getItem(p);return this._store.removeItem(p),Promise.resolve(g)},h.prototype.getAllKeys=function(){a.Log.debug("WebStorageStateStore.getAllKeys");for(var p=[],g=0;g<this._store.length;g++){var y=this._store.key(g);y.indexOf(this._prefix)===0&&p.push(y.substr(this._prefix.length))}return Promise.resolve(p)},h})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.JsonService=void 0;var a=s(0),u=s(1);function c(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}n.JsonService=(function(){function h(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.Global.XMLHttpRequest,g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;c(this,h),f&&Array.isArray(f)?this._contentTypes=f.slice():this._contentTypes=[],this._contentTypes.push("application/json"),g&&this._contentTypes.push("application/jwt"),this._XMLHttpRequest=p,this._jwtHandler=g}return h.prototype.getJson=function(p,g){var y=this;if(!p)throw a.Log.error("JsonService.getJson: No url passed"),new Error("url");return a.Log.debug("JsonService.getJson, url: ",p),new Promise((function(S,w){var R=new y._XMLHttpRequest;R.open("GET",p);var T=y._contentTypes,A=y._jwtHandler;R.onload=function(){if(a.Log.debug("JsonService.getJson: HTTP response received, status",R.status),R.status===200){var F=R.getResponseHeader("Content-Type");if(F){var x=T.find((function(D){if(F.startsWith(D))return!0}));if(x=="application/jwt")return void A(R).then(S,w);if(x)try{return void S(JSON.parse(R.responseText))}catch(D){return a.Log.error("JsonService.getJson: Error parsing JSON response",D.message),void w(D)}}w(Error("Invalid response Content-Type: "+F+", from URL: "+p))}else w(Error(R.statusText+" ("+R.status+")"))},R.onerror=function(){a.Log.error("JsonService.getJson: network error"),w(Error("Network Error"))},g&&(a.Log.debug("JsonService.getJson: token passed, setting Authorization header"),R.setRequestHeader("Authorization","Bearer "+g)),R.send()}))},h.prototype.postForm=function(p,g,y){var S=this;if(!p)throw a.Log.error("JsonService.postForm: No url passed"),new Error("url");return a.Log.debug("JsonService.postForm, url: ",p),new Promise((function(w,R){var T=new S._XMLHttpRequest;T.open("POST",p);var A=S._contentTypes;T.onload=function(){if(a.Log.debug("JsonService.postForm: HTTP response received, status",T.status),T.status!==200){if(T.status===400&&(K=T.getResponseHeader("Content-Type"))&&A.find((function(z){if(K.startsWith(z))return!0})))try{var O=JSON.parse(T.responseText);if(O&&O.error)return a.Log.error("JsonService.postForm: Error from server: ",O.error),void R(new Error(O.error))}catch(z){return a.Log.error("JsonService.postForm: Error parsing JSON response",z.message),void R(z)}R(Error(T.statusText+" ("+T.status+")"))}else{var K;if((K=T.getResponseHeader("Content-Type"))&&A.find((function(z){if(K.startsWith(z))return!0})))try{return void w(JSON.parse(T.responseText))}catch(z){return a.Log.error("JsonService.postForm: Error parsing JSON response",z.message),void R(z)}R(Error("Invalid response Content-Type: "+K+", from URL: "+p))}},T.onerror=function(){a.Log.error("JsonService.postForm: network error"),R(Error("Network Error"))};var F="";for(var x in g){var D=g[x];D&&(F.length>0&&(F+="&"),F+=encodeURIComponent(x),F+="=",F+=encodeURIComponent(D))}T.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),y!==void 0&&T.setRequestHeader("Authorization","Basic "+btoa(y)),T.send(F)}))},h})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.SigninRequest=void 0;var a=s(0),u=s(3),c=s(13);n.SigninRequest=(function(){function h(f){var p=f.url,g=f.client_id,y=f.redirect_uri,S=f.response_type,w=f.scope,R=f.authority,T=f.data,A=f.prompt,F=f.display,x=f.max_age,D=f.ui_locales,O=f.id_token_hint,K=f.login_hint,z=f.acr_values,X=f.resource,Ee=f.response_mode,q=f.request,Y=f.request_uri,Te=f.extraQueryParams,re=f.request_type,$e=f.client_secret,ze=f.extraTokenParams,ye=f.skipUserInfo;if((function(oe,Fe){if(!(oe instanceof Fe))throw new TypeError("Cannot call a class as a function")})(this,h),!p)throw a.Log.error("SigninRequest.ctor: No url passed"),new Error("url");if(!g)throw a.Log.error("SigninRequest.ctor: No client_id passed"),new Error("client_id");if(!y)throw a.Log.error("SigninRequest.ctor: No redirect_uri passed"),new Error("redirect_uri");if(!S)throw a.Log.error("SigninRequest.ctor: No response_type passed"),new Error("response_type");if(!w)throw a.Log.error("SigninRequest.ctor: No scope passed"),new Error("scope");if(!R)throw a.Log.error("SigninRequest.ctor: No authority passed"),new Error("authority");var Ve=h.isOidc(S),pe=h.isCode(S);Ee||(Ee=h.isCode(S)?"query":null),this.state=new c.SigninState({nonce:Ve,data:T,client_id:g,authority:R,redirect_uri:y,code_verifier:pe,request_type:re,response_mode:Ee,client_secret:$e,scope:w,extraTokenParams:ze,skipUserInfo:ye}),p=u.UrlUtility.addQueryParam(p,"client_id",g),p=u.UrlUtility.addQueryParam(p,"redirect_uri",y),p=u.UrlUtility.addQueryParam(p,"response_type",S),p=u.UrlUtility.addQueryParam(p,"scope",w),p=u.UrlUtility.addQueryParam(p,"state",this.state.id),Ve&&(p=u.UrlUtility.addQueryParam(p,"nonce",this.state.nonce)),pe&&(p=u.UrlUtility.addQueryParam(p,"code_challenge",this.state.code_challenge),p=u.UrlUtility.addQueryParam(p,"code_challenge_method","S256"));var De={prompt:A,display:F,max_age:x,ui_locales:D,id_token_hint:O,login_hint:K,acr_values:z,resource:X,request:q,request_uri:Y,response_mode:Ee};for(var $ in De)De[$]&&(p=u.UrlUtility.addQueryParam(p,$,De[$]));for(var G in Te)p=u.UrlUtility.addQueryParam(p,G,Te[G]);this.url=p}return h.isOidc=function(p){return!!p.split(/\s+/g).filter((function(g){return g==="id_token"}))[0]},h.isOAuth=function(p){return!!p.split(/\s+/g).filter((function(g){return g==="token"}))[0]},h.isCode=function(p){return!!p.split(/\s+/g).filter((function(g){return g==="code"}))[0]},h})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.State=void 0;var a=(function(){function f(p,g){for(var y=0;y<g.length;y++){var S=g[y];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(p,S.key,S)}}return function(p,g,y){return g&&f(p.prototype,g),y&&f(p,y),p}})(),u=s(0),c=(function(p){return p&&p.__esModule?p:{default:p}})(s(14));function h(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}n.State=(function(){function f(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},g=p.id,y=p.data,S=p.created,w=p.request_type;h(this,f),this._id=g||(0,c.default)(),this._data=y,this._created=typeof S=="number"&&S>0?S:parseInt(Date.now()/1e3),this._request_type=w}return f.prototype.toStorageString=function(){return u.Log.debug("State.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type})},f.fromStorageString=function(g){return u.Log.debug("State.fromStorageString"),new f(JSON.parse(g))},f.clearStaleState=function(g,y){var S=Date.now()/1e3-y;return g.getAllKeys().then((function(w){u.Log.debug("State.clearStaleState: got keys",w);for(var R=[],T=function(D){var O=w[D];F=g.get(O).then((function(K){var z=!1;if(K)try{var X=f.fromStorageString(K);u.Log.debug("State.clearStaleState: got item from key: ",O,X.created),X.created<=S&&(z=!0)}catch(Ee){u.Log.error("State.clearStaleState: Error parsing state for key",O,Ee.message),z=!0}else u.Log.debug("State.clearStaleState: no item in storage for key: ",O),z=!0;if(z)return u.Log.debug("State.clearStaleState: removed item for key: ",O),g.remove(O)})),R.push(F)},A=0;A<w.length;A++){var F;T(A)}return u.Log.debug("State.clearStaleState: waiting on promise count:",R.length),Promise.all(R)}))},a(f,[{key:"id",get:function(){return this._id}},{key:"data",get:function(){return this._data}},{key:"created",get:function(){return this._created}},{key:"request_type",get:function(){return this._request_type}}]),f})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.OidcClient=void 0;var a=(function(){function T(A,F){for(var x=0;x<F.length;x++){var D=F[x];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(A,D.key,D)}}return function(A,F,x){return F&&T(A.prototype,F),x&&T(A,x),A}})(),u=s(0),c=s(5),h=s(12),f=s(8),p=s(34),g=s(35),y=s(36),S=s(13),w=s(9);function R(T,A){if(!(T instanceof A))throw new TypeError("Cannot call a class as a function")}n.OidcClient=(function(){function T(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};R(this,T),A instanceof c.OidcClientSettings?this._settings=A:this._settings=new c.OidcClientSettings(A)}return T.prototype.createSigninRequest=function(){var F=this,x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=x.response_type,O=x.scope,K=x.redirect_uri,z=x.data,X=x.state,Ee=x.prompt,q=x.display,Y=x.max_age,Te=x.ui_locales,re=x.id_token_hint,$e=x.login_hint,ze=x.acr_values,ye=x.resource,Ve=x.request,pe=x.request_uri,De=x.response_mode,$=x.extraQueryParams,G=x.extraTokenParams,ce=x.request_type,oe=x.skipUserInfo,Fe=arguments[1];u.Log.debug("OidcClient.createSigninRequest");var Ue=this._settings.client_id;D=D||this._settings.response_type,O=O||this._settings.scope,K=K||this._settings.redirect_uri,Ee=Ee||this._settings.prompt,q=q||this._settings.display,Y=Y||this._settings.max_age,Te=Te||this._settings.ui_locales,ze=ze||this._settings.acr_values,ye=ye||this._settings.resource,De=De||this._settings.response_mode,$=$||this._settings.extraQueryParams,G=G||this._settings.extraTokenParams;var Je=this._settings.authority;return f.SigninRequest.isCode(D)&&D!=="code"?Promise.reject(new Error("OpenID Connect hybrid flow is not supported")):this._metadataService.getAuthorizationEndpoint().then((function(He){u.Log.debug("OidcClient.createSigninRequest: Received authorization endpoint",He);var he=new f.SigninRequest({url:He,client_id:Ue,redirect_uri:K,response_type:D,scope:O,data:z||X,authority:Je,prompt:Ee,display:q,max_age:Y,ui_locales:Te,id_token_hint:re,login_hint:$e,acr_values:ze,resource:ye,request:Ve,request_uri:pe,extraQueryParams:$,extraTokenParams:G,request_type:ce,response_mode:De,client_secret:F._settings.client_secret,skipUserInfo:oe}),fe=he.state;return(Fe=Fe||F._stateStore).set(fe.id,fe.toStorageString()).then((function(){return he}))}))},T.prototype.readSigninResponseState=function(F,x){var D=arguments.length>2&&arguments[2]!==void 0&&arguments[2];u.Log.debug("OidcClient.readSigninResponseState");var O=this._settings.response_mode==="query"||!this._settings.response_mode&&f.SigninRequest.isCode(this._settings.response_type),K=O?"?":"#",z=new p.SigninResponse(F,K);if(!z.state)return u.Log.error("OidcClient.readSigninResponseState: No state in response"),Promise.reject(new Error("No state in response"));x=x||this._stateStore;var X=D?x.remove.bind(x):x.get.bind(x);return X(z.state).then((function(Ee){if(!Ee)throw u.Log.error("OidcClient.readSigninResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:S.SigninState.fromStorageString(Ee),response:z}}))},T.prototype.processSigninResponse=function(F,x){var D=this;return u.Log.debug("OidcClient.processSigninResponse"),this.readSigninResponseState(F,x,!0).then((function(O){var K=O.state,z=O.response;return u.Log.debug("OidcClient.processSigninResponse: Received state from storage; validating response"),D._validator.validateSigninResponse(K,z)}))},T.prototype.createSignoutRequest=function(){var F=this,x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=x.id_token_hint,O=x.data,K=x.state,z=x.post_logout_redirect_uri,X=x.extraQueryParams,Ee=x.request_type,q=arguments[1];return u.Log.debug("OidcClient.createSignoutRequest"),z=z||this._settings.post_logout_redirect_uri,X=X||this._settings.extraQueryParams,this._metadataService.getEndSessionEndpoint().then((function(Y){if(!Y)throw u.Log.error("OidcClient.createSignoutRequest: No end session endpoint url returned"),new Error("no end session endpoint");u.Log.debug("OidcClient.createSignoutRequest: Received end session endpoint",Y);var Te=new g.SignoutRequest({url:Y,id_token_hint:D,post_logout_redirect_uri:z,data:O||K,extraQueryParams:X,request_type:Ee}),re=Te.state;return re&&(u.Log.debug("OidcClient.createSignoutRequest: Signout request has state to persist"),(q=q||F._stateStore).set(re.id,re.toStorageString())),Te}))},T.prototype.readSignoutResponseState=function(F,x){var D=arguments.length>2&&arguments[2]!==void 0&&arguments[2];u.Log.debug("OidcClient.readSignoutResponseState");var O=new y.SignoutResponse(F);if(!O.state)return u.Log.debug("OidcClient.readSignoutResponseState: No state in response"),O.error?(u.Log.warn("OidcClient.readSignoutResponseState: Response was error: ",O.error),Promise.reject(new h.ErrorResponse(O))):Promise.resolve({state:void 0,response:O});var K=O.state;x=x||this._stateStore;var z=D?x.remove.bind(x):x.get.bind(x);return z(K).then((function(X){if(!X)throw u.Log.error("OidcClient.readSignoutResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:w.State.fromStorageString(X),response:O}}))},T.prototype.processSignoutResponse=function(F,x){var D=this;return u.Log.debug("OidcClient.processSignoutResponse"),this.readSignoutResponseState(F,x,!0).then((function(O){var K=O.state,z=O.response;return K?(u.Log.debug("OidcClient.processSignoutResponse: Received state from storage; validating response"),D._validator.validateSignoutResponse(K,z)):(u.Log.debug("OidcClient.processSignoutResponse: No state from storage; skipping validating response"),z)}))},T.prototype.clearStaleState=function(F){return u.Log.debug("OidcClient.clearStaleState"),F=F||this._stateStore,w.State.clearStaleState(F,this.settings.staleStateAge)},a(T,[{key:"_stateStore",get:function(){return this.settings.stateStore}},{key:"_validator",get:function(){return this.settings.validator}},{key:"_metadataService",get:function(){return this.settings.metadataService}},{key:"settings",get:function(){return this._settings}},{key:"metadataService",get:function(){return this._metadataService}}]),T})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.TokenClient=void 0;var a=s(7),u=s(2),c=s(0);function h(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}n.TokenClient=(function(){function f(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a.JsonService,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.MetadataService;if(h(this,f),!p)throw c.Log.error("TokenClient.ctor: No settings passed"),new Error("settings");this._settings=p,this._jsonService=new g,this._metadataService=new y(this._settings)}return f.prototype.exchangeCode=function(){var g=this,y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(y=Object.assign({},y)).grant_type=y.grant_type||"authorization_code",y.client_id=y.client_id||this._settings.client_id,y.client_secret=y.client_secret||this._settings.client_secret,y.redirect_uri=y.redirect_uri||this._settings.redirect_uri;var S=void 0,w=y._client_authentication||this._settings._client_authentication;return delete y._client_authentication,y.code?y.redirect_uri?y.code_verifier?y.client_id?y.client_secret||w!="client_secret_basic"?(w=="client_secret_basic"&&(S=y.client_id+":"+y.client_secret,delete y.client_id,delete y.client_secret),this._metadataService.getTokenEndpoint(!1).then((function(R){return c.Log.debug("TokenClient.exchangeCode: Received token endpoint"),g._jsonService.postForm(R,y,S).then((function(T){return c.Log.debug("TokenClient.exchangeCode: response received"),T}))}))):(c.Log.error("TokenClient.exchangeCode: No client_secret passed"),Promise.reject(new Error("A client_secret is required"))):(c.Log.error("TokenClient.exchangeCode: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(c.Log.error("TokenClient.exchangeCode: No code_verifier passed"),Promise.reject(new Error("A code_verifier is required"))):(c.Log.error("TokenClient.exchangeCode: No redirect_uri passed"),Promise.reject(new Error("A redirect_uri is required"))):(c.Log.error("TokenClient.exchangeCode: No code passed"),Promise.reject(new Error("A code is required")))},f.prototype.exchangeRefreshToken=function(){var g=this,y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(y=Object.assign({},y)).grant_type=y.grant_type||"refresh_token",y.client_id=y.client_id||this._settings.client_id,y.client_secret=y.client_secret||this._settings.client_secret;var S=void 0,w=y._client_authentication||this._settings._client_authentication;return delete y._client_authentication,y.refresh_token?y.client_id?(w=="client_secret_basic"&&(S=y.client_id+":"+y.client_secret,delete y.client_id,delete y.client_secret),this._metadataService.getTokenEndpoint(!1).then((function(R){return c.Log.debug("TokenClient.exchangeRefreshToken: Received token endpoint"),g._jsonService.postForm(R,y,S).then((function(T){return c.Log.debug("TokenClient.exchangeRefreshToken: response received"),T}))}))):(c.Log.error("TokenClient.exchangeRefreshToken: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(c.Log.error("TokenClient.exchangeRefreshToken: No refresh_token passed"),Promise.reject(new Error("A refresh_token is required")))},f})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorResponse=void 0;var a=s(0);function u(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}function c(h,f){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||typeof f!="object"&&typeof f!="function"?h:f}n.ErrorResponse=(function(h){function f(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},g=p.error,y=p.error_description,S=p.error_uri,w=p.state,R=p.session_state;if(u(this,f),!g)throw a.Log.error("No error passed to ErrorResponse"),new Error("error");var T=c(this,h.call(this,y||g));return T.name="ErrorResponse",T.error=g,T.error_description=y,T.error_uri=S,T.state=w,T.session_state=R,T}return(function(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);g.prototype=Object.create(y&&y.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(g,y):g.__proto__=y)})(f,h),f})(Error)},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.SigninState=void 0;var a=(function(){function y(S,w){for(var R=0;R<w.length;R++){var T=w[R];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(S,T.key,T)}}return function(S,w,R){return w&&y(S.prototype,w),R&&y(S,R),S}})(),u=s(0),c=s(9),h=s(4),f=(function(S){return S&&S.__esModule?S:{default:S}})(s(14));function p(y,S){if(!(y instanceof S))throw new TypeError("Cannot call a class as a function")}function g(y,S){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!S||typeof S!="object"&&typeof S!="function"?y:S}n.SigninState=(function(y){function S(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=w.nonce,T=w.authority,A=w.client_id,F=w.redirect_uri,x=w.code_verifier,D=w.response_mode,O=w.client_secret,K=w.scope,z=w.extraTokenParams,X=w.skipUserInfo;p(this,S);var Ee=g(this,y.call(this,arguments[0]));if(R===!0?Ee._nonce=(0,f.default)():R&&(Ee._nonce=R),x===!0?Ee._code_verifier=(0,f.default)()+(0,f.default)()+(0,f.default)():x&&(Ee._code_verifier=x),Ee.code_verifier){var q=h.JoseUtil.hashString(Ee.code_verifier,"SHA256");Ee._code_challenge=h.JoseUtil.hexToBase64Url(q)}return Ee._redirect_uri=F,Ee._authority=T,Ee._client_id=A,Ee._response_mode=D,Ee._client_secret=O,Ee._scope=K,Ee._extraTokenParams=z,Ee._skipUserInfo=X,Ee}return(function(R,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);R.prototype=Object.create(T&&T.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(R,T):R.__proto__=T)})(S,y),S.prototype.toStorageString=function(){return u.Log.debug("SigninState.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,nonce:this.nonce,code_verifier:this.code_verifier,redirect_uri:this.redirect_uri,authority:this.authority,client_id:this.client_id,response_mode:this.response_mode,client_secret:this.client_secret,scope:this.scope,extraTokenParams:this.extraTokenParams,skipUserInfo:this.skipUserInfo})},S.fromStorageString=function(R){return u.Log.debug("SigninState.fromStorageString"),new S(JSON.parse(R))},a(S,[{key:"nonce",get:function(){return this._nonce}},{key:"authority",get:function(){return this._authority}},{key:"client_id",get:function(){return this._client_id}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"code_verifier",get:function(){return this._code_verifier}},{key:"code_challenge",get:function(){return this._code_challenge}},{key:"response_mode",get:function(){return this._response_mode}},{key:"client_secret",get:function(){return this._client_secret}},{key:"scope",get:function(){return this._scope}},{key:"extraTokenParams",get:function(){return this._extraTokenParams}},{key:"skipUserInfo",get:function(){return this._skipUserInfo}}]),S})(c.State)},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){return(a!="undefined"&&a!==null&&a.getRandomValues!==void 0?u:c)().replace(/-/g,"")};var a=typeof window<"u"?window.crypto||window.msCrypto:null;function u(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,(function(h){return(h^a.getRandomValues(new Uint8Array(1))[0]&15>>h/4).toString(16)}))}function c(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,(function(h){return(h^16*Math.random()>>h/4).toString(16)}))}t.exports=n.default},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.User=void 0;var a=(function(){function c(h,f){for(var p=0;p<f.length;p++){var g=f[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(h,g.key,g)}}return function(h,f,p){return f&&c(h.prototype,f),p&&c(h,p),h}})(),u=s(0);n.User=(function(){function c(h){var f=h.id_token,p=h.session_state,g=h.access_token,y=h.refresh_token,S=h.token_type,w=h.scope,R=h.profile,T=h.expires_at,A=h.state;(function(x,D){if(!(x instanceof D))throw new TypeError("Cannot call a class as a function")})(this,c),this.id_token=f,this.session_state=p,this.access_token=g,this.refresh_token=y,this.token_type=S,this.scope=w,this.profile=R,this.expires_at=T,this.state=A}return c.prototype.toStorageString=function(){return u.Log.debug("User.toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})},c.fromStorageString=function(f){return u.Log.debug("User.fromStorageString"),new c(JSON.parse(f))},a(c,[{key:"expires_in",get:function(){if(this.expires_at){var f=parseInt(Date.now()/1e3);return this.expires_at-f}},set:function(f){var p=parseInt(f);if(typeof p=="number"&&p>0){var g=parseInt(Date.now()/1e3);this.expires_at=g+p}}},{key:"expired",get:function(){var f=this.expires_in;if(f!==void 0)return f<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}}]),c})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.AccessTokenEvents=void 0;var a=s(0),u=s(46);function c(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}n.AccessTokenEvents=(function(){function h(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=f.accessTokenExpiringNotificationTime,g=p===void 0?60:p,y=f.accessTokenExpiringTimer,S=y===void 0?new u.Timer("Access token expiring"):y,w=f.accessTokenExpiredTimer,R=w===void 0?new u.Timer("Access token expired"):w;c(this,h),this._accessTokenExpiringNotificationTime=g,this._accessTokenExpiring=S,this._accessTokenExpired=R}return h.prototype.load=function(p){if(p.access_token&&p.expires_in!==void 0){var g=p.expires_in;if(a.Log.debug("AccessTokenEvents.load: access token present, remaining duration:",g),g>0){var y=g-this._accessTokenExpiringNotificationTime;y<=0&&(y=1),a.Log.debug("AccessTokenEvents.load: registering expiring timer in:",y),this._accessTokenExpiring.init(y)}else a.Log.debug("AccessTokenEvents.load: canceling existing expiring timer becase we're past expiration."),this._accessTokenExpiring.cancel();var S=g+1;a.Log.debug("AccessTokenEvents.load: registering expired timer in:",S),this._accessTokenExpired.init(S)}else this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},h.prototype.unload=function(){a.Log.debug("AccessTokenEvents.unload: canceling existing access token timers"),this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},h.prototype.addAccessTokenExpiring=function(p){this._accessTokenExpiring.addHandler(p)},h.prototype.removeAccessTokenExpiring=function(p){this._accessTokenExpiring.removeHandler(p)},h.prototype.addAccessTokenExpired=function(p){this._accessTokenExpired.addHandler(p)},h.prototype.removeAccessTokenExpired=function(p){this._accessTokenExpired.removeHandler(p)},h})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.Event=void 0;var a=s(0);n.Event=(function(){function u(c){(function(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")})(this,u),this._name=c,this._callbacks=[]}return u.prototype.addHandler=function(h){this._callbacks.push(h)},u.prototype.removeHandler=function(h){var f=this._callbacks.findIndex((function(p){return p===h}));f>=0&&this._callbacks.splice(f,1)},u.prototype.raise=function(){a.Log.debug("Event: Raising event: "+this._name);for(var h=0;h<this._callbacks.length;h++){var f;(f=this._callbacks)[h].apply(f,arguments)}},u})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.SessionMonitor=void 0;var a=(function(){function p(g,y){for(var S=0;S<y.length;S++){var w=y[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,y,S){return y&&p(g.prototype,y),S&&p(g,S),g}})(),u=s(0),c=s(19),h=s(1);function f(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}n.SessionMonitor=(function(){function p(g){var y=this,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c.CheckSessionIFrame,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.Global.timer;if(f(this,p),!g)throw u.Log.error("SessionMonitor.ctor: No user manager passed to SessionMonitor"),new Error("userManager");this._userManager=g,this._CheckSessionIFrameCtor=S,this._timer=w,this._userManager.events.addUserLoaded(this._start.bind(this)),this._userManager.events.addUserUnloaded(this._stop.bind(this)),Promise.resolve(this._userManager.getUser().then((function(R){R?y._start(R):y._settings.monitorAnonymousSession&&y._userManager.querySessionStatus().then((function(T){var A={session_state:T.session_state};T.sub&&T.sid&&(A.profile={sub:T.sub,sid:T.sid}),y._start(A)})).catch((function(T){u.Log.error("SessionMonitor ctor: error from querySessionStatus:",T.message)}))})).catch((function(R){u.Log.error("SessionMonitor ctor: error from getUser:",R.message)})))}return p.prototype._start=function(y){var S=this,w=y.session_state;w&&(y.profile?(this._sub=y.profile.sub,this._sid=y.profile.sid,u.Log.debug("SessionMonitor._start: session_state:",w,", sub:",this._sub)):(this._sub=void 0,this._sid=void 0,u.Log.debug("SessionMonitor._start: session_state:",w,", anonymous user")),this._checkSessionIFrame?this._checkSessionIFrame.start(w):this._metadataService.getCheckSessionIframe().then((function(R){if(R){u.Log.debug("SessionMonitor._start: Initializing check session iframe");var T=S._client_id,A=S._checkSessionInterval,F=S._stopCheckSessionOnError;S._checkSessionIFrame=new S._CheckSessionIFrameCtor(S._callback.bind(S),T,R,A,F),S._checkSessionIFrame.load().then((function(){S._checkSessionIFrame.start(w)}))}else u.Log.warn("SessionMonitor._start: No check session iframe found in the metadata")})).catch((function(R){u.Log.error("SessionMonitor._start: Error from getCheckSessionIframe:",R.message)})))},p.prototype._stop=function(){var y=this;if(this._sub=void 0,this._sid=void 0,this._checkSessionIFrame&&(u.Log.debug("SessionMonitor._stop"),this._checkSessionIFrame.stop()),this._settings.monitorAnonymousSession)var S=this._timer.setInterval((function(){y._timer.clearInterval(S),y._userManager.querySessionStatus().then((function(w){var R={session_state:w.session_state};w.sub&&w.sid&&(R.profile={sub:w.sub,sid:w.sid}),y._start(R)})).catch((function(w){u.Log.error("SessionMonitor: error from querySessionStatus:",w.message)}))}),1e3)},p.prototype._callback=function(){var y=this;this._userManager.querySessionStatus().then((function(S){var w=!0;S?S.sub===y._sub?(w=!1,y._checkSessionIFrame.start(S.session_state),S.sid===y._sid?u.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, restarting check session iframe; session_state:",S.session_state):(u.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, session state has changed, restarting check session iframe; session_state:",S.session_state),y._userManager.events._raiseUserSessionChanged())):u.Log.debug("SessionMonitor._callback: Different subject signed into OP:",S.sub):u.Log.debug("SessionMonitor._callback: Subject no longer signed into OP"),w&&(y._sub?(u.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed out event"),y._userManager.events._raiseUserSignedOut()):(u.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed in event"),y._userManager.events._raiseUserSignedIn()))})).catch((function(S){y._sub&&(u.Log.debug("SessionMonitor._callback: Error calling queryCurrentSigninSession; raising signed out event",S.message),y._userManager.events._raiseUserSignedOut())}))},a(p,[{key:"_settings",get:function(){return this._userManager.settings}},{key:"_metadataService",get:function(){return this._userManager.metadataService}},{key:"_client_id",get:function(){return this._settings.client_id}},{key:"_checkSessionInterval",get:function(){return this._settings.checkSessionInterval}},{key:"_stopCheckSessionOnError",get:function(){return this._settings.stopCheckSessionOnError}}]),p})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.CheckSessionIFrame=void 0;var a=s(0);function u(c,h){if(!(c instanceof h))throw new TypeError("Cannot call a class as a function")}n.CheckSessionIFrame=(function(){function c(h,f,p,g){var y=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];u(this,c),this._callback=h,this._client_id=f,this._url=p,this._interval=g||2e3,this._stopOnError=y;var S=p.indexOf("/",p.indexOf("//")+2);this._frame_origin=p.substr(0,S),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.style.display="none",this._frame.width=0,this._frame.height=0,this._frame.src=p}return c.prototype.load=function(){var f=this;return new Promise((function(p){f._frame.onload=function(){p()},window.document.body.appendChild(f._frame),f._boundMessageEvent=f._message.bind(f),window.addEventListener("message",f._boundMessageEvent,!1)}))},c.prototype._message=function(f){f.origin===this._frame_origin&&f.source===this._frame.contentWindow&&(f.data==="error"?(a.Log.error("CheckSessionIFrame: error message from check session op iframe"),this._stopOnError&&this.stop()):f.data==="changed"?(a.Log.debug("CheckSessionIFrame: changed message from check session op iframe"),this.stop(),this._callback()):a.Log.debug("CheckSessionIFrame: "+f.data+" message from check session op iframe"))},c.prototype.start=function(f){var p=this;if(this._session_state!==f){a.Log.debug("CheckSessionIFrame.start"),this.stop(),this._session_state=f;var g=function(){p._frame.contentWindow.postMessage(p._client_id+" "+p._session_state,p._frame_origin)};g(),this._timer=window.setInterval(g,this._interval)}},c.prototype.stop=function(){this._session_state=null,this._timer&&(a.Log.debug("CheckSessionIFrame.stop"),window.clearInterval(this._timer),this._timer=null)},c})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.TokenRevocationClient=void 0;var a=s(0),u=s(2),c=s(1);function h(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}var f="access_token",p="refresh_token";n.TokenRevocationClient=(function(){function g(y){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c.Global.XMLHttpRequest,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.MetadataService;if(h(this,g),!y)throw a.Log.error("TokenRevocationClient.ctor: No settings provided"),new Error("No settings provided.");this._settings=y,this._XMLHttpRequestCtor=S,this._metadataService=new w(this._settings)}return g.prototype.revoke=function(S,w){var R=this,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"access_token";if(!S)throw a.Log.error("TokenRevocationClient.revoke: No token provided"),new Error("No token provided.");if(T!==f&&T!=p)throw a.Log.error("TokenRevocationClient.revoke: Invalid token type"),new Error("Invalid token type.");return this._metadataService.getRevocationEndpoint().then((function(A){if(A){a.Log.debug("TokenRevocationClient.revoke: Revoking "+T);var F=R._settings.client_id,x=R._settings.client_secret;return R._revoke(A,F,x,S,T)}if(w)throw a.Log.error("TokenRevocationClient.revoke: Revocation not supported"),new Error("Revocation not supported")}))},g.prototype._revoke=function(S,w,R,T,A){var F=this;return new Promise((function(x,D){var O=new F._XMLHttpRequestCtor;O.open("POST",S),O.onload=function(){a.Log.debug("TokenRevocationClient.revoke: HTTP response received, status",O.status),O.status===200?x():D(Error(O.statusText+" ("+O.status+")"))},O.onerror=function(){a.Log.debug("TokenRevocationClient.revoke: Network Error."),D("Network Error")};var K="client_id="+encodeURIComponent(w);R&&(K+="&client_secret="+encodeURIComponent(R)),K+="&token_type_hint="+encodeURIComponent(A),K+="&token="+encodeURIComponent(T),O.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),O.send(K)}))},g})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.CordovaPopupWindow=void 0;var a=(function(){function c(h,f){for(var p=0;p<f.length;p++){var g=f[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(h,g.key,g)}}return function(h,f,p){return f&&c(h.prototype,f),p&&c(h,p),h}})(),u=s(0);n.CordovaPopupWindow=(function(){function c(h){var f=this;(function(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")})(this,c),this._promise=new Promise((function(p,g){f._resolve=p,f._reject=g})),this.features=h.popupWindowFeatures||"location=no,toolbar=no,zoom=no",this.target=h.popupWindowTarget||"_blank",this.redirect_uri=h.startUrl,u.Log.debug("CordovaPopupWindow.ctor: redirect_uri: "+this.redirect_uri)}return c.prototype._isInAppBrowserInstalled=function(f){return["cordova-plugin-inappbrowser","cordova-plugin-inappbrowser.inappbrowser","org.apache.cordova.inappbrowser"].some((function(p){return f.hasOwnProperty(p)}))},c.prototype.navigate=function(f){if(f&&f.url){if(!window.cordova)return this._error("cordova is undefined");var p=window.cordova.require("cordova/plugin_list").metadata;if(this._isInAppBrowserInstalled(p)===!1)return this._error("InAppBrowser plugin not found");this._popup=cordova.InAppBrowser.open(f.url,this.target,this.features),this._popup?(u.Log.debug("CordovaPopupWindow.navigate: popup successfully created"),this._exitCallbackEvent=this._exitCallback.bind(this),this._loadStartCallbackEvent=this._loadStartCallback.bind(this),this._popup.addEventListener("exit",this._exitCallbackEvent,!1),this._popup.addEventListener("loadstart",this._loadStartCallbackEvent,!1)):this._error("Error opening popup window")}else this._error("No url provided");return this.promise},c.prototype._loadStartCallback=function(f){f.url.indexOf(this.redirect_uri)===0&&this._success({url:f.url})},c.prototype._exitCallback=function(f){this._error(f)},c.prototype._success=function(f){this._cleanup(),u.Log.debug("CordovaPopupWindow: Successful response from cordova popup window"),this._resolve(f)},c.prototype._error=function(f){this._cleanup(),u.Log.error(f),this._reject(new Error(f))},c.prototype.close=function(){this._cleanup()},c.prototype._cleanup=function(){this._popup&&(u.Log.debug("CordovaPopupWindow: cleaning up popup"),this._popup.removeEventListener("exit",this._exitCallbackEvent,!1),this._popup.removeEventListener("loadstart",this._loadStartCallbackEvent,!1),this._popup.close()),this._popup=null},a(c,[{key:"promise",get:function(){return this._promise}}]),c})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0});var a=s(0),u=s(10),c=s(5),h=s(6),f=s(37),p=s(38),g=s(16),y=s(2),S=s(48),w=s(49),R=s(19),T=s(20),A=s(18),F=s(1),x=s(15),D=s(50);n.default={Version:D.Version,Log:a.Log,OidcClient:u.OidcClient,OidcClientSettings:c.OidcClientSettings,WebStorageStateStore:h.WebStorageStateStore,InMemoryWebStorage:f.InMemoryWebStorage,UserManager:p.UserManager,AccessTokenEvents:g.AccessTokenEvents,MetadataService:y.MetadataService,CordovaPopupNavigator:S.CordovaPopupNavigator,CordovaIFrameNavigator:w.CordovaIFrameNavigator,CheckSessionIFrame:R.CheckSessionIFrame,TokenRevocationClient:T.TokenRevocationClient,SessionMonitor:A.SessionMonitor,Global:F.Global,User:x.User},t.exports=n.default},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.ClockService=(function(){function a(){(function(c,h){if(!(c instanceof h))throw new TypeError("Cannot call a class as a function")})(this,a)}return a.prototype.getEpochTime=function(){return Promise.resolve(Date.now()/1e3|0)},a})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.ResponseValidator=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},u=s(0),c=s(2),h=s(25),f=s(11),p=s(12),g=s(4);function y(w,R){if(!(w instanceof R))throw new TypeError("Cannot call a class as a function")}var S=["nonce","at_hash","iat","nbf","exp","aud","iss","c_hash"];n.ResponseValidator=(function(){function w(R){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c.MetadataService,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.UserInfoService,F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:g.JoseUtil,x=arguments.length>4&&arguments[4]!==void 0?arguments[4]:f.TokenClient;if(y(this,w),!R)throw u.Log.error("ResponseValidator.ctor: No settings passed to ResponseValidator"),new Error("settings");this._settings=R,this._metadataService=new T(this._settings),this._userInfoService=new A(this._settings),this._joseUtil=F,this._tokenClient=new x(this._settings)}return w.prototype.validateSigninResponse=function(T,A){var F=this;return u.Log.debug("ResponseValidator.validateSigninResponse"),this._processSigninParams(T,A).then((function(x){return u.Log.debug("ResponseValidator.validateSigninResponse: state processed"),F._validateTokens(T,x).then((function(D){return u.Log.debug("ResponseValidator.validateSigninResponse: tokens validated"),F._processClaims(T,D).then((function(O){return u.Log.debug("ResponseValidator.validateSigninResponse: claims processed"),O}))}))}))},w.prototype.validateSignoutResponse=function(T,A){return T.id!==A.state?(u.Log.error("ResponseValidator.validateSignoutResponse: State does not match"),Promise.reject(new Error("State does not match"))):(u.Log.debug("ResponseValidator.validateSignoutResponse: state validated"),A.state=T.data,A.error?(u.Log.warn("ResponseValidator.validateSignoutResponse: Response was error",A.error),Promise.reject(new p.ErrorResponse(A))):Promise.resolve(A))},w.prototype._processSigninParams=function(T,A){if(T.id!==A.state)return u.Log.error("ResponseValidator._processSigninParams: State does not match"),Promise.reject(new Error("State does not match"));if(!T.client_id)return u.Log.error("ResponseValidator._processSigninParams: No client_id on state"),Promise.reject(new Error("No client_id on state"));if(!T.authority)return u.Log.error("ResponseValidator._processSigninParams: No authority on state"),Promise.reject(new Error("No authority on state"));if(this._settings.authority){if(this._settings.authority&&this._settings.authority!==T.authority)return u.Log.error("ResponseValidator._processSigninParams: authority mismatch on settings vs. signin state"),Promise.reject(new Error("authority mismatch on settings vs. signin state"))}else this._settings.authority=T.authority;if(this._settings.client_id){if(this._settings.client_id&&this._settings.client_id!==T.client_id)return u.Log.error("ResponseValidator._processSigninParams: client_id mismatch on settings vs. signin state"),Promise.reject(new Error("client_id mismatch on settings vs. signin state"))}else this._settings.client_id=T.client_id;return u.Log.debug("ResponseValidator._processSigninParams: state validated"),A.state=T.data,A.error?(u.Log.warn("ResponseValidator._processSigninParams: Response was error",A.error),Promise.reject(new p.ErrorResponse(A))):T.nonce&&!A.id_token?(u.Log.error("ResponseValidator._processSigninParams: Expecting id_token in response"),Promise.reject(new Error("No id_token in response"))):!T.nonce&&A.id_token?(u.Log.error("ResponseValidator._processSigninParams: Not expecting id_token in response"),Promise.reject(new Error("Unexpected id_token in response"))):T.code_verifier&&!A.code?(u.Log.error("ResponseValidator._processSigninParams: Expecting code in response"),Promise.reject(new Error("No code in response"))):!T.code_verifier&&A.code?(u.Log.error("ResponseValidator._processSigninParams: Not expecting code in response"),Promise.reject(new Error("Unexpected code in response"))):(A.scope||(A.scope=T.scope),Promise.resolve(A))},w.prototype._processClaims=function(T,A){var F=this;if(A.isOpenIdConnect){if(u.Log.debug("ResponseValidator._processClaims: response is OIDC, processing claims"),A.profile=this._filterProtocolClaims(A.profile),T.skipUserInfo!==!0&&this._settings.loadUserInfo&&A.access_token)return u.Log.debug("ResponseValidator._processClaims: loading user info"),this._userInfoService.getClaims(A.access_token).then((function(x){return u.Log.debug("ResponseValidator._processClaims: user info claims received from user info endpoint"),x.sub!==A.profile.sub?(u.Log.error("ResponseValidator._processClaims: sub from user info endpoint does not match sub in id_token"),Promise.reject(new Error("sub from user info endpoint does not match sub in id_token"))):(A.profile=F._mergeClaims(A.profile,x),u.Log.debug("ResponseValidator._processClaims: user info claims received, updated profile:",A.profile),A)}));u.Log.debug("ResponseValidator._processClaims: not loading user info")}else u.Log.debug("ResponseValidator._processClaims: response is not OIDC, not processing claims");return Promise.resolve(A)},w.prototype._mergeClaims=function(T,A){var F=Object.assign({},T);for(var x in A){var D=A[x];Array.isArray(D)||(D=[D]);for(var O=0;O<D.length;O++){var K=D[O];F[x]?Array.isArray(F[x])?F[x].indexOf(K)<0&&F[x].push(K):F[x]!==K&&((K===void 0?"undefined":a(K))==="object"&&this._settings.mergeClaims?F[x]=this._mergeClaims(F[x],K):F[x]=[F[x],K]):F[x]=K}}return F},w.prototype._filterProtocolClaims=function(T){u.Log.debug("ResponseValidator._filterProtocolClaims, incoming claims:",T);var A=Object.assign({},T);return this._settings._filterProtocolClaims?(S.forEach((function(F){delete A[F]})),u.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims filtered",A)):u.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims not filtered"),A},w.prototype._validateTokens=function(T,A){return A.code?(u.Log.debug("ResponseValidator._validateTokens: Validating code"),this._processCode(T,A)):A.id_token?A.access_token?(u.Log.debug("ResponseValidator._validateTokens: Validating id_token and access_token"),this._validateIdTokenAndAccessToken(T,A)):(u.Log.debug("ResponseValidator._validateTokens: Validating id_token"),this._validateIdToken(T,A)):(u.Log.debug("ResponseValidator._validateTokens: No code to process or id_token to validate"),Promise.resolve(A))},w.prototype._processCode=function(T,A){var F=this,x={client_id:T.client_id,client_secret:T.client_secret,code:A.code,redirect_uri:T.redirect_uri,code_verifier:T.code_verifier};return T.extraTokenParams&&a(T.extraTokenParams)==="object"&&Object.assign(x,T.extraTokenParams),this._tokenClient.exchangeCode(x).then((function(D){for(var O in D)A[O]=D[O];return A.id_token?(u.Log.debug("ResponseValidator._processCode: token response successful, processing id_token"),F._validateIdTokenAttributes(T,A)):(u.Log.debug("ResponseValidator._processCode: token response successful, returning response"),A)}))},w.prototype._validateIdTokenAttributes=function(T,A){var F=this;return this._metadataService.getIssuer().then((function(x){var D=T.client_id,O=F._settings.clockSkew;return u.Log.debug("ResponseValidator._validateIdTokenAttributes: Validaing JWT attributes; using clock skew (in seconds) of: ",O),F._settings.getEpochTime().then((function(K){return F._joseUtil.validateJwtAttributes(A.id_token,x,D,O,K).then((function(z){return T.nonce&&T.nonce!==z.nonce?(u.Log.error("ResponseValidator._validateIdTokenAttributes: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"))):z.sub?(A.profile=z,A):(u.Log.error("ResponseValidator._validateIdTokenAttributes: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))}))}))}))},w.prototype._validateIdTokenAndAccessToken=function(T,A){var F=this;return this._validateIdToken(T,A).then((function(x){return F._validateAccessToken(x)}))},w.prototype._getSigningKeyForJwt=function(T){var A=this;return this._metadataService.getSigningKeys().then((function(F){var x=T.header.kid;if(!F)return u.Log.error("ResponseValidator._validateIdToken: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));u.Log.debug("ResponseValidator._validateIdToken: Received signing keys");var D=void 0;if(x)D=F.filter((function(O){return O.kid===x}))[0];else{if((F=A._filterByAlg(F,T.header.alg)).length>1)return u.Log.error("ResponseValidator._validateIdToken: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));D=F[0]}return Promise.resolve(D)}))},w.prototype._getSigningKeyForJwtWithSingleRetry=function(T){var A=this;return this._getSigningKeyForJwt(T).then((function(F){return F?Promise.resolve(F):(A._metadataService.resetSigningKeys(),A._getSigningKeyForJwt(T))}))},w.prototype._validateIdToken=function(T,A){var F=this;if(!T.nonce)return u.Log.error("ResponseValidator._validateIdToken: No nonce on state"),Promise.reject(new Error("No nonce on state"));var x=this._joseUtil.parseJwt(A.id_token);return x&&x.header&&x.payload?T.nonce!==x.payload.nonce?(u.Log.error("ResponseValidator._validateIdToken: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"))):this._metadataService.getIssuer().then((function(D){return u.Log.debug("ResponseValidator._validateIdToken: Received issuer"),F._getSigningKeyForJwtWithSingleRetry(x).then((function(O){if(!O)return u.Log.error("ResponseValidator._validateIdToken: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var K=T.client_id,z=F._settings.clockSkew;return u.Log.debug("ResponseValidator._validateIdToken: Validaing JWT; using clock skew (in seconds) of: ",z),F._joseUtil.validateJwt(A.id_token,O,D,K,z).then((function(){return u.Log.debug("ResponseValidator._validateIdToken: JWT validation successful"),x.payload.sub?(A.profile=x.payload,A):(u.Log.error("ResponseValidator._validateIdToken: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))}))}))})):(u.Log.error("ResponseValidator._validateIdToken: Failed to parse id_token",x),Promise.reject(new Error("Failed to parse id_token")))},w.prototype._filterByAlg=function(T,A){var F=null;if(A.startsWith("RS"))F="RSA";else if(A.startsWith("PS"))F="PS";else{if(!A.startsWith("ES"))return u.Log.debug("ResponseValidator._filterByAlg: alg not supported: ",A),[];F="EC"}return u.Log.debug("ResponseValidator._filterByAlg: Looking for keys that match kty: ",F),T=T.filter((function(x){return x.kty===F})),u.Log.debug("ResponseValidator._filterByAlg: Number of keys that match kty: ",F,T.length),T},w.prototype._validateAccessToken=function(T){if(!T.profile)return u.Log.error("ResponseValidator._validateAccessToken: No profile loaded from id_token"),Promise.reject(new Error("No profile loaded from id_token"));if(!T.profile.at_hash)return u.Log.error("ResponseValidator._validateAccessToken: No at_hash in id_token"),Promise.reject(new Error("No at_hash in id_token"));if(!T.id_token)return u.Log.error("ResponseValidator._validateAccessToken: No id_token"),Promise.reject(new Error("No id_token"));var A=this._joseUtil.parseJwt(T.id_token);if(!A||!A.header)return u.Log.error("ResponseValidator._validateAccessToken: Failed to parse id_token",A),Promise.reject(new Error("Failed to parse id_token"));var F=A.header.alg;if(!F||F.length!==5)return u.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",F),Promise.reject(new Error("Unsupported alg: "+F));var x=F.substr(2,3);if(!x)return u.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",F,x),Promise.reject(new Error("Unsupported alg: "+F));if((x=parseInt(x))!==256&&x!==384&&x!==512)return u.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",F,x),Promise.reject(new Error("Unsupported alg: "+F));var D="sha"+x,O=this._joseUtil.hashString(T.access_token,D);if(!O)return u.Log.error("ResponseValidator._validateAccessToken: access_token hash failed:",D),Promise.reject(new Error("Failed to validate at_hash"));var K=O.substr(0,O.length/2),z=this._joseUtil.hexToBase64Url(K);return z!==T.profile.at_hash?(u.Log.error("ResponseValidator._validateAccessToken: Failed to validate at_hash",z,T.profile.at_hash),Promise.reject(new Error("Failed to validate at_hash"))):(u.Log.debug("ResponseValidator._validateAccessToken: success"),Promise.resolve(T))},w})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.UserInfoService=void 0;var a=s(7),u=s(2),c=s(0),h=s(4);function f(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}n.UserInfoService=(function(){function p(g){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a.JsonService,S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.MetadataService,w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:h.JoseUtil;if(f(this,p),!g)throw c.Log.error("UserInfoService.ctor: No settings passed"),new Error("settings");this._settings=g,this._jsonService=new y(void 0,void 0,this._getClaimsFromJwt.bind(this)),this._metadataService=new S(this._settings),this._joseUtil=w}return p.prototype.getClaims=function(y){var S=this;return y?this._metadataService.getUserInfoEndpoint().then((function(w){return c.Log.debug("UserInfoService.getClaims: received userinfo url",w),S._jsonService.getJson(w,y).then((function(R){return c.Log.debug("UserInfoService.getClaims: claims received",R),R}))})):(c.Log.error("UserInfoService.getClaims: No token passed"),Promise.reject(new Error("A token is required")))},p.prototype._getClaimsFromJwt=function(y){var S=this;try{var w=this._joseUtil.parseJwt(y.responseText);if(!w||!w.header||!w.payload)return c.Log.error("UserInfoService._getClaimsFromJwt: Failed to parse JWT",w),Promise.reject(new Error("Failed to parse id_token"));var R=w.header.kid,T=void 0;switch(this._settings.userInfoJwtIssuer){case"OP":T=this._metadataService.getIssuer();break;case"ANY":T=Promise.resolve(w.payload.iss);break;default:T=Promise.resolve(this._settings.userInfoJwtIssuer)}return T.then((function(A){return c.Log.debug("UserInfoService._getClaimsFromJwt: Received issuer:"+A),S._metadataService.getSigningKeys().then((function(F){if(!F)return c.Log.error("UserInfoService._getClaimsFromJwt: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));c.Log.debug("UserInfoService._getClaimsFromJwt: Received signing keys");var x=void 0;if(R)x=F.filter((function(K){return K.kid===R}))[0];else{if((F=S._filterByAlg(F,w.header.alg)).length>1)return c.Log.error("UserInfoService._getClaimsFromJwt: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));x=F[0]}if(!x)return c.Log.error("UserInfoService._getClaimsFromJwt: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var D=S._settings.client_id,O=S._settings.clockSkew;return c.Log.debug("UserInfoService._getClaimsFromJwt: Validaing JWT; using clock skew (in seconds) of: ",O),S._joseUtil.validateJwt(y.responseText,x,A,D,O,void 0,!0).then((function(){return c.Log.debug("UserInfoService._getClaimsFromJwt: JWT validation successful"),w.payload}))}))}))}catch(A){return c.Log.error("UserInfoService._getClaimsFromJwt: Error parsing JWT response",A.message),void reject(A)}},p.prototype._filterByAlg=function(y,S){var w=null;if(S.startsWith("RS"))w="RSA";else if(S.startsWith("PS"))w="PS";else{if(!S.startsWith("ES"))return c.Log.debug("UserInfoService._filterByAlg: alg not supported: ",S),[];w="EC"}return c.Log.debug("UserInfoService._filterByAlg: Looking for keys that match kty: ",w),y=y.filter((function(R){return R.kty===w})),c.Log.debug("UserInfoService._filterByAlg: Number of keys that match kty: ",w,y.length),y},p})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.AllowedSigningAlgs=n.b64tohex=n.hextob64u=n.crypto=n.X509=n.KeyUtil=n.jws=void 0;var a=s(27);n.jws=a.jws,n.KeyUtil=a.KEYUTIL,n.X509=a.X509,n.crypto=a.crypto,n.hextob64u=a.hextob64u,n.b64tohex=a.b64tohex,n.AllowedSigningAlgs=["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"]},function(t,n,s){(function(a){Object.defineProperty(n,"__esModule",{value:!0});var u,c,h,f,p,g,y,S,w,R,T,A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},F={},x={},D=D||(u=Math,h=(c={}).lib={},f=h.Base=(function(){function _(){}return{extend:function(v){_.prototype=this;var I=new _;return v&&I.mixIn(v),I.hasOwnProperty("init")||(I.init=function(){I.$super.init.apply(this,arguments)}),I.init.prototype=I,I.$super=this,I},create:function(){var v=this.extend();return v.init.apply(v,arguments),v},init:function(){},mixIn:function(v){for(var I in v)v.hasOwnProperty(I)&&(this[I]=v[I]);v.hasOwnProperty("toString")&&(this.toString=v.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),p=h.WordArray=f.extend({init:function(b,v){b=this.words=b||[],this.sigBytes=v??4*b.length},toString:function(b){return(b||y).stringify(this)},concat:function(b){var v=this.words,I=b.words,k=this.sigBytes,Q=b.sigBytes;if(this.clamp(),k%4)for(var te=0;te<Q;te++){var we=I[te>>>2]>>>24-te%4*8&255;v[k+te>>>2]|=we<<24-(k+te)%4*8}else for(te=0;te<Q;te+=4)v[k+te>>>2]=I[te>>>2];return this.sigBytes+=Q,this},clamp:function(){var b=this.words,v=this.sigBytes;b[v>>>2]&=4294967295<<32-v%4*8,b.length=u.ceil(v/4)},clone:function(){var b=f.clone.call(this);return b.words=this.words.slice(0),b},random:function(b){for(var v=[],I=0;I<b;I+=4)v.push(4294967296*u.random()|0);return new p.init(v,b)}}),g=c.enc={},y=g.Hex={stringify:function(b){for(var v=b.words,I=b.sigBytes,k=[],Q=0;Q<I;Q++){var te=v[Q>>>2]>>>24-Q%4*8&255;k.push((te>>>4).toString(16)),k.push((15&te).toString(16))}return k.join("")},parse:function(b){for(var v=b.length,I=[],k=0;k<v;k+=2)I[k>>>3]|=parseInt(b.substr(k,2),16)<<24-k%8*4;return new p.init(I,v/2)}},S=g.Latin1={stringify:function(b){for(var v=b.words,I=b.sigBytes,k=[],Q=0;Q<I;Q++){var te=v[Q>>>2]>>>24-Q%4*8&255;k.push(String.fromCharCode(te))}return k.join("")},parse:function(b){for(var v=b.length,I=[],k=0;k<v;k++)I[k>>>2]|=(255&b.charCodeAt(k))<<24-k%4*8;return new p.init(I,v)}},w=g.Utf8={stringify:function(b){try{return decodeURIComponent(escape(S.stringify(b)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(b){return S.parse(unescape(encodeURIComponent(b)))}},R=h.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new p.init,this._nDataBytes=0},_append:function(b){typeof b=="string"&&(b=w.parse(b)),this._data.concat(b),this._nDataBytes+=b.sigBytes},_process:function(b){var v=this._data,I=v.words,k=v.sigBytes,Q=this.blockSize,te=k/(4*Q),we=(te=b?u.ceil(te):u.max((0|te)-this._minBufferSize,0))*Q,ge=u.min(4*we,k);if(we){for(var be=0;be<we;be+=Q)this._doProcessBlock(I,be);var _e=I.splice(0,we);v.sigBytes-=ge}return new p.init(_e,ge)},clone:function(){var b=f.clone.call(this);return b._data=this._data.clone(),b},_minBufferSize:0}),h.Hasher=R.extend({cfg:f.extend(),init:function(b){this.cfg=this.cfg.extend(b),this.reset()},reset:function(){R.reset.call(this),this._doReset()},update:function(b){return this._append(b),this._process(),this},finalize:function(b){return b&&this._append(b),this._doFinalize()},blockSize:16,_createHelper:function(b){return function(v,I){return new b.init(I).finalize(v)}},_createHmacHelper:function(b){return function(v,I){return new T.HMAC.init(b,I).finalize(v)}}}),T=c.algo={},c);(function(_){var b,v=(b=D).lib,I=v.Base,k=v.WordArray;(b=b.x64={}).Word=I.extend({init:function(te,we){this.high=te,this.low=we}}),b.WordArray=I.extend({init:function(te,we){te=this.words=te||[],this.sigBytes=we??8*te.length},toX32:function(){for(var te=this.words,we=te.length,ge=[],be=0;be<we;be++){var _e=te[be];ge.push(_e.high),ge.push(_e.low)}return k.create(ge,this.sigBytes)},clone:function(){for(var te=I.clone.call(this),we=te.words=this.words.slice(0),ge=we.length,be=0;be<ge;be++)we[be]=we[be].clone();return te}})})(),(function(){var _=D,b=_.lib.WordArray;_.enc.Base64={stringify:function(I){var k=I.words,Q=I.sigBytes,te=this._map;I.clamp(),I=[];for(var we=0;we<Q;we+=3)for(var ge=(k[we>>>2]>>>24-we%4*8&255)<<16|(k[we+1>>>2]>>>24-(we+1)%4*8&255)<<8|k[we+2>>>2]>>>24-(we+2)%4*8&255,be=0;4>be&&we+.75*be<Q;be++)I.push(te.charAt(ge>>>6*(3-be)&63));if(k=te.charAt(64))for(;I.length%4;)I.push(k);return I.join("")},parse:function(I){var k=I.length,Q=this._map;(te=Q.charAt(64))&&(te=I.indexOf(te))!=-1&&(k=te);for(var te=[],we=0,ge=0;ge<k;ge++)if(ge%4){var be=Q.indexOf(I.charAt(ge-1))<<ge%4*2,_e=Q.indexOf(I.charAt(ge))>>>6-ge%4*2;te[we>>>2]|=(be|_e)<<24-we%4*8,we++}return b.create(te,we)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(),(function(_){for(var b=D,v=(k=b.lib).WordArray,I=k.Hasher,k=b.algo,Q=[],te=[],we=function(Xe){return 4294967296*(Xe-(0|Xe))|0},ge=2,be=0;64>be;){var _e;e:{_e=ge;for(var Re=_.sqrt(_e),Ce=2;Ce<=Re;Ce++)if(!(_e%Ce)){_e=!1;break e}_e=!0}_e&&(8>be&&(Q[be]=we(_.pow(ge,.5))),te[be]=we(_.pow(ge,1/3)),be++),ge++}var Le=[];k=k.SHA256=I.extend({_doReset:function(){this._hash=new v.init(Q.slice(0))},_doProcessBlock:function(Xe,et){for(var ne=this._hash.words,Se=ne[0],Ae=ne[1],Ne=ne[2],Qe=ne[3],nt=ne[4],bt=ne[5],ht=ne[6],Ct=ne[7],yt=0;64>yt;yt++){if(16>yt)Le[yt]=0|Xe[et+yt];else{var wt=Le[yt-15],Jt=Le[yt-2];Le[yt]=((wt<<25|wt>>>7)^(wt<<14|wt>>>18)^wt>>>3)+Le[yt-7]+((Jt<<15|Jt>>>17)^(Jt<<13|Jt>>>19)^Jt>>>10)+Le[yt-16]}wt=Ct+((nt<<26|nt>>>6)^(nt<<21|nt>>>11)^(nt<<7|nt>>>25))+(nt&bt^~nt&ht)+te[yt]+Le[yt],Jt=((Se<<30|Se>>>2)^(Se<<19|Se>>>13)^(Se<<10|Se>>>22))+(Se&Ae^Se&Ne^Ae&Ne),Ct=ht,ht=bt,bt=nt,nt=Qe+wt|0,Qe=Ne,Ne=Ae,Ae=Se,Se=wt+Jt|0}ne[0]=ne[0]+Se|0,ne[1]=ne[1]+Ae|0,ne[2]=ne[2]+Ne|0,ne[3]=ne[3]+Qe|0,ne[4]=ne[4]+nt|0,ne[5]=ne[5]+bt|0,ne[6]=ne[6]+ht|0,ne[7]=ne[7]+Ct|0},_doFinalize:function(){var Xe=this._data,et=Xe.words,ne=8*this._nDataBytes,Se=8*Xe.sigBytes;return et[Se>>>5]|=128<<24-Se%32,et[14+(Se+64>>>9<<4)]=_.floor(ne/4294967296),et[15+(Se+64>>>9<<4)]=ne,Xe.sigBytes=4*et.length,this._process(),this._hash},clone:function(){var Xe=I.clone.call(this);return Xe._hash=this._hash.clone(),Xe}}),b.SHA256=I._createHelper(k),b.HmacSHA256=I._createHmacHelper(k)})(Math),(function(){function _(){return I.create.apply(I,arguments)}for(var b=D,v=b.lib.Hasher,I=(Q=b.x64).Word,k=Q.WordArray,Q=b.algo,te=[_(1116352408,3609767458),_(1899447441,602891725),_(3049323471,3964484399),_(3921009573,2173295548),_(961987163,4081628472),_(1508970993,3053834265),_(2453635748,2937671579),_(2870763221,3664609560),_(3624381080,2734883394),_(310598401,1164996542),_(607225278,1323610764),_(1426881987,3590304994),_(1925078388,4068182383),_(2162078206,991336113),_(2614888103,633803317),_(3248222580,3479774868),_(3835390401,2666613458),_(4022224774,944711139),_(264347078,2341262773),_(604807628,2007800933),_(770255983,1495990901),_(1249150122,1856431235),_(1555081692,3175218132),_(1996064986,2198950837),_(2554220882,3999719339),_(2821834349,766784016),_(2952996808,2566594879),_(3210313671,3203337956),_(3336571891,1034457026),_(3584528711,2466948901),_(113926993,3758326383),_(338241895,168717936),_(666307205,1188179964),_(773529912,1546045734),_(1294757372,1522805485),_(1396182291,2643833823),_(1695183700,2343527390),_(1986661051,1014477480),_(2177026350,1206759142),_(2456956037,344077627),_(2730485921,1290863460),_(2820302411,3158454273),_(3259730800,3505952657),_(3345764771,106217008),_(3516065817,3606008344),_(3600352804,1432725776),_(4094571909,1467031594),_(275423344,851169720),_(430227734,3100823752),_(506948616,1363258195),_(659060556,3750685593),_(883997877,3785050280),_(958139571,3318307427),_(1322822218,3812723403),_(1537002063,2003034995),_(1747873779,3602036899),_(1955562222,1575990012),_(2024104815,1125592928),_(2227730452,2716904306),_(2361852424,442776044),_(2428436474,593698344),_(2756734187,3733110249),_(3204031479,2999351573),_(3329325298,3815920427),_(3391569614,3928383900),_(3515267271,566280711),_(3940187606,3454069534),_(4118630271,4000239992),_(116418474,1914138554),_(174292421,2731055270),_(289380356,3203993006),_(460393269,320620315),_(685471733,587496836),_(852142971,1086792851),_(1017036298,365543100),_(1126000580,2618297676),_(1288033470,3409855158),_(1501505948,4234509866),_(1607167915,987167468),_(1816402316,1246189591)],we=[],ge=0;80>ge;ge++)we[ge]=_();Q=Q.SHA512=v.extend({_doReset:function(){this._hash=new k.init([new I.init(1779033703,4089235720),new I.init(3144134277,2227873595),new I.init(1013904242,4271175723),new I.init(2773480762,1595750129),new I.init(1359893119,2917565137),new I.init(2600822924,725511199),new I.init(528734635,4215389547),new I.init(1541459225,327033209)])},_doProcessBlock:function(_e,Re){for(var Ce=(Ae=this._hash.words)[0],Le=Ae[1],We=Ae[2],Xe=Ae[3],et=Ae[4],ne=Ae[5],Se=Ae[6],Ae=Ae[7],Ne=Ce.high,Qe=Ce.low,nt=Le.high,bt=Le.low,ht=We.high,Ct=We.low,yt=Xe.high,wt=Xe.low,Jt=et.high,Qt=et.low,Mt=ne.high,Ir=ne.low,Lr=Se.high,Ur=Se.low,ar=Ae.high,Xt=Ae.low,ir=Ne,Or=Qe,_n=nt,tn=bt,pn=ht,Tn=Ct,gn=yt,Fn=wt,wr=Jt,$r=Qt,Cr=Mt,kr=Ir,Mn=Lr,mn=Ur,Mi=ar,qn=Xt,Xr=0;80>Xr;Xr++){var rn=we[Xr];if(16>Xr)var Yr=rn.high=0|_e[Re+2*Xr],lr=rn.low=0|_e[Re+2*Xr+1];else{Yr=((lr=(Yr=we[Xr-15]).high)>>>1|(Dn=Yr.low)<<31)^(lr>>>8|Dn<<24)^lr>>>7;var Dn=(Dn>>>1|lr<<31)^(Dn>>>8|lr<<24)^(Dn>>>7|lr<<25),hi=((lr=(hi=we[Xr-2]).high)>>>19|(Nr=hi.low)<<13)^(lr<<3|Nr>>>29)^lr>>>6,Nr=(Nr>>>19|lr<<13)^(Nr<<3|lr>>>29)^(Nr>>>6|lr<<26),zn=(lr=we[Xr-7]).high,Vn=(Hn=we[Xr-16]).high,Hn=Hn.low;Yr=(Yr=(Yr=Yr+zn+((lr=Dn+lr.low)>>>0<Dn>>>0?1:0))+hi+((lr=lr+Nr)>>>0<Nr>>>0?1:0))+Vn+((lr=lr+Hn)>>>0<Hn>>>0?1:0),rn.high=Yr,rn.low=lr}zn=wr&Cr^~wr&Mn,Hn=$r&kr^~$r&mn,rn=ir&_n^ir&pn^_n&pn;var $s=Or&tn^Or&Tn^tn&Tn,wo=(Dn=(ir>>>28|Or<<4)^(ir<<30|Or>>>2)^(ir<<25|Or>>>7),hi=(Or>>>28|ir<<4)^(Or<<30|ir>>>2)^(Or<<25|ir>>>7),(Nr=te[Xr]).high),Wn=Nr.low;Vn=Mi+((wr>>>14|$r<<18)^(wr>>>18|$r<<14)^(wr<<23|$r>>>9))+((Nr=qn+(($r>>>14|wr<<18)^($r>>>18|wr<<14)^($r<<23|wr>>>9)))>>>0<qn>>>0?1:0),Mi=Mn,qn=mn,Mn=Cr,mn=kr,Cr=wr,kr=$r,wr=gn+(Vn=(Vn=(Vn=Vn+zn+((Nr=Nr+Hn)>>>0<Hn>>>0?1:0))+wo+((Nr=Nr+Wn)>>>0<Wn>>>0?1:0))+Yr+((Nr=Nr+lr)>>>0<lr>>>0?1:0))+(($r=Fn+Nr|0)>>>0<Fn>>>0?1:0)|0,gn=pn,Fn=Tn,pn=_n,Tn=tn,_n=ir,tn=Or,ir=Vn+(rn=Dn+rn+((lr=hi+$s)>>>0<hi>>>0?1:0))+((Or=Nr+lr|0)>>>0<Nr>>>0?1:0)|0}Qe=Ce.low=Qe+Or,Ce.high=Ne+ir+(Qe>>>0<Or>>>0?1:0),bt=Le.low=bt+tn,Le.high=nt+_n+(bt>>>0<tn>>>0?1:0),Ct=We.low=Ct+Tn,We.high=ht+pn+(Ct>>>0<Tn>>>0?1:0),wt=Xe.low=wt+Fn,Xe.high=yt+gn+(wt>>>0<Fn>>>0?1:0),Qt=et.low=Qt+$r,et.high=Jt+wr+(Qt>>>0<$r>>>0?1:0),Ir=ne.low=Ir+kr,ne.high=Mt+Cr+(Ir>>>0<kr>>>0?1:0),Ur=Se.low=Ur+mn,Se.high=Lr+Mn+(Ur>>>0<mn>>>0?1:0),Xt=Ae.low=Xt+qn,Ae.high=ar+Mi+(Xt>>>0<qn>>>0?1:0)},_doFinalize:function(){var _e=this._data,Re=_e.words,Ce=8*this._nDataBytes,Le=8*_e.sigBytes;return Re[Le>>>5]|=128<<24-Le%32,Re[30+(Le+128>>>10<<5)]=Math.floor(Ce/4294967296),Re[31+(Le+128>>>10<<5)]=Ce,_e.sigBytes=4*Re.length,this._process(),this._hash.toX32()},clone:function(){var _e=v.clone.call(this);return _e._hash=this._hash.clone(),_e},blockSize:32}),b.SHA512=v._createHelper(Q),b.HmacSHA512=v._createHmacHelper(Q)})(),(function(){var _=D,b=(k=_.x64).Word,v=k.WordArray,I=(k=_.algo).SHA512,k=k.SHA384=I.extend({_doReset:function(){this._hash=new v.init([new b.init(3418070365,3238371032),new b.init(1654270250,914150663),new b.init(2438529370,812702999),new b.init(355462360,4144912697),new b.init(1731405415,4290775857),new b.init(2394180231,1750603025),new b.init(3675008525,1694076839),new b.init(1203062813,3204075428)])},_doFinalize:function(){var te=I._doFinalize.call(this);return te.sigBytes-=16,te}});_.SHA384=I._createHelper(k),_.HmacSHA384=I._createHmacHelper(k)})();var O,K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function z(_){var b,v,I="";for(b=0;b+3<=_.length;b+=3)v=parseInt(_.substring(b,b+3),16),I+=K.charAt(v>>6)+K.charAt(63&v);for(b+1==_.length?(v=parseInt(_.substring(b,b+1),16),I+=K.charAt(v<<2)):b+2==_.length&&(v=parseInt(_.substring(b,b+2),16),I+=K.charAt(v>>2)+K.charAt((3&v)<<4)),"=";(3&I.length)>0;)I+="=";return I}function X(_){var b,v,I,k="",Q=0;for(b=0;b<_.length&&_.charAt(b)!="=";++b)(I=K.indexOf(_.charAt(b)))<0||(Q==0?(k+=ze(I>>2),v=3&I,Q=1):Q==1?(k+=ze(v<<2|I>>4),v=15&I,Q=2):Q==2?(k+=ze(v),k+=ze(I>>2),v=3&I,Q=3):(k+=ze(v<<2|I>>4),k+=ze(15&I),Q=0));return Q==1&&(k+=ze(v<<2)),k}function Ee(_){var b,v=X(_),I=new Array;for(b=0;2*b<v.length;++b)I[b]=parseInt(v.substring(2*b,2*b+2),16);return I}function q(_,b,v){_!=null&&(typeof _=="number"?this.fromNumber(_,b,v):b==null&&typeof _!="string"?this.fromString(_,256):this.fromString(_,b))}function Y(){return new q(null)}F.appName=="Microsoft Internet Explorer"?(q.prototype.am=function(b,v,I,k,Q,te){for(var we=32767&v,ge=v>>15;--te>=0;){var be=32767&this[b],_e=this[b++]>>15,Re=ge*be+_e*we;Q=((be=we*be+((32767&Re)<<15)+I[k]+(1073741823&Q))>>>30)+(Re>>>15)+ge*_e+(Q>>>30),I[k++]=1073741823&be}return Q},O=30):F.appName!="Netscape"?(q.prototype.am=function(b,v,I,k,Q,te){for(;--te>=0;){var we=v*this[b++]+I[k]+Q;Q=Math.floor(we/67108864),I[k++]=67108863&we}return Q},O=26):(q.prototype.am=function(b,v,I,k,Q,te){for(var we=16383&v,ge=v>>14;--te>=0;){var be=16383&this[b],_e=this[b++]>>14,Re=ge*be+_e*we;Q=((be=we*be+((16383&Re)<<14)+I[k]+Q)>>28)+(Re>>14)+ge*_e,I[k++]=268435455&be}return Q},O=28),q.prototype.DB=O,q.prototype.DM=(1<<O)-1,q.prototype.DV=1<<O,q.prototype.FV=Math.pow(2,52),q.prototype.F1=52-O,q.prototype.F2=2*O-52;var Te,re,$e=new Array;for(Te=48,re=0;re<=9;++re)$e[Te++]=re;for(Te=97,re=10;re<36;++re)$e[Te++]=re;for(Te=65,re=10;re<36;++re)$e[Te++]=re;function ze(_){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(_)}function ye(_,b){var v=$e[_.charCodeAt(b)];return v??-1}function Ve(_){var b=Y();return b.fromInt(_),b}function pe(_){var b,v=1;return(b=_>>>16)!=0&&(_=b,v+=16),(b=_>>8)!=0&&(_=b,v+=8),(b=_>>4)!=0&&(_=b,v+=4),(b=_>>2)!=0&&(_=b,v+=2),(b=_>>1)!=0&&(_=b,v+=1),v}function De(_){this.m=_}function $(_){this.m=_,this.mp=_.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<_.DB-15)-1,this.mt2=2*_.t}function G(_,b){return _&b}function ce(_,b){return _|b}function oe(_,b){return _^b}function Fe(_,b){return _&~b}function Ue(_){if(_==0)return-1;var b=0;return(65535&_)==0&&(_>>=16,b+=16),(255&_)==0&&(_>>=8,b+=8),(15&_)==0&&(_>>=4,b+=4),(3&_)==0&&(_>>=2,b+=2),(1&_)==0&&++b,b}function Je(_){for(var b=0;_!=0;)_&=_-1,++b;return b}function He(){}function he(_){return _}function fe(_){this.r2=Y(),this.q3=Y(),q.ONE.dlShiftTo(2*_.t,this.r2),this.mu=this.r2.divide(_),this.m=_}De.prototype.convert=function(b){return b.s<0||b.compareTo(this.m)>=0?b.mod(this.m):b},De.prototype.revert=function(b){return b},De.prototype.reduce=function(b){b.divRemTo(this.m,null,b)},De.prototype.mulTo=function(b,v,I){b.multiplyTo(v,I),this.reduce(I)},De.prototype.sqrTo=function(b,v){b.squareTo(v),this.reduce(v)},$.prototype.convert=function(b){var v=Y();return b.abs().dlShiftTo(this.m.t,v),v.divRemTo(this.m,null,v),b.s<0&&v.compareTo(q.ZERO)>0&&this.m.subTo(v,v),v},$.prototype.revert=function(b){var v=Y();return b.copyTo(v),this.reduce(v),v},$.prototype.reduce=function(b){for(;b.t<=this.mt2;)b[b.t++]=0;for(var v=0;v<this.m.t;++v){var I=32767&b[v],k=I*this.mpl+((I*this.mph+(b[v]>>15)*this.mpl&this.um)<<15)&b.DM;for(b[I=v+this.m.t]+=this.m.am(0,k,b,v,0,this.m.t);b[I]>=b.DV;)b[I]-=b.DV,b[++I]++}b.clamp(),b.drShiftTo(this.m.t,b),b.compareTo(this.m)>=0&&b.subTo(this.m,b)},$.prototype.mulTo=function(b,v,I){b.multiplyTo(v,I),this.reduce(I)},$.prototype.sqrTo=function(b,v){b.squareTo(v),this.reduce(v)},q.prototype.copyTo=function(b){for(var v=this.t-1;v>=0;--v)b[v]=this[v];b.t=this.t,b.s=this.s},q.prototype.fromInt=function(b){this.t=1,this.s=b<0?-1:0,b>0?this[0]=b:b<-1?this[0]=b+this.DV:this.t=0},q.prototype.fromString=function(b,v){var I;if(v==16)I=4;else if(v==8)I=3;else if(v==256)I=8;else if(v==2)I=1;else if(v==32)I=5;else{if(v!=4)return void this.fromRadix(b,v);I=2}this.t=0,this.s=0;for(var k=b.length,Q=!1,te=0;--k>=0;){var we=I==8?255&b[k]:ye(b,k);we<0?b.charAt(k)=="-"&&(Q=!0):(Q=!1,te==0?this[this.t++]=we:te+I>this.DB?(this[this.t-1]|=(we&(1<<this.DB-te)-1)<<te,this[this.t++]=we>>this.DB-te):this[this.t-1]|=we<<te,(te+=I)>=this.DB&&(te-=this.DB))}I==8&&(128&b[0])!=0&&(this.s=-1,te>0&&(this[this.t-1]|=(1<<this.DB-te)-1<<te)),this.clamp(),Q&&q.ZERO.subTo(this,this)},q.prototype.clamp=function(){for(var b=this.s&this.DM;this.t>0&&this[this.t-1]==b;)--this.t},q.prototype.dlShiftTo=function(b,v){var I;for(I=this.t-1;I>=0;--I)v[I+b]=this[I];for(I=b-1;I>=0;--I)v[I]=0;v.t=this.t+b,v.s=this.s},q.prototype.drShiftTo=function(b,v){for(var I=b;I<this.t;++I)v[I-b]=this[I];v.t=Math.max(this.t-b,0),v.s=this.s},q.prototype.lShiftTo=function(b,v){var I,k=b%this.DB,Q=this.DB-k,te=(1<<Q)-1,we=Math.floor(b/this.DB),ge=this.s<<k&this.DM;for(I=this.t-1;I>=0;--I)v[I+we+1]=this[I]>>Q|ge,ge=(this[I]&te)<<k;for(I=we-1;I>=0;--I)v[I]=0;v[we]=ge,v.t=this.t+we+1,v.s=this.s,v.clamp()},q.prototype.rShiftTo=function(b,v){v.s=this.s;var I=Math.floor(b/this.DB);if(I>=this.t)v.t=0;else{var k=b%this.DB,Q=this.DB-k,te=(1<<k)-1;v[0]=this[I]>>k;for(var we=I+1;we<this.t;++we)v[we-I-1]|=(this[we]&te)<<Q,v[we-I]=this[we]>>k;k>0&&(v[this.t-I-1]|=(this.s&te)<<Q),v.t=this.t-I,v.clamp()}},q.prototype.subTo=function(b,v){for(var I=0,k=0,Q=Math.min(b.t,this.t);I<Q;)k+=this[I]-b[I],v[I++]=k&this.DM,k>>=this.DB;if(b.t<this.t){for(k-=b.s;I<this.t;)k+=this[I],v[I++]=k&this.DM,k>>=this.DB;k+=this.s}else{for(k+=this.s;I<b.t;)k-=b[I],v[I++]=k&this.DM,k>>=this.DB;k-=b.s}v.s=k<0?-1:0,k<-1?v[I++]=this.DV+k:k>0&&(v[I++]=k),v.t=I,v.clamp()},q.prototype.multiplyTo=function(b,v){var I=this.abs(),k=b.abs(),Q=I.t;for(v.t=Q+k.t;--Q>=0;)v[Q]=0;for(Q=0;Q<k.t;++Q)v[Q+I.t]=I.am(0,k[Q],v,Q,0,I.t);v.s=0,v.clamp(),this.s!=b.s&&q.ZERO.subTo(v,v)},q.prototype.squareTo=function(b){for(var v=this.abs(),I=b.t=2*v.t;--I>=0;)b[I]=0;for(I=0;I<v.t-1;++I){var k=v.am(I,v[I],b,2*I,0,1);(b[I+v.t]+=v.am(I+1,2*v[I],b,2*I+1,k,v.t-I-1))>=v.DV&&(b[I+v.t]-=v.DV,b[I+v.t+1]=1)}b.t>0&&(b[b.t-1]+=v.am(I,v[I],b,2*I,0,1)),b.s=0,b.clamp()},q.prototype.divRemTo=function(b,v,I){var k=b.abs();if(!(k.t<=0)){var Q=this.abs();if(Q.t<k.t)return v?.fromInt(0),void(I!=null&&this.copyTo(I));I==null&&(I=Y());var te=Y(),we=this.s,ge=b.s,be=this.DB-pe(k[k.t-1]);be>0?(k.lShiftTo(be,te),Q.lShiftTo(be,I)):(k.copyTo(te),Q.copyTo(I));var _e=te.t,Re=te[_e-1];if(Re!=0){var Ce=Re*(1<<this.F1)+(_e>1?te[_e-2]>>this.F2:0),Le=this.FV/Ce,We=(1<<this.F1)/Ce,Xe=1<<this.F2,et=I.t,ne=et-_e,Se=v??Y();for(te.dlShiftTo(ne,Se),I.compareTo(Se)>=0&&(I[I.t++]=1,I.subTo(Se,I)),q.ONE.dlShiftTo(_e,Se),Se.subTo(te,te);te.t<_e;)te[te.t++]=0;for(;--ne>=0;){var Ae=I[--et]==Re?this.DM:Math.floor(I[et]*Le+(I[et-1]+Xe)*We);if((I[et]+=te.am(0,Ae,I,ne,0,_e))<Ae)for(te.dlShiftTo(ne,Se),I.subTo(Se,I);I[et]<--Ae;)I.subTo(Se,I)}v!=null&&(I.drShiftTo(_e,v),we!=ge&&q.ZERO.subTo(v,v)),I.t=_e,I.clamp(),be>0&&I.rShiftTo(be,I),we<0&&q.ZERO.subTo(I,I)}}},q.prototype.invDigit=function(){if(this.t<1)return 0;var b=this[0];if((1&b)==0)return 0;var v=3&b;return(v=(v=(v=(v=v*(2-(15&b)*v)&15)*(2-(255&b)*v)&255)*(2-((65535&b)*v&65535))&65535)*(2-b*v%this.DV)%this.DV)>0?this.DV-v:-v},q.prototype.isEven=function(){return(this.t>0?1&this[0]:this.s)==0},q.prototype.exp=function(b,v){if(b>4294967295||b<1)return q.ONE;var I=Y(),k=Y(),Q=v.convert(this),te=pe(b)-1;for(Q.copyTo(I);--te>=0;)if(v.sqrTo(I,k),(b&1<<te)>0)v.mulTo(k,Q,I);else{var we=I;I=k,k=we}return v.revert(I)},q.prototype.toString=function(b){if(this.s<0)return"-"+this.negate().toString(b);var v;if(b==16)v=4;else if(b==8)v=3;else if(b==2)v=1;else if(b==32)v=5;else{if(b!=4)return this.toRadix(b);v=2}var I,k=(1<<v)-1,Q=!1,te="",we=this.t,ge=this.DB-we*this.DB%v;if(we-- >0)for(ge<this.DB&&(I=this[we]>>ge)>0&&(Q=!0,te=ze(I));we>=0;)ge<v?(I=(this[we]&(1<<ge)-1)<<v-ge,I|=this[--we]>>(ge+=this.DB-v)):(I=this[we]>>(ge-=v)&k,ge<=0&&(ge+=this.DB,--we)),I>0&&(Q=!0),Q&&(te+=ze(I));return Q?te:"0"},q.prototype.negate=function(){var b=Y();return q.ZERO.subTo(this,b),b},q.prototype.abs=function(){return this.s<0?this.negate():this},q.prototype.compareTo=function(b){var v=this.s-b.s;if(v!=0)return v;var I=this.t;if((v=I-b.t)!=0)return this.s<0?-v:v;for(;--I>=0;)if((v=this[I]-b[I])!=0)return v;return 0},q.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+pe(this[this.t-1]^this.s&this.DM)},q.prototype.mod=function(b){var v=Y();return this.abs().divRemTo(b,null,v),this.s<0&&v.compareTo(q.ZERO)>0&&b.subTo(v,v),v},q.prototype.modPowInt=function(b,v){var I;return I=b<256||v.isEven()?new De(v):new $(v),this.exp(b,I)},q.ZERO=Ve(0),q.ONE=Ve(1),He.prototype.convert=he,He.prototype.revert=he,He.prototype.mulTo=function(b,v,I){b.multiplyTo(v,I)},He.prototype.sqrTo=function(b,v){b.squareTo(v)},fe.prototype.convert=function(b){if(b.s<0||b.t>2*this.m.t)return b.mod(this.m);if(b.compareTo(this.m)<0)return b;var v=Y();return b.copyTo(v),this.reduce(v),v},fe.prototype.revert=function(b){return b},fe.prototype.reduce=function(b){for(b.drShiftTo(this.m.t-1,this.r2),b.t>this.m.t+1&&(b.t=this.m.t+1,b.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);b.compareTo(this.r2)<0;)b.dAddOffset(1,this.m.t+1);for(b.subTo(this.r2,b);b.compareTo(this.m)>=0;)b.subTo(this.m,b)},fe.prototype.mulTo=function(b,v,I){b.multiplyTo(v,I),this.reduce(I)},fe.prototype.sqrTo=function(b,v){b.squareTo(v),this.reduce(v)};var Oe=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],ie=(1<<26)/Oe[Oe.length-1];function j(){this.i=0,this.j=0,this.S=new Array}q.prototype.chunkSize=function(b){return Math.floor(Math.LN2*this.DB/Math.log(b))},q.prototype.toRadix=function(b){if(b==null&&(b=10),this.signum()==0||b<2||b>36)return"0";var v=this.chunkSize(b),I=Math.pow(b,v),k=Ve(I),Q=Y(),te=Y(),we="";for(this.divRemTo(k,Q,te);Q.signum()>0;)we=(I+te.intValue()).toString(b).substr(1)+we,Q.divRemTo(k,Q,te);return te.intValue().toString(b)+we},q.prototype.fromRadix=function(b,v){this.fromInt(0),v==null&&(v=10);for(var I=this.chunkSize(v),k=Math.pow(v,I),Q=!1,te=0,we=0,ge=0;ge<b.length;++ge){var be=ye(b,ge);be<0?b.charAt(ge)=="-"&&this.signum()==0&&(Q=!0):(we=v*we+be,++te>=I&&(this.dMultiply(k),this.dAddOffset(we,0),te=0,we=0))}te>0&&(this.dMultiply(Math.pow(v,te)),this.dAddOffset(we,0)),Q&&q.ZERO.subTo(this,this)},q.prototype.fromNumber=function(b,v,I){if(typeof v=="number")if(b<2)this.fromInt(1);else for(this.fromNumber(b,I),this.testBit(b-1)||this.bitwiseTo(q.ONE.shiftLeft(b-1),ce,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(v);)this.dAddOffset(2,0),this.bitLength()>b&&this.subTo(q.ONE.shiftLeft(b-1),this);else{var k=new Array,Q=7&b;k.length=1+(b>>3),v.nextBytes(k),Q>0?k[0]&=(1<<Q)-1:k[0]=0,this.fromString(k,256)}},q.prototype.bitwiseTo=function(b,v,I){var k,Q,te=Math.min(b.t,this.t);for(k=0;k<te;++k)I[k]=v(this[k],b[k]);if(b.t<this.t){for(Q=b.s&this.DM,k=te;k<this.t;++k)I[k]=v(this[k],Q);I.t=this.t}else{for(Q=this.s&this.DM,k=te;k<b.t;++k)I[k]=v(Q,b[k]);I.t=b.t}I.s=v(this.s,b.s),I.clamp()},q.prototype.changeBit=function(b,v){var I=q.ONE.shiftLeft(b);return this.bitwiseTo(I,v,I),I},q.prototype.addTo=function(b,v){for(var I=0,k=0,Q=Math.min(b.t,this.t);I<Q;)k+=this[I]+b[I],v[I++]=k&this.DM,k>>=this.DB;if(b.t<this.t){for(k+=b.s;I<this.t;)k+=this[I],v[I++]=k&this.DM,k>>=this.DB;k+=this.s}else{for(k+=this.s;I<b.t;)k+=b[I],v[I++]=k&this.DM,k>>=this.DB;k+=b.s}v.s=k<0?-1:0,k>0?v[I++]=k:k<-1&&(v[I++]=this.DV+k),v.t=I,v.clamp()},q.prototype.dMultiply=function(b){this[this.t]=this.am(0,b-1,this,0,0,this.t),++this.t,this.clamp()},q.prototype.dAddOffset=function(b,v){if(b!=0){for(;this.t<=v;)this[this.t++]=0;for(this[v]+=b;this[v]>=this.DV;)this[v]-=this.DV,++v>=this.t&&(this[this.t++]=0),++this[v]}},q.prototype.multiplyLowerTo=function(b,v,I){var k,Q=Math.min(this.t+b.t,v);for(I.s=0,I.t=Q;Q>0;)I[--Q]=0;for(k=I.t-this.t;Q<k;++Q)I[Q+this.t]=this.am(0,b[Q],I,Q,0,this.t);for(k=Math.min(b.t,v);Q<k;++Q)this.am(0,b[Q],I,Q,0,v-Q);I.clamp()},q.prototype.multiplyUpperTo=function(b,v,I){--v;var k=I.t=this.t+b.t-v;for(I.s=0;--k>=0;)I[k]=0;for(k=Math.max(v-this.t,0);k<b.t;++k)I[this.t+k-v]=this.am(v-k,b[k],I,0,0,this.t+k-v);I.clamp(),I.drShiftTo(1,I)},q.prototype.modInt=function(b){if(b<=0)return 0;var v=this.DV%b,I=this.s<0?b-1:0;if(this.t>0)if(v==0)I=this[0]%b;else for(var k=this.t-1;k>=0;--k)I=(v*I+this[k])%b;return I},q.prototype.millerRabin=function(b){var v=this.subtract(q.ONE),I=v.getLowestSetBit();if(I<=0)return!1;var k=v.shiftRight(I);(b=b+1>>1)>Oe.length&&(b=Oe.length);for(var Q=Y(),te=0;te<b;++te){Q.fromInt(Oe[Math.floor(Math.random()*Oe.length)]);var we=Q.modPow(k,this);if(we.compareTo(q.ONE)!=0&&we.compareTo(v)!=0){for(var ge=1;ge++<I&&we.compareTo(v)!=0;)if((we=we.modPowInt(2,this)).compareTo(q.ONE)==0)return!1;if(we.compareTo(v)!=0)return!1}}return!0},q.prototype.clone=function(){var b=Y();return this.copyTo(b),b},q.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},q.prototype.byteValue=function(){return this.t==0?this.s:this[0]<<24>>24},q.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},q.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},q.prototype.toByteArray=function(){var b=this.t,v=new Array;v[0]=this.s;var I,k=this.DB-b*this.DB%8,Q=0;if(b-- >0)for(k<this.DB&&(I=this[b]>>k)!=(this.s&this.DM)>>k&&(v[Q++]=I|this.s<<this.DB-k);b>=0;)k<8?(I=(this[b]&(1<<k)-1)<<8-k,I|=this[--b]>>(k+=this.DB-8)):(I=this[b]>>(k-=8)&255,k<=0&&(k+=this.DB,--b)),(128&I)!=0&&(I|=-256),Q==0&&(128&this.s)!=(128&I)&&++Q,(Q>0||I!=this.s)&&(v[Q++]=I);return v},q.prototype.equals=function(b){return this.compareTo(b)==0},q.prototype.min=function(b){return this.compareTo(b)<0?this:b},q.prototype.max=function(b){return this.compareTo(b)>0?this:b},q.prototype.and=function(b){var v=Y();return this.bitwiseTo(b,G,v),v},q.prototype.or=function(b){var v=Y();return this.bitwiseTo(b,ce,v),v},q.prototype.xor=function(b){var v=Y();return this.bitwiseTo(b,oe,v),v},q.prototype.andNot=function(b){var v=Y();return this.bitwiseTo(b,Fe,v),v},q.prototype.not=function(){for(var b=Y(),v=0;v<this.t;++v)b[v]=this.DM&~this[v];return b.t=this.t,b.s=~this.s,b},q.prototype.shiftLeft=function(b){var v=Y();return b<0?this.rShiftTo(-b,v):this.lShiftTo(b,v),v},q.prototype.shiftRight=function(b){var v=Y();return b<0?this.lShiftTo(-b,v):this.rShiftTo(b,v),v},q.prototype.getLowestSetBit=function(){for(var b=0;b<this.t;++b)if(this[b]!=0)return b*this.DB+Ue(this[b]);return this.s<0?this.t*this.DB:-1},q.prototype.bitCount=function(){for(var b=0,v=this.s&this.DM,I=0;I<this.t;++I)b+=Je(this[I]^v);return b},q.prototype.testBit=function(b){var v=Math.floor(b/this.DB);return v>=this.t?this.s!=0:(this[v]&1<<b%this.DB)!=0},q.prototype.setBit=function(b){return this.changeBit(b,ce)},q.prototype.clearBit=function(b){return this.changeBit(b,Fe)},q.prototype.flipBit=function(b){return this.changeBit(b,oe)},q.prototype.add=function(b){var v=Y();return this.addTo(b,v),v},q.prototype.subtract=function(b){var v=Y();return this.subTo(b,v),v},q.prototype.multiply=function(b){var v=Y();return this.multiplyTo(b,v),v},q.prototype.divide=function(b){var v=Y();return this.divRemTo(b,v,null),v},q.prototype.remainder=function(b){var v=Y();return this.divRemTo(b,null,v),v},q.prototype.divideAndRemainder=function(b){var v=Y(),I=Y();return this.divRemTo(b,v,I),new Array(v,I)},q.prototype.modPow=function(b,v){var I,k,Q=b.bitLength(),te=Ve(1);if(Q<=0)return te;I=Q<18?1:Q<48?3:Q<144?4:Q<768?5:6,k=Q<8?new De(v):v.isEven()?new fe(v):new $(v);var we=new Array,ge=3,be=I-1,_e=(1<<I)-1;if(we[1]=k.convert(this),I>1){var Re=Y();for(k.sqrTo(we[1],Re);ge<=_e;)we[ge]=Y(),k.mulTo(Re,we[ge-2],we[ge]),ge+=2}var Ce,Le,We=b.t-1,Xe=!0,et=Y();for(Q=pe(b[We])-1;We>=0;){for(Q>=be?Ce=b[We]>>Q-be&_e:(Ce=(b[We]&(1<<Q+1)-1)<<be-Q,We>0&&(Ce|=b[We-1]>>this.DB+Q-be)),ge=I;(1&Ce)==0;)Ce>>=1,--ge;if((Q-=ge)<0&&(Q+=this.DB,--We),Xe)we[Ce].copyTo(te),Xe=!1;else{for(;ge>1;)k.sqrTo(te,et),k.sqrTo(et,te),ge-=2;ge>0?k.sqrTo(te,et):(Le=te,te=et,et=Le),k.mulTo(et,we[Ce],te)}for(;We>=0&&(b[We]&1<<Q)==0;)k.sqrTo(te,et),Le=te,te=et,et=Le,--Q<0&&(Q=this.DB-1,--We)}return k.revert(te)},q.prototype.modInverse=function(b){var v=b.isEven();if(this.isEven()&&v||b.signum()==0)return q.ZERO;for(var I=b.clone(),k=this.clone(),Q=Ve(1),te=Ve(0),we=Ve(0),ge=Ve(1);I.signum()!=0;){for(;I.isEven();)I.rShiftTo(1,I),v?(Q.isEven()&&te.isEven()||(Q.addTo(this,Q),te.subTo(b,te)),Q.rShiftTo(1,Q)):te.isEven()||te.subTo(b,te),te.rShiftTo(1,te);for(;k.isEven();)k.rShiftTo(1,k),v?(we.isEven()&&ge.isEven()||(we.addTo(this,we),ge.subTo(b,ge)),we.rShiftTo(1,we)):ge.isEven()||ge.subTo(b,ge),ge.rShiftTo(1,ge);I.compareTo(k)>=0?(I.subTo(k,I),v&&Q.subTo(we,Q),te.subTo(ge,te)):(k.subTo(I,k),v&&we.subTo(Q,we),ge.subTo(te,ge))}return k.compareTo(q.ONE)!=0?q.ZERO:ge.compareTo(b)>=0?ge.subtract(b):ge.signum()<0?(ge.addTo(b,ge),ge.signum()<0?ge.add(b):ge):ge},q.prototype.pow=function(b){return this.exp(b,new He)},q.prototype.gcd=function(b){var v=this.s<0?this.negate():this.clone(),I=b.s<0?b.negate():b.clone();if(v.compareTo(I)<0){var k=v;v=I,I=k}var Q=v.getLowestSetBit(),te=I.getLowestSetBit();if(te<0)return v;for(Q<te&&(te=Q),te>0&&(v.rShiftTo(te,v),I.rShiftTo(te,I));v.signum()>0;)(Q=v.getLowestSetBit())>0&&v.rShiftTo(Q,v),(Q=I.getLowestSetBit())>0&&I.rShiftTo(Q,I),v.compareTo(I)>=0?(v.subTo(I,v),v.rShiftTo(1,v)):(I.subTo(v,I),I.rShiftTo(1,I));return te>0&&I.lShiftTo(te,I),I},q.prototype.isProbablePrime=function(b){var v,I=this.abs();if(I.t==1&&I[0]<=Oe[Oe.length-1]){for(v=0;v<Oe.length;++v)if(I[0]==Oe[v])return!0;return!1}if(I.isEven())return!1;for(v=1;v<Oe.length;){for(var k=Oe[v],Q=v+1;Q<Oe.length&&k<ie;)k*=Oe[Q++];for(k=I.modInt(k);v<Q;)if(k%Oe[v++]==0)return!1}return I.millerRabin(b)},q.prototype.square=function(){var b=Y();return this.squareTo(b),b},j.prototype.init=function(b){var v,I,k;for(v=0;v<256;++v)this.S[v]=v;for(I=0,v=0;v<256;++v)I=I+this.S[v]+b[v%b.length]&255,k=this.S[v],this.S[v]=this.S[I],this.S[I]=k;this.i=0,this.j=0},j.prototype.next=function(){var b;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,b=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=b,this.S[b+this.S[this.i]&255]};var N,L,V;function ee(){(function(b){L[V++]^=255&b,L[V++]^=b>>8&255,L[V++]^=b>>16&255,L[V++]^=b>>24&255,V>=256&&(V-=256)})(new Date().getTime())}if(L==null){var ae;if(L=new Array,V=0,x!==void 0&&(x.crypto!==void 0||x.msCrypto!==void 0)){var ve=x.crypto||x.msCrypto;if(ve.getRandomValues){var J=new Uint8Array(32);for(ve.getRandomValues(J),ae=0;ae<32;++ae)L[V++]=J[ae]}else if(F.appName=="Netscape"&&F.appVersion<"5"){var me=x.crypto.random(32);for(ae=0;ae<me.length;++ae)L[V++]=255&me.charCodeAt(ae)}}for(;V<256;)ae=Math.floor(65536*Math.random()),L[V++]=ae>>>8,L[V++]=255&ae;V=0,ee()}function xe(){if(N==null){for(ee(),(N=(function(){return new j})()).init(L),V=0;V<L.length;++V)L[V]=0;V=0}return N.next()}function de(){}function st(_,b){return new q(_,b)}function ft(_,b,v){for(var I="",k=0;I.length<b;)I+=v(String.fromCharCode.apply(String,_.concat([(4278190080&k)>>24,(16711680&k)>>16,(65280&k)>>8,255&k]))),k+=1;return I}function Ge(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function pt(_,b){this.x=b,this.q=_}function Z(_,b,v,I){this.curve=_,this.x=b,this.y=v,this.z=I??q.ONE,this.zinv=null}function P(_,b,v){this.q=_,this.a=this.fromBigInteger(b),this.b=this.fromBigInteger(v),this.infinity=new Z(this,null,null)}de.prototype.nextBytes=function(b){var v;for(v=0;v<b.length;++v)b[v]=xe()},Ge.prototype.doPublic=function(b){return b.modPowInt(this.e,this.n)},Ge.prototype.setPublic=function(b,v){if(this.isPublic=!0,this.isPrivate=!1,typeof b!="string")this.n=b,this.e=v;else{if(!(b!=null&&v!=null&&b.length>0&&v.length>0))throw"Invalid RSA public key";this.n=st(b,16),this.e=parseInt(v,16)}},Ge.prototype.encrypt=function(b){var v=(function(te,we){if(we<te.length+11)throw"Message too long for RSA";for(var ge=new Array,be=te.length-1;be>=0&&we>0;){var _e=te.charCodeAt(be--);_e<128?ge[--we]=_e:_e>127&&_e<2048?(ge[--we]=63&_e|128,ge[--we]=_e>>6|192):(ge[--we]=63&_e|128,ge[--we]=_e>>6&63|128,ge[--we]=_e>>12|224)}ge[--we]=0;for(var Re=new de,Ce=new Array;we>2;){for(Ce[0]=0;Ce[0]==0;)Re.nextBytes(Ce);ge[--we]=Ce[0]}return ge[--we]=2,ge[--we]=0,new q(ge)})(b,this.n.bitLength()+7>>3);if(v==null)return null;var I=this.doPublic(v);if(I==null)return null;var k=I.toString(16);return(1&k.length)==0?k:"0"+k},Ge.prototype.encryptOAEP=function(b,v,I){var k=(function(ge,be,_e,Re){var Ce=U.crypto.MessageDigest,Le=U.crypto.Util,We=null;if(_e||(_e="sha1"),typeof _e=="string"&&(We=Ce.getCanonicalAlgName(_e),Re=Ce.getHashLength(We),_e=function(ht){return dr(Le.hashHex(nr(ht),We))}),ge.length+2*Re+2>be)throw"Message too long for RSA";var Xe,et="";for(Xe=0;Xe<be-ge.length-2*Re-2;Xe+=1)et+="\0";var ne=_e("")+et+""+ge,Se=new Array(Re);new de().nextBytes(Se);var Ae=ft(Se,ne.length,_e),Ne=[];for(Xe=0;Xe<ne.length;Xe+=1)Ne[Xe]=ne.charCodeAt(Xe)^Ae.charCodeAt(Xe);var Qe=ft(Ne,Se.length,_e),nt=[0];for(Xe=0;Xe<Se.length;Xe+=1)nt[Xe+1]=Se[Xe]^Qe.charCodeAt(Xe);return new q(nt.concat(Ne))})(b,this.n.bitLength()+7>>3,v,I);if(k==null)return null;var Q=this.doPublic(k);if(Q==null)return null;var te=Q.toString(16);return(1&te.length)==0?te:"0"+te},Ge.prototype.type="RSA",pt.prototype.equals=function(b){return b==this||this.q.equals(b.q)&&this.x.equals(b.x)},pt.prototype.toBigInteger=function(){return this.x},pt.prototype.negate=function(){return new pt(this.q,this.x.negate().mod(this.q))},pt.prototype.add=function(b){return new pt(this.q,this.x.add(b.toBigInteger()).mod(this.q))},pt.prototype.subtract=function(b){return new pt(this.q,this.x.subtract(b.toBigInteger()).mod(this.q))},pt.prototype.multiply=function(b){return new pt(this.q,this.x.multiply(b.toBigInteger()).mod(this.q))},pt.prototype.square=function(){return new pt(this.q,this.x.square().mod(this.q))},pt.prototype.divide=function(b){return new pt(this.q,this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q))},Z.prototype.getX=function(){return this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))},Z.prototype.getY=function(){return this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))},Z.prototype.equals=function(b){return b==this||(this.isInfinity()?b.isInfinity():b.isInfinity()?this.isInfinity():!!b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q).equals(q.ZERO)&&b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q).equals(q.ZERO))},Z.prototype.isInfinity=function(){return this.x==null&&this.y==null||this.z.equals(q.ZERO)&&!this.y.toBigInteger().equals(q.ZERO)},Z.prototype.negate=function(){return new Z(this.curve,this.x,this.y.negate(),this.z)},Z.prototype.add=function(b){if(this.isInfinity())return b;if(b.isInfinity())return this;var v=b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q),I=b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q);if(q.ZERO.equals(I))return q.ZERO.equals(v)?this.twice():this.curve.getInfinity();var k=new q("3"),Q=this.x.toBigInteger(),te=this.y.toBigInteger(),we=(b.x.toBigInteger(),b.y.toBigInteger(),I.square()),ge=we.multiply(I),be=Q.multiply(we),_e=v.square().multiply(this.z),Re=_e.subtract(be.shiftLeft(1)).multiply(b.z).subtract(ge).multiply(I).mod(this.curve.q),Ce=be.multiply(k).multiply(v).subtract(te.multiply(ge)).subtract(_e.multiply(v)).multiply(b.z).add(v.multiply(ge)).mod(this.curve.q),Le=ge.multiply(this.z).multiply(b.z).mod(this.curve.q);return new Z(this.curve,this.curve.fromBigInteger(Re),this.curve.fromBigInteger(Ce),Le)},Z.prototype.twice=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var b=new q("3"),v=this.x.toBigInteger(),I=this.y.toBigInteger(),k=I.multiply(this.z),Q=k.multiply(I).mod(this.curve.q),te=this.curve.a.toBigInteger(),we=v.square().multiply(b);q.ZERO.equals(te)||(we=we.add(this.z.square().multiply(te)));var ge=(we=we.mod(this.curve.q)).square().subtract(v.shiftLeft(3).multiply(Q)).shiftLeft(1).multiply(k).mod(this.curve.q),be=we.multiply(b).multiply(v).subtract(Q.shiftLeft(1)).shiftLeft(2).multiply(Q).subtract(we.square().multiply(we)).mod(this.curve.q),_e=k.square().multiply(k).shiftLeft(3).mod(this.curve.q);return new Z(this.curve,this.curve.fromBigInteger(ge),this.curve.fromBigInteger(be),_e)},Z.prototype.multiply=function(b){if(this.isInfinity())return this;if(b.signum()==0)return this.curve.getInfinity();var v,I=b,k=I.multiply(new q("3")),Q=this.negate(),te=this,we=this.curve.q.subtract(b),ge=we.multiply(new q("3")),be=new Z(this.curve,this.x,this.y),_e=be.negate();for(v=k.bitLength()-2;v>0;--v){te=te.twice();var Re=k.testBit(v);Re!=I.testBit(v)&&(te=te.add(Re?this:Q))}for(v=ge.bitLength()-2;v>0;--v){be=be.twice();var Ce=ge.testBit(v);Ce!=we.testBit(v)&&(be=be.add(Ce?be:_e))}return te},Z.prototype.multiplyTwo=function(b,v,I){var k;k=b.bitLength()>I.bitLength()?b.bitLength()-1:I.bitLength()-1;for(var Q=this.curve.getInfinity(),te=this.add(v);k>=0;)Q=Q.twice(),b.testBit(k)?Q=I.testBit(k)?Q.add(te):Q.add(this):I.testBit(k)&&(Q=Q.add(v)),--k;return Q},P.prototype.getQ=function(){return this.q},P.prototype.getA=function(){return this.a},P.prototype.getB=function(){return this.b},P.prototype.equals=function(b){return b==this||this.q.equals(b.q)&&this.a.equals(b.a)&&this.b.equals(b.b)},P.prototype.getInfinity=function(){return this.infinity},P.prototype.fromBigInteger=function(b){return new pt(this.q,b)},P.prototype.decodePointHex=function(b){switch(parseInt(b.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var v=(b.length-2)/2,I=b.substr(2,v),k=b.substr(v+2,v);return new Z(this,this.fromBigInteger(new q(I,16)),this.fromBigInteger(new q(k,16)));default:return null}},pt.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},Z.prototype.getEncoded=function(_){var b=function(te,we){var ge=te.toByteArrayUnsigned();if(we<ge.length)ge=ge.slice(ge.length-we);else for(;we>ge.length;)ge.unshift(0);return ge},v=this.getX().toBigInteger(),I=this.getY().toBigInteger(),k=b(v,32);return _?I.isEven()?k.unshift(2):k.unshift(3):(k.unshift(4),k=k.concat(b(I,32))),k},Z.decodeFrom=function(_,b){b[0];var v=b.length-1,I=b.slice(1,1+v/2),k=b.slice(1+v/2,1+v);I.unshift(0),k.unshift(0);var Q=new q(I),te=new q(k);return new Z(_,_.fromBigInteger(Q),_.fromBigInteger(te))},Z.decodeFromHex=function(_,b){b.substr(0,2);var v=b.length-2,I=b.substr(2,v/2),k=b.substr(2+v/2,v/2),Q=new q(I,16),te=new q(k,16);return new Z(_,_.fromBigInteger(Q),_.fromBigInteger(te))},Z.prototype.add2D=function(_){if(this.isInfinity())return _;if(_.isInfinity())return this;if(this.x.equals(_.x))return this.y.equals(_.y)?this.twice():this.curve.getInfinity();var b=_.x.subtract(this.x),v=_.y.subtract(this.y).divide(b),I=v.square().subtract(this.x).subtract(_.x),k=v.multiply(this.x.subtract(I)).subtract(this.y);return new Z(this.curve,I,k)},Z.prototype.twice2D=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var _=this.curve.fromBigInteger(q.valueOf(2)),b=this.curve.fromBigInteger(q.valueOf(3)),v=this.x.square().multiply(b).add(this.curve.a).divide(this.y.multiply(_)),I=v.square().subtract(this.x.multiply(_)),k=v.multiply(this.x.subtract(I)).subtract(this.y);return new Z(this.curve,I,k)},Z.prototype.multiply2D=function(_){if(this.isInfinity())return this;if(_.signum()==0)return this.curve.getInfinity();var b,v=_,I=v.multiply(new q("3")),k=this.negate(),Q=this;for(b=I.bitLength()-2;b>0;--b){Q=Q.twice();var te=I.testBit(b);te!=v.testBit(b)&&(Q=Q.add2D(te?this:k))}return Q},Z.prototype.isOnCurve=function(){var _=this.getX().toBigInteger(),b=this.getY().toBigInteger(),v=this.curve.getA().toBigInteger(),I=this.curve.getB().toBigInteger(),k=this.curve.getQ(),Q=b.multiply(b).mod(k),te=_.multiply(_).multiply(_).add(v.multiply(_)).add(I).mod(k);return Q.equals(te)},Z.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},Z.prototype.validate=function(){var _=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var b=this.getX().toBigInteger(),v=this.getY().toBigInteger();if(b.compareTo(q.ONE)<0||b.compareTo(_.subtract(q.ONE))>0)throw new Error("x coordinate out of bounds");if(v.compareTo(q.ONE)<0||v.compareTo(_.subtract(q.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(_).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0};var B=(function(){var _=new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),b=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),v={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:`
12
+ Please change the parent <Route path="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let p=useLocation(),g;g=p;let y=g.pathname||"/",S=y;if(h!=="/"){let T=h.replace(/^\//,"").split("/");S="/"+y.replace(/^\//,"").split("/").slice(T.length).join("/")}let w=t&&t.state.matches.length?t.state.matches.map(T=>Object.assign(T,{route:t.manifest[T.route.id]||T.route})):matchRoutes(i,{pathname:S});return warning(f||w!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),warning(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),_renderMatches(w&&w.map(T=>Object.assign({},T,{params:Object.assign({},u,T.params),pathname:joinPaths([h,n.encodeLocation?n.encodeLocation(T.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?h:joinPaths([h,n.encodeLocation?n.encodeLocation(T.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),s,t)}function DefaultErrorComponent(){let i=useRouteError(),e=isRouteErrorResponse(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),t=i instanceof Error?i.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},u=null;return console.error("Error handled by React Router default ErrorBoundary:",i),u=reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("p",null,"💿 Hey developer 👋"),reactExports.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",reactExports.createElement("code",{style:a},"ErrorBoundary")," or"," ",reactExports.createElement("code",{style:a},"errorElement")," prop on your route.")),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("h2",null,"Unexpected Application Error!"),reactExports.createElement("h3",{style:{fontStyle:"italic"}},e),t?reactExports.createElement("pre",{style:s},t):null,u)}var defaultErrorElement=reactExports.createElement(DefaultErrorComponent,null),RenderErrorBoundary=class extends reactExports.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,e){return e.location!==i.location||e.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:e.error,location:e.location,revalidation:i.revalidation||e.revalidation}}componentDidCatch(i,e){this.props.onError?this.props.onError(i,e):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const t=decodeRouteErrorResponseDigest(i.digest);t&&(i=t)}let e=i!==void 0?reactExports.createElement(RouteContext.Provider,{value:this.props.routeContext},reactExports.createElement(RouteErrorContext.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?reactExports.createElement(RSCErrorHandler,{error:i},e):e}};RenderErrorBoundary.contextType=RSCRouterContext;var errorRedirectHandledMap=new WeakMap;function RSCErrorHandler({children:i,error:e}){let{basename:t}=reactExports.useContext(NavigationContext);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let n=decodeRedirectErrorDigest(e.digest);if(n){let s=errorRedirectHandledMap.get(e);if(s)throw s;let a=parseToInfo(n.location,t),u=a.absoluteURL||a.to;if(hasInvalidProtocol(u))throw new Error("Invalid redirect location");if(isBrowser$1&&!errorRedirectHandledMap.get(e))if(a.isExternal||n.reloadDocument)window.location.href=u;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:n.replace}));throw errorRedirectHandledMap.set(e,c),c}return reactExports.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u}`})}}return i}function RenderedRoute({routeContext:i,match:e,children:t}){let n=reactExports.useContext(DataRouterContext);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),reactExports.createElement(RouteContext.Provider,{value:i},t)}function _renderMatches(i,e=[],t){let n=t?.state;if(i==null){if(!n)return null;if(n.errors)i=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)i=n.matches;else return null}let s=i,a=n?.errors;if(a!=null){let p=s.findIndex(g=>g.route.id&&a?.[g.route.id]!==void 0);invariant(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),s=s.slice(0,Math.min(s.length,p+1))}let u=!1,c=-1;if(t&&n){u=n.renderFallback;for(let p=0;p<s.length;p++){let g=s[p];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(c=p),g.route.id){let{loaderData:y,errors:S}=n,w=g.route.loader&&!y.hasOwnProperty(g.route.id)&&(!S||S[g.route.id]===void 0);if(g.route.lazy||w){t.isStatic&&(u=!0),c>=0?s=s.slice(0,c+1):s=[s[0]];break}}}}let h=t?.onError,f=n&&h?(p,g)=>{h(p,{location:n.location,params:n.matches?.[0]?.params??{},pattern:getRoutePattern(n.matches),errorInfo:g})}:void 0;return s.reduceRight((p,g,y)=>{let S,w=!1,R=null,T=null;n&&(S=a&&g.route.id?a[g.route.id]:void 0,R=g.route.errorElement||defaultErrorElement,u&&(c<0&&y===0?(warningOnce("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,T=null):c===y&&(w=!0,T=g.route.hydrateFallbackElement||null)));let A=e.concat(s.slice(0,y+1)),F=()=>{let x;return S?x=R:w?x=T:g.route.Component?x=reactExports.createElement(g.route.Component,null):g.route.element?x=g.route.element:x=p,reactExports.createElement(RenderedRoute,{match:g,routeContext:{outlet:p,matches:A,isDataRoute:n!=null},children:x})};return n&&(g.route.ErrorBoundary||g.route.errorElement||y===0)?reactExports.createElement(RenderErrorBoundary,{location:n.location,revalidation:n.revalidation,component:R,error:S,children:F(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:f}):F()},null)}function getDataRouterConsoleError(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext(i){let e=reactExports.useContext(DataRouterContext);return invariant(e,getDataRouterConsoleError(i)),e}function useDataRouterState(i){let e=reactExports.useContext(DataRouterStateContext);return invariant(e,getDataRouterConsoleError(i)),e}function useRouteContext(i){let e=reactExports.useContext(RouteContext);return invariant(e,getDataRouterConsoleError(i)),e}function useCurrentRouteId(i){let e=useRouteContext(i),t=e.matches[e.matches.length-1];return invariant(t.route.id,`${i} can only be used on routes that contain a unique "id"`),t.route.id}function useRouteId(){return useCurrentRouteId("useRouteId")}function useRouteError(){let i=reactExports.useContext(RouteErrorContext),e=useDataRouterState("useRouteError"),t=useCurrentRouteId("useRouteError");return i!==void 0?i:e.errors?.[t]}function useNavigateStable(){let{router:i}=useDataRouterContext("useNavigate"),e=useCurrentRouteId("useNavigate"),t=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{t.current=!0}),reactExports.useCallback(async(s,a={})=>{warning(t.current,navigateEffectWarning),t.current&&(typeof s=="number"?await i.navigate(s):await i.navigate(s,{fromRouteId:e,...a}))},[i,e])}var alreadyWarned={};function warningOnce(i,e,t){!e&&!alreadyWarned[i]&&(alreadyWarned[i]=!0,warning(!1,t))}reactExports.memo(DataRoutes2);function DataRoutes2({routes:i,manifest:e,future:t,state:n,isStatic:s,onError:a}){return useRoutesImpl(i,void 0,{manifest:e,state:n,isStatic:s,onError:a})}function Navigate({to:i,replace:e,state:t,relative:n}){invariant(useInRouterContext(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=reactExports.useContext(NavigationContext);warning(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=reactExports.useContext(RouteContext),{pathname:u}=useLocation(),c=useNavigate(),h=resolveTo(i,getResolveToMatches(a),u,n==="path"),f=JSON.stringify(h);return reactExports.useEffect(()=>{c(JSON.parse(f),{replace:e,state:t,relative:n})},[c,f,n,e,t]),null}function Outlet(i){return useOutlet(i.context)}function Router({basename:i="/",children:e=null,location:t,navigationType:n="POP",navigator:s,static:a=!1,useTransitions:u}){invariant(!useInRouterContext(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=i.replace(/^\/*/,"/"),h=reactExports.useMemo(()=>({basename:c,navigator:s,static:a,useTransitions:u,future:{}}),[c,s,a,u]);typeof t=="string"&&(t=parsePath(t));let{pathname:f="/",search:p="",hash:g="",state:y=null,key:S="default",mask:w}=t,R=reactExports.useMemo(()=>{let T=stripBasename(f,c);return T==null?null:{location:{pathname:T,search:p,hash:g,state:y,key:S,mask:w},navigationType:n}},[c,f,p,g,y,S,n,w]);return warning(R!=null,`<Router basename="${c}"> is not able to match the URL "${f}${p}${g}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:reactExports.createElement(NavigationContext.Provider,{value:h},reactExports.createElement(LocationContext.Provider,{children:e,value:R}))}var defaultMethod="get",defaultEncType="application/x-www-form-urlencoded";function isHtmlElement(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function isButtonElement(i){return isHtmlElement(i)&&i.tagName.toLowerCase()==="button"}function isFormElement(i){return isHtmlElement(i)&&i.tagName.toLowerCase()==="form"}function isInputElement(i){return isHtmlElement(i)&&i.tagName.toLowerCase()==="input"}function isModifiedEvent(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function shouldProcessLinkClick(i,e){return i.button===0&&(!e||e==="_self")&&!isModifiedEvent(i)}var _formDataSupportsSubmitter=null;function isFormDataSubmitterSupported(){if(_formDataSupportsSubmitter===null)try{new FormData(document.createElement("form"),0),_formDataSupportsSubmitter=!1}catch{_formDataSupportsSubmitter=!0}return _formDataSupportsSubmitter}var supportedFormEncTypes=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function getFormEncType(i){return i!=null&&!supportedFormEncTypes.has(i)?(warning(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`),null):i}function getFormSubmissionInfo(i,e){let t,n,s,a,u;if(isFormElement(i)){let c=i.getAttribute("action");n=c?stripBasename(c,e):null,t=i.getAttribute("method")||defaultMethod,s=getFormEncType(i.getAttribute("enctype"))||defaultEncType,a=new FormData(i)}else if(isButtonElement(i)||isInputElement(i)&&(i.type==="submit"||i.type==="image")){let c=i.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=i.getAttribute("formaction")||c.getAttribute("action");if(n=h?stripBasename(h,e):null,t=i.getAttribute("formmethod")||c.getAttribute("method")||defaultMethod,s=getFormEncType(i.getAttribute("formenctype"))||getFormEncType(c.getAttribute("enctype"))||defaultEncType,a=new FormData(c,i),!isFormDataSubmitterSupported()){let{name:f,type:p,value:g}=i;if(p==="image"){let y=f?`${f}.`:"";a.append(`${y}x`,"0"),a.append(`${y}y`,"0")}else f&&a.append(f,g)}}else{if(isHtmlElement(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=defaultMethod,n=null,s=defaultEncType,u=i}return a&&s==="text/plain"&&(u=a,a=void 0),{action:n,method:t.toLowerCase(),encType:s,formData:a,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function invariant2(i,e){if(i===!1||i===null||typeof i>"u")throw new Error(e)}function singleFetchUrl(i,e,t,n){let s=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return t?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${n}`:s.pathname=`${s.pathname}.${n}`:s.pathname==="/"?s.pathname=`_root.${n}`:e&&stripBasename(s.pathname,e)==="/"?s.pathname=`${removeTrailingSlash(e)}/_root.${n}`:s.pathname=`${removeTrailingSlash(s.pathname)}.${n}`,s}async function loadRouteModule(i,e){if(i.id in e)return e[i.id];try{let t=await import(i.module);return e[i.id]=t,t}catch(t){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function isHtmlLinkDescriptor(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function getKeyedPrefetchLinks(i,e,t){let n=await Promise.all(i.map(async s=>{let a=e.routes[s.route.id];if(a){let u=await loadRouteModule(a,t);return u.links?u.links():[]}return[]}));return dedupeLinkDescriptors(n.flat(1).filter(isHtmlLinkDescriptor).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function getNewMatchesForLinks(i,e,t,n,s,a){let u=(h,f)=>t[f]?h.route.id!==t[f].route.id:!0,c=(h,f)=>t[f].pathname!==h.pathname||t[f].route.path?.endsWith("*")&&t[f].params["*"]!==h.params["*"];return a==="assets"?e.filter((h,f)=>u(h,f)||c(h,f)):a==="data"?e.filter((h,f)=>{let p=n.routes[h.route.id];if(!p||!p.hasLoader)return!1;if(u(h,f)||c(h,f))return!0;if(h.route.shouldRevalidate){let g=h.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(i,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function getModuleLinkHrefs(i,e,{includeHydrateFallback:t}={}){return dedupeHrefs(i.map(n=>{let s=e.routes[n.route.id];if(!s)return[];let a=[s.module];return s.clientActionModule&&(a=a.concat(s.clientActionModule)),s.clientLoaderModule&&(a=a.concat(s.clientLoaderModule)),t&&s.hydrateFallbackModule&&(a=a.concat(s.hydrateFallbackModule)),s.imports&&(a=a.concat(s.imports)),a}).flat(1))}function dedupeHrefs(i){return[...new Set(i)]}function sortKeys(i){let e={},t=Object.keys(i).sort();for(let n of t)e[n]=i[n];return e}function dedupeLinkDescriptors(i,e){let t=new Set;return new Set(e),i.reduce((n,s)=>{let a=JSON.stringify(sortKeys(s));return t.has(a)||(t.add(a),n.push({key:a,link:s})),n},[])}function useDataRouterContext2(){let i=reactExports.useContext(DataRouterContext);return invariant2(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function useDataRouterStateContext(){let i=reactExports.useContext(DataRouterStateContext);return invariant2(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var FrameworkContext=reactExports.createContext(void 0);FrameworkContext.displayName="FrameworkContext";function useFrameworkContext(){let i=reactExports.useContext(FrameworkContext);return invariant2(i,"You must render this element inside a <HydratedRouter> element"),i}function usePrefetchBehavior(i,e){let t=reactExports.useContext(FrameworkContext),[n,s]=reactExports.useState(!1),[a,u]=reactExports.useState(!1),{onFocus:c,onBlur:h,onMouseEnter:f,onMouseLeave:p,onTouchStart:g}=e,y=reactExports.useRef(null);reactExports.useEffect(()=>{if(i==="render"&&u(!0),i==="viewport"){let R=A=>{A.forEach(F=>{u(F.isIntersecting)})},T=new IntersectionObserver(R,{threshold:.5});return y.current&&T.observe(y.current),()=>{T.disconnect()}}},[i]),reactExports.useEffect(()=>{if(n){let R=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(R)}}},[n]);let S=()=>{s(!0)},w=()=>{s(!1),u(!1)};return t?i!=="intent"?[a,y,{}]:[a,y,{onFocus:composeEventHandlers(c,S),onBlur:composeEventHandlers(h,w),onMouseEnter:composeEventHandlers(f,S),onMouseLeave:composeEventHandlers(p,w),onTouchStart:composeEventHandlers(g,S)}]:[!1,y,{}]}function composeEventHandlers(i,e){return t=>{i&&i(t),t.defaultPrevented||e(t)}}function PrefetchPageLinks({page:i,...e}){let t=useIsRSCRouterContext(),{nonce:n}=useFrameworkContext(),{router:s}=useDataRouterContext2(),a=reactExports.useMemo(()=>matchRoutes(s.routes,i,s.basename),[s.routes,i,s.basename]);return a?(e.nonce==null&&n&&(e={...e,nonce:n}),t?reactExports.createElement(RSCPrefetchPageLinksImpl,{page:i,matches:a,...e}):reactExports.createElement(PrefetchPageLinksImpl,{page:i,matches:a,...e})):null}function useKeyedPrefetchLinks(i){let{manifest:e,routeModules:t}=useFrameworkContext(),[n,s]=reactExports.useState([]);return reactExports.useEffect(()=>{let a=!1;return getKeyedPrefetchLinks(i,e,t).then(u=>{a||s(u)}),()=>{a=!0}},[i,e,t]),n}function RSCPrefetchPageLinksImpl({page:i,matches:e,...t}){let n=useLocation(),{future:s}=useFrameworkContext(),{basename:a}=useDataRouterContext2(),u=reactExports.useMemo(()=>{if(i===n.pathname+n.search+n.hash)return[];let c=singleFetchUrl(i,a,s.v8_trailingSlashAwareDataRequests,"rsc"),h=!1,f=[];for(let p of e)typeof p.route.shouldRevalidate=="function"?h=!0:f.push(p.route.id);return h&&f.length>0&&c.searchParams.set("_routes",f.join(",")),[c.pathname+c.search]},[a,s.v8_trailingSlashAwareDataRequests,i,n,e]);return reactExports.createElement(reactExports.Fragment,null,u.map(c=>reactExports.createElement("link",{key:c,rel:"prefetch",as:"fetch",href:c,...t})))}function PrefetchPageLinksImpl({page:i,matches:e,...t}){let n=useLocation(),{future:s,manifest:a,routeModules:u}=useFrameworkContext(),{basename:c}=useDataRouterContext2(),{loaderData:h,matches:f}=useDataRouterStateContext(),p=reactExports.useMemo(()=>getNewMatchesForLinks(i,e,f,a,n,"data"),[i,e,f,a,n]),g=reactExports.useMemo(()=>getNewMatchesForLinks(i,e,f,a,n,"assets"),[i,e,f,a,n]),y=reactExports.useMemo(()=>{if(i===n.pathname+n.search+n.hash)return[];let R=new Set,T=!1;if(e.forEach(F=>{let x=a.routes[F.route.id];!x||!x.hasLoader||(!p.some(D=>D.route.id===F.route.id)&&F.route.id in h&&u[F.route.id]?.shouldRevalidate||x.hasClientLoader?T=!0:R.add(F.route.id))}),R.size===0)return[];let A=singleFetchUrl(i,c,s.v8_trailingSlashAwareDataRequests,"data");return T&&R.size>0&&A.searchParams.set("_routes",e.filter(F=>R.has(F.route.id)).map(F=>F.route.id).join(",")),[A.pathname+A.search]},[c,s.v8_trailingSlashAwareDataRequests,h,n,a,p,e,i,u]),S=reactExports.useMemo(()=>getModuleLinkHrefs(g,a),[g,a]),w=useKeyedPrefetchLinks(g);return reactExports.createElement(reactExports.Fragment,null,y.map(R=>reactExports.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...t})),S.map(R=>reactExports.createElement("link",{key:R,rel:"modulepreload",href:R,...t})),w.map(({key:R,link:T})=>reactExports.createElement("link",{key:R,nonce:t.nonce,...T,crossOrigin:T.crossOrigin??t.crossOrigin})))}function mergeRefs(...i){return e=>{i.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var isBrowser2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{isBrowser2&&(window.__reactRouterVersion="7.18.2")}catch{}function BrowserRouter({basename:i,children:e,useTransitions:t,window:n}){let s=reactExports.useRef();s.current==null&&(s.current=createBrowserHistory({window:n,v5Compat:!0}));let a=s.current,[u,c]=reactExports.useState({action:a.action,location:a.location}),h=reactExports.useCallback(f=>{t===!1?c(f):reactExports.startTransition(()=>c(f))},[t]);return reactExports.useLayoutEffect(()=>a.listen(h),[a,h]),reactExports.createElement(Router,{basename:i,children:e,location:u.location,navigationType:u.action,navigator:a,useTransitions:t})}var Link=reactExports.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:s,reloadDocument:a,replace:u,mask:c,state:h,target:f,to:p,preventScrollReset:g,viewTransition:y,defaultShouldRevalidate:S,...w},R){let{basename:T,navigator:A,useTransitions:F}=reactExports.useContext(NavigationContext),x=typeof p=="string"&&ABSOLUTE_URL_REGEX.test(p),D=parseToInfo(p,T);p=D.to;let O=useHref(p,{relative:s}),K=useLocation(),z=null;if(c){let ze=resolveTo(c,[],K.mask?K.mask.pathname:"/",!0);T!=="/"&&(ze.pathname=ze.pathname==="/"?T:joinPaths([T,ze.pathname])),z=A.createHref(ze)}let[X,Ee,q]=usePrefetchBehavior(n,w),Y=useLinkClickHandler(p,{replace:u,mask:c,state:h,target:f,preventScrollReset:g,relative:s,viewTransition:y,defaultShouldRevalidate:S,useTransitions:F});function Te(ze){e&&e(ze),ze.defaultPrevented||Y(ze)}let re=!(D.isExternal||a),$e=reactExports.createElement("a",{...w,...q,href:(re?z:void 0)||D.absoluteURL||O,onClick:re?Te:e,ref:mergeRefs(R,Ee),target:f,"data-discover":!x&&t==="render"?"true":void 0});return X&&!x?reactExports.createElement(reactExports.Fragment,null,$e,reactExports.createElement(PrefetchPageLinks,{page:O})):$e});Link.displayName="Link";var NavLink=reactExports.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:s=!1,style:a,to:u,viewTransition:c,children:h,...f},p){let g=useResolvedPath(u,{relative:f.relative}),y=useLocation(),S=reactExports.useContext(DataRouterStateContext),{navigator:w,basename:R}=reactExports.useContext(NavigationContext),T=S!=null&&useViewTransitionState(g)&&c===!0,A=w.encodeLocation?w.encodeLocation(g).pathname:g.pathname,F=y.pathname,x=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;t||(F=F.toLowerCase(),x=x?x.toLowerCase():null,A=A.toLowerCase()),x&&R&&(x=stripBasename(x,R)||x);const D=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let O=F===A||!s&&F.startsWith(A)&&F.charAt(D)==="/",K=x!=null&&(x===A||!s&&x.startsWith(A)&&x.charAt(A.length)==="/"),z={isActive:O,isPending:K,isTransitioning:T},X=O?e:void 0,Ee;typeof n=="function"?Ee=n(z):Ee=[n,O?"active":null,K?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let q=typeof a=="function"?a(z):a;return reactExports.createElement(Link,{...f,"aria-current":X,className:Ee,ref:p,style:q,to:u,viewTransition:c},typeof h=="function"?h(z):h)});NavLink.displayName="NavLink";var Form=reactExports.forwardRef(({discover:i="render",fetcherKey:e,navigate:t,reloadDocument:n,replace:s,state:a,method:u=defaultMethod,action:c,onSubmit:h,relative:f,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:y,...S},w)=>{let{useTransitions:R}=reactExports.useContext(NavigationContext),T=useSubmit(),A=useFormAction(c,{relative:f}),F=u.toLowerCase()==="get"?"get":"post",x=typeof c=="string"&&ABSOLUTE_URL_REGEX.test(c),D=O=>{if(h&&h(O),O.defaultPrevented)return;O.preventDefault();let K=O.nativeEvent.submitter,z=K?.getAttribute("formmethod")||u,X=()=>T(K||O.currentTarget,{fetcherKey:e,method:z,navigate:t,replace:s,state:a,relative:f,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:y});R&&t!==!1?reactExports.startTransition(()=>X()):X()};return reactExports.createElement("form",{ref:w,method:F,action:A,onSubmit:n?h:D,...S,"data-discover":!x&&i==="render"?"true":void 0})});Form.displayName="Form";function getDataRouterConsoleError2(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext3(i){let e=reactExports.useContext(DataRouterContext);return invariant(e,getDataRouterConsoleError2(i)),e}function useLinkClickHandler(i,{target:e,replace:t,mask:n,state:s,preventScrollReset:a,relative:u,viewTransition:c,defaultShouldRevalidate:h,useTransitions:f}={}){let p=useNavigate(),g=useLocation(),y=useResolvedPath(i,{relative:u});return reactExports.useCallback(S=>{if(shouldProcessLinkClick(S,e)){S.preventDefault();let w=t!==void 0?t:createPath(g)===createPath(y),R=()=>p(i,{replace:w,mask:n,state:s,preventScrollReset:a,relative:u,viewTransition:c,defaultShouldRevalidate:h});f?reactExports.startTransition(()=>R()):R()}},[g,p,y,t,n,s,e,i,a,u,c,h,f])}var fetcherId=0,getUniqueFetcherId=()=>`__${String(++fetcherId)}__`;function useSubmit(){let{router:i}=useDataRouterContext3("useSubmit"),{basename:e}=reactExports.useContext(NavigationContext),t=useRouteId(),n=i.fetch,s=i.navigate;return reactExports.useCallback(async(a,u={})=>{let{action:c,method:h,encType:f,formData:p,body:g}=getFormSubmissionInfo(a,e);if(u.navigate===!1){let y=u.fetcherKey||getUniqueFetcherId();await n(y,t,u.action||c,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:p,body:g,formMethod:u.method||h,formEncType:u.encType||f,flushSync:u.flushSync})}else await s(u.action||c,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:p,body:g,formMethod:u.method||h,formEncType:u.encType||f,replace:u.replace,state:u.state,fromRouteId:t,flushSync:u.flushSync,viewTransition:u.viewTransition})},[n,s,e,t])}function useFormAction(i,{relative:e}={}){let{basename:t}=reactExports.useContext(NavigationContext),n=reactExports.useContext(RouteContext);invariant(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),a={...useResolvedPath(i||".",{relative:e})},u=useLocation();if(i==null){a.search=u.search;let c=new URLSearchParams(a.search),h=c.getAll("index");if(h.some(p=>p==="")){c.delete("index"),h.filter(g=>g).forEach(g=>c.append("index",g));let p=c.toString();a.search=p?`?${p}`:""}}return(!i||i===".")&&s.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(a.pathname=a.pathname==="/"?t:joinPaths([t,a.pathname])),createPath(a)}function useViewTransitionState(i,{relative:e}={}){let t=reactExports.useContext(ViewTransitionContext);invariant(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=useDataRouterContext3("useViewTransitionState"),s=useResolvedPath(i,{relative:e});if(!t.isTransitioning)return!1;let a=stripBasename(t.currentLocation.pathname,n)||t.currentLocation.pathname,u=stripBasename(t.nextLocation.pathname,n)||t.nextLocation.pathname;return matchPath(s.pathname,u)!=null||matchPath(s.pathname,a)!=null}const scriptRel="modulepreload",assetsURL=function(i){return"/dashboard/"+i},seen={},__vitePreload=function(e,t,n){let s=Promise.resolve();if(t&&t.length>0){let h=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),c=u?.nonce||u?.getAttribute("nonce");s=h(t.map(f=>{if(f=assetsURL(f),f in seen)return;seen[f]=!0;const p=f.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":scriptRel,p||(y.as="script"),y.crossOrigin="",y.href=f,c&&y.setAttribute("nonce",c),document.head.appendChild(y),p)return new Promise((S,w)=>{y.addEventListener("load",S),y.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${f}`)))})}))}function a(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return s.then(u=>{for(const c of u||[])c.status==="rejected"&&a(c.reason);return e().catch(a)})};const mergeClasses=(...i)=>i.filter((e,t,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===t).join(" ").trim();const toKebabCase=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const toCamelCase=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());const toPascalCase=i=>{const e=toCamelCase(i);return e.charAt(0).toUpperCase()+e.slice(1)};var defaultAttributes={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const hasA11yProp=i=>{for(const e in i)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};const Icon=reactExports.forwardRef(({color:i="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:n,className:s="",children:a,iconNode:u,...c},h)=>reactExports.createElement("svg",{ref:h,...defaultAttributes,width:e,height:e,stroke:i,strokeWidth:n?Number(t)*24/Number(e):t,className:mergeClasses("lucide",s),...!a&&!hasA11yProp(c)&&{"aria-hidden":"true"},...c},[...u.map(([f,p])=>reactExports.createElement(f,p)),...Array.isArray(a)?a:[a]]));const createLucideIcon=(i,e)=>{const t=reactExports.forwardRef(({className:n,...s},a)=>reactExports.createElement(Icon,{ref:a,iconNode:e,className:mergeClasses(`lucide-${toKebabCase(toPascalCase(i))}`,`lucide-${i}`,n),...s}));return t.displayName=toPascalCase(i),t};const __iconNode$5=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Activity=createLucideIcon("activity",__iconNode$5);const __iconNode$4=[["path",{d:"M12 16v5",key:"zza2cw"}],["path",{d:"M16 14v7",key:"1g90b9"}],["path",{d:"M20 10v11",key:"1iqoj0"}],["path",{d:"m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15",key:"1fw8x9"}],["path",{d:"M4 18v3",key:"1yp0dc"}],["path",{d:"M8 14v7",key:"n3cwzv"}]],ChartNoAxesCombined=createLucideIcon("chart-no-axes-combined",__iconNode$4);const __iconNode$3=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Gauge=createLucideIcon("gauge",__iconNode$3);const __iconNode$2=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],Network=createLucideIcon("network",__iconNode$2);const __iconNode$1=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],ScrollText=createLucideIcon("scroll-text",__iconNode$1);const __iconNode=[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]],Waypoints=createLucideIcon("waypoints",__iconNode),dashboardNavigationItems=[{id:"overview",label:"Overview",path:"/overview",icon:Gauge},{id:"runtime",label:"Runtime",path:"/runtime",icon:Activity},{id:"logs",label:"Logs",path:"/logs",icon:ScrollText},{id:"rdf",label:"RDF",path:"/rdf",icon:Waypoints},{id:"network",label:"Network",path:"/network",icon:Network},{id:"usage",label:"Usage",path:"/usage",icon:ChartNoAxesCombined}];function r(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i)){var s=i.length;for(e=0;e<s;e++)i[e]&&(t=r(i[e]))&&(n&&(n+=" "),n+=t)}else for(t in i)i[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var i,e,t=0,n="",s=arguments.length;t<s;t++)(i=arguments[t])&&(e=r(i))&&(n&&(n+=" "),n+=e);return n}const falsyToString=i=>typeof i=="boolean"?`${i}`:i===0?"0":i,cx=clsx,cva=(i,e)=>t=>{var n;if(e?.variants==null)return cx(i,t?.class,t?.className);const{variants:s,defaultVariants:a}=e,u=Object.keys(s).map(f=>{const p=t?.[f],g=a?.[f];if(p===null)return null;const y=falsyToString(p)||falsyToString(g);return s[f][y]}),c=t&&Object.entries(t).reduce((f,p)=>{let[g,y]=p;return y===void 0||(f[g]=y),f},{}),h=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((f,p)=>{let{class:g,className:y,...S}=p;return Object.entries(S).every(w=>{let[R,T]=w;return Array.isArray(T)?T.includes({...a,...c}[R]):{...a,...c}[R]===T})?[...f,g,y]:f},[]);return cx(i,u,h,t?.class,t?.className)},concatArrays=(i,e)=>{const t=new Array(i.length+e.length);for(let n=0;n<i.length;n++)t[n]=i[n];for(let n=0;n<e.length;n++)t[i.length+n]=e[n];return t},createClassValidatorObject=(i,e)=>({classGroupId:i,validator:e}),createClassPartObject=(i=new Map,e=null,t)=>({nextPart:i,validators:e,classGroupId:t}),CLASS_PART_SEPARATOR="-",EMPTY_CONFLICTS=[],ARBITRARY_PROPERTY_PREFIX="arbitrary..",createClassGroupUtils=i=>{const e=createClassMap(i),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=i;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return getGroupIdForArbitraryProperty(u);const c=u.split(CLASS_PART_SEPARATOR),h=c[0]===""&&c.length>1?1:0;return getGroupRecursive(c,h,e)},getConflictingClassGroupIds:(u,c)=>{if(c){const h=n[u],f=t[u];return h?f?concatArrays(f,h):h:f||EMPTY_CONFLICTS}return t[u]||EMPTY_CONFLICTS}}},getGroupRecursive=(i,e,t)=>{if(i.length-e===0)return t.classGroupId;const s=i[e],a=t.nextPart.get(s);if(a){const f=getGroupRecursive(i,e+1,a);if(f)return f}const u=t.validators;if(u===null)return;const c=e===0?i.join(CLASS_PART_SEPARATOR):i.slice(e).join(CLASS_PART_SEPARATOR),h=u.length;for(let f=0;f<h;f++){const p=u[f];if(p.validator(c))return p.classGroupId}},getGroupIdForArbitraryProperty=i=>i.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=i.slice(1,-1),t=e.indexOf(":"),n=e.slice(0,t);return n?ARBITRARY_PROPERTY_PREFIX+n:void 0})(),createClassMap=i=>{const{theme:e,classGroups:t}=i;return processClassGroups(t,e)},processClassGroups=(i,e)=>{const t=createClassPartObject();for(const n in i){const s=i[n];processClassesRecursively(s,t,n,e)}return t},processClassesRecursively=(i,e,t,n)=>{const s=i.length;for(let a=0;a<s;a++){const u=i[a];processClassDefinition(u,e,t,n)}},processClassDefinition=(i,e,t,n)=>{if(typeof i=="string"){processStringDefinition(i,e,t);return}if(typeof i=="function"){processFunctionDefinition(i,e,t,n);return}processObjectDefinition(i,e,t,n)},processStringDefinition=(i,e,t)=>{const n=i===""?e:getPart(e,i);n.classGroupId=t},processFunctionDefinition=(i,e,t,n)=>{if(isThemeGetter(i)){processClassesRecursively(i(n),e,t,n);return}e.validators===null&&(e.validators=[]),e.validators.push(createClassValidatorObject(t,i))},processObjectDefinition=(i,e,t,n)=>{const s=Object.entries(i),a=s.length;for(let u=0;u<a;u++){const[c,h]=s[u];processClassesRecursively(h,getPart(e,c),t,n)}},getPart=(i,e)=>{let t=i;const n=e.split(CLASS_PART_SEPARATOR),s=n.length;for(let a=0;a<s;a++){const u=n[a];let c=t.nextPart.get(u);c||(c=createClassPartObject(),t.nextPart.set(u,c)),t=c}return t},isThemeGetter=i=>"isThemeGetter"in i&&i.isThemeGetter===!0,createLruCache=i=>{if(i<1)return{get:()=>{},set:()=>{}};let e=0,t=Object.create(null),n=Object.create(null);const s=(a,u)=>{t[a]=u,e++,e>i&&(e=0,n=t,t=Object.create(null))};return{get(a){let u=t[a];if(u!==void 0)return u;if((u=n[a])!==void 0)return s(a,u),u},set(a,u){a in t?t[a]=u:s(a,u)}}},IMPORTANT_MODIFIER="!",MODIFIER_SEPARATOR=":",EMPTY_MODIFIERS=[],createResultObject=(i,e,t,n,s)=>({modifiers:i,hasImportantModifier:e,baseClassName:t,maybePostfixModifierPosition:n,isExternal:s}),createParseClassName=i=>{const{prefix:e,experimentalParseClassName:t}=i;let n=s=>{const a=[];let u=0,c=0,h=0,f;const p=s.length;for(let R=0;R<p;R++){const T=s[R];if(u===0&&c===0){if(T===MODIFIER_SEPARATOR){a.push(s.slice(h,R)),h=R+1;continue}if(T==="/"){f=R;continue}}T==="["?u++:T==="]"?u--:T==="("?c++:T===")"&&c--}const g=a.length===0?s:s.slice(h);let y=g,S=!1;g.endsWith(IMPORTANT_MODIFIER)?(y=g.slice(0,-1),S=!0):g.startsWith(IMPORTANT_MODIFIER)&&(y=g.slice(1),S=!0);const w=f&&f>h?f-h:void 0;return createResultObject(a,S,y,w)};if(e){const s=e+MODIFIER_SEPARATOR,a=n;n=u=>u.startsWith(s)?a(u.slice(s.length)):createResultObject(EMPTY_MODIFIERS,!1,u,void 0,!0)}if(t){const s=n;n=a=>t({className:a,parseClassName:s})}return n},createSortModifiers=i=>{const e=new Map;return i.orderSensitiveModifiers.forEach((t,n)=>{e.set(t,1e6+n)}),t=>{const n=[];let s=[];for(let a=0;a<t.length;a++){const u=t[a],c=u[0]==="[",h=e.has(u);c||h?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(u)):s.push(u)}return s.length>0&&(s.sort(),n.push(...s)),n}},createConfigUtils=i=>({cache:createLruCache(i.cacheSize),parseClassName:createParseClassName(i),sortModifiers:createSortModifiers(i),postfixLookupClassGroupIds:createPostfixLookupClassGroupIds(i),...createClassGroupUtils(i)}),createPostfixLookupClassGroupIds=i=>{const e=Object.create(null),t=i.postfixLookupClassGroups;if(t)for(let n=0;n<t.length;n++)e[t[n]]=!0;return e},SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(i,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:a,postfixLookupClassGroupIds:u}=e,c=[],h=i.trim().split(SPLIT_CLASSES_REGEX);let f="";for(let p=h.length-1;p>=0;p-=1){const g=h[p],{isExternal:y,modifiers:S,hasImportantModifier:w,baseClassName:R,maybePostfixModifierPosition:T}=t(g);if(y){f=g+(f.length>0?" "+f:f);continue}let A=!!T,F;if(A){const z=R.substring(0,T);F=n(z);const X=F&&u[F]?n(R):void 0;X&&X!==F&&(F=X,A=!1)}else F=n(R);if(!F){if(!A){f=g+(f.length>0?" "+f:f);continue}if(F=n(R),!F){f=g+(f.length>0?" "+f:f);continue}A=!1}const x=S.length===0?"":S.length===1?S[0]:a(S).join(":"),D=w?x+IMPORTANT_MODIFIER:x,O=D+F;if(c.indexOf(O)>-1)continue;c.push(O);const K=s(F,A);for(let z=0;z<K.length;++z){const X=K[z];c.push(D+X)}f=g+(f.length>0?" "+f:f)}return f},twJoin=(...i)=>{let e=0,t,n,s="";for(;e<i.length;)(t=i[e++])&&(n=toValue(t))&&(s&&(s+=" "),s+=n);return s},toValue=i=>{if(typeof i=="string")return i;let e,t="";for(let n=0;n<i.length;n++)i[n]&&(e=toValue(i[n]))&&(t&&(t+=" "),t+=e);return t},createTailwindMerge=(i,...e)=>{let t,n,s,a;const u=h=>{const f=e.reduce((p,g)=>g(p),i());return t=createConfigUtils(f),n=t.cache.get,s=t.cache.set,a=c,c(h)},c=h=>{const f=n(h);if(f)return f;const p=mergeClassList(h,t);return s(h,p),p};return a=u,(...h)=>a(twJoin(...h))},fallbackThemeArr=[],fromTheme=i=>{const e=t=>t[i]||fallbackThemeArr;return e.isThemeGetter=!0,e},arbitraryValueRegex=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,arbitraryVariableRegex=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fractionRegex=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isFraction=i=>fractionRegex.test(i),isNumber=i=>!!i&&!Number.isNaN(Number(i)),isInteger=i=>!!i&&Number.isInteger(Number(i)),isPercent=i=>i.endsWith("%")&&isNumber(i.slice(0,-1)),isTshirtSize=i=>tshirtUnitRegex.test(i),isAny=()=>!0,isLengthOnly=i=>lengthUnitRegex.test(i)&&!colorFunctionRegex.test(i),isNever=()=>!1,isShadow=i=>shadowRegex.test(i),isImage=i=>imageRegex.test(i),isAnyNonArbitrary=i=>!isArbitraryValue(i)&&!isArbitraryVariable(i),isNamedContainerQuery=i=>i.startsWith("@container")&&(i[10]==="/"&&i[11]!==void 0||i[11]==="s"&&i[16]!==void 0&&i.startsWith("-size/",10)||i[11]==="n"&&i[18]!==void 0&&i.startsWith("-normal/",10)),isArbitrarySize=i=>getIsArbitraryValue(i,isLabelSize,isNever),isArbitraryValue=i=>arbitraryValueRegex.test(i),isArbitraryLength=i=>getIsArbitraryValue(i,isLabelLength,isLengthOnly),isArbitraryNumber=i=>getIsArbitraryValue(i,isLabelNumber,isNumber),isArbitraryWeight=i=>getIsArbitraryValue(i,isLabelWeight,isAny),isArbitraryFamilyName=i=>getIsArbitraryValue(i,isLabelFamilyName,isNever),isArbitraryPosition=i=>getIsArbitraryValue(i,isLabelPosition,isNever),isArbitraryImage=i=>getIsArbitraryValue(i,isLabelImage,isImage),isArbitraryShadow=i=>getIsArbitraryValue(i,isLabelShadow,isShadow),isArbitraryVariable=i=>arbitraryVariableRegex.test(i),isArbitraryVariableLength=i=>getIsArbitraryVariable(i,isLabelLength),isArbitraryVariableFamilyName=i=>getIsArbitraryVariable(i,isLabelFamilyName),isArbitraryVariablePosition=i=>getIsArbitraryVariable(i,isLabelPosition),isArbitraryVariableSize=i=>getIsArbitraryVariable(i,isLabelSize),isArbitraryVariableImage=i=>getIsArbitraryVariable(i,isLabelImage),isArbitraryVariableShadow=i=>getIsArbitraryVariable(i,isLabelShadow,!0),isArbitraryVariableWeight=i=>getIsArbitraryVariable(i,isLabelWeight,!0),getIsArbitraryValue=(i,e,t)=>{const n=arbitraryValueRegex.exec(i);return n?n[1]?e(n[1]):t(n[2]):!1},getIsArbitraryVariable=(i,e,t=!1)=>{const n=arbitraryVariableRegex.exec(i);return n?n[1]?e(n[1]):t:!1},isLabelPosition=i=>i==="position"||i==="percentage",isLabelImage=i=>i==="image"||i==="url",isLabelSize=i=>i==="length"||i==="size"||i==="bg-size",isLabelLength=i=>i==="length",isLabelNumber=i=>i==="number",isLabelFamilyName=i=>i==="family-name",isLabelWeight=i=>i==="number"||i==="weight",isLabelShadow=i=>i==="shadow",getDefaultConfig=()=>{const i=fromTheme("color"),e=fromTheme("font"),t=fromTheme("text"),n=fromTheme("font-weight"),s=fromTheme("tracking"),a=fromTheme("leading"),u=fromTheme("breakpoint"),c=fromTheme("container"),h=fromTheme("spacing"),f=fromTheme("radius"),p=fromTheme("shadow"),g=fromTheme("inset-shadow"),y=fromTheme("text-shadow"),S=fromTheme("drop-shadow"),w=fromTheme("blur"),R=fromTheme("perspective"),T=fromTheme("aspect"),A=fromTheme("ease"),F=fromTheme("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...D(),isArbitraryVariable,isArbitraryValue],K=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],X=()=>[isArbitraryVariable,isArbitraryValue,h],Ee=()=>[isFraction,"full","auto",...X()],q=()=>[isInteger,"none","subgrid",isArbitraryVariable,isArbitraryValue],Y=()=>["auto",{span:["full",isInteger,isArbitraryVariable,isArbitraryValue]},isInteger,isArbitraryVariable,isArbitraryValue],Te=()=>[isInteger,"auto",isArbitraryVariable,isArbitraryValue],re=()=>["auto","min","max","fr",isArbitraryVariable,isArbitraryValue],$e=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ze=()=>["start","end","center","stretch","center-safe","end-safe"],ye=()=>["auto",...X()],Ve=()=>[isFraction,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...X()],pe=()=>[isFraction,"screen","full","dvw","lvw","svw","min","max","fit",...X()],De=()=>[isFraction,"screen","full","lh","dvh","lvh","svh","min","max","fit",...X()],$=()=>[i,isArbitraryVariable,isArbitraryValue],G=()=>[...D(),isArbitraryVariablePosition,isArbitraryPosition,{position:[isArbitraryVariable,isArbitraryValue]}],ce=()=>["no-repeat",{repeat:["","x","y","space","round"]}],oe=()=>["auto","cover","contain",isArbitraryVariableSize,isArbitrarySize,{size:[isArbitraryVariable,isArbitraryValue]}],Fe=()=>[isPercent,isArbitraryVariableLength,isArbitraryLength],Ue=()=>["","none","full",f,isArbitraryVariable,isArbitraryValue],Je=()=>["",isNumber,isArbitraryVariableLength,isArbitraryLength],He=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[isNumber,isPercent,isArbitraryVariablePosition,isArbitraryPosition],Oe=()=>["","none",w,isArbitraryVariable,isArbitraryValue],ie=()=>["none",isNumber,isArbitraryVariable,isArbitraryValue],j=()=>["none",isNumber,isArbitraryVariable,isArbitraryValue],N=()=>[isNumber,isArbitraryVariable,isArbitraryValue],L=()=>[isFraction,"full",...X()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[isTshirtSize],breakpoint:[isTshirtSize],color:[isAny],container:[isTshirtSize],"drop-shadow":[isTshirtSize],ease:["in","out","in-out"],font:[isAnyNonArbitrary],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[isTshirtSize],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[isTshirtSize],shadow:[isTshirtSize],spacing:["px",isNumber],text:[isTshirtSize],"text-shadow":[isTshirtSize],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",isFraction,isArbitraryValue,isArbitraryVariable,T]}],container:["container"],"container-type":[{"@container":["","normal","size",isArbitraryVariable,isArbitraryValue]}],"container-named":[isNamedContainerQuery],columns:[{columns:[isNumber,isArbitraryValue,isArbitraryVariable,c]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Ee()}],"inset-x":[{"inset-x":Ee()}],"inset-y":[{"inset-y":Ee()}],start:[{"inset-s":Ee(),start:Ee()}],end:[{"inset-e":Ee(),end:Ee()}],"inset-bs":[{"inset-bs":Ee()}],"inset-be":[{"inset-be":Ee()}],top:[{top:Ee()}],right:[{right:Ee()}],bottom:[{bottom:Ee()}],left:[{left:Ee()}],visibility:["visible","invisible","collapse"],z:[{z:[isInteger,"auto",isArbitraryVariable,isArbitraryValue]}],basis:[{basis:[isFraction,"full","auto",c,...X()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[isNumber,isFraction,"auto","initial","none",isArbitraryValue]}],grow:[{grow:["",isNumber,isArbitraryVariable,isArbitraryValue]}],shrink:[{shrink:["",isNumber,isArbitraryVariable,isArbitraryValue]}],order:[{order:[isInteger,"first","last","none",isArbitraryVariable,isArbitraryValue]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:X()}],"gap-x":[{"gap-x":X()}],"gap-y":[{"gap-y":X()}],"justify-content":[{justify:[...$e(),"normal"]}],"justify-items":[{"justify-items":[...ze(),"normal"]}],"justify-self":[{"justify-self":["auto",...ze()]}],"align-content":[{content:["normal",...$e()]}],"align-items":[{items:[...ze(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ze(),{baseline:["","last"]}]}],"place-content":[{"place-content":$e()}],"place-items":[{"place-items":[...ze(),"baseline"]}],"place-self":[{"place-self":["auto",...ze()]}],p:[{p:X()}],px:[{px:X()}],py:[{py:X()}],ps:[{ps:X()}],pe:[{pe:X()}],pbs:[{pbs:X()}],pbe:[{pbe:X()}],pt:[{pt:X()}],pr:[{pr:X()}],pb:[{pb:X()}],pl:[{pl:X()}],m:[{m:ye()}],mx:[{mx:ye()}],my:[{my:ye()}],ms:[{ms:ye()}],me:[{me:ye()}],mbs:[{mbs:ye()}],mbe:[{mbe:ye()}],mt:[{mt:ye()}],mr:[{mr:ye()}],mb:[{mb:ye()}],ml:[{ml:ye()}],"space-x":[{"space-x":X()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":X()}],"space-y-reverse":["space-y-reverse"],size:[{size:Ve()}],"inline-size":[{inline:["auto",...pe()]}],"min-inline-size":[{"min-inline":["auto",...pe()]}],"max-inline-size":[{"max-inline":["none",...pe()]}],"block-size":[{block:["auto",...De()]}],"min-block-size":[{"min-block":["auto",...De()]}],"max-block-size":[{"max-block":["none",...De()]}],w:[{w:[c,"screen",...Ve()]}],"min-w":[{"min-w":[c,"screen","none",...Ve()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[u]},...Ve()]}],h:[{h:["screen","lh",...Ve()]}],"min-h":[{"min-h":["screen","lh","none",...Ve()]}],"max-h":[{"max-h":["screen","lh",...Ve()]}],"font-size":[{text:["base",t,isArbitraryVariableLength,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,isArbitraryVariableWeight,isArbitraryWeight]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",isPercent,isArbitraryValue]}],"font-family":[{font:[isArbitraryVariableFamilyName,isArbitraryFamilyName,e]}],"font-features":[{"font-features":[isArbitraryValue]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,isArbitraryVariable,isArbitraryValue]}],"line-clamp":[{"line-clamp":[isNumber,"none",isArbitraryVariable,isArbitraryNumber]}],leading:[{leading:[a,...X()]}],"list-image":[{"list-image":["none",isArbitraryVariable,isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",isArbitraryVariable,isArbitraryValue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...He(),"wavy"]}],"text-decoration-thickness":[{decoration:[isNumber,"from-font","auto",isArbitraryVariable,isArbitraryLength]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[isNumber,"auto",isArbitraryVariable,isArbitraryValue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:X()}],"tab-size":[{tab:[isInteger,isArbitraryVariable,isArbitraryValue]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryVariable,isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryVariable,isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:oe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},isInteger,isArbitraryVariable,isArbitraryValue],radial:["",isArbitraryVariable,isArbitraryValue],conic:[isInteger,isArbitraryVariable,isArbitraryValue]},isArbitraryVariableImage,isArbitraryImage]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:Fe()}],"gradient-via-pos":[{via:Fe()}],"gradient-to-pos":[{to:Fe()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:Ue()}],"rounded-s":[{"rounded-s":Ue()}],"rounded-e":[{"rounded-e":Ue()}],"rounded-t":[{"rounded-t":Ue()}],"rounded-r":[{"rounded-r":Ue()}],"rounded-b":[{"rounded-b":Ue()}],"rounded-l":[{"rounded-l":Ue()}],"rounded-ss":[{"rounded-ss":Ue()}],"rounded-se":[{"rounded-se":Ue()}],"rounded-ee":[{"rounded-ee":Ue()}],"rounded-es":[{"rounded-es":Ue()}],"rounded-tl":[{"rounded-tl":Ue()}],"rounded-tr":[{"rounded-tr":Ue()}],"rounded-br":[{"rounded-br":Ue()}],"rounded-bl":[{"rounded-bl":Ue()}],"border-w":[{border:Je()}],"border-w-x":[{"border-x":Je()}],"border-w-y":[{"border-y":Je()}],"border-w-s":[{"border-s":Je()}],"border-w-e":[{"border-e":Je()}],"border-w-bs":[{"border-bs":Je()}],"border-w-be":[{"border-be":Je()}],"border-w-t":[{"border-t":Je()}],"border-w-r":[{"border-r":Je()}],"border-w-b":[{"border-b":Je()}],"border-w-l":[{"border-l":Je()}],"divide-x":[{"divide-x":Je()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Je()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...He(),"hidden","none"]}],"divide-style":[{divide:[...He(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...He(),"none","hidden"]}],"outline-offset":[{"outline-offset":[isNumber,isArbitraryVariable,isArbitraryValue]}],"outline-w":[{outline:["",isNumber,isArbitraryVariableLength,isArbitraryLength]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",p,isArbitraryVariableShadow,isArbitraryShadow]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",g,isArbitraryVariableShadow,isArbitraryShadow]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:Je()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[isNumber,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":Je()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",y,isArbitraryVariableShadow,isArbitraryShadow]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[isNumber,isArbitraryVariable,isArbitraryValue]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[isNumber]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[isArbitraryVariable,isArbitraryValue]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[isNumber]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:oe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",isArbitraryVariable,isArbitraryValue]}],filter:[{filter:["","none",isArbitraryVariable,isArbitraryValue]}],blur:[{blur:Oe()}],brightness:[{brightness:[isNumber,isArbitraryVariable,isArbitraryValue]}],contrast:[{contrast:[isNumber,isArbitraryVariable,isArbitraryValue]}],"drop-shadow":[{"drop-shadow":["","none",S,isArbitraryVariableShadow,isArbitraryShadow]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",isNumber,isArbitraryVariable,isArbitraryValue]}],"hue-rotate":[{"hue-rotate":[isNumber,isArbitraryVariable,isArbitraryValue]}],invert:[{invert:["",isNumber,isArbitraryVariable,isArbitraryValue]}],saturate:[{saturate:[isNumber,isArbitraryVariable,isArbitraryValue]}],sepia:[{sepia:["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-filter":[{"backdrop-filter":["","none",isArbitraryVariable,isArbitraryValue]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-contrast":[{"backdrop-contrast":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-invert":[{"backdrop-invert":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-opacity":[{"backdrop-opacity":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-saturate":[{"backdrop-saturate":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-sepia":[{"backdrop-sepia":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":X()}],"border-spacing-x":[{"border-spacing-x":X()}],"border-spacing-y":[{"border-spacing-y":X()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",isArbitraryVariable,isArbitraryValue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[isNumber,"initial",isArbitraryVariable,isArbitraryValue]}],ease:[{ease:["linear","initial",A,isArbitraryVariable,isArbitraryValue]}],delay:[{delay:[isNumber,isArbitraryVariable,isArbitraryValue]}],animate:[{animate:["none",F,isArbitraryVariable,isArbitraryValue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,isArbitraryVariable,isArbitraryValue]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:j()}],"scale-x":[{"scale-x":j()}],"scale-y":[{"scale-y":j()}],"scale-z":[{"scale-z":j()}],"scale-3d":["scale-3d"],skew:[{skew:N()}],"skew-x":[{"skew-x":N()}],"skew-y":[{"skew-y":N()}],transform:[{transform:[isArbitraryVariable,isArbitraryValue,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:L()}],"translate-x":[{"translate-x":L()}],"translate-y":[{"translate-y":L()}],"translate-z":[{"translate-z":L()}],"translate-none":["translate-none"],zoom:[{zoom:[isInteger,isArbitraryVariable,isArbitraryValue]}],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryVariable,isArbitraryValue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":$()}],"scrollbar-track-color":[{"scrollbar-track":$()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":X()}],"scroll-mx":[{"scroll-mx":X()}],"scroll-my":[{"scroll-my":X()}],"scroll-ms":[{"scroll-ms":X()}],"scroll-me":[{"scroll-me":X()}],"scroll-mbs":[{"scroll-mbs":X()}],"scroll-mbe":[{"scroll-mbe":X()}],"scroll-mt":[{"scroll-mt":X()}],"scroll-mr":[{"scroll-mr":X()}],"scroll-mb":[{"scroll-mb":X()}],"scroll-ml":[{"scroll-ml":X()}],"scroll-p":[{"scroll-p":X()}],"scroll-px":[{"scroll-px":X()}],"scroll-py":[{"scroll-py":X()}],"scroll-ps":[{"scroll-ps":X()}],"scroll-pe":[{"scroll-pe":X()}],"scroll-pbs":[{"scroll-pbs":X()}],"scroll-pbe":[{"scroll-pbe":X()}],"scroll-pt":[{"scroll-pt":X()}],"scroll-pr":[{"scroll-pr":X()}],"scroll-pb":[{"scroll-pb":X()}],"scroll-pl":[{"scroll-pl":X()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryVariable,isArbitraryValue]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[isNumber,isArbitraryVariableLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},twMerge=createTailwindMerge(getDefaultConfig);function cn(...i){return twMerge(clsx(i))}var __defProp$1=Object.defineProperty,__name$1=(i,e)=>__defProp$1(i,"name",{value:e,configurable:!0});function setRef(i,e){if(typeof i=="function")return i(e);i!=null&&(i.current=e)}__name$1(setRef,"setRef");function composeRefs(...i){return e=>{let t=!1;const n=i.map(s=>{const a=setRef(s,e);return!t&&typeof a=="function"&&(t=!0),a});if(t)return()=>{for(let s=0;s<n.length;s++){const a=n[s];typeof a=="function"?a():setRef(i[s],null)}}}}__name$1(composeRefs,"composeRefs");function useComposedRefs(...i){return reactExports.useCallback(composeRefs(...i),i)}__name$1(useComposedRefs,"useComposedRefs");var __defProp=Object.defineProperty,__name=(i,e)=>__defProp(i,"name",{value:e,configurable:!0});function createSlot(i){const e=reactExports.forwardRef((t,n)=>{let{children:s,...a}=t,u=null,c=!1;const h=[];isLazyComponent(s)&&typeof use=="function"&&(s=use(s._payload)),reactExports.Children.forEach(s,y=>{if(isSlottable(y)){c=!0;const S=y;let w="child"in S.props?S.props.child:S.props.children;isLazyComponent(w)&&typeof use=="function"&&(w=use(w._payload)),u=getSlottableElementFromSlottable(S,w),h.push(u?.props?.children)}else h.push(y)}),u?u=reactExports.cloneElement(u,void 0,h):!c&&reactExports.Children.count(s)===1&&reactExports.isValidElement(s)&&(u=s);const f=u?getElementRef(u):void 0,p=useComposedRefs(n,f);if(!u){if(s||s===0)throw new Error(c?createSlottableError(i):createSlotError(i));return s}const g=mergeProps(a,u.props??{});return u.type!==reactExports.Fragment&&(g.ref=n?p:f),reactExports.cloneElement(u,g)});return e.displayName=`${i}.Slot`,e}__name(createSlot,"createSlot");var Slot=createSlot("Slot"),SLOTTABLE_IDENTIFIER=Symbol.for("radix.slottable");function createSlottable(i){const e=__name(t=>"child"in t?t.children(t.child):t.children,"Slottable");return e.displayName=`${i}.Slottable`,e.__radixId=SLOTTABLE_IDENTIFIER,e}__name(createSlottable,"createSlottable");var getSlottableElementFromSlottable=__name((i,e)=>{if("child"in i.props){const t=i.props.child;return reactExports.isValidElement(t)?reactExports.cloneElement(t,void 0,i.props.children(t.props.children)):null}return reactExports.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function mergeProps(i,e){const t={...e};for(const n in e){const s=i[n],a=e[n];/^on[A-Z]/.test(n)?s&&a?t[n]=(...c)=>{const h=a(...c);return s(...c),h}:s&&(t[n]=s):n==="style"?t[n]={...s,...a}:n==="className"&&(t[n]=[s,a].filter(Boolean).join(" "))}return{...i,...t}}__name(mergeProps,"mergeProps");function getElementRef(i){let e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?i.ref:(e=Object.getOwnPropertyDescriptor(i,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?i.props.ref:i.props.ref||i.ref)}__name(getElementRef,"getElementRef");function isSlottable(i){return reactExports.isValidElement(i)&&typeof i.type=="function"&&"__radixId"in i.type&&i.type.__radixId===SLOTTABLE_IDENTIFIER}__name(isSlottable,"isSlottable");var REACT_LAZY_TYPE=Symbol.for("react.lazy");function isLazyComponent(i){return i!=null&&typeof i=="object"&&"$$typeof"in i&&i.$$typeof===REACT_LAZY_TYPE&&"_payload"in i&&isPromiseLike(i._payload)}__name(isLazyComponent,"isLazyComponent");function isPromiseLike(i){return typeof i=="object"&&i!==null&&"then"in i}__name(isPromiseLike,"isPromiseLike");var createSlotError=__name(i=>`${i} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),createSlottableError=__name(i=>`${i} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),use=React[" use ".trim().toString()];const buttonVariants=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",subtle:"bg-muted text-muted-foreground hover:bg-muted/80"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Button=reactExports.forwardRef(({className:i,variant:e,size:t,asChild:n=!1,...s},a)=>{const u=n?Slot:"button";return jsxRuntimeExports.jsx(u,{className:cn(buttonVariants({variant:e,size:t,className:i})),ref:a,...s})});Button.displayName="Button";const Input=reactExports.forwardRef(({className:i,type:e="text",...t},n)=>jsxRuntimeExports.jsx("input",{ref:n,type:e,className:cn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",i),...t}));Input.displayName="Input";const appLayoutGridStyle={gridTemplateColumns:"60px minmax(0, 1fr)"};function AppLayout({navigation:i,children:e,className:t}){return jsxRuntimeExports.jsxs("section",{className:cn("grid h-screen min-h-0 bg-background",t),style:appLayoutGridStyle,"data-app-layout":"workspace",children:[jsxRuntimeExports.jsx("aside",{className:"min-h-0 overflow-hidden border-r border-border/50 bg-layout-sidebar",children:i}),jsxRuntimeExports.jsx("div",{className:"min-h-0 min-w-0 overflow-hidden bg-layout-content",children:e})]})}const defaultLoginTitle="Connect Solid Pod",safeLoginErrorMessage="登录失败,请重试。";function normalizeLoginError(){return safeLoginErrorMessage}function AuthSurface({children:i,labelledBy:e}){return jsxRuntimeExports.jsx("section",{className:"flex min-h-screen items-center justify-center bg-background px-6 py-10 text-foreground","aria-labelledby":e,"data-auth-boundary":"surface",children:jsxRuntimeExports.jsx("div",{className:"w-full max-w-md rounded-lg border border-border bg-layout-content px-8 py-7 shadow-sm",children:i})})}function LoginView({title:i,description:e,defaultIssuer:t="",logo:n,error:s,onLogin:a}){const u=reactExports.useId(),c=reactExports.useId(),h=reactExports.useId(),[f,p]=reactExports.useState(t),[g,y]=reactExports.useState(!1),[S,w]=reactExports.useState(),R=f.trim(),T=S??s,A=reactExports.useMemo(()=>T?h:void 0,[h,T]);async function F(x){if(x.preventDefault(),!(!R||g)){y(!0),w(void 0);try{await a(R)}catch{w(normalizeLoginError())}finally{y(!1)}}}return jsxRuntimeExports.jsx(AuthSurface,{labelledBy:u,children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-6",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3 text-center",children:[n?jsxRuntimeExports.jsx("div",{className:"flex justify-center","aria-hidden":"true",children:n}):null,jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2",children:[jsxRuntimeExports.jsx("h1",{id:u,className:"text-2xl font-semibold leading-8 tracking-normal",children:i}),e?jsxRuntimeExports.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:e}):null]})]}),jsxRuntimeExports.jsxs("form",{className:"flex flex-col gap-4",onSubmit:x=>{F(x)},children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2 text-left",children:[jsxRuntimeExports.jsx("label",{className:"text-sm font-medium leading-5 text-foreground",htmlFor:c,children:"Solid issuer"}),jsxRuntimeExports.jsx(Input,{id:c,value:f,disabled:g,"aria-describedby":A,placeholder:"https://solidcommunity.net",onChange:x=>p(x.currentTarget.value)})]}),T?jsxRuntimeExports.jsx("p",{id:h,className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm leading-5 text-destructive",role:"alert",children:T}):null,jsxRuntimeExports.jsx(Button,{type:"submit",className:"w-full",disabled:!R||g,children:g?"登录中...":"登录"})]})]})})}function AuthBoundary({state:i,login:e,children:t,loginView:n}){return i.status==="authenticated"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:t}):i.status==="loading"?jsxRuntimeExports.jsx(AuthSurface,{children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-3 text-center text-sm leading-6 text-muted-foreground",role:"status","aria-label":"认证状态",children:[jsxRuntimeExports.jsx("span",{className:"h-8 w-8 rounded-full border-2 border-border border-t-primary","aria-hidden":"true"}),jsxRuntimeExports.jsx("span",{children:"正在检查登录状态"})]})}):jsxRuntimeExports.jsx(LoginView,{title:n?.title??defaultLoginTitle,description:n?.description,defaultIssuer:n?.defaultIssuer,logo:n?.logo,error:i.status==="error"?i.message:void 0,onLogin:e})}function ProductNavLinks({items:i,label:e}){return jsxRuntimeExports.jsx("nav",{"aria-label":e,className:"flex flex-1 flex-col items-center gap-4 py-4",children:i.map(t=>{const n=t.icon;return jsxRuntimeExports.jsxs(NavLink,{to:t.path,"aria-label":t.label,title:t.label,className:({isActive:s})=>clsx("flex h-9 w-9 items-center justify-center rounded-md transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s?"text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[jsxRuntimeExports.jsx(n,{className:"h-6 w-6","aria-hidden":"true"}),jsxRuntimeExports.jsx("span",{className:"sr-only",children:t.label})]},t.id)})})}function XpodProductLayout({product:i,items:e,switchHref:t}){const n=i==="dashboard"?"Open Settings":"Open Dashboard";return jsxRuntimeExports.jsx(AppLayout,{className:`xpod-${i}-shell`,navigation:jsxRuntimeExports.jsxs("div",{className:"flex min-h-full flex-col items-center",children:[jsxRuntimeExports.jsx("div",{className:"flex shrink-0 flex-col items-center pt-12",children:jsxRuntimeExports.jsx("a",{"aria-label":n,className:"flex h-9 w-9 items-center justify-center rounded-md bg-primary text-sm font-semibold text-primary-foreground shadow-sm",href:t,title:n,children:"X"})}),jsxRuntimeExports.jsx(ProductNavLinks,{items:e,label:`Primary ${i} sections`})]}),children:jsxRuntimeExports.jsx("div",{className:"min-h-full bg-background",children:jsxRuntimeExports.jsx(Outlet,{})})})}function XpodDashboardLayout(){return jsxRuntimeExports.jsx(XpodProductLayout,{product:"dashboard",items:dashboardNavigationItems,switchHref:"/settings/models"})}const crypto$1=crypto,isCryptoKey=i=>i instanceof CryptoKey,encoder=new TextEncoder,decoder=new TextDecoder;function concat(...i){const e=i.reduce((s,{length:a})=>s+a,0),t=new Uint8Array(e);let n=0;for(const s of i)t.set(s,n),n+=s.length;return t}const encodeBase64=i=>{let e=i;typeof e=="string"&&(e=encoder.encode(e));const t=32768,n=[];for(let s=0;s<e.length;s+=t)n.push(String.fromCharCode.apply(null,e.subarray(s,s+t)));return btoa(n.join(""))},encode$1=i=>encodeBase64(i).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),decodeBase64=i=>{const e=atob(i),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t},decode$1=i=>{let e=i;e instanceof Uint8Array&&(e=decoder.decode(e)),e=e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return decodeBase64(e)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class JOSEError extends Error{constructor(e,t){super(e,t),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}JOSEError.code="ERR_JOSE_GENERIC";class JWTClaimValidationFailed extends JOSEError{constructor(e,t,n="unspecified",s="unspecified"){super(e,{cause:{claim:n,reason:s,payload:t}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=n,this.reason=s,this.payload=t}}JWTClaimValidationFailed.code="ERR_JWT_CLAIM_VALIDATION_FAILED";class JWTExpired extends JOSEError{constructor(e,t,n="unspecified",s="unspecified"){super(e,{cause:{claim:n,reason:s,payload:t}}),this.code="ERR_JWT_EXPIRED",this.claim=n,this.reason=s,this.payload=t}}JWTExpired.code="ERR_JWT_EXPIRED";class JOSEAlgNotAllowed extends JOSEError{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}}JOSEAlgNotAllowed.code="ERR_JOSE_ALG_NOT_ALLOWED";class JOSENotSupported extends JOSEError{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}}JOSENotSupported.code="ERR_JOSE_NOT_SUPPORTED";class JWEDecryptionFailed extends JOSEError{constructor(e="decryption operation failed",t){super(e,t),this.code="ERR_JWE_DECRYPTION_FAILED"}}JWEDecryptionFailed.code="ERR_JWE_DECRYPTION_FAILED";class JWEInvalid extends JOSEError{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}}JWEInvalid.code="ERR_JWE_INVALID";class JWSInvalid extends JOSEError{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}}JWSInvalid.code="ERR_JWS_INVALID";class JWTInvalid extends JOSEError{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}}JWTInvalid.code="ERR_JWT_INVALID";class JWKInvalid extends JOSEError{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}}JWKInvalid.code="ERR_JWK_INVALID";class JWKSInvalid extends JOSEError{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}}JWKSInvalid.code="ERR_JWKS_INVALID";class JWKSNoMatchingKey extends JOSEError{constructor(e="no applicable key found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_NO_MATCHING_KEY"}}JWKSNoMatchingKey.code="ERR_JWKS_NO_MATCHING_KEY";class JWKSMultipleMatchingKeys extends JOSEError{constructor(e="multiple matching keys found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}JWKSMultipleMatchingKeys.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";class JWKSTimeout extends JOSEError{constructor(e="request timed out",t){super(e,t),this.code="ERR_JWKS_TIMEOUT"}}JWKSTimeout.code="ERR_JWKS_TIMEOUT";class JWSSignatureVerificationFailed extends JOSEError{constructor(e="signature verification failed",t){super(e,t),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}JWSSignatureVerificationFailed.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";function unusable(i,e="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${e} must be ${i}`)}function isAlgorithm(i,e){return i.name===e}function getHashLength(i){return parseInt(i.name.slice(4),10)}function getNamedCurve(i){switch(i){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function checkUsage(i,e){if(e.length&&!e.some(t=>i.usages.includes(t))){let t="CryptoKey does not support this operation, its usages must include ";if(e.length>2){const n=e.pop();t+=`one of ${e.join(", ")}, or ${n}.`}else e.length===2?t+=`one of ${e[0]} or ${e[1]}.`:t+=`${e[0]}.`;throw new TypeError(t)}}function checkSigCryptoKey(i,e,...t){switch(e){case"HS256":case"HS384":case"HS512":{if(!isAlgorithm(i.algorithm,"HMAC"))throw unusable("HMAC");const n=parseInt(e.slice(2),10);if(getHashLength(i.algorithm.hash)!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!isAlgorithm(i.algorithm,"RSASSA-PKCS1-v1_5"))throw unusable("RSASSA-PKCS1-v1_5");const n=parseInt(e.slice(2),10);if(getHashLength(i.algorithm.hash)!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!isAlgorithm(i.algorithm,"RSA-PSS"))throw unusable("RSA-PSS");const n=parseInt(e.slice(2),10);if(getHashLength(i.algorithm.hash)!==n)throw unusable(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":{if(i.algorithm.name!=="Ed25519"&&i.algorithm.name!=="Ed448")throw unusable("Ed25519 or Ed448");break}case"Ed25519":{if(!isAlgorithm(i.algorithm,"Ed25519"))throw unusable("Ed25519");break}case"ES256":case"ES384":case"ES512":{if(!isAlgorithm(i.algorithm,"ECDSA"))throw unusable("ECDSA");const n=getNamedCurve(e);if(i.algorithm.namedCurve!==n)throw unusable(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}checkUsage(i,t)}function message(i,e,...t){if(t=t.filter(Boolean),t.length>2){const n=t.pop();i+=`one of type ${t.join(", ")}, or ${n}.`}else t.length===2?i+=`one of type ${t[0]} or ${t[1]}.`:i+=`of type ${t[0]}.`;return e==null?i+=` Received ${e}`:typeof e=="function"&&e.name?i+=` Received function ${e.name}`:typeof e=="object"&&e!=null&&e.constructor?.name&&(i+=` Received an instance of ${e.constructor.name}`),i}const invalidKeyInput=(i,...e)=>message("Key must be ",i,...e);function withAlg(i,e,...t){return message(`Key for the ${i} algorithm must be `,e,...t)}const isKeyLike=i=>isCryptoKey(i)?!0:i?.[Symbol.toStringTag]==="KeyObject",types=["CryptoKey"],isDisjoint=(...i)=>{const e=i.filter(Boolean);if(e.length===0||e.length===1)return!0;let t;for(const n of e){const s=Object.keys(n);if(!t||t.size===0){t=new Set(s);continue}for(const a of s){if(t.has(a))return!1;t.add(a)}}return!0};function isObjectLike(i){return typeof i=="object"&&i!==null}function isObject$1(i){if(!isObjectLike(i)||Object.prototype.toString.call(i)!=="[object Object]")return!1;if(Object.getPrototypeOf(i)===null)return!0;let e=i;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(i)===e}const checkKeyLength=(i,e)=>{if(i.startsWith("RS")||i.startsWith("PS")){const{modulusLength:t}=e.algorithm;if(typeof t!="number"||t<2048)throw new TypeError(`${i} requires key modulusLength to be 2048 bits or larger`)}};function isJWK(i){return isObject$1(i)&&typeof i.kty=="string"}function isPrivateJWK(i){return i.kty!=="oct"&&typeof i.d=="string"}function isPublicJWK(i){return i.kty!=="oct"&&typeof i.d>"u"}function isSecretJWK(i){return isJWK(i)&&i.kty==="oct"&&typeof i.k=="string"}function subtleMapping(i){let e,t;switch(i.kty){case"RSA":{switch(i.alg){case"PS256":case"PS384":case"PS512":e={name:"RSA-PSS",hash:`SHA-${i.alg.slice(-3)}`},t=i.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":e={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${i.alg.slice(-3)}`},t=i.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":e={name:"RSA-OAEP",hash:`SHA-${parseInt(i.alg.slice(-3),10)||1}`},t=i.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"EC":{switch(i.alg){case"ES256":e={name:"ECDSA",namedCurve:"P-256"},t=i.d?["sign"]:["verify"];break;case"ES384":e={name:"ECDSA",namedCurve:"P-384"},t=i.d?["sign"]:["verify"];break;case"ES512":e={name:"ECDSA",namedCurve:"P-521"},t=i.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":e={name:"ECDH",namedCurve:i.crv},t=i.d?["deriveBits"]:[];break;default:throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"OKP":{switch(i.alg){case"Ed25519":e={name:"Ed25519"},t=i.d?["sign"]:["verify"];break;case"EdDSA":e={name:i.crv},t=i.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":e={name:i.crv},t=i.d?["deriveBits"]:[];break;default:throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}default:throw new JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:e,keyUsages:t}}const parse$1=async i=>{if(!i.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:e,keyUsages:t}=subtleMapping(i),n=[e,i.ext??!1,i.key_ops??t],s={...i};return delete s.alg,delete s.use,crypto$1.subtle.importKey("jwk",s,...n)},exportKeyValue=i=>decode$1(i);let privCache,pubCache;const isKeyObject=i=>i?.[Symbol.toStringTag]==="KeyObject",importAndCache=async(i,e,t,n,s=!1)=>{let a=i.get(e);if(a?.[n])return a[n];const u=await parse$1({...t,alg:n});return s&&Object.freeze(e),a?a[n]=u:i.set(e,{[n]:u}),u},normalizePublicKey=(i,e)=>{if(isKeyObject(i)){let t=i.export({format:"jwk"});return delete t.d,delete t.dp,delete t.dq,delete t.p,delete t.q,delete t.qi,t.k?exportKeyValue(t.k):(pubCache||(pubCache=new WeakMap),importAndCache(pubCache,i,t,e))}return isJWK(i)?i.k?decode$1(i.k):(pubCache||(pubCache=new WeakMap),importAndCache(pubCache,i,i,e,!0)):i},normalizePrivateKey=(i,e)=>{if(isKeyObject(i)){let t=i.export({format:"jwk"});return t.k?exportKeyValue(t.k):(privCache||(privCache=new WeakMap),importAndCache(privCache,i,t,e))}return isJWK(i)?i.k?decode$1(i.k):(privCache||(privCache=new WeakMap),importAndCache(privCache,i,i,e,!0)):i},normalize$1={normalizePublicKey,normalizePrivateKey};async function importJWK(i,e){if(!isObject$1(i))throw new TypeError("JWK must be an object");switch(e||(e=i.alg),i.kty){case"oct":if(typeof i.k!="string"||!i.k)throw new TypeError('missing "k" (Key Value) Parameter value');return decode$1(i.k);case"RSA":if("oth"in i&&i.oth!==void 0)throw new JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return parse$1({...i,alg:e});default:throw new JOSENotSupported('Unsupported "kty" (Key Type) Parameter value')}}const tag=i=>i?.[Symbol.toStringTag],jwkMatchesOp=(i,e,t)=>{if(e.use!==void 0&&e.use!=="sig")throw new TypeError("Invalid key for this operation, when present its use must be sig");if(e.key_ops!==void 0&&e.key_ops.includes?.(t)!==!0)throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${t}`);if(e.alg!==void 0&&e.alg!==i)throw new TypeError(`Invalid key for this operation, when present its alg must be ${i}`);return!0},symmetricTypeCheck=(i,e,t,n)=>{if(!(e instanceof Uint8Array)){if(n&&isJWK(e)){if(isSecretJWK(e)&&jwkMatchesOp(i,e,t))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!isKeyLike(e))throw new TypeError(withAlg(i,e,...types,"Uint8Array",n?"JSON Web Key":null));if(e.type!=="secret")throw new TypeError(`${tag(e)} instances for symmetric algorithms must be of type "secret"`)}},asymmetricTypeCheck=(i,e,t,n)=>{if(n&&isJWK(e))switch(t){case"sign":if(isPrivateJWK(e)&&jwkMatchesOp(i,e,t))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(isPublicJWK(e)&&jwkMatchesOp(i,e,t))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!isKeyLike(e))throw new TypeError(withAlg(i,e,...types,n?"JSON Web Key":null));if(e.type==="secret")throw new TypeError(`${tag(e)} instances for asymmetric algorithms must not be of type "secret"`);if(t==="sign"&&e.type==="public")throw new TypeError(`${tag(e)} instances for asymmetric algorithm signing must be of type "private"`);if(t==="decrypt"&&e.type==="public")throw new TypeError(`${tag(e)} instances for asymmetric algorithm decryption must be of type "private"`);if(e.algorithm&&t==="verify"&&e.type==="private")throw new TypeError(`${tag(e)} instances for asymmetric algorithm verifying must be of type "public"`);if(e.algorithm&&t==="encrypt"&&e.type==="private")throw new TypeError(`${tag(e)} instances for asymmetric algorithm encryption must be of type "public"`)};function checkKeyType(i,e,t,n){e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?symmetricTypeCheck(e,t,n,i):asymmetricTypeCheck(e,t,n,i)}checkKeyType.bind(void 0,!1);const checkKeyTypeWithJwk=checkKeyType.bind(void 0,!0);function validateCrit(i,e,t,n,s){if(s.crit!==void 0&&n?.crit===void 0)throw new i('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||n.crit===void 0)return new Set;if(!Array.isArray(n.crit)||n.crit.length===0||n.crit.some(u=>typeof u!="string"||u.length===0))throw new i('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let a;t!==void 0?a=new Map([...Object.entries(t),...e.entries()]):a=e;for(const u of n.crit){if(!a.has(u))throw new JOSENotSupported(`Extension Header Parameter "${u}" is not recognized`);if(s[u]===void 0)throw new i(`Extension Header Parameter "${u}" is missing`);if(a.get(u)&&n[u]===void 0)throw new i(`Extension Header Parameter "${u}" MUST be integrity protected`)}return new Set(n.crit)}const validateAlgorithms=(i,e)=>{if(e!==void 0&&(!Array.isArray(e)||e.some(t=>typeof t!="string")))throw new TypeError(`"${i}" option must be an array of strings`);if(e)return new Set(e)},keyToJWK=async i=>{if(i instanceof Uint8Array)return{kty:"oct",k:encode$1(i)};if(!isCryptoKey(i))throw new TypeError(invalidKeyInput(i,...types,"Uint8Array"));if(!i.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:e,key_ops:t,alg:n,use:s,...a}=await crypto$1.subtle.exportKey("jwk",i);return a};async function exportJWK(i){return keyToJWK(i)}function subtleDsa(i,e){const t=`SHA-${i.slice(-3)}`;switch(i){case"HS256":case"HS384":case"HS512":return{hash:t,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:t,name:"RSA-PSS",saltLength:i.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:t,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:t,name:"ECDSA",namedCurve:e.namedCurve};case"Ed25519":return{name:"Ed25519"};case"EdDSA":return{name:e.name};default:throw new JOSENotSupported(`alg ${i} is not supported either by JOSE or your javascript runtime`)}}async function getCryptoKey(i,e,t){if(t==="sign"&&(e=await normalize$1.normalizePrivateKey(e,i)),t==="verify"&&(e=await normalize$1.normalizePublicKey(e,i)),isCryptoKey(e))return checkSigCryptoKey(e,i,t),e;if(e instanceof Uint8Array){if(!i.startsWith("HS"))throw new TypeError(invalidKeyInput(e,...types));return crypto$1.subtle.importKey("raw",e,{hash:`SHA-${i.slice(-3)}`,name:"HMAC"},!1,[t])}throw new TypeError(invalidKeyInput(e,...types,"Uint8Array","JSON Web Key"))}const verify=async(i,e,t,n)=>{const s=await getCryptoKey(i,e,"verify");checkKeyLength(i,s);const a=subtleDsa(i,s.algorithm);try{return await crypto$1.subtle.verify(a,s,t,n)}catch{return!1}};async function flattenedVerify(i,e,t){if(!isObject$1(i))throw new JWSInvalid("Flattened JWS must be an object");if(i.protected===void 0&&i.header===void 0)throw new JWSInvalid('Flattened JWS must have either of the "protected" or "header" members');if(i.protected!==void 0&&typeof i.protected!="string")throw new JWSInvalid("JWS Protected Header incorrect type");if(i.payload===void 0)throw new JWSInvalid("JWS Payload missing");if(typeof i.signature!="string")throw new JWSInvalid("JWS Signature missing or incorrect type");if(i.header!==void 0&&!isObject$1(i.header))throw new JWSInvalid("JWS Unprotected Header incorrect type");let n={};if(i.protected)try{const R=decode$1(i.protected);n=JSON.parse(decoder.decode(R))}catch{throw new JWSInvalid("JWS Protected Header is invalid")}if(!isDisjoint(n,i.header))throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const s={...n,...i.header},a=validateCrit(JWSInvalid,new Map([["b64",!0]]),t?.crit,n,s);let u=!0;if(a.has("b64")&&(u=n.b64,typeof u!="boolean"))throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:c}=s;if(typeof c!="string"||!c)throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');const h=t&&validateAlgorithms("algorithms",t.algorithms);if(h&&!h.has(c))throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed');if(u){if(typeof i.payload!="string")throw new JWSInvalid("JWS Payload must be a string")}else if(typeof i.payload!="string"&&!(i.payload instanceof Uint8Array))throw new JWSInvalid("JWS Payload must be a string or an Uint8Array instance");let f=!1;typeof e=="function"?(e=await e(n,i),f=!0,checkKeyTypeWithJwk(c,e,"verify"),isJWK(e)&&(e=await importJWK(e,c))):checkKeyTypeWithJwk(c,e,"verify");const p=concat(encoder.encode(i.protected??""),encoder.encode("."),typeof i.payload=="string"?encoder.encode(i.payload):i.payload);let g;try{g=decode$1(i.signature)}catch{throw new JWSInvalid("Failed to base64url decode the signature")}if(!await verify(c,e,g,p))throw new JWSSignatureVerificationFailed;let S;if(u)try{S=decode$1(i.payload)}catch{throw new JWSInvalid("Failed to base64url decode the payload")}else typeof i.payload=="string"?S=encoder.encode(i.payload):S=i.payload;const w={payload:S};return i.protected!==void 0&&(w.protectedHeader=n),i.header!==void 0&&(w.unprotectedHeader=i.header),f?{...w,key:e}:w}async function compactVerify(i,e,t){if(i instanceof Uint8Array&&(i=decoder.decode(i)),typeof i!="string")throw new JWSInvalid("Compact JWS must be a string or Uint8Array");const{0:n,1:s,2:a,length:u}=i.split(".");if(u!==3)throw new JWSInvalid("Invalid Compact JWS");const c=await flattenedVerify({payload:s,protected:n,signature:a},e,t),h={payload:c.payload,protectedHeader:c.protectedHeader};return typeof e=="function"?{...h,key:c.key}:h}const epoch=i=>Math.floor(i.getTime()/1e3),minute=60,hour=minute*60,day=hour*24,week=day*7,year=day*365.25,REGEX=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,secs=i=>{const e=REGEX.exec(i);if(!e||e[4]&&e[1])throw new TypeError("Invalid time period format");const t=parseFloat(e[2]),n=e[3].toLowerCase();let s;switch(n){case"sec":case"secs":case"second":case"seconds":case"s":s=Math.round(t);break;case"minute":case"minutes":case"min":case"mins":case"m":s=Math.round(t*minute);break;case"hour":case"hours":case"hr":case"hrs":case"h":s=Math.round(t*hour);break;case"day":case"days":case"d":s=Math.round(t*day);break;case"week":case"weeks":case"w":s=Math.round(t*week);break;default:s=Math.round(t*year);break}return e[1]==="-"||e[4]==="ago"?-s:s},normalizeTyp=i=>i.toLowerCase().replace(/^application\//,""),checkAudiencePresence=(i,e)=>typeof i=="string"?e.includes(i):Array.isArray(i)?e.some(Set.prototype.has.bind(new Set(i))):!1,jwtPayload=(i,e,t={})=>{let n;try{n=JSON.parse(decoder.decode(e))}catch{}if(!isObject$1(n))throw new JWTInvalid("JWT Claims Set must be a top-level JSON object");const{typ:s}=t;if(s&&(typeof i.typ!="string"||normalizeTyp(i.typ)!==normalizeTyp(s)))throw new JWTClaimValidationFailed('unexpected "typ" JWT header value',n,"typ","check_failed");const{requiredClaims:a=[],issuer:u,subject:c,audience:h,maxTokenAge:f}=t,p=[...a];f!==void 0&&p.push("iat"),h!==void 0&&p.push("aud"),c!==void 0&&p.push("sub"),u!==void 0&&p.push("iss");for(const w of new Set(p.reverse()))if(!(w in n))throw new JWTClaimValidationFailed(`missing required "${w}" claim`,n,w,"missing");if(u&&!(Array.isArray(u)?u:[u]).includes(n.iss))throw new JWTClaimValidationFailed('unexpected "iss" claim value',n,"iss","check_failed");if(c&&n.sub!==c)throw new JWTClaimValidationFailed('unexpected "sub" claim value',n,"sub","check_failed");if(h&&!checkAudiencePresence(n.aud,typeof h=="string"?[h]:h))throw new JWTClaimValidationFailed('unexpected "aud" claim value',n,"aud","check_failed");let g;switch(typeof t.clockTolerance){case"string":g=secs(t.clockTolerance);break;case"number":g=t.clockTolerance;break;case"undefined":g=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:y}=t,S=epoch(y||new Date);if((n.iat!==void 0||f)&&typeof n.iat!="number")throw new JWTClaimValidationFailed('"iat" claim must be a number',n,"iat","invalid");if(n.nbf!==void 0){if(typeof n.nbf!="number")throw new JWTClaimValidationFailed('"nbf" claim must be a number',n,"nbf","invalid");if(n.nbf>S+g)throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed',n,"nbf","check_failed")}if(n.exp!==void 0){if(typeof n.exp!="number")throw new JWTClaimValidationFailed('"exp" claim must be a number',n,"exp","invalid");if(n.exp<=S-g)throw new JWTExpired('"exp" claim timestamp check failed',n,"exp","check_failed")}if(f){const w=S-n.iat,R=typeof f=="number"?f:secs(f);if(w-g>R)throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)',n,"iat","check_failed");if(w<0-g)throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)',n,"iat","check_failed")}return n};async function jwtVerify(i,e,t){const n=await compactVerify(i,e,t);if(n.protectedHeader.crit?.includes("b64")&&n.protectedHeader.b64===!1)throw new JWTInvalid("JWTs MUST NOT use unencoded payload");const a={payload:jwtPayload(n.protectedHeader,n.payload,t),protectedHeader:n.protectedHeader};return typeof e=="function"?{...a,key:n.key}:a}const sign=async(i,e,t)=>{const n=await getCryptoKey(i,e,"sign");checkKeyLength(i,n);const s=await crypto$1.subtle.sign(subtleDsa(i,n.algorithm),n,t);return new Uint8Array(s)};class FlattenedSign{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader)throw new JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!isDisjoint(this._protectedHeader,this._unprotectedHeader))throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n={...this._protectedHeader,...this._unprotectedHeader},s=validateCrit(JWSInvalid,new Map([["b64",!0]]),t?.crit,this._protectedHeader,n);let a=!0;if(s.has("b64")&&(a=this._protectedHeader.b64,typeof a!="boolean"))throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:u}=n;if(typeof u!="string"||!u)throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');checkKeyTypeWithJwk(u,e,"sign");let c=this._payload;a&&(c=encoder.encode(encode$1(c)));let h;this._protectedHeader?h=encoder.encode(encode$1(JSON.stringify(this._protectedHeader))):h=encoder.encode("");const f=concat(h,encoder.encode("."),c),p=await sign(u,e,f),g={signature:encode$1(p),payload:""};return a&&(g.payload=decoder.decode(c)),this._unprotectedHeader&&(g.header=this._unprotectedHeader),this._protectedHeader&&(g.protected=decoder.decode(h)),g}}class CompactSign{constructor(e){this._flattened=new FlattenedSign(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){const n=await this._flattened.sign(e,t);if(n.payload===void 0)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${n.protected}.${n.payload}.${n.signature}`}}function validateInput(i,e){if(!Number.isFinite(e))throw new TypeError(`Invalid ${i} input`);return e}class ProduceJWT{constructor(e={}){if(!isObject$1(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return typeof e=="number"?this._payload={...this._payload,nbf:validateInput("setNotBefore",e)}:e instanceof Date?this._payload={...this._payload,nbf:validateInput("setNotBefore",epoch(e))}:this._payload={...this._payload,nbf:epoch(new Date)+secs(e)},this}setExpirationTime(e){return typeof e=="number"?this._payload={...this._payload,exp:validateInput("setExpirationTime",e)}:e instanceof Date?this._payload={...this._payload,exp:validateInput("setExpirationTime",epoch(e))}:this._payload={...this._payload,exp:epoch(new Date)+secs(e)},this}setIssuedAt(e){return typeof e>"u"?this._payload={...this._payload,iat:epoch(new Date)}:e instanceof Date?this._payload={...this._payload,iat:validateInput("setIssuedAt",epoch(e))}:typeof e=="string"?this._payload={...this._payload,iat:validateInput("setIssuedAt",epoch(new Date)+secs(e))}:this._payload={...this._payload,iat:validateInput("setIssuedAt",e)},this}}class SignJWT extends ProduceJWT{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){const n=new CompactSign(encoder.encode(JSON.stringify(this._payload)));if(n.setProtectedHeader(this._protectedHeader),Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes("b64")&&this._protectedHeader.b64===!1)throw new JWTInvalid("JWTs MUST NOT use unencoded payload");return n.sign(e,t)}}function getKtyFromAlg(i){switch(typeof i=="string"&&i.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set')}}function isJWKSLike(i){return i&&typeof i=="object"&&Array.isArray(i.keys)&&i.keys.every(isJWKLike)}function isJWKLike(i){return isObject$1(i)}function clone$1(i){return typeof structuredClone=="function"?structuredClone(i):JSON.parse(JSON.stringify(i))}class LocalJWKSet{constructor(e){if(this._cached=new WeakMap,!isJWKSLike(e))throw new JWKSInvalid("JSON Web Key Set malformed");this._jwks=clone$1(e)}async getKey(e,t){const{alg:n,kid:s}={...e,...t?.header},a=getKtyFromAlg(n),u=this._jwks.keys.filter(f=>{let p=a===f.kty;if(p&&typeof s=="string"&&(p=s===f.kid),p&&typeof f.alg=="string"&&(p=n===f.alg),p&&typeof f.use=="string"&&(p=f.use==="sig"),p&&Array.isArray(f.key_ops)&&(p=f.key_ops.includes("verify")),p)switch(n){case"ES256":p=f.crv==="P-256";break;case"ES256K":p=f.crv==="secp256k1";break;case"ES384":p=f.crv==="P-384";break;case"ES512":p=f.crv==="P-521";break;case"Ed25519":p=f.crv==="Ed25519";break;case"EdDSA":p=f.crv==="Ed25519"||f.crv==="Ed448";break}return p}),{0:c,length:h}=u;if(h===0)throw new JWKSNoMatchingKey;if(h!==1){const f=new JWKSMultipleMatchingKeys,{_cached:p}=this;throw f[Symbol.asyncIterator]=async function*(){for(const g of u)try{yield await importWithAlgCache(p,g,n)}catch{}},f}return importWithAlgCache(this._cached,c,n)}}async function importWithAlgCache(i,e,t){const n=i.get(e)||i.set(e,{}).get(e);if(n[t]===void 0){const s=await importJWK({...e,ext:!0},t);if(s instanceof Uint8Array||s.type!=="public")throw new JWKSInvalid("JSON Web Key Set members must be public keys");n[t]=s}return n[t]}function createLocalJWKSet(i){const e=new LocalJWKSet(i),t=async(n,s)=>e.getKey(n,s);return Object.defineProperties(t,{jwks:{value:()=>clone$1(e._jwks),enumerable:!0,configurable:!1,writable:!1}}),t}const fetchJwks=async(i,e,t)=>{let n,s,a=!1;typeof AbortController=="function"&&(n=new AbortController,s=setTimeout(()=>{a=!0,n.abort()},e));const u=await fetch(i.href,{signal:n?n.signal:void 0,redirect:"manual",headers:t.headers}).catch(c=>{throw a?new JWKSTimeout:c});if(s!==void 0&&clearTimeout(s),u.status!==200)throw new JOSEError("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await u.json()}catch{throw new JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON")}};function isCloudflareWorkers(){return typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel"}let USER_AGENT;(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(USER_AGENT="jose/v5.10.0");const jwksCache=Symbol();function isFreshJwksCache(i,e){return!(typeof i!="object"||i===null||!("uat"in i)||typeof i.uat!="number"||Date.now()-i.uat>=e||!("jwks"in i)||!isObject$1(i.jwks)||!Array.isArray(i.jwks.keys)||!Array.prototype.every.call(i.jwks.keys,isObject$1))}class RemoteJWKSet{constructor(e,t){if(!(e instanceof URL))throw new TypeError("url must be an instance of URL");this._url=new URL(e.href),this._options={agent:t?.agent,headers:t?.headers},this._timeoutDuration=typeof t?.timeoutDuration=="number"?t?.timeoutDuration:5e3,this._cooldownDuration=typeof t?.cooldownDuration=="number"?t?.cooldownDuration:3e4,this._cacheMaxAge=typeof t?.cacheMaxAge=="number"?t?.cacheMaxAge:6e5,t?.[jwksCache]!==void 0&&(this._cache=t?.[jwksCache],isFreshJwksCache(t?.[jwksCache],this._cacheMaxAge)&&(this._jwksTimestamp=this._cache.uat,this._local=createLocalJWKSet(this._cache.jwks)))}coolingDown(){return typeof this._jwksTimestamp=="number"?Date.now()<this._jwksTimestamp+this._cooldownDuration:!1}fresh(){return typeof this._jwksTimestamp=="number"?Date.now()<this._jwksTimestamp+this._cacheMaxAge:!1}async getKey(e,t){(!this._local||!this.fresh())&&await this.reload();try{return await this._local(e,t)}catch(n){if(n instanceof JWKSNoMatchingKey&&this.coolingDown()===!1)return await this.reload(),this._local(e,t);throw n}}async reload(){this._pendingFetch&&isCloudflareWorkers()&&(this._pendingFetch=void 0);const e=new Headers(this._options.headers);USER_AGENT&&!e.has("User-Agent")&&(e.set("User-Agent",USER_AGENT),this._options.headers=Object.fromEntries(e.entries())),this._pendingFetch||(this._pendingFetch=fetchJwks(this._url,this._timeoutDuration,this._options).then(t=>{this._local=createLocalJWKSet(t),this._cache&&(this._cache.uat=Date.now(),this._cache.jwks=t),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(t=>{throw this._pendingFetch=void 0,t})),await this._pendingFetch}}function createRemoteJWKSet(i,e){const t=new RemoteJWKSet(i,e),n=async(s,a)=>t.getKey(s,a);return Object.defineProperties(n,{coolingDown:{get:()=>t.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>t.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>t.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>!!t._pendingFetch,enumerable:!0,configurable:!1},jwks:{value:()=>t._local?.jwks(),enumerable:!0,configurable:!1,writable:!1}}),n}function getModulusLengthOption(i){const e=i?.modulusLength??2048;if(typeof e!="number"||e<2048)throw new JOSENotSupported("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return e}async function generateKeyPair$1(i,e){let t,n;switch(i){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${i.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:getModulusLengthOption(e)},n=["sign","verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${i.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:getModulusLengthOption(e)},n=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(i.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:getModulusLengthOption(e)},n=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":t={name:"ECDSA",namedCurve:"P-256"},n=["sign","verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},n=["sign","verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},n=["sign","verify"];break;case"Ed25519":t={name:"Ed25519"},n=["sign","verify"];break;case"EdDSA":{n=["sign","verify"];const s="Ed25519";switch(s){case"Ed25519":case"Ed448":t={name:s};break;default:throw new JOSENotSupported("Invalid or unsupported crv option provided")}break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{n=["deriveKey","deriveBits"];const s="P-256";switch(s){case"P-256":case"P-384":case"P-521":{t={name:"ECDH",namedCurve:s};break}case"X25519":case"X448":t={name:s};break;default:throw new JOSENotSupported("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return crypto$1.subtle.generateKey(t,!1,n)}async function generateKeyPair(i,e){return generateKeyPair$1(i,e)}const byteToHex=[];for(let i=0;i<256;++i)byteToHex.push((i+256).toString(16).slice(1));function unsafeStringify(i,e=0){return(byteToHex[i[e+0]]+byteToHex[i[e+1]]+byteToHex[i[e+2]]+byteToHex[i[e+3]]+"-"+byteToHex[i[e+4]]+byteToHex[i[e+5]]+"-"+byteToHex[i[e+6]]+byteToHex[i[e+7]]+"-"+byteToHex[i[e+8]]+byteToHex[i[e+9]]+"-"+byteToHex[i[e+10]]+byteToHex[i[e+11]]+byteToHex[i[e+12]]+byteToHex[i[e+13]]+byteToHex[i[e+14]]+byteToHex[i[e+15]]).toLowerCase()}let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");getRandomValues=crypto.getRandomValues.bind(crypto)}return getRandomValues(rnds8)}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(i,e,t){if(native.randomUUID&&!i)return native.randomUUID();i=i||{};const n=i.random??i.rng?.()??rng();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,unsafeStringify(n)}const SOLID_CLIENT_AUTHN_KEY_PREFIX="solidClientAuthn:",PREFERRED_SIGNING_ALG=["ES256","RS256"],EVENTS={ERROR:"error",LOGIN:"login",LOGOUT:"logout",NEW_REFRESH_TOKEN:"newRefreshToken",NEW_TOKENS:"newTokens",AUTHORIZATION_REQUEST:"authorizationRequest",SESSION_EXPIRED:"sessionExpired",SESSION_EXTENDED:"sessionExtended",SESSION_RESTORED:"sessionRestore",TIMEOUT_SET:"timeoutSet"},REFRESH_BEFORE_EXPIRATION_SECONDS=5,SCOPE_OPENID="openid",SCOPE_OFFLINE="offline_access",SCOPE_WEBID="webid",DEFAULT_SCOPES=[SCOPE_OPENID,SCOPE_OFFLINE,SCOPE_WEBID];class AggregateHandler{handleables;constructor(e){this.handleables=e,this.handleables=e}async getProperHandler(e){const t=await Promise.all(this.handleables.map(n=>n.canHandle(...e)));for(let n=0;n<t.length;n+=1)if(t[n])return this.handleables[n];return null}async canHandle(...e){return await this.getProperHandler(e)!==null}async handle(...e){const t=await this.getProperHandler(e);if(t)return t.handle(...e);throw new Error(`[${this.constructor.name}] cannot find a suitable handler for: ${e.map(n=>{try{return JSON.stringify(n)}catch{return n.toString()}}).join(", ")}`)}}async function getWebidFromTokenPayload(i,e,t,n){let s,a;try{const{payload:u}=await jwtVerify(i,createRemoteJWKSet(new URL(e)),{issuer:t,audience:n});s=u}catch(u){throw new Error(`Token verification failed: ${u.stack}`)}if(typeof s.azp=="string"&&(a=s.azp),typeof s.webid=="string")return{webId:s.webid,clientId:a};if(typeof s.sub!="string")throw new Error(`The token ${JSON.stringify(s)} is invalid: it has no 'webid' claim and no 'sub' claim.`);try{return new URL(s.sub),{webId:s.sub,clientId:a}}catch(u){throw new Error(`The token has no 'webid' claim, and its 'sub' claim of [${s.sub}] is invalid as a URL - error [${u}].`)}}function normalizeScopes(i){return Array.isArray(i)?Array.from(new Set([...DEFAULT_SCOPES,...i.filter(e=>typeof e=="string"&&!e.includes(" "))])):DEFAULT_SCOPES}function isValidRedirectUrl(i){try{const e=new URL(i),t=!e.searchParams.has("code")&&!e.searchParams.has("state"),n=e.hash==="";return t&&n}catch{return!1}}function removeOpenIdParams(i){const e=new URL(i);return e.searchParams.delete("state"),e.searchParams.delete("code"),e.searchParams.delete("error"),e.searchParams.delete("error_description"),e.searchParams.delete("iss"),e}function booleanWithFallback(i,e){return typeof i=="boolean"?!!i:!!e}class AuthorizationCodeWithPkceOidcHandlerBase{storageUtility;redirector;constructor(e,t){this.storageUtility=e,this.redirector=t,this.storageUtility=e,this.redirector=t}parametersGuard=e=>e.issuerConfiguration.grantTypesSupported!==void 0&&e.issuerConfiguration.grantTypesSupported.indexOf("authorization_code")>-1&&e.redirectUrl!==void 0;async canHandle(e){return this.parametersGuard(e)}async setupRedirectHandler({oidcLoginOptions:e,state:t,codeVerifier:n,targetUrl:s}){if(!this.parametersGuard(e))throw new Error("The authorization code grant requires a redirectUrl.");await Promise.all([this.storageUtility.setForUser(t,{sessionId:e.sessionId}),this.storageUtility.setForUser(e.sessionId,{codeVerifier:n,issuer:e.issuer.toString(),redirectUrl:e.redirectUrl,dpop:(!!e.dpop).toString(),keepAlive:booleanWithFallback(e.keepAlive,!0).toString()})]),this.redirector.redirect(s,{handleRedirect:e.handleRedirect})}}class GeneralLogoutHandler{sessionInfoManager;constructor(e){this.sessionInfoManager=e,this.sessionInfoManager=e}async canHandle(){return!0}async handle(e){await this.sessionInfoManager.clear(e)}}class IRpLogoutHandler{redirector;constructor(e){this.redirector=e,this.redirector=e}async canHandle(e,t){return t?.logoutType==="idp"}async handle(e,t){if(t?.logoutType!=="idp")throw new Error("Attempting to call idp logout handler to perform app logout");if(t.toLogoutUrl===void 0)throw new Error("Cannot perform IDP logout. Did you log in using the OIDC authentication flow?");this.redirector.redirect(t.toLogoutUrl(t),{handleRedirect:t.handleRedirect})}}class IWaterfallLogoutHandler{handlers;constructor(e,t){this.handlers=[new GeneralLogoutHandler(e),new IRpLogoutHandler(t)]}async canHandle(){return!0}async handle(e,t){for(const n of this.handlers)await n.canHandle(e,t)&&await n.handle(e,t)}}function getUnauthenticatedSession(){return{isLoggedIn:!1,sessionId:v4(),fetch:(...i)=>fetch(...i)}}async function clear$1(i,e){await Promise.all([e.deleteAllUserData(i,{secure:!1}),e.deleteAllUserData(i,{secure:!0})])}class SessionInfoManagerBase{storageUtility;constructor(e){this.storageUtility=e,this.storageUtility=e}update(e,t){throw new Error("Not Implemented")}set(e,t){throw new Error("Not Implemented")}get(e){throw new Error("Not implemented")}async getAll(){throw new Error("Not implemented")}async clear(e){return clear$1(e,this.storageUtility)}async register(e){throw new Error("Not implemented")}async getRegisteredSessionIdAll(){throw new Error("Not implemented")}async clearAll(){throw new Error("Not implemented")}async setOidcContext(e,t){throw new Error("Not implemented")}}function getEndSessionUrl({endSessionEndpoint:i,idTokenHint:e,postLogoutRedirectUri:t,state:n}){const s=new URL(i);return e!==void 0&&s.searchParams.append("id_token_hint",e),t!==void 0&&(s.searchParams.append("post_logout_redirect_uri",t),n!==void 0&&s.searchParams.append("state",n)),s.toString()}function maybeBuildRpInitiatedLogout({endSessionEndpoint:i,idTokenHint:e}){if(i!==void 0)return function({state:n,postLogoutUrl:s}){return getEndSessionUrl({endSessionEndpoint:i,idTokenHint:e,state:n,postLogoutRedirectUri:s})}}function isSupportedTokenType(i){return typeof i=="string"&&["DPoP","Bearer"].includes(i)}function isValidUrl$1(i){try{return new URL(i),!0}catch{return!1}}function determineSigningAlg(i,e){return e.find(t=>i.includes(t))??null}function isStaticClient(i){return i.clientId!==void 0&&!isValidUrl$1(i.clientId)}function isSolidOidcClient(i,e){return e.scopesSupported.includes("webid")&&i.clientId!==void 0&&isValidUrl$1(i.clientId)}function isKnownClientType(i){return typeof i=="string"&&["dynamic","static","solid-oidc"].includes(i)}async function handleRegistration(i,e,t,n){let s;if(isSolidOidcClient(i,e))s={clientId:i.clientId,clientName:i.clientName,clientType:"solid-oidc"};else if(isStaticClient(i))s={clientId:i.clientId,clientSecret:i.clientSecret,clientName:i.clientName,clientType:"static"};else return n.getClient({sessionId:i.sessionId,clientName:i.clientName,redirectUrl:i.redirectUrl},e);const a={clientId:s.clientId,clientType:s.clientType};return s.clientType==="static"&&(a.clientSecret=s.clientSecret),s.clientName&&(a.clientName=s.clientName),await t.setForUser(i.sessionId,a),s}const boundFetch=(i,e)=>fetch(i,e);let ClientAuthentication$1=class{loginHandler;redirectHandler;logoutHandler;sessionInfoManager;issuerConfigFetcher;boundLogout;constructor(e,t,n,s,a){this.loginHandler=e,this.redirectHandler=t,this.logoutHandler=n,this.sessionInfoManager=s,this.issuerConfigFetcher=a,this.loginHandler=e,this.redirectHandler=t,this.logoutHandler=n,this.sessionInfoManager=s,this.issuerConfigFetcher=a}fetch=boundFetch;logout=async(e,t)=>{await this.logoutHandler.handle(e,t?.logoutType==="idp"?{...t,toLogoutUrl:this.boundLogout}:t),this.fetch=boundFetch,delete this.boundLogout};getSessionInfo=async e=>this.sessionInfoManager.get(e);getAllSessionInfo=async()=>this.sessionInfoManager.getAll()};async function loadOidcContextFromStorage(i,e,t){try{const[n,s,a,u,c]=await Promise.all([e.getForUser(i,"issuer",{errorIfNull:!0}),e.getForUser(i,"codeVerifier"),e.getForUser(i,"redirectUrl"),e.getForUser(i,"dpop",{errorIfNull:!0}),e.getForUser(i,"keepAlive")]);await e.deleteForUser(i,"codeVerifier");const h=await t.fetchConfig(n);return{codeVerifier:s,redirectUrl:a,issuerConfig:h,dpop:u==="true",keepAlive:typeof c=="string"?c==="true":!0}}catch(n){throw new Error(`Failed to retrieve OIDC context from storage associated with session [${i}]: ${n}`)}}async function saveSessionInfoToStorage(i,e,t,n,s,a,u,c){t!==void 0&&await i.setForUser(e,{webId:t},{secure:u}),n!==void 0&&await i.setForUser(e,{clientId:n},{secure:u}),await i.setForUser(e,{isLoggedIn:s},{secure:u})}class StorageUtility{secureStorage;insecureStorage;constructor(e,t){this.secureStorage=e,this.insecureStorage=t,this.secureStorage=e,this.insecureStorage=t}getKey(e){return`solidClientAuthenticationUser:${e}`}async getUserData(e,t){const n=await(t?this.secureStorage:this.insecureStorage).get(this.getKey(e));if(n===void 0)return{};try{return JSON.parse(n)}catch{throw new Error(`Data for user [${e}] in [${t?"secure":"unsecure"}] storage is corrupted - expected valid JSON, but got: ${n}`)}}async setUserData(e,t,n){await(n?this.secureStorage:this.insecureStorage).set(this.getKey(e),JSON.stringify(t))}async get(e,t){const n=await(t?.secure?this.secureStorage:this.insecureStorage).get(e);if(n===void 0&&t?.errorIfNull)throw new Error(`[${e}] is not stored`);return n}async set(e,t,n){return(n?.secure?this.secureStorage:this.insecureStorage).set(e,t)}async delete(e,t){return(t?.secure?this.secureStorage:this.insecureStorage).delete(e)}async getForUser(e,t,n){const s=await this.getUserData(e,n?.secure);let a;if((!s||!s[t])&&(a=void 0),a=s[t],a===void 0&&n?.errorIfNull)throw new Error(`Field [${t}] for user [${e}] is not stored`);return a||void 0}async setForUser(e,t,n){let s;try{s=await this.getUserData(e,n?.secure)}catch{s={}}await this.setUserData(e,{...s,...t},n?.secure)}async deleteForUser(e,t,n){const s=await this.getUserData(e,n?.secure);delete s[t],await this.setUserData(e,s,n?.secure)}async deleteAllUserData(e,t){await(t?.secure?this.secureStorage:this.insecureStorage).delete(this.getKey(e))}}class InMemoryStorage{map={};async get(e){return this.map[e]||void 0}async set(e,t){this.map[e]=t}async delete(e){delete this.map[e]}}class ConfigurationError extends Error{constructor(e){super(e)}}class InvalidResponseError extends Error{missingFields;constructor(e){super(`Invalid response from OIDC provider: missing fields ${e}`),this.missingFields=e}}class OidcProviderError extends Error{error;errorDescription;constructor(e,t,n){super(e),this.error=t,this.errorDescription=n}}function normalizeHTU(i){const e=new URL(i);return new URL(e.pathname,e.origin).toString()}async function createDpopHeader(i,e,t){return new SignJWT({htu:normalizeHTU(i),htm:e.toUpperCase(),jti:v4()}).setProtectedHeader({alg:PREFERRED_SIGNING_ALG[0],jwk:t.publicKey,typ:"dpop+jwt"}).setIssuedAt().sign(t.privateKey,{})}async function generateDpopKeyPair(){const{privateKey:i,publicKey:e}=await generateKeyPair(PREFERRED_SIGNING_ALG[0]),t={privateKey:i,publicKey:await exportJWK(e)};return[t.publicKey.alg]=PREFERRED_SIGNING_ALG,t}const DEFAULT_EXPIRATION_TIME_SECONDS=600;function isExpectedAuthError(i){return[401,403].includes(i)}async function buildDpopFetchOptions(i,e,t,n){const s=new Headers(n?.headers);return s.set("Authorization",`DPoP ${e}`),s.set("DPoP",await createDpopHeader(i,n?.method??"get",t)),{...n,headers:s}}async function buildAuthenticatedHeaders(i,e,t,n){if(t!==void 0)return buildDpopFetchOptions(i,e,t,n);const s=new Headers(n?.headers);return s.set("Authorization",`Bearer ${e}`),{...n,headers:s}}async function makeAuthenticatedRequest(i,e,t,n,s=fetch){return s(e,await buildAuthenticatedHeaders(e.toString(),i,n,t))}async function refreshAccessToken(i,e,t){const n=await i.tokenRefresher.refresh(i.sessionId,i.refreshToken,e);return t?.emit(EVENTS.SESSION_EXTENDED,n.expiresIn??DEFAULT_EXPIRATION_TIME_SECONDS),{accessToken:n.accessToken,refreshToken:n.refreshToken,expiresIn:n.expiresIn}}const computeRefreshDelay=i=>i!==void 0?i-REFRESH_BEFORE_EXPIRATION_SECONDS>0?i-REFRESH_BEFORE_EXPIRATION_SECONDS:i:DEFAULT_EXPIRATION_TIME_SECONDS;function buildAuthenticatedFetch(i,e){let t=i,n;const s=e?.refreshOptions;if(s!==void 0){const a=async()=>{try{const{accessToken:u,refreshToken:c,expiresIn:h}=await refreshAccessToken(s,e.dpopKey,e.eventEmitter);t=u,c!==void 0&&(s.refreshToken=c),clearTimeout(n),n=setTimeout(a,computeRefreshDelay(h)*1e3),e.eventEmitter?.emit(EVENTS.TIMEOUT_SET,n)}catch(u){u instanceof OidcProviderError&&(e?.eventEmitter?.emit(EVENTS.ERROR,u.error,u.errorDescription),e?.eventEmitter?.emit(EVENTS.SESSION_EXPIRED)),u instanceof InvalidResponseError&&u.missingFields.includes("access_token")&&e?.eventEmitter?.emit(EVENTS.SESSION_EXPIRED)}};n=setTimeout(a,computeRefreshDelay(e.expiresIn)*1e3),e.eventEmitter?.emit(EVENTS.TIMEOUT_SET,n)}else if(e!==void 0&&e.eventEmitter!==void 0){const a=setTimeout(()=>{e.eventEmitter.emit(EVENTS.SESSION_EXPIRED)},computeRefreshDelay(e.expiresIn)*1e3);e.eventEmitter.emit(EVENTS.TIMEOUT_SET,a)}return async(a,u)=>{let c=await makeAuthenticatedRequest(t,a,u,e?.dpopKey,e?.fetch);const h=!c.ok&&!isExpectedAuthError(c.status);return c.ok||h||c.url!==a&&e?.dpopKey!==void 0&&(c=await makeAuthenticatedRequest(t,c.url,u,e.dpopKey,e.fetch)),c}}var events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var i=typeof Reflect=="object"?Reflect:null,e=i&&typeof i.apply=="function"?i.apply:function(O,K,z){return Function.prototype.apply.call(O,K,z)},t;i&&typeof i.ownKeys=="function"?t=i.ownKeys:Object.getOwnPropertySymbols?t=function(O){return Object.getOwnPropertyNames(O).concat(Object.getOwnPropertySymbols(O))}:t=function(O){return Object.getOwnPropertyNames(O)};function n(D){console&&console.warn&&console.warn(D)}var s=Number.isNaN||function(O){return O!==O};function a(){a.init.call(this)}events.exports=a,events.exports.once=A,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(D){if(typeof D!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof D)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(D){if(typeof D!="number"||D<0||s(D))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+D+".");u=D}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(O){if(typeof O!="number"||O<0||s(O))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+O+".");return this._maxListeners=O,this};function h(D){return D._maxListeners===void 0?a.defaultMaxListeners:D._maxListeners}a.prototype.getMaxListeners=function(){return h(this)},a.prototype.emit=function(O){for(var K=[],z=1;z<arguments.length;z++)K.push(arguments[z]);var X=O==="error",Ee=this._events;if(Ee!==void 0)X=X&&Ee.error===void 0;else if(!X)return!1;if(X){var q;if(K.length>0&&(q=K[0]),q instanceof Error)throw q;var Y=new Error("Unhandled error."+(q?" ("+q.message+")":""));throw Y.context=q,Y}var Te=Ee[O];if(Te===void 0)return!1;if(typeof Te=="function")e(Te,this,K);else for(var re=Te.length,$e=w(Te,re),z=0;z<re;++z)e($e[z],this,K);return!0};function f(D,O,K,z){var X,Ee,q;if(c(K),Ee=D._events,Ee===void 0?(Ee=D._events=Object.create(null),D._eventsCount=0):(Ee.newListener!==void 0&&(D.emit("newListener",O,K.listener?K.listener:K),Ee=D._events),q=Ee[O]),q===void 0)q=Ee[O]=K,++D._eventsCount;else if(typeof q=="function"?q=Ee[O]=z?[K,q]:[q,K]:z?q.unshift(K):q.push(K),X=h(D),X>0&&q.length>X&&!q.warned){q.warned=!0;var Y=new Error("Possible EventEmitter memory leak detected. "+q.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");Y.name="MaxListenersExceededWarning",Y.emitter=D,Y.type=O,Y.count=q.length,n(Y)}return D}a.prototype.addListener=function(O,K){return f(this,O,K,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(O,K){return f(this,O,K,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(D,O,K){var z={fired:!1,wrapFn:void 0,target:D,type:O,listener:K},X=p.bind(z);return X.listener=K,z.wrapFn=X,X}a.prototype.once=function(O,K){return c(K),this.on(O,g(this,O,K)),this},a.prototype.prependOnceListener=function(O,K){return c(K),this.prependListener(O,g(this,O,K)),this},a.prototype.removeListener=function(O,K){var z,X,Ee,q,Y;if(c(K),X=this._events,X===void 0)return this;if(z=X[O],z===void 0)return this;if(z===K||z.listener===K)--this._eventsCount===0?this._events=Object.create(null):(delete X[O],X.removeListener&&this.emit("removeListener",O,z.listener||K));else if(typeof z!="function"){for(Ee=-1,q=z.length-1;q>=0;q--)if(z[q]===K||z[q].listener===K){Y=z[q].listener,Ee=q;break}if(Ee<0)return this;Ee===0?z.shift():R(z,Ee),z.length===1&&(X[O]=z[0]),X.removeListener!==void 0&&this.emit("removeListener",O,Y||K)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(O){var K,z,X;if(z=this._events,z===void 0)return this;if(z.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):z[O]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete z[O]),this;if(arguments.length===0){var Ee=Object.keys(z),q;for(X=0;X<Ee.length;++X)q=Ee[X],q!=="removeListener"&&this.removeAllListeners(q);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(K=z[O],typeof K=="function")this.removeListener(O,K);else if(K!==void 0)for(X=K.length-1;X>=0;X--)this.removeListener(O,K[X]);return this};function y(D,O,K){var z=D._events;if(z===void 0)return[];var X=z[O];return X===void 0?[]:typeof X=="function"?K?[X.listener||X]:[X]:K?T(X):w(X,X.length)}a.prototype.listeners=function(O){return y(this,O,!0)},a.prototype.rawListeners=function(O){return y(this,O,!1)},a.listenerCount=function(D,O){return typeof D.listenerCount=="function"?D.listenerCount(O):S.call(D,O)},a.prototype.listenerCount=S;function S(D){var O=this._events;if(O!==void 0){var K=O[D];if(typeof K=="function")return 1;if(K!==void 0)return K.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function w(D,O){for(var K=new Array(O),z=0;z<O;++z)K[z]=D[z];return K}function R(D,O){for(;O+1<D.length;O++)D[O]=D[O+1];D.pop()}function T(D){for(var O=new Array(D.length),K=0;K<O.length;++K)O[K]=D[K].listener||D[K];return O}function A(D,O){return new Promise(function(K,z){function X(q){D.removeListener(O,Ee),z(q)}function Ee(){typeof D.removeListener=="function"&&D.removeListener("error",X),K([].slice.call(arguments))}x(D,O,Ee,{once:!0}),O!=="error"&&F(D,X,{once:!0})})}function F(D,O,K){typeof D.on=="function"&&x(D,"error",O,K)}function x(D,O,K,z){if(typeof D.on=="function")z.once?D.once(O,K):D.on(O,K);else if(typeof D.addEventListener=="function")D.addEventListener(O,function X(Ee){z.once&&D.removeEventListener(O,X),K(Ee)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof D)}return events.exports}var eventsExports=requireEvents();const EventEmitter=getDefaultExportFromCjs(eventsExports);var oidcClient_min$1={exports:{}},oidcClient_min=oidcClient_min$1.exports,hasRequiredOidcClient_min;function requireOidcClient_min(){return hasRequiredOidcClient_min||(hasRequiredOidcClient_min=1,(function(i,e){(function(n,s){i.exports=s()})(oidcClient_min,(function(){return(function(t){var n={};function s(a){if(n[a])return n[a].exports;var u=n[a]={i:a,l:!1,exports:{}};return t[a].call(u.exports,u,u.exports,s),u.l=!0,u.exports}return s.m=t,s.c=n,s.d=function(a,u,c){s.o(a,u)||Object.defineProperty(a,u,{enumerable:!0,get:c})},s.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},s.t=function(a,u){if(1&u&&(a=s(a)),8&u||4&u&&typeof a=="object"&&a&&a.__esModule)return a;var c=Object.create(null);if(s.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:a}),2&u&&typeof a!="string")for(var h in a)s.d(c,h,(function(f){return a[f]}).bind(null,h));return c},s.n=function(a){var u=a&&a.__esModule?function(){return a.default}:function(){return a};return s.d(u,"a",u),u},s.o=function(a,u){return Object.prototype.hasOwnProperty.call(a,u)},s.p="",s(s.s=22)})([function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0});var a=(function(){function f(p,g){for(var y=0;y<g.length;y++){var S=g[y];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(p,S.key,S)}}return function(p,g,y){return g&&f(p.prototype,g),y&&f(p,y),p}})(),u={debug:function(){},info:function(){},warn:function(){},error:function(){}},c=void 0,h=void 0;(n.Log=(function(){function f(){(function(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")})(this,f)}return f.reset=function(){h=3,c=u},f.debug=function(){if(h>=4){for(var g=arguments.length,y=Array(g),S=0;S<g;S++)y[S]=arguments[S];c.debug.apply(c,Array.from(y))}},f.info=function(){if(h>=3){for(var g=arguments.length,y=Array(g),S=0;S<g;S++)y[S]=arguments[S];c.info.apply(c,Array.from(y))}},f.warn=function(){if(h>=2){for(var g=arguments.length,y=Array(g),S=0;S<g;S++)y[S]=arguments[S];c.warn.apply(c,Array.from(y))}},f.error=function(){if(h>=1){for(var g=arguments.length,y=Array(g),S=0;S<g;S++)y[S]=arguments[S];c.error.apply(c,Array.from(y))}},a(f,null,[{key:"NONE",get:function(){return 0}},{key:"ERROR",get:function(){return 1}},{key:"WARN",get:function(){return 2}},{key:"INFO",get:function(){return 3}},{key:"DEBUG",get:function(){return 4}},{key:"level",get:function(){return h},set:function(g){if(!(0<=g&&g<=4))throw new Error("Invalid log level");h=g}},{key:"logger",get:function(){return c},set:function(g){if(!g.debug&&g.info&&(g.debug=g.info),!(g.debug&&g.info&&g.warn&&g.error))throw new Error("Invalid logger");c=g}}]),f})()).reset()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0});var a=(function(){function f(p,g){for(var y=0;y<g.length;y++){var S=g[y];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(p,S.key,S)}}return function(p,g,y){return g&&f(p.prototype,g),y&&f(p,y),p}})(),u={setInterval:(function(f){function p(g,y){return f.apply(this,arguments)}return p.toString=function(){return f.toString()},p})((function(f,p){return setInterval(f,p)})),clearInterval:(function(f){function p(g){return f.apply(this,arguments)}return p.toString=function(){return f.toString()},p})((function(f){return clearInterval(f)}))},c=!1,h=null;n.Global=(function(){function f(){(function(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")})(this,f)}return f._testing=function(){c=!0},f.setXMLHttpRequest=function(g){h=g},a(f,null,[{key:"location",get:function(){if(!c)return location}},{key:"localStorage",get:function(){if(!c&&typeof window<"u")return localStorage}},{key:"sessionStorage",get:function(){if(!c&&typeof window<"u")return sessionStorage}},{key:"XMLHttpRequest",get:function(){if(!c&&typeof window<"u")return h||XMLHttpRequest}},{key:"timer",get:function(){if(!c)return u}}]),f})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.MetadataService=void 0;var a=(function(){function p(g,y){for(var S=0;S<y.length;S++){var w=y[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,y,S){return y&&p(g.prototype,y),S&&p(g,S),g}})(),u=s(0),c=s(7);function h(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}var f=".well-known/openid-configuration";n.MetadataService=(function(){function p(g){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c.JsonService;if(h(this,p),!g)throw u.Log.error("MetadataService: No settings passed to MetadataService"),new Error("settings");this._settings=g,this._jsonService=new y(["application/jwk-set+json"])}return p.prototype.resetSigningKeys=function(){this._settings=this._settings||{},this._settings.signingKeys=void 0},p.prototype.getMetadata=function(){var y=this;return this._settings.metadata?(u.Log.debug("MetadataService.getMetadata: Returning metadata from settings"),Promise.resolve(this._settings.metadata)):this.metadataUrl?(u.Log.debug("MetadataService.getMetadata: getting metadata from",this.metadataUrl),this._jsonService.getJson(this.metadataUrl).then((function(S){u.Log.debug("MetadataService.getMetadata: json received");var w=y._settings.metadataSeed||{};return y._settings.metadata=Object.assign({},w,S),y._settings.metadata}))):(u.Log.error("MetadataService.getMetadata: No authority or metadataUrl configured on settings"),Promise.reject(new Error("No authority or metadataUrl configured on settings")))},p.prototype.getIssuer=function(){return this._getMetadataProperty("issuer")},p.prototype.getAuthorizationEndpoint=function(){return this._getMetadataProperty("authorization_endpoint")},p.prototype.getUserInfoEndpoint=function(){return this._getMetadataProperty("userinfo_endpoint")},p.prototype.getTokenEndpoint=function(){var y=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this._getMetadataProperty("token_endpoint",y)},p.prototype.getCheckSessionIframe=function(){return this._getMetadataProperty("check_session_iframe",!0)},p.prototype.getEndSessionEndpoint=function(){return this._getMetadataProperty("end_session_endpoint",!0)},p.prototype.getRevocationEndpoint=function(){return this._getMetadataProperty("revocation_endpoint",!0)},p.prototype.getKeysEndpoint=function(){return this._getMetadataProperty("jwks_uri",!0)},p.prototype._getMetadataProperty=function(y){var S=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return u.Log.debug("MetadataService.getMetadataProperty for: "+y),this.getMetadata().then((function(w){if(u.Log.debug("MetadataService.getMetadataProperty: metadata recieved"),w[y]===void 0){if(S===!0)return void u.Log.warn("MetadataService.getMetadataProperty: Metadata does not contain optional property "+y);throw u.Log.error("MetadataService.getMetadataProperty: Metadata does not contain property "+y),new Error("Metadata does not contain property "+y)}return w[y]}))},p.prototype.getSigningKeys=function(){var y=this;return this._settings.signingKeys?(u.Log.debug("MetadataService.getSigningKeys: Returning signingKeys from settings"),Promise.resolve(this._settings.signingKeys)):this._getMetadataProperty("jwks_uri").then((function(S){return u.Log.debug("MetadataService.getSigningKeys: jwks_uri received",S),y._jsonService.getJson(S).then((function(w){if(u.Log.debug("MetadataService.getSigningKeys: key set received",w),!w.keys)throw u.Log.error("MetadataService.getSigningKeys: Missing keys on keyset"),new Error("Missing keys on keyset");return y._settings.signingKeys=w.keys,y._settings.signingKeys}))}))},a(p,[{key:"metadataUrl",get:function(){return this._metadataUrl||(this._settings.metadataUrl?this._metadataUrl=this._settings.metadataUrl:(this._metadataUrl=this._settings.authority,this._metadataUrl&&this._metadataUrl.indexOf(f)<0&&(this._metadataUrl[this._metadataUrl.length-1]!=="/"&&(this._metadataUrl+="/"),this._metadataUrl+=f))),this._metadataUrl}}]),p})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.UrlUtility=void 0;var a=s(0),u=s(1);n.UrlUtility=(function(){function c(){(function(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")})(this,c)}return c.addQueryParam=function(f,p,g){return f.indexOf("?")<0&&(f+="?"),f[f.length-1]!=="?"&&(f+="&"),f+=encodeURIComponent(p),f+="=",f+=encodeURIComponent(g)},c.parseUrlFragment=function(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#",g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.Global;typeof f!="string"&&(f=g.location.href);var y=f.lastIndexOf(p);y>=0&&(f=f.substr(y+1)),p==="?"&&(y=f.indexOf("#"))>=0&&(f=f.substr(0,y));for(var S,w={},R=/([^&=]+)=([^&]*)/g,T=0;S=R.exec(f);)if(w[decodeURIComponent(S[1])]=decodeURIComponent(S[2].replace(/\+/g," ")),T++>50)return a.Log.error("UrlUtility.parseUrlFragment: response exceeded expected number of parameters",f),{error:"Response exceeded expected number of parameters"};for(var A in w)return w;return{}},c})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.JoseUtil=void 0;var a=s(26),u=(function(h){return h&&h.__esModule?h:{default:h}})(s(33));n.JoseUtil=(0,u.default)({jws:a.jws,KeyUtil:a.KeyUtil,X509:a.X509,crypto:a.crypto,hextob64u:a.hextob64u,b64tohex:a.b64tohex,AllowedSigningAlgs:a.AllowedSigningAlgs})},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.OidcClientSettings=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},u=(function(){function A(F,x){for(var D=0;D<x.length;D++){var O=x[D];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(F,O.key,O)}}return function(F,x,D){return x&&A(F.prototype,x),D&&A(F,D),F}})(),c=s(0),h=s(23),f=s(6),p=s(24),g=s(2);function y(A,F){if(!(A instanceof F))throw new TypeError("Cannot call a class as a function")}var S=".well-known/openid-configuration",w="id_token",R="openid",T="client_secret_post";n.OidcClientSettings=(function(){function A(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},x=F.authority,D=F.metadataUrl,O=F.metadata,K=F.signingKeys,z=F.metadataSeed,X=F.client_id,Ee=F.client_secret,q=F.response_type,Y=q===void 0?w:q,Te=F.scope,re=Te===void 0?R:Te,$e=F.redirect_uri,ze=F.post_logout_redirect_uri,ye=F.client_authentication,Ve=ye===void 0?T:ye,pe=F.prompt,De=F.display,$=F.max_age,G=F.ui_locales,ce=F.acr_values,oe=F.resource,Fe=F.response_mode,Ue=F.filterProtocolClaims,Je=Ue===void 0||Ue,He=F.loadUserInfo,he=He===void 0||He,fe=F.staleStateAge,Oe=fe===void 0?900:fe,ie=F.clockSkew,j=ie===void 0?300:ie,N=F.clockService,L=N===void 0?new h.ClockService:N,V=F.userInfoJwtIssuer,ee=V===void 0?"OP":V,ae=F.mergeClaims,ve=ae!==void 0&&ae,J=F.stateStore,me=J===void 0?new f.WebStorageStateStore:J,xe=F.ResponseValidatorCtor,de=xe===void 0?p.ResponseValidator:xe,st=F.MetadataServiceCtor,ft=st===void 0?g.MetadataService:st,Ge=F.extraQueryParams,pt=Ge===void 0?{}:Ge,Z=F.extraTokenParams,P=Z===void 0?{}:Z;y(this,A),this._authority=x,this._metadataUrl=D,this._metadata=O,this._metadataSeed=z,this._signingKeys=K,this._client_id=X,this._client_secret=Ee,this._response_type=Y,this._scope=re,this._redirect_uri=$e,this._post_logout_redirect_uri=ze,this._client_authentication=Ve,this._prompt=pe,this._display=De,this._max_age=$,this._ui_locales=G,this._acr_values=ce,this._resource=oe,this._response_mode=Fe,this._filterProtocolClaims=!!Je,this._loadUserInfo=!!he,this._staleStateAge=Oe,this._clockSkew=j,this._clockService=L,this._userInfoJwtIssuer=ee,this._mergeClaims=!!ve,this._stateStore=me,this._validator=new de(this),this._metadataService=new ft(this),this._extraQueryParams=(pt===void 0?"undefined":a(pt))==="object"?pt:{},this._extraTokenParams=(P===void 0?"undefined":a(P))==="object"?P:{}}return A.prototype.getEpochTime=function(){return this._clockService.getEpochTime()},u(A,[{key:"client_id",get:function(){return this._client_id},set:function(x){if(this._client_id)throw c.Log.error("OidcClientSettings.set_client_id: client_id has already been assigned."),new Error("client_id has already been assigned.");this._client_id=x}},{key:"client_secret",get:function(){return this._client_secret}},{key:"response_type",get:function(){return this._response_type}},{key:"scope",get:function(){return this._scope}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"post_logout_redirect_uri",get:function(){return this._post_logout_redirect_uri}},{key:"client_authentication",get:function(){return this._client_authentication}},{key:"prompt",get:function(){return this._prompt}},{key:"display",get:function(){return this._display}},{key:"max_age",get:function(){return this._max_age}},{key:"ui_locales",get:function(){return this._ui_locales}},{key:"acr_values",get:function(){return this._acr_values}},{key:"resource",get:function(){return this._resource}},{key:"response_mode",get:function(){return this._response_mode}},{key:"authority",get:function(){return this._authority},set:function(x){if(this._authority)throw c.Log.error("OidcClientSettings.set_authority: authority has already been assigned."),new Error("authority has already been assigned.");this._authority=x}},{key:"metadataUrl",get:function(){return this._metadataUrl||(this._metadataUrl=this.authority,this._metadataUrl&&this._metadataUrl.indexOf(S)<0&&(this._metadataUrl[this._metadataUrl.length-1]!=="/"&&(this._metadataUrl+="/"),this._metadataUrl+=S)),this._metadataUrl}},{key:"metadata",get:function(){return this._metadata},set:function(x){this._metadata=x}},{key:"metadataSeed",get:function(){return this._metadataSeed},set:function(x){this._metadataSeed=x}},{key:"signingKeys",get:function(){return this._signingKeys},set:function(x){this._signingKeys=x}},{key:"filterProtocolClaims",get:function(){return this._filterProtocolClaims}},{key:"loadUserInfo",get:function(){return this._loadUserInfo}},{key:"staleStateAge",get:function(){return this._staleStateAge}},{key:"clockSkew",get:function(){return this._clockSkew}},{key:"userInfoJwtIssuer",get:function(){return this._userInfoJwtIssuer}},{key:"mergeClaims",get:function(){return this._mergeClaims}},{key:"stateStore",get:function(){return this._stateStore}},{key:"validator",get:function(){return this._validator}},{key:"metadataService",get:function(){return this._metadataService}},{key:"extraQueryParams",get:function(){return this._extraQueryParams},set:function(x){(x===void 0?"undefined":a(x))==="object"?this._extraQueryParams=x:this._extraQueryParams={}}},{key:"extraTokenParams",get:function(){return this._extraTokenParams},set:function(x){(x===void 0?"undefined":a(x))==="object"?this._extraTokenParams=x:this._extraTokenParams={}}}]),A})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.WebStorageStateStore=void 0;var a=s(0),u=s(1);function c(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}n.WebStorageStateStore=(function(){function h(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=f.prefix,g=p===void 0?"oidc.":p,y=f.store,S=y===void 0?u.Global.localStorage:y;c(this,h),this._store=S,this._prefix=g}return h.prototype.set=function(p,g){return a.Log.debug("WebStorageStateStore.set",p),p=this._prefix+p,this._store.setItem(p,g),Promise.resolve()},h.prototype.get=function(p){a.Log.debug("WebStorageStateStore.get",p),p=this._prefix+p;var g=this._store.getItem(p);return Promise.resolve(g)},h.prototype.remove=function(p){a.Log.debug("WebStorageStateStore.remove",p),p=this._prefix+p;var g=this._store.getItem(p);return this._store.removeItem(p),Promise.resolve(g)},h.prototype.getAllKeys=function(){a.Log.debug("WebStorageStateStore.getAllKeys");for(var p=[],g=0;g<this._store.length;g++){var y=this._store.key(g);y.indexOf(this._prefix)===0&&p.push(y.substr(this._prefix.length))}return Promise.resolve(p)},h})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.JsonService=void 0;var a=s(0),u=s(1);function c(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}n.JsonService=(function(){function h(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.Global.XMLHttpRequest,g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;c(this,h),f&&Array.isArray(f)?this._contentTypes=f.slice():this._contentTypes=[],this._contentTypes.push("application/json"),g&&this._contentTypes.push("application/jwt"),this._XMLHttpRequest=p,this._jwtHandler=g}return h.prototype.getJson=function(p,g){var y=this;if(!p)throw a.Log.error("JsonService.getJson: No url passed"),new Error("url");return a.Log.debug("JsonService.getJson, url: ",p),new Promise((function(S,w){var R=new y._XMLHttpRequest;R.open("GET",p);var T=y._contentTypes,A=y._jwtHandler;R.onload=function(){if(a.Log.debug("JsonService.getJson: HTTP response received, status",R.status),R.status===200){var F=R.getResponseHeader("Content-Type");if(F){var x=T.find((function(D){if(F.startsWith(D))return!0}));if(x=="application/jwt")return void A(R).then(S,w);if(x)try{return void S(JSON.parse(R.responseText))}catch(D){return a.Log.error("JsonService.getJson: Error parsing JSON response",D.message),void w(D)}}w(Error("Invalid response Content-Type: "+F+", from URL: "+p))}else w(Error(R.statusText+" ("+R.status+")"))},R.onerror=function(){a.Log.error("JsonService.getJson: network error"),w(Error("Network Error"))},g&&(a.Log.debug("JsonService.getJson: token passed, setting Authorization header"),R.setRequestHeader("Authorization","Bearer "+g)),R.send()}))},h.prototype.postForm=function(p,g,y){var S=this;if(!p)throw a.Log.error("JsonService.postForm: No url passed"),new Error("url");return a.Log.debug("JsonService.postForm, url: ",p),new Promise((function(w,R){var T=new S._XMLHttpRequest;T.open("POST",p);var A=S._contentTypes;T.onload=function(){if(a.Log.debug("JsonService.postForm: HTTP response received, status",T.status),T.status!==200){if(T.status===400&&(K=T.getResponseHeader("Content-Type"))&&A.find((function(z){if(K.startsWith(z))return!0})))try{var O=JSON.parse(T.responseText);if(O&&O.error)return a.Log.error("JsonService.postForm: Error from server: ",O.error),void R(new Error(O.error))}catch(z){return a.Log.error("JsonService.postForm: Error parsing JSON response",z.message),void R(z)}R(Error(T.statusText+" ("+T.status+")"))}else{var K;if((K=T.getResponseHeader("Content-Type"))&&A.find((function(z){if(K.startsWith(z))return!0})))try{return void w(JSON.parse(T.responseText))}catch(z){return a.Log.error("JsonService.postForm: Error parsing JSON response",z.message),void R(z)}R(Error("Invalid response Content-Type: "+K+", from URL: "+p))}},T.onerror=function(){a.Log.error("JsonService.postForm: network error"),R(Error("Network Error"))};var F="";for(var x in g){var D=g[x];D&&(F.length>0&&(F+="&"),F+=encodeURIComponent(x),F+="=",F+=encodeURIComponent(D))}T.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),y!==void 0&&T.setRequestHeader("Authorization","Basic "+btoa(y)),T.send(F)}))},h})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.SigninRequest=void 0;var a=s(0),u=s(3),c=s(13);n.SigninRequest=(function(){function h(f){var p=f.url,g=f.client_id,y=f.redirect_uri,S=f.response_type,w=f.scope,R=f.authority,T=f.data,A=f.prompt,F=f.display,x=f.max_age,D=f.ui_locales,O=f.id_token_hint,K=f.login_hint,z=f.acr_values,X=f.resource,Ee=f.response_mode,q=f.request,Y=f.request_uri,Te=f.extraQueryParams,re=f.request_type,$e=f.client_secret,ze=f.extraTokenParams,ye=f.skipUserInfo;if((function(oe,Fe){if(!(oe instanceof Fe))throw new TypeError("Cannot call a class as a function")})(this,h),!p)throw a.Log.error("SigninRequest.ctor: No url passed"),new Error("url");if(!g)throw a.Log.error("SigninRequest.ctor: No client_id passed"),new Error("client_id");if(!y)throw a.Log.error("SigninRequest.ctor: No redirect_uri passed"),new Error("redirect_uri");if(!S)throw a.Log.error("SigninRequest.ctor: No response_type passed"),new Error("response_type");if(!w)throw a.Log.error("SigninRequest.ctor: No scope passed"),new Error("scope");if(!R)throw a.Log.error("SigninRequest.ctor: No authority passed"),new Error("authority");var Ve=h.isOidc(S),pe=h.isCode(S);Ee||(Ee=h.isCode(S)?"query":null),this.state=new c.SigninState({nonce:Ve,data:T,client_id:g,authority:R,redirect_uri:y,code_verifier:pe,request_type:re,response_mode:Ee,client_secret:$e,scope:w,extraTokenParams:ze,skipUserInfo:ye}),p=u.UrlUtility.addQueryParam(p,"client_id",g),p=u.UrlUtility.addQueryParam(p,"redirect_uri",y),p=u.UrlUtility.addQueryParam(p,"response_type",S),p=u.UrlUtility.addQueryParam(p,"scope",w),p=u.UrlUtility.addQueryParam(p,"state",this.state.id),Ve&&(p=u.UrlUtility.addQueryParam(p,"nonce",this.state.nonce)),pe&&(p=u.UrlUtility.addQueryParam(p,"code_challenge",this.state.code_challenge),p=u.UrlUtility.addQueryParam(p,"code_challenge_method","S256"));var De={prompt:A,display:F,max_age:x,ui_locales:D,id_token_hint:O,login_hint:K,acr_values:z,resource:X,request:q,request_uri:Y,response_mode:Ee};for(var $ in De)De[$]&&(p=u.UrlUtility.addQueryParam(p,$,De[$]));for(var G in Te)p=u.UrlUtility.addQueryParam(p,G,Te[G]);this.url=p}return h.isOidc=function(p){return!!p.split(/\s+/g).filter((function(g){return g==="id_token"}))[0]},h.isOAuth=function(p){return!!p.split(/\s+/g).filter((function(g){return g==="token"}))[0]},h.isCode=function(p){return!!p.split(/\s+/g).filter((function(g){return g==="code"}))[0]},h})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.State=void 0;var a=(function(){function f(p,g){for(var y=0;y<g.length;y++){var S=g[y];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(p,S.key,S)}}return function(p,g,y){return g&&f(p.prototype,g),y&&f(p,y),p}})(),u=s(0),c=(function(p){return p&&p.__esModule?p:{default:p}})(s(14));function h(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}n.State=(function(){function f(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},g=p.id,y=p.data,S=p.created,w=p.request_type;h(this,f),this._id=g||(0,c.default)(),this._data=y,this._created=typeof S=="number"&&S>0?S:parseInt(Date.now()/1e3),this._request_type=w}return f.prototype.toStorageString=function(){return u.Log.debug("State.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type})},f.fromStorageString=function(g){return u.Log.debug("State.fromStorageString"),new f(JSON.parse(g))},f.clearStaleState=function(g,y){var S=Date.now()/1e3-y;return g.getAllKeys().then((function(w){u.Log.debug("State.clearStaleState: got keys",w);for(var R=[],T=function(D){var O=w[D];F=g.get(O).then((function(K){var z=!1;if(K)try{var X=f.fromStorageString(K);u.Log.debug("State.clearStaleState: got item from key: ",O,X.created),X.created<=S&&(z=!0)}catch(Ee){u.Log.error("State.clearStaleState: Error parsing state for key",O,Ee.message),z=!0}else u.Log.debug("State.clearStaleState: no item in storage for key: ",O),z=!0;if(z)return u.Log.debug("State.clearStaleState: removed item for key: ",O),g.remove(O)})),R.push(F)},A=0;A<w.length;A++){var F;T(A)}return u.Log.debug("State.clearStaleState: waiting on promise count:",R.length),Promise.all(R)}))},a(f,[{key:"id",get:function(){return this._id}},{key:"data",get:function(){return this._data}},{key:"created",get:function(){return this._created}},{key:"request_type",get:function(){return this._request_type}}]),f})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.OidcClient=void 0;var a=(function(){function T(A,F){for(var x=0;x<F.length;x++){var D=F[x];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(A,D.key,D)}}return function(A,F,x){return F&&T(A.prototype,F),x&&T(A,x),A}})(),u=s(0),c=s(5),h=s(12),f=s(8),p=s(34),g=s(35),y=s(36),S=s(13),w=s(9);function R(T,A){if(!(T instanceof A))throw new TypeError("Cannot call a class as a function")}n.OidcClient=(function(){function T(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};R(this,T),A instanceof c.OidcClientSettings?this._settings=A:this._settings=new c.OidcClientSettings(A)}return T.prototype.createSigninRequest=function(){var F=this,x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=x.response_type,O=x.scope,K=x.redirect_uri,z=x.data,X=x.state,Ee=x.prompt,q=x.display,Y=x.max_age,Te=x.ui_locales,re=x.id_token_hint,$e=x.login_hint,ze=x.acr_values,ye=x.resource,Ve=x.request,pe=x.request_uri,De=x.response_mode,$=x.extraQueryParams,G=x.extraTokenParams,ce=x.request_type,oe=x.skipUserInfo,Fe=arguments[1];u.Log.debug("OidcClient.createSigninRequest");var Ue=this._settings.client_id;D=D||this._settings.response_type,O=O||this._settings.scope,K=K||this._settings.redirect_uri,Ee=Ee||this._settings.prompt,q=q||this._settings.display,Y=Y||this._settings.max_age,Te=Te||this._settings.ui_locales,ze=ze||this._settings.acr_values,ye=ye||this._settings.resource,De=De||this._settings.response_mode,$=$||this._settings.extraQueryParams,G=G||this._settings.extraTokenParams;var Je=this._settings.authority;return f.SigninRequest.isCode(D)&&D!=="code"?Promise.reject(new Error("OpenID Connect hybrid flow is not supported")):this._metadataService.getAuthorizationEndpoint().then((function(He){u.Log.debug("OidcClient.createSigninRequest: Received authorization endpoint",He);var he=new f.SigninRequest({url:He,client_id:Ue,redirect_uri:K,response_type:D,scope:O,data:z||X,authority:Je,prompt:Ee,display:q,max_age:Y,ui_locales:Te,id_token_hint:re,login_hint:$e,acr_values:ze,resource:ye,request:Ve,request_uri:pe,extraQueryParams:$,extraTokenParams:G,request_type:ce,response_mode:De,client_secret:F._settings.client_secret,skipUserInfo:oe}),fe=he.state;return(Fe=Fe||F._stateStore).set(fe.id,fe.toStorageString()).then((function(){return he}))}))},T.prototype.readSigninResponseState=function(F,x){var D=arguments.length>2&&arguments[2]!==void 0&&arguments[2];u.Log.debug("OidcClient.readSigninResponseState");var O=this._settings.response_mode==="query"||!this._settings.response_mode&&f.SigninRequest.isCode(this._settings.response_type),K=O?"?":"#",z=new p.SigninResponse(F,K);if(!z.state)return u.Log.error("OidcClient.readSigninResponseState: No state in response"),Promise.reject(new Error("No state in response"));x=x||this._stateStore;var X=D?x.remove.bind(x):x.get.bind(x);return X(z.state).then((function(Ee){if(!Ee)throw u.Log.error("OidcClient.readSigninResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:S.SigninState.fromStorageString(Ee),response:z}}))},T.prototype.processSigninResponse=function(F,x){var D=this;return u.Log.debug("OidcClient.processSigninResponse"),this.readSigninResponseState(F,x,!0).then((function(O){var K=O.state,z=O.response;return u.Log.debug("OidcClient.processSigninResponse: Received state from storage; validating response"),D._validator.validateSigninResponse(K,z)}))},T.prototype.createSignoutRequest=function(){var F=this,x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=x.id_token_hint,O=x.data,K=x.state,z=x.post_logout_redirect_uri,X=x.extraQueryParams,Ee=x.request_type,q=arguments[1];return u.Log.debug("OidcClient.createSignoutRequest"),z=z||this._settings.post_logout_redirect_uri,X=X||this._settings.extraQueryParams,this._metadataService.getEndSessionEndpoint().then((function(Y){if(!Y)throw u.Log.error("OidcClient.createSignoutRequest: No end session endpoint url returned"),new Error("no end session endpoint");u.Log.debug("OidcClient.createSignoutRequest: Received end session endpoint",Y);var Te=new g.SignoutRequest({url:Y,id_token_hint:D,post_logout_redirect_uri:z,data:O||K,extraQueryParams:X,request_type:Ee}),re=Te.state;return re&&(u.Log.debug("OidcClient.createSignoutRequest: Signout request has state to persist"),(q=q||F._stateStore).set(re.id,re.toStorageString())),Te}))},T.prototype.readSignoutResponseState=function(F,x){var D=arguments.length>2&&arguments[2]!==void 0&&arguments[2];u.Log.debug("OidcClient.readSignoutResponseState");var O=new y.SignoutResponse(F);if(!O.state)return u.Log.debug("OidcClient.readSignoutResponseState: No state in response"),O.error?(u.Log.warn("OidcClient.readSignoutResponseState: Response was error: ",O.error),Promise.reject(new h.ErrorResponse(O))):Promise.resolve({state:void 0,response:O});var K=O.state;x=x||this._stateStore;var z=D?x.remove.bind(x):x.get.bind(x);return z(K).then((function(X){if(!X)throw u.Log.error("OidcClient.readSignoutResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:w.State.fromStorageString(X),response:O}}))},T.prototype.processSignoutResponse=function(F,x){var D=this;return u.Log.debug("OidcClient.processSignoutResponse"),this.readSignoutResponseState(F,x,!0).then((function(O){var K=O.state,z=O.response;return K?(u.Log.debug("OidcClient.processSignoutResponse: Received state from storage; validating response"),D._validator.validateSignoutResponse(K,z)):(u.Log.debug("OidcClient.processSignoutResponse: No state from storage; skipping validating response"),z)}))},T.prototype.clearStaleState=function(F){return u.Log.debug("OidcClient.clearStaleState"),F=F||this._stateStore,w.State.clearStaleState(F,this.settings.staleStateAge)},a(T,[{key:"_stateStore",get:function(){return this.settings.stateStore}},{key:"_validator",get:function(){return this.settings.validator}},{key:"_metadataService",get:function(){return this.settings.metadataService}},{key:"settings",get:function(){return this._settings}},{key:"metadataService",get:function(){return this._metadataService}}]),T})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.TokenClient=void 0;var a=s(7),u=s(2),c=s(0);function h(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}n.TokenClient=(function(){function f(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a.JsonService,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.MetadataService;if(h(this,f),!p)throw c.Log.error("TokenClient.ctor: No settings passed"),new Error("settings");this._settings=p,this._jsonService=new g,this._metadataService=new y(this._settings)}return f.prototype.exchangeCode=function(){var g=this,y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(y=Object.assign({},y)).grant_type=y.grant_type||"authorization_code",y.client_id=y.client_id||this._settings.client_id,y.client_secret=y.client_secret||this._settings.client_secret,y.redirect_uri=y.redirect_uri||this._settings.redirect_uri;var S=void 0,w=y._client_authentication||this._settings._client_authentication;return delete y._client_authentication,y.code?y.redirect_uri?y.code_verifier?y.client_id?y.client_secret||w!="client_secret_basic"?(w=="client_secret_basic"&&(S=y.client_id+":"+y.client_secret,delete y.client_id,delete y.client_secret),this._metadataService.getTokenEndpoint(!1).then((function(R){return c.Log.debug("TokenClient.exchangeCode: Received token endpoint"),g._jsonService.postForm(R,y,S).then((function(T){return c.Log.debug("TokenClient.exchangeCode: response received"),T}))}))):(c.Log.error("TokenClient.exchangeCode: No client_secret passed"),Promise.reject(new Error("A client_secret is required"))):(c.Log.error("TokenClient.exchangeCode: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(c.Log.error("TokenClient.exchangeCode: No code_verifier passed"),Promise.reject(new Error("A code_verifier is required"))):(c.Log.error("TokenClient.exchangeCode: No redirect_uri passed"),Promise.reject(new Error("A redirect_uri is required"))):(c.Log.error("TokenClient.exchangeCode: No code passed"),Promise.reject(new Error("A code is required")))},f.prototype.exchangeRefreshToken=function(){var g=this,y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(y=Object.assign({},y)).grant_type=y.grant_type||"refresh_token",y.client_id=y.client_id||this._settings.client_id,y.client_secret=y.client_secret||this._settings.client_secret;var S=void 0,w=y._client_authentication||this._settings._client_authentication;return delete y._client_authentication,y.refresh_token?y.client_id?(w=="client_secret_basic"&&(S=y.client_id+":"+y.client_secret,delete y.client_id,delete y.client_secret),this._metadataService.getTokenEndpoint(!1).then((function(R){return c.Log.debug("TokenClient.exchangeRefreshToken: Received token endpoint"),g._jsonService.postForm(R,y,S).then((function(T){return c.Log.debug("TokenClient.exchangeRefreshToken: response received"),T}))}))):(c.Log.error("TokenClient.exchangeRefreshToken: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(c.Log.error("TokenClient.exchangeRefreshToken: No refresh_token passed"),Promise.reject(new Error("A refresh_token is required")))},f})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorResponse=void 0;var a=s(0);function u(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}function c(h,f){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||typeof f!="object"&&typeof f!="function"?h:f}n.ErrorResponse=(function(h){function f(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},g=p.error,y=p.error_description,S=p.error_uri,w=p.state,R=p.session_state;if(u(this,f),!g)throw a.Log.error("No error passed to ErrorResponse"),new Error("error");var T=c(this,h.call(this,y||g));return T.name="ErrorResponse",T.error=g,T.error_description=y,T.error_uri=S,T.state=w,T.session_state=R,T}return(function(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);g.prototype=Object.create(y&&y.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(g,y):g.__proto__=y)})(f,h),f})(Error)},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.SigninState=void 0;var a=(function(){function y(S,w){for(var R=0;R<w.length;R++){var T=w[R];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(S,T.key,T)}}return function(S,w,R){return w&&y(S.prototype,w),R&&y(S,R),S}})(),u=s(0),c=s(9),h=s(4),f=(function(S){return S&&S.__esModule?S:{default:S}})(s(14));function p(y,S){if(!(y instanceof S))throw new TypeError("Cannot call a class as a function")}function g(y,S){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!S||typeof S!="object"&&typeof S!="function"?y:S}n.SigninState=(function(y){function S(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=w.nonce,T=w.authority,A=w.client_id,F=w.redirect_uri,x=w.code_verifier,D=w.response_mode,O=w.client_secret,K=w.scope,z=w.extraTokenParams,X=w.skipUserInfo;p(this,S);var Ee=g(this,y.call(this,arguments[0]));if(R===!0?Ee._nonce=(0,f.default)():R&&(Ee._nonce=R),x===!0?Ee._code_verifier=(0,f.default)()+(0,f.default)()+(0,f.default)():x&&(Ee._code_verifier=x),Ee.code_verifier){var q=h.JoseUtil.hashString(Ee.code_verifier,"SHA256");Ee._code_challenge=h.JoseUtil.hexToBase64Url(q)}return Ee._redirect_uri=F,Ee._authority=T,Ee._client_id=A,Ee._response_mode=D,Ee._client_secret=O,Ee._scope=K,Ee._extraTokenParams=z,Ee._skipUserInfo=X,Ee}return(function(R,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);R.prototype=Object.create(T&&T.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(R,T):R.__proto__=T)})(S,y),S.prototype.toStorageString=function(){return u.Log.debug("SigninState.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,nonce:this.nonce,code_verifier:this.code_verifier,redirect_uri:this.redirect_uri,authority:this.authority,client_id:this.client_id,response_mode:this.response_mode,client_secret:this.client_secret,scope:this.scope,extraTokenParams:this.extraTokenParams,skipUserInfo:this.skipUserInfo})},S.fromStorageString=function(R){return u.Log.debug("SigninState.fromStorageString"),new S(JSON.parse(R))},a(S,[{key:"nonce",get:function(){return this._nonce}},{key:"authority",get:function(){return this._authority}},{key:"client_id",get:function(){return this._client_id}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"code_verifier",get:function(){return this._code_verifier}},{key:"code_challenge",get:function(){return this._code_challenge}},{key:"response_mode",get:function(){return this._response_mode}},{key:"client_secret",get:function(){return this._client_secret}},{key:"scope",get:function(){return this._scope}},{key:"extraTokenParams",get:function(){return this._extraTokenParams}},{key:"skipUserInfo",get:function(){return this._skipUserInfo}}]),S})(c.State)},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){return(a!="undefined"&&a!==null&&a.getRandomValues!==void 0?u:c)().replace(/-/g,"")};var a=typeof window<"u"?window.crypto||window.msCrypto:null;function u(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,(function(h){return(h^a.getRandomValues(new Uint8Array(1))[0]&15>>h/4).toString(16)}))}function c(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,(function(h){return(h^16*Math.random()>>h/4).toString(16)}))}t.exports=n.default},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.User=void 0;var a=(function(){function c(h,f){for(var p=0;p<f.length;p++){var g=f[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(h,g.key,g)}}return function(h,f,p){return f&&c(h.prototype,f),p&&c(h,p),h}})(),u=s(0);n.User=(function(){function c(h){var f=h.id_token,p=h.session_state,g=h.access_token,y=h.refresh_token,S=h.token_type,w=h.scope,R=h.profile,T=h.expires_at,A=h.state;(function(x,D){if(!(x instanceof D))throw new TypeError("Cannot call a class as a function")})(this,c),this.id_token=f,this.session_state=p,this.access_token=g,this.refresh_token=y,this.token_type=S,this.scope=w,this.profile=R,this.expires_at=T,this.state=A}return c.prototype.toStorageString=function(){return u.Log.debug("User.toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})},c.fromStorageString=function(f){return u.Log.debug("User.fromStorageString"),new c(JSON.parse(f))},a(c,[{key:"expires_in",get:function(){if(this.expires_at){var f=parseInt(Date.now()/1e3);return this.expires_at-f}},set:function(f){var p=parseInt(f);if(typeof p=="number"&&p>0){var g=parseInt(Date.now()/1e3);this.expires_at=g+p}}},{key:"expired",get:function(){var f=this.expires_in;if(f!==void 0)return f<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}}]),c})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.AccessTokenEvents=void 0;var a=s(0),u=s(46);function c(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}n.AccessTokenEvents=(function(){function h(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=f.accessTokenExpiringNotificationTime,g=p===void 0?60:p,y=f.accessTokenExpiringTimer,S=y===void 0?new u.Timer("Access token expiring"):y,w=f.accessTokenExpiredTimer,R=w===void 0?new u.Timer("Access token expired"):w;c(this,h),this._accessTokenExpiringNotificationTime=g,this._accessTokenExpiring=S,this._accessTokenExpired=R}return h.prototype.load=function(p){if(p.access_token&&p.expires_in!==void 0){var g=p.expires_in;if(a.Log.debug("AccessTokenEvents.load: access token present, remaining duration:",g),g>0){var y=g-this._accessTokenExpiringNotificationTime;y<=0&&(y=1),a.Log.debug("AccessTokenEvents.load: registering expiring timer in:",y),this._accessTokenExpiring.init(y)}else a.Log.debug("AccessTokenEvents.load: canceling existing expiring timer becase we're past expiration."),this._accessTokenExpiring.cancel();var S=g+1;a.Log.debug("AccessTokenEvents.load: registering expired timer in:",S),this._accessTokenExpired.init(S)}else this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},h.prototype.unload=function(){a.Log.debug("AccessTokenEvents.unload: canceling existing access token timers"),this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},h.prototype.addAccessTokenExpiring=function(p){this._accessTokenExpiring.addHandler(p)},h.prototype.removeAccessTokenExpiring=function(p){this._accessTokenExpiring.removeHandler(p)},h.prototype.addAccessTokenExpired=function(p){this._accessTokenExpired.addHandler(p)},h.prototype.removeAccessTokenExpired=function(p){this._accessTokenExpired.removeHandler(p)},h})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.Event=void 0;var a=s(0);n.Event=(function(){function u(c){(function(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")})(this,u),this._name=c,this._callbacks=[]}return u.prototype.addHandler=function(h){this._callbacks.push(h)},u.prototype.removeHandler=function(h){var f=this._callbacks.findIndex((function(p){return p===h}));f>=0&&this._callbacks.splice(f,1)},u.prototype.raise=function(){a.Log.debug("Event: Raising event: "+this._name);for(var h=0;h<this._callbacks.length;h++){var f;(f=this._callbacks)[h].apply(f,arguments)}},u})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.SessionMonitor=void 0;var a=(function(){function p(g,y){for(var S=0;S<y.length;S++){var w=y[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,y,S){return y&&p(g.prototype,y),S&&p(g,S),g}})(),u=s(0),c=s(19),h=s(1);function f(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}n.SessionMonitor=(function(){function p(g){var y=this,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c.CheckSessionIFrame,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.Global.timer;if(f(this,p),!g)throw u.Log.error("SessionMonitor.ctor: No user manager passed to SessionMonitor"),new Error("userManager");this._userManager=g,this._CheckSessionIFrameCtor=S,this._timer=w,this._userManager.events.addUserLoaded(this._start.bind(this)),this._userManager.events.addUserUnloaded(this._stop.bind(this)),Promise.resolve(this._userManager.getUser().then((function(R){R?y._start(R):y._settings.monitorAnonymousSession&&y._userManager.querySessionStatus().then((function(T){var A={session_state:T.session_state};T.sub&&T.sid&&(A.profile={sub:T.sub,sid:T.sid}),y._start(A)})).catch((function(T){u.Log.error("SessionMonitor ctor: error from querySessionStatus:",T.message)}))})).catch((function(R){u.Log.error("SessionMonitor ctor: error from getUser:",R.message)})))}return p.prototype._start=function(y){var S=this,w=y.session_state;w&&(y.profile?(this._sub=y.profile.sub,this._sid=y.profile.sid,u.Log.debug("SessionMonitor._start: session_state:",w,", sub:",this._sub)):(this._sub=void 0,this._sid=void 0,u.Log.debug("SessionMonitor._start: session_state:",w,", anonymous user")),this._checkSessionIFrame?this._checkSessionIFrame.start(w):this._metadataService.getCheckSessionIframe().then((function(R){if(R){u.Log.debug("SessionMonitor._start: Initializing check session iframe");var T=S._client_id,A=S._checkSessionInterval,F=S._stopCheckSessionOnError;S._checkSessionIFrame=new S._CheckSessionIFrameCtor(S._callback.bind(S),T,R,A,F),S._checkSessionIFrame.load().then((function(){S._checkSessionIFrame.start(w)}))}else u.Log.warn("SessionMonitor._start: No check session iframe found in the metadata")})).catch((function(R){u.Log.error("SessionMonitor._start: Error from getCheckSessionIframe:",R.message)})))},p.prototype._stop=function(){var y=this;if(this._sub=void 0,this._sid=void 0,this._checkSessionIFrame&&(u.Log.debug("SessionMonitor._stop"),this._checkSessionIFrame.stop()),this._settings.monitorAnonymousSession)var S=this._timer.setInterval((function(){y._timer.clearInterval(S),y._userManager.querySessionStatus().then((function(w){var R={session_state:w.session_state};w.sub&&w.sid&&(R.profile={sub:w.sub,sid:w.sid}),y._start(R)})).catch((function(w){u.Log.error("SessionMonitor: error from querySessionStatus:",w.message)}))}),1e3)},p.prototype._callback=function(){var y=this;this._userManager.querySessionStatus().then((function(S){var w=!0;S?S.sub===y._sub?(w=!1,y._checkSessionIFrame.start(S.session_state),S.sid===y._sid?u.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, restarting check session iframe; session_state:",S.session_state):(u.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, session state has changed, restarting check session iframe; session_state:",S.session_state),y._userManager.events._raiseUserSessionChanged())):u.Log.debug("SessionMonitor._callback: Different subject signed into OP:",S.sub):u.Log.debug("SessionMonitor._callback: Subject no longer signed into OP"),w&&(y._sub?(u.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed out event"),y._userManager.events._raiseUserSignedOut()):(u.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed in event"),y._userManager.events._raiseUserSignedIn()))})).catch((function(S){y._sub&&(u.Log.debug("SessionMonitor._callback: Error calling queryCurrentSigninSession; raising signed out event",S.message),y._userManager.events._raiseUserSignedOut())}))},a(p,[{key:"_settings",get:function(){return this._userManager.settings}},{key:"_metadataService",get:function(){return this._userManager.metadataService}},{key:"_client_id",get:function(){return this._settings.client_id}},{key:"_checkSessionInterval",get:function(){return this._settings.checkSessionInterval}},{key:"_stopCheckSessionOnError",get:function(){return this._settings.stopCheckSessionOnError}}]),p})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.CheckSessionIFrame=void 0;var a=s(0);function u(c,h){if(!(c instanceof h))throw new TypeError("Cannot call a class as a function")}n.CheckSessionIFrame=(function(){function c(h,f,p,g){var y=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];u(this,c),this._callback=h,this._client_id=f,this._url=p,this._interval=g||2e3,this._stopOnError=y;var S=p.indexOf("/",p.indexOf("//")+2);this._frame_origin=p.substr(0,S),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.style.display="none",this._frame.width=0,this._frame.height=0,this._frame.src=p}return c.prototype.load=function(){var f=this;return new Promise((function(p){f._frame.onload=function(){p()},window.document.body.appendChild(f._frame),f._boundMessageEvent=f._message.bind(f),window.addEventListener("message",f._boundMessageEvent,!1)}))},c.prototype._message=function(f){f.origin===this._frame_origin&&f.source===this._frame.contentWindow&&(f.data==="error"?(a.Log.error("CheckSessionIFrame: error message from check session op iframe"),this._stopOnError&&this.stop()):f.data==="changed"?(a.Log.debug("CheckSessionIFrame: changed message from check session op iframe"),this.stop(),this._callback()):a.Log.debug("CheckSessionIFrame: "+f.data+" message from check session op iframe"))},c.prototype.start=function(f){var p=this;if(this._session_state!==f){a.Log.debug("CheckSessionIFrame.start"),this.stop(),this._session_state=f;var g=function(){p._frame.contentWindow.postMessage(p._client_id+" "+p._session_state,p._frame_origin)};g(),this._timer=window.setInterval(g,this._interval)}},c.prototype.stop=function(){this._session_state=null,this._timer&&(a.Log.debug("CheckSessionIFrame.stop"),window.clearInterval(this._timer),this._timer=null)},c})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.TokenRevocationClient=void 0;var a=s(0),u=s(2),c=s(1);function h(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}var f="access_token",p="refresh_token";n.TokenRevocationClient=(function(){function g(y){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c.Global.XMLHttpRequest,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.MetadataService;if(h(this,g),!y)throw a.Log.error("TokenRevocationClient.ctor: No settings provided"),new Error("No settings provided.");this._settings=y,this._XMLHttpRequestCtor=S,this._metadataService=new w(this._settings)}return g.prototype.revoke=function(S,w){var R=this,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"access_token";if(!S)throw a.Log.error("TokenRevocationClient.revoke: No token provided"),new Error("No token provided.");if(T!==f&&T!=p)throw a.Log.error("TokenRevocationClient.revoke: Invalid token type"),new Error("Invalid token type.");return this._metadataService.getRevocationEndpoint().then((function(A){if(A){a.Log.debug("TokenRevocationClient.revoke: Revoking "+T);var F=R._settings.client_id,x=R._settings.client_secret;return R._revoke(A,F,x,S,T)}if(w)throw a.Log.error("TokenRevocationClient.revoke: Revocation not supported"),new Error("Revocation not supported")}))},g.prototype._revoke=function(S,w,R,T,A){var F=this;return new Promise((function(x,D){var O=new F._XMLHttpRequestCtor;O.open("POST",S),O.onload=function(){a.Log.debug("TokenRevocationClient.revoke: HTTP response received, status",O.status),O.status===200?x():D(Error(O.statusText+" ("+O.status+")"))},O.onerror=function(){a.Log.debug("TokenRevocationClient.revoke: Network Error."),D("Network Error")};var K="client_id="+encodeURIComponent(w);R&&(K+="&client_secret="+encodeURIComponent(R)),K+="&token_type_hint="+encodeURIComponent(A),K+="&token="+encodeURIComponent(T),O.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),O.send(K)}))},g})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.CordovaPopupWindow=void 0;var a=(function(){function c(h,f){for(var p=0;p<f.length;p++){var g=f[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(h,g.key,g)}}return function(h,f,p){return f&&c(h.prototype,f),p&&c(h,p),h}})(),u=s(0);n.CordovaPopupWindow=(function(){function c(h){var f=this;(function(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")})(this,c),this._promise=new Promise((function(p,g){f._resolve=p,f._reject=g})),this.features=h.popupWindowFeatures||"location=no,toolbar=no,zoom=no",this.target=h.popupWindowTarget||"_blank",this.redirect_uri=h.startUrl,u.Log.debug("CordovaPopupWindow.ctor: redirect_uri: "+this.redirect_uri)}return c.prototype._isInAppBrowserInstalled=function(f){return["cordova-plugin-inappbrowser","cordova-plugin-inappbrowser.inappbrowser","org.apache.cordova.inappbrowser"].some((function(p){return f.hasOwnProperty(p)}))},c.prototype.navigate=function(f){if(f&&f.url){if(!window.cordova)return this._error("cordova is undefined");var p=window.cordova.require("cordova/plugin_list").metadata;if(this._isInAppBrowserInstalled(p)===!1)return this._error("InAppBrowser plugin not found");this._popup=cordova.InAppBrowser.open(f.url,this.target,this.features),this._popup?(u.Log.debug("CordovaPopupWindow.navigate: popup successfully created"),this._exitCallbackEvent=this._exitCallback.bind(this),this._loadStartCallbackEvent=this._loadStartCallback.bind(this),this._popup.addEventListener("exit",this._exitCallbackEvent,!1),this._popup.addEventListener("loadstart",this._loadStartCallbackEvent,!1)):this._error("Error opening popup window")}else this._error("No url provided");return this.promise},c.prototype._loadStartCallback=function(f){f.url.indexOf(this.redirect_uri)===0&&this._success({url:f.url})},c.prototype._exitCallback=function(f){this._error(f)},c.prototype._success=function(f){this._cleanup(),u.Log.debug("CordovaPopupWindow: Successful response from cordova popup window"),this._resolve(f)},c.prototype._error=function(f){this._cleanup(),u.Log.error(f),this._reject(new Error(f))},c.prototype.close=function(){this._cleanup()},c.prototype._cleanup=function(){this._popup&&(u.Log.debug("CordovaPopupWindow: cleaning up popup"),this._popup.removeEventListener("exit",this._exitCallbackEvent,!1),this._popup.removeEventListener("loadstart",this._loadStartCallbackEvent,!1),this._popup.close()),this._popup=null},a(c,[{key:"promise",get:function(){return this._promise}}]),c})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0});var a=s(0),u=s(10),c=s(5),h=s(6),f=s(37),p=s(38),g=s(16),y=s(2),S=s(48),w=s(49),R=s(19),T=s(20),A=s(18),F=s(1),x=s(15),D=s(50);n.default={Version:D.Version,Log:a.Log,OidcClient:u.OidcClient,OidcClientSettings:c.OidcClientSettings,WebStorageStateStore:h.WebStorageStateStore,InMemoryWebStorage:f.InMemoryWebStorage,UserManager:p.UserManager,AccessTokenEvents:g.AccessTokenEvents,MetadataService:y.MetadataService,CordovaPopupNavigator:S.CordovaPopupNavigator,CordovaIFrameNavigator:w.CordovaIFrameNavigator,CheckSessionIFrame:R.CheckSessionIFrame,TokenRevocationClient:T.TokenRevocationClient,SessionMonitor:A.SessionMonitor,Global:F.Global,User:x.User},t.exports=n.default},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.ClockService=(function(){function a(){(function(c,h){if(!(c instanceof h))throw new TypeError("Cannot call a class as a function")})(this,a)}return a.prototype.getEpochTime=function(){return Promise.resolve(Date.now()/1e3|0)},a})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.ResponseValidator=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},u=s(0),c=s(2),h=s(25),f=s(11),p=s(12),g=s(4);function y(w,R){if(!(w instanceof R))throw new TypeError("Cannot call a class as a function")}var S=["nonce","at_hash","iat","nbf","exp","aud","iss","c_hash"];n.ResponseValidator=(function(){function w(R){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c.MetadataService,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.UserInfoService,F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:g.JoseUtil,x=arguments.length>4&&arguments[4]!==void 0?arguments[4]:f.TokenClient;if(y(this,w),!R)throw u.Log.error("ResponseValidator.ctor: No settings passed to ResponseValidator"),new Error("settings");this._settings=R,this._metadataService=new T(this._settings),this._userInfoService=new A(this._settings),this._joseUtil=F,this._tokenClient=new x(this._settings)}return w.prototype.validateSigninResponse=function(T,A){var F=this;return u.Log.debug("ResponseValidator.validateSigninResponse"),this._processSigninParams(T,A).then((function(x){return u.Log.debug("ResponseValidator.validateSigninResponse: state processed"),F._validateTokens(T,x).then((function(D){return u.Log.debug("ResponseValidator.validateSigninResponse: tokens validated"),F._processClaims(T,D).then((function(O){return u.Log.debug("ResponseValidator.validateSigninResponse: claims processed"),O}))}))}))},w.prototype.validateSignoutResponse=function(T,A){return T.id!==A.state?(u.Log.error("ResponseValidator.validateSignoutResponse: State does not match"),Promise.reject(new Error("State does not match"))):(u.Log.debug("ResponseValidator.validateSignoutResponse: state validated"),A.state=T.data,A.error?(u.Log.warn("ResponseValidator.validateSignoutResponse: Response was error",A.error),Promise.reject(new p.ErrorResponse(A))):Promise.resolve(A))},w.prototype._processSigninParams=function(T,A){if(T.id!==A.state)return u.Log.error("ResponseValidator._processSigninParams: State does not match"),Promise.reject(new Error("State does not match"));if(!T.client_id)return u.Log.error("ResponseValidator._processSigninParams: No client_id on state"),Promise.reject(new Error("No client_id on state"));if(!T.authority)return u.Log.error("ResponseValidator._processSigninParams: No authority on state"),Promise.reject(new Error("No authority on state"));if(this._settings.authority){if(this._settings.authority&&this._settings.authority!==T.authority)return u.Log.error("ResponseValidator._processSigninParams: authority mismatch on settings vs. signin state"),Promise.reject(new Error("authority mismatch on settings vs. signin state"))}else this._settings.authority=T.authority;if(this._settings.client_id){if(this._settings.client_id&&this._settings.client_id!==T.client_id)return u.Log.error("ResponseValidator._processSigninParams: client_id mismatch on settings vs. signin state"),Promise.reject(new Error("client_id mismatch on settings vs. signin state"))}else this._settings.client_id=T.client_id;return u.Log.debug("ResponseValidator._processSigninParams: state validated"),A.state=T.data,A.error?(u.Log.warn("ResponseValidator._processSigninParams: Response was error",A.error),Promise.reject(new p.ErrorResponse(A))):T.nonce&&!A.id_token?(u.Log.error("ResponseValidator._processSigninParams: Expecting id_token in response"),Promise.reject(new Error("No id_token in response"))):!T.nonce&&A.id_token?(u.Log.error("ResponseValidator._processSigninParams: Not expecting id_token in response"),Promise.reject(new Error("Unexpected id_token in response"))):T.code_verifier&&!A.code?(u.Log.error("ResponseValidator._processSigninParams: Expecting code in response"),Promise.reject(new Error("No code in response"))):!T.code_verifier&&A.code?(u.Log.error("ResponseValidator._processSigninParams: Not expecting code in response"),Promise.reject(new Error("Unexpected code in response"))):(A.scope||(A.scope=T.scope),Promise.resolve(A))},w.prototype._processClaims=function(T,A){var F=this;if(A.isOpenIdConnect){if(u.Log.debug("ResponseValidator._processClaims: response is OIDC, processing claims"),A.profile=this._filterProtocolClaims(A.profile),T.skipUserInfo!==!0&&this._settings.loadUserInfo&&A.access_token)return u.Log.debug("ResponseValidator._processClaims: loading user info"),this._userInfoService.getClaims(A.access_token).then((function(x){return u.Log.debug("ResponseValidator._processClaims: user info claims received from user info endpoint"),x.sub!==A.profile.sub?(u.Log.error("ResponseValidator._processClaims: sub from user info endpoint does not match sub in id_token"),Promise.reject(new Error("sub from user info endpoint does not match sub in id_token"))):(A.profile=F._mergeClaims(A.profile,x),u.Log.debug("ResponseValidator._processClaims: user info claims received, updated profile:",A.profile),A)}));u.Log.debug("ResponseValidator._processClaims: not loading user info")}else u.Log.debug("ResponseValidator._processClaims: response is not OIDC, not processing claims");return Promise.resolve(A)},w.prototype._mergeClaims=function(T,A){var F=Object.assign({},T);for(var x in A){var D=A[x];Array.isArray(D)||(D=[D]);for(var O=0;O<D.length;O++){var K=D[O];F[x]?Array.isArray(F[x])?F[x].indexOf(K)<0&&F[x].push(K):F[x]!==K&&((K===void 0?"undefined":a(K))==="object"&&this._settings.mergeClaims?F[x]=this._mergeClaims(F[x],K):F[x]=[F[x],K]):F[x]=K}}return F},w.prototype._filterProtocolClaims=function(T){u.Log.debug("ResponseValidator._filterProtocolClaims, incoming claims:",T);var A=Object.assign({},T);return this._settings._filterProtocolClaims?(S.forEach((function(F){delete A[F]})),u.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims filtered",A)):u.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims not filtered"),A},w.prototype._validateTokens=function(T,A){return A.code?(u.Log.debug("ResponseValidator._validateTokens: Validating code"),this._processCode(T,A)):A.id_token?A.access_token?(u.Log.debug("ResponseValidator._validateTokens: Validating id_token and access_token"),this._validateIdTokenAndAccessToken(T,A)):(u.Log.debug("ResponseValidator._validateTokens: Validating id_token"),this._validateIdToken(T,A)):(u.Log.debug("ResponseValidator._validateTokens: No code to process or id_token to validate"),Promise.resolve(A))},w.prototype._processCode=function(T,A){var F=this,x={client_id:T.client_id,client_secret:T.client_secret,code:A.code,redirect_uri:T.redirect_uri,code_verifier:T.code_verifier};return T.extraTokenParams&&a(T.extraTokenParams)==="object"&&Object.assign(x,T.extraTokenParams),this._tokenClient.exchangeCode(x).then((function(D){for(var O in D)A[O]=D[O];return A.id_token?(u.Log.debug("ResponseValidator._processCode: token response successful, processing id_token"),F._validateIdTokenAttributes(T,A)):(u.Log.debug("ResponseValidator._processCode: token response successful, returning response"),A)}))},w.prototype._validateIdTokenAttributes=function(T,A){var F=this;return this._metadataService.getIssuer().then((function(x){var D=T.client_id,O=F._settings.clockSkew;return u.Log.debug("ResponseValidator._validateIdTokenAttributes: Validaing JWT attributes; using clock skew (in seconds) of: ",O),F._settings.getEpochTime().then((function(K){return F._joseUtil.validateJwtAttributes(A.id_token,x,D,O,K).then((function(z){return T.nonce&&T.nonce!==z.nonce?(u.Log.error("ResponseValidator._validateIdTokenAttributes: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"))):z.sub?(A.profile=z,A):(u.Log.error("ResponseValidator._validateIdTokenAttributes: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))}))}))}))},w.prototype._validateIdTokenAndAccessToken=function(T,A){var F=this;return this._validateIdToken(T,A).then((function(x){return F._validateAccessToken(x)}))},w.prototype._getSigningKeyForJwt=function(T){var A=this;return this._metadataService.getSigningKeys().then((function(F){var x=T.header.kid;if(!F)return u.Log.error("ResponseValidator._validateIdToken: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));u.Log.debug("ResponseValidator._validateIdToken: Received signing keys");var D=void 0;if(x)D=F.filter((function(O){return O.kid===x}))[0];else{if((F=A._filterByAlg(F,T.header.alg)).length>1)return u.Log.error("ResponseValidator._validateIdToken: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));D=F[0]}return Promise.resolve(D)}))},w.prototype._getSigningKeyForJwtWithSingleRetry=function(T){var A=this;return this._getSigningKeyForJwt(T).then((function(F){return F?Promise.resolve(F):(A._metadataService.resetSigningKeys(),A._getSigningKeyForJwt(T))}))},w.prototype._validateIdToken=function(T,A){var F=this;if(!T.nonce)return u.Log.error("ResponseValidator._validateIdToken: No nonce on state"),Promise.reject(new Error("No nonce on state"));var x=this._joseUtil.parseJwt(A.id_token);return x&&x.header&&x.payload?T.nonce!==x.payload.nonce?(u.Log.error("ResponseValidator._validateIdToken: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"))):this._metadataService.getIssuer().then((function(D){return u.Log.debug("ResponseValidator._validateIdToken: Received issuer"),F._getSigningKeyForJwtWithSingleRetry(x).then((function(O){if(!O)return u.Log.error("ResponseValidator._validateIdToken: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var K=T.client_id,z=F._settings.clockSkew;return u.Log.debug("ResponseValidator._validateIdToken: Validaing JWT; using clock skew (in seconds) of: ",z),F._joseUtil.validateJwt(A.id_token,O,D,K,z).then((function(){return u.Log.debug("ResponseValidator._validateIdToken: JWT validation successful"),x.payload.sub?(A.profile=x.payload,A):(u.Log.error("ResponseValidator._validateIdToken: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))}))}))})):(u.Log.error("ResponseValidator._validateIdToken: Failed to parse id_token",x),Promise.reject(new Error("Failed to parse id_token")))},w.prototype._filterByAlg=function(T,A){var F=null;if(A.startsWith("RS"))F="RSA";else if(A.startsWith("PS"))F="PS";else{if(!A.startsWith("ES"))return u.Log.debug("ResponseValidator._filterByAlg: alg not supported: ",A),[];F="EC"}return u.Log.debug("ResponseValidator._filterByAlg: Looking for keys that match kty: ",F),T=T.filter((function(x){return x.kty===F})),u.Log.debug("ResponseValidator._filterByAlg: Number of keys that match kty: ",F,T.length),T},w.prototype._validateAccessToken=function(T){if(!T.profile)return u.Log.error("ResponseValidator._validateAccessToken: No profile loaded from id_token"),Promise.reject(new Error("No profile loaded from id_token"));if(!T.profile.at_hash)return u.Log.error("ResponseValidator._validateAccessToken: No at_hash in id_token"),Promise.reject(new Error("No at_hash in id_token"));if(!T.id_token)return u.Log.error("ResponseValidator._validateAccessToken: No id_token"),Promise.reject(new Error("No id_token"));var A=this._joseUtil.parseJwt(T.id_token);if(!A||!A.header)return u.Log.error("ResponseValidator._validateAccessToken: Failed to parse id_token",A),Promise.reject(new Error("Failed to parse id_token"));var F=A.header.alg;if(!F||F.length!==5)return u.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",F),Promise.reject(new Error("Unsupported alg: "+F));var x=F.substr(2,3);if(!x)return u.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",F,x),Promise.reject(new Error("Unsupported alg: "+F));if((x=parseInt(x))!==256&&x!==384&&x!==512)return u.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",F,x),Promise.reject(new Error("Unsupported alg: "+F));var D="sha"+x,O=this._joseUtil.hashString(T.access_token,D);if(!O)return u.Log.error("ResponseValidator._validateAccessToken: access_token hash failed:",D),Promise.reject(new Error("Failed to validate at_hash"));var K=O.substr(0,O.length/2),z=this._joseUtil.hexToBase64Url(K);return z!==T.profile.at_hash?(u.Log.error("ResponseValidator._validateAccessToken: Failed to validate at_hash",z,T.profile.at_hash),Promise.reject(new Error("Failed to validate at_hash"))):(u.Log.debug("ResponseValidator._validateAccessToken: success"),Promise.resolve(T))},w})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.UserInfoService=void 0;var a=s(7),u=s(2),c=s(0),h=s(4);function f(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}n.UserInfoService=(function(){function p(g){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a.JsonService,S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.MetadataService,w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:h.JoseUtil;if(f(this,p),!g)throw c.Log.error("UserInfoService.ctor: No settings passed"),new Error("settings");this._settings=g,this._jsonService=new y(void 0,void 0,this._getClaimsFromJwt.bind(this)),this._metadataService=new S(this._settings),this._joseUtil=w}return p.prototype.getClaims=function(y){var S=this;return y?this._metadataService.getUserInfoEndpoint().then((function(w){return c.Log.debug("UserInfoService.getClaims: received userinfo url",w),S._jsonService.getJson(w,y).then((function(R){return c.Log.debug("UserInfoService.getClaims: claims received",R),R}))})):(c.Log.error("UserInfoService.getClaims: No token passed"),Promise.reject(new Error("A token is required")))},p.prototype._getClaimsFromJwt=function(y){var S=this;try{var w=this._joseUtil.parseJwt(y.responseText);if(!w||!w.header||!w.payload)return c.Log.error("UserInfoService._getClaimsFromJwt: Failed to parse JWT",w),Promise.reject(new Error("Failed to parse id_token"));var R=w.header.kid,T=void 0;switch(this._settings.userInfoJwtIssuer){case"OP":T=this._metadataService.getIssuer();break;case"ANY":T=Promise.resolve(w.payload.iss);break;default:T=Promise.resolve(this._settings.userInfoJwtIssuer)}return T.then((function(A){return c.Log.debug("UserInfoService._getClaimsFromJwt: Received issuer:"+A),S._metadataService.getSigningKeys().then((function(F){if(!F)return c.Log.error("UserInfoService._getClaimsFromJwt: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));c.Log.debug("UserInfoService._getClaimsFromJwt: Received signing keys");var x=void 0;if(R)x=F.filter((function(K){return K.kid===R}))[0];else{if((F=S._filterByAlg(F,w.header.alg)).length>1)return c.Log.error("UserInfoService._getClaimsFromJwt: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));x=F[0]}if(!x)return c.Log.error("UserInfoService._getClaimsFromJwt: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var D=S._settings.client_id,O=S._settings.clockSkew;return c.Log.debug("UserInfoService._getClaimsFromJwt: Validaing JWT; using clock skew (in seconds) of: ",O),S._joseUtil.validateJwt(y.responseText,x,A,D,O,void 0,!0).then((function(){return c.Log.debug("UserInfoService._getClaimsFromJwt: JWT validation successful"),w.payload}))}))}))}catch(A){return c.Log.error("UserInfoService._getClaimsFromJwt: Error parsing JWT response",A.message),void reject(A)}},p.prototype._filterByAlg=function(y,S){var w=null;if(S.startsWith("RS"))w="RSA";else if(S.startsWith("PS"))w="PS";else{if(!S.startsWith("ES"))return c.Log.debug("UserInfoService._filterByAlg: alg not supported: ",S),[];w="EC"}return c.Log.debug("UserInfoService._filterByAlg: Looking for keys that match kty: ",w),y=y.filter((function(R){return R.kty===w})),c.Log.debug("UserInfoService._filterByAlg: Number of keys that match kty: ",w,y.length),y},p})()},function(t,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.AllowedSigningAlgs=n.b64tohex=n.hextob64u=n.crypto=n.X509=n.KeyUtil=n.jws=void 0;var a=s(27);n.jws=a.jws,n.KeyUtil=a.KEYUTIL,n.X509=a.X509,n.crypto=a.crypto,n.hextob64u=a.hextob64u,n.b64tohex=a.b64tohex,n.AllowedSigningAlgs=["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"]},function(t,n,s){(function(a){Object.defineProperty(n,"__esModule",{value:!0});var u,c,h,f,p,g,y,S,w,R,T,A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},F={},x={},D=D||(u=Math,h=(c={}).lib={},f=h.Base=(function(){function _(){}return{extend:function(v){_.prototype=this;var I=new _;return v&&I.mixIn(v),I.hasOwnProperty("init")||(I.init=function(){I.$super.init.apply(this,arguments)}),I.init.prototype=I,I.$super=this,I},create:function(){var v=this.extend();return v.init.apply(v,arguments),v},init:function(){},mixIn:function(v){for(var I in v)v.hasOwnProperty(I)&&(this[I]=v[I]);v.hasOwnProperty("toString")&&(this.toString=v.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),p=h.WordArray=f.extend({init:function(b,v){b=this.words=b||[],this.sigBytes=v??4*b.length},toString:function(b){return(b||y).stringify(this)},concat:function(b){var v=this.words,I=b.words,k=this.sigBytes,Q=b.sigBytes;if(this.clamp(),k%4)for(var te=0;te<Q;te++){var we=I[te>>>2]>>>24-te%4*8&255;v[k+te>>>2]|=we<<24-(k+te)%4*8}else for(te=0;te<Q;te+=4)v[k+te>>>2]=I[te>>>2];return this.sigBytes+=Q,this},clamp:function(){var b=this.words,v=this.sigBytes;b[v>>>2]&=4294967295<<32-v%4*8,b.length=u.ceil(v/4)},clone:function(){var b=f.clone.call(this);return b.words=this.words.slice(0),b},random:function(b){for(var v=[],I=0;I<b;I+=4)v.push(4294967296*u.random()|0);return new p.init(v,b)}}),g=c.enc={},y=g.Hex={stringify:function(b){for(var v=b.words,I=b.sigBytes,k=[],Q=0;Q<I;Q++){var te=v[Q>>>2]>>>24-Q%4*8&255;k.push((te>>>4).toString(16)),k.push((15&te).toString(16))}return k.join("")},parse:function(b){for(var v=b.length,I=[],k=0;k<v;k+=2)I[k>>>3]|=parseInt(b.substr(k,2),16)<<24-k%8*4;return new p.init(I,v/2)}},S=g.Latin1={stringify:function(b){for(var v=b.words,I=b.sigBytes,k=[],Q=0;Q<I;Q++){var te=v[Q>>>2]>>>24-Q%4*8&255;k.push(String.fromCharCode(te))}return k.join("")},parse:function(b){for(var v=b.length,I=[],k=0;k<v;k++)I[k>>>2]|=(255&b.charCodeAt(k))<<24-k%4*8;return new p.init(I,v)}},w=g.Utf8={stringify:function(b){try{return decodeURIComponent(escape(S.stringify(b)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(b){return S.parse(unescape(encodeURIComponent(b)))}},R=h.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new p.init,this._nDataBytes=0},_append:function(b){typeof b=="string"&&(b=w.parse(b)),this._data.concat(b),this._nDataBytes+=b.sigBytes},_process:function(b){var v=this._data,I=v.words,k=v.sigBytes,Q=this.blockSize,te=k/(4*Q),we=(te=b?u.ceil(te):u.max((0|te)-this._minBufferSize,0))*Q,ge=u.min(4*we,k);if(we){for(var be=0;be<we;be+=Q)this._doProcessBlock(I,be);var _e=I.splice(0,we);v.sigBytes-=ge}return new p.init(_e,ge)},clone:function(){var b=f.clone.call(this);return b._data=this._data.clone(),b},_minBufferSize:0}),h.Hasher=R.extend({cfg:f.extend(),init:function(b){this.cfg=this.cfg.extend(b),this.reset()},reset:function(){R.reset.call(this),this._doReset()},update:function(b){return this._append(b),this._process(),this},finalize:function(b){return b&&this._append(b),this._doFinalize()},blockSize:16,_createHelper:function(b){return function(v,I){return new b.init(I).finalize(v)}},_createHmacHelper:function(b){return function(v,I){return new T.HMAC.init(b,I).finalize(v)}}}),T=c.algo={},c);(function(_){var b,v=(b=D).lib,I=v.Base,k=v.WordArray;(b=b.x64={}).Word=I.extend({init:function(te,we){this.high=te,this.low=we}}),b.WordArray=I.extend({init:function(te,we){te=this.words=te||[],this.sigBytes=we??8*te.length},toX32:function(){for(var te=this.words,we=te.length,ge=[],be=0;be<we;be++){var _e=te[be];ge.push(_e.high),ge.push(_e.low)}return k.create(ge,this.sigBytes)},clone:function(){for(var te=I.clone.call(this),we=te.words=this.words.slice(0),ge=we.length,be=0;be<ge;be++)we[be]=we[be].clone();return te}})})(),(function(){var _=D,b=_.lib.WordArray;_.enc.Base64={stringify:function(I){var k=I.words,Q=I.sigBytes,te=this._map;I.clamp(),I=[];for(var we=0;we<Q;we+=3)for(var ge=(k[we>>>2]>>>24-we%4*8&255)<<16|(k[we+1>>>2]>>>24-(we+1)%4*8&255)<<8|k[we+2>>>2]>>>24-(we+2)%4*8&255,be=0;4>be&&we+.75*be<Q;be++)I.push(te.charAt(ge>>>6*(3-be)&63));if(k=te.charAt(64))for(;I.length%4;)I.push(k);return I.join("")},parse:function(I){var k=I.length,Q=this._map;(te=Q.charAt(64))&&(te=I.indexOf(te))!=-1&&(k=te);for(var te=[],we=0,ge=0;ge<k;ge++)if(ge%4){var be=Q.indexOf(I.charAt(ge-1))<<ge%4*2,_e=Q.indexOf(I.charAt(ge))>>>6-ge%4*2;te[we>>>2]|=(be|_e)<<24-we%4*8,we++}return b.create(te,we)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(),(function(_){for(var b=D,v=(k=b.lib).WordArray,I=k.Hasher,k=b.algo,Q=[],te=[],we=function(Xe){return 4294967296*(Xe-(0|Xe))|0},ge=2,be=0;64>be;){var _e;e:{_e=ge;for(var Re=_.sqrt(_e),Ce=2;Ce<=Re;Ce++)if(!(_e%Ce)){_e=!1;break e}_e=!0}_e&&(8>be&&(Q[be]=we(_.pow(ge,.5))),te[be]=we(_.pow(ge,1/3)),be++),ge++}var Le=[];k=k.SHA256=I.extend({_doReset:function(){this._hash=new v.init(Q.slice(0))},_doProcessBlock:function(Xe,et){for(var ne=this._hash.words,Se=ne[0],Ae=ne[1],Ne=ne[2],Qe=ne[3],nt=ne[4],bt=ne[5],ht=ne[6],Ct=ne[7],yt=0;64>yt;yt++){if(16>yt)Le[yt]=0|Xe[et+yt];else{var wt=Le[yt-15],Jt=Le[yt-2];Le[yt]=((wt<<25|wt>>>7)^(wt<<14|wt>>>18)^wt>>>3)+Le[yt-7]+((Jt<<15|Jt>>>17)^(Jt<<13|Jt>>>19)^Jt>>>10)+Le[yt-16]}wt=Ct+((nt<<26|nt>>>6)^(nt<<21|nt>>>11)^(nt<<7|nt>>>25))+(nt&bt^~nt&ht)+te[yt]+Le[yt],Jt=((Se<<30|Se>>>2)^(Se<<19|Se>>>13)^(Se<<10|Se>>>22))+(Se&Ae^Se&Ne^Ae&Ne),Ct=ht,ht=bt,bt=nt,nt=Qe+wt|0,Qe=Ne,Ne=Ae,Ae=Se,Se=wt+Jt|0}ne[0]=ne[0]+Se|0,ne[1]=ne[1]+Ae|0,ne[2]=ne[2]+Ne|0,ne[3]=ne[3]+Qe|0,ne[4]=ne[4]+nt|0,ne[5]=ne[5]+bt|0,ne[6]=ne[6]+ht|0,ne[7]=ne[7]+Ct|0},_doFinalize:function(){var Xe=this._data,et=Xe.words,ne=8*this._nDataBytes,Se=8*Xe.sigBytes;return et[Se>>>5]|=128<<24-Se%32,et[14+(Se+64>>>9<<4)]=_.floor(ne/4294967296),et[15+(Se+64>>>9<<4)]=ne,Xe.sigBytes=4*et.length,this._process(),this._hash},clone:function(){var Xe=I.clone.call(this);return Xe._hash=this._hash.clone(),Xe}}),b.SHA256=I._createHelper(k),b.HmacSHA256=I._createHmacHelper(k)})(Math),(function(){function _(){return I.create.apply(I,arguments)}for(var b=D,v=b.lib.Hasher,I=(Q=b.x64).Word,k=Q.WordArray,Q=b.algo,te=[_(1116352408,3609767458),_(1899447441,602891725),_(3049323471,3964484399),_(3921009573,2173295548),_(961987163,4081628472),_(1508970993,3053834265),_(2453635748,2937671579),_(2870763221,3664609560),_(3624381080,2734883394),_(310598401,1164996542),_(607225278,1323610764),_(1426881987,3590304994),_(1925078388,4068182383),_(2162078206,991336113),_(2614888103,633803317),_(3248222580,3479774868),_(3835390401,2666613458),_(4022224774,944711139),_(264347078,2341262773),_(604807628,2007800933),_(770255983,1495990901),_(1249150122,1856431235),_(1555081692,3175218132),_(1996064986,2198950837),_(2554220882,3999719339),_(2821834349,766784016),_(2952996808,2566594879),_(3210313671,3203337956),_(3336571891,1034457026),_(3584528711,2466948901),_(113926993,3758326383),_(338241895,168717936),_(666307205,1188179964),_(773529912,1546045734),_(1294757372,1522805485),_(1396182291,2643833823),_(1695183700,2343527390),_(1986661051,1014477480),_(2177026350,1206759142),_(2456956037,344077627),_(2730485921,1290863460),_(2820302411,3158454273),_(3259730800,3505952657),_(3345764771,106217008),_(3516065817,3606008344),_(3600352804,1432725776),_(4094571909,1467031594),_(275423344,851169720),_(430227734,3100823752),_(506948616,1363258195),_(659060556,3750685593),_(883997877,3785050280),_(958139571,3318307427),_(1322822218,3812723403),_(1537002063,2003034995),_(1747873779,3602036899),_(1955562222,1575990012),_(2024104815,1125592928),_(2227730452,2716904306),_(2361852424,442776044),_(2428436474,593698344),_(2756734187,3733110249),_(3204031479,2999351573),_(3329325298,3815920427),_(3391569614,3928383900),_(3515267271,566280711),_(3940187606,3454069534),_(4118630271,4000239992),_(116418474,1914138554),_(174292421,2731055270),_(289380356,3203993006),_(460393269,320620315),_(685471733,587496836),_(852142971,1086792851),_(1017036298,365543100),_(1126000580,2618297676),_(1288033470,3409855158),_(1501505948,4234509866),_(1607167915,987167468),_(1816402316,1246189591)],we=[],ge=0;80>ge;ge++)we[ge]=_();Q=Q.SHA512=v.extend({_doReset:function(){this._hash=new k.init([new I.init(1779033703,4089235720),new I.init(3144134277,2227873595),new I.init(1013904242,4271175723),new I.init(2773480762,1595750129),new I.init(1359893119,2917565137),new I.init(2600822924,725511199),new I.init(528734635,4215389547),new I.init(1541459225,327033209)])},_doProcessBlock:function(_e,Re){for(var Ce=(Ae=this._hash.words)[0],Le=Ae[1],We=Ae[2],Xe=Ae[3],et=Ae[4],ne=Ae[5],Se=Ae[6],Ae=Ae[7],Ne=Ce.high,Qe=Ce.low,nt=Le.high,bt=Le.low,ht=We.high,Ct=We.low,yt=Xe.high,wt=Xe.low,Jt=et.high,Qt=et.low,Mt=ne.high,Ir=ne.low,Lr=Se.high,Ur=Se.low,ar=Ae.high,Xt=Ae.low,ir=Ne,Or=Qe,_n=nt,tn=bt,pn=ht,Tn=Ct,gn=yt,Fn=wt,wr=Jt,$r=Qt,Cr=Mt,kr=Ir,Mn=Lr,mn=Ur,Mi=ar,qn=Xt,Xr=0;80>Xr;Xr++){var rn=we[Xr];if(16>Xr)var Yr=rn.high=0|_e[Re+2*Xr],lr=rn.low=0|_e[Re+2*Xr+1];else{Yr=((lr=(Yr=we[Xr-15]).high)>>>1|(Dn=Yr.low)<<31)^(lr>>>8|Dn<<24)^lr>>>7;var Dn=(Dn>>>1|lr<<31)^(Dn>>>8|lr<<24)^(Dn>>>7|lr<<25),hi=((lr=(hi=we[Xr-2]).high)>>>19|(Nr=hi.low)<<13)^(lr<<3|Nr>>>29)^lr>>>6,Nr=(Nr>>>19|lr<<13)^(Nr<<3|lr>>>29)^(Nr>>>6|lr<<26),zn=(lr=we[Xr-7]).high,Vn=(Hn=we[Xr-16]).high,Hn=Hn.low;Yr=(Yr=(Yr=Yr+zn+((lr=Dn+lr.low)>>>0<Dn>>>0?1:0))+hi+((lr=lr+Nr)>>>0<Nr>>>0?1:0))+Vn+((lr=lr+Hn)>>>0<Hn>>>0?1:0),rn.high=Yr,rn.low=lr}zn=wr&Cr^~wr&Mn,Hn=$r&kr^~$r&mn,rn=ir&_n^ir&pn^_n&pn;var $s=Or&tn^Or&Tn^tn&Tn,wo=(Dn=(ir>>>28|Or<<4)^(ir<<30|Or>>>2)^(ir<<25|Or>>>7),hi=(Or>>>28|ir<<4)^(Or<<30|ir>>>2)^(Or<<25|ir>>>7),(Nr=te[Xr]).high),Wn=Nr.low;Vn=Mi+((wr>>>14|$r<<18)^(wr>>>18|$r<<14)^(wr<<23|$r>>>9))+((Nr=qn+(($r>>>14|wr<<18)^($r>>>18|wr<<14)^($r<<23|wr>>>9)))>>>0<qn>>>0?1:0),Mi=Mn,qn=mn,Mn=Cr,mn=kr,Cr=wr,kr=$r,wr=gn+(Vn=(Vn=(Vn=Vn+zn+((Nr=Nr+Hn)>>>0<Hn>>>0?1:0))+wo+((Nr=Nr+Wn)>>>0<Wn>>>0?1:0))+Yr+((Nr=Nr+lr)>>>0<lr>>>0?1:0))+(($r=Fn+Nr|0)>>>0<Fn>>>0?1:0)|0,gn=pn,Fn=Tn,pn=_n,Tn=tn,_n=ir,tn=Or,ir=Vn+(rn=Dn+rn+((lr=hi+$s)>>>0<hi>>>0?1:0))+((Or=Nr+lr|0)>>>0<Nr>>>0?1:0)|0}Qe=Ce.low=Qe+Or,Ce.high=Ne+ir+(Qe>>>0<Or>>>0?1:0),bt=Le.low=bt+tn,Le.high=nt+_n+(bt>>>0<tn>>>0?1:0),Ct=We.low=Ct+Tn,We.high=ht+pn+(Ct>>>0<Tn>>>0?1:0),wt=Xe.low=wt+Fn,Xe.high=yt+gn+(wt>>>0<Fn>>>0?1:0),Qt=et.low=Qt+$r,et.high=Jt+wr+(Qt>>>0<$r>>>0?1:0),Ir=ne.low=Ir+kr,ne.high=Mt+Cr+(Ir>>>0<kr>>>0?1:0),Ur=Se.low=Ur+mn,Se.high=Lr+Mn+(Ur>>>0<mn>>>0?1:0),Xt=Ae.low=Xt+qn,Ae.high=ar+Mi+(Xt>>>0<qn>>>0?1:0)},_doFinalize:function(){var _e=this._data,Re=_e.words,Ce=8*this._nDataBytes,Le=8*_e.sigBytes;return Re[Le>>>5]|=128<<24-Le%32,Re[30+(Le+128>>>10<<5)]=Math.floor(Ce/4294967296),Re[31+(Le+128>>>10<<5)]=Ce,_e.sigBytes=4*Re.length,this._process(),this._hash.toX32()},clone:function(){var _e=v.clone.call(this);return _e._hash=this._hash.clone(),_e},blockSize:32}),b.SHA512=v._createHelper(Q),b.HmacSHA512=v._createHmacHelper(Q)})(),(function(){var _=D,b=(k=_.x64).Word,v=k.WordArray,I=(k=_.algo).SHA512,k=k.SHA384=I.extend({_doReset:function(){this._hash=new v.init([new b.init(3418070365,3238371032),new b.init(1654270250,914150663),new b.init(2438529370,812702999),new b.init(355462360,4144912697),new b.init(1731405415,4290775857),new b.init(2394180231,1750603025),new b.init(3675008525,1694076839),new b.init(1203062813,3204075428)])},_doFinalize:function(){var te=I._doFinalize.call(this);return te.sigBytes-=16,te}});_.SHA384=I._createHelper(k),_.HmacSHA384=I._createHmacHelper(k)})();var O,K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function z(_){var b,v,I="";for(b=0;b+3<=_.length;b+=3)v=parseInt(_.substring(b,b+3),16),I+=K.charAt(v>>6)+K.charAt(63&v);for(b+1==_.length?(v=parseInt(_.substring(b,b+1),16),I+=K.charAt(v<<2)):b+2==_.length&&(v=parseInt(_.substring(b,b+2),16),I+=K.charAt(v>>2)+K.charAt((3&v)<<4)),"=";(3&I.length)>0;)I+="=";return I}function X(_){var b,v,I,k="",Q=0;for(b=0;b<_.length&&_.charAt(b)!="=";++b)(I=K.indexOf(_.charAt(b)))<0||(Q==0?(k+=ze(I>>2),v=3&I,Q=1):Q==1?(k+=ze(v<<2|I>>4),v=15&I,Q=2):Q==2?(k+=ze(v),k+=ze(I>>2),v=3&I,Q=3):(k+=ze(v<<2|I>>4),k+=ze(15&I),Q=0));return Q==1&&(k+=ze(v<<2)),k}function Ee(_){var b,v=X(_),I=new Array;for(b=0;2*b<v.length;++b)I[b]=parseInt(v.substring(2*b,2*b+2),16);return I}function q(_,b,v){_!=null&&(typeof _=="number"?this.fromNumber(_,b,v):b==null&&typeof _!="string"?this.fromString(_,256):this.fromString(_,b))}function Y(){return new q(null)}F.appName=="Microsoft Internet Explorer"?(q.prototype.am=function(b,v,I,k,Q,te){for(var we=32767&v,ge=v>>15;--te>=0;){var be=32767&this[b],_e=this[b++]>>15,Re=ge*be+_e*we;Q=((be=we*be+((32767&Re)<<15)+I[k]+(1073741823&Q))>>>30)+(Re>>>15)+ge*_e+(Q>>>30),I[k++]=1073741823&be}return Q},O=30):F.appName!="Netscape"?(q.prototype.am=function(b,v,I,k,Q,te){for(;--te>=0;){var we=v*this[b++]+I[k]+Q;Q=Math.floor(we/67108864),I[k++]=67108863&we}return Q},O=26):(q.prototype.am=function(b,v,I,k,Q,te){for(var we=16383&v,ge=v>>14;--te>=0;){var be=16383&this[b],_e=this[b++]>>14,Re=ge*be+_e*we;Q=((be=we*be+((16383&Re)<<14)+I[k]+Q)>>28)+(Re>>14)+ge*_e,I[k++]=268435455&be}return Q},O=28),q.prototype.DB=O,q.prototype.DM=(1<<O)-1,q.prototype.DV=1<<O,q.prototype.FV=Math.pow(2,52),q.prototype.F1=52-O,q.prototype.F2=2*O-52;var Te,re,$e=new Array;for(Te=48,re=0;re<=9;++re)$e[Te++]=re;for(Te=97,re=10;re<36;++re)$e[Te++]=re;for(Te=65,re=10;re<36;++re)$e[Te++]=re;function ze(_){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(_)}function ye(_,b){var v=$e[_.charCodeAt(b)];return v??-1}function Ve(_){var b=Y();return b.fromInt(_),b}function pe(_){var b,v=1;return(b=_>>>16)!=0&&(_=b,v+=16),(b=_>>8)!=0&&(_=b,v+=8),(b=_>>4)!=0&&(_=b,v+=4),(b=_>>2)!=0&&(_=b,v+=2),(b=_>>1)!=0&&(_=b,v+=1),v}function De(_){this.m=_}function $(_){this.m=_,this.mp=_.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<_.DB-15)-1,this.mt2=2*_.t}function G(_,b){return _&b}function ce(_,b){return _|b}function oe(_,b){return _^b}function Fe(_,b){return _&~b}function Ue(_){if(_==0)return-1;var b=0;return(65535&_)==0&&(_>>=16,b+=16),(255&_)==0&&(_>>=8,b+=8),(15&_)==0&&(_>>=4,b+=4),(3&_)==0&&(_>>=2,b+=2),(1&_)==0&&++b,b}function Je(_){for(var b=0;_!=0;)_&=_-1,++b;return b}function He(){}function he(_){return _}function fe(_){this.r2=Y(),this.q3=Y(),q.ONE.dlShiftTo(2*_.t,this.r2),this.mu=this.r2.divide(_),this.m=_}De.prototype.convert=function(b){return b.s<0||b.compareTo(this.m)>=0?b.mod(this.m):b},De.prototype.revert=function(b){return b},De.prototype.reduce=function(b){b.divRemTo(this.m,null,b)},De.prototype.mulTo=function(b,v,I){b.multiplyTo(v,I),this.reduce(I)},De.prototype.sqrTo=function(b,v){b.squareTo(v),this.reduce(v)},$.prototype.convert=function(b){var v=Y();return b.abs().dlShiftTo(this.m.t,v),v.divRemTo(this.m,null,v),b.s<0&&v.compareTo(q.ZERO)>0&&this.m.subTo(v,v),v},$.prototype.revert=function(b){var v=Y();return b.copyTo(v),this.reduce(v),v},$.prototype.reduce=function(b){for(;b.t<=this.mt2;)b[b.t++]=0;for(var v=0;v<this.m.t;++v){var I=32767&b[v],k=I*this.mpl+((I*this.mph+(b[v]>>15)*this.mpl&this.um)<<15)&b.DM;for(b[I=v+this.m.t]+=this.m.am(0,k,b,v,0,this.m.t);b[I]>=b.DV;)b[I]-=b.DV,b[++I]++}b.clamp(),b.drShiftTo(this.m.t,b),b.compareTo(this.m)>=0&&b.subTo(this.m,b)},$.prototype.mulTo=function(b,v,I){b.multiplyTo(v,I),this.reduce(I)},$.prototype.sqrTo=function(b,v){b.squareTo(v),this.reduce(v)},q.prototype.copyTo=function(b){for(var v=this.t-1;v>=0;--v)b[v]=this[v];b.t=this.t,b.s=this.s},q.prototype.fromInt=function(b){this.t=1,this.s=b<0?-1:0,b>0?this[0]=b:b<-1?this[0]=b+this.DV:this.t=0},q.prototype.fromString=function(b,v){var I;if(v==16)I=4;else if(v==8)I=3;else if(v==256)I=8;else if(v==2)I=1;else if(v==32)I=5;else{if(v!=4)return void this.fromRadix(b,v);I=2}this.t=0,this.s=0;for(var k=b.length,Q=!1,te=0;--k>=0;){var we=I==8?255&b[k]:ye(b,k);we<0?b.charAt(k)=="-"&&(Q=!0):(Q=!1,te==0?this[this.t++]=we:te+I>this.DB?(this[this.t-1]|=(we&(1<<this.DB-te)-1)<<te,this[this.t++]=we>>this.DB-te):this[this.t-1]|=we<<te,(te+=I)>=this.DB&&(te-=this.DB))}I==8&&(128&b[0])!=0&&(this.s=-1,te>0&&(this[this.t-1]|=(1<<this.DB-te)-1<<te)),this.clamp(),Q&&q.ZERO.subTo(this,this)},q.prototype.clamp=function(){for(var b=this.s&this.DM;this.t>0&&this[this.t-1]==b;)--this.t},q.prototype.dlShiftTo=function(b,v){var I;for(I=this.t-1;I>=0;--I)v[I+b]=this[I];for(I=b-1;I>=0;--I)v[I]=0;v.t=this.t+b,v.s=this.s},q.prototype.drShiftTo=function(b,v){for(var I=b;I<this.t;++I)v[I-b]=this[I];v.t=Math.max(this.t-b,0),v.s=this.s},q.prototype.lShiftTo=function(b,v){var I,k=b%this.DB,Q=this.DB-k,te=(1<<Q)-1,we=Math.floor(b/this.DB),ge=this.s<<k&this.DM;for(I=this.t-1;I>=0;--I)v[I+we+1]=this[I]>>Q|ge,ge=(this[I]&te)<<k;for(I=we-1;I>=0;--I)v[I]=0;v[we]=ge,v.t=this.t+we+1,v.s=this.s,v.clamp()},q.prototype.rShiftTo=function(b,v){v.s=this.s;var I=Math.floor(b/this.DB);if(I>=this.t)v.t=0;else{var k=b%this.DB,Q=this.DB-k,te=(1<<k)-1;v[0]=this[I]>>k;for(var we=I+1;we<this.t;++we)v[we-I-1]|=(this[we]&te)<<Q,v[we-I]=this[we]>>k;k>0&&(v[this.t-I-1]|=(this.s&te)<<Q),v.t=this.t-I,v.clamp()}},q.prototype.subTo=function(b,v){for(var I=0,k=0,Q=Math.min(b.t,this.t);I<Q;)k+=this[I]-b[I],v[I++]=k&this.DM,k>>=this.DB;if(b.t<this.t){for(k-=b.s;I<this.t;)k+=this[I],v[I++]=k&this.DM,k>>=this.DB;k+=this.s}else{for(k+=this.s;I<b.t;)k-=b[I],v[I++]=k&this.DM,k>>=this.DB;k-=b.s}v.s=k<0?-1:0,k<-1?v[I++]=this.DV+k:k>0&&(v[I++]=k),v.t=I,v.clamp()},q.prototype.multiplyTo=function(b,v){var I=this.abs(),k=b.abs(),Q=I.t;for(v.t=Q+k.t;--Q>=0;)v[Q]=0;for(Q=0;Q<k.t;++Q)v[Q+I.t]=I.am(0,k[Q],v,Q,0,I.t);v.s=0,v.clamp(),this.s!=b.s&&q.ZERO.subTo(v,v)},q.prototype.squareTo=function(b){for(var v=this.abs(),I=b.t=2*v.t;--I>=0;)b[I]=0;for(I=0;I<v.t-1;++I){var k=v.am(I,v[I],b,2*I,0,1);(b[I+v.t]+=v.am(I+1,2*v[I],b,2*I+1,k,v.t-I-1))>=v.DV&&(b[I+v.t]-=v.DV,b[I+v.t+1]=1)}b.t>0&&(b[b.t-1]+=v.am(I,v[I],b,2*I,0,1)),b.s=0,b.clamp()},q.prototype.divRemTo=function(b,v,I){var k=b.abs();if(!(k.t<=0)){var Q=this.abs();if(Q.t<k.t)return v?.fromInt(0),void(I!=null&&this.copyTo(I));I==null&&(I=Y());var te=Y(),we=this.s,ge=b.s,be=this.DB-pe(k[k.t-1]);be>0?(k.lShiftTo(be,te),Q.lShiftTo(be,I)):(k.copyTo(te),Q.copyTo(I));var _e=te.t,Re=te[_e-1];if(Re!=0){var Ce=Re*(1<<this.F1)+(_e>1?te[_e-2]>>this.F2:0),Le=this.FV/Ce,We=(1<<this.F1)/Ce,Xe=1<<this.F2,et=I.t,ne=et-_e,Se=v??Y();for(te.dlShiftTo(ne,Se),I.compareTo(Se)>=0&&(I[I.t++]=1,I.subTo(Se,I)),q.ONE.dlShiftTo(_e,Se),Se.subTo(te,te);te.t<_e;)te[te.t++]=0;for(;--ne>=0;){var Ae=I[--et]==Re?this.DM:Math.floor(I[et]*Le+(I[et-1]+Xe)*We);if((I[et]+=te.am(0,Ae,I,ne,0,_e))<Ae)for(te.dlShiftTo(ne,Se),I.subTo(Se,I);I[et]<--Ae;)I.subTo(Se,I)}v!=null&&(I.drShiftTo(_e,v),we!=ge&&q.ZERO.subTo(v,v)),I.t=_e,I.clamp(),be>0&&I.rShiftTo(be,I),we<0&&q.ZERO.subTo(I,I)}}},q.prototype.invDigit=function(){if(this.t<1)return 0;var b=this[0];if((1&b)==0)return 0;var v=3&b;return(v=(v=(v=(v=v*(2-(15&b)*v)&15)*(2-(255&b)*v)&255)*(2-((65535&b)*v&65535))&65535)*(2-b*v%this.DV)%this.DV)>0?this.DV-v:-v},q.prototype.isEven=function(){return(this.t>0?1&this[0]:this.s)==0},q.prototype.exp=function(b,v){if(b>4294967295||b<1)return q.ONE;var I=Y(),k=Y(),Q=v.convert(this),te=pe(b)-1;for(Q.copyTo(I);--te>=0;)if(v.sqrTo(I,k),(b&1<<te)>0)v.mulTo(k,Q,I);else{var we=I;I=k,k=we}return v.revert(I)},q.prototype.toString=function(b){if(this.s<0)return"-"+this.negate().toString(b);var v;if(b==16)v=4;else if(b==8)v=3;else if(b==2)v=1;else if(b==32)v=5;else{if(b!=4)return this.toRadix(b);v=2}var I,k=(1<<v)-1,Q=!1,te="",we=this.t,ge=this.DB-we*this.DB%v;if(we-- >0)for(ge<this.DB&&(I=this[we]>>ge)>0&&(Q=!0,te=ze(I));we>=0;)ge<v?(I=(this[we]&(1<<ge)-1)<<v-ge,I|=this[--we]>>(ge+=this.DB-v)):(I=this[we]>>(ge-=v)&k,ge<=0&&(ge+=this.DB,--we)),I>0&&(Q=!0),Q&&(te+=ze(I));return Q?te:"0"},q.prototype.negate=function(){var b=Y();return q.ZERO.subTo(this,b),b},q.prototype.abs=function(){return this.s<0?this.negate():this},q.prototype.compareTo=function(b){var v=this.s-b.s;if(v!=0)return v;var I=this.t;if((v=I-b.t)!=0)return this.s<0?-v:v;for(;--I>=0;)if((v=this[I]-b[I])!=0)return v;return 0},q.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+pe(this[this.t-1]^this.s&this.DM)},q.prototype.mod=function(b){var v=Y();return this.abs().divRemTo(b,null,v),this.s<0&&v.compareTo(q.ZERO)>0&&b.subTo(v,v),v},q.prototype.modPowInt=function(b,v){var I;return I=b<256||v.isEven()?new De(v):new $(v),this.exp(b,I)},q.ZERO=Ve(0),q.ONE=Ve(1),He.prototype.convert=he,He.prototype.revert=he,He.prototype.mulTo=function(b,v,I){b.multiplyTo(v,I)},He.prototype.sqrTo=function(b,v){b.squareTo(v)},fe.prototype.convert=function(b){if(b.s<0||b.t>2*this.m.t)return b.mod(this.m);if(b.compareTo(this.m)<0)return b;var v=Y();return b.copyTo(v),this.reduce(v),v},fe.prototype.revert=function(b){return b},fe.prototype.reduce=function(b){for(b.drShiftTo(this.m.t-1,this.r2),b.t>this.m.t+1&&(b.t=this.m.t+1,b.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);b.compareTo(this.r2)<0;)b.dAddOffset(1,this.m.t+1);for(b.subTo(this.r2,b);b.compareTo(this.m)>=0;)b.subTo(this.m,b)},fe.prototype.mulTo=function(b,v,I){b.multiplyTo(v,I),this.reduce(I)},fe.prototype.sqrTo=function(b,v){b.squareTo(v),this.reduce(v)};var Oe=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],ie=(1<<26)/Oe[Oe.length-1];function j(){this.i=0,this.j=0,this.S=new Array}q.prototype.chunkSize=function(b){return Math.floor(Math.LN2*this.DB/Math.log(b))},q.prototype.toRadix=function(b){if(b==null&&(b=10),this.signum()==0||b<2||b>36)return"0";var v=this.chunkSize(b),I=Math.pow(b,v),k=Ve(I),Q=Y(),te=Y(),we="";for(this.divRemTo(k,Q,te);Q.signum()>0;)we=(I+te.intValue()).toString(b).substr(1)+we,Q.divRemTo(k,Q,te);return te.intValue().toString(b)+we},q.prototype.fromRadix=function(b,v){this.fromInt(0),v==null&&(v=10);for(var I=this.chunkSize(v),k=Math.pow(v,I),Q=!1,te=0,we=0,ge=0;ge<b.length;++ge){var be=ye(b,ge);be<0?b.charAt(ge)=="-"&&this.signum()==0&&(Q=!0):(we=v*we+be,++te>=I&&(this.dMultiply(k),this.dAddOffset(we,0),te=0,we=0))}te>0&&(this.dMultiply(Math.pow(v,te)),this.dAddOffset(we,0)),Q&&q.ZERO.subTo(this,this)},q.prototype.fromNumber=function(b,v,I){if(typeof v=="number")if(b<2)this.fromInt(1);else for(this.fromNumber(b,I),this.testBit(b-1)||this.bitwiseTo(q.ONE.shiftLeft(b-1),ce,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(v);)this.dAddOffset(2,0),this.bitLength()>b&&this.subTo(q.ONE.shiftLeft(b-1),this);else{var k=new Array,Q=7&b;k.length=1+(b>>3),v.nextBytes(k),Q>0?k[0]&=(1<<Q)-1:k[0]=0,this.fromString(k,256)}},q.prototype.bitwiseTo=function(b,v,I){var k,Q,te=Math.min(b.t,this.t);for(k=0;k<te;++k)I[k]=v(this[k],b[k]);if(b.t<this.t){for(Q=b.s&this.DM,k=te;k<this.t;++k)I[k]=v(this[k],Q);I.t=this.t}else{for(Q=this.s&this.DM,k=te;k<b.t;++k)I[k]=v(Q,b[k]);I.t=b.t}I.s=v(this.s,b.s),I.clamp()},q.prototype.changeBit=function(b,v){var I=q.ONE.shiftLeft(b);return this.bitwiseTo(I,v,I),I},q.prototype.addTo=function(b,v){for(var I=0,k=0,Q=Math.min(b.t,this.t);I<Q;)k+=this[I]+b[I],v[I++]=k&this.DM,k>>=this.DB;if(b.t<this.t){for(k+=b.s;I<this.t;)k+=this[I],v[I++]=k&this.DM,k>>=this.DB;k+=this.s}else{for(k+=this.s;I<b.t;)k+=b[I],v[I++]=k&this.DM,k>>=this.DB;k+=b.s}v.s=k<0?-1:0,k>0?v[I++]=k:k<-1&&(v[I++]=this.DV+k),v.t=I,v.clamp()},q.prototype.dMultiply=function(b){this[this.t]=this.am(0,b-1,this,0,0,this.t),++this.t,this.clamp()},q.prototype.dAddOffset=function(b,v){if(b!=0){for(;this.t<=v;)this[this.t++]=0;for(this[v]+=b;this[v]>=this.DV;)this[v]-=this.DV,++v>=this.t&&(this[this.t++]=0),++this[v]}},q.prototype.multiplyLowerTo=function(b,v,I){var k,Q=Math.min(this.t+b.t,v);for(I.s=0,I.t=Q;Q>0;)I[--Q]=0;for(k=I.t-this.t;Q<k;++Q)I[Q+this.t]=this.am(0,b[Q],I,Q,0,this.t);for(k=Math.min(b.t,v);Q<k;++Q)this.am(0,b[Q],I,Q,0,v-Q);I.clamp()},q.prototype.multiplyUpperTo=function(b,v,I){--v;var k=I.t=this.t+b.t-v;for(I.s=0;--k>=0;)I[k]=0;for(k=Math.max(v-this.t,0);k<b.t;++k)I[this.t+k-v]=this.am(v-k,b[k],I,0,0,this.t+k-v);I.clamp(),I.drShiftTo(1,I)},q.prototype.modInt=function(b){if(b<=0)return 0;var v=this.DV%b,I=this.s<0?b-1:0;if(this.t>0)if(v==0)I=this[0]%b;else for(var k=this.t-1;k>=0;--k)I=(v*I+this[k])%b;return I},q.prototype.millerRabin=function(b){var v=this.subtract(q.ONE),I=v.getLowestSetBit();if(I<=0)return!1;var k=v.shiftRight(I);(b=b+1>>1)>Oe.length&&(b=Oe.length);for(var Q=Y(),te=0;te<b;++te){Q.fromInt(Oe[Math.floor(Math.random()*Oe.length)]);var we=Q.modPow(k,this);if(we.compareTo(q.ONE)!=0&&we.compareTo(v)!=0){for(var ge=1;ge++<I&&we.compareTo(v)!=0;)if((we=we.modPowInt(2,this)).compareTo(q.ONE)==0)return!1;if(we.compareTo(v)!=0)return!1}}return!0},q.prototype.clone=function(){var b=Y();return this.copyTo(b),b},q.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},q.prototype.byteValue=function(){return this.t==0?this.s:this[0]<<24>>24},q.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},q.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},q.prototype.toByteArray=function(){var b=this.t,v=new Array;v[0]=this.s;var I,k=this.DB-b*this.DB%8,Q=0;if(b-- >0)for(k<this.DB&&(I=this[b]>>k)!=(this.s&this.DM)>>k&&(v[Q++]=I|this.s<<this.DB-k);b>=0;)k<8?(I=(this[b]&(1<<k)-1)<<8-k,I|=this[--b]>>(k+=this.DB-8)):(I=this[b]>>(k-=8)&255,k<=0&&(k+=this.DB,--b)),(128&I)!=0&&(I|=-256),Q==0&&(128&this.s)!=(128&I)&&++Q,(Q>0||I!=this.s)&&(v[Q++]=I);return v},q.prototype.equals=function(b){return this.compareTo(b)==0},q.prototype.min=function(b){return this.compareTo(b)<0?this:b},q.prototype.max=function(b){return this.compareTo(b)>0?this:b},q.prototype.and=function(b){var v=Y();return this.bitwiseTo(b,G,v),v},q.prototype.or=function(b){var v=Y();return this.bitwiseTo(b,ce,v),v},q.prototype.xor=function(b){var v=Y();return this.bitwiseTo(b,oe,v),v},q.prototype.andNot=function(b){var v=Y();return this.bitwiseTo(b,Fe,v),v},q.prototype.not=function(){for(var b=Y(),v=0;v<this.t;++v)b[v]=this.DM&~this[v];return b.t=this.t,b.s=~this.s,b},q.prototype.shiftLeft=function(b){var v=Y();return b<0?this.rShiftTo(-b,v):this.lShiftTo(b,v),v},q.prototype.shiftRight=function(b){var v=Y();return b<0?this.lShiftTo(-b,v):this.rShiftTo(b,v),v},q.prototype.getLowestSetBit=function(){for(var b=0;b<this.t;++b)if(this[b]!=0)return b*this.DB+Ue(this[b]);return this.s<0?this.t*this.DB:-1},q.prototype.bitCount=function(){for(var b=0,v=this.s&this.DM,I=0;I<this.t;++I)b+=Je(this[I]^v);return b},q.prototype.testBit=function(b){var v=Math.floor(b/this.DB);return v>=this.t?this.s!=0:(this[v]&1<<b%this.DB)!=0},q.prototype.setBit=function(b){return this.changeBit(b,ce)},q.prototype.clearBit=function(b){return this.changeBit(b,Fe)},q.prototype.flipBit=function(b){return this.changeBit(b,oe)},q.prototype.add=function(b){var v=Y();return this.addTo(b,v),v},q.prototype.subtract=function(b){var v=Y();return this.subTo(b,v),v},q.prototype.multiply=function(b){var v=Y();return this.multiplyTo(b,v),v},q.prototype.divide=function(b){var v=Y();return this.divRemTo(b,v,null),v},q.prototype.remainder=function(b){var v=Y();return this.divRemTo(b,null,v),v},q.prototype.divideAndRemainder=function(b){var v=Y(),I=Y();return this.divRemTo(b,v,I),new Array(v,I)},q.prototype.modPow=function(b,v){var I,k,Q=b.bitLength(),te=Ve(1);if(Q<=0)return te;I=Q<18?1:Q<48?3:Q<144?4:Q<768?5:6,k=Q<8?new De(v):v.isEven()?new fe(v):new $(v);var we=new Array,ge=3,be=I-1,_e=(1<<I)-1;if(we[1]=k.convert(this),I>1){var Re=Y();for(k.sqrTo(we[1],Re);ge<=_e;)we[ge]=Y(),k.mulTo(Re,we[ge-2],we[ge]),ge+=2}var Ce,Le,We=b.t-1,Xe=!0,et=Y();for(Q=pe(b[We])-1;We>=0;){for(Q>=be?Ce=b[We]>>Q-be&_e:(Ce=(b[We]&(1<<Q+1)-1)<<be-Q,We>0&&(Ce|=b[We-1]>>this.DB+Q-be)),ge=I;(1&Ce)==0;)Ce>>=1,--ge;if((Q-=ge)<0&&(Q+=this.DB,--We),Xe)we[Ce].copyTo(te),Xe=!1;else{for(;ge>1;)k.sqrTo(te,et),k.sqrTo(et,te),ge-=2;ge>0?k.sqrTo(te,et):(Le=te,te=et,et=Le),k.mulTo(et,we[Ce],te)}for(;We>=0&&(b[We]&1<<Q)==0;)k.sqrTo(te,et),Le=te,te=et,et=Le,--Q<0&&(Q=this.DB-1,--We)}return k.revert(te)},q.prototype.modInverse=function(b){var v=b.isEven();if(this.isEven()&&v||b.signum()==0)return q.ZERO;for(var I=b.clone(),k=this.clone(),Q=Ve(1),te=Ve(0),we=Ve(0),ge=Ve(1);I.signum()!=0;){for(;I.isEven();)I.rShiftTo(1,I),v?(Q.isEven()&&te.isEven()||(Q.addTo(this,Q),te.subTo(b,te)),Q.rShiftTo(1,Q)):te.isEven()||te.subTo(b,te),te.rShiftTo(1,te);for(;k.isEven();)k.rShiftTo(1,k),v?(we.isEven()&&ge.isEven()||(we.addTo(this,we),ge.subTo(b,ge)),we.rShiftTo(1,we)):ge.isEven()||ge.subTo(b,ge),ge.rShiftTo(1,ge);I.compareTo(k)>=0?(I.subTo(k,I),v&&Q.subTo(we,Q),te.subTo(ge,te)):(k.subTo(I,k),v&&we.subTo(Q,we),ge.subTo(te,ge))}return k.compareTo(q.ONE)!=0?q.ZERO:ge.compareTo(b)>=0?ge.subtract(b):ge.signum()<0?(ge.addTo(b,ge),ge.signum()<0?ge.add(b):ge):ge},q.prototype.pow=function(b){return this.exp(b,new He)},q.prototype.gcd=function(b){var v=this.s<0?this.negate():this.clone(),I=b.s<0?b.negate():b.clone();if(v.compareTo(I)<0){var k=v;v=I,I=k}var Q=v.getLowestSetBit(),te=I.getLowestSetBit();if(te<0)return v;for(Q<te&&(te=Q),te>0&&(v.rShiftTo(te,v),I.rShiftTo(te,I));v.signum()>0;)(Q=v.getLowestSetBit())>0&&v.rShiftTo(Q,v),(Q=I.getLowestSetBit())>0&&I.rShiftTo(Q,I),v.compareTo(I)>=0?(v.subTo(I,v),v.rShiftTo(1,v)):(I.subTo(v,I),I.rShiftTo(1,I));return te>0&&I.lShiftTo(te,I),I},q.prototype.isProbablePrime=function(b){var v,I=this.abs();if(I.t==1&&I[0]<=Oe[Oe.length-1]){for(v=0;v<Oe.length;++v)if(I[0]==Oe[v])return!0;return!1}if(I.isEven())return!1;for(v=1;v<Oe.length;){for(var k=Oe[v],Q=v+1;Q<Oe.length&&k<ie;)k*=Oe[Q++];for(k=I.modInt(k);v<Q;)if(k%Oe[v++]==0)return!1}return I.millerRabin(b)},q.prototype.square=function(){var b=Y();return this.squareTo(b),b},j.prototype.init=function(b){var v,I,k;for(v=0;v<256;++v)this.S[v]=v;for(I=0,v=0;v<256;++v)I=I+this.S[v]+b[v%b.length]&255,k=this.S[v],this.S[v]=this.S[I],this.S[I]=k;this.i=0,this.j=0},j.prototype.next=function(){var b;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,b=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=b,this.S[b+this.S[this.i]&255]};var N,L,V;function ee(){(function(b){L[V++]^=255&b,L[V++]^=b>>8&255,L[V++]^=b>>16&255,L[V++]^=b>>24&255,V>=256&&(V-=256)})(new Date().getTime())}if(L==null){var ae;if(L=new Array,V=0,x!==void 0&&(x.crypto!==void 0||x.msCrypto!==void 0)){var ve=x.crypto||x.msCrypto;if(ve.getRandomValues){var J=new Uint8Array(32);for(ve.getRandomValues(J),ae=0;ae<32;++ae)L[V++]=J[ae]}else if(F.appName=="Netscape"&&F.appVersion<"5"){var me=x.crypto.random(32);for(ae=0;ae<me.length;++ae)L[V++]=255&me.charCodeAt(ae)}}for(;V<256;)ae=Math.floor(65536*Math.random()),L[V++]=ae>>>8,L[V++]=255&ae;V=0,ee()}function xe(){if(N==null){for(ee(),(N=(function(){return new j})()).init(L),V=0;V<L.length;++V)L[V]=0;V=0}return N.next()}function de(){}function st(_,b){return new q(_,b)}function ft(_,b,v){for(var I="",k=0;I.length<b;)I+=v(String.fromCharCode.apply(String,_.concat([(4278190080&k)>>24,(16711680&k)>>16,(65280&k)>>8,255&k]))),k+=1;return I}function Ge(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function pt(_,b){this.x=b,this.q=_}function Z(_,b,v,I){this.curve=_,this.x=b,this.y=v,this.z=I??q.ONE,this.zinv=null}function P(_,b,v){this.q=_,this.a=this.fromBigInteger(b),this.b=this.fromBigInteger(v),this.infinity=new Z(this,null,null)}de.prototype.nextBytes=function(b){var v;for(v=0;v<b.length;++v)b[v]=xe()},Ge.prototype.doPublic=function(b){return b.modPowInt(this.e,this.n)},Ge.prototype.setPublic=function(b,v){if(this.isPublic=!0,this.isPrivate=!1,typeof b!="string")this.n=b,this.e=v;else{if(!(b!=null&&v!=null&&b.length>0&&v.length>0))throw"Invalid RSA public key";this.n=st(b,16),this.e=parseInt(v,16)}},Ge.prototype.encrypt=function(b){var v=(function(te,we){if(we<te.length+11)throw"Message too long for RSA";for(var ge=new Array,be=te.length-1;be>=0&&we>0;){var _e=te.charCodeAt(be--);_e<128?ge[--we]=_e:_e>127&&_e<2048?(ge[--we]=63&_e|128,ge[--we]=_e>>6|192):(ge[--we]=63&_e|128,ge[--we]=_e>>6&63|128,ge[--we]=_e>>12|224)}ge[--we]=0;for(var Re=new de,Ce=new Array;we>2;){for(Ce[0]=0;Ce[0]==0;)Re.nextBytes(Ce);ge[--we]=Ce[0]}return ge[--we]=2,ge[--we]=0,new q(ge)})(b,this.n.bitLength()+7>>3);if(v==null)return null;var I=this.doPublic(v);if(I==null)return null;var k=I.toString(16);return(1&k.length)==0?k:"0"+k},Ge.prototype.encryptOAEP=function(b,v,I){var k=(function(ge,be,_e,Re){var Ce=U.crypto.MessageDigest,Le=U.crypto.Util,We=null;if(_e||(_e="sha1"),typeof _e=="string"&&(We=Ce.getCanonicalAlgName(_e),Re=Ce.getHashLength(We),_e=function(ht){return dr(Le.hashHex(nr(ht),We))}),ge.length+2*Re+2>be)throw"Message too long for RSA";var Xe,et="";for(Xe=0;Xe<be-ge.length-2*Re-2;Xe+=1)et+="\0";var ne=_e("")+et+""+ge,Se=new Array(Re);new de().nextBytes(Se);var Ae=ft(Se,ne.length,_e),Ne=[];for(Xe=0;Xe<ne.length;Xe+=1)Ne[Xe]=ne.charCodeAt(Xe)^Ae.charCodeAt(Xe);var Qe=ft(Ne,Se.length,_e),nt=[0];for(Xe=0;Xe<Se.length;Xe+=1)nt[Xe+1]=Se[Xe]^Qe.charCodeAt(Xe);return new q(nt.concat(Ne))})(b,this.n.bitLength()+7>>3,v,I);if(k==null)return null;var Q=this.doPublic(k);if(Q==null)return null;var te=Q.toString(16);return(1&te.length)==0?te:"0"+te},Ge.prototype.type="RSA",pt.prototype.equals=function(b){return b==this||this.q.equals(b.q)&&this.x.equals(b.x)},pt.prototype.toBigInteger=function(){return this.x},pt.prototype.negate=function(){return new pt(this.q,this.x.negate().mod(this.q))},pt.prototype.add=function(b){return new pt(this.q,this.x.add(b.toBigInteger()).mod(this.q))},pt.prototype.subtract=function(b){return new pt(this.q,this.x.subtract(b.toBigInteger()).mod(this.q))},pt.prototype.multiply=function(b){return new pt(this.q,this.x.multiply(b.toBigInteger()).mod(this.q))},pt.prototype.square=function(){return new pt(this.q,this.x.square().mod(this.q))},pt.prototype.divide=function(b){return new pt(this.q,this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q))},Z.prototype.getX=function(){return this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))},Z.prototype.getY=function(){return this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))},Z.prototype.equals=function(b){return b==this||(this.isInfinity()?b.isInfinity():b.isInfinity()?this.isInfinity():!!b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q).equals(q.ZERO)&&b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q).equals(q.ZERO))},Z.prototype.isInfinity=function(){return this.x==null&&this.y==null||this.z.equals(q.ZERO)&&!this.y.toBigInteger().equals(q.ZERO)},Z.prototype.negate=function(){return new Z(this.curve,this.x,this.y.negate(),this.z)},Z.prototype.add=function(b){if(this.isInfinity())return b;if(b.isInfinity())return this;var v=b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q),I=b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q);if(q.ZERO.equals(I))return q.ZERO.equals(v)?this.twice():this.curve.getInfinity();var k=new q("3"),Q=this.x.toBigInteger(),te=this.y.toBigInteger(),we=(b.x.toBigInteger(),b.y.toBigInteger(),I.square()),ge=we.multiply(I),be=Q.multiply(we),_e=v.square().multiply(this.z),Re=_e.subtract(be.shiftLeft(1)).multiply(b.z).subtract(ge).multiply(I).mod(this.curve.q),Ce=be.multiply(k).multiply(v).subtract(te.multiply(ge)).subtract(_e.multiply(v)).multiply(b.z).add(v.multiply(ge)).mod(this.curve.q),Le=ge.multiply(this.z).multiply(b.z).mod(this.curve.q);return new Z(this.curve,this.curve.fromBigInteger(Re),this.curve.fromBigInteger(Ce),Le)},Z.prototype.twice=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var b=new q("3"),v=this.x.toBigInteger(),I=this.y.toBigInteger(),k=I.multiply(this.z),Q=k.multiply(I).mod(this.curve.q),te=this.curve.a.toBigInteger(),we=v.square().multiply(b);q.ZERO.equals(te)||(we=we.add(this.z.square().multiply(te)));var ge=(we=we.mod(this.curve.q)).square().subtract(v.shiftLeft(3).multiply(Q)).shiftLeft(1).multiply(k).mod(this.curve.q),be=we.multiply(b).multiply(v).subtract(Q.shiftLeft(1)).shiftLeft(2).multiply(Q).subtract(we.square().multiply(we)).mod(this.curve.q),_e=k.square().multiply(k).shiftLeft(3).mod(this.curve.q);return new Z(this.curve,this.curve.fromBigInteger(ge),this.curve.fromBigInteger(be),_e)},Z.prototype.multiply=function(b){if(this.isInfinity())return this;if(b.signum()==0)return this.curve.getInfinity();var v,I=b,k=I.multiply(new q("3")),Q=this.negate(),te=this,we=this.curve.q.subtract(b),ge=we.multiply(new q("3")),be=new Z(this.curve,this.x,this.y),_e=be.negate();for(v=k.bitLength()-2;v>0;--v){te=te.twice();var Re=k.testBit(v);Re!=I.testBit(v)&&(te=te.add(Re?this:Q))}for(v=ge.bitLength()-2;v>0;--v){be=be.twice();var Ce=ge.testBit(v);Ce!=we.testBit(v)&&(be=be.add(Ce?be:_e))}return te},Z.prototype.multiplyTwo=function(b,v,I){var k;k=b.bitLength()>I.bitLength()?b.bitLength()-1:I.bitLength()-1;for(var Q=this.curve.getInfinity(),te=this.add(v);k>=0;)Q=Q.twice(),b.testBit(k)?Q=I.testBit(k)?Q.add(te):Q.add(this):I.testBit(k)&&(Q=Q.add(v)),--k;return Q},P.prototype.getQ=function(){return this.q},P.prototype.getA=function(){return this.a},P.prototype.getB=function(){return this.b},P.prototype.equals=function(b){return b==this||this.q.equals(b.q)&&this.a.equals(b.a)&&this.b.equals(b.b)},P.prototype.getInfinity=function(){return this.infinity},P.prototype.fromBigInteger=function(b){return new pt(this.q,b)},P.prototype.decodePointHex=function(b){switch(parseInt(b.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var v=(b.length-2)/2,I=b.substr(2,v),k=b.substr(v+2,v);return new Z(this,this.fromBigInteger(new q(I,16)),this.fromBigInteger(new q(k,16)));default:return null}},pt.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},Z.prototype.getEncoded=function(_){var b=function(te,we){var ge=te.toByteArrayUnsigned();if(we<ge.length)ge=ge.slice(ge.length-we);else for(;we>ge.length;)ge.unshift(0);return ge},v=this.getX().toBigInteger(),I=this.getY().toBigInteger(),k=b(v,32);return _?I.isEven()?k.unshift(2):k.unshift(3):(k.unshift(4),k=k.concat(b(I,32))),k},Z.decodeFrom=function(_,b){b[0];var v=b.length-1,I=b.slice(1,1+v/2),k=b.slice(1+v/2,1+v);I.unshift(0),k.unshift(0);var Q=new q(I),te=new q(k);return new Z(_,_.fromBigInteger(Q),_.fromBigInteger(te))},Z.decodeFromHex=function(_,b){b.substr(0,2);var v=b.length-2,I=b.substr(2,v/2),k=b.substr(2+v/2,v/2),Q=new q(I,16),te=new q(k,16);return new Z(_,_.fromBigInteger(Q),_.fromBigInteger(te))},Z.prototype.add2D=function(_){if(this.isInfinity())return _;if(_.isInfinity())return this;if(this.x.equals(_.x))return this.y.equals(_.y)?this.twice():this.curve.getInfinity();var b=_.x.subtract(this.x),v=_.y.subtract(this.y).divide(b),I=v.square().subtract(this.x).subtract(_.x),k=v.multiply(this.x.subtract(I)).subtract(this.y);return new Z(this.curve,I,k)},Z.prototype.twice2D=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var _=this.curve.fromBigInteger(q.valueOf(2)),b=this.curve.fromBigInteger(q.valueOf(3)),v=this.x.square().multiply(b).add(this.curve.a).divide(this.y.multiply(_)),I=v.square().subtract(this.x.multiply(_)),k=v.multiply(this.x.subtract(I)).subtract(this.y);return new Z(this.curve,I,k)},Z.prototype.multiply2D=function(_){if(this.isInfinity())return this;if(_.signum()==0)return this.curve.getInfinity();var b,v=_,I=v.multiply(new q("3")),k=this.negate(),Q=this;for(b=I.bitLength()-2;b>0;--b){Q=Q.twice();var te=I.testBit(b);te!=v.testBit(b)&&(Q=Q.add2D(te?this:k))}return Q},Z.prototype.isOnCurve=function(){var _=this.getX().toBigInteger(),b=this.getY().toBigInteger(),v=this.curve.getA().toBigInteger(),I=this.curve.getB().toBigInteger(),k=this.curve.getQ(),Q=b.multiply(b).mod(k),te=_.multiply(_).multiply(_).add(v.multiply(_)).add(I).mod(k);return Q.equals(te)},Z.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},Z.prototype.validate=function(){var _=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var b=this.getX().toBigInteger(),v=this.getY().toBigInteger();if(b.compareTo(q.ONE)<0||b.compareTo(_.subtract(q.ONE))>0)throw new Error("x coordinate out of bounds");if(v.compareTo(q.ONE)<0||v.compareTo(_.subtract(q.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(_).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0};var B=(function(){var _=new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),b=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),v={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:`
13
13
  `,r:"\r",t:" "};function I(te,we,ge){return we?v[we]:String.fromCharCode(parseInt(ge,16))}var k=new String(""),Q=Object.hasOwnProperty;return function(te,we){var ge,be,_e=te.match(_),Re=_e[0],Ce=!1;Re==="{"?ge={}:Re==="["?ge=[]:(ge=[],Ce=!0);for(var Le=[ge],We=1-Ce,Xe=_e.length;We<Xe;++We){var et;switch((Re=_e[We]).charCodeAt(0)){default:(et=Le[0])[be||et.length]=+Re,be=void 0;break;case 34:if((Re=Re.substring(1,Re.length-1)).indexOf("\\")!==-1&&(Re=Re.replace(b,I)),et=Le[0],!be){if(!(et instanceof Array)){be=Re||k;break}be=et.length}et[be]=Re,be=void 0;break;case 91:et=Le[0],Le.unshift(et[be||et.length]=[]),be=void 0;break;case 93:Le.shift();break;case 102:(et=Le[0])[be||et.length]=!1,be=void 0;break;case 110:(et=Le[0])[be||et.length]=null,be=void 0;break;case 116:(et=Le[0])[be||et.length]=!0,be=void 0;break;case 123:et=Le[0],Le.unshift(et[be||et.length]={}),be=void 0;break;case 125:Le.shift()}}if(Ce){if(Le.length!==1)throw new Error;ge=ge[0]}else if(Le.length)throw new Error;return we&&(ge=(function ne(Se,Ae){var Ne=Se[Ae];if(Ne&&(Ne===void 0?"undefined":A(Ne))==="object"){var Qe=null;for(var nt in Ne)if(Q.call(Ne,nt)&&Ne!==Se){var bt=ne(Ne,nt);bt!==void 0?Ne[nt]=bt:(Qe||(Qe=[]),Qe.push(nt))}if(Qe)for(var ht=Qe.length;--ht>=0;)delete Ne[Qe[ht]]}return we.call(Se,Ae,Ne)})({"":ge},"")),ge}})();U!==void 0&&U||(n.KJUR=U={}),U.asn1!==void 0&&U.asn1||(U.asn1={}),U.asn1.ASN1Util=new function(){this.integerToByteHex=function(_){var b=_.toString(16);return b.length%2==1&&(b="0"+b),b},this.bigIntToMinTwosComplementsHex=function(_){var b=_.toString(16);if(b.substr(0,1)!="-")b.length%2==1?b="0"+b:b.match(/^[0-7]/)||(b="00"+b);else{var v=b.substr(1).length;v%2==1?v+=1:b.match(/^[0-7]/)||(v+=2);for(var I="",k=0;k<v;k++)I+="f";b=new q(I,16).xor(_).add(q.ONE).toString(16).replace(/^-/,"")}return b},this.getPEMStringFromHex=function(_,b){return Be(_,b)},this.newObject=function(_){var b=U.asn1,v=b.ASN1Object,I=b.DERBoolean,k=b.DERInteger,Q=b.DERBitString,te=b.DEROctetString,we=b.DERNull,ge=b.DERObjectIdentifier,be=b.DEREnumerated,_e=b.DERUTF8String,Re=b.DERNumericString,Ce=b.DERPrintableString,Le=b.DERTeletexString,We=b.DERIA5String,Xe=b.DERUTCTime,et=b.DERGeneralizedTime,ne=b.DERVisibleString,Se=b.DERBMPString,Ae=b.DERSequence,Ne=b.DERSet,Qe=b.DERTaggedObject,nt=b.ASN1Util.newObject;if(_ instanceof b.ASN1Object)return _;var bt=Object.keys(_);if(bt.length!=1)throw new Error("key of param shall be only one.");var ht=bt[0];if(":asn1:bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:visstr:bmpstr:seq:set:tag:".indexOf(":"+ht+":")==-1)throw new Error("undefined key: "+ht);if(ht=="bool")return new I(_[ht]);if(ht=="int")return new k(_[ht]);if(ht=="bitstr")return new Q(_[ht]);if(ht=="octstr")return new te(_[ht]);if(ht=="null")return new we(_[ht]);if(ht=="oid")return new ge(_[ht]);if(ht=="enum")return new be(_[ht]);if(ht=="utf8str")return new _e(_[ht]);if(ht=="numstr")return new Re(_[ht]);if(ht=="prnstr")return new Ce(_[ht]);if(ht=="telstr")return new Le(_[ht]);if(ht=="ia5str")return new We(_[ht]);if(ht=="utctime")return new Xe(_[ht]);if(ht=="gentime")return new et(_[ht]);if(ht=="visstr")return new ne(_[ht]);if(ht=="bmpstr")return new Se(_[ht]);if(ht=="asn1")return new v(_[ht]);if(ht=="seq"){for(var Ct=_[ht],yt=[],wt=0;wt<Ct.length;wt++){var Jt=nt(Ct[wt]);yt.push(Jt)}return new Ae({array:yt})}if(ht=="set"){for(Ct=_[ht],yt=[],wt=0;wt<Ct.length;wt++)Jt=nt(Ct[wt]),yt.push(Jt);return new Ne({array:yt})}if(ht=="tag"){var Qt=_[ht];if(Object.prototype.toString.call(Qt)==="[object Array]"&&Qt.length==3){var Mt=nt(Qt[2]);return new Qe({tag:Qt[0],explicit:Qt[1],obj:Mt})}return new Qe(Qt)}},this.jsonToASN1HEX=function(_){return this.newObject(_).getEncodedHex()}},U.asn1.ASN1Util.oidHexToInt=function(_){for(var b="",v=parseInt(_.substr(0,2),16),I=(b=Math.floor(v/40)+"."+v%40,""),k=2;k<_.length;k+=2){var Q=("00000000"+parseInt(_.substr(k,2),16).toString(2)).slice(-8);I+=Q.substr(1,7),Q.substr(0,1)=="0"&&(b=b+"."+new q(I,2).toString(10),I="")}return b},U.asn1.ASN1Util.oidIntToHex=function(_){var b=function(ge){var be=ge.toString(16);return be.length==1&&(be="0"+be),be},v=function(ge){var be="",_e=new q(ge,10).toString(2),Re=7-_e.length%7;Re==7&&(Re=0);for(var Ce="",Le=0;Le<Re;Le++)Ce+="0";for(_e=Ce+_e,Le=0;Le<_e.length-1;Le+=7){var We=_e.substr(Le,7);Le!=_e.length-7&&(We="1"+We),be+=b(parseInt(We,2))}return be};if(!_.match(/^[0-9.]+$/))throw"malformed oid string: "+_;var I="",k=_.split("."),Q=40*parseInt(k[0])+parseInt(k[1]);I+=b(Q),k.splice(0,2);for(var te=0;te<k.length;te++)I+=v(k[te]);return I},U.asn1.ASN1Object=function(_){this.params=null,this.getLengthHexFromValue=function(){if(this.hV===void 0||this.hV==null)throw new Error("this.hV is null or undefined");if(this.hV.length%2==1)throw new Error("value hex must be even length: n=0,v="+this.hV);var b=this.hV.length/2,v=b.toString(16);if(v.length%2==1&&(v="0"+v),b<128)return v;var I=v.length/2;if(I>15)throw"ASN.1 length too long to represent by 8x: n = "+b.toString(16);return(128+I).toString(16)+v},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""},this.setByParam=function(b){this.params=b},_!=null&&_.tlv!=null&&(this.hTLV=_.tlv,this.isModified=!1)},U.asn1.DERAbstractString=function(_){U.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(b){this.hTLV=null,this.isModified=!0,this.s=b,this.hV=vr(this.s).toLowerCase()},this.setStringHex=function(b){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=b},this.getFreshValueHex=function(){return this.hV},_!==void 0&&(typeof _=="string"?this.setString(_):_.str!==void 0?this.setString(_.str):_.hex!==void 0&&this.setStringHex(_.hex))},Lt(U.asn1.DERAbstractString,U.asn1.ASN1Object),U.asn1.DERAbstractTime=function(_){U.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(b){var v=b.getTime()+6e4*b.getTimezoneOffset();return new Date(v)},this.formatDate=function(b,v,I){var k=this.zeroPadding,Q=this.localDateToUTC(b),te=String(Q.getFullYear());v=="utc"&&(te=te.substr(2,2));var we=te+k(String(Q.getMonth()+1),2)+k(String(Q.getDate()),2)+k(String(Q.getHours()),2)+k(String(Q.getMinutes()),2)+k(String(Q.getSeconds()),2);if(I===!0){var ge=Q.getMilliseconds();if(ge!=0){var be=k(String(ge),3);we=we+"."+(be=be.replace(/[0]+$/,""))}}return we+"Z"},this.zeroPadding=function(b,v){return b.length>=v?b:new Array(v-b.length+1).join("0")+b},this.getString=function(){return this.s},this.setString=function(b){this.hTLV=null,this.isModified=!0,this.s=b,this.hV=kt(b)},this.setByDateValue=function(b,v,I,k,Q,te){var we=new Date(Date.UTC(b,v-1,I,k,Q,te,0));this.setByDate(we)},this.getFreshValueHex=function(){return this.hV}},Lt(U.asn1.DERAbstractTime,U.asn1.ASN1Object),U.asn1.DERAbstractStructured=function(_){U.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(b){this.hTLV=null,this.isModified=!0,this.asn1Array=b},this.appendASN1Object=function(b){this.hTLV=null,this.isModified=!0,this.asn1Array.push(b)},this.asn1Array=new Array,_!==void 0&&_.array!==void 0&&(this.asn1Array=_.array)},Lt(U.asn1.DERAbstractStructured,U.asn1.ASN1Object),U.asn1.DERBoolean=function(_){U.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV=_==0?"010100":"0101ff"},Lt(U.asn1.DERBoolean,U.asn1.ASN1Object),U.asn1.DERInteger=function(_){U.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(b){this.hTLV=null,this.isModified=!0,this.hV=U.asn1.ASN1Util.bigIntToMinTwosComplementsHex(b)},this.setByInteger=function(b){var v=new q(String(b),10);this.setByBigInteger(v)},this.setValueHex=function(b){this.hV=b},this.getFreshValueHex=function(){return this.hV},_!==void 0&&(_.bigint!==void 0?this.setByBigInteger(_.bigint):_.int!==void 0?this.setByInteger(_.int):typeof _=="number"?this.setByInteger(_):_.hex!==void 0&&this.setValueHex(_.hex))},Lt(U.asn1.DERInteger,U.asn1.ASN1Object),U.asn1.DERBitString=function(_){if(_!==void 0&&_.obj!==void 0){var b=U.asn1.ASN1Util.newObject(_.obj);_.hex="00"+b.getEncodedHex()}U.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(v){this.hTLV=null,this.isModified=!0,this.hV=v},this.setUnusedBitsAndHexValue=function(v,I){if(v<0||7<v)throw"unused bits shall be from 0 to 7: u = "+v;var k="0"+v;this.hTLV=null,this.isModified=!0,this.hV=k+I},this.setByBinaryString=function(v){var I=8-(v=v.replace(/0+$/,"")).length%8;I==8&&(I=0);for(var k=0;k<=I;k++)v+="0";var Q="";for(k=0;k<v.length-1;k+=8){var te=v.substr(k,8),we=parseInt(te,2).toString(16);we.length==1&&(we="0"+we),Q+=we}this.hTLV=null,this.isModified=!0,this.hV="0"+I+Q},this.setByBooleanArray=function(v){for(var I="",k=0;k<v.length;k++)v[k]==1?I+="1":I+="0";this.setByBinaryString(I)},this.newFalseArray=function(v){for(var I=new Array(v),k=0;k<v;k++)I[k]=!1;return I},this.getFreshValueHex=function(){return this.hV},_!==void 0&&(typeof _=="string"&&_.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(_):_.hex!==void 0?this.setHexValueIncludingUnusedBits(_.hex):_.bin!==void 0?this.setByBinaryString(_.bin):_.array!==void 0&&this.setByBooleanArray(_.array))},Lt(U.asn1.DERBitString,U.asn1.ASN1Object),U.asn1.DEROctetString=function(_){if(_!==void 0&&_.obj!==void 0){var b=U.asn1.ASN1Util.newObject(_.obj);_.hex=b.getEncodedHex()}U.asn1.DEROctetString.superclass.constructor.call(this,_),this.hT="04"},Lt(U.asn1.DEROctetString,U.asn1.DERAbstractString),U.asn1.DERNull=function(){U.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},Lt(U.asn1.DERNull,U.asn1.ASN1Object),U.asn1.DERObjectIdentifier=function(_){U.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(b){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=b},this.setValueOidString=function(b){var v=(function(k){var Q=function(Ce){var Le=Ce.toString(16);return Le.length==1&&(Le="0"+Le),Le},te=function(Ce){var Le="",We=parseInt(Ce,10).toString(2),Xe=7-We.length%7;Xe==7&&(Xe=0);for(var et="",ne=0;ne<Xe;ne++)et+="0";for(We=et+We,ne=0;ne<We.length-1;ne+=7){var Se=We.substr(ne,7);ne!=We.length-7&&(Se="1"+Se),Le+=Q(parseInt(Se,2))}return Le};try{if(!k.match(/^[0-9.]+$/))return null;var we="",ge=k.split("."),be=40*parseInt(ge[0],10)+parseInt(ge[1],10);we+=Q(be),ge.splice(0,2);for(var _e=0;_e<ge.length;_e++)we+=te(ge[_e]);return we}catch{return null}})(b);if(v==null)throw new Error("malformed oid string: "+b);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=v},this.setValueName=function(b){var v=U.asn1.x509.OID.name2oid(b);if(v==="")throw new Error("DERObjectIdentifier oidName undefined: "+b);this.setValueOidString(v)},this.setValueNameOrOid=function(b){b.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(b):this.setValueName(b)},this.getFreshValueHex=function(){return this.hV},this.setByParam=function(b){typeof b=="string"?this.setValueNameOrOid(b):b.oid!==void 0?this.setValueNameOrOid(b.oid):b.name!==void 0?this.setValueNameOrOid(b.name):b.hex!==void 0&&this.setValueHex(b.hex)},_!==void 0&&this.setByParam(_)},Lt(U.asn1.DERObjectIdentifier,U.asn1.ASN1Object),U.asn1.DEREnumerated=function(_){U.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(b){this.hTLV=null,this.isModified=!0,this.hV=U.asn1.ASN1Util.bigIntToMinTwosComplementsHex(b)},this.setByInteger=function(b){var v=new q(String(b),10);this.setByBigInteger(v)},this.setValueHex=function(b){this.hV=b},this.getFreshValueHex=function(){return this.hV},_!==void 0&&(_.int!==void 0?this.setByInteger(_.int):typeof _=="number"?this.setByInteger(_):_.hex!==void 0&&this.setValueHex(_.hex))},Lt(U.asn1.DEREnumerated,U.asn1.ASN1Object),U.asn1.DERUTF8String=function(_){U.asn1.DERUTF8String.superclass.constructor.call(this,_),this.hT="0c"},Lt(U.asn1.DERUTF8String,U.asn1.DERAbstractString),U.asn1.DERNumericString=function(_){U.asn1.DERNumericString.superclass.constructor.call(this,_),this.hT="12"},Lt(U.asn1.DERNumericString,U.asn1.DERAbstractString),U.asn1.DERPrintableString=function(_){U.asn1.DERPrintableString.superclass.constructor.call(this,_),this.hT="13"},Lt(U.asn1.DERPrintableString,U.asn1.DERAbstractString),U.asn1.DERTeletexString=function(_){U.asn1.DERTeletexString.superclass.constructor.call(this,_),this.hT="14"},Lt(U.asn1.DERTeletexString,U.asn1.DERAbstractString),U.asn1.DERIA5String=function(_){U.asn1.DERIA5String.superclass.constructor.call(this,_),this.hT="16"},Lt(U.asn1.DERIA5String,U.asn1.DERAbstractString),U.asn1.DERVisibleString=function(_){U.asn1.DERIA5String.superclass.constructor.call(this,_),this.hT="1a"},Lt(U.asn1.DERVisibleString,U.asn1.DERAbstractString),U.asn1.DERBMPString=function(_){U.asn1.DERBMPString.superclass.constructor.call(this,_),this.hT="1e"},Lt(U.asn1.DERBMPString,U.asn1.DERAbstractString),U.asn1.DERUTCTime=function(_){U.asn1.DERUTCTime.superclass.constructor.call(this,_),this.hT="17",this.setByDate=function(b){this.hTLV=null,this.isModified=!0,this.date=b,this.s=this.formatDate(this.date,"utc"),this.hV=kt(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=kt(this.s)),this.hV},_!==void 0&&(_.str!==void 0?this.setString(_.str):typeof _=="string"&&_.match(/^[0-9]{12}Z$/)?this.setString(_):_.hex!==void 0?this.setStringHex(_.hex):_.date!==void 0&&this.setByDate(_.date))},Lt(U.asn1.DERUTCTime,U.asn1.DERAbstractTime),U.asn1.DERGeneralizedTime=function(_){U.asn1.DERGeneralizedTime.superclass.constructor.call(this,_),this.hT="18",this.withMillis=!1,this.setByDate=function(b){this.hTLV=null,this.isModified=!0,this.date=b,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=kt(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=kt(this.s)),this.hV},_!==void 0&&(_.str!==void 0?this.setString(_.str):typeof _=="string"&&_.match(/^[0-9]{14}Z$/)?this.setString(_):_.hex!==void 0?this.setStringHex(_.hex):_.date!==void 0&&this.setByDate(_.date),_.millis===!0&&(this.withMillis=!0))},Lt(U.asn1.DERGeneralizedTime,U.asn1.DERAbstractTime),U.asn1.DERSequence=function(_){U.asn1.DERSequence.superclass.constructor.call(this,_),this.hT="30",this.getFreshValueHex=function(){for(var b="",v=0;v<this.asn1Array.length;v++)b+=this.asn1Array[v].getEncodedHex();return this.hV=b,this.hV}},Lt(U.asn1.DERSequence,U.asn1.DERAbstractStructured),U.asn1.DERSet=function(_){U.asn1.DERSet.superclass.constructor.call(this,_),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var b=new Array,v=0;v<this.asn1Array.length;v++){var I=this.asn1Array[v];b.push(I.getEncodedHex())}return this.sortFlag==1&&b.sort(),this.hV=b.join(""),this.hV},_!==void 0&&_.sortflag!==void 0&&_.sortflag==0&&(this.sortFlag=!1)},Lt(U.asn1.DERSet,U.asn1.DERAbstractStructured),U.asn1.DERTaggedObject=function(_){U.asn1.DERTaggedObject.superclass.constructor.call(this);var b=U.asn1;this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(v,I,k){this.hT=I,this.isExplicit=v,this.asn1Object=k,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=k.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,I),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},this.setByParam=function(v){v.tag!=null&&(this.hT=v.tag),v.explicit!=null&&(this.isExplicit=v.explicit),v.tage!=null&&(this.hT=v.tage,this.isExplicit=!0),v.tagi!=null&&(this.hT=v.tagi,this.isExplicit=!1),v.obj!=null&&(v.obj instanceof b.ASN1Object?(this.asn1Object=v.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)):A(v.obj)=="object"&&(this.asn1Object=b.ASN1Util.newObject(v.obj),this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},_!=null&&this.setByParam(_)},Lt(U.asn1.DERTaggedObject,U.asn1.ASN1Object);var U,Ie,Me,Pe=new function(){};function gt(_){for(var b=new Array,v=0;v<_.length;v++)b[v]=_.charCodeAt(v);return b}function _t(_){for(var b="",v=0;v<_.length;v++)b+=String.fromCharCode(_[v]);return b}function Tt(_){for(var b="",v=0;v<_.length;v++){var I=_[v].toString(16);I.length==1&&(I="0"+I),b+=I}return b}function kt(_){return Tt(gt(_))}function Ft(_){return _=(_=(_=_.replace(/\=/g,"")).replace(/\+/g,"-")).replace(/\//g,"_")}function sn(_){return _.length%4==2?_+="==":_.length%4==3&&(_+="="),_=(_=_.replace(/-/g,"+")).replace(/_/g,"/")}function Yt(_){return _.length%2==1&&(_="0"+_),Ft(z(_))}function Dt(_){return X(sn(_))}function vr(_){return Ht(qt(_))}function Bt(_){return decodeURIComponent(on(_))}function dr(_){for(var b="",v=0;v<_.length-1;v+=2)b+=String.fromCharCode(parseInt(_.substr(v,2),16));return b}function nr(_){for(var b="",v=0;v<_.length;v++)b+=("0"+_.charCodeAt(v).toString(16)).slice(-2);return b}function Vr(_){return z(_)}function M(_){var b=Vr(_).replace(/(.{64})/g,`$1\r
14
14
  `);return b=b.replace(/\r\n$/,"")}function H(_){return X(_.replace(/[^0-9A-Za-z\/+=]*/g,""))}function Be(_,b){return"-----BEGIN "+b+`-----\r
15
15
  `+M(_)+`\r
@@ -302,4 +302,4 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
302
302
  SELECT ?resource WHERE {
303
303
  <${t}> ldp:contains ?resource .
304
304
  }
305
- `,prefixes:{ldp:"http://www.w3.org/ns/ldp#"}},a=await this.sparqlExecutor.queryContainer(t,s);for(const u of a){const c=u.resource;if(c){const h=hasStringValue(c)?c.value:String(c);n.push(h)}}}catch(s){console.warn("[listContainerResources] SPARQL query failed:",s)}return n}}_a=entityKind;PodDialect[_a]="PodDialect";function drizzle(i,e){if(!i||!i.info.isLoggedIn)throw new Error("需要有效的已认证Session");const t={session:i,preferredChannels:e?.notifications?.preferredChannels,createQueryEngine:e?.sparql?.createQueryEngine,disableInteropDiscovery:e?.disableInteropDiscovery,podUrl:e?.podUrl??i.info.podUrl,resourcePreparation:e?.resourcePreparation,storageTTL:e?.storageTTL,debug:e?.debug??e?.logger},n=new PodDialect(t);e?.schema&&n.setSchema(e.schema);const s=new PodAsyncSession(n);return new PodDatabase(n,s,e?.schema)}const SOLID_STORAGE_KEYS=new Set(["solid:storage","http://www.w3.org/ns/solid/terms#storage","pim:storage","http://www.w3.org/ns/pim/space#storage"]);async function fetchProfileStorageUrls(i,e){const t=await i(e,{headers:{Accept:"text/turtle, application/ld+json, application/json"},credentials:"include"}).catch(()=>{});if(!t?.ok)return[];const n=t.headers?.get?.("content-type")??"",s=await t.text().catch(()=>"");if(!s)return[];if(n.includes("json"))try{return uniqueNormalizedStorageUrls(extractStorageUrlsFromJson(JSON.parse(s)))}catch{return[]}return uniqueNormalizedStorageUrls(extractStorageUrlsFromTurtle(s))}function extractStorageUrlsFromTurtle(i){return Array.from(i.matchAll(/(?:solid:storage|pim:storage|<http:\/\/www\.w3\.org\/ns\/solid\/terms#storage>|<http:\/\/www\.w3\.org\/ns\/pim\/space#storage>)\s+<([^>]+)>/giu)).map(e=>e[1]).filter(e=>typeof e=="string"&&e.length>0)}function extractStorageUrlsFromJson(i){const e=new Set,t=new WeakSet,n=(s,a=!1)=>{if(typeof s=="string"){a&&e.add(s);return}if(!(!s||typeof s!="object")&&!t.has(s)){if(t.add(s),Array.isArray(s)){for(const u of s)n(u,a);return}for(const[u,c]of Object.entries(s)){const h=SOLID_STORAGE_KEYS.has(u);if(a&&u==="@id"){n(c,!0);continue}n(c,a||h)}}};return n(i),Array.from(e)}function normalizeStorageUrl(i){try{return ensureTrailingSlash(new URL(i).toString())}catch{return}}function uniqueNormalizedStorageUrls(i){const e=new Set;for(const t of i){const n=normalizeStorageUrl(t);n&&e.add(n)}return Array.from(e)}function ensureTrailingSlash(i){return i.replace(/\/+$/u,"")+"/"}const XPOD_LAST_OIDC_ISSUER_STORAGE_KEY="xpod.solid.lastOidcIssuer",XpodSolidRuntimeContext=reactExports.createContext(null),initializedRuntimes=new WeakSet;function snapshotToState(i,e,t){return i.status==="initializing"?{status:"loading",issuer:t}:i.status==="anonymous"?{status:"anonymous",issuer:t}:i.status==="error"?{status:"error",webId:i.webId,error:i.error,podUrl:e?.podUrl,issuer:t}:{status:"authenticated",webId:i.webId,podUrl:e?.podUrl,issuer:t}}async function discoverPodUrlFromWebId({webId:i,fetch:e}){const n=(await fetchProfileStorageUrls(e,i))[0];if(!n)throw new Error("WebID profile does not declare a Solid storage URL");return ensureTrailingSlash(new URL(n).toString())}function createXpodSolidRuntimeValue(i={}){const e=i.sessionFactory?.()??new Session;let t=readIssuerFromSessionInfo(e.info)??readStoredOidcIssuer();const n=createSolidSessionRuntime({session:e}),s={get info(){return e.info},fetch:e.fetch},a=createPodRuntime({adapter:{discoverPod:({webId:u,fetch:c})=>discoverPodUrlFromWebId({webId:u,fetch:c}),openDatabase:({podUrl:u})=>drizzle(s,{podUrl:u,resourcePreparation:"off"}),hydrateCollections:()=>{}}});return{session:n,pod:a,getIssuer:()=>readIssuerFromSessionInfo(e.info)??t??readStoredOidcIssuer(),setIssuer:u=>{const c=normalizeXpodOidcIssuer(u);t=c,c&&writeStoredOidcIssuer(c)}}}let defaultRuntime;function getXpodSolidRuntimeValue(){return defaultRuntime??=createXpodSolidRuntimeValue(),defaultRuntime}function safeAuthError(i){return i.message==="Solid session expired"?i:new Error("Solid login failed. Please reconnect your Pod.")}function useXpodSolidRuntimeContext(){const i=reactExports.useContext(XpodSolidRuntimeContext);if(!i)throw new Error("useXpodSolidRuntime must be used within XpodSolidRuntimeProvider");return i}function readIssuerFromSessionInfo(i){const e=i.issuer??i.oidcIssuer;return normalizeXpodOidcIssuer(e)}function normalizeXpodOidcIssuer(i){if(!(typeof i!="string"||!i.trim()))try{const e=new URL(i.trim());return e.protocol!=="https:"&&e.protocol!=="http:"||e.username||e.password||e.search||e.hash?void 0:e.toString()}catch{return}}function readStoredOidcIssuer(){try{return normalizeXpodOidcIssuer(globalThis.window?.sessionStorage.getItem(XPOD_LAST_OIDC_ISSUER_STORAGE_KEY))}catch{return}}function writeStoredOidcIssuer(i){try{globalThis.window?.sessionStorage.setItem(XPOD_LAST_OIDC_ISSUER_STORAGE_KEY,i)}catch{}}const useXpodSolidRuntime=useXpodSolidRuntimeContext;function SettingsAuthBoundary({children:i,product:e="Settings"}){const t=useXpodSolidRuntime(),n=t.state.status==="loading"?{status:"loading"}:t.state.status==="authenticated"?{status:"authenticated"}:t.state.status==="error"?{status:"error",message:t.state.error.message}:{status:"anonymous"};return jsxRuntimeExports.jsx(AuthBoundary,{state:n,login:t.login,loginView:{title:`Connect Xpod ${e}`,description:e==="Dashboard"?"Use your Solid identity to inspect Xpod status, runtime, logs, RDF, network, and usage.":"Use your Solid identity to manage model, Pod, network, and service settings.",defaultIssuer:window.location.origin},children:i})}const LogsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-tOBaUnM1.js"),__vite__mapDeps([0,1,2,3,4])).then(i=>({default:i.LogsPage}))),RdfPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-tOBaUnM1.js"),__vite__mapDeps([0,1,2,3,4])).then(i=>({default:i.RdfPage}))),StatusPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-tOBaUnM1.js"),__vite__mapDeps([0,1,2,3,4])).then(i=>({default:i.StatusPage}))),PodPage=reactExports.lazy(()=>__vitePreload(()=>import("./PodPage-Bd3Xhmp-.js"),__vite__mapDeps([5,6,7,4,3,2]))),NetworkPage=reactExports.lazy(()=>__vitePreload(()=>import("./NetworkPage-CXjiUMR1.js"),__vite__mapDeps([8,6,7,2]))),ServicesPage=reactExports.lazy(()=>__vitePreload(()=>import("./ServicesPage-CI3jWZGe.js"),__vite__mapDeps([9,1,3,6,2])));function lazyRoute(i){return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading settings..."}),children:i})}function guardedRoute(i){return jsxRuntimeExports.jsx(SettingsAuthBoundary,{product:"Dashboard",children:i})}const dashboardRoutes=[{element:jsxRuntimeExports.jsx(XpodDashboardLayout,{}),children:[{index:!0,element:jsxRuntimeExports.jsx(Navigate,{to:"/overview",replace:!0})},{path:"overview",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(ServicesPage,{product:"dashboard"}))),children:[{index:!0,element:lazyRoute(jsxRuntimeExports.jsx(StatusPage,{}))}]},{path:"runtime",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(ServicesPage,{product:"dashboard"}))),children:[{index:!0,element:lazyRoute(jsxRuntimeExports.jsx(StatusPage,{}))}]},{path:"logs",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(LogsPage,{})))},{path:"rdf",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(RdfPage,{})))},{path:"network",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(NetworkPage,{})))},{path:"usage",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(PodPage,{view:"usage"})))},{path:"status",element:jsxRuntimeExports.jsx(Navigate,{to:"/overview",replace:!0})},{path:"*",element:jsxRuntimeExports.jsx(Navigate,{to:"/overview",replace:!0})}]}];function XpodSolidRuntimeProvider({children:i,value:e}){const t=e??getXpodSolidRuntimeValue(),[n,s]=reactExports.useState(()=>t.session.getSnapshot()),[a,u]=reactExports.useState(()=>t.getIssuer()),[c,h]=reactExports.useState(),[f,p]=reactExports.useState(),[g,y]=reactExports.useState();reactExports.useEffect(()=>t.session.subscribe(R=>{s(R),u(t.getIssuer()),R.status!=="authenticated"?(h(void 0),p(void 0),t.pod.clear()):R.webId!==n.webId&&y(void 0)}),[t,n.webId]),reactExports.useEffect(()=>{initializedRuntimes.has(t)||(initializedRuntimes.add(t),t.session.initialize({restorePreviousSession:!0}).then(R=>{s(R),u(t.getIssuer())}))},[t]),reactExports.useEffect(()=>{if(n.status!=="authenticated")return;let R=!1;return t.pod.open({webId:n.webId,fetch:t.session.fetch}).then(T=>{R||(h(T),p(void 0))},T=>{R||p({webId:n.webId,error:T instanceof Error?T:new Error(String(T))})}),()=>{R=!0}},[t,n]);const S=n.status==="authenticated"?n.webId:void 0;reactExports.useEffect(()=>{if(!S)return;let R=!1;return discoverAiClientConfigurationCapability(t.session.fetch).then(T=>{!R&&t.session.getSnapshot().status==="authenticated"&&t.session.getSnapshot().webId===S&&y(T)}),()=>{R=!0}},[S,t]);const w=reactExports.useMemo(()=>{const R=a??t.getIssuer(),T=n.status==="authenticated"&&f?.webId===n.webId?f.error:void 0,A=T?{status:"error",webId:n.webId,podUrl:c?.podUrl,issuer:R,error:T}:snapshotToState(n,c,R);return{session:t.session,pod:t.pod,fetch:t.session.fetch,state:A.status==="error"?{...A,error:safeAuthError(A.error)}:A,webId:A.webId,podUrl:A.podUrl,issuer:A.issuer,currentPod:c,aiClientConfiguration:g,login:async F=>{const x=normalizeXpodOidcIssuer(F);x&&(t.setIssuer(x),u(x),await t.session.login({oidcIssuer:x,redirectUrl:window.location.href}))},logout:async()=>{t.pod.clear(),h(void 0),await t.session.logout()}}},[g,c,a,f,t,n]);return jsxRuntimeExports.jsx(SolidRuntimeProvider,{value:{session:t.session,pod:t.pod,currentPod:c},children:jsxRuntimeExports.jsx(XpodSolidRuntimeContext.Provider,{value:w,children:i})})}async function discoverAiClientConfigurationCapability(i){try{const e=await i("/api/ai/client-configuration/capability",{method:"GET",credentials:"include",headers:{accept:"application/json"}});if(!e.ok||!e.headers.get("content-type")?.includes("application/json"))return await e.arrayBuffer().catch(()=>{}),manualAiClientConfigurationCapability();const t=await e.json();if(isRecord(t)&&t.available===!0&&t.authority==="local-filesystem")return{available:!0,authority:"local-filesystem",manualInstructions:typeof t.manualInstructions=="string"?t.manualInstructions:manualAiClientConfigurationCapability().manualInstructions}}catch{}return manualAiClientConfigurationCapability()}function manualAiClientConfigurationCapability(){return{available:!1,manualInstructions:"manual client setup is available"}}function isRecord(i){return!!(i&&typeof i=="object"&&!Array.isArray(i))}function DashboardRoutes(){return useRoutes(dashboardRoutes)}function DashboardApp(){return jsxRuntimeExports.jsx(XpodSolidRuntimeProvider,{children:jsxRuntimeExports.jsx(BrowserRouter,{basename:"/dashboard",children:jsxRuntimeExports.jsx(DashboardRoutes,{})})})}clientExports.createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(reactExports.StrictMode,{children:jsxRuntimeExports.jsx(DashboardApp,{})}));export{Activity as A,Button as B,Gauge as G,Link as L,NavLink as N,Outlet as O,React as R,ScrollText as S,cn as a,cva as b,createLucideIcon as c,useLocation as d,clsx as e,Network as f,requireReactDom as g,useComposedRefs as h,createSlot as i,jsxRuntimeExports as j,getDefaultExportFromCjs as k,reactExports as r,useXpodSolidRuntime as u};
305
+ `,prefixes:{ldp:"http://www.w3.org/ns/ldp#"}},a=await this.sparqlExecutor.queryContainer(t,s);for(const u of a){const c=u.resource;if(c){const h=hasStringValue(c)?c.value:String(c);n.push(h)}}}catch(s){console.warn("[listContainerResources] SPARQL query failed:",s)}return n}}_a=entityKind;PodDialect[_a]="PodDialect";function drizzle(i,e){if(!i||!i.info.isLoggedIn)throw new Error("需要有效的已认证Session");const t={session:i,preferredChannels:e?.notifications?.preferredChannels,createQueryEngine:e?.sparql?.createQueryEngine,disableInteropDiscovery:e?.disableInteropDiscovery,podUrl:e?.podUrl??i.info.podUrl,resourcePreparation:e?.resourcePreparation,storageTTL:e?.storageTTL,debug:e?.debug??e?.logger},n=new PodDialect(t);e?.schema&&n.setSchema(e.schema);const s=new PodAsyncSession(n);return new PodDatabase(n,s,e?.schema)}const SOLID_STORAGE_KEYS=new Set(["solid:storage","http://www.w3.org/ns/solid/terms#storage","pim:storage","http://www.w3.org/ns/pim/space#storage"]);async function fetchProfileStorageUrls(i,e){const t=await i(e,{headers:{Accept:"text/turtle, application/ld+json, application/json"},credentials:"include"}).catch(()=>{});if(!t?.ok)return[];const n=t.headers?.get?.("content-type")??"",s=await t.text().catch(()=>"");if(!s)return[];if(n.includes("json"))try{return uniqueNormalizedStorageUrls(extractStorageUrlsFromJson(JSON.parse(s)))}catch{return[]}return uniqueNormalizedStorageUrls(extractStorageUrlsFromTurtle(s))}function extractStorageUrlsFromTurtle(i){return Array.from(i.matchAll(/(?:solid:storage|pim:storage|<http:\/\/www\.w3\.org\/ns\/solid\/terms#storage>|<http:\/\/www\.w3\.org\/ns\/pim\/space#storage>)\s+<([^>]+)>/giu)).map(e=>e[1]).filter(e=>typeof e=="string"&&e.length>0)}function extractStorageUrlsFromJson(i){const e=new Set,t=new WeakSet,n=(s,a=!1)=>{if(typeof s=="string"){a&&e.add(s);return}if(!(!s||typeof s!="object")&&!t.has(s)){if(t.add(s),Array.isArray(s)){for(const u of s)n(u,a);return}for(const[u,c]of Object.entries(s)){const h=SOLID_STORAGE_KEYS.has(u);if(a&&u==="@id"){n(c,!0);continue}n(c,a||h)}}};return n(i),Array.from(e)}function normalizeStorageUrl(i){try{return ensureTrailingSlash(new URL(i).toString())}catch{return}}function uniqueNormalizedStorageUrls(i){const e=new Set;for(const t of i){const n=normalizeStorageUrl(t);n&&e.add(n)}return Array.from(e)}function ensureTrailingSlash(i){return i.replace(/\/+$/u,"")+"/"}const XPOD_LAST_OIDC_ISSUER_STORAGE_KEY="xpod.solid.lastOidcIssuer",XpodSolidRuntimeContext=reactExports.createContext(null),initializedRuntimes=new WeakSet;function snapshotToState(i,e,t){return i.status==="initializing"?{status:"loading",issuer:t}:i.status==="anonymous"?{status:"anonymous",issuer:t}:i.status==="error"?{status:"error",webId:i.webId,error:i.error,podUrl:e?.podUrl,issuer:t}:{status:"authenticated",webId:i.webId,podUrl:e?.podUrl,issuer:t}}async function discoverPodUrlFromWebId({webId:i,fetch:e}){const n=(await fetchProfileStorageUrls(e,i))[0];if(!n)throw new Error("WebID profile does not declare a Solid storage URL");return ensureTrailingSlash(new URL(n).toString())}function createXpodSolidRuntimeValue(i={}){const e=i.sessionFactory?.()??new Session;let t=readIssuerFromSessionInfo(e.info)??readStoredOidcIssuer();const n=createSolidSessionRuntime({session:e}),s={get info(){return e.info},fetch:e.fetch},a=createPodRuntime({adapter:{discoverPod:({webId:u,fetch:c})=>discoverPodUrlFromWebId({webId:u,fetch:c}),openDatabase:({podUrl:u})=>drizzle(s,{podUrl:u,resourcePreparation:"off"}),hydrateCollections:()=>{}}});return{session:n,pod:a,getIssuer:()=>readIssuerFromSessionInfo(e.info)??t??readStoredOidcIssuer(),setIssuer:u=>{const c=normalizeXpodOidcIssuer(u);t=c,c&&writeStoredOidcIssuer(c)}}}let defaultRuntime;function getXpodSolidRuntimeValue(){return defaultRuntime??=createXpodSolidRuntimeValue(),defaultRuntime}function safeAuthError(i){return i.message==="Solid session expired"?i:new Error("Solid login failed. Please reconnect your Pod.")}function useXpodSolidRuntimeContext(){const i=reactExports.useContext(XpodSolidRuntimeContext);if(!i)throw new Error("useXpodSolidRuntime must be used within XpodSolidRuntimeProvider");return i}function readIssuerFromSessionInfo(i){const e=i.issuer??i.oidcIssuer;return normalizeXpodOidcIssuer(e)}function normalizeXpodOidcIssuer(i){if(!(typeof i!="string"||!i.trim()))try{const e=new URL(i.trim());return e.protocol!=="https:"&&e.protocol!=="http:"||e.username||e.password||e.search||e.hash?void 0:e.toString()}catch{return}}function readStoredOidcIssuer(){try{return normalizeXpodOidcIssuer(globalThis.window?.sessionStorage.getItem(XPOD_LAST_OIDC_ISSUER_STORAGE_KEY))}catch{return}}function writeStoredOidcIssuer(i){try{globalThis.window?.sessionStorage.setItem(XPOD_LAST_OIDC_ISSUER_STORAGE_KEY,i)}catch{}}const useXpodSolidRuntime=useXpodSolidRuntimeContext;function SettingsAuthBoundary({children:i,product:e="Settings"}){const t=useXpodSolidRuntime(),n=t.state.status==="loading"?{status:"loading"}:t.state.status==="authenticated"?{status:"authenticated"}:t.state.status==="error"?{status:"error",message:t.state.error.message}:{status:"anonymous"};return jsxRuntimeExports.jsx(AuthBoundary,{state:n,login:t.login,loginView:{title:`Connect Xpod ${e}`,description:e==="Dashboard"?"Use your Solid identity to inspect Xpod status, runtime, logs, RDF, network, and usage.":"Use your Solid identity to manage model, Pod, network, and service settings.",defaultIssuer:window.location.origin},children:i})}const LogsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CDoxbvUP.js"),__vite__mapDeps([0,1,2,3,4])).then(i=>({default:i.LogsPage}))),RdfPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CDoxbvUP.js"),__vite__mapDeps([0,1,2,3,4])).then(i=>({default:i.RdfPage}))),StatusPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CDoxbvUP.js"),__vite__mapDeps([0,1,2,3,4])).then(i=>({default:i.StatusPage}))),PodPage=reactExports.lazy(()=>__vitePreload(()=>import("./PodPage-Bo_NbnK1.js"),__vite__mapDeps([5,6,7,4,3,2]))),NetworkPage=reactExports.lazy(()=>__vitePreload(()=>import("./NetworkPage-CsERgA2D.js"),__vite__mapDeps([8,6,7,2]))),ServicesPage=reactExports.lazy(()=>__vitePreload(()=>import("./ServicesPage-CrNDXQlg.js"),__vite__mapDeps([9,1,3,6,2])));function lazyRoute(i){return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading settings..."}),children:i})}function guardedRoute(i){return jsxRuntimeExports.jsx(SettingsAuthBoundary,{product:"Dashboard",children:i})}const dashboardRoutes=[{element:jsxRuntimeExports.jsx(XpodDashboardLayout,{}),children:[{index:!0,element:jsxRuntimeExports.jsx(Navigate,{to:"/overview",replace:!0})},{path:"auth/callback",element:jsxRuntimeExports.jsx("div",{role:"status",className:"p-6 text-sm text-muted-foreground",children:"Completing Solid login..."})},{path:"overview",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(ServicesPage,{product:"dashboard"}))),children:[{index:!0,element:lazyRoute(jsxRuntimeExports.jsx(StatusPage,{}))}]},{path:"runtime",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(ServicesPage,{product:"dashboard"}))),children:[{index:!0,element:lazyRoute(jsxRuntimeExports.jsx(StatusPage,{}))}]},{path:"logs",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(LogsPage,{})))},{path:"rdf",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(RdfPage,{})))},{path:"network",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(NetworkPage,{})))},{path:"usage",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(PodPage,{view:"usage"})))},{path:"status",element:jsxRuntimeExports.jsx(Navigate,{to:"/overview",replace:!0})},{path:"*",element:jsxRuntimeExports.jsx(Navigate,{to:"/overview",replace:!0})}]}],CSS_ACCOUNT_COOKIE_NAME="css-account",CSS_ACCOUNT_TOKEN_STORAGE_KEY="xpod.cssAccountToken",CSS_ACCOUNT_AUTH_SCHEME="CSS-Account-Token";function isBrowser(){return typeof window<"u"&&typeof document<"u"}function readCssAccountCookie(){if(!isBrowser())return;const i=document.cookie.split(";");for(const e of i){const[t,...n]=e.trim().split("=");if(t===CSS_ACCOUNT_COOKIE_NAME){const s=n.join("=");try{return s?decodeURIComponent(s):void 0}catch{return}}}}function writeCssAccountCookie(i){isBrowser()&&(document.cookie=`${CSS_ACCOUNT_COOKIE_NAME}=${encodeURIComponent(i)}; Path=/; SameSite=Lax`)}function getStoredToken(){if(!(typeof window>"u"))try{return window.sessionStorage.getItem(CSS_ACCOUNT_TOKEN_STORAGE_KEY)||void 0}catch{return}}function getAccountSessionToken(){const i=readCssAccountCookie();if(i)return i;const e=getStoredToken();if(e)return writeCssAccountCookie(e),e}function accountTokenHeaders(i,e={Accept:"application/json"}){const t={...e};return i&&!hasHeader(t,"Authorization")&&(t.Authorization=`${CSS_ACCOUNT_AUTH_SCHEME} ${i}`),t}function storedAccountTokenHeaders(i={Accept:"application/json"}){return accountTokenHeaders(getAccountSessionToken(),i)}function hasHeader(i,e){const t=e.toLowerCase();return Object.keys(i).some(n=>n.toLowerCase()===t)}const XPOD_SOLID_RETURN_TO_STORAGE_KEY="xpod.solid.returnTo";function XpodSolidRuntimeProvider({children:i,value:e}){const t=e??getXpodSolidRuntimeValue(),[n,s]=reactExports.useState(()=>t.session.getSnapshot()),[a,u]=reactExports.useState(()=>t.getIssuer()),[c,h]=reactExports.useState(),[f,p]=reactExports.useState(),[g,y]=reactExports.useState(),[S,w]=reactExports.useState();reactExports.useEffect(()=>t.session.subscribe(A=>{s(A),u(t.getIssuer()),A.status!=="authenticated"?(h(void 0),p(void 0),w(void 0),t.pod.clear()):A.webId!==n.webId&&y(void 0)}),[t,n.webId]),reactExports.useEffect(()=>{if(initializedRuntimes.has(t))return;initializedRuntimes.add(t);const A=isSolidOidcCallback(window.location);A||persistSolidReturnTo(window.location.href),t.session.initialize({restorePreviousSession:!0}).then(F=>{s(F),u(t.getIssuer()),F.status==="authenticated"&&restoreSolidReturnTo(window.location,A)})},[t]),reactExports.useEffect(()=>{if(n.status!=="authenticated")return;let A=!1;return t.pod.open({webId:n.webId,fetch:t.session.fetch}).then(F=>{A||(h(F),p(void 0))},F=>{A||p({webId:n.webId,error:F instanceof Error?F:new Error(String(F))})}),()=>{A=!0}},[t,n]);const R=n.status==="authenticated"?n.webId:void 0;reactExports.useEffect(()=>{if(!R)return;let A=!1;return discoverAccountClientCredentialsUrl(fetch).then(F=>{A||w(F)}),discoverAiClientConfigurationCapability(t.session.fetch).then(F=>{!A&&t.session.getSnapshot().status==="authenticated"&&t.session.getSnapshot().webId===R&&y(F)}),()=>{A=!0}},[R,t]);const T=reactExports.useMemo(()=>{const A=a??t.getIssuer(),F=n.status==="authenticated"&&f?.webId===n.webId?f.error:void 0,x=F?{status:"error",webId:n.webId,podUrl:c?.podUrl,issuer:A,error:F}:snapshotToState(n,c,A);return{session:t.session,pod:t.pod,fetch:t.session.fetch,state:x.status==="error"?{...x,error:safeAuthError(x.error)}:x,webId:x.webId,podUrl:x.podUrl,issuer:x.issuer,currentPod:c,aiClientConfiguration:g,accountClientCredentialsUrl:S,login:async D=>{const O=normalizeXpodOidcIssuer(D);O&&(t.setIssuer(O),u(O),persistSolidReturnTo(window.location.href),await t.session.login({oidcIssuer:O,redirectUrl:solidOidcCallbackUrl(window.location)}))},logout:async()=>{t.pod.clear(),h(void 0),await t.session.logout()}}},[S,g,c,a,f,t,n]);return jsxRuntimeExports.jsx(SolidRuntimeProvider,{value:{session:t.session,pod:t.pod,currentPod:c},children:jsxRuntimeExports.jsx(XpodSolidRuntimeContext.Provider,{value:T,children:i})})}async function discoverAccountClientCredentialsUrl(i){try{const e=await i("/.account/",{credentials:"include",headers:storedAccountTokenHeaders({accept:"application/json"})});if(!e.ok||!e.headers.get("content-type")?.includes("application/json"))return;const t=await e.json();if(!isRecord(t)||!isRecord(t.controls)||!isRecord(t.controls.account))return;const n=t.controls.account.clientCredentials;return typeof n=="string"&&n?n:void 0}catch{return}}function solidOidcCallbackUrl(i){const e=i.pathname.startsWith("/dashboard")?"/dashboard":"/settings";return new URL(`${e}/auth/callback`,i.origin).toString()}function persistSolidReturnTo(i){try{window.sessionStorage.setItem(XPOD_SOLID_RETURN_TO_STORAGE_KEY,i)}catch{}}function isSolidOidcCallback(i){if(i.pathname.endsWith("/auth/callback"))return!0;const e=new URLSearchParams(i.search);return e.has("code")&&e.has("state")}function restoreSolidReturnTo(i,e=!1){if(!(!e&&!isSolidOidcCallback(i)))try{const t=window.sessionStorage.getItem(XPOD_SOLID_RETURN_TO_STORAGE_KEY);if(!t)return;const n=new URL(t,i.origin);if(n.origin!==i.origin||!/^\/(?:settings|dashboard)(?:\/|$)/u.test(n.pathname))return;window.sessionStorage.removeItem(XPOD_SOLID_RETURN_TO_STORAGE_KEY),window.history.replaceState(null,"",`${n.pathname}${n.search}${n.hash}`),window.dispatchEvent(new window.PopStateEvent("popstate"))}catch{}}async function discoverAiClientConfigurationCapability(i){try{const e=await i("/api/ai/client-configuration/capability",{method:"GET",credentials:"include",headers:{accept:"application/json"}});if(!e.ok||!e.headers.get("content-type")?.includes("application/json"))return await e.arrayBuffer().catch(()=>{}),manualAiClientConfigurationCapability();const t=await e.json();if(isRecord(t)&&t.available===!0&&t.authority==="local-filesystem")return{available:!0,authority:"local-filesystem",manualInstructions:typeof t.manualInstructions=="string"?t.manualInstructions:manualAiClientConfigurationCapability().manualInstructions}}catch{}return manualAiClientConfigurationCapability()}function manualAiClientConfigurationCapability(){return{available:!1,manualInstructions:"manual client setup is available"}}function isRecord(i){return!!(i&&typeof i=="object"&&!Array.isArray(i))}function DashboardRoutes(){return useRoutes(dashboardRoutes)}function DashboardApp(){return jsxRuntimeExports.jsx(XpodSolidRuntimeProvider,{children:jsxRuntimeExports.jsx(BrowserRouter,{basename:"/dashboard",children:jsxRuntimeExports.jsx(DashboardRoutes,{})})})}clientExports.createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(reactExports.StrictMode,{children:jsxRuntimeExports.jsx(DashboardApp,{})}));export{Activity as A,Button as B,Gauge as G,Link as L,NavLink as N,Outlet as O,React as R,ScrollText as S,cn as a,cva as b,createLucideIcon as c,useLocation as d,clsx as e,Network as f,requireReactDom as g,useComposedRefs as h,createSlot as i,jsxRuntimeExports as j,getDefaultExportFromCjs as k,reactExports as r,useXpodSolidRuntime as u};